mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Fixed a bug from 1607. Observing and the like should work properly now regardless of config. May need more testing but looks solid on my end.
DONT_DEL_NEWMOB in config.txt is no longer necessary and you can remove it entirely. Respawn character now uses ckey() matching so it doesn't matter what case you type in a person's key. It also takes into account space ninjas and death commandos if you want to respawn them. Also fixed a few bugs dealing with special roles. Revised code for checking security records and added missing ranks as per bug report by Magicbones. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1614 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
mob/new_player
|
||||
var/datum/preferences/preferences
|
||||
var/ready = 0
|
||||
var/spawning = 0
|
||||
var/spawning = 0//Referenced when you want to delete the new_player later on in the code.
|
||||
|
||||
invisibility = 101
|
||||
|
||||
@@ -25,8 +25,8 @@ mob/new_player
|
||||
|
||||
new_player_panel()
|
||||
var/starting_loc = pick(newplayer_start)
|
||||
src.loc = starting_loc
|
||||
src.sight |= SEE_TURFS
|
||||
loc = starting_loc
|
||||
sight |= SEE_TURFS
|
||||
var/list/watch_locations = list()
|
||||
for(var/obj/landmark/landmark in world)
|
||||
if(landmark.tag == "landmark*new_player")
|
||||
@@ -37,12 +37,12 @@ mob/new_player
|
||||
|
||||
if(!preferences.savefile_load(src, 0))
|
||||
preferences.ShowChoices(src)
|
||||
if (src.client.changes)
|
||||
src.changes()
|
||||
if (client.changes)
|
||||
changes()
|
||||
else
|
||||
var/lastchangelog = length('changelog.html')
|
||||
if (!src.client.changes && preferences.lastchangelog!=lastchangelog)
|
||||
src.changes()
|
||||
if (!client.changes && preferences.lastchangelog!=lastchangelog)
|
||||
changes()
|
||||
preferences.lastchangelog = lastchangelog
|
||||
preferences.savefile_save(src)
|
||||
//PDA Resource Initialisation =======================================================>
|
||||
@@ -93,9 +93,8 @@ mob/new_player
|
||||
Logout()
|
||||
ready = 0
|
||||
..()
|
||||
if(!config.del_new_on_log)
|
||||
return
|
||||
if(!spawning)
|
||||
if(!spawning)//Here so that if they are spawning and log out, the other procs can play out and they will have a mob to come back to.
|
||||
key = null//We null their key before deleting the mob, so they are properly kicked out.
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -105,7 +104,7 @@ mob/new_player
|
||||
|
||||
var/output = "<HR><B>New Player Options</B><BR>"
|
||||
output += "<HR><br><a href='byond://?src=\ref[src];show_preferences=1'>Setup Character</A><BR><BR>"
|
||||
//if(istester(src.key))
|
||||
//if(istester(key))
|
||||
if(!ticker || ticker.current_state <= GAME_STATE_PREGAME)
|
||||
if(!ready)
|
||||
output += "<a href='byond://?src=\ref[src];ready=1'>Declare Ready</A><BR>"
|
||||
@@ -161,7 +160,7 @@ mob/new_player
|
||||
if(alert(src,"Are you sure you wish to observe? You will not be able to play this round!","Player Setup","Yes","No") == "Yes")
|
||||
var/mob/dead/observer/observer = new()
|
||||
|
||||
src.spawning = 1
|
||||
spawning = 1
|
||||
|
||||
close_spawn_windows()
|
||||
var/obj/O = locate("landmark*Observer-Start")
|
||||
@@ -348,6 +347,7 @@ mob/new_player
|
||||
L.fields["rank"] = H.mind.assigned_role
|
||||
L.fields["b_type"] = H.b_type
|
||||
L.fields["b_dna"] = H.dna.unique_enzymes
|
||||
L.fields["enzymes"] = H.dna.struc_enzymes
|
||||
L.fields["identity"] = H.dna.uni_identity
|
||||
//End locked reporting
|
||||
|
||||
@@ -448,8 +448,8 @@ mob/new_player
|
||||
src << browse(dat, "window=latechoices;size=300x640;can_close=0")
|
||||
|
||||
proc/create_character()
|
||||
src.spawning = 1
|
||||
var/mob/living/carbon/human/new_character = new(src.loc)
|
||||
spawning = 1
|
||||
var/mob/living/carbon/human/new_character = new(loc)
|
||||
|
||||
close_spawn_windows()
|
||||
|
||||
@@ -577,10 +577,10 @@ mob/new_player
|
||||
if (!message)
|
||||
return
|
||||
|
||||
log_say("[src.key] : [message]")
|
||||
log_say("[key] : [message]")
|
||||
|
||||
if (src.muted)
|
||||
if (muted)
|
||||
return
|
||||
|
||||
. = src.say_dead(message)
|
||||
. = say_dead(message)
|
||||
*/
|
||||
@@ -56,7 +56,7 @@ datum/preferences
|
||||
underwear = pick(0,1)
|
||||
b_type = pick("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-")
|
||||
age = rand(19,35)
|
||||
copy_to(H)
|
||||
copy_to(H,1)
|
||||
|
||||
proc/randomize_name()
|
||||
if (gender == MALE)
|
||||
@@ -823,7 +823,7 @@ datum/preferences
|
||||
|
||||
ShowChoices(user)
|
||||
|
||||
proc/copy_to(mob/living/carbon/human/character)
|
||||
proc/copy_to(mob/living/carbon/human/character, safety = 0)
|
||||
if(be_random_name)
|
||||
randomize_name()
|
||||
character.real_name = real_name
|
||||
@@ -910,11 +910,12 @@ datum/preferences
|
||||
character.update_face()
|
||||
character.update_body()
|
||||
|
||||
spawn(10)
|
||||
if(character)
|
||||
character.client.midis = midis
|
||||
character.client.ooccolor = ooccolor
|
||||
character.client.be_alien = be_alien
|
||||
if(!safety)//To prevent run-time errors due to null datum when using randomize_appearance_for()
|
||||
spawn(10)//as they should already have these set at game spawn.
|
||||
if(character)
|
||||
character.client.midis = midis
|
||||
character.client.ooccolor = ooccolor
|
||||
character.client.be_alien = be_alien
|
||||
|
||||
/*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user