diff --git a/baystation12.dme b/baystation12.dme index 936547e249..870226bfa5 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -701,6 +701,7 @@ #include "code\modules\admin\verbs\adminsay.dm" #include "code\modules\admin\verbs\atmosdebug.dm" #include "code\modules\admin\verbs\BrokenInhands.dm" +#include "code\modules\admin\verbs\custom_event.dm" #include "code\modules\admin\verbs\deadsay.dm" #include "code\modules\admin\verbs\debug.dm" #include "code\modules\admin\verbs\diagnostics.dm" diff --git a/code/defines/global.dm b/code/defines/global.dm index ac16bb8d92..d3a29ab23e 100644 --- a/code/defines/global.dm +++ b/code/defines/global.dm @@ -139,6 +139,8 @@ var no_auth_motd = null forceblob = 0 + custom_event_msg = null + //airlockWireColorToIndex takes a number representing the wire color, e.g. the orange wire is always 1, the dark red wire is always 2, etc. It returns the index for whatever that wire does. //airlockIndexToWireColor does the opposite thing - it takes the index for what the wire does, for example AIRLOCK_WIRE_IDSCAN is 1, AIRLOCK_WIRE_POWER1 is 2, etc. It returns the wire color number. //airlockWireColorToFlag takes the wire color number and returns the flag for it (1, 2, 4, 8, 16, etc) diff --git a/code/defines/mob/mob.dm b/code/defines/mob/mob.dm index 499344d8af..8e70824d6e 100644 --- a/code/defines/mob/mob.dm +++ b/code/defines/mob/mob.dm @@ -90,6 +90,7 @@ var/antitoxs = null var/plasma = null var/sleeping = 0.0//Carbon + var/sleeping_willingly = 0.0 //Carbon, allows people to sleep forever if desired var/resting = 0.0//Carbon var/lying = 0.0 var/canmove = 1.0 diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 8017ed9a9d..14b0794bf6 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -125,7 +125,8 @@ if(istype(H.ears, /obj/item/clothing/ears/earmuffs)) continue M << "HONK" - M.sleeping = 0 + if(!M.sleeping_willingly) + M.sleeping = 0 M.stuttering += 20 M.ear_deaf += 30 M.weakened = 3 diff --git a/code/game/vote.dm b/code/game/vote.dm index 99986c2ed9..3646fb2b09 100644 --- a/code/game/vote.dm +++ b/code/game/vote.dm @@ -59,7 +59,7 @@ calcwin() if(mode) - if(ticker.current_state == GAME_STATE_PREGAME) + if(ticker.current_state == 1) if(!going) world << "The game will start soon." going = 1 @@ -263,8 +263,8 @@ if(!vote.canvote()) // not time to vote yet if(config.allow_vote_restart) text+="Voting to restart is enabled.
" if(config.allow_vote_mode) - if(ticker.current_state == GAME_STATE_PREGAME) text+="Voting to change mode is enabled.
" - else text =+ "Change mode votes are disabled while a round is in progress, vote to restart first.
" + if(ticker.current_state == 1) text+="Voting to change mode is enabled.
" + else text += "Change mode votes are disabled while a round is in progress, vote to restart first.
" text+="

Next vote can begin in [vote.nextwait()]." text+=footer @@ -275,10 +275,10 @@ if(config.allow_vote_restart) text += "Begin restart vote.
" if(config.allow_vote_mode) - if(ticker.current_state == GAME_STATE_PREGAME) + if(ticker.current_state == 1) text += "Begin change mode vote.
" else - text =+ "Change mode votes are disabled while a round is in progress, vote to restart first.
" + text += "Change mode votes are disabled while a round is in progress, vote to restart first.
" text += footer usr << browse(text, "window=vote") diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index a5365c3336..c2bf04a229 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -226,7 +226,7 @@ verbs += /client/proc/cmd_admin_create_centcom_report verbs += /client/proc/toggle_hear_deadcast verbs += /client/proc/toggle_hear_radio - + verbs += /client/proc/cmd_admin_change_custom_event if (holder.level >= 0)//Mod******************************************************************** verbs += /obj/admins/proc/toggleAI //Toggle the AI @@ -392,6 +392,7 @@ verbs -= /client/proc/toggle_hear_deadcast verbs -= /client/proc/toggle_hear_radio verbs -= /client/proc/tension_report + verbs -= /client/proc/cmd_admin_change_custom_event return diff --git a/code/modules/admin/verbs/custom_event.dm b/code/modules/admin/verbs/custom_event.dm new file mode 100644 index 0000000000..c4eed427a4 --- /dev/null +++ b/code/modules/admin/verbs/custom_event.dm @@ -0,0 +1,35 @@ +// verb for admins to set custom event +/client/proc/cmd_admin_change_custom_event() + set category = "Fun" + set name = "Change Custom Event" + + if(!authenticated || !holder) + src << "Only administrators may use this command." + return + + var/input = input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg) as message|null + if(!input || input == "") + custom_event_msg = null + return + + custom_event_msg = input + + world << "

