Shipping Package tweaks

Shipping packages now have sealed and unsealed icons
- These are just minor edits of the idOld icon_state the shipping
package previously used.

Shipping packages now have their own proc to handle adjusting their
description, rather than being done manually by the request console that
creates them.
- The description also reflects if the package is unsealed (just in case
the icon didn't give it away

Empty unsealed shipping packages can be destroyed by activating them
in-hand.
- There is a confirmation to prevent accidental shredding of shipping
packages.
This commit is contained in:
FalseIncarnate
2017-01-16 01:18:06 -05:00
parent 811ccaa273
commit 4e1e3a6107
3 changed files with 12 additions and 4 deletions
+1 -1
View File
@@ -325,5 +325,5 @@ var/list/obj/machinery/requests_console/allConsoles = list()
/obj/machinery/requests_console/proc/print_label(tag_name, tag_index)
var/obj/item/shippingPackage/sp = new /obj/item/shippingPackage(get_turf(src))
sp.sortTag = tag_index
sp.desc += " The label says \"Deliver to [tag_name]\"."
sp.update_desc()
print_cooldown = world.time + 600 //1 minute cooldown before you can print another label, but you can still configure the next one during this time
+11 -3
View File
@@ -363,11 +363,10 @@
name = "Shipping package"
desc = "A pre-labeled package for shipping an item to coworkers."
icon = 'icons/obj/storage.dmi'
icon_state = "idOld"
icon_state = "shippack"
var/obj/item/wrapped = null
var/sortTag = 0
var/sealed = 0
var/original_name = "Shipping package"
/obj/item/shippingPackage/attackby(obj/O, mob/user, params)
if(sealed)
@@ -377,7 +376,7 @@
to_chat(user, "<span class='notice'>Invalid text.</span>")
return
user.visible_message("<span class='notice'>[user] addresses [src] to [str].</span>")
name = "[original_name] (RE: [str])"
name = "Shipping package (RE: [str])"
return
if(wrapped)
to_chat(user, "<span class='notice'>[src] already contains \a [wrapped].</span>")
@@ -410,10 +409,19 @@
wrapped = null
if("Seal Package")
to_chat(user, "<span class='notice'>You seal [src], preparing it for delivery.</span>")
icon_state = "shippack_sealed"
sealed = 1
update_desc()
else
if(alert("Do you want to tear up the package?",, "Yes", "No") == "Yes")
to_chat(user, "<span class='notice'>You shred [src].</span>")
playsound(loc, 'sound/items/poster_ripped.ogg', 50, 1)
user.unEquip(src)
qdel(src)
/obj/item/shippingPackage/proc/update_desc()
desc = "A pre-labeled package for shipping an item to coworkers."
if(sortTag)
desc += " The label says \"Deliver to [TAGGERLOCATIONS[sortTag]]\"."
if(!sealed)
desc += " The package is not sealed."
Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB