From ef23794506660d0d55c6d70aa924b5b73d802710 Mon Sep 17 00:00:00 2001 From: "rastaf.zero@gmail.com" Date: Sun, 17 Apr 2011 18:09:30 +0000 Subject: [PATCH] Fixed runtime error with changeling gibbed by alium larva. Added sanitize() to naming the buffers in DNA machine and to alien whispering. Added 0.5 sec timeout for BANG BANG. Added drinking glasses to the Dinnerware vending machine. Update from Nikie: Verb Reload Admins rereads admins.txt Parameter sql_enabled in config. Prevents spam when sql is not installed. NOTE FOR HOSTERS: it is currently ON in code (i.e. behavior is unchanged yet), you have to add SQL_ENABLED to your config.txt during next week. Thanks for your attention. Fixed "Delay" command. Messages for help intent are gender-aware now. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1463 316c924e-a436-60f5-8080-3fe189b3f50e --- code/datums/configuration.dm | 4 +++ code/defines/obj/machinery.dm | 2 ++ code/defines/obj/vending.dm | 6 ++-- code/game/dna.dm | 6 ++-- code/game/gamemodes/changeling/changeling.dm | 2 +- code/game/gamemodes/gameticker.dm | 14 +++++--- code/game/machinery/Freezer.dm | 2 +- code/game/objects/closets.dm | 8 +++-- code/game/objects/closets/secure/medical.dm | 1 + code/game/objects/secure_closets.dm | 8 +++-- code/game/verbs/checkkarma.dm | 35 ++++++++++--------- code/modules/admin/admin.dm | 22 ++++++++---- code/modules/admin/admin_verbs.dm | 2 ++ code/modules/admin/verbs/diagnostics.dm | 29 +++++++++++++++ code/modules/admin/verbs/randomverbs.dm | 6 ++-- .../carbon/alien/humanoid/alien_powers.dm | 2 +- .../living/carbon/alien/humanoid/humanoid.dm | 19 ++-------- .../mob/living/carbon/alien/larva/larva.dm | 19 ++-------- code/modules/mob/living/carbon/carbon.dm | 22 ++++++++++++ code/modules/mob/living/carbon/human/human.dm | 19 ++-------- .../mob/living/carbon/monkey/monkey.dm | 18 ++-------- code/modules/mob/mob.dm | 2 +- code/modules/mob/new_player/new_player.dm | 4 ++- code/modules/power/apc.dm | 3 ++ config/config.txt | 3 ++ 25 files changed, 146 insertions(+), 112 deletions(-) diff --git a/code/datums/configuration.dm b/code/datums/configuration.dm index 1d40a072495..7e86fe2f474 100644 --- a/code/datums/configuration.dm +++ b/code/datums/configuration.dm @@ -12,6 +12,7 @@ var/log_game = 0 // log game events var/log_vote = 0 // log voting var/log_whisper = 0 // log client whisper + var/sql_enabled = 1 // for sql switching var/allow_vote_restart = 0 // allow votes to restart var/allow_vote_mode = 0 // allow votes to change mode var/allow_admin_jump = 1 // allows admin jumping @@ -97,6 +98,9 @@ if ("log_access") config.log_access = 1 + if ("sql_enabled") + config.sql_enabled = 1 + if ("log_say") config.log_say = 1 diff --git a/code/defines/obj/machinery.dm b/code/defines/obj/machinery.dm index e7e0a8472eb..44eed315d59 100644 --- a/code/defines/obj/machinery.dm +++ b/code/defines/obj/machinery.dm @@ -468,9 +468,11 @@ icon_state = "term" desc = "An underfloor wiring terminal for power equipment" level = 1 + layer = TURF_LAYER var/obj/machinery/power/master = null anchored = 1 directwired = 0 // must have a cable on same turf connecting to terminal + layer = 2.6 // a bit above wires /obj/machinery/power/generator name = "generator" diff --git a/code/defines/obj/vending.dm b/code/defines/obj/vending.dm index ba8d1b5a06e..fe3a2664200 100644 --- a/code/defines/obj/vending.dm +++ b/code/defines/obj/vending.dm @@ -150,8 +150,8 @@ name = "Dinnerware" desc = "A kitchen and restaurant equipment vendor" icon_state = "dinnerware" - product_paths = "/obj/item/weapon/tray;/obj/item/weapon/kitchen/utensil/fork;/obj/item/weapon/kitchenknife" - product_amounts = "6;4;2" + product_paths = "/obj/item/weapon/tray;/obj/item/weapon/kitchen/utensil/fork;/obj/item/weapon/kitchenknife;/obj/item/weapon/reagent_containers/food/drinks/drinkingglass" + product_amounts = "6;4;2;15" //product_amounts = "8;5;4" Old totals product_hidden = "/obj/item/weapon/kitchen/utensil/spoon;/obj/item/weapon/kitchen/utensil/knife;/obj/item/weapon/kitchen/rollingpin" - product_hideamt = "2;2;2" \ No newline at end of file + product_hideamt = "2;2;2" diff --git a/code/game/dna.dm b/code/game/dna.dm index 358cffbb1dd..13f49bddbc8 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -1085,13 +1085,13 @@ src.buffer3iue = null dopage(src,"buffermenu") if (href_list["b1label"]) - src.buffer1label = input("New Label:","Edit Label","Infos here") + src.buffer1label = sanitize(input("New Label:","Edit Label","Infos here")) dopage(src,"buffermenu") if (href_list["b2label"]) - src.buffer2label = input("New Label:","Edit Label","Infos here") + src.buffer2label = sanitize(input("New Label:","Edit Label","Infos here")) dopage(src,"buffermenu") if (href_list["b3label"]) - src.buffer3label = input("New Label:","Edit Label","Infos here") + src.buffer3label = sanitize(input("New Label:","Edit Label","Infos here")) dopage(src,"buffermenu") if (href_list["b1transfer"]) if (!src.connected.occupant) diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index 10ed95f40c7..409d63e6462 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -186,7 +186,7 @@ if(!changeling) return 1 - if(istype(changeling.current,/mob/living/silicon)) + if(!istype(changeling.current,/mob/living/carbon)) return 1 if(changeling.current.stat==2) diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 4d357c169b9..ace5b126450 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -25,9 +25,12 @@ var/global/datum/controller/gameticker/ticker world << "Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds" while(current_state == GAME_STATE_PREGAME) - sleep(10) - pregame_timeleft-- - + if(!going) + sleep(10) + else + sleep(10) + pregame_timeleft-- + if(pregame_timeleft <= 0) current_state = GAME_STATE_SETTING_UP @@ -102,8 +105,9 @@ var/global/datum/controller/gameticker/ticker spawn() supply_ticker() // Added to kick-off the supply shuttle regenerating points -- TLE spawn master_controller.process() - - spawn(3000) statistic_cycle() // Polls population totals regularly and stores them in an SQL DB -- TLE + if (config.sql_enabled) + spawn(3000) + statistic_cycle() // Polls population totals regularly and stores them in an SQL DB -- TLE /datum/controller/gameticker proc/distribute_jobs() diff --git a/code/game/machinery/Freezer.dm b/code/game/machinery/Freezer.dm index 65b91d8a58c..25f89f4967f 100644 --- a/code/game/machinery/Freezer.dm +++ b/code/game/machinery/Freezer.dm @@ -55,7 +55,7 @@ Current status: [ on ? "Off On" : "Off On"]
Current gas temperature: [temp_text]
Current air pressure: [air_contents.return_pressure()]
- Target gas temperature: - - [current_temperature] + +
+ Target gas temperature: - - - [current_temperature] + + +
"} user << browse(dat, "window=freezer;size=400x500") diff --git a/code/game/objects/closets.dm b/code/game/objects/closets.dm index 762699e7092..cf12e07b3a3 100644 --- a/code/game/objects/closets.dm +++ b/code/game/objects/closets.dm @@ -199,14 +199,18 @@ src.add_fingerprint(user) return +/obj/closet + var/lastbang /obj/closet/relaymove(mob/user as mob) if (user.stat) return if (!src.open()) user << "\blue It won't budge!" - for (var/mob/M in hearers(src, null)) - M << text("BANG, bang!", max(0, 5 - get_dist(src, M))) + if (world.time > lastbang+5) + lastbang = world.time + for (var/mob/M in hearers(src, null)) + M << text("BANG, bang!", max(0, 5 - get_dist(src, M))) /obj/closet/attack_paw(mob/user as mob) return src.attack_hand(user) diff --git a/code/game/objects/closets/secure/medical.dm b/code/game/objects/closets/secure/medical.dm index 5aa880d4e6f..e485ea51185 100644 --- a/code/game/objects/closets/secure/medical.dm +++ b/code/game/objects/closets/secure/medical.dm @@ -16,6 +16,7 @@ new /obj/item/weapon/reagent_containers/dropper( src ) new /obj/item/weapon/reagent_containers/glass/beaker( src ) new /obj/item/weapon/reagent_containers/glass/beaker( src ) + new /obj/item/weapon/storage/utilitybelt/medical( src ) return /obj/secure_closet/medical2/New() diff --git a/code/game/objects/secure_closets.dm b/code/game/objects/secure_closets.dm index 56f2cc53fb5..0608c0b2146 100644 --- a/code/game/objects/secure_closets.dm +++ b/code/game/objects/secure_closets.dm @@ -197,6 +197,8 @@ user << "\red Access Denied" return +/obj/secure_closet + var/lastbang /obj/secure_closet/relaymove(mob/user as mob) if (user.stat) return @@ -212,8 +214,10 @@ src.opened = 1 else user << "\blue It's welded shut!" - for(var/mob/M in hearers(src, null)) - M << text("BANG, bang!", max(0, 5 - get_dist(src, M))) + if (world.time > lastbang+5) + lastbang = world.time + for(var/mob/M in hearers(src, null)) + M << text("BANG, bang!", max(0, 5 - get_dist(src, M))) return /obj/secure_closet/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob) diff --git a/code/game/verbs/checkkarma.dm b/code/game/verbs/checkkarma.dm index 72ac4117b54..357c6d7d88e 100644 --- a/code/game/verbs/checkkarma.dm +++ b/code/game/verbs/checkkarma.dm @@ -3,20 +3,23 @@ mob/verb/check_karma() set category = "Special Verbs" set desc = "Reports how much karma you have accrued" - var/DBConnection/dbcon = new() - dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") - if(!dbcon.IsConnected()) - usr << "\red Unable to connect to karma database. This error can occur if your host has failed to set up an SQL database or improperly configured its login credentials.
" - return - else - var/DBQuery/query = dbcon.NewQuery("SELECT karma FROM karmatotals WHERE byondkey='[src.key]'") - query.Execute() - - var/currentkarma - while(query.NextRow()) - currentkarma = query.item[1] - if(currentkarma) - usr << "Your current karma is: [currentkarma]
" + if(config.sql_enabled) + var/DBConnection/dbcon = new() + dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") + if(!dbcon.IsConnected()) + usr << "\red Unable to connect to karma database. This error can occur if your host has failed to set up an SQL database or improperly configured its login credentials.
" + return else - usr << "Your current karma is: 0
" - dbcon.Disconnect() \ No newline at end of file + var/DBQuery/query = dbcon.NewQuery("SELECT karma FROM karmatotals WHERE byondkey='[src.key]'") + query.Execute() + + var/currentkarma + while(query.NextRow()) + currentkarma = query.item[1] + if(currentkarma) + usr << "Your current karma is: [currentkarma]
" + else + usr << "Your current karma is: 0
" + dbcon.Disconnect() + else + usr << "SQL is off, karma is not usable" diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 49c58d84339..0913f73f1b8 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1421,11 +1421,18 @@ var/showadminmessages = 1 //add IP: to this if wanting to add back in IP checking //add (IP: [M.lastKnownIP]) if you want to know their ip to the lists below var/list/mobs = sortmobs() - var/DBConnection/dbcon = new() - dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") - if(!dbcon.IsConnected()) - usr << "\red Unable to connect to karma database. This error can occur if your host has failed to set up an SQL database or improperly configured its login credentials.
" + var/show_karma = 0 + var/DBConnection/dbcon + if(config.sql_enabled) // SQL is enabled in config.txt + dbcon = new() // Setting up connection + dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") + if(dbcon.IsConnected()) + show_karma = 1 + else + usr << "\red Unable to connect to karma database. This error can occur if your host has failed to set up an SQL database or improperly configured its login credentials.
" + + if(!show_karma) for(var/mob/M in mobs) if(M.ckey) dat += "[M.name]" @@ -1448,7 +1455,10 @@ var/showadminmessages = 1 PM [checktraitor(M) ? "" : ""]Traitor? "} - dat += "NOT CONNECTED" + if (config.sql_enabled) + dat += "ERROR" + else + dat += "disabled" else @@ -1893,7 +1903,7 @@ var/showadminmessages = 1 set category = "Server" set desc="Delay the game start" set name="Delay" - if (ticker) + if (!ticker || ticker.current_state != GAME_STATE_PREGAME) return alert("Too late... The game has already started!", null, null, null, null, null) going = !( going ) if (!( going )) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index d1787a5b4bb..a954f4c167b 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -73,6 +73,7 @@ src.verbs += /client/proc/air_report src.verbs += /client/proc/air_status src.verbs += /client/proc/radio_report + src.verbs += /client/proc/reload_admins src.verbs += /client/proc/kill_air // -- TLE src.verbs += /client/proc/modifytemperature src.verbs += /client/proc/callproc @@ -211,6 +212,7 @@ src.verbs += /client/proc/air_report src.verbs += /client/proc/air_status src.verbs += /client/proc/radio_report + src.verbs += /client/proc/reload_admins //src.verbs += /client/proc/kill_air // -- TLE src.verbs += /client/proc/modifytemperature src.verbs += /client/proc/callproc diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index 27b3734147f..6ec7c7d73bf 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -146,3 +146,32 @@ output += "    [device]
" usr << browse(output,"window=radioreport") + + reload_admins() + set name = "Reload Admins" + set category = "Debug" + + if(!(usr.client.holder && usr.client.holder.level >= 6)) // protect and prevent + usr << "\red Not a good cop" + return + + message_admins("[usr] manually reloaded admins.txt") + usr << "You reload admins.txt" + var/text = file2text("config/admins.txt") + if (!text) + diary << "Failed to reload config/admins.txt\n" + else + var/list/lines = dd_text2list(text, "\n") + for(var/line in lines) + if (!line) + continue + + if (copytext(line, 1, 2) == ";") + continue + + var/pos = findtext(line, " - ", 1, null) + if (pos) + var/m_key = copytext(line, 1, pos) + var/a_lev = copytext(line, pos + 3, length(line) + 1) + admins[m_key] = a_lev + diary << ("ADMIN: [m_key] = [a_lev]") diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 16aaa05d3f4..f44325c2edf 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -96,7 +96,7 @@ return if (!( ismob(M) )) return - var/t = input("Message:", text("Private message to [M.key]")) as text + var/t = input("Message:", text("Private message to [M.key]")) as text|null if(src.holder.rank != "Game Admin" && src.holder.rank != "Game Master") t = strip_html(t,500) if (!( t )) @@ -376,7 +376,7 @@ TO DO: actually integrate random appearance and player preference save. if(!src.authenticated || !src.holder) src << "Only administrators may use this command." return - var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") + var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null if(!input) return for(var/mob/living/silicon/ai/M in world) @@ -436,7 +436,7 @@ TO DO: actually integrate random appearance and player preference save. if(!src.authenticated || !src.holder) src << "Only administrators may use this command." return - var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") + var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null if(!input) return for (var/obj/machinery/computer/communications/C in machines) diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index 5846580eb9c..a320eb9f17a 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -54,7 +54,7 @@ Doesn't work on other aliens/AI.*/ src << "\green You must be conscious to do this." return - var/msg = input("Message:", "Alien Whisper") as text + var/msg = sanitize(input("Message:", "Alien Whisper") as text|null) if (!msg) return diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 1b03a0cc83e..1823eeaf4a2 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -581,14 +581,7 @@ switch(M.a_intent) if ("help") - src.sleeping = 0 - src.resting = 0 - if (src.paralysis >= 3) src.paralysis -= 3 - if (src.stunned >= 3) src.stunned -= 3 - if (src.weakened >= 3) src.weakened -= 3 - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\blue [M.name] shakes [src] trying to wake it up!", ), 1) + src.help_shake_act(M) else if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle)) return @@ -629,15 +622,7 @@ if ("help") if (src.health > 0) - src.sleeping = 0 - src.resting = 0 - if (src.paralysis >= 3) src.paralysis -= 3 - if (src.stunned >= 3) src.stunned -= 3 - if (src.weakened >= 3) src.weakened -= 3 - playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\blue [] shakes [] trying to wake [] up!", M, src, src), 1) + src.help_shake_act(M) else if (M.health >= -75.0) if (((M.head && M.head.flags & 4) || ((M.wear_mask && !( M.wear_mask.flags & 32 )) || ((src.head && src.head.flags & 4) || (src.wear_mask && !( src.wear_mask.flags & 32 )))))) diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 8fad33ebd19..f0fe72d4474 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -348,14 +348,7 @@ switch(M.a_intent) if ("help") - src.sleeping = 0 - src.resting = 0 - if (src.paralysis >= 3) src.paralysis -= 3 - if (src.stunned >= 3) src.stunned -= 3 - if (src.weakened >= 3) src.weakened -= 3 - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\blue [M.name] shakes [src] trying to wake it up!", ), 1) + src.help_shake_act(M) else if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle)) return @@ -396,15 +389,7 @@ if ("help") if (src.health > 0) - src.sleeping = 0 - src.resting = 0 - if (src.paralysis >= 3) src.paralysis -= 3 - if (src.stunned >= 3) src.stunned -= 3 - if (src.weakened >= 3) src.weakened -= 3 - playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\blue [] shakes [] trying to wake [] up!", M, src, src), 1) + src.help_shake_act(M) else if (M.health >= -75.0) if ((M.head && M.head.flags & 4) || (M.wear_mask && !( M.wear_mask.flags & 32 )) ) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 0da865c2343..de958de4699 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -107,3 +107,25 @@ else src.hands.dir = SOUTH return + + +/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M) + if (src.health > 0) + var/t_him = "it" + if (src.gender == MALE) + t_him = "him" + else if (src.gender == FEMALE) + t_him = "her" + if (istype(src,/mob/living/carbon/human) && src:w_uniform) + var/mob/living/carbon/human/H = src + H.w_uniform.add_fingerprint(M) + src.sleeping = 0 + src.resting = 0 + if (src.paralysis >= 3) src.paralysis -= 3 + if (src.stunned >= 3) src.stunned -= 3 + if (src.weakened >= 3) src.weakened -= 3 + playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1) + M.visible_message( \ + "\blue [M] shakes [src] trying to wake [t_him] up!", \ + "\blue You shake [src] trying to wake [t_him] up!", \ + ) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index ddb2341097b..406938a9926 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1408,13 +1408,7 @@ /mob/living/carbon/human/attack_paw(mob/M as mob) ..() if (M.a_intent == "help") - src.sleeping = 0 - src.resting = 0 - if (src.paralysis >= 3) src.paralysis -= 3 - if (src.stunned >= 3) src.stunned -= 3 - if (src.weakened >= 3) src.weakened -= 3 - for(var/mob/O in viewers(src, null)) - O.show_message(text("\blue [M.name] shakes [] trying to wake him up!", src), 1) + src.help_shake_act(M) else if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle)) return @@ -1642,16 +1636,7 @@ if (M.a_intent == "help") if (src.health > 0) - if (src.w_uniform) - src.w_uniform.add_fingerprint(M) - src.sleeping = 0 - src.resting = 0 - if (src.paralysis >= 3) src.paralysis -= 3 - if (src.stunned >= 3) src.stunned -= 3 - if (src.weakened >= 3) src.weakened -= 3 - playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\blue [] shakes [] trying to wake [] up!", M, src, src), 1) + src.help_shake_act(M) else if (M.health >= -75.0) if (((M.head && M.head.flags & 4) || ((M.wear_mask && !( M.wear_mask.flags & 32 )) || ((src.head && src.head.flags & 4) || (src.wear_mask && !( src.wear_mask.flags & 32 )))))) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 92f44e0252f..ae7fa92473d 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -159,13 +159,7 @@ ..() if (M.a_intent == "help") - src.sleeping = 0 - src.resting = 0 - if (src.paralysis >= 3) src.paralysis -= 3 - if (src.stunned >= 3) src.stunned -= 3 - if (src.weakened >= 3) src.weakened -= 3 - for(var/mob/O in viewers(src, null)) - O.show_message("\blue [M.name] shakes [src.name] trying to wake him up!", 1) + src.help_shake_act(M) else if ((M.a_intent == "hurt" && !( istype(src.wear_mask, /obj/item/clothing/mask/muzzle) ))) if ((prob(75) && src.health > 0)) @@ -206,15 +200,7 @@ return if (M.a_intent == "help") - src.sleeping = 0 - src.resting = 0 - if (src.paralysis >= 3) src.paralysis -= 3 - if (src.stunned >= 3) src.stunned -= 3 - if (src.weakened >= 3) src.weakened -= 3 - playsound(src.loc, 'thudswoosh.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\blue [] shakes [src.name] trying to wake him up!", M), 1) + src.help_shake_act(M) else if (M.a_intent == "hurt") if ((prob(75) && src.health > 0)) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index fb08a77e52f..f6adfa9e455 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1510,7 +1510,7 @@ return if (!( ismob(M) )) return - var/t = input("Message:", text("Private message to [M.key]")) as text + var/t = input("Message:", text("Private message to [M.key]")) as text|null if (!( t )) return if (!usr) return diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 5da3cd34eae..efbd5ac1a48 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -128,8 +128,10 @@ mob/new_player else stat("Game Mode:", "[master_mode]") - if(ticker.current_state == GAME_STATE_PREGAME) + if((ticker.current_state == GAME_STATE_PREGAME) && going) stat("Time To Start:", ticker.pregame_timeleft) + if((ticker.current_state == GAME_STATE_PREGAME) && !going) + stat("Time To Start:", "DELAYED") statpanel("Lobby") if(client.statpanel=="Lobby" && ticker) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 55346aa2284..ee4b82a3ea8 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -361,6 +361,9 @@ has_electronics = 1 user << "You place the power control board inside the frame." del(W) + else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && ((stat & BROKEN) || malfhack)) + user << "\red You cannot put the board inside, the frame is damaged." + return else if (istype(W, /obj/item/weapon/weldingtool) && W:welding && opened && has_electronics==0 && !terminal) if (W:get_fuel() < 3) user << "\blue You need more welding fuel to complete this task." diff --git a/config/config.txt b/config/config.txt index dad5fef00d6..399627f27da 100644 --- a/config/config.txt +++ b/config/config.txt @@ -19,6 +19,9 @@ LOG_VOTE # log client Whisper LOG_WHISPER +# sql switching +# SQL_ENABLED + # probablities for game modes chosen in "secret" and "random" modes # # default probablity is 1, increase to make that mode more likely to be picked