mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge pull request #7008 from Zuhayr/spaceninjas
Hardsuit/voidsuit change, ninja refactor.
This commit is contained in:
@@ -222,9 +222,22 @@
|
||||
*/
|
||||
/mob/proc/MiddleClickOn(var/atom/A)
|
||||
return
|
||||
|
||||
/mob/living/carbon/MiddleClickOn(var/atom/A)
|
||||
swap_hand()
|
||||
|
||||
/mob/living/carbon/human/MiddleClickOn(var/atom/A)
|
||||
|
||||
if(back)
|
||||
var/obj/item/weapon/rig/rig = back
|
||||
if(istype(rig) && rig.selected_module)
|
||||
if(world.time <= next_move) return
|
||||
next_move = world.time + 8
|
||||
rig.selected_module.engage(A)
|
||||
return
|
||||
|
||||
swap_hand()
|
||||
|
||||
// In case of use break glass
|
||||
/*
|
||||
/atom/proc/MiddleClick(var/mob/M as mob)
|
||||
|
||||
@@ -267,26 +267,40 @@
|
||||
if(C.internals)
|
||||
C.internals.icon_state = "internal0"
|
||||
else
|
||||
if(!istype(C.wear_mask, /obj/item/clothing/mask))
|
||||
C << "<span class='notice'>You are not wearing a mask.</span>"
|
||||
|
||||
var/no_mask
|
||||
if(!(C.wear_mask && C.wear_mask.flags & AIRTIGHT))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(!(H.head && H.head.flags & AIRTIGHT))
|
||||
no_mask = 1
|
||||
|
||||
if(no_mask)
|
||||
C << "<span class='notice'>You are not wearing a suitable mask or helmet.</span>"
|
||||
return 1
|
||||
else
|
||||
var/list/nicename = null
|
||||
var/list/tankcheck = null
|
||||
var/breathes = "oxygen" //default, we'll check later
|
||||
var/list/contents = list()
|
||||
var/from = "on"
|
||||
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
breathes = H.species.breath_type
|
||||
nicename = list ("suit", "back", "belt", "right hand", "left hand", "left pocket", "right pocket")
|
||||
tankcheck = list (H.s_store, C.back, H.belt, C.r_hand, C.l_hand, H.l_store, H.r_store)
|
||||
|
||||
else
|
||||
|
||||
nicename = list("Right Hand", "Left Hand", "Back")
|
||||
nicename = list("right hand", "left hand", "back")
|
||||
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)
|
||||
from = "in"
|
||||
nicename |= "hardsuit"
|
||||
tankcheck |= rig.air_supply
|
||||
|
||||
for(var/i=1, i<tankcheck.len+1, ++i)
|
||||
if(istype(tankcheck[i], /obj/item/weapon/tank))
|
||||
var/obj/item/weapon/tank/t = tankcheck[i]
|
||||
@@ -335,7 +349,7 @@
|
||||
//We've determined the best container now we set it as our internals
|
||||
|
||||
if(best)
|
||||
C << "<span class='notice'>You are now running on internals from [tankcheck[best]] on your [nicename[best]].</span>"
|
||||
C << "<span class='notice'>You are now running on internals from [tankcheck[best]] [from] your [nicename[best]].</span>"
|
||||
C.internal = tankcheck[best]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user