Initialize hostile mobs (#18336)

* Initialize hostile mobs

* Farie's review

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

* staticify lists

Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
moxian
2022-07-24 13:14:06 +02:00
committed by GitHub
co-authored by Farie82
parent e946c0b537
commit 8befe47408
23 changed files with 104 additions and 99 deletions
+11 -14
View File
@@ -40,22 +40,19 @@
var/mesons_active
var/obj/item/gun/energy/kinetic_accelerator/minebot/stored_gun
var/datum/action/innate/minedrone/toggle_light/toggle_light_action
var/datum/action/innate/minedrone/toggle_meson_vision/toggle_meson_vision_action
var/datum/action/innate/minedrone/toggle_mode/toggle_mode_action
var/datum/action/innate/minedrone/dump_ore/dump_ore_action
/mob/living/simple_animal/hostile/mining_drone/New()
..()
/mob/living/simple_animal/hostile/mining_drone/Initialize(mapload)
. = ..()
stored_gun = new(src)
toggle_light_action = new()
toggle_light_action.Grant(src)
toggle_meson_vision_action = new()
toggle_meson_vision_action.Grant(src)
toggle_mode_action = new()
toggle_mode_action.Grant(src)
dump_ore_action = new()
dump_ore_action.Grant(src)
var/static/list/action_paths = list(
/datum/action/innate/minedrone/toggle_light,
/datum/action/innate/minedrone/toggle_meson_vision,
/datum/action/innate/minedrone/toggle_mode,
/datum/action/innate/minedrone/dump_ore,
)
for(var/action_path in action_paths)
var/datum/action/act = new action_path
act.Grant(src)
SetCollectBehavior()