From dfd13270e93a305290a288455678bcfc7f0cda06 Mon Sep 17 00:00:00 2001 From: Sadhorizon <108196626+Sadhorizon@users.noreply.github.com> Date: Sun, 1 Oct 2023 13:12:11 +0200 Subject: [PATCH] Adds a new fauna to lavaland: an abandoned minebot! (#22173) * added the file * works pretty nicely * forgot these comments * doubled their spawn chance * minebot passthrough stuff * more fluff * no longer will go to lava tiles * answered most reviews * DGL's solution * makes loot more efficient, minor tweaks big thanks to DGamer with this one! * DGL's review * Update code/modules/mob/living/simple_animal/hostile/mining/abandoned_minebot.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Merge remote-tracking branch 'upstream/master' into outpost_remap_copy * oops, a lil fuckup * removes an unneeded var * removed the landmark iconstate --------- Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --- code/game/objects/effects/landmarks.dm | 3 + .../turfs/simulated/floor/asteroid_floors.dm | 3 +- .../hostile/mining/abandoned_minebot.dm | 86 +++++++++++++++++++ paradise.dme | 1 + 4 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 code/modules/mob/living/simple_animal/hostile/mining/abandoned_minebot.dm diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 5c48a64c37f..5be01f245cb 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -647,6 +647,9 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/awaystart) //Without this away mission mobtype = /mob/living/simple_animal/hostile/asteroid/gutlunch/gubbuck . = ..() +/obj/effect/landmark/mob_spawner/abandoned_minebot + mobtype = /mob/living/simple_animal/hostile/asteroid/abandoned_minebot + // Damage tiles /obj/effect/landmark/damageturf icon_state = "damaged" diff --git a/code/game/turfs/simulated/floor/asteroid_floors.dm b/code/game/turfs/simulated/floor/asteroid_floors.dm index f9e06096a48..e6035fe1b2f 100644 --- a/code/game/turfs/simulated/floor/asteroid_floors.dm +++ b/code/game/turfs/simulated/floor/asteroid_floors.dm @@ -184,7 +184,8 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me mob_spawn_list = list(/obj/effect/landmark/mob_spawner/goliath = 50, /obj/structure/spawner/lavaland/goliath = 3, /obj/effect/landmark/mob_spawner/watcher = 40, /obj/structure/spawner/lavaland = 2, /obj/effect/landmark/mob_spawner/legion = 30, /obj/structure/spawner/lavaland/legion = 3, - SPAWN_MEGAFAUNA = 6, /obj/effect/landmark/mob_spawner/goldgrub = 10, /obj/effect/landmark/mob_spawner/gutlunch = 4) + SPAWN_MEGAFAUNA = 6, /obj/effect/landmark/mob_spawner/goldgrub = 10, /obj/effect/landmark/mob_spawner/gutlunch = 4, + /obj/effect/landmark/mob_spawner/abandoned_minebot = 6) data_having_type = /turf/simulated/floor/plating/asteroid/airless/cave/volcanic/has_data turf_type = /turf/simulated/floor/plating/asteroid/basalt/lava_land_surface diff --git a/code/modules/mob/living/simple_animal/hostile/mining/abandoned_minebot.dm b/code/modules/mob/living/simple_animal/hostile/mining/abandoned_minebot.dm new file mode 100644 index 00000000000..927327d5c20 --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/mining/abandoned_minebot.dm @@ -0,0 +1,86 @@ +/mob/living/simple_animal/hostile/asteroid/abandoned_minebot + name = "abandoned minebot" + desc = "The instructions printed on the side are faded, and the only thing that remains is mechanical bloodlust." + icon = 'icons/obj/aibots.dmi' + icon_state = "mining_drone_offense" + icon_living = "mining_drone_offense" + icon_aggro = "mining_drone_alert" + mob_biotypes = MOB_ROBOTIC + vision_range = 6 + aggro_vision_range = 7 + status_flags = CANPUSH + weather_immunities = list("ash") + move_to_delay = 10 + maxHealth = 75 + health = 75 + melee_damage_lower = 15 + melee_damage_upper = 15 + obj_damage = 10 + environment_smash = ENVIRONMENT_SMASH_STRUCTURES + attacktext = "drills into" + attack_sound = 'sound/weapons/circsawhit.ogg' + projectiletype = /obj/item/projectile/kinetic + projectilesound = 'sound/weapons/kenetic_accel.ogg' + ranged_cooldown_time = 30 + speak_emote = list("states") + throw_message = "does not go through the armor of" + del_on_death = TRUE + light_range = 4 + light_color = LIGHT_COLOR_RED + ranged = TRUE + dodging = FALSE // I feel like they are pretty strong as is, no need to dodge. + retreat_distance = 2 + minimum_distance = 1 + deathmessage = "blows apart!" + loot = list(/obj/effect/gibspawner/robot, /obj/item/pickaxe/drill) + +/mob/living/simple_animal/hostile/asteroid/abandoned_minebot/drop_loot() + loot += pick( + /obj/item/borg/upgrade/modkit/chassis_mod, + /obj/item/borg/upgrade/modkit/tracer/adjustable, + /obj/item/borg/upgrade/modkit/cooldown, + /obj/item/borg/upgrade/modkit/damage, + /obj/item/borg/upgrade/modkit/range) + var/ore = pick(/obj/item/stack/ore/iron, /obj/item/stack/ore/plasma, /obj/item/stack/ore/glass/basalt) + new ore(loc, rand(5, 15)) + . = ..() + +/mob/living/simple_animal/hostile/asteroid/abandoned_minebot/GiveTarget(new_target) + if(!..()) + return + if(isliving(target) && !target.Adjacent(targets_from) && ranged_cooldown <= world.time) + OpenFire(target) + +/mob/living/simple_animal/hostile/asteroid/abandoned_minebot/adjustHealth(damage, updating_health) + if(prob(20)) + do_sparks(3, 1, src) + . = ..() + +/mob/living/simple_animal/hostile/asteroid/abandoned_minebot/Move(atom/newloc) + if(newloc && (islava(newloc) || ischasm(newloc))) //minebots aren't lava-resistant. Would be a shame if they just died. + return FALSE + return ..() + +// Copied from minebot.dm, to add to the fluff of "Hey! This is a minebot, just broken!" +/mob/living/simple_animal/hostile/asteroid/abandoned_minebot/examine(mob/user) + . = ..() + if(health < maxHealth) + if(health >= maxHealth * 0.5) + . += "It looks slightly dented." + else + . += "It looks severely dented!" + . += "[rand(-30, 110)]% mod capacity remaining.\nThere is a module installed, using [rand(-5, 35)]% capacity.\n...or at least you think so." + +/mob/living/simple_animal/hostile/asteroid/abandoned_minebot/CanPass(atom/movable/O) + if(!istype(O, /obj/item/projectile/kinetic)) + return ..() + var/obj/item/projectile/kinetic/K = O + if(K.kinetic_gun) + for(var/A in K.kinetic_gun.get_modkits()) + var/obj/item/borg/upgrade/modkit/M = A + if(istype(M, /obj/item/borg/upgrade/modkit/minebot_passthrough)) + return TRUE + +/mob/living/simple_animal/hostile/asteroid/abandoned_minebot/emp_act(severity) + adjustHealth(100 / severity) + visible_message("[src] crackles and buzzes violently!") diff --git a/paradise.dme b/paradise.dme index 3c8c7247e70..eaeb1e0cdde 100644 --- a/paradise.dme +++ b/paradise.dme @@ -2228,6 +2228,7 @@ #include "code\modules\mob\living\simple_animal\hostile\megafauna\hierophant.dm" #include "code\modules\mob\living\simple_animal\hostile\megafauna\legion.dm" #include "code\modules\mob\living\simple_animal\hostile\megafauna\megafauna.dm" +#include "code\modules\mob\living\simple_animal\hostile\mining\abandoned_minebot.dm" #include "code\modules\mob\living\simple_animal\hostile\mining\basilisk.dm" #include "code\modules\mob\living\simple_animal\hostile\mining\goldgrub.dm" #include "code\modules\mob\living\simple_animal\hostile\mining\goliath.dm"