mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
TG: - Removed the 'midis' variable from mobs. This one's supposed to be a client
thing, so it's now a client side var instead of being doubled in mobs. - Made ooccolor, be_pai, be_alien, midis and ghost_ears actually properly copy over from the preferences when observing! Incredible, isn't it? Revision: r3087 Author: baloh.matev
This commit is contained in:
@@ -214,6 +214,8 @@
|
||||
observer.real_name = observer.name
|
||||
observer.original_name = observer.name //Original name is only used in ghost chat! It is not to be edited by anything!
|
||||
|
||||
preferences.copy_to_observer(observer)
|
||||
|
||||
del(src)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -300,15 +300,21 @@ datum/preferences
|
||||
dat += "[copytext(flavor_text, 1, 37)]..."
|
||||
|
||||
dat += "<hr>"
|
||||
if(!jobban_isbanned(user, "Syndicate"))
|
||||
if(jobban_isbanned(user, "Syndicate"))
|
||||
dat += "<b>You are banned from antagonist roles.</b>"
|
||||
src.be_special = 0
|
||||
else
|
||||
var/n = 0
|
||||
for (var/i in special_roles)
|
||||
if(special_roles[i]) //if mode is available on the server
|
||||
dat += "<b>Be [i]:</b> <a href=\"byond://?src=\ref[user];preferences=1;be_special=[n]\"><b>[src.be_special&(1<<n) ? "Yes" : "No"]</b></a><br>"
|
||||
if(jobban_isbanned(user, i))
|
||||
dat += "<b>Be [i]:</b> <font color=red><b> \[BANNED]</b></font><br>"
|
||||
else if(i == "pai candidate")
|
||||
if(jobban_isbanned(user, "pAI"))
|
||||
dat += "<b>Be [i]:</b> <font color=red><b> \[BANNED]</b></font><br>"
|
||||
else
|
||||
dat += "<b>Be [i]:</b> <a href=\"byond://?src=\ref[user];preferences=1;be_special=[n]\"><b>[src.be_special&(1<<n) ? "Yes" : "No"]</b></a><br>"
|
||||
n++
|
||||
else
|
||||
dat += "<b>You are banned from being Syndicate.</b>"
|
||||
src.be_special = 0
|
||||
dat += "<hr>"
|
||||
|
||||
// slot options
|
||||
@@ -599,12 +605,23 @@ datum/preferences
|
||||
switch(link_tags["real_name"])
|
||||
if("input")
|
||||
new_name = input(user, "Please select a name:", "Character Generation") as text
|
||||
var/list/bad_characters = list("_", "'", "\"", "<", ">", ";", "[", "]", "{", "}", "|", "\\")
|
||||
var/list/bad_characters = list("_", "'", "\"", "<", ">", ";", "\[", "\]", "{", "}", "|", "\\","0","1","2","3","4","5","6","7","8","9")
|
||||
for(var/c in bad_characters)
|
||||
new_name = dd_replacetext(new_name, c, "")
|
||||
if(!new_name || (new_name == "Unknown") || (new_name == "floor") || (new_name == "wall") || (new_name == "r-wall"))
|
||||
alert("Don't do this")
|
||||
alert("Invalid name. Don't do that!")
|
||||
return
|
||||
if(length(new_name) >= 26)
|
||||
alert("That name is too long.")
|
||||
return
|
||||
|
||||
//Carn: To fix BYOND text-parsing errors caused by people using dumb capitalisation in their names.
|
||||
var/tempname
|
||||
for(var/N in dd_text2list(new_name, " "))
|
||||
if(N && tempname) //if both aren't null strings
|
||||
tempname += " "
|
||||
tempname += capitalize(lowertext(N))
|
||||
new_name = tempname
|
||||
|
||||
if("random")
|
||||
randomize_name()
|
||||
@@ -617,9 +634,9 @@ datum/preferences
|
||||
if(link_tags["age"])
|
||||
switch(link_tags["age"])
|
||||
if("input")
|
||||
var/new_age = input(user, "Please select type in age: 20-45", "Character Generation") as num
|
||||
var/new_age = input(user, "Please select type in age: 15-45", "Character Generation") as num
|
||||
if(new_age)
|
||||
age = max(min(round(text2num(new_age)), 45), 20)
|
||||
age = max(min(round(text2num(new_age)), 45), 15)
|
||||
if("random")
|
||||
age = rand (20, 45)
|
||||
|
||||
@@ -761,7 +778,8 @@ datum/preferences
|
||||
UI = UI_OLD
|
||||
|
||||
if(link_tags["midis"])
|
||||
midis = (midis+1)%2
|
||||
midis = !midis
|
||||
|
||||
if(link_tags["ghost_ears"])
|
||||
ghost_ears = !ghost_ears
|
||||
|
||||
@@ -947,8 +965,6 @@ datum/preferences
|
||||
backbag = 1 //Same as above
|
||||
character.backbag = backbag
|
||||
|
||||
character.underwear = underwear == 1 ? pick(1,2,3,4,5) : 0
|
||||
|
||||
character.used_skillpoints = used_skillpoints
|
||||
character.skill_specialization = skill_specialization
|
||||
character.skills = skills
|
||||
@@ -959,11 +975,21 @@ datum/preferences
|
||||
if(!safety)//To prevent run-time errors due to null datum when using randomize_appearance_for()
|
||||
spawn(10)
|
||||
if(character&&character.client)
|
||||
character.client.midis = midis
|
||||
character.client.ooccolor = ooccolor
|
||||
character.client.be_alien = be_special&BE_ALIEN
|
||||
character.client.be_pai = be_special&BE_PAI
|
||||
character.client.be_syndicate = be_special
|
||||
setup_client(character.client)
|
||||
|
||||
proc/copy_to_observer(mob/dead/observer/character)
|
||||
spawn(10)
|
||||
if(character && character.client)
|
||||
setup_client(character.client)
|
||||
|
||||
proc/setup_client(var/client/C)
|
||||
if(C)
|
||||
C.midis = src.midis
|
||||
C.ooccolor = src.ooccolor
|
||||
C.be_alien = be_special & BE_ALIEN
|
||||
C.be_pai = be_special & BE_PAI
|
||||
if(isnull(src.ghost_ears)) src.ghost_ears = 1 //There were problems where the default was null before someone saved their profile.
|
||||
C.ghost_ears = src.ghost_ears
|
||||
|
||||
proc/copydisabilities(mob/living/carbon/human/character)
|
||||
if(disabilities & 1)
|
||||
|
||||
Reference in New Issue
Block a user