mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-04 22:52:03 +00:00
Merge branch 'master' of git://github.com/Baystation12/Baystation12
Conflicts: code/game/vote.dm Because I did it derpily.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
35
code/modules/admin/verbs/custom_event.dm
Normal file
35
code/modules/admin/verbs/custom_event.dm
Normal file
@@ -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 << "<h1 class='alert'>Custom Event</h1>"
|
||||
world << "<h2 class='alert'>A custom event is starting. OOC Info:</h2>"
|
||||
world << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
|
||||
world << "<br>"
|
||||
|
||||
// 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 << "<h1 class='alert'>Custom Event</h1>"
|
||||
src << "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
|
||||
src << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
|
||||
src << "<br>"
|
||||
@@ -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)
|
||||
..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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!"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -684,6 +684,12 @@
|
||||
|
||||
authorize()
|
||||
|
||||
if(custom_event_msg && custom_event_msg != "")
|
||||
src << "<h1 class='alert'>Custom Event</h1>"
|
||||
src << "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
|
||||
src << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
|
||||
src << "<br>"
|
||||
|
||||
if(admins.Find(ckey))
|
||||
holder = new /obj/admins(src)
|
||||
holder.rank = admins[ckey]
|
||||
|
||||
@@ -178,9 +178,9 @@ datum/preferences
|
||||
// slot options
|
||||
if (!IsGuestKey(user.key))
|
||||
if(!curslot)
|
||||
dat += "<a href='byond://?src=\ref[user];preferences=1;saveslot=1'>Save Slot 1</a><br>"
|
||||
else
|
||||
dat += "<a href='byond://?src=\ref[user];preferences=1;saveslot=[curslot]'>Save Slot [curslot]</a><br>"
|
||||
curslot = 1
|
||||
slotname = savefile_getslots(user)[1]
|
||||
dat += "<a href='byond://?src=\ref[user];preferences=1;saveslot=[curslot]'>Save Slot [curslot] ([slotname])</a><br>"
|
||||
dat += "<a href='byond://?src=\ref[user];preferences=1;loadslot2=1'>Load</a><br>"
|
||||
dat += "<a href='byond://?src=\ref[user];preferences=1;createslot=1'>Create New Slot</a><br>"
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user