mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 14:44:05 +01:00
Ninja glove icon update, ninja suit toggle function
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// ** BEGIN NINJA CLOTHING DEFINES **
|
||||
|
||||
/obj/item/clothing/head/helmet/space/space_ninja
|
||||
desc = "What may appear to be a simple black garment is in fact a highly sophisticated nano-weave helmet. Standard issue ninja gear."
|
||||
name = "ninja hood"
|
||||
@@ -30,6 +32,214 @@
|
||||
var/materialEnabled = 0
|
||||
var/thermalEnabled = 0
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja
|
||||
name = "ninja suit"
|
||||
desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins."
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja_suit"
|
||||
allowed = list(/obj/item/weapon/gun, /obj/item/ammo_box, /obj/item/weapon/melee/baton, /obj/item/weapon/tank, /obj/item/weapon/stock_parts/cell)
|
||||
slowdown = 0
|
||||
unacidable = 1
|
||||
armor = list(melee = 60, bullet = 60, laser = 45,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
siemens_coefficient = 0.2
|
||||
|
||||
var/suitActive = 0
|
||||
var/suitBusy = 0
|
||||
|
||||
var/obj/item/weapon/stock_parts/cell/suitCell
|
||||
var/obj/item/clothing/head/helmet/space/space_ninja/suitHood
|
||||
var/obj/item/clothing/gloves/space_ninja/suitGloves
|
||||
var/obj/item/clothing/shoes/space_ninja/suitShoes
|
||||
var/obj/item/clothing/mask/gas/voice/space_ninja/suitMask
|
||||
var/obj/item/clothing/glasses/hud/space_ninja/suitGlasses
|
||||
var/mob/living/carbon/human/suitOccupant
|
||||
|
||||
/obj/item/clothing/gloves/space_ninja
|
||||
desc = "These nano-enhanced gloves insulate from electricity and provide fire resistance."
|
||||
name = "ninja gloves"
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja"
|
||||
siemens_coefficient = 0
|
||||
cold_protection = HANDS
|
||||
min_cold_protection_temperature = GLOVES_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
transfer_prints = FALSE
|
||||
|
||||
|
||||
/obj/item/clothing/shoes/space_ninja
|
||||
name = "ninja shoes"
|
||||
desc = "A pair of running shoes. Excellent for running and even better for smashing skulls."
|
||||
icon_state = "s-ninja"
|
||||
permeability_coefficient = 0.01
|
||||
flags = NOSLIP
|
||||
armor = list(melee = 60, bullet = 60, laser = 45,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
siemens_coefficient = 0.2
|
||||
cold_protection = FEET
|
||||
min_cold_protection_temperature = SHOE_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
heat_protection = FEET
|
||||
max_heat_protection_temperature = SHOE_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
// ** END NINJA CLOTHING DEFINES **
|
||||
|
||||
// ** BEGIN NINJA SUIT PROCS **
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/New()
|
||||
suitCell = new/obj/item/weapon/stock_parts/cell/ninja // The Ninja starts out with a 10,000 energy cell.
|
||||
if(suitCell.charge != suitCell.maxcharge)
|
||||
suitCell.charge = suitCell.maxcharge
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/verb/toggle_suit()
|
||||
set category = "Space Ninja - Equiptment"
|
||||
set name = "Toggle Suit"
|
||||
|
||||
if(usr.mind.special_role == "Ninja")
|
||||
if(suitBusy)
|
||||
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"))
|
||||
usr << "<span style='color: #0000ff;'>Now de-initializing...</span>"
|
||||
|
||||
sleep(15)
|
||||
usr << "<span style='color: #0000ff;'>Logging off, [usr.real_name]. Shutting down <b>SpiderOS</b>.</span>"
|
||||
|
||||
sleep(10)
|
||||
usr<< "<span style='color: #0000ff;'>Primary system status: <B>OFFLINE</B>.\nBackup system status: <b>OFFLINE</b>.</span>"
|
||||
|
||||
sleep(5)
|
||||
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)
|
||||
usr<< "<span style='color: #0000ff;'>Disconnecting neural-net interface...</span> <span style='color: #32CD32'><b>Success</b>.</span>"
|
||||
usr.hud_used.instantiate()
|
||||
usr.regenerate_icons()
|
||||
|
||||
sleep(5)
|
||||
usr<< "<span style='color: #0000ff;'>Disengaging neural-net interface...</span> <span style='color: #32CD32'><b>Success</b>.</span>"
|
||||
|
||||
sleep(10)
|
||||
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.
|
||||
usr << "<span style='color: #0000ff;'>Now initializing...</span>"
|
||||
|
||||
sleep(15)
|
||||
usr<< "<span style='color: #0000ff;'>Now establishing neural-net interface..."
|
||||
if(usr.mind.special_role != "Ninja")
|
||||
usr << "<span style='color: #ff0000;'><b>FĆAL �Rr�R</b>: µ§er n¤t rec¤gnized, c-c¤ntr-r¤£§-£§ £¤cked."
|
||||
return
|
||||
|
||||
sleep(10)
|
||||
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)
|
||||
usr<< "<span style='color: #0000ff;'>Securing external locking mechanism...</span>"
|
||||
if(!toggle_suit_lock(usr))
|
||||
return
|
||||
|
||||
sleep(5)
|
||||
usr<< "<span style='color: #0000ff;'>Suit secured, extending neural-net interface...</span>"
|
||||
usr.hud_used.human_hud('icons/mob/screen1_NinjaHUD.dmi',"#ffffff",255)
|
||||
usr.regenerate_icons()
|
||||
|
||||
sleep(10)
|
||||
usr<< "<span style='color: #0000ff;'>VOID-shift device status: <b>ONLINE</b>.\nCLOAK-tech device status:<b>ONLINE</b></span>"
|
||||
|
||||
sleep(5)
|
||||
usr<< "<span style='color: #0000ff;'>Primary system status: <b>ONLINE</b>.\nBackup system status: <b>ONLINE</b>.\nCurrent energy capacity: <b>[suitCell.charge]/[suitCell.maxcharge]</b>.</span>"
|
||||
|
||||
sleep(10)
|
||||
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
|
||||
usr << "<span style='color: #0000ff;'><b>NOTICE: </b>Suit de-activation protocals aborted.</span>"
|
||||
else
|
||||
usr << "<span style='color: #ff0000;'><b>FĆAL �Rr�R</b>: µ§er n¤t rec¤gnized, c-c¤ntr-r¤£§-£§ £¤cked."
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/toggle_suit_lock(mob/living/carbon/human/user)
|
||||
if(!suitActive)
|
||||
if(!istype(user.wear_suit, /obj/item/clothing/suit/space/space_ninja))
|
||||
user<< "<span style='color: #ff0000;'><b>ERROR:</b> Unable to locate user.\nABORTING...</span>"
|
||||
return 0
|
||||
if(!istype(user.head, /obj/item/clothing/head/helmet/space/space_ninja))
|
||||
user<< "<span style='color: #ff0000;'><b>ERROR:</b> Unable to locate hood.\nABORTING...</span>"
|
||||
return 0
|
||||
if(!istype(user.gloves, /obj/item/clothing/gloves/space_ninja))
|
||||
user<< "<span style='color: #ff0000;'><b>ERROR:</b> Unable to locate gloves.\nABORTING...</span>"
|
||||
return 0
|
||||
if(!istype(user.shoes, /obj/item/clothing/shoes/space_ninja))
|
||||
user<< "<span style='color: #ff0000;'><b>ERROR:</b> Unable to locate foot gear.\nABORTING...</span>"
|
||||
return 0
|
||||
if(!istype(user.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja))
|
||||
user<< "<span style='color: #ff0000;'><b>ERROR:</b> Unable to locate mask.\nABORTING...</span>"
|
||||
return 0
|
||||
if(!istype(user.glasses, /obj/item/clothing/glasses/hud/space_ninja))
|
||||
user<< "<span style='color: #ff0000;'><b>WARNING:</b> Unable to locate eye gear, vision enhancement unavailable.</span><span style='color: #0000ff;'>\nProceeding...</span>"
|
||||
else
|
||||
suitGlasses = user.glasses
|
||||
suitGlasses.enabled = 1
|
||||
suitGlasses.icon_state = "cybereye-green"
|
||||
|
||||
suitHood = user.head
|
||||
suitMask = user.wear_mask
|
||||
suitGloves = user.gloves
|
||||
suitShoes = user.shoes
|
||||
suitOccupant = user
|
||||
|
||||
flags |= NODROP
|
||||
suitHood.flags |= NODROP
|
||||
suitMask.flags |= NODROP
|
||||
suitGloves.flags |= NODROP
|
||||
suitGloves.pickpocket = 1
|
||||
suitShoes.flags |= NODROP
|
||||
suitShoes.slowdown = -2
|
||||
|
||||
icon_state = (user.gender == MALE ? "s-ninjan" : "s-ninjanf")
|
||||
suitGloves.icon_state = "s-ninjan"
|
||||
|
||||
return 1
|
||||
|
||||
else
|
||||
flags &= ~NODROP
|
||||
suitHood.flags &= ~NODROP
|
||||
suitMask.flags &= ~NODROP
|
||||
if(suitGlasses)
|
||||
suitGlasses.enabled = 0
|
||||
suitGlasses.icon_state = "cybereye-off"
|
||||
suitGloves.flags &= ~NODROP
|
||||
suitGloves.pickpocket = 0
|
||||
suitShoes.flags &= ~NODROP
|
||||
suitShoes.slowdown = -1
|
||||
icon_state = "s-ninja"
|
||||
suitGloves.icon_state = "s-ninja"
|
||||
|
||||
suitHood = null
|
||||
suitMask = null
|
||||
suitGlasses = null
|
||||
suitGloves = null
|
||||
suitShoes = null
|
||||
suitOccupant = null
|
||||
|
||||
return 1
|
||||
|
||||
// ** END NINJA SUIT PROCS **
|
||||
|
||||
// **BEGIN NINJA GLASSES PROCS**
|
||||
|
||||
/obj/item/clothing/glasses/hud/space_ninja/process_hud(var/mob/M) // Antag HUD processing.
|
||||
|
||||
if(antagHUDEnabled) // We only process if the antag-vision mode is enabled.
|
||||
@@ -46,39 +256,40 @@
|
||||
set category = "Space Ninja - Equiptment"
|
||||
set name = "Modify Vision"
|
||||
|
||||
if(enabled) // If the Ninja's suit is on and connected.
|
||||
if(usr.mind.special_role != "Ninja")
|
||||
usr << "<span style='color: #ff0000;'><b>FĆAL �Rr�R</b>: µ§er n¤t rec¤gnized, c-c¤ntr-r¤£§-£§ £¤cked."
|
||||
return
|
||||
if(usr.mind.special_role != "Ninja")
|
||||
usr << "<span style='color: #ff0000;'><b>FĆAL �Rr�R</b>: µ§er n¤t rec¤gnized, c-c¤ntr-r¤£§-£§ £¤cked."
|
||||
return
|
||||
|
||||
if(!user) // The user var is, so far as I can tell, required to refresh the window after each click.
|
||||
user = usr
|
||||
|
||||
/*
|
||||
* Each vision type the Ninja enables will drain more from his suit's battery per tick.
|
||||
* For instance, if the Ninja were to rn around with thermals and AntagHUD on he would be losing an additional 10 energy per tick.
|
||||
* Current vision modes are:
|
||||
* - Night
|
||||
* - Meson (Turfs)
|
||||
* - Material (Objects)
|
||||
* - Thermal (Mobs)
|
||||
* - Antag HUD
|
||||
*
|
||||
* -Dave
|
||||
*/
|
||||
var/dat = {"
|
||||
<center>Night Vision (2E) - <a href='?src=\ref[src];night=night'>[darkness_view ? "ENABLED" : "DISABLED"]</a><br>
|
||||
Meson Scanner (2E) - <a href='?src=\ref[src];meson=meson'>[mesonEnabled ? "ENABLED" : "DISABLED"]</a><br>
|
||||
Material Scanner (4E) - <a href='?src=\ref[src];material=material'>[materialEnabled ? "ENABLED" : "DISABLED"]</a><br>
|
||||
Thermal Scanner (4E) - <a href='?src=\ref[src];thermal=thermal'>[thermalEnabled ? "ENABLED" : "DISABLED"]</a><br>
|
||||
Threat Identification HUD (6E) - <a href='?src=\ref[src];antagHUD=antagHUD'>[antagHUDEnabled ? "ENABLED" : "DISABLED"]</a></center>
|
||||
"}
|
||||
|
||||
var/datum/browser/popup = new(user, "SpiderOS", "SpiderOS Optical Interface", 310, 150)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
else
|
||||
if(!enabled) // If the Ninja's suit is on and connected.
|
||||
usr << "<span style='color: #ff0000;'><b>ERROR: </b>No power supply detected, cannot activate optical implant.</span>"
|
||||
return
|
||||
|
||||
if(!user) // The user var is, so far as I can tell, required to refresh the window after each click.
|
||||
user = usr
|
||||
|
||||
/*
|
||||
* Each vision type the Ninja enables will drain more from his suit's battery per tick.
|
||||
* For instance, if the Ninja were to rn around with thermals and AntagHUD on he would be losing an additional 10 energy per tick.
|
||||
* Current vision modes are:
|
||||
* - Night
|
||||
* - Meson (Turfs)
|
||||
* - Material (Objects)
|
||||
* - Thermal (Mobs)
|
||||
* - Antag HUD
|
||||
*
|
||||
* -Dave
|
||||
*/
|
||||
var/dat = {"
|
||||
<center>Night Vision (2E) - <a href='?src=\ref[src];night=night'>[darkness_view ? "ENABLED" : "DISABLED"]</a><br>
|
||||
Meson Scanner (2E) - <a href='?src=\ref[src];meson=meson'>[mesonEnabled ? "ENABLED" : "DISABLED"]</a><br>
|
||||
Material Scanner (4E) - <a href='?src=\ref[src];material=material'>[materialEnabled ? "ENABLED" : "DISABLED"]</a><br>
|
||||
Thermal Scanner (4E) - <a href='?src=\ref[src];thermal=thermal'>[thermalEnabled ? "ENABLED" : "DISABLED"]</a><br>
|
||||
Threat Identification HUD (6E) - <a href='?src=\ref[src];antagHUD=antagHUD'>[antagHUDEnabled ? "ENABLED" : "DISABLED"]</a></center>
|
||||
"}
|
||||
|
||||
var/datum/browser/popup = new(user, "SpiderOS", "SpiderOS Optical Interface", 310, 150)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/hud/space_ninja/Topic(href, href_list)
|
||||
@@ -134,76 +345,4 @@
|
||||
modifyHUD(usr) // Re-call the verb to get a fresh version of the window.
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja
|
||||
name = "ninja suit"
|
||||
desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins."
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja_suit"
|
||||
allowed = list(/obj/item/weapon/gun, /obj/item/ammo_box, /obj/item/weapon/melee/baton, /obj/item/weapon/tank, /obj/item/weapon/stock_parts/cell)
|
||||
slowdown = 0
|
||||
unacidable = 1
|
||||
armor = list(melee = 60, bullet = 60, laser = 45,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
siemens_coefficient = 0.2
|
||||
|
||||
var/suitActive = 0
|
||||
var/suitBusy = 0
|
||||
|
||||
var/obj/item/weapon/stock_parts/cell/suitCell
|
||||
var/obj/item/clothing/head/helmet/space/space_ninja/suitHood
|
||||
var/obj/item/clothing/gloves/space_ninja/suitGloves
|
||||
var/obj/item/clothing/shoes/space_ninja/suitShoes
|
||||
var/obj/item/clothing/mask/gas/voice/space_ninja/suitMask
|
||||
var/obj/item/clothing/glasses/space_ninja/suitGlasses
|
||||
var/mob/living/carbon/human/suitOccupant
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/New()
|
||||
suitCell = /obj/item/weapon/stock_parts/cell/ninja // The Ninja starts out with a 10,000 energy cell.
|
||||
|
||||
|
||||
/obj/item/clothing/gloves/space_ninja
|
||||
desc = "These nano-enhanced gloves insulate from electricity and provide fire resistance."
|
||||
name = "ninja gloves"
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja"
|
||||
siemens_coefficient = 0
|
||||
cold_protection = HANDS
|
||||
min_cold_protection_temperature = GLOVES_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
transfer_prints = FALSE
|
||||
|
||||
|
||||
/obj/item/clothing/shoes/space_ninja
|
||||
name = "ninja shoes"
|
||||
desc = "A pair of running shoes. Excellent for running and even better for smashing skulls."
|
||||
icon_state = "s-ninja"
|
||||
permeability_coefficient = 0.01
|
||||
flags = NOSLIP
|
||||
armor = list(melee = 60, bullet = 60, laser = 45,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
siemens_coefficient = 0.2
|
||||
cold_protection = FEET
|
||||
min_cold_protection_temperature = SHOE_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
heat_protection = FEET
|
||||
max_heat_protection_temperature = SHOE_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/verb/toggle_suit()
|
||||
set category = "Space Ninja - Equiptment"
|
||||
set name = "Toggle Suit"
|
||||
|
||||
if(usr.mind.special_role == "Ninja")
|
||||
if(suitBusy)
|
||||
usr << "<span style='color: #ff0000;'><b>ERROR: </b>Suit systems busy, cannot initiate <b>[suitActive ? "de-activation" : "activation"]</b> protocals.</span>"
|
||||
return
|
||||
|
||||
suitBusy = 1
|
||||
if(suitActive && (alert("Confirm suit systems shutdown? This cannot be halted once it has started", "Confirm Shutdown", "Yes", "No") == "Yes"))
|
||||
usr << ""
|
||||
else if(!suitActive) // Activate the suit.
|
||||
usr << ""
|
||||
else
|
||||
suitBusy = 0
|
||||
usr << "<span style='color: #0000ff;'><b>NOTICE: </b>Suit de-activation protocals aborted.</span>"
|
||||
else
|
||||
usr << "<span style='color: #ff0000;'><b>FĆAL �Rr�R</b>: µ§er n¤t rec¤gnized, c-c¤ntr-r¤£§-£§ £¤cked."
|
||||
return
|
||||
// **END NINJA GLASSES PROCS**
|
||||
Reference in New Issue
Block a user