From 72cbb77eccfa56d6dccfa849dab58c8bd8f01ceb Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Thu, 30 Apr 2020 00:48:37 -0700 Subject: [PATCH] fixes --- _maps/iceboxstation.dm | 1 + .../turfs/simulated/floor/plating/asteroid.dm | 2 +- .../hostile/megafauna/demonic_frost_miner.dm | 3 -- .../hostile/megafauna/megafauna.dm | 40 +++++++++++++++++++ .../hostile/megafauna/wendigo.dm | 3 -- tgstation.dme | 1 + 6 files changed, 43 insertions(+), 7 deletions(-) create mode 100644 _maps/iceboxstation.dm diff --git a/_maps/iceboxstation.dm b/_maps/iceboxstation.dm new file mode 100644 index 0000000000..10928bd8a5 --- /dev/null +++ b/_maps/iceboxstation.dm @@ -0,0 +1 @@ +#define FORCE_MAP "_maps/icebox.json" diff --git a/code/game/turfs/simulated/floor/plating/asteroid.dm b/code/game/turfs/simulated/floor/plating/asteroid.dm index cbc5796fdc..07f8af2a73 100644 --- a/code/game/turfs/simulated/floor/plating/asteroid.dm +++ b/code/game/turfs/simulated/floor/plating/asteroid.dm @@ -335,7 +335,7 @@ var/spawned_terrain = FALSE if(is_mining_level(z)) spawned_flora = SpawnFlora(T) - if(!spawned_flora && !spawned_terrain) // no rocks beneath mob spawners / mobs. + if(!spawned_flora && !spawned_terrain) // no rocks beneath mob spawners / mobs. SpawnMonster(T) T.ChangeTurf(turf_type, null, CHANGETURF_IGNORE_AIR) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm index 88b980d991..e258f958b1 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm @@ -31,9 +31,6 @@ Difficulty: Extremely Hard wander = FALSE del_on_death = TRUE blood_volume = BLOOD_VOLUME_NORMAL - achievement_type = /datum/award/achievement/boss/demonic_miner_kill - crusher_achievement_type = /datum/award/achievement/boss/demonic_miner_crusher - score_achievement_type = /datum/award/score/demonic_miner_score deathmessage = "falls to the ground, decaying into plasma particles." deathsound = "bodyfall" footstep_type = FOOTSTEP_MOB_HEAVY diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index e62cd331c6..43a2cd7b8e 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -41,15 +41,37 @@ /// Next time fauna can use a melee attack var/recovery_time = 0 + var/true_spawn = TRUE // if this is a megafauna that should grant achievements, or have a gps signal + var/nest_range = 10 + var/chosen_attack = 1 // chosen attack num + var/list/attack_action_types = list() + var/small_sprite_type + /mob/living/simple_animal/hostile/megafauna/Initialize(mapload) . = ..() apply_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) ADD_TRAIT(src, TRAIT_NO_TELEPORT, MEGAFAUNA_TRAIT) + for(var/action_type in attack_action_types) + var/datum/action/innate/megafauna_attack/attack_action = new action_type() + attack_action.Grant(src) + if(small_sprite_type) + var/datum/action/small_sprite/small_action = new small_sprite_type() + small_action.Grant(src) /mob/living/simple_animal/hostile/megafauna/Destroy() QDEL_NULL(internal) . = ..() +/mob/living/simple_animal/hostile/megafauna/Moved() + if(nest && nest.parent && get_dist(nest.parent, src) > nest_range) + var/turf/closest = get_turf(nest.parent) + for(var/i = 1 to nest_range) + closest = get_step(closest, get_dir(closest, src)) + forceMove(closest) // someone teleported out probably and the megafauna kept chasing them + target = null + return + return ..() + /mob/living/simple_animal/hostile/megafauna/death(gibbed) if(health > 0) return @@ -140,3 +162,21 @@ SSmedals.SetScore(BOSS_SCORE, C, 1) SSmedals.SetScore(score_type, C, 1) return TRUE + +/datum/action/innate/megafauna_attack + name = "Megafauna Attack" + icon_icon = 'icons/mob/actions/actions_animal.dmi' + button_icon_state = "" + var/mob/living/simple_animal/hostile/megafauna/M + var/chosen_message + var/chosen_attack_num = 0 + +/datum/action/innate/megafauna_attack/Grant(mob/living/L) + if(istype(L, /mob/living/simple_animal/hostile/megafauna)) + M = L + return ..() + return FALSE + +/datum/action/innate/megafauna_attack/Activate() + M.chosen_attack = chosen_attack_num + to_chat(M, chosen_message) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm index 819430c8ab..cedc0a5b0a 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm @@ -34,9 +34,6 @@ Difficulty: Hard wander = FALSE del_on_death = FALSE blood_volume = BLOOD_VOLUME_NORMAL - achievement_type = /datum/award/achievement/boss/wendigo_kill - crusher_achievement_type = /datum/award/achievement/boss/wendigo_crusher - score_achievement_type = /datum/award/score/wendigo_score deathmessage = "falls, shaking the ground around it" deathsound = 'sound/effects/gravhit.ogg' footstep_type = FOOTSTEP_MOB_HEAVY diff --git a/tgstation.dme b/tgstation.dme index 47f3340a3c..ae64f85e18 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -15,6 +15,7 @@ // BEGIN_INCLUDE #include "_maps\_basemap.dm" +#include "_maps\iceboxstation.dm" #include "code\_compile_options.dm" #include "code\world.dm" #include "code\__DEFINES\__513_compatibility.dm"