mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Made Save Slots much more robust
-Made a 'default' save slot (D), and whenever you connect it automatically selects the default slot to load from, but manually selecting a different slot will allow you to play on that one before it returns to default. -Added the ability to name your save slots with the '*'. Names can be up to 16 characters and contain letters, numbers, and basic symbols -The preview icon on the preference screen now takes into account any job you have set on high, and dresses up the icon accordingly. If assistant is set to 'yes', or AI/Cyborg are on high it will put the icon in a grey suit (So you can still customize). Solves Issue 667 as well I tested a good bit with other people's saves, so I'm pretty confident it won't bork savefiles. And before anyone asks, the icon blending didn't make any noticeable lag, since icon procs are client-side. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4159 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -37,7 +37,9 @@
|
||||
if(!client.changes)
|
||||
changes()
|
||||
else
|
||||
client.activeslot = preferences.last_slot
|
||||
if(client.activeslot != preferences.default_slot)//Loads default slot
|
||||
client.activeslot = preferences.default_slot
|
||||
preferences.savefile_load(src)
|
||||
var/lastchangelog = length('changelog.html')
|
||||
if(!client.changes && preferences.lastchangelog!=lastchangelog)
|
||||
changes()
|
||||
|
||||
@@ -105,12 +105,14 @@ datum/preferences
|
||||
|
||||
// Want randomjob if preferences already filled - Donkie
|
||||
var/userandomjob = 1 // Defaults to 1 for less assistants!
|
||||
var/default_slot = 1//Holder so it doesn't default to slot 1, rather the last one used
|
||||
var/slot_name = ""
|
||||
|
||||
// OOC Metadata:
|
||||
var/metadata = ""
|
||||
|
||||
var/sound_adminhelp = 0
|
||||
var/last_slot = 1//Holder so it doesn't default to slot 1, rather the last one used
|
||||
|
||||
|
||||
|
||||
New()
|
||||
@@ -129,17 +131,32 @@ datum/preferences
|
||||
|
||||
if(!IsGuestKey(user.key))
|
||||
var/list/saves = list()
|
||||
var/n = null
|
||||
for(var/i = 1; i <= MAX_SAVE_SLOTS; i += 1)
|
||||
saves += "<a href=\"byond://?src=\ref[user];preferences=1;changeslot=[i]\">Save Slot [i]</a>"
|
||||
var/savefile/F = new /savefile("data/player_saves/[copytext(user.ckey, 1, 2)]/[user.ckey]/preferences[i].sav")
|
||||
F["slotname"] >> n
|
||||
if((n == "") || !n)
|
||||
saves += "<a href=\"byond://?src=\ref[user];preferences=1;changeslot=[i]\">Save Slot [i]</a>"
|
||||
else
|
||||
saves += "<a href=\"byond://?src=\ref[user];preferences=1;changeslot=[i]\">[n]</a>"
|
||||
|
||||
for(var/i = 1; i <= MAX_SAVE_SLOTS; i += 1)
|
||||
if(i == user.client.activeslot)
|
||||
dat += "Save Slot [i]"
|
||||
if((slot_name == "") || (!slot_name))
|
||||
dat += "Save Slot [i]"
|
||||
else
|
||||
dat += "[slot_name]"
|
||||
else
|
||||
dat += "[saves[i]]"
|
||||
if(i == default_slot)
|
||||
dat += "(D)"
|
||||
else
|
||||
dat += "<a href=\"byond://?src=\ref[user];preferences=1;defaultslot=[i]\">(D)</a>"
|
||||
|
||||
if(i != MAX_SAVE_SLOTS)
|
||||
dat += " / "
|
||||
dat += "<br>"
|
||||
dat += "<a href=\"byond://?src=\ref[user];preferences=1;slotname=input\">*</a>"
|
||||
|
||||
else
|
||||
dat += "Please create an account to save your preferences."
|
||||
@@ -671,9 +688,18 @@ datum/preferences
|
||||
else if(link_tags["changeslot"])
|
||||
savefile_save(user)
|
||||
user.client.activeslot = min(max(text2num(link_tags["changeslot"]), 1), MAX_SAVE_SLOTS)
|
||||
last_slot = user.client.activeslot//Changes the last used slot to be the temp default one
|
||||
savefile_load(user)
|
||||
|
||||
else if(link_tags["defaultslot"])
|
||||
default_slot = min(max(text2num(link_tags["defaultslot"]), 1), MAX_SAVE_SLOTS)//Changes the last used slot to be the temp default one
|
||||
savefile_saveslot(user,default_slot)//Mirrors choice across all saves
|
||||
|
||||
else if(link_tags["slotname"])
|
||||
var/sname = ""
|
||||
switch(link_tags["slotname"])
|
||||
if("input")
|
||||
sname = reject_bad_slotname( (input(user, "Please select a name:", "Save Slot Name") as text|null), 16 )
|
||||
slot_name = sname
|
||||
|
||||
if(link_tags["reset_all"])
|
||||
gender = MALE
|
||||
|
||||
@@ -237,7 +237,296 @@ datum/preferences
|
||||
eyes_s.Blend(mouth_s, ICON_OVERLAY)
|
||||
eyes_s.Blend(facial_s, ICON_OVERLAY)
|
||||
|
||||
var/icon/clothes_s = null
|
||||
if(job_civilian_low & ASSISTANT)//This gives the preview icon clothes depending on which job(if any) is set to 'high'
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
else if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
|
||||
|
||||
else if(job_civilian_high)//I hate how this looks, but there's no reason to go through this switch if it's empty
|
||||
switch(job_civilian_high)
|
||||
if(HOP)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "hop_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "armor"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "helmet"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
else if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
|
||||
if(BARTENDER)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "ba_suit_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "armor"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
else if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
|
||||
if(BOTANIST)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "hydroponics_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "ggloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "apron"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
else if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-hyd"), ICON_OVERLAY)
|
||||
if(CHEF)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "chef_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "chef"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
|
||||
if(JANITOR)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "janitor_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
|
||||
if(LIBRARIAN)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "red_suit_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
|
||||
if(QUARTERMASTER)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "qm_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sun"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "clipboard"), ICON_UNDERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
|
||||
if(CARGOTECH)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "cargotech_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
|
||||
if(MINER)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "miner_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
|
||||
if(LAWYER)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "lawyer_blue_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "briefcase"), ICON_UNDERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
|
||||
if(CHAPLAIN)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "chapblack_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
|
||||
if(CLOWN)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "clown_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "clown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "clown"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "clownpack"), ICON_OVERLAY)
|
||||
if(MIME)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "mime_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "lgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "mime"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suspenders"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
|
||||
|
||||
else if(job_medsci_high)
|
||||
switch(job_medsci_high)
|
||||
if(RD)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "director_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "clipboard"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
|
||||
if(SCIENTIST)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "toxinswhite_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
|
||||
if(CHEMIST)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "chemistrywhite_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_chem_open"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-chem"), ICON_OVERLAY)
|
||||
if(CMO)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "cmo_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/items_lefthand.dmi', "firstaid"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_cmo_open"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
|
||||
if(DOCTOR)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/items_lefthand.dmi', "firstaid"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
|
||||
if(GENETICIST)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "geneticswhite_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_gen_open"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-gen"), ICON_OVERLAY)
|
||||
if(VIROLOGIST)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "virologywhite_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "sterile"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-vir"), ICON_OVERLAY)
|
||||
|
||||
else if(job_engsec_high)
|
||||
switch(job_engsec_high)
|
||||
if(CAPTAIN)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "captain_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "captain"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/eyes.dmi', "sun"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "caparmor"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
|
||||
if(HOS)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "hosred_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "helmet"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "armor"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
|
||||
if(WARDEN)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "warden_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "helmet"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "armor"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
|
||||
if(DETECTIVE)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "detective_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "detective"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "detective"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
|
||||
if(OFFICER)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "secred_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "helmet"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "armor"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
|
||||
if(CHIEF)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "chief_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
|
||||
if(ENGINEER)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "engine_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_yellow"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
|
||||
if(ATMOSTECH)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "atmos_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
|
||||
if(ROBOTICIST)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "robotics_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
|
||||
if(AI)//Gives AI and borgs assistant-wear, so they can still customize their character
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
else if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
|
||||
if(CYBORG)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
|
||||
if(backbag == 2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
else if(backbag == 3)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
|
||||
|
||||
preview_icon.Blend(eyes_s, ICON_OVERLAY)
|
||||
if(clothes_s)
|
||||
preview_icon.Blend(clothes_s, ICON_OVERLAY)
|
||||
preview_icon_front = new(preview_icon, dir = SOUTH)
|
||||
preview_icon_side = new(preview_icon, dir = WEST)
|
||||
|
||||
@@ -246,6 +535,7 @@ datum/preferences
|
||||
del(facial_s)
|
||||
del(hair_s)
|
||||
del(eyes_s)
|
||||
del(clothes_s)
|
||||
|
||||
|
||||
proc/style_to_datum()
|
||||
|
||||
@@ -7,6 +7,15 @@ datum/preferences/proc/savefile_path(mob/user)
|
||||
else
|
||||
return "data/player_saves/[copytext(user.ckey, 1, 2)]/[user.ckey]/preferences[user.client.activeslot].sav"
|
||||
|
||||
datum/preferences/proc/savefile_saveslot(mob/user,var/slot)//Mirrors default slot across each save
|
||||
if(!user.client)
|
||||
return null
|
||||
else
|
||||
for(var/i = 1; i <= MAX_SAVE_SLOTS; i += 1)
|
||||
var/savefile/F = new /savefile("data/player_saves/[copytext(user.ckey, 1, 2)]/[user.ckey]/preferences[i].sav")
|
||||
F["default_slot"] << slot
|
||||
return 1
|
||||
|
||||
datum/preferences/proc/savefile_save(mob/user)
|
||||
if (IsGuestKey(user.key))
|
||||
return 0
|
||||
@@ -72,6 +81,8 @@ datum/preferences/proc/savefile_save(mob/user)
|
||||
F["OOC_Notes"] << src.metadata
|
||||
|
||||
F["sound_adminhelp"] << src.sound_adminhelp
|
||||
F["default_slot"] << src.default_slot
|
||||
F["slotname"] << src.slot_name
|
||||
|
||||
return 1
|
||||
|
||||
@@ -163,6 +174,10 @@ datum/preferences/proc/savefile_load(mob/user)
|
||||
F["OOC_Notes"] >> src.metadata
|
||||
|
||||
F["sound_adminhelp"] >> src.sound_adminhelp
|
||||
F["default_slot"] >> src.default_slot
|
||||
if(isnull(default_slot))
|
||||
default_slot = 1
|
||||
F["slotname"] >> src.slot_name
|
||||
|
||||
if(isnull(metadata))
|
||||
metadata = ""
|
||||
|
||||
Reference in New Issue
Block a user