Fix various RIG issues

This commit is contained in:
Mechoid
2020-03-13 14:54:34 -07:00
parent 3a47972181
commit 08310b2fec
8 changed files with 13 additions and 17 deletions
+4 -4
View File
@@ -276,12 +276,12 @@
tankcheck = list(C.r_hand, C.l_hand, C.back)
// Rigs are a fucking pain since they keep an air tank in nullspace.
if(istype(C.back,/obj/item/weapon/rig))
var/obj/item/weapon/rig/rig = C.back
if(rig.air_supply && !rig.offline)
var/obj/item/weapon/rig/Rig = C.get_rig()
if(Rig)
if(Rig.air_supply && !Rig.offline)
from = "in"
nicename |= "hardsuit"
tankcheck |= rig.air_supply
tankcheck |= Rig.air_supply
for(var/i=1, i<tankcheck.len+1, ++i)
if(istype(tankcheck[i], /obj/item/weapon/tank))
+2 -2
View File
@@ -78,8 +78,8 @@
var/obj/item/rig_module/module = src.loc
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(H) && H.get_rig())
var/obj/item/weapon/rig/suit = H.get_rig()
if(istype(suit))
return suit.cell
return null
@@ -1,6 +1,7 @@
/obj/item/weapon/mop_deploy
name = "mop"
desc = "Deployable mop."
icon = 'icons/obj/janitor.dmi'
icon_state = "mop"
force = 3
anchored = 1 // Never spawned outside of inventory, should be fine.
@@ -36,7 +36,7 @@
icon_state = "flash"
interface_name = "mounted flash"
interface_desc = "Stuns your target by blinding them with a bright light."
device_type = /obj/item/device/flash
device_type = /obj/item/device/flash/robot
/obj/item/rig_module/device/plasmacutter
name = "hardsuit plasma cutter"
+3 -8
View File
@@ -351,15 +351,10 @@
//Because rigs store their tanks out of reach of contents.Find(), a check has to be made to make
//sure the rig is still worn, still online, and that its air supply still exists.
var/obj/item/weapon/tank/rig_supply
if(istype(back,/obj/item/weapon/rig))
var/obj/item/weapon/rig/rig = back
if(!rig.offline && (rig.air_supply && internal == rig.air_supply))
rig_supply = rig.air_supply
var/obj/item/weapon/rig/Rig = get_rig()
else if(istype(belt,/obj/item/weapon/rig))
var/obj/item/weapon/rig/rig = belt
if(!rig.offline && (rig.air_supply && internal == rig.air_supply))
rig_supply = rig.air_supply
if(Rig)
rig_supply = Rig.air_supply
if ((!rig_supply && !contents.Find(internal)) || !((wear_mask && (wear_mask.item_flags & AIRTIGHT)) || (head && (head.item_flags & AIRTIGHT))))
internal = null
+2 -2
View File
@@ -162,8 +162,8 @@
var/obj/item/rig_module/module = src.loc
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(H) && H.get_rig())
var/obj/item/weapon/rig/suit = H.get_rig()
if(istype(suit))
return suit.cell
return null
Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB