Adds autosaving

This commit is contained in:
Aronai Sieyes
2020-04-16 12:40:30 -04:00
parent 4d861eb770
commit 3ea7696c38
3 changed files with 45 additions and 2 deletions

View File

@@ -8,7 +8,7 @@
if(!istype(target))
return
var/list/smite_types = list(SMITE_SHADEKIN_ATTACK,SMITE_SHADEKIN_NOMF,SMITE_REDSPACE_ABDUCT)
var/list/smite_types = list(SMITE_SHADEKIN_ATTACK,SMITE_SHADEKIN_NOMF,SMITE_REDSPACE_ABDUCT,SMITE_AUTOSAVE)
var/smite_choice = input("Select the type of SMITE for [target]","SMITE Type Choice") as null|anything in smite_types
if(!smite_choice)
@@ -50,7 +50,7 @@
shadekin.death()
if(SMITE_SHADEKIN_NOMF)
var/list/kin_types = list(
var/static/list/kin_types = list(
"Red Eyes (Dark)" = /mob/living/simple_mob/shadekin/red/dark,
"Red Eyes (Light)" = /mob/living/simple_mob/shadekin/red/white,
"Red Eyes (Brown)" = /mob/living/simple_mob/shadekin/red/brown,
@@ -122,6 +122,9 @@
if(SMITE_REDSPACE_ABDUCT)
redspace_abduction(target, src)
if(SMITE_AUTOSAVE)
fake_autosave(target, src)
else
return //Injection? Don't print any messages.
@@ -211,3 +214,42 @@ var/redspace_abduction_z
to_chat(user,"<span class='notice'>The mob has been moved. ([admin_jump_link(target,usr.client.holder)])</span>")
target.transforming = FALSE
/proc/fake_autosave(mob/living/target, user)
if(!istype(target) || !target.client)
to_chat(user, "<span class='warning'>Not a living mob or no client, so no point!</span>")
return
target.move_delay = 99999999
to_chat(target, "<span class='notice' style='font: small-caps bold large monospace!important'>Autosaving your progress, please wait...</span>")
target << 'sound/effects/ding.ogg'
var/static/list/bad_tips = list(
"Did you know that black shoes protect you from electrocution while hacking?",
"Did you know that airlocks always have a wire that disables ID checks?",
"You can always find at least 3 pairs of glowing purple gloves in maint!",
"Phoron is not toxic if you've had a soda within 30 seconds of exposure!",
"Space Mountain Wind makes you immune to damage from space for 30 seconds!",
"A mask and air tank are all you need to be safe in space!",
"When exploring maintenance, wearing no shoes makes you move faster!",
"Did you know that the bartender's shotgun is loaded with harmless ammo?",
"Did you know that the tesla and singulo only need containment for 5 minutes?")
var/tip = pick(bad_tips)
to_chat(target, "<span class='notice' style='font: small-caps bold large monospace!important'>Tip of the day:</span><br><span class='notice'>[tip]</span>")
var/obj/screen/loader = new(target)
loader.name = "Autosaving..."
loader.desc = "A disc icon that represents your game autosaving. Please wait."
loader.icon = 'icons/obj/discs_vr.dmi'
loader.icon_state = "quicksave"
loader.screen_loc = "NORTH-1, EAST-1"
target.client.screen += loader
spawn(10 SECONDS)
if(target)
target.move_delay = 0
to_chat(target, "<span class='notice' style='font: small-caps bold large monospace!important'>Autosave complete!</span>")
if(target.client)
target.client.screen -= loader