mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-18 18:42:59 +01:00
Merge polaris sync 01 17 2018
Planes, layers, human/update_icon()
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
S["citizenship"] >> pref.citizenship
|
||||
S["faction"] >> pref.faction
|
||||
S["religion"] >> pref.religion
|
||||
S["nanotrasen_relation"] >> pref.nanotrasen_relation
|
||||
S["economic_status"] >> pref.economic_status
|
||||
|
||||
/datum/category_item/player_setup_item/general/background/save_character(var/savefile/S)
|
||||
S["med_record"] << pref.med_record
|
||||
@@ -20,7 +20,7 @@
|
||||
S["citizenship"] << pref.citizenship
|
||||
S["faction"] << pref.faction
|
||||
S["religion"] << pref.religion
|
||||
S["nanotrasen_relation"] << pref.nanotrasen_relation
|
||||
S["economic_status"] << pref.economic_status
|
||||
|
||||
/datum/category_item/player_setup_item/general/background/sanitize_character()
|
||||
if(!pref.home_system) pref.home_system = "Unset"
|
||||
@@ -28,7 +28,7 @@
|
||||
if(!pref.faction) pref.faction = "None"
|
||||
if(!pref.religion) pref.religion = "None"
|
||||
|
||||
pref.nanotrasen_relation = sanitize_inlist(pref.nanotrasen_relation, COMPANY_ALIGNMENTS, initial(pref.nanotrasen_relation))
|
||||
pref.economic_status = sanitize_inlist(pref.economic_status, ECONOMIC_CLASS, initial(pref.economic_status))
|
||||
|
||||
// Moved from /datum/preferences/proc/copy_to()
|
||||
/datum/category_item/player_setup_item/general/background/copy_to_mob(var/mob/living/carbon/human/character)
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
/datum/category_item/player_setup_item/general/background/content(var/mob/user)
|
||||
. += "<b>Background Information</b><br>"
|
||||
. += "[using_map.company_name] Relation: <a href='?src=\ref[src];nt_relation=1'>[pref.nanotrasen_relation]</a><br/>"
|
||||
. += "Economic Status: <a href='?src=\ref[src];econ_status=1'>[pref.economic_status]</a><br/>"
|
||||
. += "Home System: <a href='?src=\ref[src];home_system=1'>[pref.home_system]</a><br/>"
|
||||
. += "Citizenship: <a href='?src=\ref[src];citizenship=1'>[pref.citizenship]</a><br/>"
|
||||
. += "Faction: <a href='?src=\ref[src];faction=1'>[pref.faction]</a><br/>"
|
||||
@@ -60,10 +60,10 @@
|
||||
. += "<a href='?src=\ref[src];set_security_records=1'>[TextPreview(pref.sec_record,40)]</a><br>"
|
||||
|
||||
/datum/category_item/player_setup_item/general/background/OnTopic(var/href,var/list/href_list, var/mob/user)
|
||||
if(href_list["nt_relation"])
|
||||
var/new_relation = input(user, "Choose your relation to NT. Note that this represents what others can find out about your character by researching your background, not what your character actually thinks.", "Character Preference", pref.nanotrasen_relation) as null|anything in COMPANY_ALIGNMENTS
|
||||
if(new_relation && CanUseTopic(user))
|
||||
pref.nanotrasen_relation = new_relation
|
||||
if(href_list["econ_status"])
|
||||
var/new_class = input(user, "Choose your economic status. This will affect the amount of money you will start with.", "Character Preference", pref.economic_status) as null|anything in ECONOMIC_CLASS
|
||||
if(new_class && CanUseTopic(user))
|
||||
pref.economic_status = new_class
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["home_system"])
|
||||
|
||||
@@ -47,10 +47,18 @@ var/list/gear_datums = list()
|
||||
var/current_tab = "General"
|
||||
|
||||
/datum/category_item/player_setup_item/loadout/load_character(var/savefile/S)
|
||||
S["gear"] >> pref.gear
|
||||
from_file(S["gear_list"], pref.gear_list)
|
||||
from_file(S["gear_slot"], pref.gear_slot)
|
||||
if(pref.gear_list!=null && pref.gear_slot!=null)
|
||||
pref.gear = pref.gear_list["[pref.gear_slot]"]
|
||||
else
|
||||
from_file(S["gear"], pref.gear)
|
||||
pref.gear_slot = 1
|
||||
|
||||
/datum/category_item/player_setup_item/loadout/save_character(var/savefile/S)
|
||||
S["gear"] << pref.gear
|
||||
pref.gear_list["[pref.gear_slot]"] = pref.gear
|
||||
to_file(S["gear_list"], pref.gear_list)
|
||||
to_file(S["gear_slot"], pref.gear_slot)
|
||||
|
||||
/datum/category_item/player_setup_item/loadout/proc/valid_gear_choices(var/max_cost)
|
||||
. = list()
|
||||
@@ -68,6 +76,8 @@ var/list/gear_datums = list()
|
||||
var/mob/preference_mob = preference_mob()
|
||||
if(!islist(pref.gear))
|
||||
pref.gear = list()
|
||||
if(!islist(pref.gear_list))
|
||||
pref.gear_list = list()
|
||||
|
||||
for(var/gear_name in pref.gear)
|
||||
if(!(gear_name in gear_datums))
|
||||
@@ -102,7 +112,7 @@ var/list/gear_datums = list()
|
||||
fcolor = "#E67300"
|
||||
|
||||
. += "<table align = 'center' width = 100%>"
|
||||
. += "<tr><td colspan=3><center><b><font color = '[fcolor]'>[total_cost]/[MAX_GEAR_COST]</font> loadout points spent.</b> \[<a href='?src=\ref[src];clear_loadout=1'>Clear Loadout</a>\]</center></td></tr>"
|
||||
. += "<tr><td colspan=3><center><a href='?src=\ref[src];prev_slot=1'>\<\<</a><b><font color = '[fcolor]'>\[[pref.gear_slot]\]</font> </b><a href='?src=\ref[src];next_slot=1'>\>\></a><b><font color = '[fcolor]'>[total_cost]/[MAX_GEAR_COST]</font> loadout points spent.</b> \[<a href='?src=\ref[src];clear_loadout=1'>Clear Loadout</a>\]</center></td></tr>"
|
||||
|
||||
. += "<tr><td colspan=3><center><b>"
|
||||
var/firstcat = 1
|
||||
@@ -187,6 +197,29 @@ var/list/gear_datums = list()
|
||||
return TOPIC_NOACTION
|
||||
set_tweak_metadata(gear, tweak, metadata)
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
if(href_list["next_slot"] || href_list["prev_slot"])
|
||||
//Set the current slot in the gear list to the currently selected gear
|
||||
pref.gear_list["[pref.gear_slot]"] = pref.gear
|
||||
//If we're moving up a slot..
|
||||
if(href_list["next_slot"])
|
||||
//change the current slot number
|
||||
pref.gear_slot = pref.gear_slot+1
|
||||
if(pref.gear_slot>config.loadout_slots)
|
||||
pref.gear_slot = 1
|
||||
//If we're moving down a slot..
|
||||
else if(href_list["prev_slot"])
|
||||
//change current slot one down
|
||||
pref.gear_slot = pref.gear_slot-1
|
||||
if(pref.gear_slot<1)
|
||||
pref.gear_slot = config.loadout_slots
|
||||
// Set the currently selected gear to whatever's in the new slot
|
||||
if(pref.gear_list["[pref.gear_slot]"])
|
||||
pref.gear = pref.gear_list["[pref.gear_slot]"]
|
||||
else
|
||||
pref.gear = list()
|
||||
pref.gear_list["[pref.gear_slot]"] = list()
|
||||
// Refresh?
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
else if(href_list["select_category"])
|
||||
current_tab = href_list["select_category"]
|
||||
return TOPIC_REFRESH
|
||||
|
||||
Reference in New Issue
Block a user