Improve Open Turf Traversal (#2337)

Aims to improve open turf traversal and interaction by doing two things:

If a mob is wearing magboots and has enabled magboots, they are now unable to walk onto an open turf. This includes open space turfs. It makes magboots useful again for miners, on the asteroid!
If a mob is wearing a jetpack with jetpack stabilization enabled (and the jetpack active), they can walk onto the open turf but will not fall down. They can now also, simply by having the jetpack active, move upwards. Keeping stabilization off in this stage will allow them to pop-up and down if they want, leading to hilarity.
Touches mob/proc/Check_Shoegrip() and makes it more useful + more used.
This commit is contained in:
skull132
2017-05-21 03:07:41 +03:00
committed by GitHub
parent c6b643a472
commit a498a8988c
8 changed files with 102 additions and 22 deletions
@@ -1,3 +1,32 @@
/**
* Returns a jetpack if the param is a human mob and said human mob is wearing
* a jetpack on their back, or has a RIG on their back with the jetpack module
* installed.
*
* @param H Either a human or a robot mob. Is type and sanity checked.
*
* @return A jetpack instance if one is found. Null otherwise.
*/
/proc/GetJetpack(var/mob/living/carbon/human/H)
// Search the human for a jetpack. Either on back or on a RIG that's on
// on their back.
if(istype(H))
// Skip sanity check for H.back, as istype can safely handle a null.
if (istype(H.back, /obj/item/weapon/tank/jetpack))
return H.back
else if (istype(H.back, /obj/item/weapon/rig))
var/obj/item/weapon/rig/rig = H.back
for (var/obj/item/rig_module/maneuvering_jets/module in rig.installed_modules)
return module.jets
// See if we have a robot instead, and look for their jetpack.
else if (istype(H, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = H
if (R.module)
for (var/obj/item/weapon/tank/jetpack/J in R.module.modules)
return J
return null
/obj/item/weapon/tank/jetpack
name = "jetpack (empty)"
desc = "A tank of compressed gas for use as propulsion in zero-gravity areas. Use with caution."