Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plasma flower MOD core from the lavaland patch of eden ruin #75959

Merged
merged 45 commits into from Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
5be63f1
Added plasma flower mod core
Momo8289 Jun 10, 2023
9444e02
Added plasma flower item and sprite
Momo8289 Jun 10, 2023
b39b200
Updated patch of eden to include the item
Momo8289 Jun 10, 2023
e566c62
fixed last commit, was weird from fulp code
Momo8289 Jun 10, 2023
524d40c
Merge branch 'plasma-flower' of github.com:Momo8289/tgstation into pl…
Momo8289 Jun 10, 2023
6b9d0da
hopefully fixes conflicts
Momo8289 Jun 10, 2023
a225d5c
Update code/modules/mod/mod_core.dm from suggestion
Momo8289 Jun 10, 2023
30762c9
Updated var name to be more descriptive
Momo8289 Jun 10, 2023
6eaeb35
Merge branch 'plasma-flower' of github.com:Momo8289/tgstation into pl…
Momo8289 Jun 10, 2023
4ec2701
Updated mod core name to fit other mod cores
Momo8289 Jun 10, 2023
efac028
Update to use early return
Momo8289 Jun 10, 2023
c384a34
Actually updates MOD core name to fit other cores
Momo8289 Jun 10, 2023
a45b546
Updated plasma flower name
Momo8289 Jun 10, 2023
835e5fb
Updated desc
Momo8289 Jun 10, 2023
e56760b
Forgot to update var name
Momo8289 Jun 10, 2023
73b70a6
Added new butterfly to be spawned by the core
Momo8289 Jun 11, 2023
443ea54
The core now spawns the butterflied while active
Momo8289 Jun 11, 2023
8113921
Updated sprite for plasma flower
Momo8289 Jun 11, 2023
055515a
updated icon
Momo8289 Jun 11, 2023
0688603
child_despawned is now called on destroy
Momo8289 Jun 11, 2023
8c418aa
reduced the number of butterflies
Momo8289 Jun 11, 2023
1d6c3da
Added pollen effect
Momo8289 Jun 11, 2023
6c11964
Will not spawn when over/at cap
Momo8289 Jun 11, 2023
198905c
Merge branch 'master' into plasma-flower
Momo8289 Jun 11, 2023
a1ccc84
checks for source before calling child_despawned
Momo8289 Jun 11, 2023
6e82944
now cleans up properly
Momo8289 Jun 11, 2023
751d72b
Fixed cleanup again
Momo8289 Jun 11, 2023
1abcfa7
Merge branch 'master' into plasma-flower
Momo8289 Jun 11, 2023
080d525
Butterflies now fade away when they despawn
Momo8289 Jun 11, 2023
3cd09bb
Minor code fixes
Momo8289 Jun 11, 2023
fb0f883
butterflies now use DEL_ON_DEATH
Momo8289 Jun 11, 2023
01dfb9e
Added signal for when a mob spawner spawns a mob
Momo8289 Jun 12, 2023
f07b069
The mod core now uses /datum/component/spawner
Momo8289 Jun 12, 2023
e3c2658
Butterflies are now properly deleted
Momo8289 Jun 12, 2023
b118840
Butterfly documentation
Momo8289 Jun 12, 2023
6347095
Merge branch 'master' into plasma-flower
Momo8289 Jun 12, 2023
a067cee
removed a var used for debugging
Momo8289 Jun 12, 2023
d69ef84
Added flower trail while suit is active
Momo8289 Jun 12, 2023
426d0ba
Merge branch 'master' into plasma-flower
Momo8289 Jun 12, 2023
242d6c3
Minor code refactors and documentation
Momo8289 Jun 14, 2023
643a100
Removed unused var
Momo8289 Jun 14, 2023
92c771b
Minor code fixes
Momo8289 Jun 14, 2023
db2d450
comments
Momo8289 Jun 14, 2023
0a2cf0e
Code cleanup
Momo8289 Jun 14, 2023
06976a4
Update code/modules/mob/living/basic/vermin/butterfly.dm
Momo8289 Jun 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
115 changes: 82 additions & 33 deletions _maps/RandomRuins/LavaRuins/lavaland_surface_gaia.dmm
Expand Up @@ -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,
Expand All @@ -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"
Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -128,7 +177,7 @@ a
w
w
c
b
N
c
b
c
Expand Down Expand Up @@ -165,7 +214,7 @@ c
d
c
i
d
T
C
n
c
Expand Down Expand Up @@ -200,9 +249,9 @@ g
d
c
c
c
E
v
d
T
c
c
h
Expand Down Expand Up @@ -236,9 +285,9 @@ d
c
n
c
b
N
B
c
n
d
m
d
Expand All @@ -256,7 +305,7 @@ d
c
d
h
c
o
f
j
c
Expand All @@ -267,55 +316,55 @@ 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) = {"
w
d
e
i
n
o
d
c
t
c
c
x
V
I
n
c
I
c
q
c
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) = {"
Expand All @@ -328,7 +377,7 @@ d
b
c
c
n
o
c
c
b
Expand All @@ -345,9 +394,9 @@ n
c
c
b
c
I
b
c
j
h
i
C
Expand All @@ -362,7 +411,7 @@ l
j
c
n
c
I
c
g
c
Expand All @@ -382,7 +431,7 @@ c
c
g
c
c
I
c
n
c
Expand Down Expand Up @@ -417,7 +466,7 @@ c
b
n
c
c
I
j
g
c
Expand Down
3 changes: 3 additions & 0 deletions 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"
2 changes: 2 additions & 0 deletions code/datums/components/spawner.dm
Expand Up @@ -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
Expand Down
49 changes: 49 additions & 0 deletions code/modules/mob/living/basic/vermin/butterfly.dm
Expand Up @@ -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)
Momo8289 marked this conversation as resolved.
Show resolved Hide resolved
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()
Momo8289 marked this conversation as resolved.
Show resolved Hide resolved
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()
Momo8289 marked this conversation as resolved.
Show resolved Hide resolved
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...")
29 changes: 29 additions & 0 deletions code/modules/mod/mod_construction.dm
Expand Up @@ -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 <b>wires</b> 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."
Expand Down