From 1500dbd505ab8130626749667f9a2128d8a880ee Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 30 Nov 2014 10:52:35 +1030 Subject: [PATCH 01/10] Fixes #7128 --- code/modules/clothing/spacesuits/rig/rig.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index fa730c7cb4..ca2eea9bc6 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -155,13 +155,13 @@ /obj/item/weapon/rig/proc/suit_is_deployed() if(!istype(wearer) || src.loc != wearer || wearer.back != src) return 0 - if(helm_type && (!helmet || wearer.head != helmet)) + if(helm_type && !(helmet && wearer.head == helmet)) return 0 - if(glove_type && (!gloves || wearer.gloves != gloves)) + if(glove_type && !(gloves && wearer.gloves == gloves)) return 0 - if(boot_type && (!boots || wearer.shoes != boots)) + if(boot_type && !(boots && wearer.shoes == boots)) return 0 - if(chest_type && (!chest || wearer.wear_suit != chest)) + if(chest_type && !(chest && wearer.wear_suit == chest)) return 0 return 1 From c7973e0ab2f7f91171c970769a97a3b21a0904e8 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 30 Nov 2014 11:12:15 +1030 Subject: [PATCH 02/10] Made suit boots children of magboots. --- code/modules/clothing/spacesuits/rig/rig.dm | 4 ++-- code/modules/clothing/spacesuits/rig/rig_pieces.dm | 2 +- code/modules/clothing/spacesuits/rig/suits/light.dm | 4 ++-- nano/templates/hardsuit.tmpl | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index ca2eea9bc6..b1f22a6e46 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -32,14 +32,14 @@ var/list/initial_modules var/chest_type = /obj/item/clothing/suit/space/rig var/helm_type = /obj/item/clothing/head/helmet/space/rig - var/boot_type = /obj/item/clothing/shoes/rig + var/boot_type = /obj/item/clothing/shoes/magboots/rig var/glove_type = /obj/item/clothing/gloves/rig var/cell_type = /obj/item/weapon/cell/high var/air_type = /obj/item/weapon/tank/oxygen //Component/device holders. var/obj/item/weapon/tank/air_supply // Air tank, if any. - var/obj/item/clothing/shoes/rig/boots = null // Deployable boots, if any. + var/obj/item/clothing/shoes/boots = null // Deployable boots, if any. var/obj/item/clothing/suit/space/rig/chest // Deployable chestpiece, if any. var/obj/item/clothing/head/helmet/space/rig/helmet = null // Deployable helmet, if any. var/obj/item/clothing/gloves/rig/gloves = null // Deployable gauntlets, if any. diff --git a/code/modules/clothing/spacesuits/rig/rig_pieces.dm b/code/modules/clothing/spacesuits/rig/rig_pieces.dm index 0251a625eb..8e7285a628 100644 --- a/code/modules/clothing/spacesuits/rig/rig_pieces.dm +++ b/code/modules/clothing/spacesuits/rig/rig_pieces.dm @@ -21,7 +21,7 @@ species_restricted = null gender = PLURAL -/obj/item/clothing/shoes/rig +/obj/item/clothing/shoes/magboots/rig name = "boots" cold_protection = FEET heat_protection = FEET diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm index b94d1701e1..6f510942d9 100644 --- a/code/modules/clothing/spacesuits/rig/suits/light.dm +++ b/code/modules/clothing/spacesuits/rig/suits/light.dm @@ -13,7 +13,7 @@ chest_type = /obj/item/clothing/suit/space/rig/light helm_type = /obj/item/clothing/head/helmet/space/rig/light - boot_type = /obj/item/clothing/shoes/rig/light + boot_type = /obj/item/clothing/shoes/magboots/rig/light glove_type = /obj/item/clothing/gloves/rig/light /obj/item/clothing/suit/space/rig/light @@ -22,7 +22,7 @@ /obj/item/clothing/gloves/rig/light name = "gloves" -/obj/item/clothing/shoes/rig/light +/obj/item/clothing/shoes/magboots/rig/light name = "shoes" /obj/item/clothing/head/helmet/space/rig/light diff --git a/nano/templates/hardsuit.tmpl b/nano/templates/hardsuit.tmpl index ad0dece2dc..426f40db54 100644 --- a/nano/templates/hardsuit.tmpl +++ b/nano/templates/hardsuit.tmpl @@ -56,7 +56,7 @@ Used In File(s): /code/modules/clothing/spacesuits/rig/rig.dm Cover status: - + {{if data.emagged || !data.securitycheck}} ERROR {{else}} From 4c1ea8cd3a7f0cb7f6a9686e6fdf6b0e4996f0e0 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 30 Nov 2014 12:46:03 +1030 Subject: [PATCH 03/10] Several hardsuit fixes. --- code/game/objects/items.dm | 10 ++++++++-- .../clothing/spacesuits/rig/modules/ninja.dm | 10 +++++++++- code/modules/clothing/spacesuits/rig/rig.dm | 2 +- code/modules/projectiles/guns/energy/laser.dm | 18 ++++++++++------- .../projectiles/guns/energy/nuclear.dm | 20 +++++++++++-------- 5 files changed, 41 insertions(+), 19 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 30cc42e6cf..7def0ddae2 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -262,7 +262,8 @@ if(H.wear_mask) return 0 if(H.head && !(H.head.canremove) && (H.head.flags & HEADCOVERSMOUTH)) - H << "\red \The [H.head] is in the way." + if(!disable_warning) + H << "\red \The [H.head] is in the way." return 0 if( !(slot_flags & SLOT_MASK) ) return 0 @@ -305,7 +306,8 @@ if(H.glasses) return 0 if(H.head && !(H.head.canremove) && (H.head.flags & HEADCOVERSEYES)) - H << "\red \The [H.head] is in the way." + if(!disable_warning) + H << "\red \The [H.head] is in the way." return 0 if( !(slot_flags & SLOT_EYES) ) return 0 @@ -339,6 +341,10 @@ if(slot_w_uniform) if(H.w_uniform) return 0 + if(H.wear_suit) + if(!disable_warning) + H << "\red \The [H.wear_suit] is in the way." + return 0 if( !(slot_flags & SLOT_ICLOTHING) ) return 0 return 1 diff --git a/code/modules/clothing/spacesuits/rig/modules/ninja.dm b/code/modules/clothing/spacesuits/rig/modules/ninja.dm index 50865ca8df..63231dcd95 100644 --- a/code/modules/clothing/spacesuits/rig/modules/ninja.dm +++ b/code/modules/clothing/spacesuits/rig/modules/ninja.dm @@ -173,6 +173,14 @@ /obj/item/rig_module/self_destruct/engage() explosion(get_turf(src), 0, 0, 3, 4) + if(holder && holder.wearer) + holder.wearer.drop_from_inventory(src) + del(holder) + del(src) /obj/item/rig_module/self_destruct/small/engage() - explosion(get_turf(src), 0, 0, 1, 2) \ No newline at end of file + explosion(get_turf(src), 0, 0, 1, 2) + if(holder && holder.wearer) + holder.wearer.drop_from_inventory(src) + del(holder) + del(src) \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index b1f22a6e46..1d85f749d9 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -437,7 +437,7 @@ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) - ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 800, 600) + ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 750, 550) ui.set_initial_data(data) ui.open() ui.set_auto_update(1) diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 9ddfa5c9ff..9493dc0e14 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -80,13 +80,17 @@ obj/item/weapon/gun/energy/laser/retro /obj/item/weapon/gun/energy/lasercannon/mounted/load_into_chamber() if(in_chamber) return 1 - var/mob/living/carbon/human/H = loc - if(istype(H) && H.back) - var/obj/item/weapon/rig/suit = H.back - if(istype(suit) && suit.cell && suit.cell.charge >= 250) - suit.cell.use(250) - in_chamber = new /obj/item/projectile/beam/heavylaser(src) - return 1 + var/obj/item/rig_module/module = loc + if(!istype(module)) + return 0 + if(module.holder && module.holder.wearer) + var/mob/living/carbon/human/H = module.holder.wearer + if(istype(H) && H.back) + var/obj/item/weapon/rig/suit = H.back + if(istype(suit) && suit.cell && suit.cell.charge >= 250) + suit.cell.use(250) + in_chamber = new /obj/item/projectile/beam/heavylaser(src) + return 1 return 0 /obj/item/weapon/gun/energy/lasercannon/cyborg/load_into_chamber() diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index 9b1203c649..61c65165ab 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -38,14 +38,18 @@ /obj/item/weapon/gun/energy/gun/mounted/load_into_chamber() if(in_chamber) return 1 - var/mob/living/carbon/human/H = loc - if(istype(H) && H.back) - var/obj/item/weapon/rig/suit = H.back - if(istype(suit) && suit.cell && suit.cell.charge >= 250) - suit.cell.use(250) - var/prog_path = text2path(projectile_type) - in_chamber = new prog_path(src) - return 1 + var/obj/item/rig_module/module = loc + if(!istype(module)) + return 0 + if(module.holder && module.holder.wearer) + var/mob/living/carbon/human/H = module.holder.wearer + if(istype(H) && H.back) + var/obj/item/weapon/rig/suit = H.back + if(istype(suit) && suit.cell && suit.cell.charge >= 250) + suit.cell.use(250) + var/prog_path = text2path(projectile_type) + in_chamber = new prog_path(src) + return 1 return 0 /obj/item/weapon/gun/energy/gun/nuclear From 018eb4cb603a486f09cc86020c452851a03b579e Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 30 Nov 2014 23:46:36 +1030 Subject: [PATCH 04/10] Fixes #7187 --- nano/templates/hardsuit.tmpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nano/templates/hardsuit.tmpl b/nano/templates/hardsuit.tmpl index 426f40db54..5b0603ee30 100644 --- a/nano/templates/hardsuit.tmpl +++ b/nano/templates/hardsuit.tmpl @@ -85,7 +85,7 @@ Used In File(s): /code/modules/clothing/spacesuits/rig/rig.dm {{:data.helmet}}
- {{if data.seals == 1 && data.sealing != 1}} + {{if data.sealing != 1}} {{:helper.link('Toggle', 'circle-arrow-s', {'toggle_piece' : 'helmet'}, null)}}
{{/if}} @@ -98,7 +98,7 @@ Used In File(s): /code/modules/clothing/spacesuits/rig/rig.dm {{:data.gauntlets}}
- {{if data.seals == 1 && data.sealing != 1}} + {{if data.sealing != 1}} {{:helper.link('Toggle', 'circle-arrow-s', {'toggle_piece' : 'gauntlets'}, null)}}
{{/if}} @@ -111,7 +111,7 @@ Used In File(s): /code/modules/clothing/spacesuits/rig/rig.dm {{:data.boots}}
- {{if data.seals == 1 && data.sealing != 1}} + {{if data.sealing != 1}} {{:helper.link('Toggle', 'circle-arrow-s', {'toggle_piece' : 'boots'}, null)}}
{{/if}} @@ -124,7 +124,7 @@ Used In File(s): /code/modules/clothing/spacesuits/rig/rig.dm {{:data.chest}}
- {{if data.seals == 1 && data.sealing != 1}} + {{if data.sealing != 1}} {{:helper.link('Toggle', 'circle-arrow-s', {'toggle_piece' : 'chest'}, null)}}
{{/if}} From 7703b0f4c07f87fc7a294c8334359dac9f5137bf Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 30 Nov 2014 23:47:12 +1030 Subject: [PATCH 05/10] Fixes #7186 --- code/modules/clothing/spacesuits/rig/suits/ert.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/suits/ert.dm b/code/modules/clothing/spacesuits/rig/suits/ert.dm index 02e59490d6..499547918f 100644 --- a/code/modules/clothing/spacesuits/rig/suits/ert.dm +++ b/code/modules/clothing/spacesuits/rig/suits/ert.dm @@ -36,8 +36,7 @@ /obj/item/rig_module/ai_container, /obj/item/rig_module/maneuvering_jets, /obj/item/rig_module/device/plasmacutter, - /obj/item/rig_module/device/rcd, - /obj/item/rig_module/foam_sprayer + /obj/item/rig_module/device/rcd ) /obj/item/weapon/rig/ert/medical From a5ee32d4caf7a330cc148d03d5345b7169b93750 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 30 Nov 2014 23:47:34 +1030 Subject: [PATCH 06/10] Fixes some colour macros, removes inactive jetpack icon for rigs. --- code/game/objects/items.dm | 22 +++++++++---------- .../spacesuits/rig/modules/utility.dm | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 7def0ddae2..20fab77586 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -263,7 +263,7 @@ return 0 if(H.head && !(H.head.canremove) && (H.head.flags & HEADCOVERSMOUTH)) if(!disable_warning) - H << "\red \The [H.head] is in the way." + H << "\The [H.head] is in the way." return 0 if( !(slot_flags & SLOT_MASK) ) return 0 @@ -297,7 +297,7 @@ return 0 if(!H.w_uniform && (slot_w_uniform in mob_equip)) if(!disable_warning) - H << "\red You need a jumpsuit before you can attach this [name]." + H << "You need a jumpsuit before you can attach this [name]." return 0 if( !(slot_flags & SLOT_BELT) ) return @@ -307,7 +307,7 @@ return 0 if(H.head && !(H.head.canremove) && (H.head.flags & HEADCOVERSEYES)) if(!disable_warning) - H << "\red \The [H.head] is in the way." + H << "\The [H.head] is in the way." return 0 if( !(slot_flags & SLOT_EYES) ) return 0 @@ -343,7 +343,7 @@ return 0 if(H.wear_suit) if(!disable_warning) - H << "\red \The [H.wear_suit] is in the way." + H << "\The [H.wear_suit] is in the way." return 0 if( !(slot_flags & SLOT_ICLOTHING) ) return 0 @@ -353,7 +353,7 @@ return 0 if(!H.w_uniform && (slot_w_uniform in mob_equip)) if(!disable_warning) - H << "\red You need a jumpsuit before you can attach this [name]." + H << "You need a jumpsuit before you can attach this [name]." return 0 if( !(slot_flags & SLOT_ID) ) return 0 @@ -363,7 +363,7 @@ return 0 if(!H.w_uniform && (slot_w_uniform in mob_equip)) if(!disable_warning) - H << "\red You need a jumpsuit before you can attach this [name]." + H << "You need a jumpsuit before you can attach this [name]." return 0 if(slot_flags & SLOT_DENYPOCKET) return 0 @@ -374,7 +374,7 @@ return 0 if(!H.w_uniform && (slot_w_uniform in mob_equip)) if(!disable_warning) - H << "\red You need a jumpsuit before you can attach this [name]." + H << "You need a jumpsuit before you can attach this [name]." return 0 if(slot_flags & SLOT_DENYPOCKET) return 0 @@ -386,11 +386,11 @@ return 0 if(!H.wear_suit && (slot_wear_suit in mob_equip)) if(!disable_warning) - H << "\red You need a suit before you can attach this [name]." + H << "You need a suit before you can attach this [name]." return 0 if(!H.wear_suit.allowed) if(!disable_warning) - usr << "You somehow have a suit with no defined allowed items for suit storage, stop that." + usr << "You somehow have a suit with no defined allowed items for suit storage, stop that." return 0 if( istype(src, /obj/item/device/pda) || istype(src, /obj/item/weapon/pen) || is_type_in_list(src, H.wear_suit.allowed) ) return 1 @@ -416,12 +416,12 @@ if(slot_tie) if(!H.w_uniform && (slot_w_uniform in mob_equip)) if(!disable_warning) - H << "\red You need a jumpsuit before you can attach this [name]." + H << "You need a jumpsuit before you can attach this [name]." return 0 var/obj/item/clothing/under/uniform = H.w_uniform if(uniform.hastie) if (!disable_warning) - H << "\red You already have [uniform.hastie] attached to your [uniform]." + H << "You already have [uniform.hastie] attached to your [uniform]." return 0 if( !(slot_flags & SLOT_TIE) ) return 0 diff --git a/code/modules/clothing/spacesuits/rig/modules/utility.dm b/code/modules/clothing/spacesuits/rig/modules/utility.dm index 620ea22893..06a72bc352 100644 --- a/code/modules/clothing/spacesuits/rig/modules/utility.dm +++ b/code/modules/clothing/spacesuits/rig/modules/utility.dm @@ -279,7 +279,7 @@ disruptive = 0 suit_overlay_active = "maneuvering_active" - suit_overlay_inactive = "maneuvering_inactive" + suit_overlay_inactive = null //"maneuvering_inactive" engage_string = "Toggle Stabilizers" activate_string = "Activate Thrusters" From 3a312b4a03472d86dd5deb8e5bbaf81e3af94de0 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 30 Nov 2014 23:49:55 +1030 Subject: [PATCH 07/10] Fixes #7179 --- code/modules/clothing/spacesuits/rig/rig.dm | 2 +- nano/templates/hardsuit.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 1d85f749d9..bb9be433a2 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -510,7 +510,7 @@ else if(href_list["toggle_ai_control"]) ai_override_enabled = !ai_override_enabled else if(href_list["toggle_suit_lock"]) - security_check_enabled = !security_check_enabled + locked = !locked usr.set_machine(src) src.add_fingerprint(usr) diff --git a/nano/templates/hardsuit.tmpl b/nano/templates/hardsuit.tmpl index 5b0603ee30..db07636eb7 100644 --- a/nano/templates/hardsuit.tmpl +++ b/nano/templates/hardsuit.tmpl @@ -58,7 +58,7 @@ Used In File(s): /code/modules/clothing/spacesuits/rig/rig.dm {{if data.emagged || !data.securitycheck}} - ERROR + ERROR - MAINTENANCE LOCK CONTROL OFFLINE {{else}} {{if data.coverlock}} LOCKED From 9b5235016bec6ac545cbaeb61a685cc5ca0559a0 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 30 Nov 2014 23:50:54 +1030 Subject: [PATCH 08/10] Set the hazmat rig to use the medical rig icon for now. Woo placeholder sprites. --- code/modules/clothing/spacesuits/rig/suits/station.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/clothing/spacesuits/rig/suits/station.dm b/code/modules/clothing/spacesuits/rig/suits/station.dm index e524afbddf..e4b9a21269 100644 --- a/code/modules/clothing/spacesuits/rig/suits/station.dm +++ b/code/modules/clothing/spacesuits/rig/suits/station.dm @@ -49,7 +49,7 @@ name = "AMI control module" suit_type = "hazmat" desc = "An Anomalous Material Interaction hardsuit that protects against the strangest energies the universe can throw at it." - icon_state = "science_rig" + icon_state = "medical_rig" //placeholder armor = list(melee = 15, bullet = 15, laser = 80, energy = 80, bomb = 60, bio = 100, rad = 100) slowdown = 1 offline_slowdown = 3 From 14cf4aa8e39a3c97d85c1d67ceff749b71283c91 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Mon, 1 Dec 2014 00:37:13 +1030 Subject: [PATCH 09/10] Refactored mag grippers a bit. Kinda hate myself for writing them the way I did, but hindsight etc --- .../living/silicon/robot/drone/drone_items.dm | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index aa033cde55..77b06a6cd5 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -26,8 +26,7 @@ /obj/item/weapon/smes_coil ) - //Item currently being held. - var/obj/item/wrapped = null + var/obj/item/wrapped = null // Item currently being held. /obj/item/weapon/gripper/paperwork name = "paperwork gripper" @@ -44,7 +43,8 @@ /obj/item/weapon/gripper/attack_self(mob/user as mob) if(wrapped) - wrapped.attack_self(user) + return wrapped.attack_self(user) + return ..() /obj/item/weapon/gripper/verb/drop_item() @@ -68,12 +68,9 @@ //update_icon() /obj/item/weapon/gripper/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - return + return (wrapped ? wrapped.attack(M,user) : 0) -/obj/item/weapon/gripper/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity, params) - - if(!target || !proximity) //Target is invalid or we are not adjacent. - return +/obj/item/weapon/gripper/afterattack(var/atom/target, var/mob/living/user, proximity, params) //There's some weirdness with items being lost inside the arm. Trying to fix all cases. ~Z if(!wrapped) @@ -82,13 +79,10 @@ break if(wrapped) //Already have an item. - //Temporary put wrapped into user so target's attackby() checks pass. wrapped.loc = user - //Pass the attack on to the target. This might delete/relocate wrapped. - target.attackby(wrapped,user) - + wrapped.afterattack(target,user) //If wrapped was neither deleted nor put into target, put it back into the gripper. if(wrapped && user && (wrapped.loc == user)) wrapped.loc = src From 0903bd7fc57c24e6c338b046ce4a8f45693f731c Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Mon, 1 Dec 2014 01:37:42 +1030 Subject: [PATCH 10/10] Working on some suit bugs, attempted to fix the welding overlay issue with no success. --- code/game/objects/items.dm | 2 +- code/modules/clothing/clothing.dm | 28 ++++++++--------- code/modules/clothing/spacesuits/rig/rig.dm | 5 +-- .../clothing/spacesuits/rig/suits/alien.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 31 ++++++++++--------- 5 files changed, 36 insertions(+), 32 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 20fab77586..40a38621be 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -661,7 +661,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. usr << "You are unable to focus through the [devicename]" cannotzoom = 1 else if(!zoom && global_hud.darkMask[1] in usr.client.screen) - usr << "Your welding equipment gets in the way of you looking through the [devicename]" + usr << "Your visor gets in the way of looking through the [devicename]" cannotzoom = 1 else if(!zoom && usr.get_active_hand() != src) usr << "You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better" diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index dc242cd23f..dbf5131caf 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -254,31 +254,31 @@ BLIND // can't see anything /obj/item/clothing/head/attack_self(mob/user) if(brightness_on) - if(!isturf(user.loc)) user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities. return - on = !on - - overlays.Cut() + update_icon() if(on) - if(!light_overlay_cache["[light_overlay]_icon"]) - light_overlay_cache["[light_overlay]_icon"] = image("icon" = 'icons/obj/light_overlays.dmi', "icon_state" = "[light_overlay]") - if(!light_overlay_cache["[light_overlay]"]) - light_overlay_cache["[light_overlay]"] = image("icon" = 'icons/mob/light_overlays.dmi', "icon_state" = "[light_overlay]") - overlays |= light_overlay_cache["[light_overlay]_icon"] user.SetLuminosity(user.luminosity + brightness_on) else user.SetLuminosity(user.luminosity - brightness_on) - - if(istype(user,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = user - H.update_inv_head() - else return ..(user) +/obj/item/clothing/head/update_icon(var/mob/user) + + overlays.Cut() + if(on) + if(!light_overlay_cache["[light_overlay]_icon"]) + light_overlay_cache["[light_overlay]_icon"] = image("icon" = 'icons/obj/light_overlays.dmi', "icon_state" = "[light_overlay]") + if(!light_overlay_cache["[light_overlay]"]) + light_overlay_cache["[light_overlay]"] = image("icon" = 'icons/mob/light_overlays.dmi', "icon_state" = "[light_overlay]") + overlays |= light_overlay_cache["[light_overlay]_icon"] + if(istype(user,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + H.update_inv_head() + /obj/item/clothing/head/proc/update_light(mob/user) if(!brightness_on) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index bb9be433a2..8e57f7eca1 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -204,13 +204,14 @@ if(!M) failed_to_seal = 1 else - for(var/list/piece_data in list(list(M.shoes,boots,"boots"),list(M.gloves,gloves,"gloves"),list(M.head,helmet,"helmet"),list(M.wear_suit,chest,"chest"))) + for(var/list/piece_data in list(list(M.shoes,boots,"boots",boot_type),list(M.gloves,gloves,"gloves",glove_type),list(M.head,helmet,"helmet",helm_type),list(M.wear_suit,chest,"chest",chest_type))) var/obj/item/piece = piece_data[1] var/obj/item/compare_piece = piece_data[2] var/msg_type = piece_data[3] + var/piece_type = piece_data[4] - if(!piece) + if(!piece || !piece_type) continue if(!istype(M) || !istype(piece) || !istype(compare_piece) || !msg_type) diff --git a/code/modules/clothing/spacesuits/rig/suits/alien.dm b/code/modules/clothing/spacesuits/rig/suits/alien.dm index dc449f68fb..5b35d6a139 100644 --- a/code/modules/clothing/spacesuits/rig/suits/alien.dm +++ b/code/modules/clothing/spacesuits/rig/suits/alien.dm @@ -16,4 +16,4 @@ icon_state = "breacher_rig" armor = list(melee = 90, bullet = 90, laser = 90, energy = 90, bomb = 90, bio = 100, rad = 80) vision_restriction = 0 - offline_vision_restriction = 2 \ No newline at end of file + slowdown = 4 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 943cd6472d..ddb44f3a1b 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1245,7 +1245,7 @@ if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe client.images.Remove(hud) - client.screen.Remove(global_huds) + client.screen -= global_huds update_action_buttons() @@ -1484,20 +1484,23 @@ if(eye_blurry) client.screen += global_hud.blurry if(druggy) client.screen += global_hud.druggy - var/masked = 0 - - if(!masked && istype(glasses, /obj/item/clothing/glasses/welding)) - var/obj/item/clothing/glasses/welding/O = glasses - if(!O.up && tinted_weldhelh) + if(tinted_weldhelh) + var/found_welder + if(istype(glasses, /obj/item/clothing/glasses/welding)) + var/obj/item/clothing/glasses/welding/O = glasses + if(!O.up) + found_welder = 1 + else if(istype(head, /obj/item/clothing/head/welding)) + var/obj/item/clothing/head/welding/O = head + if(!O.up) + found_welder = 1 + else if(istype(back, /obj/item/weapon/rig)) + var/obj/item/weapon/rig/O = back + if(O.helmet && O.helmet == head && (O.helmet.body_parts_covered & EYES)) + if((O.offline && O.offline_vision_restriction == 1) || (!O.offline && O.vision_restriction == 1)) + found_welder = 1 + if(found_welder) client.screen |= global_hud.darkMask - masked = 1 - - if(!masked && istype(back, /obj/item/weapon/rig)) - var/obj/item/weapon/rig/O = back - // Ugh, why is this done on a case by case basis? Why is there no flag for causing weldervision? - if(O.helmet && O.helmet == head && (O.helmet.body_parts_covered & EYES)) - if((O.offline && O.offline_vision_restriction == 1) || (!O.offline && O.vision_restriction == 1)) - client.screen |= global_hud.darkMask if(machine) if(!machine.check_eye(src))