mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-08 22:50:51 +01:00
00ccf0c6b5
# Conflicts: # .github/CODEOWNERS # .github/workflows/compile_changelogs.yml # .github/workflows/stale.yml # SQL/database_changelog.md # _maps/map_files/CatwalkStation/CatwalkStation_2023.dmm # code/__DEFINES/atom_hud.dm # code/__DEFINES/inventory.dm # code/__DEFINES/mobs.dm # code/__DEFINES/species_clothing_paths.dm # code/__DEFINES/subsystems.dm # code/__DEFINES/surgery.dm # code/__HELPERS/global_lists.dm # code/_globalvars/lists/maintenance_loot.dm # code/_globalvars/traits/_traits.dm # code/controllers/subsystem/minor_mapping.dm # code/controllers/subsystem/processing/quirks.dm # code/controllers/subsystem/shuttle.dm # code/datums/components/palette.dm # code/datums/components/surgery_initiator.dm # code/datums/diseases/advance/advance.dm # code/datums/hud.dm # code/datums/mood.dm # code/datums/mutations/chameleon.dm # code/datums/quirks/negative_quirks/nyctophobia.dm # code/datums/status_effects/debuffs/debuffs.dm # code/datums/status_effects/debuffs/drunk.dm # code/datums/status_effects/debuffs/slime/slime_leech.dm # code/datums/weather/weather.dm # code/game/data_huds.dm # code/game/objects/items.dm # code/game/objects/items/devices/scanners/health_analyzer.dm # code/game/objects/items/frog_statue.dm # code/game/objects/items/rcd/RLD.dm # code/game/objects/items/robot/items/hypo.dm # code/game/objects/items/stacks/medical.dm # code/game/objects/items/stacks/wrap.dm # code/game/objects/items/storage/garment.dm # code/game/objects/items/tools/medical/defib.dm # code/game/objects/items/weaponry.dm # code/game/objects/items/weaponry/melee/misc.dm # code/game/objects/structures/crates_lockers/closets/secure/security.dm # code/game/objects/structures/curtains.dm # code/game/objects/structures/dresser.dm # code/game/objects/structures/girders.dm # code/game/objects/structures/maintenance.dm # code/game/objects/structures/mirror.dm # code/modules/admin/greyscale_modify_menu.dm # code/modules/admin/verbs/light_debug.dm # code/modules/antagonists/ashwalker/ashwalker.dm # code/modules/antagonists/heretic/knowledge/starting_lore.dm # code/modules/antagonists/ninja/ninjaDrainAct.dm # code/modules/art/paintings.dm # code/modules/client/preferences.dm # code/modules/client/verbs/ooc.dm # code/modules/clothing/head/wig.dm # code/modules/events/disease_outbreak.dm # code/modules/holodeck/holo_effect.dm # code/modules/jobs/job_types/head_of_security.dm # code/modules/jobs/job_types/security_officer.dm # code/modules/library/skill_learning/generic_skillchips/point.dm # code/modules/mining/lavaland/ash_flora.dm # code/modules/mining/lavaland/mining_loot/megafauna/ash_drake.dm # code/modules/mob/dead/new_player/new_player.dm # code/modules/mob/living/basic/guardian/guardian.dm # code/modules/mob/living/basic/space_fauna/space_dragon/space_dragon.dm # code/modules/mob/living/carbon/carbon.dm # code/modules/mob/living/carbon/human/human.dm # code/modules/mob/living/carbon/human/human_defines.dm # code/modules/mob/living/carbon/life.dm # code/modules/mob/living/living.dm # code/modules/mob/living/living_defines.dm # code/modules/mob/mob.dm # code/modules/mob_spawn/ghost_roles/mining_roles.dm # code/modules/mod/mod_control.dm # code/modules/mod/modules/modules_general.dm # code/modules/modular_computers/computers/item/computer_ui.dm # code/modules/paperwork/paper.dm # code/modules/paperwork/paperbin.dm # code/modules/power/lighting/light.dm # code/modules/projectiles/guns/energy/kinetic_accelerator.dm # code/modules/projectiles/projectile.dm # code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm # code/modules/reagents/chemistry/reagents/food_reagents.dm # code/modules/reagents/chemistry/reagents/other_reagents.dm # code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm # code/modules/research/xenobiology/crossbreeding/_clothing.dm # code/modules/research/xenobiology/crossbreeding/prismatic.dm # code/modules/surgery/advanced/brainwashing.dm # code/modules/surgery/advanced/lobotomy.dm # code/modules/surgery/amputation.dm # code/modules/surgery/blood_filter.dm # code/modules/surgery/bodyparts/_bodyparts.dm # code/modules/surgery/brain_surgery.dm # code/modules/surgery/cavity_implant.dm # code/modules/surgery/coronary_bypass.dm # code/modules/surgery/gastrectomy.dm # code/modules/surgery/healing.dm # code/modules/surgery/limb_augmentation.dm # code/modules/surgery/organ_manipulation.dm # code/modules/surgery/revival.dm # code/modules/surgery/sleeper_protocol.dm # code/modules/surgery/surgery_helpers.dm # code/modules/surgery/surgery_step.dm # code/modules/unit_tests/_unit_tests.dm # code/modules/unit_tests/designs.dm # code/modules/unit_tests/icon_state_worn.dm # code/modules/unit_tests/screenshots/screenshot_antag_icons_cultist.png # code/modules/unit_tests/screenshots/screenshot_antag_icons_headrevolutionary.png # code/modules/unit_tests/screenshots/screenshot_antag_icons_provocateur.png # code/modules/unit_tests/screenshots/screenshot_husk_body.png # code/modules/unit_tests/screenshots/screenshot_husk_body_missing_limbs.png # icons/map_icons/clothing/head/_head.dmi # icons/map_icons/clothing/shoes.dmi # icons/map_icons/items/_item.dmi # icons/mob/huds/hud.dmi # icons/mob/inhands/64x64_lefthand.dmi # icons/mob/inhands/64x64_righthand.dmi # icons/obj/machines/computer.dmi # tgui/packages/tgui/interfaces/OperatingComputer.jsx # tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferences/MainPage.tsx # tgui/packages/tgui/interfaces/PreferencesMenu/types.ts # tgui/packages/tgui/interfaces/SurgeryInitiator.tsx # tools/icon_cutter/check.py
130 lines
3.7 KiB
Plaintext
130 lines
3.7 KiB
Plaintext
//Dead mobs can exist whenever. This is needful
|
|
|
|
INITIALIZE_IMMEDIATE(/mob/dead)
|
|
|
|
/mob/dead
|
|
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
|
move_resist = INFINITY
|
|
interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_MOUSEDROP_IGNORE_CHECKS
|
|
throwforce = 0
|
|
|
|
/mob/dead/Initialize(mapload)
|
|
SHOULD_CALL_PARENT(FALSE)
|
|
if(flags_1 & INITIALIZED_1)
|
|
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
|
flags_1 |= INITIALIZED_1
|
|
if(LAZYLEN(faction))
|
|
faction = string_list(faction)
|
|
// Initial is non standard here, but ghosts move before they get here so it's needed. this is a cold path too so it's ok
|
|
SET_PLANE_IMPLICIT(src, initial(plane))
|
|
add_to_mob_list()
|
|
|
|
prepare_huds()
|
|
|
|
if(length(CONFIG_GET(keyed_list/cross_server)))
|
|
add_verb(src, /mob/dead/proc/server_hop)
|
|
set_focus(src)
|
|
become_hearing_sensitive()
|
|
log_mob_tag("TAG: [tag] CREATED: [key_name(src)] \[[src.type]\]")
|
|
return INITIALIZE_HINT_NORMAL
|
|
|
|
/mob/dead/canUseStorage()
|
|
return FALSE
|
|
|
|
/mob/dead/get_status_tab_items() // BUBBER ADDITION START - /tg/ removed this in #90572, but we still use a custom lobby screen
|
|
. = ..()
|
|
if(SSticker.HasRoundStarted())
|
|
return
|
|
var/time_remaining = SSticker.GetTimeLeft()
|
|
if(time_remaining > 0)
|
|
. += "Time To Start: [round(time_remaining/10)]s"
|
|
else if(time_remaining == -10)
|
|
. += "Time To Start: DELAYED"
|
|
else
|
|
. += "Time To Start: SOON"
|
|
|
|
. += "Players: [LAZYLEN(GLOB.clients)]"
|
|
. += "Players Ready: [SSticker.totalPlayersReady]"
|
|
if(client.holder)
|
|
. += "Admins Ready: [SSticker.total_admins_ready] / [length(GLOB.admins)]" // BUBBER ADDITION END - /tg/ removed this in #90572, but we still use a custom lobby screen
|
|
|
|
#define SERVER_HOPPER_TRAIT "server_hopper"
|
|
|
|
/mob/dead/proc/server_hop()
|
|
set category = "OOC"
|
|
set name = "Server Hop"
|
|
set desc= "Jump to the other server"
|
|
if(HAS_TRAIT(src, TRAIT_NO_TRANSFORM)) // in case the round is ending and a cinematic is already playing we don't wanna clash with that (yes i know)
|
|
return
|
|
var/list/our_id = CONFIG_GET(string/cross_comms_name)
|
|
var/list/csa = CONFIG_GET(keyed_list/cross_server) - our_id
|
|
var/pick
|
|
switch(length(csa))
|
|
if(0)
|
|
remove_verb(src, /mob/dead/proc/server_hop)
|
|
to_chat(src, span_notice("Server Hop has been disabled."))
|
|
if(1)
|
|
pick = csa[1]
|
|
else
|
|
pick = tgui_input_list(src, "Server to jump to", "Server Hop", csa)
|
|
|
|
if(isnull(pick))
|
|
return
|
|
|
|
var/addr = csa[pick]
|
|
|
|
if(tgui_alert(usr, "Jump to server [pick] ([addr])?", "Server Hop", list("Yes", "No")) != "Yes")
|
|
return
|
|
|
|
var/client/hopper = client
|
|
to_chat(hopper, span_notice("Sending you to [pick]."))
|
|
var/atom/movable/screen/splash/fade_in = new(null, null, hopper, FALSE)
|
|
fade_in.fade(FALSE)
|
|
|
|
ADD_TRAIT(src, TRAIT_NO_TRANSFORM, SERVER_HOPPER_TRAIT)
|
|
sleep(2.9 SECONDS) //let the animation play
|
|
REMOVE_TRAIT(src, TRAIT_NO_TRANSFORM, SERVER_HOPPER_TRAIT)
|
|
|
|
if(!hopper)
|
|
return
|
|
|
|
winset(src, null, "command=.options") //other wise the user never knows if byond is downloading resources
|
|
|
|
hopper << link("[addr]")
|
|
|
|
#undef SERVER_HOPPER_TRAIT
|
|
|
|
/**
|
|
* updates the Z level for dead players
|
|
* If they don't have a new z, we'll keep the old one, preventing bugs from ghosting and re-entering, among others
|
|
*/
|
|
/mob/dead/proc/update_z(new_z)
|
|
if(registered_z == new_z)
|
|
return
|
|
if(registered_z)
|
|
SSmobs.dead_players_by_zlevel[registered_z] -= src
|
|
if(isnull(client))
|
|
registered_z = null
|
|
return
|
|
registered_z = new_z
|
|
SSmobs.dead_players_by_zlevel[new_z] += src
|
|
|
|
/mob/dead/Login()
|
|
. = ..()
|
|
if(!. || !client)
|
|
return FALSE
|
|
var/turf/T = get_turf(src)
|
|
if (isturf(T))
|
|
update_z(T.z)
|
|
|
|
/mob/dead/auto_deadmin_on_login()
|
|
return
|
|
|
|
/mob/dead/Logout()
|
|
update_z(null)
|
|
return ..()
|
|
|
|
/mob/dead/on_changed_z_level(turf/old_turf, turf/new_turf, same_z_layer, notify_contents)
|
|
..()
|
|
update_z(new_turf?.z)
|