Nofall, Godmode, Bstech changes (#10404)

'NOFALL' is now a status flag instead of being a var specific to BSTechs. It allows the mob to move between Z-levels and through empty space; even to 'fly up' against gravity. However the tech can no longer use this to 'phase into' matter if there is something above them.
    ...for that you want to use Ruin-Everything instead: incorporeal movement now has an additional type that's (still) just like a ninja's, but it also allows you to move between Z-levels.
    Adds the anti-gravity verb to the Bluespace Robot preset and starts them with 'NOFALL' on.
    When using 'GODMODE' you will no longer take damage when you fall; instead a cool message will be shown and a quiet thump will be played.
    'GODMODE' now protects you from the awful effects of running - you can run indefinitely and won't take damage from it.
    Thanks to the above changes the BST is now self-contained in a single file (well except for the robot preset).
    To facilitate the above changes several godmode and incorporeal checks have been added (mostly to movement procs). It cuts on some extra proc overrides and type checks. Also results in a more 'natural' experience when using NOFALL, GODMODE or incorporeal movement.
    Changed incorporeal values to defines.
    Added a "darkvision" mode for the BST goggles.
    I also updated some of the BST verbs to be more descriptive.
This commit is contained in:
Jiří Barouš
2020-11-01 21:13:03 +02:00
committed by GitHub
parent 531c73182a
commit 8e453aae78
11 changed files with 98 additions and 57 deletions
@@ -32,7 +32,7 @@
var/ghost_cooldown = 0
var/obj/item/device/multitool/ghost_multitool
incorporeal_move = 1
incorporeal_move = INCORPOREAL_GHOST
mob_thinks = FALSE
@@ -5,7 +5,7 @@
tally = species.slowdown
tally += get_pulling_movement_delay()
if (istype(loc, /turf/space) || isopenturf(loc))
if(!(locate(/obj/structure/lattice, loc) || locate(/obj/structure/stairs, loc) || locate(/obj/structure/ladder, loc)))
return 0
@@ -23,25 +23,33 @@
overclocked = TRUE
law_update = FALSE
scrambled_codes = TRUE
status_flags = GODMODE
status_flags = GODMODE|NOFALL
/mob/living/silicon/robot/bluespace/verb/antigrav()
set name = "Toggle Gravity"
set desc = "Use bluespace technology to ignore gravity."
set category = "BST"
status_flags ^= NOFALL
to_chat(src, SPAN_NOTICE("You will [status_flags & NOFALL ? "no longer fall" : "now fall normally"]."))
/mob/living/silicon/robot/bluespace/verb/bstwalk()
set name = "Ruin Everything"
set desc = "Uses bluespace technology to phase through solid matter and move quickly."
set name = "Toggle Incorporeal Movement"
set desc = "Use bluespace technology to phase through solid matter and move quickly."
set category = "BST"
set popup_menu = 0
if(!src.incorporeal_move)
src.incorporeal_move = 2
src.incorporeal_move = INCORPOREAL_BSTECH
to_chat(src, SPAN_NOTICE("You will now phase through solid matter."))
else
src.incorporeal_move = 0
src.incorporeal_move = INCORPOREAL_DISABLE
to_chat(src, SPAN_NOTICE("You will no-longer phase through solid matter."))
return
/mob/living/silicon/robot/bluespace/verb/bstrecover()
set name = "Rejuv"
set desc = "Use the bluespace within you to restore your health"
set name = "Restore Health"
set desc = "Use bluespace to teleport in a fresh, healthy body."
set category = "BST"
set popup_menu = 0
@@ -49,7 +57,7 @@
/mob/living/silicon/robot/bluespace/verb/bstquit()
set name = "Teleport out"
set desc = "Activate bluespace to leave and return to your original mob (if you have one)."
set desc = "Jump into bluespace and continue wherever you left off. Deletes the BSTech and returns to your original mob if you have one."
set category = "BST"
src.custom_emote(VISIBLE_MESSAGE, "politely beeps as its lights start to flash.")
@@ -70,8 +78,8 @@
/mob/living/silicon/robot/bluespace/verb/tgm()
set name = "Toggle Godmode"
set desc = "Enable or disable god mode. For testing things that require you to be vulnerable."
set desc = "For when you want to be vulnerable."
set category = "BST"
status_flags ^= GODMODE
to_chat(src, SPAN_NOTICE("God mode is now [status_flags & GODMODE ? "enabled" : "disabled"]"))
to_chat(src, SPAN_NOTICE("God mode is now [status_flags & GODMODE ? "enabled" : "disabled"]"))
@@ -83,7 +83,7 @@
heat_damage_per_tick = 0
cold_damage_per_tick = 0
unsuitable_atoms_damage = 0
incorporeal_move = 3
incorporeal_move = INCORPOREAL_SHADE
mob_size = 0
density = 0
speed = 1
+1 -1
View File
@@ -90,7 +90,7 @@
var/lying_prev = 0
var/canmove = 1
//Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects.
var/incorporeal_move = 0 //0 is off, 1 is normal, 2 is for ninjas.
var/incorporeal_move = INCORPOREAL_DISABLE
var/lastpuke = 0
var/unacidable = 0
var/list/pinned = list() // List of things pinning this creature to walls (see living_defense.dm)
+8 -6
View File
@@ -296,7 +296,7 @@
if (mob_is_human)
var/mob/living/carbon/human/H = mob
//If we're sprinting and able to continue sprinting, then apply the sprint bonus ontop of this
if (H.m_intent == "run" && H.species.handle_sprint_cost(H, tally)) //This will return false if we collapse from exhaustion
if (H.m_intent == "run" && (H.status_flags & GODMODE || H.species.handle_sprint_cost(H, tally))) //This will return false if we collapse from exhaustion
tally = (tally / (1 + H.sprint_speed_factor)) * config.run_delay_multiplier
else
tally = max(tally * config.walk_delay_multiplier, H.min_walk_delay) //clamp walking speed if its limited
@@ -384,7 +384,7 @@
/client/proc/Process_Incorpmove(direct)
var/turf/mobloc = get_turf(mob)
switch(mob.incorporeal_move)
if(1)
if(INCORPOREAL_GHOST)
var/turf/T = get_step(mob, direct)
if(mob.check_holy(T))
to_chat(mob, SPAN_WARNING("You cannot get past holy grounds while you are in this plane of existence!"))
@@ -392,12 +392,11 @@
else
mob.forceMove(get_step(mob, direct))
mob.dir = direct
if(2)
anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,mob.dir)
if(INCORPOREAL_NINJA, INCORPOREAL_BSTECH)
anim(mobloc, mob, 'icons/mob/mob.dmi', null, "shadow", null, mob.dir)
mob.forceMove(get_step(mob, direct))
mob.dir = direct
if(3)
if(INCORPOREAL_SHADE)
if(!mob.canmove || mob.anchored)
return
move_delay = 1 + world.time
@@ -456,6 +455,9 @@
// Return 1 for movement, 0 for none,
// -1 to allow movement but with a chance of slipping
/mob/proc/Allow_Spacemove(var/check_drift = 0)
if(status_flags & NOFALL || incorporeal_move == INCORPOREAL_BSTECH)
return 1
if(!Check_Dense_Object()) //Nothing to push off of so end here
return 0