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
+20 -22
View File
@@ -134,8 +134,7 @@
/mob/living/carbon/human/bst
universal_understand = 1
status_flags = GODMODE
var/fall_override = TRUE
status_flags = GODMODE|NOFALL
/mob/living/carbon/human/bst/can_inject(var/mob/user, var/error_msg, var/target_zone)
to_chat(user, SPAN_ALERT("The [src] disarms you before you can inject them."))
@@ -275,34 +274,30 @@
suicide()
/mob/living/carbon/human/bst/verb/antigrav()
set name = "Toggle Gravity"
set desc = "Toggles on/off falling for you."
set name = "Toggle Falling"
set desc = "Use bluespace technology to ignore gravity."
set category = "BST"
if (fall_override)
fall_override = FALSE
to_chat(usr, "<span class='notice'>You will now fall normally.</span>")
else
fall_override = TRUE
to_chat(usr, "<span class='notice'>You will no longer fall.</span>")
status_flags ^= NOFALL
to_chat(src, SPAN_NOTICE("You will [status_flags & NOFALL ? "no longer fall" : "now fall normally"]."))
/mob/living/carbon/human/bst/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/carbon/human/bst/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
@@ -318,7 +313,7 @@
/mob/living/carbon/human/bst/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"
var/client/C = src.client
@@ -333,7 +328,7 @@
/mob/living/carbon/human/bst/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
@@ -429,7 +424,7 @@
canremove = 0
flash_protection = FLASH_PROTECTION_MAJOR
/obj/item/clothing/glasses/sunglasses/bst/verb/toggle_xray(mode in list("X-Ray without Lighting", "X-Ray with Lighting", "Normal"))
/obj/item/clothing/glasses/sunglasses/bst/verb/toggle_xray(mode in list("X-Ray without Lighting", "X-Ray with Lighting", "Darkvision", "Normal vision"))
set name = "Change Vision Mode"
set desc = "Changes your glasses' vision mode."
set category = "BST"
@@ -437,12 +432,15 @@
switch (mode)
if ("X-Ray without Lighting")
vision_flags = (SEE_TURFS|SEE_OBJS|SEE_MOBS)
vision_flags = SEE_TURFS|SEE_OBJS|SEE_MOBS|SEE_BLACKNESS|SEE_SELF
see_invisible = SEE_INVISIBLE_NOLIGHTING
if ("X-Ray with Lighting")
vision_flags = (SEE_TURFS|SEE_OBJS|SEE_MOBS)
vision_flags = SEE_TURFS|SEE_OBJS|SEE_MOBS|SEE_BLACKNESS|SEE_SELF
see_invisible = -1
if ("Normal")
if ("Darkvision")
vision_flags = SEE_BLACKNESS|SEE_SELF
see_invisible = SEE_INVISIBLE_NOLIGHTING
if ("Normal vision")
vision_flags = 0
see_invisible = -1