Various bugfixes (#15873)

* pAI Record Fix

* AI Respawnability

* Wine Reagents

* Ghost Repulsing

* Agent ID Card Numbers

* Maint Drone Lights

* Fix fixes

Co-authored-by: Farie82 <farie82@users.noreply.github.com>

* Headpocket runtimes

Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
SabreML
2021-04-19 14:50:30 +01:00
committed by GitHub
co-authored by Farie82
parent 3a12a54f20
commit fb06547f97
10 changed files with 21 additions and 12 deletions
@@ -28,7 +28,7 @@ GLOBAL_LIST_EMPTY(empty_playable_ai_cores)
current_mode.possible_traitors.Remove(src)
// Ghost the current player and disallow them to return to the body
ghostize(FALSE)
ghostize()
// Delete the old AI shell
qdel(src)
@@ -362,6 +362,10 @@
. = ..()
density = emagged //this is reset every canmove update otherwise
/mob/living/silicon/robot/drone/add_ventcrawl(obj/machinery/atmospherics/starting_machine)
..()
update_headlamp(TRUE, 0, FALSE)
/mob/living/silicon/robot/drone/flash_eyes(intensity = 1, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE)
if(affect_silicon)
return ..()
@@ -1146,17 +1146,20 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
if(stat || lamp_recharging || low_power_mode)
to_chat(src, "<span class='danger'>This function is currently offline.</span>")
return
if(is_ventcrawling(src))
return
//Some sort of magical "modulo" thing which somehow increments lamp power by 2, until it hits the max and resets to 0.
lamp_intensity = (lamp_intensity+2) % (lamp_max+2)
to_chat(src, "[lamp_intensity ? "Headlamp power set to Level [lamp_intensity/2]" : "Headlamp disabled."]")
update_headlamp()
/mob/living/silicon/robot/proc/update_headlamp(turn_off = 0, cooldown = 100)
/mob/living/silicon/robot/proc/update_headlamp(turn_off = 0, cooldown = 100, show_warning = TRUE)
set_light(0)
if(lamp_intensity && (turn_off || stat || low_power_mode))
to_chat(src, "<span class='danger'>Your headlamp has been deactivated.</span>")
if(show_warning)
to_chat(src, "<span class='danger'>Your headlamp has been deactivated.</span>")
lamp_intensity = 0
lamp_recharging = 1
spawn(cooldown) //10 seconds by default, if the source of the deactivation does not keep stat that long.