Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: cargo can_approve and null crate #4475

Merged
merged 7 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions code/datums/supplypacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY
manifest += "</ul>"

/datum/supply_packs/proc/can_approve(mob/user)
if(SSshuttle.points <= cost)
if(SSshuttle.points < cost)
to_chat(user, span_warning("There are insufficient supply points for this request."))
return FALSE
if(credits_cost && SSshuttle.cargo_money_account.money <= credits_cost)
if(credits_cost && SSshuttle.cargo_money_account.money < credits_cost)
to_chat(user, span_warning("There are not enough money on cargo account for this request."))
return FALSE
if(!length(required_tech))
Expand Down Expand Up @@ -246,21 +246,13 @@ GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY

/datum/supply_packs/emergency/syndicate
name = "ERROR_NULL_ENTRY"
contains = list()
contains = list(/obj/item/storage/box/random_syndi)
cost = 0
credits_cost = 2500
containertype = /obj/structure/closet/crate/syndicate
containername = "crate"
hidden = 1

/datum/supply_packs/emergency/syndicate/New()
var/list/items = GLOB.uplink_items.Copy()
while(contains.len < 3)
var/datum/uplink_item/item = pick_n_take(items)
if(istype(item, /datum/uplink_item/racial) || item.hijack_only || item.cost > 20)
continue
contains.Add(item.item)

/datum/supply_packs/emergency/highrisk
name = "HEADER"
cost = 450
Expand Down
14 changes: 14 additions & 0 deletions code/game/objects/items/weapons/storage/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,20 @@
new /obj/item/storage/lockbox/medal/hardmode_box(src)
new /obj/item/paper/hardmode(src)

/obj/item/storage/box/random_syndi
icon_state = "box_of_doom"


/obj/item/storage/box/random_syndi/populate_contents()
var/list/items = GLOB.uplink_items.Copy()
while(contents.len < 3)
var/datum/uplink_item/item = pick_n_take(items)
if(!istype(item))
return
if(istype(item, /datum/uplink_item/racial) || item.hijack_only || item.cost > 20)
continue
new item.item(src)

ROdenFL marked this conversation as resolved.
Show resolved Hide resolved
#undef NODESIGN
#undef NANOTRASEN
#undef SYNDI
Expand Down
Loading