mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-20 07:12:55 +00:00
- Added 4 new HUD styles - Humans recreate their hud if they change their UI pref mid-game - Refactored how objects are added to the client screen - HUD's are now handled by subtype and mob/proc/create_mob_hud() - HUD visibility is no longer chained directly to the F12 button, it's a proc on HUD datums now - Mobs only create/destroy their HUD when necessary, not every Login() - Destroyed aim-mode, it didn't work and I couldn't make it work. - Renamed all of the screen1_x.dmi files to screen_x.dmi - Removed screen1.dmi, screen_gen.dmi now handles generic icons.
94 lines
4.0 KiB
Plaintext
94 lines
4.0 KiB
Plaintext
|
||
//Verbs link to procs because verb-like procs have a bug which prevents their use if the arguments are not readily referenced.
|
||
//^ Old coder words may be false these days, Not taking the risk for now.
|
||
|
||
/obj/item/clothing/suit/space/space_ninja/verb/toggle_suit()
|
||
set category = "Space Ninja - Equipment"
|
||
set name = "Toggle Suit"
|
||
|
||
if(usr.mind.special_role == "Ninja")
|
||
if(suitBusy)
|
||
to_chat(usr, "<span style='color: #ff0000;'><b>ERROR: </b>Suit systems busy, cannot initiate [suitActive ? "de-activation" : "activation"] protocals at this time.</span>")
|
||
return
|
||
|
||
suitBusy = 1
|
||
|
||
if(suitActive && (alert("Confirm suit systems shutdown? This cannot be halted once it has started.", "Confirm Shutdown", "Yes", "No") == "Yes"))
|
||
to_chat(usr, "<span style='color: #0000ff;'>Now de-initializing...</span>")
|
||
|
||
sleep(15)
|
||
to_chat(usr, "<span style='color: #0000ff;'>Logging off, [usr.real_name]. Shutting down <b>SpiderOS</b>.</span>")
|
||
|
||
sleep(10)
|
||
to_chat(usr, "<span style='color: #0000ff;'>Primary system status: <B>OFFLINE</B>.\nBackup system status: <b>OFFLINE</b>.</span>")
|
||
|
||
sleep(5)
|
||
to_chat(usr, "<span style='color: #0000ff;'>VOID-shift device status: <B>OFFLINE</B>.\nCLOAK-tech device status: <B>OFFLINE</B>.</span>")
|
||
//TODO: Shut down any active abilities
|
||
|
||
sleep(10)
|
||
to_chat(usr, "<span style='color: #0000ff;'>Disconnecting neural-net interface...</span> <span style='color: #32CD32'><b>Success</b>.</span>")
|
||
if(usr.hud_used)
|
||
qdel(usr.hud_used)
|
||
usr.hud_used = null
|
||
usr.create_mob_hud()
|
||
usr.regenerate_icons()
|
||
|
||
sleep(5)
|
||
to_chat(usr, "<span style='color: #0000ff;'>Disengaging neural-net interface...</span> <span style='color: #32CD32'><b>Success</b>.</span>")
|
||
|
||
sleep(10)
|
||
to_chat(usr, "<span style='color: #0000ff;'>Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: <B>FINISHED</B>.</span>")
|
||
//TODO: Grant verbs
|
||
toggle_suit_lock(usr)
|
||
usr.regenerate_icons()
|
||
suitBusy = 0
|
||
suitActive = 0
|
||
|
||
else if(!suitActive) // Activate the suit.
|
||
to_chat(usr, "<span style='color: #0000ff;'>Now initializing...</span>")
|
||
|
||
sleep(15)
|
||
to_chat(usr, "<span style='color: #0000ff;'>Now establishing neural-net interface...")
|
||
if(usr.mind.special_role != "Ninja")
|
||
to_chat(usr, "<span style='color: #ff0000;'><b>FĆAL <20>Rr<52>R</b>: ŧer nt recgnized, c-cntr-r䣧-ç äcked.")
|
||
return
|
||
|
||
sleep(10)
|
||
to_chat(usr, "<span style='color: #0000ff;'>Neural-net established. Now monitoring brainwave pattern. \nBrainwave pattern</span> <span style='color: #32CD32;'><b>GREEN</b></span><span style='color: #0000ff;'>, proceeding.</span>")
|
||
|
||
sleep(10)
|
||
to_chat(usr, "<span style='color: #0000ff;'>Securing external locking mechanism...</span>")
|
||
if(!toggle_suit_lock(usr))
|
||
return
|
||
|
||
sleep(5)
|
||
to_chat(usr, "<span style='color: #0000ff;'>Suit secured, extending neural-net interface...</span>")
|
||
if(usr.hud_used)
|
||
qdel(usr.hud_used)
|
||
usr.hud_used = null
|
||
usr.hud_used = new /datum/hud/human(usr, 'icons/mob/screen_ninja.dmi', "#ffffff", 255)
|
||
if(usr.hud_used)
|
||
usr.hud_used.show_hud(usr.hud_used.hud_version)
|
||
usr.regenerate_icons()
|
||
|
||
sleep(10)
|
||
to_chat(usr, "<span style='color: #0000ff;'>VOID-shift device status: <b>ONLINE</b>.\nCLOAK-tech device status:<b>ONLINE</b></span>")
|
||
|
||
sleep(5)
|
||
to_chat(usr, "<span style='color: #0000ff;'>Primary system status: <b>ONLINE</b>.\nBackup system status: <b>ONLINE</b>.</span>")
|
||
if(suitCell)
|
||
to_chat(usr, "<span style='color: #0000ff;'>Current energy capacity: <b>[suitCell.charge]/[suitCell.maxcharge]</b>.</span>")
|
||
|
||
sleep(10)
|
||
to_chat(usr, "<span style='color: #0000ff;'>All systems operational. Welcome to <b>SpiderOS</b>, [usr.real_name].</span>")
|
||
//TODO: Grant ninja verbs here.
|
||
suitBusy = 0
|
||
suitActive = 1
|
||
|
||
else
|
||
suitBusy = 0
|
||
to_chat(usr, "<span style='color: #0000ff;'><b>NOTICE: </b>Suit de-activation protocals aborted.</span>")
|
||
else
|
||
to_chat(usr, "<span style='color: #ff0000;'><b>FĆAL <20>Rr<52>R</b>: ŧer nt recgnized, c-cntr-r䣧-ç äcked.")
|
||
return |