Custom Event

" + world << "

A custom event is starting. OOC Info:

" + world << "[html_encode(custom_event_msg)]" + world << "
" + +// normal verb for players to view info +/client/verb/cmd_view_custom_event() + set category = "OOC" + set name = "Custom Event Info" + + if(!custom_event_msg || custom_event_msg == "") + src << "There currently is no known custom event taking place." + src << "Keep in mind: it is possible that an admin has not properly set this." + return + + src << "

Custom Event

" + src << "

A custom event is taking place. OOC Info:

" + src << "[html_encode(custom_event_msg)]" + src << "
" diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index cb43c80314..82df78f9be 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -1259,7 +1259,8 @@ datum M:drowsyness = 0 M:stuttering = 0 M:confused = 0 - M:sleeping = 0 + if(!M:sleeping_willingly) + M:sleeping = 0 M:jitteriness = 0 for(var/datum/disease/D in M.viruses) D.spread = "Remissive" @@ -2149,7 +2150,8 @@ datum ..() M.dizziness = max(0,M.dizziness-5) M:drowsyness = max(0,M:drowsyness-3) - M:sleeping = 0 + if(!M:sleeping_willingly) + M:sleeping = 0 if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = min(310, M.bodytemperature+5) M.make_jittery(5) @@ -2168,7 +2170,8 @@ datum M.dizziness = max(0,M.dizziness-2) M:drowsyness = max(0,M:drowsyness-1) M:jitteriness = max(0,M:jitteriness-3) - M:sleeping = 0 + if(!M:sleeping_willingly) + M:sleeping = 0 if(M:getToxLoss() && prob(20)) M:adjustToxLoss(-1) if (M.bodytemperature < 310) //310 is the normal bodytemp. 310.055 @@ -2187,7 +2190,8 @@ datum ..() M.dizziness = max(0,M.dizziness-5) M:drowsyness = max(0,M:drowsyness-3) - M:sleeping = 0 + if(!M:sleeping_willingly) + M:sleeping = 0 if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = min(310, M.bodytemperature-5) M.make_jittery(5) @@ -2205,7 +2209,8 @@ datum ..() M.dizziness = max(0,M.dizziness-2) M:drowsyness = max(0,M:drowsyness-1) - M:sleeping = 0 + if(!M:sleeping_willingly) + M:sleeping = 0 if(M:getToxLoss() && prob(20)) M:adjustToxLoss(-1) if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055 @@ -2239,7 +2244,8 @@ datum M.druggy = max(M.druggy, 30) M.dizziness +=5 M:drowsyness = 0 - M:sleeping = 0 + if(!M:sleeping_willingly) + M:sleeping = 0 if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = max(310, M.bodytemperature-5) M:nutrition += 1 @@ -2255,7 +2261,8 @@ datum on_mob_life(var/mob/living/M as mob) M:drowsyness = max(0,M:drowsyness-7) - M:sleeping = 0 + if(!M:sleeping_willingly) + M:sleeping = 0 if (M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature-5) M.make_jittery(5) @@ -2272,7 +2279,8 @@ datum on_mob_life(var/mob/living/M as mob) M:drowsyness = max(0,M:drowsyness-7) - M:sleeping = 0 + if(!M:sleeping_willingly) + M:sleeping = 0 if (M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature-5) M.make_jittery(5) @@ -2540,7 +2548,8 @@ datum on_mob_life(var/mob/living/M as mob) M.dizziness = max(0,M.dizziness-5) M:drowsyness = max(0,M:drowsyness-3) - M:sleeping = 0 + if(!M:sleeping_willingly) + M:sleeping = 0 if (M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature-5) ..() @@ -2556,7 +2565,8 @@ datum on_mob_life(var/mob/living/M as mob) M.dizziness = max(0,M.dizziness-5) M:drowsyness = max(0,M:drowsyness-3) - M:sleeping = 0//Copy-paste from Coffee, derp + if(!M:sleeping_willingly) + M:sleeping = 0 M.make_jittery(5) ..() return @@ -2629,7 +2639,8 @@ datum on_mob_life(var/mob/living/M as mob) M.dizziness = max(0,M.dizziness-5) M:drowsyness = max(0,M:drowsyness-3) - M:sleeping = 0 + if(!M:sleeping_willingly) + M:sleeping = 0 if (M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature-5) ..() diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm index 16fc1250c8..08cfe1e70a 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm @@ -40,7 +40,11 @@ src.see_in_dark = 5 src.see_invisible = 2 - if (src.sleep) src.sleep.icon_state = text("sleep[]", src.sleeping) + if (src.sleep) + src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0) + src.sleep.overlays = null + if(src.sleeping_willingly) + src.sleep.overlays += icon(src.sleep.icon, "sleep_willing") if (src.rest) src.rest.icon_state = text("rest[]", src.resting) if (src.healths) @@ -83,7 +87,8 @@ if(src.sleeping) src.paralysis = max(src.paralysis, 3) if (prob(10) && health) spawn(0) emote("snore") - src.sleeping-- + if(!src.sleeping_willingly) + src.sleeping-- if(src.resting) src.weakened = max(src.weakened, 5) diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm index 86e74cbe38..e11df6b5f8 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm @@ -40,7 +40,11 @@ src.see_in_dark = 7 src.see_invisible = 3 - if (src.sleep) src.sleep.icon_state = text("sleep[]", src.sleeping) + if (src.sleep) + src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0) + src.sleep.overlays = null + if(src.sleeping_willingly) + src.sleep.overlays += icon(src.sleep.icon, "sleep_willing") if (src.rest) src.rest.icon_state = text("rest[]", src.resting) if (src.healths) @@ -84,7 +88,8 @@ if(src.sleeping) src.paralysis = max(src.paralysis, 3) if (prob(10) && health) spawn(0) emote("snore") - src.sleeping-- + if(!src.sleeping_willingly) + src.sleeping-- if(src.resting) src.weakened = max(src.weakened, 5) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index e3ee84fe53..30579f5ff4 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -702,7 +702,8 @@ In all, this is a lot like the monkey code. /N switch(M.a_intent) if ("help") - sleeping = 0 + if(!sleeping_willingly) + sleeping = 0 resting = 0 if (paralysis >= 3) paralysis -= 3 if (stunned >= 3) stunned -= 3 diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index 9220385f27..86ed09c5c1 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -403,7 +403,8 @@ if(src.sleeping) src.paralysis = max(src.paralysis, 3) if (prob(10) && health) spawn(0) emote("snore") - src.sleeping-- + if(!src.sleeping_willingly) + src.sleeping-- if(src.resting) src.weakened = max(src.weakened, 5) @@ -493,7 +494,11 @@ src.see_in_dark = 4 src.see_invisible = 2 - if (src.sleep) src.sleep.icon_state = text("sleep[]", src.sleeping) + if (src.sleep) + src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0) + src.sleep.overlays = null + if(src.sleeping_willingly) + src.sleep.overlays += icon(src.sleep.icon, "sleep_willing") if (src.rest) src.rest.icon_state = text("rest[]", src.resting) if (src.healths) diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm index 065b106068..e6d5f3bbca 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm @@ -43,7 +43,11 @@ src.see_in_dark = 8 src.see_invisible = 2 - if (src.sleep) src.sleep.icon_state = text("sleep[]", src.sleeping) + if (src.sleep) + src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0) + src.sleep.overlays = null + if(src.sleeping_willingly) + src.sleep.overlays += icon(src.sleep.icon, "sleep_willing") if (src.rest) src.rest.icon_state = text("rest[]", src.resting) if (src.healths) @@ -85,7 +89,8 @@ if(src.sleeping) src.paralysis = max(src.paralysis, 3) if (prob(10) && health) spawn(0) emote("snore") - src.sleeping-- + if(!src.sleeping_willingly) + src.sleeping-- if(src.resting) src.weakened = max(src.weakened, 5) diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index abbc1fade1..8aac91fec4 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -455,7 +455,8 @@ switch(M.a_intent) if ("help") - sleeping = 0 + if(!sleeping_willingly) + sleeping = 0 resting = 0 if (paralysis >= 3) paralysis -= 3 if (stunned >= 3) stunned -= 3 diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index dac5f2e054..79bf7770be 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -330,7 +330,8 @@ if(sleeping) paralysis = max(paralysis, 3) if (prob(10) && health) spawn(0) emote("snore") - sleeping-- + if(!src.sleeping_willingly) + src.sleeping-- if(resting) weakened = max(weakened, 5) @@ -420,7 +421,11 @@ see_in_dark = 4 see_invisible = 2 - if (sleep) sleep.icon_state = text("sleep[]", sleeping) + if (src.sleep) + src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0) + src.sleep.overlays = null + if(src.sleeping_willingly) + src.sleep.overlays += icon(src.sleep.icon, "sleep_willing") if (rest) rest.icon_state = text("rest[]", resting) if (healths) diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index bf216dc67e..43b5b6b2cc 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -240,7 +240,11 @@ see_in_dark = 2 see_invisible = 0 - if (sleep) sleep.icon_state = text("sleep[]", sleeping) + if (src.sleep) + src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0) + src.sleep.overlays = null + if(src.sleeping_willingly) + src.sleep.overlays += icon(src.sleep.icon, "sleep_willing") if (rest) rest.icon_state = text("rest[]", resting) if (healths) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 935467a53c..aa1aaf6386 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -164,7 +164,8 @@ 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 + if(!src.sleeping_willingly) + src.sleeping = 0 src.resting = 0 if (src.paralysis >= 3) src.paralysis -= 3 if (src.stunned >= 3) src.stunned -= 3 @@ -176,4 +177,19 @@ ) /mob/living/carbon/proc/eyecheck() - return 0 \ No newline at end of file + return 0 + +// in a coma from logitis! +/mob/living/carbon/Logout() + ..() + + if(!src.sleeping) // would be exploited by stoxin'd people otherwise ;) + src.sleeping = 1 + src.sleeping_willingly = 1 + +/mob/living/carbon/Login() + ..() + + if(src.sleeping_willingly) + src.sleeping = 0 + src.sleeping_willingly = 0 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index bfd06d3a35..ea3b3df94c 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -663,7 +663,8 @@ if(sleeping) paralysis = max(paralysis, 3) if (prob(10) && health) spawn(0) emote("snore") - sleeping-- + if(!src.sleeping_willingly) + src.sleeping-- if(resting) weakened = max(weakened, 3) @@ -866,7 +867,11 @@ - if (sleep) sleep.icon_state = text("sleep[]", sleeping) + if (src.sleep) + src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0) + src.sleep.overlays = null + if(src.sleeping_willingly) + src.sleep.overlays += icon(src.sleep.icon, "sleep_willing") if (rest) rest.icon_state = text("rest[]", resting) if (healths) diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 32734024ac..e2fd09306a 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -493,7 +493,11 @@ src.see_in_dark = 2 src.see_invisible = 0 - if (src.sleep) src.sleep.icon_state = text("sleep[]", src.sleeping) + if (src.sleep) + src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0) + src.sleep.overlays = null + if(src.sleeping_willingly) + src.sleep.overlays += icon(src.sleep.icon, "sleep_willing") if (src.rest) src.rest.icon_state = text("rest[]", src.resting) if (src.healths) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 3cf9fb6ac7..d89e68f49c 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -79,15 +79,19 @@ return //if(icon_state == initial(icon_state)) - var/icontype = input("Please, select a display!", "AI", null/*, null*/) in list("Clown", "HAL9000", "Monochrome", "Blue", "HAL9000 Mark2", "Inverted", "Firewall", "Green") - if(icontype == "Clown") - icon_state = "ai-clown2" + var/icontype = "" + if (src.name == "B.A.N.N.E.D." && src.ckey == "Spaceman96") + icontype = input("Please, select a display!", "AI", null/*, null*/) in list("B.A.N.N.E.D.", "Blue", "HAL9000", "Monochrome", "Rainbow", "HAL9000 Mark2", "Inverted", "Firewall", "Green", "Text", "Smiley", "Angry", "Dorf", "Matrix") + else + icontype = input("Please, select a display!", "AI", null/*, null*/) in list("Blue", "HAL9000", "Monochrome", "Rainbow", "HAL9000 Mark2", "Inverted", "Firewall", "Green", "Text", "Smiley", "Angry", "Dorf", "Matrix") + if(icontype == "Blue") + icon_state = "ai" else if(icontype == "HAL9000") icon_state = "ai-hal9000-2" else if(icontype == "Monochrome") icon_state = "ai-mono" - else if(icontype == "Blue") - icon_state = "ai" + else if(icontype == "Rainbow") + icon_state = "ai-clown" else if(icontype == "HAL9000 Mark2") icon_state = "ai-hal9000-3" else if(icontype == "Inverted") @@ -96,8 +100,20 @@ icon_state = "ai-magma" else if(icontype == "Funny") icon_state = "ai-yesman" - else//(icontype == "Green") + else if(icontype == "Green") icon_state = "ai-wierd" + else if(icontype == "Text") + icon_state = "ai-text" + else if(icontype == "Smiley") + icon_state = "ai-smiley" + else if(icontype == "Angry") + icon_state = "ai-angryface" + else if(icontype == "Dorf") + icon_state = "ai-dorf" + else if(icontype == "B.A.N.N.E.D.") + icon_state = "ai-banned" + else//(icontype == "Matrix") + icon_state = "ai-matrix" //else //usr <<"You can only change your display once!" diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 945edea29f..5458f23b26 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -93,7 +93,8 @@ if(src.sleeping) src.paralysis = max(src.paralysis, 3) - src.sleeping-- + if(!src.sleeping_willingly) + src.sleeping-- if(src.resting) src.weakened = max(src.weakened, 5) @@ -181,7 +182,11 @@ if(hud && hud.hud) hud.hud.process_hud(src) - if (src.sleep) src.sleep.icon_state = text("sleep[]", src.sleeping) + if (src.sleep) + src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0) + src.sleep.overlays = null + if(src.sleeping_willingly) + src.sleep.overlays += icon(src.sleep.icon, "sleep_willing") if (src.rest) src.rest.icon_state = text("rest[]", src.resting) if (src.healths) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index e7cc4d2cc6..031c353b44 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -95,27 +95,43 @@ modtype = "Miner" if("Medical") + var/sprite = input(src,"Chassis Style", "Chassis Style", "Cancel") in list("Humanoid","Non-Humanoid") module = new /obj/item/weapon/robot_module/medical(src) hands.icon_state = "medical" - icon_state = "surgeon" + if (sprite == "Humanoid") + src.icon_state = "medicalrobot" + if (sprite == "Non-Humanoid") + src.icon_state = "surgeon" modtype = "Med" if("Security") + var/sprite = input(src,"Chassis Style", "Chassis Style", "Cancel") in list("Humanoid","Non-Humanoid") module = new /obj/item/weapon/robot_module/security(src) hands.icon_state = "security" - icon_state = "bloodhound" + if (sprite == "Humanoid") + src.icon_state = "securityrobot" + if (sprite == "Non-Humanoid") + src.icon_state = "bloodhound" modtype = "Sec" if("Engineering") + var/sprite = input(src,"Chassis Style", "Chassis Style", "Cancel") in list("Humanoid","Non-Humanoid") module = new /obj/item/weapon/robot_module/engineering(src) hands.icon_state = "engineer" - icon_state = "landmate" + if (sprite == "Humanoid") + src.icon_state = "engineerrobot" + if (sprite == "Non-Humanoid") + src.icon_state = "landmate" modtype = "Eng" if("Janitor") + var/sprite = input(src,"Chassis Style", "Chassis Style", "Cancel") in list("Humanoid","Non-Humanoid") module = new /obj/item/weapon/robot_module/janitor(src) hands.icon_state = "janitor" - icon_state = "mopgearrex" + if (sprite == "Humanoid") + src.icon_state = "janitorrobot" + if (sprite == "Non-Humanoid") + src.icon_state = "mopgearrex" modtype = "Jan" overlays -= "eyes" //Takes off the eyes that it started with diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 14d703cf08..caaec2d1bd 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -684,6 +684,12 @@ authorize() + if(custom_event_msg && custom_event_msg != "") + src << "

