mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-31 07:58:22 +01:00
Fix ghost role free slot spawns (#18653)
* cameron, stop breaking shit while I'm on a business trip * . * legacy var * - * . * clean that up * , * Fixes * oops --------- Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
@@ -11,8 +11,6 @@
|
||||
|
||||
#ignore misc BYOND files
|
||||
Thumbs.db
|
||||
vchat.db
|
||||
vchat.db*
|
||||
*.log
|
||||
*.before
|
||||
*.pyc
|
||||
|
||||
@@ -85,6 +85,9 @@ GLOBAL_VAR_INIT(allowed_ghost_spawns, 2)
|
||||
if("lost_drone_spawn")
|
||||
join_lost(ui.user)
|
||||
. = TRUE
|
||||
if("maintenance_critter")
|
||||
join_maintrcritter(ui.user)
|
||||
. = TRUE
|
||||
if("gravekeeper_spawn")
|
||||
join_grave(ui.user)
|
||||
. = TRUE
|
||||
|
||||
@@ -209,7 +209,6 @@
|
||||
|
||||
gem.catch_mob(user) //This will result in us being deleted so...
|
||||
|
||||
|
||||
/datum/tgui_module/ghost_spawn_menu/proc/vore_belly_spawn(mob/observer/dead/user, selected_player)
|
||||
var/mob/living/target = locate(selected_player) in GLOB.player_list
|
||||
|
||||
@@ -262,6 +261,25 @@
|
||||
var/obj/structure/ghost_pod/manual/lost_drone/dogborg/lost = new(get_turf(spawnspot))
|
||||
lost.create_occupant(user)
|
||||
|
||||
/datum/tgui_module/ghost_spawn_menu/proc/join_maintrcritter(mob/observer/dead/user)
|
||||
if(jobban_isbanned(user, JOB_GHOSTROLES))
|
||||
to_chat(user, span_danger("You are banned from playing ghost roles and cannot spawn as a maint critter."))
|
||||
return
|
||||
|
||||
if(GLOB.allowed_ghost_spawns <= 0)
|
||||
to_chat(user, span_warning("There're no free ghost join slots."))
|
||||
return
|
||||
|
||||
var/obj/effect/landmark/spawnspot = get_ghost_role_spawn()
|
||||
if(!spawnspot)
|
||||
to_chat(user, span_warning("No spawnpoint available."))
|
||||
return
|
||||
|
||||
GLOB.allowed_ghost_spawns--
|
||||
announce_ghost_joinleave(user, 0, "They are now a maint critter.")
|
||||
var/obj/structure/ghost_pod/ghost_activated/unified_hole/maint_critter = new(get_turf(spawnspot))
|
||||
maint_critter.create_occupant(user)
|
||||
|
||||
/datum/tgui_module/ghost_spawn_menu/proc/join_grave(mob/observer/dead/user)
|
||||
if(jobban_isbanned(user, JOB_CYBORG))
|
||||
to_chat(user, span_danger("You are banned from playing synthetics and cannot spawn as a gravekeeper."))
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
anchored = TRUE
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
spawn_active = TRUE
|
||||
var/announce_prob = 35
|
||||
|
||||
/obj/structure/ghost_pod/ghost_activated/maintpred/create_occupant(var/mob/M)
|
||||
..()
|
||||
@@ -65,9 +64,6 @@
|
||||
newPred.vore_selected = newPred.vore_organs[1]
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/ghost_pod/ghost_activated/maintpred/no_announce
|
||||
announce_prob = 0
|
||||
|
||||
/obj/structure/ghost_pod/ghost_activated/morphspawn
|
||||
name = "weird goo"
|
||||
desc = "A pile of weird gunk... Wait, is it actually moving?"
|
||||
@@ -78,7 +74,6 @@
|
||||
anchored = TRUE
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
spawn_active = TRUE
|
||||
var/announce_prob = 50
|
||||
|
||||
/obj/structure/ghost_pod/ghost_activated/morphspawn/create_occupant(var/mob/M)
|
||||
..()
|
||||
@@ -109,13 +104,9 @@
|
||||
newMorph.vore_selected = newMorph.vore_organs[1]
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/ghost_pod/ghost_activated/morphspawn/no_announce
|
||||
announce_prob = 0
|
||||
|
||||
/obj/structure/ghost_pod/ghost_activated/maintpred/redgate //For ghostpods placed in the redgate that aren't spawned via an event
|
||||
name = "creature hole"
|
||||
desc = "Looks like some creature dug is hiding in the redgate..."
|
||||
announce_prob = 0
|
||||
icon_state = "redgate_hole"
|
||||
icon_state_opened = "redgate_hole"
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
spawn_active = TRUE
|
||||
var/redgate_restricted = FALSE
|
||||
|
||||
/obj/structure/ghost_pod/ghost_activated/unified_hole/create_occupant(mob/observer/dead/user)
|
||||
attack_ghost(user)
|
||||
|
||||
//override the standard attack_ghost proc for custom messages
|
||||
/obj/structure/ghost_pod/ghost_activated/unified_hole/attack_ghost(var/mob/observer/dead/user)
|
||||
var/choice
|
||||
@@ -20,7 +23,7 @@
|
||||
|
||||
//No OOC notes/FT
|
||||
if(not_has_ooc_text(user))
|
||||
//to_chat(user, span_warning("You must have proper out-of-character notes and flavor text configured for your current character slot to use this spawnpoint."))
|
||||
to_chat(user, span_warning("You must have proper out-of-character notes and flavor text configured for your current character slot to use this spawnpoint."))
|
||||
return
|
||||
|
||||
if(redgate_restricted)
|
||||
@@ -28,19 +31,21 @@
|
||||
else
|
||||
choice = tgui_alert(user, "Which type of critter do you wish to spawn as?", "Critter Spawner", list("Mob", "Morph", "Lurker", "Cancel"))
|
||||
|
||||
|
||||
if(choice == "Mob")
|
||||
create_simplemob(user)
|
||||
else if(choice == "Morph")
|
||||
create_morph(user)
|
||||
else if(choice == "Lurker")
|
||||
if(!is_alien_whitelisted(user.client, GLOB.all_species[user.client.prefs.species]))
|
||||
to_chat(user, span_warning("You cannot use this spawnpoint to spawn as a species you are not whitelisted for!"))
|
||||
switch(choice)
|
||||
if(null, "Cancel")
|
||||
return
|
||||
else
|
||||
if("Mob")
|
||||
create_simplemob(user)
|
||||
if("Morph")
|
||||
create_morph(user)
|
||||
if("Lurker")
|
||||
if(!is_alien_whitelisted(user.client, GLOB.all_species[user.client.prefs.species]))
|
||||
to_chat(user, span_warning("You cannot use this spawnpoint to spawn as a species you are not whitelisted for!"))
|
||||
return
|
||||
create_lurker(user)
|
||||
else if(choice == "Cancel")
|
||||
return
|
||||
used = TRUE
|
||||
icon_state = icon_state_opened
|
||||
GLOB.active_ghost_pods -= src
|
||||
|
||||
/obj/structure/ghost_pod/ghost_activated/unified_hole/proc/create_simplemob(var/mob/M)
|
||||
var/choice
|
||||
@@ -155,8 +160,8 @@
|
||||
GLOB.active_ghost_pods += src
|
||||
|
||||
/obj/structure/ghost_pod/ghost_activated/unified_hole/Destroy()
|
||||
. = ..()
|
||||
GLOB.active_ghost_pods -= src
|
||||
. = ..()
|
||||
|
||||
/obj/structure/ghost_pod/ghost_activated/unified_hole/redgate
|
||||
name = "Redspace inhabitant hole"
|
||||
|
||||
@@ -58,12 +58,12 @@ export const GhostJoin = (props: { all_ghost_join_options: GhostJoinData }) => {
|
||||
'lost_drone_spawn',
|
||||
);
|
||||
specialRoles[2] = describeSpecialData(
|
||||
'Maint Pred',
|
||||
'Maintenance Critter',
|
||||
!!ghost_banned,
|
||||
remaining_ghost_roles,
|
||||
!!existing_ghost_spawnpoints,
|
||||
special_role_respawn,
|
||||
'maintpred_spawn',
|
||||
'maintenance_critter',
|
||||
);
|
||||
specialRoles[3] = describeSpecialData(
|
||||
'Gravekeeper Drone',
|
||||
@@ -73,14 +73,6 @@ export const GhostJoin = (props: { all_ghost_join_options: GhostJoinData }) => {
|
||||
special_role_respawn,
|
||||
'gravekeeper_spawn',
|
||||
);
|
||||
specialRoles[4] = describeSpecialData(
|
||||
'Morph',
|
||||
!!ghost_banned,
|
||||
remaining_ghost_roles,
|
||||
!!existing_ghost_spawnpoints,
|
||||
special_role_respawn,
|
||||
'morph_spawn',
|
||||
);
|
||||
|
||||
const playerDropdown = Object.entries(drone_data.fabricators).map((entry) => {
|
||||
return { displayText: entry[1], value: entry[0] };
|
||||
|
||||
Reference in New Issue
Block a user