diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_gaia.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_gaia.dmm index b34c93c8210..697a9a34e72 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_gaia.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_gaia.dmm @@ -39,6 +39,10 @@ /mob/living/basic/butterfly/lavaland, /turf/open/misc/grass/lavaland, /area/ruin/unpowered/gaia) +"k" = ( +/obj/item/food/grown/mushroom/amanita, +/turf/open/floor/bronze/filled/lavaland, +/area/ruin/unpowered/gaia) "l" = ( /obj/item/food/grown/mushroom/angel, /turf/open/misc/grass/lavaland, @@ -51,6 +55,10 @@ /obj/structure/flora/bush/flowers_br/style_random, /turf/open/misc/grass/lavaland, /area/ruin/unpowered/gaia) +"o" = ( +/obj/structure/flora/bush/flowers_br/style_random, +/turf/open/floor/bronze/filled/lavaland, +/area/ruin/unpowered/gaia) "p" = ( /mob/living/basic/lightgeist{ light_color = "#42ECFF" @@ -82,6 +90,11 @@ "w" = ( /turf/closed/mineral/volcanic/lava_land_surface, /area/ruin/unpowered/gaia) +"x" = ( +/obj/structure/flora/bush/sunny/style_random, +/obj/structure/flora/bush/flowers_br/style_random, +/turf/open/misc/grass/lavaland, +/area/ruin/unpowered/gaia) "A" = ( /obj/structure/flora/bush/stalky/style_random, /turf/open/misc/grass/lavaland, @@ -101,6 +114,42 @@ /obj/item/food/grown/mushroom/chanterelle, /turf/open/misc/grass/lavaland, /area/ruin/unpowered/gaia) +"E" = ( +/turf/open/floor/bronze/filled/lavaland, +/area/ruin/unpowered/gaia) +"I" = ( +/obj/structure/flora/bush/fullgrass/style_random, +/turf/open/floor/bronze/filled/lavaland, +/area/ruin/unpowered/gaia) +"J" = ( +/turf/closed/wall/mineral/bronze, +/area/ruin/unpowered/gaia) +"K" = ( +/obj/structure/flora/bush/stalky/style_random, +/obj/structure/flora/bush/fullgrass/style_random, +/turf/open/floor/bronze/filled/lavaland, +/area/ruin/unpowered/gaia) +"N" = ( +/obj/structure/flora/grass/jungle/b/style_random, +/turf/open/floor/bronze/filled/lavaland, +/area/ruin/unpowered/gaia) +"P" = ( +/obj/structure/flora/grass/jungle/b/style_random, +/obj/structure/flora/bush/flowers_br/style_random, +/turf/open/misc/grass/lavaland, +/area/ruin/unpowered/gaia) +"T" = ( +/obj/structure/flora/grass/jungle/a/style_random, +/turf/open/floor/bronze/filled/lavaland, +/area/ruin/unpowered/gaia) +"V" = ( +/obj/item/mod/construction/lavalandcore, +/turf/open/misc/grass/lavaland, +/area/ruin/unpowered/gaia) +"Z" = ( +/obj/structure/flora/grass/jungle/b/style_random, +/turf/closed/wall/mineral/bronze, +/area/ruin/unpowered/gaia) (1,1,1) = {" a @@ -128,7 +177,7 @@ a w w c -b +N c b c @@ -165,7 +214,7 @@ c d c i -d +T C n c @@ -200,9 +249,9 @@ g d c c -c +E v -d +T c c h @@ -236,9 +285,9 @@ d c n c -b +N B -c +n d m d @@ -256,7 +305,7 @@ d c d h -c +o f j c @@ -267,19 +316,19 @@ w (10,1,1) = {" w c -c +I h b +I c +J +x +Z +T c -q -t +K b -d -c -A -b -c +I w "} (11,1,1) = {" @@ -287,14 +336,14 @@ w d e i -n +o d c -t -c -c +x +V +I n -c +I c q c @@ -302,20 +351,20 @@ w "} (12,1,1) = {" w -c +I b c p g -s -c -b -j +k +J +P +J h -d +T n c -b +N w "} (13,1,1) = {" @@ -328,7 +377,7 @@ d b c c -n +o c c b @@ -345,9 +394,9 @@ n c c b -c +I b -c +j h i C @@ -362,7 +411,7 @@ l j c n -c +I c g c @@ -382,7 +431,7 @@ c c g c -c +I c n c @@ -417,7 +466,7 @@ c b n c -c +I j g c diff --git a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_spawner.dm b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_spawner.dm new file mode 100644 index 00000000000..a5f66788b86 --- /dev/null +++ b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_spawner.dm @@ -0,0 +1,3 @@ +// signals for use by mob spawners +/// called when a spawner spawns a mob +#define COMSIG_SPAWNER_SPAWNED "spawner_spawned" diff --git a/code/datums/components/spawner.dm b/code/datums/components/spawner.dm index 48630cdc7ab..5753b05896f 100644 --- a/code/datums/components/spawner.dm +++ b/code/datums/components/spawner.dm @@ -55,9 +55,11 @@ created_mob.faction = src.faction RegisterSignal(created, COMSIG_MOB_STATCHANGE, PROC_REF(mob_stat_changed)) + if (spawn_text) spawner.visible_message(span_danger("[created] [spawn_text] [spawner].")) + SEND_SIGNAL(src, COMSIG_SPAWNER_SPAWNED, created) RegisterSignal(created, COMSIG_QDELETING, PROC_REF(on_deleted)) /// Remove weakrefs to atoms which have been killed or deleted without us picking it up somehow diff --git a/code/modules/mob/living/basic/vermin/butterfly.dm b/code/modules/mob/living/basic/vermin/butterfly.dm index 06e853b935f..77f89d4d4d1 100644 --- a/code/modules/mob/living/basic/vermin/butterfly.dm +++ b/code/modules/mob/living/basic/vermin/butterfly.dm @@ -44,3 +44,52 @@ /mob/living/basic/butterfly/lavaland unsuitable_atmos_damage = 0 + +/mob/living/basic/butterfly/lavaland/temporary + name = "strange butterfly" + basic_mob_flags = DEL_ON_DEATH + /// The atom that's spawning the butterflies + var/atom/source = null + /// Max distance in tiles before the butterfly despawns + var/max_distance = 5 + /// Whether the butterfly will be destroyed at the end of its despawn timer + var/will_be_destroyed = FALSE + /// Despawn timer of the butterfly + var/despawn_timer = 0 + +/mob/living/basic/butterfly/lavaland/temporary/Initialize(mapload) + . = ..() + START_PROCESSING(SSprocessing, src) + +/mob/living/basic/butterfly/lavaland/temporary/Destroy() + STOP_PROCESSING(SSprocessing, src) + return ..() + +/mob/living/basic/butterfly/lavaland/temporary/process() + if(should_despawn()) + if(will_be_destroyed) + return + will_be_destroyed = TRUE + despawn_timer = addtimer(CALLBACK(src, TYPE_PROC_REF(/mob/living/basic/butterfly/lavaland/temporary, fadeout)), 5 SECONDS, TIMER_STOPPABLE) + return + + if(will_be_destroyed) + // Cancels the butterfly being destroyed + will_be_destroyed = FALSE + deltimer(despawn_timer) + +/// Checks whether the butterfly should be despawned after the next check, based on distance from source +/mob/living/basic/butterfly/lavaland/temporary/proc/should_despawn() + if(get_dist(source, src) > max_distance) + return TRUE + return FALSE + +/// Fade the butterfly out before deleting it. +/// Looks much better than it just blipping out of existence +/mob/living/basic/butterfly/lavaland/temporary/proc/fadeout() + animate(src, alpha = 0, 1 SECONDS) + QDEL_IN(src, 1 SECONDS) + +/mob/living/basic/butterfly/lavaland/temporary/examine(mob/user) + . = ..() + . += span_notice("Something about it seems unreal...") diff --git a/code/modules/mod/mod_construction.dm b/code/modules/mod/mod_construction.dm index bbba270a6fd..a79d216039c 100644 --- a/code/modules/mod/mod_construction.dm +++ b/code/modules/mod/mod_construction.dm @@ -51,6 +51,35 @@ new /obj/item/mod/core/standard(drop_location()) qdel(src) +/obj/item/mod/construction/lavalandcore + name = "plasma flower" + icon_state = "plasma-flower" + desc = "A strange flower from the desolate wastes of lavaland. It pulses with a bright purple glow. \ + Its shape is remarkably similar to that of a MOD core." + light_system = MOVABLE_LIGHT + light_color = "#cc00cc" + light_range = 2 + +/obj/item/mod/construction/lavalandcore/examine(mob/user) + . = ..() + . += span_notice("You could probably attach some wires to it...") + +/obj/item/mod/construction/lavalandcore/attackby(obj/item/weapon, mob/user, params) + if(!istype(weapon, /obj/item/stack/cable_coil)) + return + + if(!weapon.tool_start_check(user, amount=2)) + return + + to_chat(user, span_notice("You start pushing the wires into the core...")) + if(!weapon.use_tool(src, user, 5 SECONDS, amount = 2, volume = 30)) + return + + to_chat(user, span_notice("You add the wires to the core.")) + new /obj/item/mod/core/plasma/lavaland(drop_location()) + qdel(src) + + /obj/item/mod/construction/plating name = "MOD external plating" desc = "External plating used to finish a MOD control unit." diff --git a/code/modules/mod/mod_core.dm b/code/modules/mod/mod_core.dm index 7b05db45175..6b67d735a29 100644 --- a/code/modules/mod/mod_core.dm +++ b/code/modules/mod/mod_core.dm @@ -355,3 +355,75 @@ add_charge(uses_needed * charge_given) balloon_alert(user, "core refueled") return TRUE + +/obj/item/mod/core/plasma/lavaland + name = "MOD plasma flower core" + icon_state = "mod-core-plasma-flower" + desc = "A strange flower from the desolate wastes of lavaland. It pulses with a strange purple glow. \ + The wires coming out of it could be hooked into a MODsuit." + light_system = MOVABLE_LIGHT + light_color = "#cc00cc" + light_range = 2 + + // Slightly better than the normal plasma core. + // Not super sure if this should just be the same, but will see. + maxcharge = 15000 + charge = 15000 + + /// The mob to be spawned by the core + var/mob/living/spawned_mob_type = /mob/living/basic/butterfly/lavaland/temporary + /// Max number of mobs it can spawn + var/max_spawns = 3 + + /// Mob spawner for the core + var/datum/component/spawner/mob_spawner + + +/obj/item/mod/core/plasma/lavaland/Destroy() + if(mod?.wearer) + mod.wearer.particles = null + return ..() + +/obj/item/mod/core/plasma/lavaland/proc/new_mob(spawner, mob/living/basic/butterfly/lavaland/temporary/spawned) + SIGNAL_HANDLER + if(spawned) + spawned.source = src + +/obj/item/mod/core/plasma/lavaland/proc/on_toggle() + SIGNAL_HANDLER + if(mod.active) + START_PROCESSING(SSprocessing, src) + mod.wearer.particles = new /particles/pollen() + mob_spawner = mod.wearer.AddComponent(/datum/component/spawner, spawn_types=list(spawned_mob_type), spawn_time=5 SECONDS, max_spawned=3) + RegisterSignal(mob_spawner, COMSIG_SPAWNER_SPAWNED, PROC_REF(new_mob)) + RegisterSignal(mod.wearer, COMSIG_MOVABLE_PRE_MOVE, PROC_REF(flowas)) + + else + STOP_PROCESSING(SSprocessing, src) + mod.wearer.particles = null + UnregisterSignal(mob_spawner, COMSIG_SPAWNER_SPAWNED) + UnregisterSignal(mod.wearer, COMSIG_MOVABLE_PRE_MOVE) + for(var/datum/mob in mob_spawner.spawned_things) + qdel(mob) + qdel(mob_spawner) + +/obj/item/mod/core/plasma/lavaland/install(obj/item/mod/control/mod_unit) + . = ..() + RegisterSignal(mod_unit, COMSIG_MOD_TOGGLED, PROC_REF(on_toggle)) + +/obj/item/mod/core/plasma/lavaland/uninstall(obj/item/mod/control/mod_unit) + . = ..() + UnregisterSignal(mod_unit, COMSIG_MOD_TOGGLED) + +/obj/item/mod/core/plasma/lavaland/proc/flowas(mob/living/wearer) + SIGNAL_HANDLER + var/static/list/possible_flower_types = list( + /obj/structure/flora/bush/lavendergrass/style_random, + /obj/structure/flora/bush/flowers_yw/style_random, + /obj/structure/flora/bush/flowers_br/style_random, + /obj/structure/flora/bush/flowers_pp/style_random, + ) + var/chosen_type = pick(possible_flower_types) + var/flower_boots = new chosen_type(get_turf(wearer)) + animate(flower_boots, alpha = 0, 1 SECONDS) + QDEL_IN(flower_boots, 1 SECONDS) diff --git a/icons/obj/clothing/modsuit/mod_construction.dmi b/icons/obj/clothing/modsuit/mod_construction.dmi index a6be94284af..dedcb3f838d 100644 Binary files a/icons/obj/clothing/modsuit/mod_construction.dmi and b/icons/obj/clothing/modsuit/mod_construction.dmi differ diff --git a/tgstation.dme b/tgstation.dme index c04ae5457a2..c1f887d0a1d 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -331,6 +331,7 @@ #include "code\__DEFINES\dcs\signals\signals_mob\signals_mob_main.dm" #include "code\__DEFINES\dcs\signals\signals_mob\signals_mob_silicon.dm" #include "code\__DEFINES\dcs\signals\signals_mob\signals_mob_simple.dm" +#include "code\__DEFINES\dcs\signals\signals_mob\signals_mob_spawner.dm" #include "code\__DEFINES\research\anomalies.dm" #include "code\__DEFINES\research\research_categories.dm" #include "code\__HELPERS\_auxtools_api.dm"