Nukes recursive effects (#14936)

* [WIP] Nukes recursive effects

* Finishes the rest of the stuff

* Mochi tweaks
This commit is contained in:
AffectedArc07
2020-11-25 23:59:30 -05:00
committed by GitHub
parent 89a6f4c0ae
commit 03934e8171
6 changed files with 49 additions and 1456 deletions
@@ -107,7 +107,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
var/magpulse = 0
var/ionpulse = 0 // Jetpack-like effect.
var/ionpulse_on = 0 // Jetpack-like effect.
var/datum/effect_system/trail_follow/ion/ion_trail // Ionpulse effect.
var/datum/action/item_action/toggle_research_scanner/scanner = null
var/list/module_actions = list()
@@ -176,6 +175,13 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
diag_hud_set_borgcell()
scanner = new(src)
scanner.Grant(src)
RegisterSignal(src, COMSIG_MOVABLE_MOVED, .proc/create_trail)
/mob/living/silicon/robot/proc/create_trail(datum/source, atom/oldloc, _dir, forced)
if(ionpulse_on)
var/turf/T = get_turf(oldloc)
if(!has_gravity(T))
new /obj/effect/particle_effect/ion_trails(T, _dir)
/mob/living/silicon/robot/proc/init(alien, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null)
aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)
@@ -609,16 +615,8 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
to_chat(src, "<span class='notice'>No thrusters are installed!</span>")
return
if(!ion_trail)
ion_trail = new
ion_trail.set_up(src)
ionpulse_on = !ionpulse_on
to_chat(src, "<span class='notice'>You [ionpulse_on ? null :"de"]activate your ion thrusters.</span>")
if(ionpulse_on)
ion_trail.start()
else
ion_trail.stop()
if(thruster_button)
thruster_button.icon_state = "ionpulse[ionpulse_on]"
@@ -29,16 +29,18 @@
faction = list("malf_drone")
deathmessage = "suddenly breaks apart."
del_on_death = 1
var/datum/effect_system/trail_follow/ion/ion_trail
var/passive_mode = TRUE // if true, don't target anything.
/mob/living/simple_animal/hostile/malf_drone/Initialize(mapload)
. = ..()
ion_trail = new
ion_trail.set_up(src)
ion_trail.start()
RegisterSignal(src, COMSIG_MOVABLE_MOVED, .proc/create_trail)
update_icons()
/mob/living/simple_animal/hostile/malf_drone/proc/create_trail(datum/source, atom/oldloc, _dir, forced)
var/turf/T = get_turf(oldloc)
if(!has_gravity(T))
new /obj/effect/particle_effect/ion_trails(T, _dir)
/mob/living/simple_animal/hostile/malf_drone/Process_Spacemove(check_drift = 0)
return 1