From b7dad1801d6568b10fac4904c8bfa87531db5a2c Mon Sep 17 00:00:00 2001 From: KalevTait <107985691+KalevTait@users.noreply.github.com> Date: Wed, 6 Jul 2022 19:32:44 +0100 Subject: [PATCH] terror spiders (#18216) --- .../hostile/terror_spiders/actions.dm | 12 +++---- .../hostile/terror_spiders/brown.dm | 2 +- .../hostile/terror_spiders/gray.dm | 2 +- .../hostile/terror_spiders/princess.dm | 2 +- .../hostile/terror_spiders/purple.dm | 2 +- .../hostile/terror_spiders/queen.dm | 4 +-- .../hostile/terror_spiders/reproduction.dm | 8 ++--- .../hostile/terror_spiders/terror_ai.dm | 34 +++++++++---------- .../hostile/terror_spiders/terror_spiders.dm | 22 ++++++------ .../hostile/terror_spiders/white.dm | 2 +- 10 files changed, 45 insertions(+), 45 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm index f087e7b6f57..0f8979b7f99 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm @@ -159,8 +159,8 @@ name = "terror web" desc = "it's stringy and sticky" icon = 'icons/effects/effects.dmi' - anchored = 1 // prevents people dragging it - density = 0 // prevents it blocking all movement + anchored = TRUE // prevents people dragging it + density = FALSE // prevents it blocking all movement max_integrity = 20 // two welders, or one laser shot (15 for the normal spider webs) icon_state = "stickyweb1" var/creator_ckey = null @@ -252,7 +252,7 @@ return busy = SPINNING_COCOON visible_message("[src] begins to secrete a sticky substance around [cocoon_target].") - stop_automated_movement = 1 + stop_automated_movement = TRUE walk(src,0) if(do_after(src, 40, target = cocoon_target.loc)) if(busy == SPINNING_COCOON) @@ -291,7 +291,7 @@ C.icon_state = pick("cocoon_large1","cocoon_large2","cocoon_large3") cocoon_target = null busy = 0 - stop_automated_movement = 0 + stop_automated_movement = FALSE /mob/living/simple_animal/hostile/poison/terror_spider/proc/DoVentSmash() var/valid_target = FALSE @@ -308,7 +308,7 @@ if(do_after(src, 40, target = loc)) for(var/obj/machinery/atmospherics/unary/vent_pump/P in range(1, get_turf(src))) if(P.welded) - P.welded = 0 + P.welded = FALSE P.update_icon() P.update_pipe_image() forceMove(P.loc) @@ -316,7 +316,7 @@ return for(var/obj/machinery/atmospherics/unary/vent_scrubber/C in range(1, get_turf(src))) if(C.welded) - C.welded = 0 + C.welded = FALSE C.update_icon() C.update_pipe_image() forceMove(C.loc) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/brown.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/brown.dm index 389397da95c..4dd64209344 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/brown.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/brown.dm @@ -23,7 +23,7 @@ spider_opens_doors = 2 // Breach specialist. environment_smash = ENVIRONMENT_SMASH_RWALLS // Breaks anything. spider_tier = TS_TIER_2 - ai_ventbreaker = 1 + ai_ventbreaker = TRUE freq_ventcrawl_combat = 600 // Ventcrawls very frequently, breaking open vents as it goes. freq_ventcrawl_idle = 1800 web_type = null diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm index 316dd65de61..06ccd8fbc0d 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm @@ -55,7 +55,7 @@ /mob/living/simple_animal/hostile/poison/terror_spider/gray/spider_special_action() if(prob(prob_ai_massweb)) for(var/turf/simulated/T in oview(2,get_turf(src))) - if(T.density == 0) + if(!T.density) var/obj/structure/spider/terrorweb/W = locate() in T if(!W) new web_type(T) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm index 787d89b722f..ca22e8c2750 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm @@ -21,7 +21,7 @@ spider_tier = TS_TIER_3 // Unlike queens, no ranged attack. - ranged = 0 + ranged = FALSE retreat_distance = 0 minimum_distance = 0 projectilesound = null diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm index eb55ff2a9b3..b82a2ac5765 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm @@ -111,5 +111,5 @@ /obj/structure/spider/terrorweb/purple name = "thick web" desc = "This web is so thick, most cannot see beyond it." - opacity = 1 + opacity = TRUE max_integrity = 40 diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm index cd0a0646bc5..fae0239c272 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm @@ -27,7 +27,7 @@ ai_ventcrawls = FALSE idle_ventcrawl_chance = 0 force_threshold = 18 // outright immune to anything of force under 18, this means welders can't hurt it, only guns can - ranged = 1 + ranged = TRUE retreat_distance = 5 minimum_distance = 5 projectilesound = 'sound/weapons/pierce.ogg' @@ -172,7 +172,7 @@ else if(entry_vent) if(!path_to_vent) visible_message("\The [src] looks around warily - then seeks a better nesting ground.") - path_to_vent = 1 + path_to_vent = TRUE else neststep = -1 message_admins("Warning: [key_name_admin(src)] was spawned in an area without a vent! This is likely a mapping/spawn mistake. This mob's AI has been permanently deactivated.") diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/reproduction.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/reproduction.dm index 28e67d9912d..fc4269a7e0e 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/reproduction.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/reproduction.dm @@ -7,7 +7,7 @@ name = "spiderling" desc = "A fast-moving tiny spider, prone to making aggressive hissing sounds. Hope it doesn't grow up." icon_state = "spiderling" - anchored = 0 + anchored = FALSE layer = 2.75 max_integrity = 3 var/stillborn = FALSE @@ -101,7 +101,7 @@ return if(travelling_in_vent) if(isturf(loc)) - travelling_in_vent = 0 + travelling_in_vent = FALSE entry_vent = null else if(entry_vent) if(get_dist(src, entry_vent) <= 1) @@ -179,7 +179,7 @@ // -------------------------------------------------------------------------------- /mob/living/simple_animal/hostile/poison/terror_spider/proc/DoLayTerrorEggs(lay_type, lay_number) - stop_automated_movement = 1 + stop_automated_movement = TRUE var/obj/structure/spider/eggcluster/terror_eggcluster/C = new /obj/structure/spider/eggcluster/terror_eggcluster(get_turf(src), lay_type) C.spiderling_number = lay_number C.spider_myqueen = spider_myqueen @@ -189,7 +189,7 @@ C.amount_grown = 250 C.spider_growinstantly = TRUE spawn(10) - stop_automated_movement = 0 + stop_automated_movement = FALSE /obj/structure/spider/eggcluster/terror_eggcluster name = "terror egg cluster" diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm index 03f13469ae0..f2b1a0fe728 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm @@ -108,17 +108,17 @@ if(path_to_vent) if(entry_vent) if(spider_steps_taken > spider_max_steps) - path_to_vent = 0 - stop_automated_movement = 0 + path_to_vent = FALSE + stop_automated_movement = FALSE spider_steps_taken = 0 - path_to_vent = 0 + path_to_vent = FALSE entry_vent = null else if(get_dist(src, entry_vent) <= 1) - path_to_vent = 0 - stop_automated_movement = 1 + path_to_vent = FALSE + stop_automated_movement = TRUE spider_steps_taken = 0 spawn(50) - stop_automated_movement = 0 + stop_automated_movement = FALSE TSVentCrawlRandom(entry_vent) else spider_steps_taken++ @@ -127,13 +127,13 @@ if(spider_debug) visible_message("[src] moves towards the vent [entry_vent].") else - path_to_vent = 0 + path_to_vent = FALSE else if(ai_break_lights && world.time > (last_break_light + freq_break_light)) last_break_light = world.time for(var/obj/machinery/light/L in range(1, src)) if(!L.status) step_to(src,L) - L.on = 1 + L.on = TRUE L.break_light_tube() do_attack_animation(L) visible_message("[src] smashes the [L.name].") @@ -154,7 +154,7 @@ entry_vent = v vdistance = get_dist(src,v) if(entry_vent) - path_to_vent = 1 + path_to_vent = TRUE else // If none of the general actions apply, check for class-specific actions. spider_special_action() @@ -206,7 +206,7 @@ spider_steps_taken = 0 cocoon_target = null busy = 0 - stop_automated_movement = 0 + stop_automated_movement = FALSE else spider_steps_taken++ CreatePath(cocoon_target) @@ -228,7 +228,7 @@ if(istype(O, /obj/item) || istype(O, /obj/structure) || istype(O, /obj/machinery)) if(!istype(O, /obj/item/paper)) cocoon_target = O - stop_automated_movement = 1 + stop_automated_movement = TRUE spider_steps_taken = 0 return @@ -250,7 +250,7 @@ spawn(0) try_open_airlock(A) for(var/obj/machinery/door/firedoor/F in view(1, src)) - if(tgt_dir == get_dir(src,F) && F.density && !F.welded) + if(tgt_dir == get_dir(src, F) && F.density && !F.welded) visible_message("[src] pries open the firedoor!") F.open() @@ -269,7 +269,7 @@ if(entry_vent) if(get_dist(src, entry_vent) <= 2) if(ai_ventbreaker && entry_vent.welded) - entry_vent.welded = 0 + entry_vent.welded = FALSE entry_vent.update_icon() entry_vent.visible_message("[src] smashes the welded cover off [entry_vent]!") var/list/vents = list() @@ -297,7 +297,7 @@ entry_vent = null return if(ai_ventbreaker && exit_vent.welded) - exit_vent.welded = 0 + exit_vent.welded = FALSE exit_vent.update_icon() exit_vent.update_pipe_image() exit_vent.visible_message("[src] smashes the welded cover off [exit_vent]!") @@ -315,7 +315,7 @@ /mob/living/simple_animal/hostile/poison/terror_spider/proc/ListValidTurfs() var/list/potentials = list() for(var/turf/simulated/T in oview(3,get_turf(src))) - if(T.density == 0 && get_dist(get_turf(src),T) == 3) + if(!T.density && get_dist(get_turf(src), T) == 3) var/obj/structure/spider/terrorweb/W = locate() in T if(!W) var/obj/structure/grille/G = locate() in T @@ -328,7 +328,7 @@ /mob/living/simple_animal/hostile/poison/terror_spider/proc/ListWebbedTurfs() var/list/webbed = list() for(var/turf/simulated/T in oview(3,get_turf(src))) - if(T.density == 0 && get_dist(get_turf(src),T) == 3) + if(!T.density && get_dist(get_turf(src), T) == 3) var/obj/structure/spider/terrorweb/W = locate() in T if(W) webbed += T @@ -337,7 +337,7 @@ /mob/living/simple_animal/hostile/poison/terror_spider/proc/ListVisibleTurfs() var/list/vturfs = list() for(var/turf/simulated/T in oview(7,get_turf(src))) - if(T.density == 0) + if(!T.density) vturfs += T return vturfs diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index 8d6980114e0..53ab3c23334 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -60,7 +60,7 @@ GLOBAL_LIST_EMPTY(ts_spiderling_list) var/freq_ventcrawl_combat = 1800 // 3 minutes var/freq_ventcrawl_idle = 9000 // 15 minutes var/last_ventcrawl_time = -9000 // Last time the spider crawled. Used to prevent excessive crawling. Setting to freq*-1 ensures they can crawl once on spawn. - var/ai_ventbreaker = 0 + var/ai_ventbreaker = FALSE // AI movement tracking var/spider_steps_taken = 0 // leave at 0, its a counter for ai steps taken. @@ -119,11 +119,11 @@ GLOBAL_LIST_EMPTY(ts_spiderling_list) var/spider_opens_doors = 1 // all spiders can open firedoors (they have no security). 1 = can open depowered doors. 2 = can open powered doors faction = list("terrorspiders") - var/spider_awaymission = 0 // if 1, limits certain behavior in away missions - var/spider_uo71 = 0 // if 1, spider is in the UO71 away mission + var/spider_awaymission = FALSE // if TRUE, limits certain behavior in away missions + var/spider_uo71 = FALSE // if TRUE, spider is in the UO71 away mission var/spider_unlock_id_tag = "" // if defined, unlock awaymission blast doors with this tag on death var/spider_role_summary = "UNDEFINED" - var/spider_placed = 0 + var/spider_placed = FALSE // AI variables designed for use in procs var/atom/movable/cocoon_target // for queen and nurse @@ -131,15 +131,15 @@ GLOBAL_LIST_EMPTY(ts_spiderling_list) var/obj/machinery/atmospherics/unary/vent_pump/exit_vent // remote vent they intend to come out of var/obj/machinery/atmospherics/unary/vent_pump/nest_vent // home vent, usually used by queens var/fed = 0 - var/travelling_in_vent = 0 + var/travelling_in_vent = FALSE var/list/enemies = list() - var/path_to_vent = 0 + var/path_to_vent = FALSE var/killcount = 0 var/busy = 0 // leave this alone! var/spider_tier = TS_TIER_1 // 1 for red,gray,green. 2 for purple,black,white, 3 for prince, mother. 4 for queen /// Does this terror speak loudly on the terror hivemind? var/loudspeaker = FALSE - var/hasdied = 0 + var/hasdied = FALSE var/list/spider_special_drops = list() var/attackstep = 0 var/attackcycles = 0 @@ -282,16 +282,16 @@ GLOBAL_LIST_EMPTY(ts_spiderling_list) real_name = name msg_terrorspiders("[src] has grown in [get_area(src)].") if(is_away_level(z)) - spider_awaymission = 1 + spider_awaymission = TRUE GLOB.ts_count_alive_awaymission++ if(spider_tier >= 3) ai_ventcrawls = FALSE // means that pre-spawned bosses on away maps won't ventcrawl. Necessary to keep prince/mother in one place. if(istype(get_area(src), /area/awaymission/UO71)) // if we are playing the away mission with our special spiders... - spider_uo71 = 1 + spider_uo71 = TRUE if(world.time < 600) // these are static spiders, specifically for the UO71 away mission, make them stay in place ai_ventcrawls = FALSE - spider_placed = 1 + spider_placed = TRUE else GLOB.ts_count_alive_station++ // after 3 seconds, assuming nobody took control of it yet, offer it to ghosts. @@ -344,7 +344,7 @@ GLOBAL_LIST_EMPTY(ts_spiderling_list) /mob/living/simple_animal/hostile/poison/terror_spider/proc/handle_dying() if(!hasdied) - hasdied = 1 + hasdied = TRUE GLOB.ts_count_dead++ GLOB.ts_death_last = world.time if(spider_awaymission) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/white.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/white.dm index 114ff403a23..4248ebb5e5c 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/white.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/white.dm @@ -25,7 +25,7 @@ /mob/living/simple_animal/hostile/poison/terror_spider/white/LoseTarget() - stop_automated_movement = 0 + stop_automated_movement = FALSE attackstep = 0 attackcycles = 0 ..()