mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 10:01:40 +00:00
Revert "Makes game start smoother (#23552)"
This reverts commit 3ab308aa0f.
This commit is contained in:
@@ -186,17 +186,15 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
//Generalised helper proc for letting mobs rename themselves. Used to be clname() and ainame()
|
//Generalised helper proc for letting mobs rename themselves. Used to be clname() and ainame()
|
||||||
/mob/proc/rename_self(role, client/C)
|
/mob/proc/rename_self(role)
|
||||||
if(!C)
|
|
||||||
C = client
|
|
||||||
var/oldname = real_name
|
var/oldname = real_name
|
||||||
var/newname
|
var/newname
|
||||||
var/loop = 1
|
var/loop = 1
|
||||||
var/safety = 0
|
var/safety = 0
|
||||||
|
|
||||||
while(loop && safety < 5)
|
while(loop && safety < 5)
|
||||||
if(C && C.prefs.custom_names[role] && !safety)
|
if(client && client.prefs.custom_names[role] && !safety)
|
||||||
newname = C.prefs.custom_names[role]
|
newname = client.prefs.custom_names[role]
|
||||||
else
|
else
|
||||||
switch(role)
|
switch(role)
|
||||||
if("clown")
|
if("clown")
|
||||||
|
|||||||
@@ -357,15 +357,7 @@ var/datum/subsystem/job/SSjob
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
//Gives the player the stuff he should have with his rank
|
//Gives the player the stuff he should have with his rank
|
||||||
/datum/subsystem/job/proc/EquipRank(mob/M, rank, joined_late=0)
|
/datum/subsystem/job/proc/EquipRank(mob/living/H, rank, joined_late=0)
|
||||||
var/mob/new_player/N
|
|
||||||
var/mob/living/H
|
|
||||||
if(!joined_late)
|
|
||||||
N = M
|
|
||||||
H = N.new_character
|
|
||||||
else
|
|
||||||
H = M
|
|
||||||
|
|
||||||
var/datum/job/job = GetJob(rank)
|
var/datum/job/job = GetJob(rank)
|
||||||
|
|
||||||
H.job = rank
|
H.job = rank
|
||||||
@@ -407,16 +399,16 @@ var/datum/subsystem/job/SSjob
|
|||||||
if(ismob(new_mob))
|
if(ismob(new_mob))
|
||||||
H = new_mob
|
H = new_mob
|
||||||
|
|
||||||
M << "<b>You are the [rank].</b>"
|
H << "<b>You are the [rank].</b>"
|
||||||
M << "<b>As the [rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>"
|
H << "<b>As the [rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>"
|
||||||
M << "<b>To speak on your departments radio, use the :h button. To see others, look closely at your headset.</b>"
|
H << "<b>To speak on your departments radio, use the :h button. To see others, look closely at your headset.</b>"
|
||||||
if(job.req_admin_notify)
|
if(job.req_admin_notify)
|
||||||
M << "<b>You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.</b>"
|
H << "<b>You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.</b>"
|
||||||
if(config.minimal_access_threshold)
|
if(config.minimal_access_threshold)
|
||||||
M << "<FONT color='blue'><B>As this station was initially staffed with a [config.jobs_have_minimal_access ? "full crew, only your job's necessities" : "skeleton crew, additional access may"] have been added to your ID card.</B></font>"
|
H << "<FONT color='blue'><B>As this station was initially staffed with a [config.jobs_have_minimal_access ? "full crew, only your job's necessities" : "skeleton crew, additional access may"] have been added to your ID card.</B></font>"
|
||||||
|
|
||||||
if(job && H)
|
if(job && H)
|
||||||
job.after_spawn(H, M)
|
job.after_spawn(H)
|
||||||
|
|
||||||
return H
|
return H
|
||||||
|
|
||||||
|
|||||||
@@ -127,8 +127,6 @@ var/datum/subsystem/ticker/ticker
|
|||||||
declare_completion(force_ending)
|
declare_completion(force_ending)
|
||||||
|
|
||||||
/datum/subsystem/ticker/proc/setup()
|
/datum/subsystem/ticker/proc/setup()
|
||||||
world << "<span class='boldannounce'>Starting game...</span>"
|
|
||||||
var/init_start = world.timeofday
|
|
||||||
//Create and announce mode
|
//Create and announce mode
|
||||||
var/list/datum/game_mode/runnable_modes
|
var/list/datum/game_mode/runnable_modes
|
||||||
if(master_mode == "random" || master_mode == "secret")
|
if(master_mode == "random" || master_mode == "secret")
|
||||||
@@ -158,13 +156,10 @@ var/datum/subsystem/ticker/ticker
|
|||||||
SSjob.ResetOccupations()
|
SSjob.ResetOccupations()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
CHECK_TICK
|
|
||||||
//Configure mode and assign player to special mode stuff
|
//Configure mode and assign player to special mode stuff
|
||||||
var/can_continue = 0
|
var/can_continue = 0
|
||||||
can_continue = src.mode.pre_setup() //Choose antagonists
|
can_continue = src.mode.pre_setup() //Choose antagonists
|
||||||
CHECK_TICK
|
|
||||||
SSjob.DivideOccupations() //Distribute jobs
|
SSjob.DivideOccupations() //Distribute jobs
|
||||||
CHECK_TICK
|
|
||||||
|
|
||||||
if(!Debug2)
|
if(!Debug2)
|
||||||
if(!can_continue)
|
if(!can_continue)
|
||||||
@@ -176,7 +171,6 @@ var/datum/subsystem/ticker/ticker
|
|||||||
else
|
else
|
||||||
message_admins("<span class='notice'>DEBUG: Bypassing prestart checks...</span>")
|
message_admins("<span class='notice'>DEBUG: Bypassing prestart checks...</span>")
|
||||||
|
|
||||||
CHECK_TICK
|
|
||||||
if(hide_mode)
|
if(hide_mode)
|
||||||
var/list/modes = new
|
var/list/modes = new
|
||||||
for (var/datum/game_mode/M in runnable_modes)
|
for (var/datum/game_mode/M in runnable_modes)
|
||||||
@@ -187,28 +181,18 @@ var/datum/subsystem/ticker/ticker
|
|||||||
else
|
else
|
||||||
mode.announce()
|
mode.announce()
|
||||||
|
|
||||||
CHECK_TICK
|
|
||||||
current_state = GAME_STATE_PLAYING
|
current_state = GAME_STATE_PLAYING
|
||||||
if(!config.ooc_during_round)
|
if(!config.ooc_during_round)
|
||||||
toggle_ooc(0) // Turn it off
|
toggle_ooc(0) // Turn it off
|
||||||
round_start_time = world.time
|
round_start_time = world.time
|
||||||
|
|
||||||
CHECK_TICK
|
|
||||||
start_landmarks_list = shuffle(start_landmarks_list) //Shuffle the order of spawn points so they dont always predictably spawn bottom-up and right-to-left
|
start_landmarks_list = shuffle(start_landmarks_list) //Shuffle the order of spawn points so they dont always predictably spawn bottom-up and right-to-left
|
||||||
create_characters() //Create player characters
|
create_characters() //Create player characters and transfer them
|
||||||
CHECK_TICK
|
|
||||||
collect_minds()
|
collect_minds()
|
||||||
CHECK_TICK
|
|
||||||
equip_characters()
|
equip_characters()
|
||||||
CHECK_TICK
|
|
||||||
data_core.manifest()
|
data_core.manifest()
|
||||||
CHECK_TICK
|
|
||||||
|
|
||||||
transfer_characters() //transfer keys to the new mobs
|
Master.RoundStart()
|
||||||
|
|
||||||
Master.RoundStart() //let the party begin...
|
|
||||||
|
|
||||||
log_world("Game start took [(world.timeofday - init_start)/10]s")
|
|
||||||
|
|
||||||
world << "<FONT color='blue'><B>Welcome to [station_name()], enjoy your stay!</B></FONT>"
|
world << "<FONT color='blue'><B>Welcome to [station_name()], enjoy your stay!</B></FONT>"
|
||||||
world << sound('sound/AI/welcome.ogg')
|
world << sound('sound/AI/welcome.ogg')
|
||||||
@@ -373,42 +357,34 @@ var/datum/subsystem/ticker/ticker
|
|||||||
joined_player_list += player.ckey
|
joined_player_list += player.ckey
|
||||||
if(player.mind.assigned_role=="AI")
|
if(player.mind.assigned_role=="AI")
|
||||||
player.close_spawn_windows()
|
player.close_spawn_windows()
|
||||||
player.AIize(FALSE)
|
player.AIize()
|
||||||
else
|
else
|
||||||
player.create_character(FALSE)
|
player.create_character()
|
||||||
|
qdel(player)
|
||||||
else
|
else
|
||||||
player.new_player_panel()
|
player.new_player_panel()
|
||||||
CHECK_TICK
|
|
||||||
|
|
||||||
|
|
||||||
/datum/subsystem/ticker/proc/collect_minds()
|
/datum/subsystem/ticker/proc/collect_minds()
|
||||||
for(var/mob/living/player in player_list)
|
for(var/mob/living/player in player_list)
|
||||||
if(player.mind)
|
if(player.mind)
|
||||||
ticker.minds += player.mind
|
ticker.minds += player.mind
|
||||||
CHECK_TICK
|
|
||||||
|
|
||||||
|
|
||||||
/datum/subsystem/ticker/proc/equip_characters()
|
/datum/subsystem/ticker/proc/equip_characters()
|
||||||
var/captainless=1
|
var/captainless=1
|
||||||
for(var/mob/new_player/N in player_list)
|
for(var/mob/living/carbon/human/player in player_list)
|
||||||
var/mob/living/carbon/human/player = N.new_character
|
if(player && player.mind && player.mind.assigned_role)
|
||||||
if(istype(player) && player.mind && player.mind.assigned_role && player.mind.assigned_role != "AI")
|
|
||||||
if(player.mind.assigned_role == "Captain")
|
if(player.mind.assigned_role == "Captain")
|
||||||
captainless=0
|
captainless=0
|
||||||
if(player.mind.assigned_role != player.mind.special_role)
|
if(player.mind.assigned_role != player.mind.special_role)
|
||||||
SSjob.EquipRank(N, player.mind.assigned_role, 0)
|
SSjob.EquipRank(player, player.mind.assigned_role, 0)
|
||||||
CHECK_TICK
|
|
||||||
if(captainless)
|
if(captainless)
|
||||||
for(var/mob/new_player/N in player_list)
|
for(var/mob/M in player_list)
|
||||||
if(N.new_character)
|
if(!isnewplayer(M))
|
||||||
N << "Captainship not forced on anyone."
|
M << "Captainship not forced on anyone."
|
||||||
CHECK_TICK
|
|
||||||
|
|
||||||
/datum/subsystem/ticker/proc/transfer_characters()
|
|
||||||
for(var/mob/new_player/player in player_list)
|
|
||||||
if(player.transfer_character())
|
|
||||||
qdel(player)
|
|
||||||
|
|
||||||
|
|
||||||
/datum/subsystem/ticker/proc/declare_completion()
|
/datum/subsystem/ticker/proc/declare_completion()
|
||||||
set waitfor = FALSE
|
set waitfor = FALSE
|
||||||
|
|||||||
@@ -68,7 +68,6 @@
|
|||||||
/datum/datacore/proc/manifest()
|
/datum/datacore/proc/manifest()
|
||||||
for(var/mob/living/carbon/human/H in player_list)
|
for(var/mob/living/carbon/human/H in player_list)
|
||||||
manifest_inject(H)
|
manifest_inject(H)
|
||||||
CHECK_TICK
|
|
||||||
|
|
||||||
/datum/datacore/proc/manifest_modify(name, assignment)
|
/datum/datacore/proc/manifest_modify(name, assignment)
|
||||||
var/datum/data/record/foundrecord = find_record("name", name, data_core.general)
|
var/datum/data/record/foundrecord = find_record("name", name, data_core.general)
|
||||||
|
|||||||
@@ -44,8 +44,7 @@
|
|||||||
var/outfit = null
|
var/outfit = null
|
||||||
|
|
||||||
//Only override this proc
|
//Only override this proc
|
||||||
/datum/job/proc/after_spawn(mob/living/carbon/human/H, mob/M)
|
/datum/job/proc/after_spawn(mob/living/carbon/human/H)
|
||||||
//do actions on H but send messages to M as the key may not have been transferred_yet
|
|
||||||
|
|
||||||
|
|
||||||
/datum/job/proc/announce(mob/living/carbon/human/H)
|
/datum/job/proc/announce(mob/living/carbon/human/H)
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ Security Officer
|
|||||||
|
|
||||||
var/list/available_depts = list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY)
|
var/list/available_depts = list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY)
|
||||||
|
|
||||||
/datum/job/officer/after_spawn(mob/living/carbon/human/H, mob/M)
|
/datum/job/officer/after_spawn(mob/living/carbon/human/H)
|
||||||
// Assign department security
|
// Assign department security
|
||||||
var/department
|
var/department
|
||||||
if(H && H.client && H.client.prefs)
|
if(H && H.client && H.client.prefs)
|
||||||
@@ -255,9 +255,9 @@ var/list/available_depts = list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT
|
|||||||
else
|
else
|
||||||
break
|
break
|
||||||
if(department)
|
if(department)
|
||||||
M << "<b>You have been assigned to [department]!</b>"
|
H << "<b>You have been assigned to [department]!</b>"
|
||||||
else
|
else
|
||||||
M << "<b>You have not been assigned to any department. Patrol the halls and help where needed.</b>"
|
H << "<b>You have not been assigned to any department. Patrol the halls and help where needed.</b>"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
canmove = 0
|
canmove = 0
|
||||||
|
|
||||||
anchored = 1 // don't get pushed around
|
anchored = 1 // don't get pushed around
|
||||||
var/mob/living/new_character //for instant transfer once the round is set up
|
|
||||||
|
|
||||||
/mob/new_player/New()
|
/mob/new_player/New()
|
||||||
tag = "mob_[next_mob_id++]"
|
tag = "mob_[next_mob_id++]"
|
||||||
@@ -302,7 +301,7 @@
|
|||||||
|
|
||||||
SSjob.AssignRole(src, rank, 1)
|
SSjob.AssignRole(src, rank, 1)
|
||||||
|
|
||||||
var/mob/living/character = create_character(TRUE) //creates the human and transfers vars and mind
|
var/mob/living/character = create_character() //creates the human and transfers vars and mind
|
||||||
var/equip = SSjob.EquipRank(character, rank, 1)
|
var/equip = SSjob.EquipRank(character, rank, 1)
|
||||||
if(iscyborg(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob.
|
if(iscyborg(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob.
|
||||||
character = equip
|
character = equip
|
||||||
@@ -423,33 +422,27 @@
|
|||||||
popup.open(0) // 0 is passed to open so that it doesn't use the onclose() proc
|
popup.open(0) // 0 is passed to open so that it doesn't use the onclose() proc
|
||||||
|
|
||||||
|
|
||||||
/mob/new_player/proc/create_character(transfer_after)
|
/mob/new_player/proc/create_character()
|
||||||
spawning = 1
|
spawning = 1
|
||||||
close_spawn_windows()
|
close_spawn_windows()
|
||||||
|
|
||||||
var/mob/living/carbon/human/H = new(loc)
|
var/mob/living/carbon/human/new_character = new(loc)
|
||||||
|
|
||||||
if(config.force_random_names || jobban_isbanned(src, "appearance"))
|
if(config.force_random_names || jobban_isbanned(src, "appearance"))
|
||||||
client.prefs.random_character()
|
client.prefs.random_character()
|
||||||
client.prefs.real_name = client.prefs.pref_species.random_name(gender,1)
|
client.prefs.real_name = client.prefs.pref_species.random_name(gender,1)
|
||||||
client.prefs.copy_to(H)
|
client.prefs.copy_to(new_character)
|
||||||
H.dna.update_dna_identity()
|
new_character.dna.update_dna_identity()
|
||||||
if(mind)
|
if(mind)
|
||||||
mind.active = 0 //we wish to transfer the key manually
|
mind.active = 0 //we wish to transfer the key manually
|
||||||
mind.transfer_to(H) //won't transfer key since the mind is not active
|
mind.transfer_to(new_character) //won't transfer key since the mind is not active
|
||||||
|
|
||||||
H.name = real_name
|
new_character.name = real_name
|
||||||
|
|
||||||
. = H
|
new_character.key = key //Manually transfer the key to log them in
|
||||||
new_character = .
|
new_character.stopLobbySound()
|
||||||
if(transfer_after)
|
|
||||||
transfer_character()
|
|
||||||
|
|
||||||
/mob/new_player/proc/transfer_character()
|
return new_character
|
||||||
. = new_character
|
|
||||||
if(.)
|
|
||||||
new_character.key = key //Manually transfer the key to log them in
|
|
||||||
new_character.stopLobbySound()
|
|
||||||
|
|
||||||
/mob/new_player/proc/ViewManifest()
|
/mob/new_player/proc/ViewManifest()
|
||||||
var/dat = "<html><body>"
|
var/dat = "<html><body>"
|
||||||
|
|||||||
@@ -287,12 +287,9 @@
|
|||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
|
|
||||||
/mob/new_player/AIize(transfer_after)
|
/mob/new_player/AIize()
|
||||||
spawning = 1
|
spawning = 1
|
||||||
. = ..()
|
return ..()
|
||||||
new_character = .
|
|
||||||
if(!transfer_after) //name can't be set in AI/New without the client
|
|
||||||
new_character.rename_self("ai", client)
|
|
||||||
|
|
||||||
/mob/living/carbon/human/AIize()
|
/mob/living/carbon/human/AIize()
|
||||||
if (notransform)
|
if (notransform)
|
||||||
@@ -314,7 +311,7 @@
|
|||||||
invisibility = INVISIBILITY_MAXIMUM
|
invisibility = INVISIBILITY_MAXIMUM
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/mob/proc/AIize(transfer_after = TRUE)
|
/mob/proc/AIize()
|
||||||
if(client)
|
if(client)
|
||||||
stopLobbySound()
|
stopLobbySound()
|
||||||
|
|
||||||
@@ -337,13 +334,10 @@
|
|||||||
if (sloc.name == "AI")
|
if (sloc.name == "AI")
|
||||||
loc_landmark = sloc.loc
|
loc_landmark = sloc.loc
|
||||||
|
|
||||||
if(!transfer_after)
|
|
||||||
mind.active = FALSE
|
|
||||||
|
|
||||||
. = new /mob/living/silicon/ai(loc_landmark, null, src)
|
. = new /mob/living/silicon/ai(loc_landmark, null, src)
|
||||||
|
qdel(src)
|
||||||
|
return
|
||||||
|
|
||||||
if(transfer_after)
|
|
||||||
qdel(src)
|
|
||||||
|
|
||||||
//human -> robot
|
//human -> robot
|
||||||
/mob/living/carbon/human/proc/Robotize(delete_items = 0)
|
/mob/living/carbon/human/proc/Robotize(delete_items = 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user