2029163d33
About The Pull Request Converts every single usage of playsound's vary parameter to use the boolean define instead of 1 or 0. I'm tired of people copypasting the incorrect usage. Also changes a couple of places where a list was picked from instead of using get_sfx internal calls This was done via regex: (playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\)) to match 1 (playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\)) to match 0 full sed commands: /(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\))/\1TRUE\2/ 1 to TRUE /(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\))/\1FALSE\2/ 0 to FALSE I'm not very good with regex and these could probably be optimized, but they worked. Why It's Good For The Game Code usability
63 lines
2.4 KiB
Plaintext
63 lines
2.4 KiB
Plaintext
#define ASH_WALKER_SPAWN_THRESHOLD 2
|
|
//The ash walker den consumes corpses or unconscious mobs to create ash walker eggs. For more info on those, check ghost_role_spawners.dm
|
|
/obj/structure/lavaland/ash_walker
|
|
name = "necropolis tendril nest"
|
|
desc = "A vile tendril of corruption. It's surrounded by a nest of rapidly growing eggs..."
|
|
icon = 'icons/mob/nest.dmi'
|
|
icon_state = "ash_walker_nest"
|
|
|
|
move_resist=INFINITY // just killing it tears a massive hole in the ground, let's not move it
|
|
anchored = TRUE
|
|
density = TRUE
|
|
|
|
resistance_flags = FIRE_PROOF | LAVA_PROOF
|
|
max_integrity = 200
|
|
|
|
|
|
var/faction = list("ashwalker")
|
|
var/meat_counter = 6
|
|
var/datum/team/ashwalkers/ashies
|
|
|
|
/obj/structure/lavaland/ash_walker/Initialize()
|
|
.=..()
|
|
ashies = new /datum/team/ashwalkers()
|
|
var/datum/objective/protect_object/objective = new
|
|
objective.set_target(src)
|
|
ashies.objectives += objective
|
|
START_PROCESSING(SSprocessing, src)
|
|
|
|
/obj/structure/lavaland/ash_walker/deconstruct(disassembled)
|
|
new /obj/item/assembly/signaler/anomaly (get_step(loc, pick(GLOB.alldirs)))
|
|
new /obj/effect/collapse(loc)
|
|
return ..()
|
|
|
|
/obj/structure/lavaland/ash_walker/process()
|
|
consume()
|
|
spawn_mob()
|
|
|
|
/obj/structure/lavaland/ash_walker/proc/consume()
|
|
for(var/mob/living/H in view(src, 1)) //Only for corpse right next to/on same tile
|
|
if(H.stat)
|
|
visible_message("<span class='warning'>Serrated tendrils eagerly pull [H] to [src], tearing the body apart as its blood seeps over the eggs.</span>")
|
|
playsound(get_turf(src),'sound/magic/demon_consume.ogg', 100, TRUE)
|
|
for(var/obj/item/W in H)
|
|
if(!H.dropItemToGround(W))
|
|
qdel(W)
|
|
if(ismegafauna(H))
|
|
meat_counter += 20
|
|
else
|
|
meat_counter++
|
|
H.gib()
|
|
obj_integrity = min(obj_integrity + max_integrity*0.05,max_integrity)//restores 5% hp of tendril
|
|
for(var/mob/living/L in view(src, 5))
|
|
if(L.mind?.has_antag_datum(/datum/antagonist/ashwalker))
|
|
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "oogabooga", /datum/mood_event/sacrifice_good)
|
|
else
|
|
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "oogabooga", /datum/mood_event/sacrifice_bad)
|
|
|
|
/obj/structure/lavaland/ash_walker/proc/spawn_mob()
|
|
if(meat_counter >= ASH_WALKER_SPAWN_THRESHOLD)
|
|
new /obj/effect/mob_spawn/human/ash_walker(get_step(loc, pick(GLOB.alldirs)), ashies)
|
|
visible_message("<span class='danger'>One of the eggs swells to an unnatural size and tumbles free. It's ready to hatch!</span>")
|
|
meat_counter -= ASH_WALKER_SPAWN_THRESHOLD
|