Vox-Fitted Back Stuff, Adds Geneticist Duffel, Fixing Typos and Refactoring Back Icon Generation

Using species_fit and sprite_sheets now works properly for items worn on
the back. Previously it was using the item_state name if it existed in
order to generate the on-mob icon, which was wrong. I restructured it to
work the same way as the rest of the icon generation procs.
This commit is contained in:
KasparoVy
2016-02-18 14:59:28 -05:00
parent e438fd6ec7
commit 679218b952
8 changed files with 24 additions and 16 deletions
+4
View File
@@ -12,6 +12,10 @@
w_class = 4
origin_tech = "biotech=4"
action_button_name = "Toggle Paddles"
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/back.dmi'
)
var/on = 0 //if the paddles are equipped (1) or on the defib (0)
var/safety = 1 //if you can zap people with the defibs on harm mode
@@ -15,6 +15,10 @@
max_w_class = 3
max_combined_w_class = 21
storage_slots = 21
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/back.dmi'
)
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
playsound(src.loc, "rustle", 50, 1, -5)
@@ -43,10 +47,10 @@
else if(istype(W, /obj/item/weapon/storage/backpack/holding) && !W.crit_fail)
var/response = alert(user, "Are you sure you want to put the bag of holding inside another bag of holding?","Are you sure you want to die?","Yes","No")
if(response == "Yes")
user.visible_message("<span class='warning'>[user] grins as he begins to put a Bag of Holding into a Bag of Holding!</span>", "<span class='warning'>You begin to put the Bag of Holding into the Bag of Holding!</span>")
user.visible_message("<span class='warning'>[user] grins as \he begins to put a Bag of Holding into a Bag of Holding!</span>", "<span class='warning'>You begin to put the Bag of Holding into the Bag of Holding!</span>")
if(do_after(user,30,target=src))
investigate_log("has become a singularity. Caused by [user.key]","singulo")
user.visible_message("<span class='warning'>[user] erupts in evil laughter as he puts the Bag of Holding into another Bag of Holding!</span>", "<span class='warning'>You can't help yourself from laughing as you put the Bag of Holding into another Bag of Holding, complete darkness surrounding you</span>","<span class='warning'> You hear the sound of scientific evil brewing! </span>")
user.visible_message("<span class='warning'>[user] erupts in evil laughter as \he puts the Bag of Holding into another Bag of Holding!</span>", "<span class='warning'>You can't help but laugh wildly as you put the Bag of Holding into another Bag of Holding, complete darkness surrounding you.</span>","<span class='warning'> You hear the sound of scientific evil brewing! </span>")
qdel(W)
var/obj/singularity/singulo = new /obj/singularity(get_turf(user))
singulo.energy = 300 //To give it a small boost
@@ -54,7 +58,7 @@
log_game("[key_name(user)] detonated a bag of holding")
qdel(src)
else
user.visible_message("After careful consideration, [user] has decided that putting a Bag of Holding inside another Bag of Holding would not yield the ideal outcome","You come to the realization that this might not be the greatest idea")
user.visible_message("After careful consideration, [user] has decided that putting a Bag of Holding inside another Bag of Holding would not yield the ideal outcome.","You come to the realization that this might not be the greatest idea.")
else
. = ..()
@@ -77,7 +81,7 @@
/obj/item/weapon/storage/backpack/santabag
name = "Santa's Gift Bag"
desc = "Space Santa uses this to deliver toys to all the nice children in space in Christmas! Wow, it's pretty big!"
desc = "Space Santa uses this to deliver toys to all the nice children in space on Christmas! Wow, it's pretty big!"
icon_state = "giftbag0"
item_state = "giftbag"
w_class = 4.0
@@ -169,7 +173,6 @@
desc = "An NT Deluxe satchel, with the finest quality leather and the company logo in a thin gold stitch"
icon_state = "nt_deluxe"
/obj/item/weapon/storage/backpack/satchel/withwallet
New()
..()
@@ -324,7 +327,6 @@
icon_state = "duffel-captain"
item_state = "duffel-captain"
/obj/item/weapon/storage/backpack/duffel/security
name = "security duffelbag"
desc = "A duffelbag built with robust fabric!"
@@ -344,13 +346,13 @@
item_state = "duffel-toxins"
/obj/item/weapon/storage/backpack/duffel/genetics
name = "scientist duffelbag"
name = "geneticist duffelbag"
desc = "A duffelbag designed to hold gibbering monkies."
icon_state = "duffel-toxins"
item_state = "duffel-toxins"
icon_state = "duffel-gene"
item_state = "duffel-gene"
/obj/item/weapon/storage/backpack/duffel/chemistry
name = "scientist duffelbag"
name = "chemist duffelbag"
desc = "A duffelbag designed to hold corrosive substances."
icon_state = "duffel-chemistry"
item_state = "duffel-chemistry"
@@ -924,27 +924,29 @@ var/global/list/damage_icon_parts = list()
back.screen_loc = ui_back //TODO
//determine the icon to use
var/icon/overlay_icon
var/icon/standing
if(back.icon_override)
overlay_icon = back.icon_override
standing = image("icon" = back.icon_override, "icon_state" = "[back.icon_state]")
else if(istype(back, /obj/item/weapon/rig))
//If this is a rig and a mob_icon is set, it will take species into account in the rig update_icon() proc.
var/obj/item/weapon/rig/rig = back
overlay_icon = rig.mob_icon
standing = rig.mob_icon
else if(back.sprite_sheets && back.sprite_sheets[species.name])
overlay_icon = back.sprite_sheets[species.name]
standing = image("icon" = back.sprite_sheets[species.name], "icon_state" = "[back.icon_state]")
else
overlay_icon = icon('icons/mob/back.dmi', "[back.icon_state]")
standing = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]")
/*
//determine state to use
var/overlay_state
if(back.item_state)
overlay_state = back.item_state
else
overlay_state = back.icon_state
*/
//create the image
overlays_standing[BACK_LAYER] = image(icon = overlay_icon, icon_state = overlay_state)
overlays_standing[BACK_LAYER] = standing
else
overlays_standing[BACK_LAYER] = null
Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB