mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-27 02:23:47 +00:00
[MIRROR] Many new global signals from downstream (#12051)
Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
9c25b75d6c
commit
408eeaa5d1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user