Merge branch 'master' into upstream-merge-26776

This commit is contained in:
LetterJay
2017-05-17 05:14:18 -04:00
committed by GitHub
498 changed files with 16146 additions and 8009 deletions
+2 -13
View File
@@ -42,6 +42,7 @@ SUBSYSTEM_DEF(blackbox)
msg_cargo = SSblackbox.msg_cargo
msg_other = SSblackbox.msg_other
feedback = SSblackbox.feedback
//no touchie
@@ -84,25 +85,13 @@ SUBSYSTEM_DEF(blackbox)
if (!SSdbcore.Connect())
return
var/round_id
var/datum/DBQuery/query_feedback_max_id = SSdbcore.NewQuery("SELECT MAX(round_id) AS round_id FROM [format_table_name("feedback")]")
if(!query_feedback_max_id.Execute())
return
while (query_feedback_max_id.NextRow())
round_id = query_feedback_max_id.item[1]
if (!isnum(round_id))
round_id = text2num(round_id)
round_id++
var/sqlrowlist = ""
for (var/datum/feedback_variable/FV in feedback)
if (sqlrowlist != "")
sqlrowlist += ", " //a comma (,) at the start of the first row to insert will trigger a SQL error
sqlrowlist += "(null, Now(), [round_id], \"[sanitizeSQL(FV.get_variable())]\", [FV.get_value()], \"[sanitizeSQL(FV.get_details())]\")"
sqlrowlist += "(null, Now(), [GLOB.round_id], \"[sanitizeSQL(FV.get_variable())]\", [FV.get_value()], \"[sanitizeSQL(FV.get_details())]\")"
if (sqlrowlist == "")
return
+1 -1
View File
@@ -308,7 +308,6 @@ SUBSYSTEM_DEF(job)
Debug("DO non-human failed, Player: [player], Job:[job.title]")
continue
// If the player wants that job on this level, then try give it to him.
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
@@ -319,6 +318,7 @@ SUBSYSTEM_DEF(job)
unassigned -= player
break
// Hand out random jobs to the people who didn't get any in the last check
// Also makes sure that they got their preference correct
for(var/mob/dead/new_player/player in unassigned)
+2 -10
View File
@@ -36,18 +36,10 @@ SUBSYSTEM_DEF(lighting)
for (i in 1 to GLOB.lighting_update_lights.len)
var/datum/light_source/L = GLOB.lighting_update_lights[i]
if (L.check() || QDELETED(L) || L.force_update)
L.remove_lum()
if (!QDELETED(L))
L.apply_lum()
L.update_corners()
else if (L.vis_update) //We smartly update only tiles that became (in) visible to use.
L.smart_vis_update()
L.needs_update = LIGHTING_NO_UPDATE
L.vis_update = FALSE
L.force_update = FALSE
L.needs_update = FALSE
if(init_tick_checks)
CHECK_TICK
else if (MC_TICK_CHECK)
+1 -1
View File
@@ -150,7 +150,7 @@ SUBSYSTEM_DEF(pai)
if(!(ROLE_PAI in G.client.prefs.be_special))
continue
//G << 'sound/misc/server-ready.ogg' //Alerting them to their consideration
to_chat(G, "<span class='ghostalert'>Someone is requesting a pAI personality! Use the pAI button to submit yourself as one.</span>")
to_chat(G, "<span class='ghostalert'>[user] is requesting a pAI personality! Use the pAI button to submit yourself as one.</span>")
addtimer(CALLBACK(src, .proc/spam_again), spam_delay)
var/list/available = list()
for(var/datum/paiCandidate/c in SSpai.candidates)
+14 -8
View File
@@ -9,7 +9,6 @@ SUBSYSTEM_DEF(persistence)
var/list/obj/structure/chisel_message/chisel_messages = list()
var/list/saved_messages = list()
var/savefile/chisel_messages_sav
var/savefile/trophy_sav
var/list/saved_trophies = list()
@@ -75,14 +74,14 @@ SUBSYSTEM_DEF(persistence)
break //Who's been duping the bird?!
/datum/controller/subsystem/persistence/proc/LoadChiselMessages()
chisel_messages_sav = new /savefile("data/npc_saves/ChiselMessages.sav")
var/savefile/chisel_messages_sav = new /savefile("data/npc_saves/ChiselMessages.sav")
var/saved_json
chisel_messages_sav[SSmapping.config.map_name] >> saved_json
if(!saved_json)
return
var/saved_messages = json_decode(saved_json)
var/list/saved_messages = json_decode(saved_json)
for(var/item in saved_messages)
if(!islist(item))
@@ -104,16 +103,19 @@ SUBSYSTEM_DEF(persistence)
var/obj/structure/chisel_message/M = new(T)
M.unpack(item)
if(!M.loc)
M.persists = FALSE
qdel(M)
if(!QDELETED(M))
M.unpack(item)
log_world("Loaded [saved_messages.len] engraved messages on map [SSmapping.config.map_name]")
/datum/controller/subsystem/persistence/proc/LoadTrophies()
trophy_sav = new /savefile("data/npc_saves/TrophyItems.sav")
var/saved_json
trophy_sav >> saved_json
if(!saved_json)
return
var/decoded_json = json_decode(saved_json)
if(!islist(decoded_json))
@@ -172,9 +174,13 @@ SUBSYSTEM_DEF(persistence)
secret_satchels[SSmapping.config.map_name] << old_secret_satchels
/datum/controller/subsystem/persistence/proc/CollectChiselMessages()
var/savefile/chisel_messages_sav = new /savefile("data/npc_saves/ChiselMessages.sav")
for(var/obj/structure/chisel_message/M in chisel_messages)
saved_messages += list(M.pack())
log_world("Saved [saved_messages.len] engraved messages on map [SSmapping.config.map_name]")
chisel_messages_sav[SSmapping.config.map_name] << json_encode(saved_messages)
/datum/controller/subsystem/persistence/proc/SaveChiselMessage(obj/structure/chisel_message/M)
@@ -190,4 +196,4 @@ SUBSYSTEM_DEF(persistence)
data["path"] = T.showpiece.type
data["message"] = T.trophy_message
data["placer_key"] = T.placer_key
saved_trophies += list(data)
saved_trophies += list(data)
@@ -5,7 +5,7 @@ PROCESSING_SUBSYSTEM_DEF(flightpacks)
stat_tag = "FM"
flags = SS_NO_INIT|SS_TICKER|SS_KEEP_TIMING
var/flightsuit_processing = FLIGHTSUIT_PROCESSING_FULL
var/flightsuit_processing = FLIGHTSUIT_PROCESSING_NONE
/datum/controller/subsystem/processing/flightpacks/Initialize()
sync_flightsuit_processing()
+2 -2
View File
@@ -625,8 +625,8 @@ SUBSYSTEM_DEF(ticker)
if(selected_tip)
m = selected_tip
else
var/list/randomtips = world.file2list("config/tips.txt")
var/list/memetips = world.file2list("config/sillytips.txt")
var/list/randomtips = world.file2list("strings/tips.txt")
var/list/memetips = world.file2list("strings/sillytips.txt")
if(randomtips.len && prob(95))
m = pick(randomtips)
else if(memetips.len)