Gives mining bots back their mesons (#37196)
* Gives mining bots back their mesons * qdel
This commit is contained in:
committed by
CitadelStationBot
parent
f98040513a
commit
ed201bc65d
@@ -36,20 +36,18 @@
|
||||
del_on_death = TRUE
|
||||
var/mode = MINEDRONE_COLLECT
|
||||
var/light_on = 0
|
||||
|
||||
var/datum/action/innate/minedrone/toggle_light/toggle_light_action
|
||||
var/datum/action/innate/minedrone/toggle_mode/toggle_mode_action
|
||||
var/datum/action/innate/minedrone/dump_ore/dump_ore_action
|
||||
var/obj/item/gun/energy/kinetic_accelerator/minebot/stored_gun
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/Initialize()
|
||||
. = ..()
|
||||
stored_gun = new(src)
|
||||
toggle_light_action = new()
|
||||
var/datum/action/innate/minedrone/toggle_light/toggle_light_action = new()
|
||||
toggle_light_action.Grant(src)
|
||||
toggle_mode_action = new()
|
||||
var/datum/action/innate/minedrone/toggle_meson_vision/toggle_meson_vision_action = new()
|
||||
toggle_meson_vision_action.Grant(src)
|
||||
var/datum/action/innate/minedrone/toggle_mode/toggle_mode_action = new()
|
||||
toggle_mode_action.Grant(src)
|
||||
dump_ore_action = new()
|
||||
var/datum/action/innate/minedrone/dump_ore/dump_ore_action = new()
|
||||
dump_ore_action.Grant(src)
|
||||
var/obj/item/implant/radio/mining/imp = new(src)
|
||||
imp.implant(src)
|
||||
@@ -60,6 +58,11 @@
|
||||
|
||||
SetCollectBehavior()
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/Destroy()
|
||||
for (var/datum/action/innate/minedrone/action in actions)
|
||||
qdel(action)
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/sentience_act()
|
||||
..()
|
||||
check_friendly_fire = 0
|
||||
@@ -193,6 +196,24 @@
|
||||
SetOffenseBehavior()
|
||||
. = ..()
|
||||
|
||||
/datum/action/innate/minedrone/toggle_meson_vision
|
||||
name = "Toggle Meson Vision"
|
||||
button_icon_state = "meson"
|
||||
|
||||
/datum/action/innate/minedrone/toggle_meson_vision/Activate()
|
||||
var/mob/living/simple_animal/hostile/mining_drone/user = owner
|
||||
if(user.sight & SEE_TURFS)
|
||||
user.sight &= ~SEE_TURFS
|
||||
user.lighting_alpha = initial(user.lighting_alpha)
|
||||
else
|
||||
user.sight |= SEE_TURFS
|
||||
user.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
|
||||
user.sync_lighting_plane_alpha()
|
||||
|
||||
to_chat(user, "<span class='notice'>You toggle your meson vision [(user.sight & SEE_TURFS) ? "on" : "off"].</span>")
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/toggle_mode()
|
||||
switch(mode)
|
||||
if(MINEDRONE_ATTACK)
|
||||
|
||||
Reference in New Issue
Block a user