Merge pull request #8392 from xxalpha/hardjet

Embedded Jetpacks
This commit is contained in:
Jordie
2015-03-30 01:21:05 +11:00
7 changed files with 121 additions and 14 deletions
+1 -1
View File
@@ -196,7 +196,7 @@
corpseidaccess = "Station Engineer"
/obj/effect/landmark/corpse/engineer/rig
corpsesuit = /obj/item/clothing/suit/space/hardsuit
corpsesuit = /obj/item/clothing/suit/space/hardsuit/engine
corpsemask = /obj/item/clothing/mask/breath
/obj/effect/landmark/corpse/clown
+45 -8
View File
@@ -1,6 +1,6 @@
//Regular (engineering) hardsuits
//Baseline hardsuits
/obj/item/clothing/head/helmet/space/hardsuit
name = "engineering hardsuit helmet"
name = "hardsuit helmet"
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding."
icon_state = "hardsuit0-engineering"
item_state = "eng_helm"
@@ -36,7 +36,7 @@
/obj/item/clothing/suit/space/hardsuit
name = "engineering hardsuit"
name = "hardsuit"
desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding."
icon_state = "hardsuit-engineering"
item_state = "eng_hardsuit"
@@ -46,9 +46,42 @@
var/obj/item/clothing/head/helmet/space/hardsuit/helmet
action_button_name = "Toggle Helmet"
var/helmettype = /obj/item/clothing/head/helmet/space/hardsuit
var/obj/item/weapon/tank/jetpack/suit/jetpack = null
/obj/item/clothing/suit/space/hardsuit/verb/Jetpack()
set name = "Toggle Inbuilt Jetpack"
set category = "Object"
jetpack.toggle()
/obj/item/clothing/suit/space/hardsuit/verb/Jetpack_Rockets()
set name = "Toggle Inbuilt Jetpack Stabilization"
set category = "Object"
jetpack.toggle_rockets()
//Engineering
/obj/item/clothing/head/helmet/space/hardsuit/engine
name = "engineering hardsuit helmet"
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding."
icon_state = "hardsuit0-engineering"
item_state = "eng_helm"
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75)
item_color = "engineering"
/obj/item/clothing/suit/space/hardsuit/engine
name = "engineering hardsuit"
desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding."
icon_state = "hardsuit-engineering"
item_state = "eng_hardsuit"
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75)
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/engine
/obj/item/clothing/suit/space/hardsuit/engine/New()
jetpack = new /obj/item/weapon/tank/jetpack/suit(src)
..()
//Atmospherics
/obj/item/clothing/head/helmet/space/hardsuit/atmos
/obj/item/clothing/head/helmet/space/hardsuit/engine/atmos
name = "atmospherics hardsuit helmet"
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has thermal shielding."
icon_state = "hardsuit0-atmospherics"
@@ -58,6 +91,7 @@
heat_protection = HEAD //Uncomment to enable firesuit protection
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
/obj/item/clothing/suit/space/hardsuit/engine/atmos
/obj/item/clothing/suit/space/hardsuit/atmos
name = "atmospherics hardsuit"
@@ -67,11 +101,11 @@
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 0)
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS //Uncomment to enable firesuit protection
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/atmos
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/engine/atmos
//Chief Engineer's hardsuit
/obj/item/clothing/head/helmet/space/hardsuit/elite
/obj/item/clothing/head/helmet/space/hardsuit/engine/elite
name = "advanced hardsuit helmet"
desc = "An advanced helmet designed for work in a hazardous, low pressure environment. Shines with a high polish."
icon_state = "hardsuit0-white"
@@ -82,7 +116,7 @@
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
/obj/item/clothing/suit/space/hardsuit/elite
/obj/item/clothing/suit/space/hardsuit/engine/elite
icon_state = "hardsuit-white"
name = "advanced hardsuit"
desc = "An advanced suit that protects against hazardous, low pressure environments. Shines with a high polish."
@@ -90,7 +124,7 @@
armor = list(melee = 40, bullet = 5, laser = 10, energy = 5, bomb = 50, bio = 100, rad = 90)
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS //Uncomment to enable firesuit protection
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/elite
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/engine/elite
//Mining hardsuit
@@ -202,6 +236,9 @@
..()
flags ^= NODROP
/obj/item/clothing/suit/space/hardsuit/syndi/New()
jetpack = new /obj/item/weapon/tank/jetpack/suit(src)
..()
//The Owl Hardsuit
/obj/item/clothing/head/helmet/space/hardsuit/syndi/owl
+4 -1
View File
@@ -80,6 +80,9 @@
/obj/item/clothing/suit/space/hardsuit/New()
MakeHelmet()
if(!jetpack)
verbs -= /obj/item/clothing/suit/space/hardsuit/verb/Jetpack
verbs -= /obj/item/clothing/suit/space/hardsuit/verb/Jetpack_Rockets
..()
/obj/item/clothing/suit/space/hardsuit/proc/MakeHelmet()
@@ -136,4 +139,4 @@
else
H << "You disengage the helmet on the hardsuit."
playsound(src.loc, 'sound/mecha/mechmove03.ogg', 50, 1)
RemoveHelmet()
RemoveHelmet()
@@ -15,6 +15,10 @@
var/obj/item/weapon/tank/jetpack/J = back
if((movement_dir || J.stabilization_on) && J.allow_thrust(0.01, src))
return 1
if(istype(wear_suit, /obj/item/clothing/suit/space/hardsuit/engine) && isturf(loc)) //Second check is so you can't use a jetpack in a mech
var/obj/item/clothing/suit/space/hardsuit/engine/C = wear_suit
if((movement_dir || C.jetpack.stabilization_on) && C.jetpack.allow_thrust(0.01, src))
return 1
return 0
@@ -660,6 +660,11 @@
var/obj/item/weapon/tank/jetpack/J = H.back
if(J.allow_thrust(0.01, H))
hasjetpack = 1
else if(istype(H.wear_suit,/obj/item/clothing/suit/space/hardsuit/engine)) //copypasta but faster implementation currently
var/obj/item/clothing/suit/space/hardsuit/engine/C = H.wear_suit
if(C.jetpack.allow_thrust(0.01, H))
hasjetpack = 1
var/grav = has_gravity(H)
if(!grav && !hasjetpack)