Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
fira committed Nov 7, 2023
1 parent 97a2c28 commit 48056f8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
1 change: 1 addition & 0 deletions code/datums/components/crate_tag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
parent.AddComponent(/datum/component/label, name)
src.name = name // Keep it around additionally for notifications

/// Handler to notify an overwatched squad that this crate has been dropped for them
/datum/component/crate_tag/proc/notify_squad(datum/source, datum/squad/squad)
SIGNAL_HANDLER
squad.send_message("'[name]' supply drop incoming. Heads up!")
Expand Down
7 changes: 4 additions & 3 deletions code/modules/cm_tech/droppod/supply.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
drop_time = 10 SECONDS
dropping_time = 2 SECONDS
open_time = 2 SECONDS
/// The contained parimary object, used as a replacer for the droppod icon
var/obj/structure/package

/obj/structure/droppod/supply/Initialize(mapload, obj/structure/closet/crate/package)
/obj/structure/droppod/supply/Initialize(mapload, obj/structure/package)
. = ..()
if(!istype(package))
return INITIALIZE_HINT_QDEL
package.forceMove(src)
src.package = package

/obj/structure/droppod/supply/Destroy()
. = ..()
/obj/structure/droppod/supply/Destroy(force)
package = null
return ..()

/* Pose as the crate so we see it falling from the skies */
/obj/structure/droppod/supply/update_icon()
Expand Down
36 changes: 18 additions & 18 deletions code/modules/recycling/sortingmachinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -282,36 +282,36 @@
if(!chosen_type || !ispath(crate.crate_customizing_types[chosen_type]) || !user.Adjacent(target) || !target.z)
return
target.AddComponent(/datum/component/crate_tag, label, crate.crate_customizing_types[chosen_type])
src.amount -= 3
amount -= 3
else
if (src.amount > 3 && !crate.opened)
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(crate.loc))
P.icon_state = "deliverycrate"
P.wrapped = crate
crate.forceMove(P)
src.amount -= 3
if (amount > 3 && !crate.opened)
var/obj/structure/bigDelivery/package = new /obj/structure/bigDelivery(get_turf(crate.loc))
package.icon_state = "deliverycrate"
package.wrapped = crate
crate.forceMove(package)
amount -= 3
user.visible_message("\The [user] wraps \a [target] with \a [src].",\
SPAN_NOTICE("You wrap \the [target], leaving [amount] units of paper on \the [src]."),\
"You hear someone taping paper around a large object.")
else if(src.amount < 3)
else if(amount < 3)
to_chat(user, SPAN_WARNING("You need more paper."))
else if (istype (target, /obj/structure/closet))
var/obj/structure/closet/O = target
if (src.amount > 3 && !O.opened)
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))
P.wrapped = O
O.welded = 1
O.forceMove(P)
src.amount -= 3
var/obj/structure/closet/object = target
if (amount > 3 && !object.opened)
var/obj/structure/bigDelivery/package = new /obj/structure/bigDelivery(get_turf(object.loc))
package.wrapped = object
object.welded = 1
object.forceMove(package)
amount -= 3
user.visible_message("\The [user] wraps \a [target] with \a [src].",\
SPAN_NOTICE("You wrap \the [target], leaving [amount] units of paper on \the [src]."),\
"You hear someone taping paper around a large object.")
else if(src.amount < 3)
else if(amount < 3)
to_chat(user, SPAN_WARNING("You need more paper."))
else
to_chat(user, SPAN_NOTICE(" The object you are trying to wrap is unsuitable for the sorting machinery!"))
if (src.amount <= 0)
new /obj/item/trash/c_tube( src.loc )
if (amount <= 0)
new /obj/item/trash/c_tube( loc )
qdel(src)
return
return
Expand Down

0 comments on commit 48056f8

Please sign in to comment.