mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 13:05:36 +01:00
Plasma flower MOD core from the lavaland patch of eden ruin (#75959)
This PR gives a small update to the patch of eden lavaland ruin, and adds a new item that can be used as an upgrade to the plasma mod core. The idea around this item is that it's a flower that has absorbed all the plasma and bad-vibes in the small area around the ruin, leaving an area full of plants, and a flower full of energy. This flower can be taken from the oasis and turned into a functional MOD core using some wires. As a MOD core, it is the same as the plasma mod core, but has a higher energy capacity, being equivalent to a super power cell. It also gives you a cool pollen effect, and spawns butterflies around you while your suit is active. These butterflies disappear when they get too far away, or if the suit deactivates. They also don't leave corpses, so they shouldn't cause too much clutter.
This commit is contained in:
@@ -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...")
|
||||
|
||||
Reference in New Issue
Block a user