Files
Aurora.3/code/modules/clothing/spacesuits/rig/rig_verbs.dm
Zuhayr ebbb9b36b5 Moved everything to a module-based hardsuit system.
Generalized all ninja power and gear code to work with new rig system.
Added shurikens, weapon mount, more work on deployable items.
Readded energy nets and energy blades.
Grenade launcher/charge stuff, interface stuff.
Renamed previously existing rigs to voidsuits, restructured rig and voidsuit files.
Refactored the energy net and teleportation proc.
Totally rewrote AI core/intellicard transfer procs.
Added rig sprites by Mordeth221, added step by steap suit sealing/inability to interfere with suit sealing process.
Updated map paths to use voidsuits.
Added chemical dispenser functionality, added power sink, added atom/drain_power() proc for later use.
Added rigsuit verbs, added voice changer.
Renamed MASKINTERNALS to AIRTIGHT, added internals checks for airtight helmets.
Added drain_power() procs to vulnerable machinery.
Reimplemented data theft.
Added suit maluses for losing your cell while wearing one.
Transitioned the rig suits to a back-mounted item that also controls a chestpiece.
Converted rig module to a storage item, convert ERT voidsuits to hardsuits.
2014-11-14 22:57:26 +10:30

227 lines
5.5 KiB
Plaintext

// Interface for humans.
/obj/item/weapon/storage/rig/verb/hardsuit_interface()
set name = "Open Hardsuit Interface"
set desc = "Open the hardsuit system interface."
set category = "Hardsuit"
set src = usr.contents
if(wearer && wearer.back == src)
ui_interact(usr)
/obj/item/weapon/storage/rig/verb/toggle_vision()
set name = "Toggle Visor"
set desc = "Turns your rig visor off or on."
set category = "Hardsuit"
set src = usr.contents
if(!check_power_cost(usr))
return
if(canremove)
usr << "<span class='warning'>The suit is not active.</span>"
return
if(!visor)
usr << "<span class='warning'>The hardsuit does not have a configurable visor.</span>"
return
if(!visor.active)
visor.activate()
else
visor.deactivate()
/obj/item/weapon/storage/rig/verb/toggle_helmet()
set name = "Toggle Helmet"
set desc = "Deploys or retracts your helmet."
set category = "Hardsuit"
set src = usr.contents
toggle_piece("helmet",wearer)
/obj/item/weapon/storage/rig/verb/toggle_chest()
set name = "Toggle Chestpiece"
set desc = "Deploys or retracts your chestpiece."
set category = "Hardsuit"
set src = usr.contents
toggle_piece("chest",wearer)
/obj/item/weapon/storage/rig/verb/toggle_gauntlets()
set name = "Toggle Gauntlets"
set desc = "Deploys or retracts your gauntlets."
set category = "Hardsuit"
set src = usr.contents
toggle_piece("gauntlets",wearer)
/obj/item/weapon/storage/rig/verb/toggle_boots()
set name = "Toggle Boots"
set desc = "Deploys or retracts your boots."
set category = "Hardsuit"
set src = usr.contents
toggle_piece("boots",wearer)
/obj/item/weapon/storage/rig/verb/deploy_suit()
set name = "Deploy Hardsuit"
set desc = "Deploys helmet, gloves and boots."
set category = "Hardsuit"
set src = usr.contents
if(!istype(wearer) || !wearer.back == src)
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
return
if(!check_power_cost(usr))
return
deploy(wearer)
/obj/item/weapon/storage/rig/verb/toggle_seals_verb()
set name = "Toggle Seals"
set desc = "Activates or deactivates your rig seals."
set category = "Hardsuit"
set src = usr.contents
if(!istype(wearer) || !wearer.back == src)
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
return
toggle_seals(wearer)
/obj/item/weapon/storage/rig/verb/switch_vision_mode()
set name = "Switch Vision Mode"
set desc = "Switches between available vision modes."
set category = "Hardsuit"
set src = usr.contents
if(!check_power_cost(usr, 0, 0, 0, 0))
return
if(canremove)
usr << "<span class='warning'>The suit is not active.</span>"
return
if(!visor)
usr << "<span class='warning'>The hardsuit does not have a configurable visor.</span>"
return
if(!visor.active)
visor.activate()
if(!visor.active)
usr << "<span class='warning'>The visor is suffering a hardware fault and cannot be configured.</span>"
return
visor.engage()
/obj/item/weapon/storage/rig/verb/alter_voice()
set name = "Configure Voice Synthesiser"
set desc = "Toggles or configures your voice synthesizer."
set category = "Hardsuit"
set src = usr.contents
if(canremove)
usr << "<span class='warning'>The suit is not active.</span>"
return
if(!speech)
usr << "<span class='warning'>The hardsuit does not have a speech synthesiser.</span>"
return
speech.engage()
/obj/item/weapon/storage/rig/verb/select_module()
set name = "Select Module"
set desc = "Selects a module as your primary system."
set category = "Hardsuit"
set src = usr.contents
if(!check_power_cost(usr, 0, 0, 0, 0))
return
if(canremove)
usr << "<span class='warning'>The suit is not active.</span>"
return
var/list/selectable = list()
for(var/obj/item/rig_module/module in installed_modules)
if(module.selectable)
selectable |= module
var/obj/item/rig_module/module = input("Which module do you wish to select?") as null|anything in selectable
if(!istype(module))
return
selected_module = module
usr << "<font color='blue'><b>Primary system is now: [selected_module.interface_name].</b></font>"
/obj/item/weapon/storage/rig/verb/toggle_module()
set name = "Toggle Module"
set desc = "Toggle a system module."
set category = "Hardsuit"
set src = usr.contents
if(!check_power_cost(usr, 0, 0, 0, 0))
return
if(canremove)
usr << "<span class='warning'>The suit is not active.</span>"
return
var/list/selectable = list()
for(var/obj/item/rig_module/module in installed_modules)
if(module.toggleable)
selectable |= module
var/obj/item/rig_module/module = input("Which module do you wish to toggle?") as null|anything in selectable
if(!istype(module))
return
if(module.active)
usr << "<font color='blue'><b>You attempt to deactivate \the [module.interface_name].</b></font>"
module.deactivate()
else
usr << "<font color='blue'><b>You attempt to activate \the [module.interface_name].</b></font>"
module.activate()
/obj/item/weapon/storage/rig/verb/engage_module()
set name = "Engage Module"
set desc = "Engages a system module."
set category = "Hardsuit"
set src = usr.contents
if(canremove)
usr << "<span class='warning'>The suit is not active.</span>"
return
if(!check_power_cost(usr, 0, 0, 0, 0))
return
var/list/selectable = list()
for(var/obj/item/rig_module/module in installed_modules)
if(module.usable)
selectable |= module
var/obj/item/rig_module/module = input("Which module do you wish to engage?") as null|anything in selectable
if(!istype(module))
return
usr << "<font color='blue'><b>You attempt to engage the [module.interface_name].</b></font>"
module.engage()