Hardsuit Mods

No longer need to aim when attaching a mod
Can attach breath masks to. Not gas or any others yet
This commit is contained in:
SoundScopes
2015-04-06 15:25:20 +01:00
parent 90f63f1513
commit a125a811ec
+171 -8
View File
@@ -81,17 +81,19 @@
can_breach = 1
//Component/device holders.
var/obj/item/weapon/stock_parts/gloves = null // Basic capacitor allows insulation, upgrades allow shock gloves etc.
// var/obj/item/weapon/stock_parts/gloves = null // Basic capacitor allows insulation, upgrades allow shock gloves etc.
var/attached_boots = 1 // Can't wear boots if some are attached
var/obj/item/clothing/shoes/magboots/boots = null // Deployable boots, if any.
var/attached_helmet = 1 // Can't wear a helmet if one is deployable.
var/obj/item/clothing/head/helmet/helmet = null // Deployable helmet, if any.
// var/obj/item/weapon/tank/tank = null
var/obj/item/clothing/mask/breath/mask = null
var/list/max_mounted_devices = 0 // Maximum devices. Easy.
var/list/can_mount = null // Types of device that can be hardpoint mounted.
var/list/mounted_devices = null // Holder for the above device.
var/obj/item/active_device = null // Currently deployed device, if any.
// var/list/max_mounted_devices = 0 // Maximum devices. Easy.
// var/list/can_mount = null // Types of device that can be hardpoint mounted.
// var/list/mounted_devices = null // Holder for the above device.
// var/obj/item/active_device = null // Currently deployed device, if any.
/obj/item/clothing/suit/space/rig/equipped(mob/M)
..()
@@ -122,11 +124,34 @@
H.equip_to_slot(boots, slot_shoes)
boots.canremove = 0
if(mask)
if(H.wear_mask)
M << "You are unable to deploy your suit's mask as \the [H.wear_mask] is in the way."
else
M << "Your suit's mask deploys with a hiss."
mask.loc = H
H.equip_to_slot(mask, slot_wear_mask)
mask.canremove = 0
/*
if(tank)
if(H.s_store)
M << "\red If you ever see this message tell Scopes"
else
tank.loc = H
H.equip_to_slot(tank, slot_s_store)
tank.canremove = 0
*/
/obj/item/clothing/suit/space/rig/dropped()
..()
var/mob/living/carbon/human/H
/* if(tank)//do this first
H = tank.loc
if(istype(H))
if(tank && H.s_store == tank)
tank.canremove = 1
// H.drop_from_inventory(tank)
tank.loc = src
*/
if(helmet)
H = helmet.loc
if(istype(H))
@@ -143,6 +168,17 @@
H.drop_from_inventory(boots)
boots.loc = src
if(mask)
H = mask.loc
if(istype(H))
if(mask && H.wear_mask == mask)
mask.canremove = 1
H.drop_from_inventory(mask)
mask.loc = src
..() //then everything else
/*
/obj/item/clothing/suit/space/rig/verb/get_mounted_device()
@@ -214,6 +250,7 @@
H << "\red You cannot deploy your helmet while wearing another helmet."
return
//TODO: Species check, skull damage for forcing an unfitting helmet on?
// Yes please -Sound
helmet.loc = H
H.equip_to_slot(helmet, slot_head)
helmet.canremove = 0
@@ -224,11 +261,136 @@
if(!istype(user,/mob/living)) return
if(user.a_intent == "help")
var/target_zone = user.zone_sel.selecting
//You can't modify a suit while wearing it, but you can remove the tank if you click it with another tank or screwdriver
if(istype(src.loc,/mob/living))
/* if((istype(W,/obj/item/weapon/screwdriver) || istype(W, /obj/item/weapon/tank)) && target_zone == "chest")
if(!tank && istype(W, /obj/item/weapon/tank))
user << "You attach \the [W] to \the [src]'s tank mount."
user.drop_item()
tank = W
tank.loc = user
user.equip_to_slot(tank, slot_s_store)
tank.canremove = 0
return
else
var/mob/living/carbon/human/H = user
if(tank && H.s_store == tank)
tank.canremove = 1
H.drop_from_inventory(tank)
user << "You detatch \the [tank] from \the [src]'s tank mount."
tank.loc = get_turf(src)
tank = null
if(istype(W, /obj/item/weapon/tank))
user << "You attach \the [W] to \the [src]'s tank mount."
user.drop_item()
tank = W
tank.loc = user
user.equip_to_slot(tank, slot_s_store)
tank.canremove = 0
return*/
user << "How do you propose to modify a hardsuit while it is being worn?"
return
//begin doing stuff with putting them on
switch(W.parent_type)
/* if(/obj/item/weapon/tank)
if(!tank)
user << "You attach \the [W] to \the [src]'s tank mount."
user.drop_item()
W.loc = src
src.tank = W
else
user << "\The [src] already has a tank mounted." //Do a thing here so you can switch tanks
return
*/
if(/obj/item/clothing/shoes)
if(istype(W, /obj/item/clothing/shoes/magboots))
if(!boots)
user << "You attach \the [W] to \the [src]'s boot mounts."
user.drop_item()
W.loc = src
src.boots = W
else
user << "\The [src] already has magboots installed."
return
else
user << "You can't find a way to attach \the [W] to \the [src]"
return
if(/obj/item/clothing/mask)
if(istype(W, /obj/item/clothing/mask/breath))
if(!mask)
user << "You attach \the [W] to \the [src]'s mask mount."
user.drop_item()
W.loc = src
src.mask = W
else
user << "\The [src] already has a mask installed."
return
else
user << "You can't find a way to attach \the [W] to \the [src]"
return
if(istype(W, /obj/item/clothing/head/helmet/space)) //WTF WHAT IS THIS, some nasty hack why, meh.
if(istype(W, /obj/item/clothing/head/helmet/space/rig))
if(!helmet)
user << "You attach \the [W] to \the [src]'s helmet mount."
user.drop_item()
W.loc = src
src.helmet = W
else
user << "\The [src] already has a helmet installed."
return
else
user << "You can't find a way to attach \the [W] to \the [src]"
return
//now we can remove
if(istype(W,/obj/item/weapon/screwdriver))
switch(target_zone)
if("head")
if(!helmet)
user << "\The [src] does not have a helmet installed."
else
user << "You detatch \the [helmet] from \the [src]'s helmet mount."
helmet.loc = get_turf(src)
src.helmet = null
return
if("l_leg" || "r_leg" || "l_foot" || "r_foot")
if(!boots)
user << "\The [src] does not have any boots installed."
else
user << "You detatch \the [boots] from \the [src]'s boot mounts."
boots.loc = get_turf(src)
boots = null
return
/*
if("chest")
if(!tank)
user << "\The [src] does not have a tank mounted."
else
user << "You detatch \the [tank] from \the [src]'s tank mount."
tank.loc = get_turf(src)
tank = null
return
*/
if("mouth")
if(!mask)
user << "\The [src] does not have a mask installed."
else
user << "You detatch \the [mask] from \the [src]'s mask attachment."
mask.loc = get_turf(src)
mask = null
return
else //Why is this statement here
return ..()
return ..()
/*
var/target_zone = user.zone_sel.selecting
if(target_zone == "head")
@@ -301,6 +463,7 @@
return ..()
..()
*/
//Engineering rig
/obj/item/clothing/head/helmet/space/rig/engineering