From 636aef29700cd8f28872bc63d5bb278432275b2a Mon Sep 17 00:00:00 2001 From: Lohikar Date: Mon, 3 Apr 2017 14:43:38 -0500 Subject: [PATCH] Tactical Holster Fixes & Random Obj Runtime Fix (#2043) changes: Fixed some issues with tactical armor's holster. Made tactical armor qdel its child storage instead of just nulling it out. Hopefully fixed the runtimes with random voidsuits. Fixed a bug where random vendors were always depleted. Fixed a bug where industrials could not set their eye color. Fixes #2041. Hopefully fixes #1740. --- code/game/objects/random/random.dm | 12 ++++++------ code/modules/clothing/suits/armor.dm | 7 ++++--- code/modules/clothing/under/accessories/holster.dm | 3 +++ .../human/species/station/machine_subspecies.dm | 2 +- html/changelogs/lohikar-PR-2043.yml | 5 +++++ 5 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 html/changelogs/lohikar-PR-2043.yml diff --git a/code/game/objects/random/random.dm b/code/game/objects/random/random.dm index 7ca18acb805..d947597d1a6 100644 --- a/code/game/objects/random/random.dm +++ b/code/game/objects/random/random.dm @@ -397,18 +397,18 @@ ) has_postspawn = TRUE -/obj/random/voidsuit/New(var/_damaged = 0) +/obj/random/voidsuit/New(loc, _damaged = 0) damaged = _damaged - ..() + ..(loc) /obj/random/voidsuit/post_spawn(obj/item/clothing/suit/space/void/suit) - var/helmet = suitmap[suit] + var/helmet = suitmap[suit.type] if (helmet) new helmet(loc) else log_debug("random_obj (voidsuit): Type [suit.type] was unable to spawn a matching helmet!") new /obj/item/clothing/shoes/magboots(loc) - if (damaged & prob(60)) + if (damaged && prob(60)) suit.create_breaches(pick(BRUTE, BURN), rand(1, 5)) /obj/random/vendor @@ -436,9 +436,9 @@ ) has_postspawn = TRUE -/obj/random/vendor/New(var/_depleted = 0) +/obj/random/vendor/New(loc, _depleted = 0) depleted = _depleted - ..() + ..(loc) /obj/random/vendor/post_spawn(obj/machinery/vending/V) if (!depleted) diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index cd1cd2d501c..9fb30b498f1 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -255,9 +255,10 @@ /obj/item/clothing/suit/armor/tactical/New() ..() - holster = new(src) - holster.has_suit = 1//its inside a suit, we set this so it can be drawn from - pockets = null//Tactical armour has internal holster instead of pockets, so we null this out + holster = new() + holster.on_attached(src) //its inside a suit, we set this so it can be drawn from + QDEL_NULL(pockets) //Tactical armour has internal holster instead of pockets, so we null this out + overlays.Cut() // Remove the holster's overlay. /obj/item/clothing/suit/armor/tactical/attackby(obj/item/W as obj, mob/user as mob) ..() diff --git a/code/modules/clothing/under/accessories/holster.dm b/code/modules/clothing/under/accessories/holster.dm index 8264142d82d..d6b5cbd73f7 100644 --- a/code/modules/clothing/under/accessories/holster.dm +++ b/code/modules/clothing/under/accessories/holster.dm @@ -98,6 +98,9 @@ var/obj/item/clothing/under/S = src if (S.accessories.len) H = locate() in S.accessories + else if (istype(src, /obj/item/clothing/suit/armor/tactical)) // This armor is a snowflake and has an integrated holster. + var/obj/item/clothing/suit/armor/tactical/tacticool = src + H = tacticool.holster if (!H) usr << "Something is very wrong." diff --git a/code/modules/mob/living/carbon/human/species/station/machine_subspecies.dm b/code/modules/mob/living/carbon/human/species/station/machine_subspecies.dm index df1705bfe79..9543182be57 100644 --- a/code/modules/mob/living/carbon/human/species/station/machine_subspecies.dm +++ b/code/modules/mob/living/carbon/human/species/station/machine_subspecies.dm @@ -120,7 +120,7 @@ "r_foot" = list("path" = /obj/item/organ/external/foot/right/industrial) ) - appearance_flags = HAS_HAIR_COLOR + appearance_flags = HAS_EYE_COLOR heat_level_1 = 600 heat_level_2 = 1200 diff --git a/html/changelogs/lohikar-PR-2043.yml b/html/changelogs/lohikar-PR-2043.yml new file mode 100644 index 00000000000..44e3a7c6f17 --- /dev/null +++ b/html/changelogs/lohikar-PR-2043.yml @@ -0,0 +1,5 @@ +author: Lohikar +delete-after: True +changes: + - bugfix: "Fixed a bug where holstering didn't quite work right with tactical armor." + - bugfix: "Industrial IPC units' eye controller firmware has been upgraded, fixing a bug where a unit's configured eye color would not display."