Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Dahlular
2021-03-10 01:08:21 -07:00
20 changed files with 87037 additions and 2427 deletions
+37 -2
View File
@@ -69,6 +69,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/pda_skin = PDA_SKIN_ALT
var/list/alt_titles_preferences = list()
var/static/preview_job_outfit = TRUE //shouldn't be something that's saved, but this is a preference option
var/uses_glasses_colour = 0
@@ -1049,8 +1050,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(!gear_tab)
gear_tab = GLOB.loadout_items[1]
dat += "<table align='center' width='100%'>"
dat += "<tr><td colspan=4><center><b><font color='[gear_points == 0 ? "#E62100" : "#CCDDFF"]'>[gear_points]</font> loadout points remaining.</b> \[<a href='?_src_=prefs;preference=gear;clear_loadout=1'>Clear Loadout</a>\]</center></td></tr>"
dat += "<tr><td colspan=4><center>You can only choose one item per category, unless it's an item that spawns in your backpack or hands.</center></td></tr>"
dat += "<tr><td colspan=4><center><b><font color='[gear_points == 0 ? "#E62100" : "#CCDDFF"]'>[gear_points]</font> loadout points remaining.</b> \[<a href='?_src_=prefs;preference=gear;clear_loadout=1'>Clear Loadout</a>\] \[<a href='?_src_=prefs;preference=gear;toggle_outfit_visibility=1'>[preview_job_outfit ? "Enable" : "Disable"] Job Outfit Preview</a>\]</center></td></tr>"
dat += "<tr><td colspan=4><center>You can only choose two items per category, unless it's an item that spawns in your backpack or hands.</center></td></tr>"
dat += "<tr><td colspan=4><center><b>"
var/firstcat = TRUE
for(var/i in GLOB.loadout_items)
@@ -1102,6 +1103,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "</table>"
if(4) //Antag Preferences
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
dat += "<h1>Special Role Settings</h1>"
if(jobban_isbanned(user, ROLE_SYNDICATE))
dat += "<font color=red><h3><b>You are banned from antagonist roles.</b></h3></font>"
@@ -1122,6 +1124,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
else
dat += "<b>Be [capitalize(i)]:</b> <a href='?_src_=prefs;preference=be_special;be_special_type=[i]'>[(i in be_special) ? "Enabled" : "Disabled"]</a><br>"
dat += "<b>Midround Antagonist:</b> <a href='?_src_=prefs;preference=allow_midround_antag'>[(toggles & MIDROUND_ANTAG) ? "Enabled" : "Disabled"]</a><br>"
dat += "</td><td width='340px' height='300px' valign='top'>"
dat += "<h1>Sync Settings</h1>"
dat += "<b>Sync</b> antag prefs. with all characters: <a href='?_src_=prefs;preference=sync_antag_with_chars'>[(toggles & ANTAG_SYNC_WITH_CHARS) ? "Yes" : "No"]</a><br>"
dat += "<b>Copy</b> and save antag prefs. to all characters: <a href='?_src_=prefs;preference=copy_antag_to_chars'>Copy</a><br>"
dat += "<b>Reset</b> antag prefs. for this character: <a href='?_src_=prefs;preference=reset_antag'>Reset</a><br>"
dat += "</td></tr></table>"
dat += "<hr><center>"
@@ -2523,6 +2532,30 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("allow_midround_antag")
toggles ^= MIDROUND_ANTAG
if("sync_antag_with_chars")
toggles ^= ANTAG_SYNC_WITH_CHARS
if(!(toggles & ANTAG_SYNC_WITH_CHARS) && path)
var/savefile/S = new /savefile(path)
if(S)
S["special_roles"] >> be_special
if("copy_antag_to_chars")
if(path)
var/savefile/S = new /savefile(path)
if(S)
var/initial_cd = S.cd
for(var/i=1, i<=max_save_slots, i++)
S.cd = "/character[i]"
if(S["real_name"])
WRITE_FILE(S["special_roles"], be_special)
S.cd = initial_cd
to_chat(parent, "<span class='notice'>Successfully copied antagonist preferences to all characters.</span>")
else
to_chat(parent, "<span class='notice'>Could not write to file.</span>")
if("reset_antag")
be_special = list()
if("parallaxup")
parallax = WRAP(parallax + 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1)
@@ -2610,6 +2643,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(gear_points >= initial(G.cost))
LAZYADD(chosen_gear, G.type)
gear_points -= initial(G.cost)
if(href_list["toggle_outfit_visibility"])
preview_job_outfit = !preview_job_outfit
ShowChoices(user)
return 1
+4 -2
View File
@@ -366,7 +366,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["job_engsec_low"] >> job_engsec_low
//Antags
S["special_roles"] >> be_special
if(!(toggles & ANTAG_SYNC_WITH_CHARS))
S["special_roles"] >> be_special
//Quirks
S["all_quirks"] >> all_quirks
@@ -606,7 +607,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["medical_records"] , medical_records)
//Misc.
WRITE_FILE(S["special_roles"] , be_special) //Preferences don't load every character change
if(!(toggles & ANTAG_SYNC_WITH_CHARS))
WRITE_FILE(S["special_roles"] , be_special) //Preferences don't load every character change
WRITE_FILE(S["hide_ckey"] , hide_ckey)
WRITE_FILE(S["all_quirks"] , all_quirks)
@@ -174,43 +174,6 @@
)
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/output/sound/beepsky
name = "securitron sound circuit"
desc = "Takes a sound name as an input, and will play said sound when pulsed. This circuit is similar to those used in Securitrons."
sounds = list(
"creep" = 'sound/voice/beepsky/creep.ogg',
"criminal" = 'sound/voice/beepsky/criminal.ogg',
"freeze" = 'sound/voice/beepsky/freeze.ogg',
"god" = 'sound/voice/beepsky/god.ogg',
"i am the law" = 'sound/voice/beepsky/iamthelaw.ogg',
"insult" = 'sound/voice/beepsky/insult.ogg',
"radio" = 'sound/voice/beepsky/radio.ogg',
"secure day" = 'sound/voice/beepsky/secureday.ogg',
)
spawn_flags = IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/output/sound/medbot
name = "medbot sound circuit"
desc = "Takes a sound name as an input, and will play said sound when pulsed. This circuit is often found in medical robots."
sounds = list(
"surgeon" = 'sound/voice/medbot/surgeon.ogg',
"radar" = 'sound/voice/medbot/radar.ogg',
"feel better" = 'sound/voice/medbot/feelbetter.ogg',
"patched up" = 'sound/voice/medbot/patchedup.ogg',
"injured" = 'sound/voice/medbot/injured.ogg',
"insult" = 'sound/voice/medbot/insult.ogg',
"coming" = 'sound/voice/medbot/coming.ogg',
"help" = 'sound/voice/medbot/help.ogg',
"live" = 'sound/voice/medbot/live.ogg',
"lost" = 'sound/voice/medbot/lost.ogg',
"flies" = 'sound/voice/medbot/flies.ogg',
"catch" = 'sound/voice/medbot/catch.ogg',
"delicious" = 'sound/voice/medbot/delicious.ogg',
"apple" = 'sound/voice/medbot/apple.ogg',
"no" = 'sound/voice/medbot/no.ogg',
)
spawn_flags = IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/output/sound/vox
name = "ai vox sound circuit"
desc = "Takes a sound name as an input, and will play said sound when pulsed. This circuit is often found in AI announcement systems."
+1 -1
View File
@@ -224,7 +224,7 @@
if(!J)
J = SSjob.GetJob(H.job)
if(H.nameless && J.dresscodecompliant)
if(H.nameless)
if(J.title in GLOB.command_positions)
H.real_name = J.title
else
@@ -51,6 +51,12 @@
var/datum/job/previewJob
var/highRankFlag = job_civilian_high | job_medsci_high | job_engsec_high
if(chosen_gear && current_tab != 2)
for(var/A in chosen_gear)
var/datum/gear/G = new A //Shouldn't really be anything else, but byond fuckery
if(!mannequin.get_item_by_slot(G.category))
mannequin.equip_to_appropriate_slot(new G.path)
if(job_civilian_low & ASSISTANT)
previewJob = SSjob.GetJob("Assistant")
else if(highRankFlag)
@@ -67,7 +73,7 @@
previewJob = job
break
if(previewJob)
if(previewJob && preview_job_outfit)
if(current_tab != 2)
mannequin.job = previewJob.title
previewJob.equip(mannequin, TRUE)
@@ -10,6 +10,9 @@
mutantears = /obj/item/organ/ears/cat
mutanttail = /obj/item/organ/tail/cat
liked_food = MEAT | RAW | DAIRY
disliked_food = FRIED | FRUIT
/datum/species/human/felinid/qualifies_for_rank(rank, list/features)
return TRUE
+14 -4
View File
@@ -235,15 +235,19 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
//set qdel_on_fail to have it delete W if it fails to equip
//set disable_warning to disable the 'you are unable to equip that' warning.
//unset redraw_mob to prevent the mob from being redrawn at the end.
/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, qdel_on_fail = FALSE, disable_warning = FALSE, redraw_mob = TRUE, bypass_equip_delay_self = FALSE)
/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, qdel_on_fail = FALSE, disable_warning = FALSE, redraw_mob = TRUE, bypass_equip_delay_self = FALSE, store = FALSE)
if(!istype(W))
return FALSE
if(!W.mob_can_equip(src, null, slot, disable_warning, bypass_equip_delay_self))
if(store && istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
var/obj/item/storage/backpack/BP = H.back
if(BP)
return SEND_SIGNAL(BP, COMSIG_TRY_STORAGE_INSERT, W, null, TRUE, TRUE)
if(qdel_on_fail)
qdel(W)
else
if(!disable_warning)
to_chat(src, "<span class='warning'>You are unable to equip that!</span>")
else if(!disable_warning)
to_chat(src, "<span class='warning'>You are unable to equip that!</span>")
return FALSE
equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail.
return TRUE
@@ -258,6 +262,12 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
/mob/proc/equip_to_slot_or_del(obj/item/W, slot)
return equip_to_slot_if_possible(W, slot, TRUE, TRUE, FALSE, TRUE)
/mob/proc/equip_to_slot_or_store(obj/item/W, slot)
return equip_to_slot_if_possible(W, slot, FALSE, TRUE, FALSE, TRUE, TRUE)
/mob/proc/equip_to_slot_or_store_and_del(obj/item/W, slot)
return equip_to_slot_if_possible(W, slot, TRUE, TRUE, FALSE, TRUE, TRUE)
//puts the item "W" into an appropriate slot in a human's inventory
//returns 0 if it cannot, 1 if successful
/mob/proc/equip_to_appropriate_slot(obj/item/W)