Second round of fixes:

- Fixed+Future proofed Mutant Parts Sprites
- Fixed Lesser Summon Guns activating the wrong hand
- Fixes stacks merge()ing with and consuming themselves
This commit is contained in:
Remie Richards
2016-09-03 11:40:21 +01:00
parent 897e8c5b88
commit 09fee94db5
5 changed files with 22 additions and 4 deletions
+2
View File
@@ -200,6 +200,8 @@
update_icon()
/obj/item/stack/proc/merge(obj/item/stack/S) //Merge src into S, as much as possible
if(S == src) //amusingly this can cause a stack to consume itself, let's not allow that.
return
var/transfer = get_amount()
if(S.is_cyborg)
transfer = min(transfer, round((S.source.max_energy - S.source.energy) / S.cost))
@@ -380,6 +380,8 @@
var/image/I
for(var/layer in relevent_layers)
var/layertext = mutant_bodyparts_layertext(layer)
for(var/bodypart in bodyparts_to_add)
var/datum/sprite_accessory/S
switch(bodypart)
@@ -423,9 +425,9 @@
var/icon_string
if(S.gender_specific)
icon_string = "[g]_[bodypart]_[S.icon_state]_[layer]"
icon_string = "[g]_[bodypart]_[S.icon_state]_[layertext]"
else
icon_string = "m_[bodypart]_[S.icon_state]_[layer]"
icon_string = "m_[bodypart]_[S.icon_state]_[layertext]"
I = image("icon" = S.icon, "icon_state" = icon_string, "layer" =- layer)
@@ -455,9 +457,9 @@
if(S.hasinner)
if(S.gender_specific)
icon_string = "[g]_[bodypart]inner_[S.icon_state]_[layer]"
icon_string = "[g]_[bodypart]inner_[S.icon_state]_[layertext]"
else
icon_string = "m_[bodypart]inner_[S.icon_state]_[layer]"
icon_string = "m_[bodypart]inner_[S.icon_state]_[layertext]"
I = image("icon" = S.icon, "icon_state" = icon_string, "layer" =- layer)
@@ -473,6 +475,19 @@
H.apply_overlay(BODY_ADJ_LAYER)
H.apply_overlay(BODY_FRONT_LAYER)
//This exists so sprite accessories can still be per-layer without having to include that layer's
//number in their sprite name, which causes issues when those numbers change.
/datum/species/proc/mutant_bodyparts_layertext(layer)
switch(layer)
if(BODY_BEHIND_LAYER)
return "BEHIND"
if(BODY_ADJ_LAYER)
return "ADJ"
if(BODY_FRONT_LAYER)
return "FRONT"
/datum/species/proc/spec_life(mob/living/carbon/human/H)
if(NOBREATH in specflags)
H.setOxyLoss(0)
@@ -20,3 +20,4 @@
C.drop_item()
var/obj/item/weapon/gun/projectile/shotgun/boltaction/enchanted/GUN = new
C.put_in_hands(GUN)
C.swap_hand(C.get_held_index_of_item(GUN))
Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB