[MIRROR] Many new global signals from downstream (#12051)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-11-27 20:37:30 -07:00
committed by GitHub
parent 9c25b75d6c
commit 408eeaa5d1
15 changed files with 50 additions and 8 deletions

View File

@@ -80,7 +80,7 @@ SUBSYSTEM_DEF(supply)
var/base_value = 0
// Most items must be in a crate!
var/sold_successfully = FALSE
var/list/things_sold_successfully = list()
if(istype(MA,/obj/structure/closet/crate))
var/obj/structure/closet/crate/CR = MA
@@ -90,12 +90,14 @@ SUBSYSTEM_DEF(supply)
// For each thing in the crate, get the value and quantity
for(var/atom/A in CR)
sold_successfully = SEND_SIGNAL(A,COMSIG_ITEM_SOLD,EC,TRUE)
if(SEND_SIGNAL(A,COMSIG_ITEM_SOLD,EC,TRUE))
things_sold_successfully += A
else
// Selling things that are not in crates.
// Usually it just makes a log that it wasn't shipped properly, and so isn't worth anything
sold_successfully = SEND_SIGNAL(MA,COMSIG_ITEM_SOLD,EC,FALSE)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_SUPPLY_SHUTTLE_SELL_ITEM, MA, sold_successfully, EC, subarea)
if(SEND_SIGNAL(MA,COMSIG_ITEM_SOLD,EC,FALSE))
things_sold_successfully += MA
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_SUPPLY_SHUTTLE_SELL_ITEM, MA, things_sold_successfully, EC, subarea)
exported_crates += EC
points += EC.value