Custom Event

" + src << "

A custom event is taking place. OOC Info:

" + src << "[html_encode(custom_event_msg)]" + src << "
" + if(admins.Find(ckey)) holder = new /obj/admins(src) holder.rank = admins[ckey] diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index a1a76ca50a..bdbfae5768 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -178,9 +178,9 @@ datum/preferences // slot options if (!IsGuestKey(user.key)) if(!curslot) - dat += "Save Slot 1
" - else - dat += "Save Slot [curslot]
" + curslot = 1 + slotname = savefile_getslots(user)[1] + dat += "Save Slot [curslot] ([slotname])
" dat += "Load
" dat += "Create New Slot
" @@ -573,6 +573,7 @@ datum/preferences alert(user, "You do not have a savefile.") else curslot = slot + slotname = savefile_getslots(user)[curslot] loadsave(user) if(link_tags["removeslot"]) var/slot = text2num(link_tags["removeslot"]) @@ -583,6 +584,7 @@ datum/preferences usr << "Slot [slot] Deleted." curslot = 1 + slotname = savefile_getslots(user)[curslot] loadsave(usr) if(link_tags["loadslot2"]) loadsave(user) @@ -593,7 +595,7 @@ datum/preferences if(count > 10) usr << "You have reached the character limit." return - var/slotname = input(usr,"Choose a name for your slot","Name","Default") + slotname = input(usr,"Choose a name for your slot","Name","Default") curslot = savefile_createslot(user, slotname) diff --git a/code/modules/mob/new_player/savefile.dm b/code/modules/mob/new_player/savefile.dm index 7243cca918..ad9543abee 100644 --- a/code/modules/mob/new_player/savefile.dm +++ b/code/modules/mob/new_player/savefile.dm @@ -22,7 +22,7 @@ datum/preferences/proc/savefile_getslots(mob/user) for(var/i=1, i<=F.dir.len, i++) var/dname = F.dir[i] if(copytext(dname, 1, 6) == "slot.") - slots.Add(copytext(dname, 6)) + slots.Insert(2, copytext(dname, 6)) // reverse order so it's oldest->newest, like old system return slots diff --git a/code/modules/mob/screen.dm b/code/modules/mob/screen.dm index 271c808e5a..57978a409a 100644 --- a/code/modules/mob/screen.dm +++ b/code/modules/mob/screen.dm @@ -386,7 +386,12 @@ if("pull") usr.pulling = null if("sleep") - usr.sleeping = !( usr.sleeping ) + if(usr.sleeping && usr.sleeping_willingly) + usr.sleeping = 0 + usr.sleeping_willingly = 0 + else if(!usr.sleeping) + usr.sleeping = 1 + usr.sleeping_willingly = 1 if("rest") usr.resting = !( usr.resting ) if("throw") diff --git a/icons/mob/AI.dmi b/icons/mob/AI.dmi index 3802d6cecb..585ec0880a 100644 Binary files a/icons/mob/AI.dmi and b/icons/mob/AI.dmi differ diff --git a/icons/mob/robots.dmi b/icons/mob/robots.dmi index 614db60373..920dffd4cd 100644 Binary files a/icons/mob/robots.dmi and b/icons/mob/robots.dmi differ diff --git a/icons/mob/screen1_old.dmi b/icons/mob/screen1_old.dmi index 1a70335caf..ae9ed11ff7 100644 Binary files a/icons/mob/screen1_old.dmi and b/icons/mob/screen1_old.dmi differ