mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-28 10:01:58 +00:00
## About The Pull Request <details> - renamed ai folder to announcer -- announcer -- - moved vox_fem to announcer - moved approachingTG to announcer - separated the ambience folder into ambience and instrumental -- ambience -- - created holy folder moved all related sounds there - created engineering folder and moved all related sounds there - created security folder and moved ambidet there - created general folder and moved ambigen there - created icemoon folder and moved all icebox-related ambience there - created medical folder and moved all medbay-related ambi there - created ruin folder and moves all ruins ambi there - created beach folder and moved seag and shore there - created lavaland folder and moved related ambi there - created aurora_caelus folder and placed its ambi there - created misc folder and moved the rest of the files that don't have a specific category into it -- instrumental -- - moved traitor folder here - created lobby_music folder and placed our songs there (title0 not used anywhere? - server-side modification?) -- items -- - moved secdeath to hailer - moved surgery to handling -- effects -- - moved chemistry into effects - moved hallucinations into effects - moved health into effects - moved magic into effects -- vehicles -- - moved mecha into vehicles created mobs folder -- mobs -- - moved creatures folder into mobs - moved voice into mobs renamed creatures to non-humanoids renamed voice to humanoids -- non-humanoids-- created cyborg folder created hiss folder moved harmalarm.ogg to cyborg -- humanoids -- -- misc -- moved ghostwhisper to misc moved insane_low_laugh to misc I give up trying to document this. </details> - [X] ambience - [x] announcer - [x] effects - [X] instrumental - [x] items - [x] machines - [x] misc - [X] mobs - [X] runtime - [X] vehicles - [ ] attributions ## Why It's Good For The Game This folder is so disorganized that it's vomit inducing, will make it easier to find and add new sounds, providng a minor structure to the sound folder. ## Changelog 🆑 grungussuss refactor: the sound folder in the source code has been reorganized, please report any oddities with sounds playing or not playing server: lobby music has been repathed to sound/music/lobby_music /🆑
98 lines
2.8 KiB
Plaintext
98 lines
2.8 KiB
Plaintext
/obj/structure/life_candle
|
|
name = "life candle"
|
|
desc = "You are dead. Insert quarter to continue."
|
|
icon = 'icons/obj/candle.dmi'
|
|
icon_state = "candle1"
|
|
light_color = LIGHT_COLOR_FIRE
|
|
|
|
var/icon_state_active = "candle1_lit"
|
|
var/icon_state_inactive = "candle1"
|
|
|
|
anchored = TRUE
|
|
|
|
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
|
|
|
var/lit_luminosity = 2
|
|
var/list/datum/mind/linked_minds = list()
|
|
|
|
// If the body is destroyed, what do we spawn for them
|
|
var/mob_type = /mob/living/carbon/human
|
|
|
|
// If the respawned person is given a specific outfit
|
|
var/datum/outfit/outfit
|
|
// How long until we respawn them after their death.
|
|
var/respawn_time = 50
|
|
var/respawn_sound = 'sound/effects/magic/staff_animation.ogg'
|
|
|
|
/obj/structure/life_candle/Initialize(mapload)
|
|
. = ..()
|
|
AddElement(/datum/element/movetype_handler)
|
|
|
|
/obj/structure/life_candle/attack_hand(mob/user, list/modifiers)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
if(!user.mind)
|
|
return
|
|
if(user.mind in linked_minds)
|
|
user.visible_message(span_notice("[user] reaches out and pinches the flame of [src]."), span_warning("You sever the connection between yourself and [src]."))
|
|
linked_minds -= user.mind
|
|
if(!linked_minds.len)
|
|
REMOVE_TRAIT(src, TRAIT_MOVE_FLOATING, LIFECANDLE_TRAIT)
|
|
else
|
|
if(!linked_minds.len)
|
|
ADD_TRAIT(src, TRAIT_MOVE_FLOATING, LIFECANDLE_TRAIT)
|
|
user.visible_message(span_notice("[user] touches [src]. It seems to respond to [user.p_their()] presence!"), span_warning("You create a connection between you and [src]."))
|
|
linked_minds |= user.mind
|
|
|
|
update_appearance()
|
|
if(linked_minds.len)
|
|
START_PROCESSING(SSobj, src)
|
|
set_light(lit_luminosity)
|
|
else
|
|
STOP_PROCESSING(SSobj, src)
|
|
set_light(0)
|
|
|
|
/obj/structure/life_candle/update_icon_state()
|
|
icon_state = linked_minds.len ? icon_state_active : icon_state_inactive
|
|
return ..()
|
|
|
|
/obj/structure/life_candle/examine(mob/user)
|
|
. = ..()
|
|
if(linked_minds.len)
|
|
. += "[src] is active, and linked to [linked_minds.len] souls."
|
|
else
|
|
. += "It is static, still, unmoving."
|
|
|
|
/obj/structure/life_candle/process()
|
|
if(!linked_minds.len)
|
|
STOP_PROCESSING(SSobj, src)
|
|
return
|
|
|
|
for(var/m in linked_minds)
|
|
var/datum/mind/mind = m
|
|
if(!mind.current || (mind.current && mind.current.stat == DEAD))
|
|
addtimer(CALLBACK(src, PROC_REF(respawn), mind), respawn_time, TIMER_UNIQUE)
|
|
|
|
/obj/structure/life_candle/proc/respawn(datum/mind/mind)
|
|
var/turf/T = get_turf(src)
|
|
var/mob/living/body
|
|
if(mind.current)
|
|
if(mind.current.stat != DEAD)
|
|
return
|
|
else
|
|
body = mind.current
|
|
if(!body)
|
|
body = new mob_type(T)
|
|
var/mob/ghostie = mind.get_ghost(TRUE)
|
|
ghostie.client?.prefs?.safe_transfer_prefs_to(body)
|
|
mind.transfer_to(body)
|
|
else
|
|
body.forceMove(T)
|
|
body.revive(ADMIN_HEAL_ALL, force_grab_ghost = TRUE)
|
|
body.flash_act()
|
|
|
|
if(ishuman(body) && istype(outfit))
|
|
outfit.equip(body)
|
|
playsound(T, respawn_sound, 50, TRUE)
|