diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm
index 94983f62acd..7e304170e54 100644
--- a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm
+++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm
@@ -87,7 +87,7 @@
else return 1
/obj/machinery/atmospherics/pipe/simple/proc/burst()
- src.visible_message("\The [src] bursts!");
+ src.visible_message("\The [src] bursts!")
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(1,0, src.loc, 0)
diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm
index 340d7a3b134..83347c20d3b 100644
--- a/code/__HELPERS/time.dm
+++ b/code/__HELPERS/time.dm
@@ -11,25 +11,6 @@
#define TICKS2DS(T) ((T) TICKS)
-#define TimeOfGame (get_game_time())
-#define TimeOfTick (world.tick_usage*0.01*world.tick_lag)
-
-/proc/get_game_time()
- var/global/time_offset = 0
- var/global/last_time = 0
- var/global/last_usage = 0
-
- var/wtime = world.time
- var/wusage = world.tick_usage * 0.01
-
- if(last_time < wtime && last_usage > 1)
- time_offset += last_usage - 1
-
- last_time = wtime
- last_usage = wusage
-
- return wtime + (time_offset + wusage) * world.tick_lag
-
/* This proc should only be used for world/Topic.
* If you want to display the time for which dream daemon has been running ("round time") use worldtime2text.
* If you want to display the canonical station "time" (aka the in-character time of the station) use station_time_timestamp
@@ -98,14 +79,14 @@ proc/isDay(var/month, var/day)
* Returns "watch handle" (really just a timestamp :V)
*/
/proc/start_watch()
- return TimeOfGame
+ return REALTIMEOFDAY
/**
* Returns number of seconds elapsed.
* @param wh number The "Watch Handle" from start_watch(). (timestamp)
*/
/proc/stop_watch(wh)
- return round(0.1 * (TimeOfGame - wh), 0.1)
+ return round(0.1 * (REALTIMEOFDAY - wh), 0.1)
/proc/numberToMonthName(number)
return GLOB.month_names.Find(number)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 63d9f7c85ef..7e57a394988 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -2016,3 +2016,6 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
/proc/CallAsync(datum/source, proctype, list/arguments)
set waitfor = FALSE
return call(source, proctype)(arglist(arguments))
+
+/// Waits at a line of code until X is true
+#define UNTIL(X) while(!(X)) stoplag()
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index 083b347e52c..9d4dacf33f2 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -265,6 +265,11 @@
src.votable_modes += "secret"
/datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "Config reload blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to reload configuration via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to reload configuration via advanced proc-call")
+ return
var/list/Lines = file2list(filename)
for(var/t in Lines)
@@ -808,6 +813,11 @@
log_config("Unknown setting in configuration: '[name]'")
/datum/configuration/proc/loadsql(filename) // -- TLE
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "SQL configuration reload blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to reload SQL configuration via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to reload SQL configuration via advanced proc-call")
+ return
var/list/Lines = file2list(filename)
for(var/t in Lines)
if(!t) continue
diff --git a/code/controllers/subsystem/tickets/mentor_tickets.dm b/code/controllers/subsystem/tickets/mentor_tickets.dm
index d8bae77840c..76c7ed2dc28 100644
--- a/code/controllers/subsystem/tickets/mentor_tickets.dm
+++ b/code/controllers/subsystem/tickets/mentor_tickets.dm
@@ -1,8 +1,8 @@
GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets)
/datum/controller/subsystem/tickets/mentor_tickets/New()
- NEW_SS_GLOBAL(SSmentor_tickets);
- PreInit();
+ NEW_SS_GLOBAL(SSmentor_tickets)
+ PreInit()
/datum/controller/subsystem/tickets/mentor_tickets
name = "Mentor Tickets"
@@ -15,7 +15,7 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets
message_mentorTicket(msg)
/datum/controller/subsystem/tickets/mentor_tickets/Initialize()
- close_messages = list("- [ticket_name] Closed -",
- "Please try to be as descriptive as possible in mentor helps. Mentors do not know the full situation you're in and need more information to give you a helpful response.",
+ close_messages = list("- [ticket_name] Closed -",
+ "Please try to be as descriptive as possible in mentor helps. Mentors do not know the full situation you're in and need more information to give you a helpful response.",
"Your [ticket_name] has now been closed.")
return ..()
diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index 4076a8e891e..dc6101630bf 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -1,5 +1,14 @@
// reference: /client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
+/**
+ * Proc to check if a datum allows proc calls on it
+ *
+ * Returns TRUE if you can call a proc on the datum, FALSE if you cant
+ *
+ */
+/datum/proc/CanProcCall(procname)
+ return TRUE
+
/datum/proc/can_vv_get(var_name)
return TRUE
diff --git a/code/datums/helper_datums/construction_datum.dm b/code/datums/helper_datums/construction_datum.dm
index c10ca5a488b..8eefe5efa0d 100644
--- a/code/datums/helper_datums/construction_datum.dm
+++ b/code/datums/helper_datums/construction_datum.dm
@@ -69,10 +69,10 @@
/datum/construction/proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one.
for(var/i=1;i<=steps.len;i++)
- var/list/L = steps[i];
+ var/list/L = steps[i]
if(do_tool_or_atom_check(used_atom, L["key"]) && custom_action(i, used_atom, user))
steps[i]=null;//stupid byond list from list removal...
- listclearnulls(steps);
+ listclearnulls(steps)
if(!steps.len)
spawn_result(user)
return 1
diff --git a/code/datums/wires/syndicatebomb.dm b/code/datums/wires/syndicatebomb.dm
index b490d150efe..430b5ce88aa 100644
--- a/code/datums/wires/syndicatebomb.dm
+++ b/code/datums/wires/syndicatebomb.dm
@@ -96,7 +96,6 @@
if(BOMB_WIRE_ACTIVATE)
if(!mended && B.active)
holder.visible_message("[bicon(B)] The timer stops! The bomb has been defused!")
- B.active = FALSE
B.defused = TRUE
B.update_icon()
..()
diff --git a/code/defines/procs/dbcore.dm b/code/defines/procs/dbcore.dm
index 76e5a1fd0a6..90a5b0db40c 100644
--- a/code/defines/procs/dbcore.dm
+++ b/code/defines/procs/dbcore.dm
@@ -72,12 +72,21 @@ DBConnection/proc/NewQuery(sql_query,cursor_handler=src.default_cursor) return n
DBQuery/New(sql_query,DBConnection/connection_handler,cursor_handler)
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "DB query blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to create a DB query via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to create a DB query via advanced proc-call")
+ return
if(sql_query) src.sql = sql_query
if(connection_handler) src.db_connection = connection_handler
if(cursor_handler) src.default_cursor = cursor_handler
_db_query = _dm_db_new_query()
return ..()
+DBQuery/CanProcCall()
+ // dont even try it
+ return FALSE
+
DBQuery
var/sql // The sql query being executed.
diff --git a/code/game/area/areas/depot-areas.dm b/code/game/area/areas/depot-areas.dm
index 48760540c78..4a6606d836e 100644
--- a/code/game/area/areas/depot-areas.dm
+++ b/code/game/area/areas/depot-areas.dm
@@ -292,7 +292,7 @@
if(!reactor.has_overloaded)
reactor.overload(containment_failure)
else
- log_debug("Depot: [src] called activate_self_destruct with no reactor.");
+ log_debug("Depot: [src] called activate_self_destruct with no reactor.")
message_admins("Syndicate Depot lacks reactor to initiate self-destruct. Must be destroyed manually.")
updateicon()
diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm
index 630bae796e1..7501ac8040b 100644
--- a/code/game/dna/dna_modifier.dm
+++ b/code/game/dna/dna_modifier.dm
@@ -479,7 +479,7 @@
occupantData["uniqueIdentity"] = connected.occupant.dna.uni_identity
occupantData["structuralEnzymes"] = connected.occupant.dna.struc_enzymes
occupantData["radiationLevel"] = connected.occupant.radiation
- data["occupant"] = occupantData;
+ data["occupant"] = occupantData
data["isBeakerLoaded"] = connected.beaker ? 1 : 0
data["beakerLabel"] = null
diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
index d6062a02c5d..28afcaa9c36 100644
--- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
+++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
@@ -49,7 +49,7 @@
/obj/item/organ/internal/cyberimp/eyes/shield/ling/on_life()
..()
var/obj/item/organ/internal/eyes/E = owner.get_int_organ(/obj/item/organ/internal/eyes)
- if(owner.eye_blind || owner.eye_blurry || (BLINDNESS in owner.mutations) || (NEARSIGHTED in owner.mutations) || (E.damage > 0))
+ if(owner.eye_blind || owner.eye_blurry || (BLINDNESS in owner.mutations) || (NEARSIGHTED in owner.mutations) || (E && E.damage > 0))
owner.reagents.add_reagent("oculine", 1)
/obj/item/organ/internal/cyberimp/eyes/shield/ling/prepare_eat()
diff --git a/code/game/gamemodes/miniantags/guardian/types/healer.dm b/code/game/gamemodes/miniantags/guardian/types/healer.dm
index 75f5fddba53..c3f8046f0a9 100644
--- a/code/game/gamemodes/miniantags/guardian/types/healer.dm
+++ b/code/game/gamemodes/miniantags/guardian/types/healer.dm
@@ -65,7 +65,7 @@
if(loc == summoner)
if(toggle)
a_intent = INTENT_HARM
- hud_used.action_intent.icon_state = a_intent;
+ hud_used.action_intent.icon_state = a_intent
speed = 0
damage_transfer = 0.7
if(adminseal)
@@ -76,7 +76,7 @@
toggle = FALSE
else
a_intent = INTENT_HELP
- hud_used.action_intent.icon_state = a_intent;
+ hud_used.action_intent.icon_state = a_intent
speed = 1
damage_transfer = 1
if(adminseal)
diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm
index 182bcc78bd2..d9e59e9ded1 100644
--- a/code/game/gamemodes/scoreboard.dm
+++ b/code/game/gamemodes/scoreboard.dm
@@ -1,5 +1,21 @@
/datum/controller/subsystem/ticker/proc/scoreboard()
+ //Thresholds for Score Ratings
+ #define SINGULARITY_DESERVES_BETTER -3500
+ #define SINGULARITY_FODDER -3000
+ #define ALL_FIRED -2500
+ #define WASTE_OF_OXYGEN -2000
+ #define HEAP_OF_SCUM -1500
+ #define LAB_MONKEYS -1000
+ #define UNDESIREABLES -500
+ #define SERVANTS_OF_SCIENCE 500
+ #define GOOD_BUNCH 1000
+ #define MACHINE_THIRTEEN 1500
+ #define PROMOTIONS_FOR_EVERYONE 2000
+ #define AMBASSADORS_OF_DISCOVERY 3000
+ #define PRIDE_OF_SCIENCE 4000
+ #define NANOTRANSEN_FINEST 5000
+
//Print a list of antagonists to the server log
var/list/total_antagonists = list()
//Look into all mobs in world, dead or alive
@@ -93,15 +109,14 @@
// Bonus Modifiers
- //var/traitorwins = score_traitorswon
var/deathpoints = GLOB.score_deadcrew * 25 //done
var/researchpoints = GLOB.score_researchdone * 30
var/eventpoints = GLOB.score_eventsendured * 50
var/escapoints = GLOB.score_escapees * 25 //done
- var/harvests = GLOB.score_stuffharvested * 5 //done
+ var/harvests = GLOB.score_stuffharvested * 5
var/shipping = GLOB.score_stuffshipped * 5
- var/mining = GLOB.score_oremined * 2 //done
- var/meals = GLOB.score_meals * 5 //done, but this only counts cooked meals, not drinks served
+ var/mining = GLOB.score_oremined * 2 //done, might want polishing
+ var/meals = GLOB.score_meals * 5
var/power = GLOB.score_powerloss * 20
var/messpoints
if(GLOB.score_mess != 0)
@@ -121,13 +136,9 @@
GLOB.score_crewscore += 2500
GLOB.score_powerbonus = 1
- if(GLOB.score_mess == 0)
- GLOB.score_crewscore += 3000
- GLOB.score_messbonus = 1
-
GLOB.score_crewscore += meals
- if(GLOB.score_allarrested)
+ if(GLOB.score_allarrested) // This only seems to be implemented for Rev and Nukies. -DaveKorhal
GLOB.score_crewscore *= 3 // This needs to be here for the bonus to be applied properly
@@ -177,26 +188,19 @@
dat += {"
General Statistics
- The Good:
-
- Useful Items Shipped: [GLOB.score_stuffshipped] ([GLOB.score_stuffshipped * 5] Points)
- Hydroponics Harvests: [GLOB.score_stuffharvested] ([GLOB.score_stuffharvested * 5] Points)
- Ore Mined: [GLOB.score_oremined] ([GLOB.score_oremined * 2] Points)
- Refreshments Prepared: [GLOB.score_meals] ([GLOB.score_meals * 5] Points)
- Research Completed: [GLOB.score_researchdone] ([GLOB.score_researchdone * 30] Points)
"}
+ The Good
+ Ore Mined: [GLOB.score_oremined] ([GLOB.score_oremined * 2] Points)
"}
if(SSshuttle.emergency.mode == SHUTTLE_ENDGAME) dat += "Shuttle Escapees: [GLOB.score_escapees] ([GLOB.score_escapees * 25] Points)
"
- dat += {"Random Events Endured: [GLOB.score_eventsendured] ([GLOB.score_eventsendured * 50] Points)
- Whole Station Powered: [GLOB.score_powerbonus ? "Yes" : "No"] ([GLOB.score_powerbonus * 2500] Points)
- Ultra-Clean Station: [GLOB.score_mess ? "No" : "Yes"] ([GLOB.score_messbonus * 3000] Points)
- The bad:
+ dat += {"
+ Whole Station Powered: [GLOB.score_powerbonus ? "Yes" : "No"] ([GLOB.score_powerbonus * 2500] Points)
+ The Bad
Dead bodies on Station: [GLOB.score_deadcrew] (-[GLOB.score_deadcrew * 25] Points)
Uncleaned Messes: [GLOB.score_mess] (-[GLOB.score_mess] Points)
Station Power Issues: [GLOB.score_powerloss] (-[GLOB.score_powerloss * 20] Points)
- Rampant Diseases: [GLOB.score_disease] (-[GLOB.score_disease * 30] Points)
AI Destroyed: [GLOB.score_deadaipenalty ? "Yes" : "No"] (-[GLOB.score_deadaipenalty * 250] Points)
- The Weird
+ The Weird
Food Eaten: [GLOB.score_foodeaten] bites/sips
Times a Clown was Abused: [GLOB.score_clownabuse]
"}
@@ -218,22 +222,36 @@
var/score_rating = "The Aristocrats!"
switch(GLOB.score_crewscore)
- if(-99999 to -50000) score_rating = "Even the Singularity Deserves Better"
- if(-49999 to -5000) score_rating = "Singularity Fodder"
- if(-4999 to -1000) score_rating = "You're All Fired"
- if(-999 to -500) score_rating = "A Waste of Perfectly Good Oxygen"
- if(-499 to -250) score_rating = "A Wretched Heap of Scum and Incompetence"
- if(-249 to -100) score_rating = "Outclassed by Lab Monkeys"
- if(-99 to -21) score_rating = "The Undesirables"
- if(-20 to 20) score_rating = "Ambivalently Average"
- if(21 to 99) score_rating = "Not Bad, but Not Good"
- if(100 to 249) score_rating = "Skillful Servants of Science"
- if(250 to 499) score_rating = "Best of a Good Bunch"
- if(500 to 999) score_rating = "Lean Mean Machine Thirteen"
- if(1000 to 4999) score_rating = "Promotions for Everyone"
- if(5000 to 9999) score_rating = "Ambassadors of Discovery"
- if(10000 to 49999) score_rating = "The Pride of Science Itself"
- if(50000 to INFINITY) score_rating = "Nanotrasen's Finest"
+ if(-99999 to SINGULARITY_DESERVES_BETTER) score_rating = "Even the Singularity Deserves Better"
+ if(SINGULARITY_DESERVES_BETTER+1 to SINGULARITY_FODDER) score_rating = "Singularity Fodder"
+ if(SINGULARITY_FODDER+1 to ALL_FIRED) score_rating = "You're All Fired"
+ if(ALL_FIRED+1 to WASTE_OF_OXYGEN) score_rating = "A Waste of Perfectly Good Oxygen"
+ if(WASTE_OF_OXYGEN+1 to HEAP_OF_SCUM) score_rating = "A Wretched Heap of Scum and Incompetence"
+ if(HEAP_OF_SCUM+1 to LAB_MONKEYS) score_rating = "Outclassed by Lab Monkeys"
+ if(LAB_MONKEYS+1 to UNDESIREABLES) score_rating = "The Undesirables"
+ if(UNDESIREABLES+1 to SERVANTS_OF_SCIENCE-1) score_rating = "Ambivalently Average"
+ if(SERVANTS_OF_SCIENCE to GOOD_BUNCH-1) score_rating = "Skillful Servants of Science"
+ if(GOOD_BUNCH to MACHINE_THIRTEEN-1) score_rating = "Best of a Good Bunch"
+ if(MACHINE_THIRTEEN to PROMOTIONS_FOR_EVERYONE-1) score_rating = "Lean Mean Machine Thirteen"
+ if(PROMOTIONS_FOR_EVERYONE to AMBASSADORS_OF_DISCOVERY-1) score_rating = "Promotions for Everyone"
+ if(AMBASSADORS_OF_DISCOVERY to PRIDE_OF_SCIENCE-1) score_rating = "Ambassadors of Discovery"
+ if(PRIDE_OF_SCIENCE to NANOTRANSEN_FINEST-1) score_rating = "The Pride of Science Itself"
+ if(NANOTRANSEN_FINEST to INFINITY) score_rating = "Nanotrasen's Finest"
dat += "RATING: [score_rating]"
src << browse(dat, "window=roundstats;size=500x600")
+
+ #undef SINGULARITY_DESERVES_BETTER
+ #undef SINGULARITY_FODDER
+ #undef ALL_FIRED
+ #undef WASTE_OF_OXYGEN
+ #undef HEAP_OF_SCUM
+ #undef LAB_MONKEYS
+ #undef UNDESIREABLES
+ #undef SERVANTS_OF_SCIENCE
+ #undef GOOD_BUNCH
+ #undef MACHINE_THIRTEEN
+ #undef PROMOTIONS_FOR_EVERYONE
+ #undef AMBASSADORS_OF_DISCOVERY
+ #undef PRIDE_OF_SCIENCE
+ #undef NANOTRANSEN_FINEST
diff --git a/code/game/jobs/job_scaling.dm b/code/game/jobs/job_scaling.dm
index c062fe6c216..7c2a98b36df 100644
--- a/code/game/jobs/job_scaling.dm
+++ b/code/game/jobs/job_scaling.dm
@@ -4,8 +4,8 @@
var/highpop_trigger = 80
if(playercount >= highpop_trigger)
- log_debug("Playercount: [playercount] versus trigger: [highpop_trigger] - loading highpop job config");
+ log_debug("Playercount: [playercount] versus trigger: [highpop_trigger] - loading highpop job config")
SSjobs.LoadJobs("config/jobs_highpop.txt")
else
- log_debug("Playercount: [playercount] versus trigger: [highpop_trigger] - keeping standard job config");
+ log_debug("Playercount: [playercount] versus trigger: [highpop_trigger] - keeping standard job config")
return 1
diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index ba139e50855..44b55ed1d2c 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -153,6 +153,9 @@
to_chat(user, "You screw the circuit board into place.")
state = SCREWED_CORE
if(GLASS_CORE)
+ var/area/R = get_area(src)
+ message_admins("[key_name_admin(usr)] has completed an AI core in [R]: [ADMIN_COORDJMP(loc)].")
+ log_game("[key_name(usr)] has completed an AI core in [R]: [COORD(loc)].")
to_chat(user, "You connect the monitor.")
if(!brain)
var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes"
diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index 978ba25b8d3..8d6c545e0a8 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -52,7 +52,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
//This is used to keep track of opened positions for jobs to allow instant closing
//Assoc array: "JobName" = (int)
- var/list/opened_positions = list();
+ var/list/opened_positions = list()
/obj/machinery/computer/card/proc/is_centcom()
return istype(src, /obj/machinery/computer/card/centcom)
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index 9a1fd08d289..e161891cdbc 100644
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -424,8 +424,6 @@
else
return menu_state
-/proc/enable_prison_shuttle(var/mob/user);
-
/proc/call_shuttle_proc(var/mob/user, var/reason)
if(GLOB.sent_strike_team == 1)
to_chat(user, "Central Command will not allow the shuttle to be called. Consider all contracts terminated.")
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 1450278e736..e97c460de4b 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -192,10 +192,10 @@ About the new airlock wires panel:
return wires.IsIndexCut(wireIndex)
/obj/machinery/door/airlock/proc/canAIControl()
- return ((aiControlDisabled!=1) && (!isAllPowerLoss()));
+ return ((aiControlDisabled!=1) && (!isAllPowerLoss()))
/obj/machinery/door/airlock/proc/canAIHack()
- return ((aiControlDisabled==1) && (!hackProof) && (!isAllPowerLoss()));
+ return ((aiControlDisabled==1) && (!hackProof) && (!isAllPowerLoss()))
/obj/machinery/door/airlock/proc/arePowerSystemsOn()
if(stat & (NOPOWER|BROKEN))
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index fcd6de4020c..6d2586c46aa 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -195,7 +195,7 @@ GLOBAL_LIST_EMPTY(holopads)
for(var/mob/living/silicon/ai/AI in GLOB.ai_list)
if(!AI.client)
continue
- to_chat(AI, "Your presence is requested at \the [area].")
+ to_chat(AI, "Your presence is requested at \the [area].")
else
temp = "A request for AI presence was already sent recently.
"
temp += "Main Menu"
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index 81379df97c4..85799279ff4 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -59,7 +59,7 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
var/announceAuth = 0 //Will be set to 1 when you authenticate yourself for announcements
var/msgVerified = "" //Will contain the name of the person who varified it
var/msgStamped = "" //If a message is stamped, this will contain the stamp name
- var/message = "";
+ var/message = ""
var/recipient = ""; //the department which will be receiving the message
var/priority = -1 ; //Priority of the message being sent
light_range = 0
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index 2d15472f521..181d5e494da 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -77,11 +77,10 @@
update_icon()
try_detonate(TRUE)
//Counter terrorists win
- else if(!active || defused)
- if(defused && (payload in src))
+ else if(defused)
+ active = FALSE
+ if(payload in src)
payload.defuse()
- countdown.stop()
- STOP_PROCESSING(SSfastprocess, src)
/obj/machinery/syndicatebomb/New()
wires = new(src)
diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm
index 9907e903970..a55c2a731eb 100644
--- a/code/game/objects/effects/effect_system.dm
+++ b/code/game/objects/effects/effect_system.dm
@@ -1134,7 +1134,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
qdel(src)
/obj/structure/foamedmetal/attack_alien(mob/living/carbon/alien/humanoid/M)
- M.visible_message("[M] tears apart \the [src]!");
+ M.visible_message("[M] tears apart \the [src]!")
qdel(src)
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5)
diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm
index 8b82341a06c..2d2b110fa06 100644
--- a/code/game/objects/items/robot/robot_upgrades.dm
+++ b/code/game/objects/items/robot/robot_upgrades.dm
@@ -48,7 +48,7 @@
if(..())
return
if(!R.allow_rename)
- to_chat(R, "Internal diagnostic error: incompatible upgrade module detected.");
+ to_chat(R, "Internal diagnostic error: incompatible upgrade module detected.")
return 0
R.notify_ai(3, R.name, heldname)
R.name = heldname
@@ -196,7 +196,7 @@
if(R.emagged)
return
if(R.weapons_unlock)
- to_chat(R, "Internal diagnostic error: incompatible upgrade module detected.");
+ to_chat(R, "Internal diagnostic error: incompatible upgrade module detected.")
return
R.emagged = 1
return TRUE
diff --git a/code/game/objects/structures/foodcart.dm b/code/game/objects/structures/foodcart.dm
index 198dbf5f195..3a9a3414986 100644
--- a/code/game/objects/structures/foodcart.dm
+++ b/code/game/objects/structures/foodcart.dm
@@ -40,7 +40,7 @@
food_slots[s]=I
update_icon()
success = 1
- break;
+ break
if(!success)
to_chat(user, fail_msg)
else if(istype(I, /obj/item/reagent_containers/food/drinks))
@@ -51,7 +51,7 @@
drink_slots[s]=I
update_icon()
success = 1
- break;
+ break
if(!success)
to_chat(user, fail_msg)
else if(istype(I, /obj/item/wrench))
diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm
index 25693b58f47..09df94dc06e 100644
--- a/code/modules/admin/DB ban/functions.dm
+++ b/code/modules/admin/DB ban/functions.dm
@@ -211,7 +211,7 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
query.Execute()
while(query.NextRow())
ban_id = query.item[1]
- ban_number++;
+ ban_number++
if(ban_number == 0)
to_chat(usr, "Database update failed due to no bans fitting the search criteria. If this is not a legacy ban you should contact the database admin.")
@@ -314,7 +314,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
query.Execute()
while(query.NextRow())
pckey = query.item[1]
- ban_number++;
+ ban_number++
if(ban_number == 0)
to_chat(usr, "Database update failed due to a ban id not being present in the database.")
diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm
index 5956819d3d4..afb4b19eee2 100644
--- a/code/modules/admin/admin_ranks.dm
+++ b/code/modules/admin/admin_ranks.dm
@@ -61,6 +61,11 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons
return 1
/proc/load_admins()
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "Admin reload blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to reload admins via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to reload admins via advanced proc-call")
+ return
//clear the datums references
GLOB.admin_datums.Cut()
for(var/client/C in GLOB.admins)
diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm
index 740d182f3f2..470293bfe76 100644
--- a/code/modules/admin/holder2.dm
+++ b/code/modules/admin/holder2.dm
@@ -16,6 +16,11 @@ GLOBAL_PROTECT(admin_datums) // This is protected because we dont want people ma
var/admincaster_signature //What you'll sign the newsfeeds as
/datum/admins/New(initial_rank = "Temporary Admin", initial_rights = 0, ckey)
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "Admin rank creation blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to create a new admin rank via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to edit feedback a new admin rank via advanced proc-call")
+ return
if(!ckey)
error("Admin datum created without a ckey argument. Datum has been deleted")
qdel(src)
@@ -26,10 +31,20 @@ GLOBAL_PROTECT(admin_datums) // This is protected because we dont want people ma
GLOB.admin_datums[ckey] = src
/datum/admins/Destroy()
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "Admin rank deletion blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to delete an admin rank via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to delete an admin rank via advanced proc-call")
+ return
..()
return QDEL_HINT_HARDDEL_NOW
/datum/admins/proc/associate(client/C)
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "Rank association blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to associate an admin rank to a new client via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to associate an admin rank to a new client via advanced proc-call")
+ return
if(istype(C))
owner = C
owner.holder = src
@@ -39,6 +54,11 @@ GLOBAL_PROTECT(admin_datums) // This is protected because we dont want people ma
GLOB.admins |= C
/datum/admins/proc/disassociate()
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "Rank disassociation blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to disassociate an admin rank from a client via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to disassociate an admin rank from a client via advanced proc-call")
+ return
if(owner)
GLOB.admins -= owner
owner.remove_admin_verbs()
@@ -88,6 +108,11 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
return 0
/client/proc/deadmin()
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "Deadmin blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to de-admin a client via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to de-admin a client via advanced proc-call")
+ return
GLOB.admin_datums -= ckey
if(holder)
holder.disassociate()
diff --git a/code/modules/admin/permissionverbs/permissionedit.dm b/code/modules/admin/permissionverbs/permissionedit.dm
index 795538c7c33..952630c798a 100644
--- a/code/modules/admin/permissionverbs/permissionedit.dm
+++ b/code/modules/admin/permissionverbs/permissionedit.dm
@@ -102,6 +102,11 @@
to_chat(usr, "Admin rank changed.")
/datum/admins/proc/log_admin_permission_modification(var/adm_ckey, var/new_permission)
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "Admin edit blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to edit admin ranks via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to edit admin ranks via advanced proc-call")
+ return
if(config.admin_legacy_system)
return
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index ac8adc5fdf0..50fa99778e7 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -3475,9 +3475,9 @@
hunter_mind.objectives += protect_objective
SSticker.mode.traitors |= hunter_mob.mind
to_chat(hunter_mob, "ATTENTION: You are now on a mission!")
- to_chat(hunter_mob, "Goal: [killthem ? "MURDER" : "PROTECT"] [H.real_name], currently in [get_area(H.loc)]. ");
+ to_chat(hunter_mob, "Goal: [killthem ? "MURDER" : "PROTECT"] [H.real_name], currently in [get_area(H.loc)]. ")
if(killthem)
- to_chat(hunter_mob, "If you kill [H.p_them()], [H.p_they()] cannot be revived.");
+ to_chat(hunter_mob, "If you kill [H.p_them()], [H.p_they()] cannot be revived.")
hunter_mob.mind.special_role = SPECIAL_ROLE_TRAITOR
var/datum/atom_hud/antag/tatorhud = GLOB.huds[ANTAG_HUD_TRAITOR]
tatorhud.join_hud(hunter_mob)
diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
index 018b45422c5..c4eabef3eae 100644
--- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm
+++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
@@ -444,9 +444,9 @@
if(object == world) // Global proc.
procname = "/proc/[procname]"
- return call(procname)(arglist(new_args))
+ return (WrapAdminProcCall(GLOBAL_PROC, procname, new_args))
- return call(object, procname)(arglist(new_args))
+ return (WrapAdminProcCall(object, procname, new_args))
/proc/SDQL2_tokenize(query_text)
diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm
index 8ac9c4fd2b0..f74b8c9d030 100644
--- a/code/modules/admin/verbs/adminhelp.dm
+++ b/code/modules/admin/verbs/adminhelp.dm
@@ -165,7 +165,7 @@ GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown","the","a","an","of","mo
var/admin_number_ignored = 0 //Holds the number of admins without +BAN (so admins who are not really admins)
var/admin_number_decrease = 0 //Holds the number of admins with are afk, ignored or both
for(var/client/X in GLOB.admins)
- admin_number_total++;
+ admin_number_total++
var/invalid = 0
if(requiredflags != 0 && !check_rights_for(X, requiredflags))
admin_number_ignored++
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index c58f33cc4ce..424e3c91f57 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -85,18 +85,80 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
return
message_admins("[key_name_admin(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
log_admin("[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
- returnval = call(target,procname)(arglist(lst)) // Pass the lst as an argument list to the proc
+ returnval = WrapAdminProcCall(target, procname, lst) // Pass the lst as an argument list to the proc
else
//this currently has no hascall protection. wasn't able to get it working.
message_admins("[key_name_admin(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]")
log_admin("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]")
- returnval = call(procname)(arglist(lst)) // Pass the lst as an argument list to the proc
+ returnval = WrapAdminProcCall(GLOBAL_PROC, procname, lst) // Pass the lst as an argument list to the proc
to_chat(usr, "[procname] returned: [!isnull(returnval) ? returnval : "null"]")
feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+// All these vars are related to proc call protection
+// If you add more of these, for the love of fuck, protect them
+
+/// Who is currently calling procs
GLOBAL_VAR(AdminProcCaller)
GLOBAL_PROTECT(AdminProcCaller)
+/// How many procs have been called
+GLOBAL_VAR_INIT(AdminProcCallCount, 0)
+GLOBAL_PROTECT(AdminProcCallCount)
+/// UID of the admin who last called
+GLOBAL_VAR(LastAdminCalledTargetUID)
+GLOBAL_PROTECT(LastAdminCalledTargetUID)
+/// Last target to have a proc called on it
+GLOBAL_VAR(LastAdminCalledTarget)
+GLOBAL_PROTECT(LastAdminCalledTarget)
+/// Last proc called
+GLOBAL_VAR(LastAdminCalledProc)
+GLOBAL_PROTECT(LastAdminCalledProc)
+/// List to handle proc call spam prevention
+GLOBAL_LIST_EMPTY(AdminProcCallSpamPrevention)
+GLOBAL_PROTECT(AdminProcCallSpamPrevention)
+
+
+// Wrapper for proccalls where the datum is flagged as vareditted
+/proc/WrapAdminProcCall(datum/target, procname, list/arguments)
+ if(target && procname == "Del")
+ to_chat(usr, "Calling Del() is not allowed")
+ return
+
+ if(target != GLOBAL_PROC && !target.CanProcCall(procname))
+ to_chat(usr, "Proccall on [target.type]/proc/[procname] is disallowed!")
+ return
+ var/current_caller = GLOB.AdminProcCaller
+ var/ckey = usr ? usr.client.ckey : GLOB.AdminProcCaller
+ if(!ckey)
+ CRASH("WrapAdminProcCall with no ckey: [target] [procname] [english_list(arguments)]")
+ if(current_caller && current_caller != ckey)
+ if(!GLOB.AdminProcCallSpamPrevention[ckey])
+ to_chat(usr, "Another set of admin called procs are still running, your proc will be run after theirs finish.")
+ GLOB.AdminProcCallSpamPrevention[ckey] = TRUE
+ UNTIL(!GLOB.AdminProcCaller)
+ to_chat(usr, "Running your proc")
+ GLOB.AdminProcCallSpamPrevention -= ckey
+ else
+ UNTIL(!GLOB.AdminProcCaller)
+ GLOB.LastAdminCalledProc = procname
+ if(target != GLOBAL_PROC)
+ GLOB.LastAdminCalledTargetUID = target.UID()
+ GLOB.AdminProcCaller = ckey //if this runtimes, too bad for you
+ ++GLOB.AdminProcCallCount
+ . = world.WrapAdminProcCall(target, procname, arguments)
+ if(--GLOB.AdminProcCallCount == 0)
+ GLOB.AdminProcCaller = null
+
+//adv proc call this, ya nerds
+/world/proc/WrapAdminProcCall(datum/target, procname, list/arguments)
+ if(target == GLOBAL_PROC)
+ return call(procname)(arglist(arguments))
+ else if(target != world)
+ return call(target, procname)(arglist(arguments))
+ else
+ to_chat(usr, "Call to world/proc/[procname] blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to call world/proc/[procname] with arguments: [english_list(arguments)]")
+ log_admin("[key_name(usr)] attempted to call world/proc/[procname] with arguments: [english_list(arguments)]l")
/proc/IsAdminAdvancedProcCall()
#ifdef TESTING
@@ -131,7 +193,7 @@ GLOBAL_PROTECT(AdminProcCaller)
log_admin("[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]")
spawn()
- var/returnval = call(A,procname)(arglist(lst)) // Pass the lst as an argument list to the proc
+ var/returnval = WrapAdminProcCall(A, procname, lst) // Pass the lst as an argument list to the proc
to_chat(src, "[procname] returned: [!isnull(returnval) ? returnval : "null"]")
feedback_add_details("admin_verb","DPC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -428,7 +490,7 @@ GLOBAL_PROTECT(AdminProcCaller)
id.icon_state = "gold"
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
else
- var/obj/item/card/id/id = new/obj/item/card/id(M);
+ var/obj/item/card/id/id = new/obj/item/card/id(M)
id.icon_state = "gold"
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
id.registered_name = H.real_name
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index 6ec103cccc9..ed01bc822a7 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -53,7 +53,7 @@ GLOBAL_LIST_EMPTY(sounds_cache)
set name = "Play Server Sound"
if(!check_rights(R_SOUNDS)) return
- var/list/sounds = file2list("sound/serversound_list.txt");
+ var/list/sounds = file2list("sound/serversound_list.txt")
sounds += GLOB.sounds_cache
var/melody = input("Select a sound from the server to play", "Server sound list") as null|anything in sounds
@@ -71,7 +71,7 @@ GLOBAL_LIST_EMPTY(sounds_cache)
var/A = alert("This will play a sound at every intercomm, are you sure you want to continue? This works best with short sounds, beware.","Warning","Yep","Nope")
if(A != "Yep") return
- var/list/sounds = file2list("sound/serversound_list.txt");
+ var/list/sounds = file2list("sound/serversound_list.txt")
sounds += GLOB.sounds_cache
var/melody = input("Select a sound from the server to play", "Server sound list") as null|anything in sounds
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index a7763f31fb1..03315243602 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -627,7 +627,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
print_command_report(input, "[command_name()] Update")
if("No")
//same thing as the blob stuff - it's not public, so it's classified, dammit
- GLOB.command_announcer.autosay("A classified message has been printed out at all communication consoles.");
+ GLOB.command_announcer.autosay("A classified message has been printed out at all communication consoles.")
print_command_report(input, "Classified [command_name()] Update")
else
return
diff --git a/code/modules/events/money_hacker.dm b/code/modules/events/money_hacker.dm
index f26c12f5f7d..ba50cbbfd8f 100644
--- a/code/modules/events/money_hacker.dm
+++ b/code/modules/events/money_hacker.dm
@@ -38,7 +38,7 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0)
if(!isnull(affected_account) && !affected_account.suspended)
message = "The hack attempt has succeeded."
- var/lost = affected_account.money * (MINIMUM_PERCENTAGE_LOSS + rand(0,VARIABLE_LOSS) / 10);
+ var/lost = affected_account.money * (MINIMUM_PERCENTAGE_LOSS + rand(0,VARIABLE_LOSS) / 10)
affected_account.phantom_charge(lost)
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 997920c8e23..336ebdb8b67 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -624,7 +624,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(href_list["jump"])
var/mob/target = locate(href_list["jump"])
- var/mob/A = usr;
+ var/mob/A = usr
to_chat(A, "Teleporting to [target]...")
//var/mob/living/silicon/ai/A = locate(href_list["track2"]) in GLOB.mob_list
if(target && target != usr)
diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm
index 496a12cbf82..7acf07f4471 100644
--- a/code/modules/mob/living/carbon/alien/larva/life.dm
+++ b/code/modules/mob/living/carbon/alien/larva/life.dm
@@ -16,7 +16,7 @@
death()
return
- if(paralysis || sleeping || getOxyLoss() > 50 || (HEALTH_THRESHOLD_CRIT <= health && check_death_method()))
+ if(paralysis || sleeping || getOxyLoss() > 50 || (health <= HEALTH_THRESHOLD_CRIT && check_death_method()))
if(stat == CONSCIOUS)
KnockOut()
create_debug_log("fell unconscious, trigger reason: [reason]")
diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm
index 99d135df93b..2a1662b064d 100644
--- a/code/modules/mob/living/silicon/robot/component.dm
+++ b/code/modules/mob/living/silicon/robot/component.dm
@@ -227,7 +227,7 @@
throw_speed = 5
throw_range = 10
origin_tech = "magnets=1;biotech=1"
- var/mode = 1;
+ var/mode = 1
/obj/item/robotanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
if(( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index d0452293927..cc9d22ec673 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -239,7 +239,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
if(custom_name)
return 0
if(!allow_rename)
- to_chat(src, "Rename functionality is not enabled on this unit.");
+ to_chat(src, "Rename functionality is not enabled on this unit.")
return 0
rename_self(braintype, 1)
diff --git a/code/modules/mob/new_player/poll.dm b/code/modules/mob/new_player/poll.dm
index f67c53c9941..19893819e0c 100644
--- a/code/modules/mob/new_player/poll.dm
+++ b/code/modules/mob/new_player/poll.dm
@@ -92,7 +92,7 @@
var output = ""
if(polltype == POLLTYPE_MULTI || polltype == POLLTYPE_OPTION)
- select_query = GLOB.dbcon.NewQuery("SELECT text, percentagecalc, (SELECT COUNT(optionid) FROM [format_table_name("poll_vote")] WHERE optionid = poll_option.id GROUP BY optionid) AS votecount FROM [format_table_name("poll_option")] WHERE pollid = [pollid]");
+ select_query = GLOB.dbcon.NewQuery("SELECT text, percentagecalc, (SELECT COUNT(optionid) FROM [format_table_name("poll_vote")] WHERE optionid = poll_option.id GROUP BY optionid) AS votecount FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
select_query.Execute()
var/list/options = list()
var/total_votes = 1
@@ -177,7 +177,7 @@
output += ""
output += ""
if(polltype == POLLTYPE_TEXT)
- select_query = GLOB.dbcon.NewQuery("SELECT replytext, COUNT(replytext) AS countresponse, GROUP_CONCAT(DISTINCT ckey SEPARATOR ', ') as ckeys FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] GROUP BY replytext ORDER BY countresponse DESC");
+ select_query = GLOB.dbcon.NewQuery("SELECT replytext, COUNT(replytext) AS countresponse, GROUP_CONCAT(DISTINCT ckey SEPARATOR ', ') as ckeys FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] GROUP BY replytext ORDER BY countresponse DESC")
select_query.Execute()
output += {"
diff --git a/code/modules/nano/nanomapgen.dm b/code/modules/nano/nanomapgen.dm
index be9c5bbe2b3..b0a8869191f 100644
--- a/code/modules/nano/nanomapgen.dm
+++ b/code/modules/nano/nanomapgen.dm
@@ -57,7 +57,7 @@
log_world("NanoMapGen: GENERATE MAP ([startX],[startY],[currentZ]) to ([endX],[endY],[currentZ])")
to_chat(usr, "NanoMapGen: GENERATE MAP ([startX],[startY],[currentZ]) to ([endX],[endY],[currentZ])")
- var/count = 0;
+ var/count = 0
for(var/WorldX = startX, WorldX <= endX, WorldX++)
for(var/WorldY = startY, WorldY <= endY, WorldY++)
diff --git a/code/modules/nano/subsystem.dm b/code/modules/nano/subsystem.dm
index 6ad4201b93d..f2f86c02a3c 100644
--- a/code/modules/nano/subsystem.dm
+++ b/code/modules/nano/subsystem.dm
@@ -163,7 +163,7 @@
if(isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list))
open_uis[src_object_key] = list(ui.ui_key = list())
else if(isnull(open_uis[src_object_key][ui.ui_key]) || !istype(open_uis[src_object_key][ui.ui_key], /list))
- open_uis[src_object_key][ui.ui_key] = list();
+ open_uis[src_object_key][ui.ui_key] = list()
ui.user.open_uis.Add(ui)
var/list/uis = open_uis[src_object_key][ui.ui_key]
diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm
index 0cb571d576c..45195bb1730 100644
--- a/code/modules/paperwork/photography.dm
+++ b/code/modules/paperwork/photography.dm
@@ -231,7 +231,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor
var/atoms[] = list()
for(var/turf/the_turf in turfs)
// Add ourselves to the list of stuff to draw
- atoms.Add(the_turf);
+ atoms.Add(the_turf)
// As well as anything that isn't invisible.
for(var/atom/A in the_turf)
if(A.invisibility)
diff --git a/code/modules/projectiles/guns/syringe_gun.dm b/code/modules/projectiles/guns/syringe_gun.dm
index 04cf2d248d3..72c60277dec 100644
--- a/code/modules/projectiles/guns/syringe_gun.dm
+++ b/code/modules/projectiles/guns/syringe_gun.dm
@@ -18,62 +18,61 @@
..()
chambered = new /obj/item/ammo_casing/syringegun(src)
-/obj/item/gun/syringe/newshot()
- if(!syringes.len)
+/obj/item/gun/syringe/process_chamber()
+ if(!length(syringes) || chambered.BB)
return
var/obj/item/reagent_containers/syringe/S = syringes[1]
-
if(!S)
return
- chambered.BB = new S.projectile_type (src)
-
+ chambered.BB = new S.projectile_type(src)
S.reagents.trans_to(chambered.BB, S.reagents.total_volume)
chambered.BB.name = S.name
+
syringes.Remove(S)
-
qdel(S)
- return
-/obj/item/gun/syringe/process_chamber()
- return
-
-/obj/item/gun/syringe/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, params)
+/obj/item/gun/syringe/afterattack(atom/target, mob/living/user, flag, params)
if(target == loc)
return
- newshot()
..()
/obj/item/gun/syringe/examine(mob/user)
. = ..()
- . += "Can hold [max_syringes] syringe\s. Has [syringes.len] syringe\s remaining."
+ var/num_syringes = syringes.len + (chambered.BB ? 1 : 0)
+ . += "Can hold [max_syringes] syringe\s. Has [num_syringes] syringe\s remaining."
-/obj/item/gun/syringe/attack_self(mob/living/user as mob)
- if(!syringes.len)
+/obj/item/gun/syringe/attack_self(mob/living/user)
+ if(!length(syringes) && !chambered.BB)
to_chat(user, "[src] is empty.")
- return 0
+ return FALSE
- var/obj/item/reagent_containers/syringe/S = syringes[syringes.len]
-
- if(!S)
- return 0
- S.loc = user.loc
+ var/obj/item/reagent_containers/syringe/S
+ if(chambered.BB) // Remove the chambered syringe first
+ S = new()
+ chambered.BB.reagents.trans_to(S, chambered.BB.reagents.total_volume)
+ qdel(chambered.BB)
+ chambered.BB = null
+ else
+ S = syringes[length(syringes)]
+ user.put_in_hands(S)
syringes.Remove(S)
+ process_chamber()
to_chat(user, "You unload [S] from \the [src]!")
+ return TRUE
- return 1
-
-/obj/item/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = 1)
+/obj/item/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
if(istype(A, /obj/item/reagent_containers/syringe))
- if(syringes.len < max_syringes)
+ if(length(syringes) < max_syringes)
if(!user.unEquip(A))
return
to_chat(user, "You load [A] into \the [src]!")
syringes.Add(A)
A.loc = src
- return 1
+ process_chamber() // Chamber the syringe if none is already
+ return TRUE
else
to_chat(user, "[src] cannot hold more syringes.")
else
diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm
index 91306d910f1..3fe0ef54c0c 100644
--- a/code/modules/research/message_server.dm
+++ b/code/modules/research/message_server.dm
@@ -305,6 +305,11 @@ GLOBAL_DATUM(blackbox, /obj/machinery/blackbox_recorder)
//This proc is only to be called at round end.
/obj/machinery/blackbox_recorder/proc/save_all_data_to_sql()
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "Blackbox seal blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to seal the blackbox via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to seal the blackbox via advanced proc-call")
+ return
if(!feedback) return
round_end_data_gathering() //round_end time logging and some other data processing
@@ -331,6 +336,11 @@ GLOBAL_DATUM(blackbox, /obj/machinery/blackbox_recorder)
proc/feedback_set(var/variable,var/value)
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "Feedback edit blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to edit feedback data via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to edit feedback data via advanced proc-call")
+ return
if(!GLOB.blackbox) return
variable = sanitizeSQL(variable)
@@ -342,6 +352,11 @@ proc/feedback_set(var/variable,var/value)
FV.set_value(value)
proc/feedback_inc(var/variable,var/value)
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "Feedback edit blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to edit feedback data via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to edit feedback data via advanced proc-call")
+ return
if(!GLOB.blackbox) return
variable = sanitizeSQL(variable)
@@ -353,6 +368,11 @@ proc/feedback_inc(var/variable,var/value)
FV.inc(value)
proc/feedback_dec(var/variable,var/value)
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "Feedback edit blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to edit feedback data via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to edit feedback data via advanced proc-call")
+ return
if(!GLOB.blackbox) return
variable = sanitizeSQL(variable)
@@ -364,6 +384,11 @@ proc/feedback_dec(var/variable,var/value)
FV.dec(value)
proc/feedback_set_details(var/variable,var/details)
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "Feedback edit blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to edit feedback data via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to edit feedback data via advanced proc-call")
+ return
if(!GLOB.blackbox) return
variable = sanitizeSQL(variable)
@@ -376,6 +401,11 @@ proc/feedback_set_details(var/variable,var/details)
FV.set_details(details)
proc/feedback_add_details(var/variable,var/details)
+ if(IsAdminAdvancedProcCall())
+ to_chat(usr, "Feedback edit blocked: Advanced ProcCall detected.")
+ message_admins("[key_name(usr)] attempted to edit feedback data via advanced proc-call")
+ log_admin("[key_name(usr)] attempted to edit feedback data via advanced proc-call")
+ return
if(!GLOB.blackbox) return
variable = sanitizeSQL(variable)
diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm
index de08d5cdf82..99e31ef25ed 100644
--- a/code/modules/shuttle/emergency.dm
+++ b/code/modules/shuttle/emergency.dm
@@ -297,7 +297,8 @@
timer = 0
open_dock()
-/obj/docking_port/mobile/emergency/proc/open_dock();
+/obj/docking_port/mobile/emergency/proc/open_dock()
+ pass()
/*
for(var/obj/machinery/door/poddoor/shuttledock/D in airlocks)
var/turf/T = get_step(D, D.checkdir)