diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 43f7dffb4..5c8b09b20 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -290,3 +290,6 @@ //Gremlins #define NPC_TAMPER_ACT_FORGET 1 //Don't try to tamper with this again #define NPC_TAMPER_ACT_NOMSG 2 //Don't produce a visible message + +//Upstream stuff +#define SLEEP_CHECK_DEATH(X) sleep(X); if(QDELETED(src) || stat == DEAD) return; diff --git a/hyperstation/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/hyperstation/code/game/objects/effects/temporary_visuals/miscellaneous.dm new file mode 100644 index 000000000..29b83c2a8 --- /dev/null +++ b/hyperstation/code/game/objects/effects/temporary_visuals/miscellaneous.dm @@ -0,0 +1,19 @@ +//Via LC13 + +/obj/effect/temp_visual/saw_effect + name = "saw" + icon_state = "claw" + duration = 4 + +/obj/effect/temp_visual/green_noon_reload + name = "recharging field" + icon = 'hyperstation/icons/mobs/48x48.dmi' + icon_state = "green_bot_reload_effect" + layer = BELOW_MOB_LAYER + pixel_x = -8 + //base_pixel_x = -8 + duration = 8 + +/obj/effect/temp_visual/green_noon_reload/Initialize() + ..() + animate(src, alpha = 0, transform = transform*1.5, time = duration) diff --git a/hyperstation/code/modules/mob/living/simple_animal/hostile/ordeal/green.dm b/hyperstation/code/modules/mob/living/simple_animal/hostile/ordeal/green.dm new file mode 100644 index 000000000..ef20d1dac --- /dev/null +++ b/hyperstation/code/modules/mob/living/simple_animal/hostile/ordeal/green.dm @@ -0,0 +1,251 @@ +//Code ported from Lobotomy Corp 13, and adapted for Hyper's old shitcode. +//I sincerely apologize that your wonderful sprites and work are in our setting. +//Damage values and health adjusted because furries aren't robust. + +/mob/living/simple_animal/hostile/ordeal/green_bot + name = "doubt" + desc = "A slim robot with a spear in place of its hand." + icon = 'hyperstation/icons/mobs/32x48.dmi' + icon_state = "green_bot" + icon_living = "green_bot" + icon_dead = "green_bot_dead" + faction = list("green_ordeal") + maxHealth = 200 + health = 200 + speed = 2 + move_to_delay = 10 + melee_damage_lower = 15 + melee_damage_upper = 20 + attacktext = "stabs" + attack_sound = 'hyperstation/sound/effects/ordeals/green/stab.ogg' + damage_coeff = list(BRUTE = 1) + + atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) + /* + butcher_results = list(/obj/item/food/meat/slab/human/mutant/robot = 1) + guaranteed_butcher_results = list(/obj/item/food/meat/slab/human/mutant/robot = 1) + */ + /// Can't move/attack when it's TRUE + var/finishing = FALSE + +/mob/living/simple_animal/hostile/ordeal/green_bot/CanAttack(atom/the_target) + if(finishing) + return FALSE + return ..() + +/mob/living/simple_animal/hostile/ordeal/green_bot/Move() + if(finishing) + return FALSE + return ..() + +/mob/living/simple_animal/hostile/ordeal/green_bot/AttackingTarget() + . = ..() + if(.) + if(!istype(target, /mob/living/carbon/human)) + return + var/mob/living/carbon/human/TH = target + if(TH.health < 0) + finishing = TRUE + TH.Stun(4 SECONDS) + forceMove(get_turf(TH)) + for(var/i = 1 to 7) + if(!targets_from.Adjacent(TH) || QDELETED(TH)) // They can still be saved if you move them away + finishing = FALSE + return + TH.attack_animal(src) + /* Rework to weave damage, once done + for(var/mob/living/carbon/human/H in view(7, get_turf(src))) + H.apply_damage(3, WHITE_DAMAGE, null, H.run_armor_check(null, WHITE_DAMAGE), spread_damage = TRUE) + */ + SLEEP_CHECK_DEATH(2) + if(!targets_from.Adjacent(TH) || QDELETED(TH)) + finishing = FALSE + return + playsound(get_turf(src), 'hyperstation/sound/effects/ordeals/green/final_stab.ogg', 50, 1) + TH.gib() + /* + for(var/mob/living/carbon/human/H in view(7, get_turf(src))) + H.apply_damage(20, WHITE_DAMAGE, null, H.run_armor_check(null, WHITE_DAMAGE), spread_damage = TRUE) + finishing = FALSE + */ + +/mob/living/simple_animal/hostile/ordeal/green_bot/factory + butcher_results = list() + guaranteed_butcher_results = list() + +/mob/living/simple_animal/hostile/ordeal/green_bot/factory/death(gibbed) + density = FALSE + animate(src, alpha = 0, time = 5 SECONDS) + QDEL_IN(src, 5 SECONDS) + ..() + + +/mob/living/simple_animal/hostile/ordeal/green_bot_big + name = "process of understanding" + desc = "A big robot with a saw and a machinegun in place of its hands." + icon = 'hyperstation/icons/mobs/48x48.dmi' + icon_state = "green_bot" + icon_living = "green_bot" + icon_dead = "green_bot_dead" + faction = list("green_ordeal") + pixel_x = -8 + //base_pixel_x = -8 + maxHealth = 310 + health = 310 + speed = 3 + move_to_delay = 8 + melee_damage_lower = 22 // Full damage is done on the entire turf of target + melee_damage_upper = 26 + attacktext = "slices" + attack_sound = 'hyperstation/sound/effects/ordeals/green/saw.ogg' + ranged = 1 + rapid = 8 + rapid_fire_delay = 3 + projectiletype = /obj/item/projectile/bullet/latob + projectilesound = 'hyperstation/sound/effects/ordeals/green/fire.ogg' + death_sound = 'hyperstation/sound/effects/ordeals/green/noon_dead.ogg' + damage_coeff = list(BRUTE = 1) + /* + butcher_results = list(/obj/item/food/meat/slab/human/mutant/robot = 2) + guaranteed_butcher_results = list(/obj/item/food/meat/slab/human/mutant/robot = 1) + */ + + /// Can't move/attack when it's TRUE + var/reloading = FALSE + /// When at 10 - it will start "reloading" + var/fire_count = 0 + +/mob/living/simple_animal/hostile/ordeal/green_bot_big/CanAttack(atom/the_target) + if(reloading) + return FALSE + return ..() + +/mob/living/simple_animal/hostile/ordeal/green_bot_big/Move() + if(reloading) + return FALSE + return ..() + +/mob/living/simple_animal/hostile/ordeal/green_bot_big/OpenFire(atom/A) + if(reloading) + return FALSE + fire_count += 1 + if(fire_count >= 6) + StartReloading() + return FALSE + return ..() + +/mob/living/simple_animal/hostile/ordeal/green_bot_big/AttackingTarget() + . = ..() + if(.) + if(!istype(target, /mob/living)) + return + var/turf/T = get_turf(target) + for(var/i = 1 to 4) + if(!T) + return + new /obj/effect/temp_visual/saw_effect(T) + for(var/mob/living/L in T.contents) + if(faction_check_mob(L)) + continue + L.apply_damage(8, BRUTE, null, L.run_armor_check(null, BRUTE), spread_damage = TRUE) + SLEEP_CHECK_DEATH(1) + +/mob/living/simple_animal/hostile/ordeal/green_bot_big/proc/StartReloading() + reloading = TRUE + icon_state = "green_bot_reload" + playsound(get_turf(src), 'hyperstation/sound/effects/ordeals/green/cooldown.ogg', 50, FALSE) + for(var/i = 1 to 8) + new /obj/effect/temp_visual/green_noon_reload(get_turf(src)) + SLEEP_CHECK_DEATH(8) + fire_count = 0 + reloading = FALSE + icon_state = icon_living + + +//Green noon factory spawn + +/mob/living/simple_animal/hostile/ordeal/green_bot_big/factory + butcher_results = list() + guaranteed_butcher_results = list() + +/mob/living/simple_animal/hostile/ordeal/green_bot_big/factory/death(gibbed) + density = FALSE + animate(src, alpha = 0, time = 5 SECONDS) + QDEL_IN(src, 5 SECONDS) + ..() + +// Green dusk +/mob/living/simple_animal/hostile/ordeal/green_dusk + name = "where we must reach" + desc = "A factory-like structure, constantly producing ancient robots." + icon = 'hyperstation/icons/mobs/64x48.dmi' + icon_state = "green_dusk" + icon_living = "green_dusk" + icon_dead = "green_dusk_dead" + bound_width = 64 // 2x1 + faction = list("green_ordeal") + maxHealth = 2500 + health = 2500 + damage_coeff = list(BRUTE = 1) + /* + butcher_results = list(/obj/item/food/meat/slab/human/mutant/robot = 3) + guaranteed_butcher_results = list(/obj/item/food/meat/slab/human/mutant/robot = 2) + */ + var/spawn_progress = 18 + var/list/spawned_mobs = list() + +/mob/living/simple_animal/hostile/ordeal/green_dusk/Initialize() + ..() + update_icon() + +/mob/living/simple_animal/hostile/ordeal/green_dusk/CanAttack(atom/the_target) + return FALSE + +/mob/living/simple_animal/hostile/ordeal/green_dusk/Move() + return FALSE + +/mob/living/simple_animal/hostile/ordeal/green_dusk/Life() + . = ..() + if(!.) // Dead + return FALSE + listclearnulls(spawned_mobs) + for(var/mob/living/L in spawned_mobs) + if(L.stat == DEAD || QDELETED(L)) + spawned_mobs -= L + update_icon() + if(length(spawned_mobs) >= 9) + return + if(spawn_progress < 20) + spawn_progress += 1 + return + flick("green_dusk_create", src) + spawn_progress = -5 // Basically, puts us on a tiny cooldown + visible_message("\The [src] produces a new set of robots!") + for(var/i = 1 to 3) + var/turf/T = get_step(get_turf(src), pick(0, EAST)) + var/picked_mob = pick(/mob/living/simple_animal/hostile/ordeal/green_bot/factory, /mob/living/simple_animal/hostile/ordeal/green_bot_big/factory) + var/mob/living/simple_animal/hostile/ordeal/nb = new picked_mob(T) + spawned_mobs += nb + /* + if(ordeal_reference) + nb.ordeal_reference = ordeal_reference + ordeal_reference.ordeal_mobs += nb + */ +/mob/living/simple_animal/hostile/ordeal/green_dusk/update_overlays() + . = ..() + if(spawn_progress <= 0 || stat == DEAD) + cut_overlays() + return + + var/mutable_appearance/progress_overlay = mutable_appearance(icon, "progress_1") + switch(spawn_progress) + if(1 to 4) + progress_overlay.icon_state = "progress_1" + if(5 to 8) + progress_overlay.icon_state = "progress_2" + if(9 to 12) + progress_overlay.icon_state = "progress_3" + if(13 to INFINITY) + progress_overlay.icon_state = "progress_4" + + . += progress_overlay diff --git a/hyperstation/icons/mobs/32x48.dmi b/hyperstation/icons/mobs/32x48.dmi new file mode 100644 index 000000000..2f6416ce3 Binary files /dev/null and b/hyperstation/icons/mobs/32x48.dmi differ diff --git a/hyperstation/icons/mobs/48x48.dmi b/hyperstation/icons/mobs/48x48.dmi new file mode 100644 index 000000000..1920af49f Binary files /dev/null and b/hyperstation/icons/mobs/48x48.dmi differ diff --git a/hyperstation/icons/mobs/64x48.dmi b/hyperstation/icons/mobs/64x48.dmi new file mode 100644 index 000000000..b2fc6580f Binary files /dev/null and b/hyperstation/icons/mobs/64x48.dmi differ diff --git a/hyperstation/sound/effects/ordeals/green/cooldown.ogg b/hyperstation/sound/effects/ordeals/green/cooldown.ogg new file mode 100644 index 000000000..908fac447 Binary files /dev/null and b/hyperstation/sound/effects/ordeals/green/cooldown.ogg differ diff --git a/hyperstation/sound/effects/ordeals/green/final_stab.ogg b/hyperstation/sound/effects/ordeals/green/final_stab.ogg new file mode 100644 index 000000000..55194df25 Binary files /dev/null and b/hyperstation/sound/effects/ordeals/green/final_stab.ogg differ diff --git a/hyperstation/sound/effects/ordeals/green/fire.ogg b/hyperstation/sound/effects/ordeals/green/fire.ogg new file mode 100644 index 000000000..03de2b4b8 Binary files /dev/null and b/hyperstation/sound/effects/ordeals/green/fire.ogg differ diff --git a/hyperstation/sound/effects/ordeals/green/noon_dead.ogg b/hyperstation/sound/effects/ordeals/green/noon_dead.ogg new file mode 100644 index 000000000..7fb18e631 Binary files /dev/null and b/hyperstation/sound/effects/ordeals/green/noon_dead.ogg differ diff --git a/hyperstation/sound/effects/ordeals/green/saw.ogg b/hyperstation/sound/effects/ordeals/green/saw.ogg new file mode 100644 index 000000000..c2bd21d74 Binary files /dev/null and b/hyperstation/sound/effects/ordeals/green/saw.ogg differ diff --git a/hyperstation/sound/effects/ordeals/green/stab.ogg b/hyperstation/sound/effects/ordeals/green/stab.ogg new file mode 100644 index 000000000..641738c03 Binary files /dev/null and b/hyperstation/sound/effects/ordeals/green/stab.ogg differ diff --git a/tgstation.dme b/tgstation.dme index 3408788ef..0a071e1fb 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3119,6 +3119,7 @@ #include "hyperstation\code\game\machinery\computer\timeclock.dm" #include "hyperstation\code\game\objects\railings.dm" #include "hyperstation\code\game\objects\effects\landmarks.dm" +#include "hyperstation\code\game\objects\effects\temporary_visuals\miscellaneous.dm" #include "hyperstation\code\game\objects\items\cards.dm" #include "hyperstation\code\game\objects\items\cards_ids.dm" #include "hyperstation\code\game\objects\items\coconutcannon.dm" @@ -3214,6 +3215,7 @@ #include "hyperstation\code\modules\mob\living\silicon\robot\robot_modules.dm" #include "hyperstation\code\modules\mob\living\simple_animal\friendly\chicken_types.dm" #include "hyperstation\code\modules\mob\living\simple_animal\friendly\farm_animals.dm" +#include "hyperstation\code\modules\mob\living\simple_animal\hostile\ordeal\green.dm" #include "hyperstation\code\modules\patreon\patreon.dm" #include "hyperstation\code\modules\power\reactor\fluffed.dm" #include "hyperstation\code\modules\power\reactor\fuel_rods.dm"