mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Merge branch 'master' into tgui-medical
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
else return 1
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/proc/burst()
|
||||
src.visible_message("<span class='danger'>\The [src] bursts!</span>");
|
||||
src.visible_message("<span class='danger'>\The [src] bursts!</span>")
|
||||
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)
|
||||
|
||||
+2
-21
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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, "<span class='boldannounce'>Config reload blocked: Advanced ProcCall detected.</span>")
|
||||
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, "<span class='boldannounce'>SQL configuration reload blocked: Advanced ProcCall detected.</span>")
|
||||
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
|
||||
|
||||
@@ -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("<font color='red' size='3'><b>- [ticket_name] Closed -</b></font>",
|
||||
"<span class='boldmessage'>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.</span>",
|
||||
close_messages = list("<font color='red' size='3'><b>- [ticket_name] Closed -</b></font>",
|
||||
"<span class='boldmessage'>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.</span>",
|
||||
"<span class='[span_class]'>Your [ticket_name] has now been closed.</span>")
|
||||
return ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -96,7 +96,6 @@
|
||||
if(BOMB_WIRE_ACTIVATE)
|
||||
if(!mended && B.active)
|
||||
holder.visible_message("<span class='notice'>[bicon(B)] The timer stops! The bomb has been defused!</span>")
|
||||
B.active = FALSE
|
||||
B.defused = TRUE
|
||||
B.update_icon()
|
||||
..()
|
||||
|
||||
@@ -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, "<span class='boldannounce'>DB query blocked: Advanced ProcCall detected.</span>")
|
||||
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.
|
||||
|
||||
@@ -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("<span class='adminnotice'>Syndicate Depot lacks reactor to initiate self-destruct. Must be destroyed manually.</span>")
|
||||
updateicon()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 += {"
|
||||
<b><u>General Statistics</u></b><br>
|
||||
<u>The Good:</u><br>
|
||||
|
||||
<b>Useful Items Shipped:</b> [GLOB.score_stuffshipped] ([GLOB.score_stuffshipped * 5] Points)<br>
|
||||
<b>Hydroponics Harvests:</b> [GLOB.score_stuffharvested] ([GLOB.score_stuffharvested * 5] Points)<br>
|
||||
<b>Ore Mined:</b> [GLOB.score_oremined] ([GLOB.score_oremined * 2] Points)<br>
|
||||
<b>Refreshments Prepared:</b> [GLOB.score_meals] ([GLOB.score_meals * 5] Points)<br>
|
||||
<b>Research Completed:</b> [GLOB.score_researchdone] ([GLOB.score_researchdone * 30] Points)<br>"}
|
||||
<u>The Good</u><br>
|
||||
<b>Ore Mined:</b> [GLOB.score_oremined] ([GLOB.score_oremined * 2] Points)<br>"}
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_ENDGAME) dat += "<b>Shuttle Escapees:</b> [GLOB.score_escapees] ([GLOB.score_escapees * 25] Points)<br>"
|
||||
dat += {"<b>Random Events Endured:</b> [GLOB.score_eventsendured] ([GLOB.score_eventsendured * 50] Points)<br>
|
||||
<b>Whole Station Powered:</b> [GLOB.score_powerbonus ? "Yes" : "No"] ([GLOB.score_powerbonus * 2500] Points)<br>
|
||||
<b>Ultra-Clean Station:</b> [GLOB.score_mess ? "No" : "Yes"] ([GLOB.score_messbonus * 3000] Points)<br><br>
|
||||
<U>The bad:</U><br>
|
||||
dat += {"
|
||||
<b>Whole Station Powered:</b> [GLOB.score_powerbonus ? "Yes" : "No"] ([GLOB.score_powerbonus * 2500] Points)<br><br>
|
||||
|
||||
<U>The Bad</U><br>
|
||||
<b>Dead bodies on Station:</b> [GLOB.score_deadcrew] (-[GLOB.score_deadcrew * 25] Points)<br>
|
||||
<b>Uncleaned Messes:</b> [GLOB.score_mess] (-[GLOB.score_mess] Points)<br>
|
||||
<b>Station Power Issues:</b> [GLOB.score_powerloss] (-[GLOB.score_powerloss * 20] Points)<br>
|
||||
<b>Rampant Diseases:</b> [GLOB.score_disease] (-[GLOB.score_disease * 30] Points)<br>
|
||||
<b>AI Destroyed:</b> [GLOB.score_deadaipenalty ? "Yes" : "No"] (-[GLOB.score_deadaipenalty * 250] Points)<br><br>
|
||||
<U>The Weird</U><br>
|
||||
|
||||
<U>The Weird</U><br>
|
||||
<b>Food Eaten:</b> [GLOB.score_foodeaten] bites/sips<br>
|
||||
<b>Times a Clown was Abused:</b> [GLOB.score_clownabuse]<br><br>
|
||||
"}
|
||||
@@ -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 += "<b><u>RATING:</u></b> [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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -153,6 +153,9 @@
|
||||
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
|
||||
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, "<span class='notice'>You connect the monitor.</span>")
|
||||
if(!brain)
|
||||
var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes"
|
||||
|
||||
@@ -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)<Opened Positions>
|
||||
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)
|
||||
|
||||
@@ -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, "<span class='warning'>Central Command will not allow the shuttle to be called. Consider all contracts terminated.</span>")
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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, "<span class='info'>Your presence is requested at <a href='?src=\ref[AI];jumptoholopad=[UID()]'>\the [area]</a>.</span>")
|
||||
to_chat(AI, "<span class='info'>Your presence is requested at <a href='?src=[AI.UID()];jumptoholopad=[UID()]'>\the [area]</a>.</span>")
|
||||
else
|
||||
temp = "A request for AI presence was already sent recently.<br>"
|
||||
temp += "<a href='?src=[UID()];mainmenu=1'>Main Menu</a>"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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("<span class='danger'>[M] tears apart \the [src]!</span>");
|
||||
M.visible_message("<span class='danger'>[M] tears apart \the [src]!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
if(..())
|
||||
return
|
||||
if(!R.allow_rename)
|
||||
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>");
|
||||
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>")
|
||||
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, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>");
|
||||
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>")
|
||||
return
|
||||
R.emagged = 1
|
||||
return TRUE
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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, "<span class='warning'>Database update failed due to no bans fitting the search criteria. If this is not a legacy ban you should contact the database admin.</span>")
|
||||
@@ -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, "<span class='warning'>Database update failed due to a ban id not being present in the database.</span>")
|
||||
|
||||
@@ -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, "<span class='boldannounce'>Admin reload blocked: Advanced ProcCall detected.</span>")
|
||||
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)
|
||||
|
||||
@@ -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, "<span class='boldannounce'>Admin rank creation blocked: Advanced ProcCall detected.</span>")
|
||||
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, "<span class='boldannounce'>Admin rank deletion blocked: Advanced ProcCall detected.</span>")
|
||||
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, "<span class='boldannounce'>Rank association blocked: Advanced ProcCall detected.</span>")
|
||||
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, "<span class='boldannounce'>Rank disassociation blocked: Advanced ProcCall detected.</span>")
|
||||
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, "<span class='boldannounce'>Deadmin blocked: Advanced ProcCall detected.</span>")
|
||||
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()
|
||||
|
||||
@@ -102,6 +102,11 @@
|
||||
to_chat(usr, "<span class='notice'>Admin rank changed.</span>")
|
||||
|
||||
/datum/admins/proc/log_admin_permission_modification(var/adm_ckey, var/new_permission)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
to_chat(usr, "<span class='boldannounce'>Admin edit blocked: Advanced ProcCall detected.</span>")
|
||||
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
|
||||
|
||||
|
||||
@@ -3475,9 +3475,9 @@
|
||||
hunter_mind.objectives += protect_objective
|
||||
SSticker.mode.traitors |= hunter_mob.mind
|
||||
to_chat(hunter_mob, "<span class='danger'>ATTENTION:</span> You are now on a mission!")
|
||||
to_chat(hunter_mob, "<B>Goal: <span class='danger'>[killthem ? "MURDER" : "PROTECT"] [H.real_name]</span>, currently in [get_area(H.loc)]. </B>");
|
||||
to_chat(hunter_mob, "<B>Goal: <span class='danger'>[killthem ? "MURDER" : "PROTECT"] [H.real_name]</span>, currently in [get_area(H.loc)]. </B>")
|
||||
if(killthem)
|
||||
to_chat(hunter_mob, "<B>If you kill [H.p_them()], [H.p_they()] cannot be revived.</B>");
|
||||
to_chat(hunter_mob, "<B>If you kill [H.p_them()], [H.p_they()] cannot be revived.</B>")
|
||||
hunter_mob.mind.special_role = SPECIAL_ROLE_TRAITOR
|
||||
var/datum/atom_hud/antag/tatorhud = GLOB.huds[ANTAG_HUD_TRAITOR]
|
||||
tatorhud.join_hud(hunter_mob)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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++
|
||||
|
||||
@@ -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, "<font color='blue'>[procname] returned: [!isnull(returnval) ? returnval : "null"]</font>")
|
||||
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, "<span class='adminnotice'>Another set of admin called procs are still running, your proc will be run after theirs finish.</span>")
|
||||
GLOB.AdminProcCallSpamPrevention[ckey] = TRUE
|
||||
UNTIL(!GLOB.AdminProcCaller)
|
||||
to_chat(usr, "<span class='adminnotice'>Running your proc</span>")
|
||||
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, "<span class='boldannounce'>Call to world/proc/[procname] blocked: Advanced ProcCall detected.</span>")
|
||||
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, "<span class='notice'>[procname] returned: [!isnull(returnval) ? returnval : "null"]</span>")
|
||||
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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]")
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -239,7 +239,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
|
||||
if(custom_name)
|
||||
return 0
|
||||
if(!allow_rename)
|
||||
to_chat(src, "<span class='warning'>Rename functionality is not enabled on this unit.</span>");
|
||||
to_chat(src, "<span class='warning'>Rename functionality is not enabled on this unit.</span>")
|
||||
return 0
|
||||
rename_self(braintype, 1)
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
var output = "<!DOCTYPE html><html><body>"
|
||||
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 += "</table></td></tr>"
|
||||
output += "</table>"
|
||||
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 += {"
|
||||
<table width='900' align='center' bgcolor='#eeffee' cellspacing='0' cellpadding='4'>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
log_world("NanoMapGen: <B>GENERATE MAP ([startX],[startY],[currentZ]) to ([endX],[endY],[currentZ])</B>")
|
||||
to_chat(usr, "NanoMapGen: <B>GENERATE MAP ([startX],[startY],[currentZ]) to ([endX],[endY],[currentZ])</B>")
|
||||
|
||||
var/count = 0;
|
||||
var/count = 0
|
||||
for(var/WorldX = startX, WorldX <= endX, WorldX++)
|
||||
for(var/WorldY = startY, WorldY <= endY, WorldY++)
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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, "<span class='notice'>[src] is empty.</span>")
|
||||
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, "<span class='notice'>You unload [S] from \the [src]!</span>")
|
||||
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, "<span class='notice'>You load [A] into \the [src]!</span>")
|
||||
syringes.Add(A)
|
||||
A.loc = src
|
||||
return 1
|
||||
process_chamber() // Chamber the syringe if none is already
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] cannot hold more syringes.</span>")
|
||||
else
|
||||
|
||||
@@ -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, "<span class='boldannounce'>Blackbox seal blocked: Advanced ProcCall detected.</span>")
|
||||
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, "<span class='boldannounce'>Feedback edit blocked: Advanced ProcCall detected.</span>")
|
||||
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, "<span class='boldannounce'>Feedback edit blocked: Advanced ProcCall detected.</span>")
|
||||
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, "<span class='boldannounce'>Feedback edit blocked: Advanced ProcCall detected.</span>")
|
||||
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, "<span class='boldannounce'>Feedback edit blocked: Advanced ProcCall detected.</span>")
|
||||
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, "<span class='boldannounce'>Feedback edit blocked: Advanced ProcCall detected.</span>")
|
||||
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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user