mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge pull request #7008 from Zuhayr/spaceninjas
Hardsuit/voidsuit change, ninja refactor.
This commit is contained in:
@@ -106,12 +106,12 @@
|
||||
/obj/effect/landmark/corpse/syndicatecommando
|
||||
name = "Syndicate Commando"
|
||||
corpseuniform = /obj/item/clothing/under/syndicate
|
||||
corpsesuit = /obj/item/clothing/suit/space/rig/syndi
|
||||
corpsesuit = /obj/item/clothing/suit/space/void/merc
|
||||
corpseshoes = /obj/item/clothing/shoes/swat
|
||||
corpsegloves = /obj/item/clothing/gloves/swat
|
||||
corpseradio = /obj/item/device/radio/headset
|
||||
corpsemask = /obj/item/clothing/mask/gas/syndicate
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/rig/syndi
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/void/merc
|
||||
corpseback = /obj/item/weapon/tank/jetpack/oxygen
|
||||
corpsepocket1 = /obj/item/weapon/tank/emergency_oxygen
|
||||
corpseid = 1
|
||||
@@ -161,9 +161,9 @@
|
||||
corpseidaccess = "Station Engineer"
|
||||
|
||||
/obj/effect/landmark/corpse/engineer/rig
|
||||
corpsesuit = /obj/item/clothing/suit/space/rig/engineering
|
||||
corpsesuit = /obj/item/clothing/suit/space/void/engineering
|
||||
corpsemask = /obj/item/clothing/mask/breath
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/rig/engineering
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/void/engineering
|
||||
|
||||
/obj/effect/landmark/corpse/clown
|
||||
name = "Clown"
|
||||
@@ -199,9 +199,9 @@
|
||||
corpseidaccess = "Shaft Miner"
|
||||
|
||||
/obj/effect/landmark/corpse/miner/rig
|
||||
corpsesuit = /obj/item/clothing/suit/space/rig/mining
|
||||
corpsesuit = /obj/item/clothing/suit/space/void/mining
|
||||
corpsemask = /obj/item/clothing/mask/breath
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/rig/mining
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/void/mining
|
||||
|
||||
|
||||
/////////////////Officers//////////////////////
|
||||
|
||||
@@ -243,6 +243,64 @@ BLIND // can't see anything
|
||||
slot_flags = SLOT_HEAD
|
||||
w_class = 2.0
|
||||
|
||||
var/light_overlay = "helmet_light"
|
||||
var/brightness_on
|
||||
var/on = 0
|
||||
|
||||
/obj/item/clothing/head/New()
|
||||
..()
|
||||
if(!icon_action_button && brightness_on)
|
||||
icon_action_button = "[icon_state]"
|
||||
|
||||
/obj/item/clothing/head/attack_self(mob/user)
|
||||
if(brightness_on)
|
||||
|
||||
if(!isturf(user.loc))
|
||||
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||
return
|
||||
|
||||
on = !on
|
||||
|
||||
overlays.Cut()
|
||||
if(on)
|
||||
if(!light_overlay_cache["[light_overlay]_icon"])
|
||||
light_overlay_cache["[light_overlay]_icon"] = image("icon" = 'icons/obj/light_overlays.dmi', "icon_state" = "[light_overlay]")
|
||||
if(!light_overlay_cache["[light_overlay]"])
|
||||
light_overlay_cache["[light_overlay]"] = image("icon" = 'icons/mob/light_overlays.dmi', "icon_state" = "[light_overlay]")
|
||||
overlays |= light_overlay_cache["[light_overlay]_icon"]
|
||||
user.SetLuminosity(user.luminosity + brightness_on)
|
||||
else
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_head()
|
||||
|
||||
else
|
||||
return ..(user)
|
||||
|
||||
/obj/item/clothing/head/proc/update_light(mob/user)
|
||||
|
||||
if(!brightness_on)
|
||||
return
|
||||
|
||||
if(on)
|
||||
if(light_overlay) overlays |= light_overlay
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
SetLuminosity(brightness_on)
|
||||
|
||||
/obj/item/clothing/head/equipped(mob/user)
|
||||
..()
|
||||
update_light(user)
|
||||
|
||||
/obj/item/clothing/head/pickup(mob/user)
|
||||
..()
|
||||
update_light(user)
|
||||
|
||||
/obj/item/clothing/head/dropped(mob/user)
|
||||
..()
|
||||
update_light(user)
|
||||
|
||||
/obj/item/clothing/head/update_clothing_icon()
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
/*
|
||||
Dear ninja gloves
|
||||
|
||||
This isn't because I like you
|
||||
this is because your father is a bastard
|
||||
|
||||
...
|
||||
I guess you're a little cool.
|
||||
-Sayu
|
||||
*/
|
||||
|
||||
/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
|
||||
var/draining = 0
|
||||
var/candrain = 0
|
||||
var/mindrain = 200
|
||||
var/maxdrain = 400
|
||||
species_restricted = null
|
||||
|
||||
/*
|
||||
This runs the gamut of what ninja gloves can do
|
||||
The other option would be a dedicated ninja touch bullshit proc on everything
|
||||
which would probably more efficient, but ninjas are pretty rare.
|
||||
This was mostly introduced to keep ninja code from contaminating other code;
|
||||
with this in place it would be easier to untangle the rest of it.
|
||||
|
||||
For the drain proc, see events/ninja.dm
|
||||
*/
|
||||
/obj/item/clothing/gloves/space_ninja/Touch(var/atom/A,var/proximity)
|
||||
if(!candrain || draining) return 0
|
||||
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(!istype(H)) return 0 // what
|
||||
var/obj/item/clothing/suit/space/space_ninja/suit = H.wear_suit
|
||||
if(!istype(suit)) return 0
|
||||
if(isturf(A)) return 0
|
||||
|
||||
if(!proximity) // todo: you could add ninja stars or computer hacking here
|
||||
return 0
|
||||
|
||||
// Move an AI into and out of things
|
||||
if(istype(A,/mob/living/silicon/ai))
|
||||
if(suit.s_control)
|
||||
A.add_fingerprint(H)
|
||||
suit.transfer_ai("AICORE", "NINJASUIT", A, H)
|
||||
return 1
|
||||
else
|
||||
H << "\red <b>ERROR</b>: \black Remote access channel disabled."
|
||||
return 0
|
||||
|
||||
if(istype(A,/obj/structure/AIcore/deactivated))
|
||||
if(suit.s_control)
|
||||
A.add_fingerprint(H)
|
||||
suit.transfer_ai("INACTIVE","NINJASUIT",A, H)
|
||||
return 1
|
||||
else
|
||||
H << "\red <b>ERROR</b>: \black Remote access channel disabled."
|
||||
return 0
|
||||
if(istype(A,/obj/machinery/computer/aifixer))
|
||||
if(suit.s_control)
|
||||
A.add_fingerprint(H)
|
||||
suit.transfer_ai("AIFIXER","NINJASUIT",A, H)
|
||||
return 1
|
||||
else
|
||||
H << "\red <b>ERROR</b>: \black Remote access channel disabled."
|
||||
return 0
|
||||
|
||||
// steal energy from powered things
|
||||
if(istype(A,/mob/living/silicon/robot))
|
||||
A.add_fingerprint(H)
|
||||
drain("CYBORG",A,suit)
|
||||
return 1
|
||||
if(istype(A,/obj/machinery/power/apc))
|
||||
A.add_fingerprint(H)
|
||||
drain("APC",A,suit)
|
||||
return 1
|
||||
if(istype(A,/obj/structure/cable))
|
||||
A.add_fingerprint(H)
|
||||
drain("WIRE",A,suit)
|
||||
return 1
|
||||
if(istype(A,/obj/structure/grille))
|
||||
var/obj/structure/cable/C = locate() in A.loc
|
||||
if(C)
|
||||
drain("WIRE",C,suit)
|
||||
return 1
|
||||
if(istype(A,/obj/machinery/power/smes))
|
||||
A.add_fingerprint(H)
|
||||
drain("SMES",A,suit)
|
||||
return 1
|
||||
if(istype(A,/obj/mecha))
|
||||
A.add_fingerprint(H)
|
||||
drain("MECHA",A,suit)
|
||||
return 1
|
||||
|
||||
// download research
|
||||
if(istype(A,/obj/machinery/computer/rdconsole))
|
||||
A.add_fingerprint(H)
|
||||
drain("RESEARCH",A,suit)
|
||||
return 1
|
||||
if(istype(A,/obj/machinery/r_n_d/server))
|
||||
A.add_fingerprint(H)
|
||||
var/obj/machinery/r_n_d/server/S = A
|
||||
if(S.disabled)
|
||||
return 1
|
||||
if(S.shocked)
|
||||
S.shock(H,50)
|
||||
return 1
|
||||
drain("RESEARCH",A,suit)
|
||||
return 1
|
||||
|
||||
@@ -4,38 +4,13 @@
|
||||
icon_state = "hardhat0_yellow"
|
||||
flags = FPRINT | TABLEPASS
|
||||
item_state = "hardhat0_yellow"
|
||||
var/brightness_on = 4 //luminosity when on
|
||||
var/on = 0
|
||||
brightness_on = 4 //luminosity when on
|
||||
light_overlay = "hardhat_light"
|
||||
item_color = "yellow" //Determines used sprites: hardhat[on]_[color] and hardhat[on]_[color]2 (lying down sprite)
|
||||
armor = list(melee = 30, bullet = 5, laser = 20,energy = 10, bomb = 20, bio = 10, rad = 20)
|
||||
flags_inv = 0
|
||||
icon_action_button = "action_hardhat"
|
||||
siemens_coefficient = 0.9
|
||||
|
||||
attack_self(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||
return
|
||||
on = !on
|
||||
icon_state = "hardhat[on]_[item_color]"
|
||||
item_state = "hardhat[on]_[item_color]"
|
||||
|
||||
if(on) user.SetLuminosity(user.luminosity + brightness_on)
|
||||
else user.SetLuminosity(user.luminosity - brightness_on)
|
||||
|
||||
pickup(mob/user)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity + brightness_on)
|
||||
// user.UpdateLuminosity() //TODO: Carn
|
||||
SetLuminosity(0)
|
||||
|
||||
dropped(mob/user)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
// user.UpdateLuminosity()
|
||||
SetLuminosity(brightness_on)
|
||||
|
||||
|
||||
/obj/item/clothing/head/hardhat/orange
|
||||
icon_state = "hardhat0_orange"
|
||||
item_state = "hardhat0_orange"
|
||||
@@ -61,5 +36,4 @@
|
||||
/obj/item/clothing/head/hardhat/dblue
|
||||
icon_state = "hardhat0_dblue"
|
||||
item_state = "hardhat0_dblue"
|
||||
item_color = "dblue"
|
||||
|
||||
item_color = "dblue"
|
||||
@@ -126,33 +126,10 @@
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
|
||||
body_parts_covered = HEAD|EYES
|
||||
var/brightness_on = 2 //luminosity when on
|
||||
var/on = 0
|
||||
brightness_on = 2
|
||||
light_overlay = "helmet_light"
|
||||
w_class = 3
|
||||
|
||||
attack_self(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||
return
|
||||
on = !on
|
||||
icon_state = "hardhat[on]_[item_color]"
|
||||
item_state = "hardhat[on]_[item_color]"
|
||||
|
||||
if(on) user.SetLuminosity(user.luminosity + brightness_on)
|
||||
else user.SetLuminosity(user.luminosity - brightness_on)
|
||||
|
||||
pickup(mob/user)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity + brightness_on)
|
||||
// user.UpdateLuminosity()
|
||||
SetLuminosity(0)
|
||||
|
||||
dropped(mob/user)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
// user.UpdateLuminosity()
|
||||
SetLuminosity(brightness_on)
|
||||
|
||||
/*
|
||||
* Kitty ears
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "breath mask"
|
||||
icon_state = "breath"
|
||||
item_state = "breath"
|
||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKINTERNALS
|
||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | AIRTIGHT
|
||||
body_parts_covered = 0
|
||||
w_class = 2
|
||||
gas_transfer_coefficient = 0.10
|
||||
@@ -24,14 +24,14 @@
|
||||
if(!src.hanging)
|
||||
src.hanging = !src.hanging
|
||||
gas_transfer_coefficient = 1 //gas is now escaping to the turf and vice versa
|
||||
flags &= ~(MASKCOVERSMOUTH | MASKINTERNALS)
|
||||
flags &= ~(MASKCOVERSMOUTH | AIRTIGHT)
|
||||
icon_state = "breathdown"
|
||||
usr << "Your mask is now hanging on your neck."
|
||||
|
||||
else
|
||||
src.hanging = !src.hanging
|
||||
gas_transfer_coefficient = 0.10
|
||||
flags |= MASKCOVERSMOUTH | MASKINTERNALS
|
||||
flags |= MASKCOVERSMOUTH | AIRTIGHT
|
||||
icon_state = "breath"
|
||||
usr << "You pull the mask up to cover your face."
|
||||
update_clothing_icon()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "gas mask"
|
||||
desc = "A face-covering mask that can be connected to an air supply. Filters harmful gases from the air."
|
||||
icon_state = "gas_alt"
|
||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
|
||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT
|
||||
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE
|
||||
body_parts_covered = FACE|EYES
|
||||
w_class = 3.0
|
||||
@@ -48,22 +48,6 @@
|
||||
icon_state = "swat"
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
/obj/item/clothing/mask/gas/voice
|
||||
name = "gas mask"
|
||||
//desc = "A face-covering mask that can be connected to an air supply. It seems to house some odd electronics."
|
||||
var/mode = 0// 0==Scouter | 1==Night Vision | 2==Thermal | 3==Meson
|
||||
var/voice = "Unknown"
|
||||
var/vchange = 0//This didn't do anything before. It now checks if the mask has special functions/N
|
||||
origin_tech = "syndicate=4"
|
||||
|
||||
/obj/item/clothing/mask/gas/voice/space_ninja
|
||||
name = "ninja mask"
|
||||
desc = "A close-fitting mask that acts both as an air filter and a post-modern fashion statement."
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja_mask"
|
||||
vchange = 1
|
||||
siemens_coefficient = 0.2
|
||||
|
||||
/obj/item/clothing/mask/gas/clown_hat
|
||||
name = "clown wig and mask"
|
||||
desc = "A true prankster's facial attire. A clown is incomplete without his wig and mask."
|
||||
|
||||
22
code/modules/clothing/masks/voice.dm
Normal file
22
code/modules/clothing/masks/voice.dm
Normal file
@@ -0,0 +1,22 @@
|
||||
/obj/item/voice_changer
|
||||
name = "voice changer"
|
||||
desc = "A voice scrambling module. If you can see this, report it as a bug on the tracker."
|
||||
var/voice //If set and item is present in mask/suit, this name will be used for the wearer's speech.
|
||||
var/active
|
||||
|
||||
/obj/item/clothing/mask/gas/voice
|
||||
name = "gas mask"
|
||||
desc = "A face-covering mask that can be connected to an air supply. It seems to house some odd electronics."
|
||||
var/obj/item/voice_changer/changer
|
||||
origin_tech = "syndicate=4"
|
||||
|
||||
/obj/item/clothing/mask/gas/voice/New()
|
||||
..()
|
||||
changer = new(src)
|
||||
|
||||
/obj/item/clothing/mask/gas/voice/space_ninja
|
||||
name = "ninja mask"
|
||||
desc = "A close-fitting mask that acts both as an air filter and a post-modern fashion statement."
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja_mask"
|
||||
siemens_coefficient = 0.2
|
||||
@@ -36,21 +36,6 @@
|
||||
heat_protection = FEET
|
||||
max_heat_protection_temperature = SHOE_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
/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 = 50, laser = 30,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
|
||||
species_restricted = null
|
||||
|
||||
/obj/item/clothing/shoes/sandal
|
||||
desc = "A pair of rather plain, wooden sandals."
|
||||
name = "sandals"
|
||||
|
||||
@@ -35,50 +35,6 @@
|
||||
item_state = "skrell_suit_black"
|
||||
item_color = "skrell_suit_black"
|
||||
|
||||
//Unathi space gear. Huge and restrictive.
|
||||
/obj/item/clothing/head/helmet/space/unathi
|
||||
armor = list(melee = 40, bullet = 30, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 50)
|
||||
heat_protection = HEAD
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
var/up = 0 //So Unathi helmets play nicely with the weldervision check.
|
||||
species_restricted = list("Unathi")
|
||||
|
||||
/obj/item/clothing/head/helmet/space/unathi/helmet_cheap
|
||||
name = "NT breacher helmet"
|
||||
desc = "Hey! Watch it with that thing! It's a knock-off of a Unathi battle-helm, and that spike could put someone's eye out."
|
||||
icon_state = "unathi_helm_cheap"
|
||||
item_state = "unathi_helm_cheap"
|
||||
item_color = "unathi_helm_cheap"
|
||||
|
||||
/obj/item/clothing/suit/space/unathi
|
||||
armor = list(melee = 40, bullet = 30, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 50)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
species_restricted = list("Unathi")
|
||||
|
||||
/obj/item/clothing/suit/space/unathi/rig_cheap
|
||||
name = "NT breacher chassis"
|
||||
desc = "A cheap NT knock-off of a Unathi battle-rig. Looks like a fish, moves like a fish, steers like a cow."
|
||||
icon_state = "rig-unathi-cheap"
|
||||
item_state = "rig-unathi-cheap"
|
||||
slowdown = 3
|
||||
|
||||
/obj/item/clothing/head/helmet/space/unathi/breacher
|
||||
name = "breacher helm"
|
||||
desc = "Weathered, ancient and battle-scarred. The helmet is too."
|
||||
icon_state = "unathi_breacher"
|
||||
item_state = "unathi_breacher"
|
||||
item_color = "unathi_breacher"
|
||||
|
||||
/obj/item/clothing/suit/space/unathi/breacher
|
||||
name = "breacher chassis"
|
||||
desc = "Huge, bulky and absurdly heavy. It must be like wearing a tank."
|
||||
icon_state = "unathi_breacher"
|
||||
item_state = "unathi_breacher"
|
||||
item_color = "unathi_breacher"
|
||||
slowdown = 1
|
||||
|
||||
// Vox space gear (vaccuum suit, low pressure armour)
|
||||
// Can't be equipped by any other species due to bone structure and vox cybernetics.
|
||||
/obj/item/clothing/suit/space/vox
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
/obj/item/clothing/head/helmet/space/rig/ert
|
||||
name = "emergency response team helmet"
|
||||
desc = "A helmet worn by members of the NanoTrasen Emergency Response Team. Armoured and space ready."
|
||||
icon_state = "rig0-ert_commander"
|
||||
item_state = "helm-command"
|
||||
armor = list(melee = 50, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 60)
|
||||
siemens_coefficient = 0.6
|
||||
var/obj/machinery/camera/camera
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/ert/attack_self(mob/user)
|
||||
if(camera)
|
||||
..(user)
|
||||
else
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.network = list("ERT")
|
||||
cameranet.removeCamera(camera)
|
||||
camera.c_tag = user.name
|
||||
user << "\blue User scanned as [camera.c_tag]. Camera activated."
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/ert/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
user << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
|
||||
|
||||
/obj/item/clothing/suit/space/rig/ert
|
||||
name = "emergency response team suit"
|
||||
desc = "A suit worn by members of the NanoTrasen Emergency Response Team. Armoured, space ready, and fire resistant."
|
||||
icon_state = "ert_commander"
|
||||
item_state = "suit-command"
|
||||
w_class = 3
|
||||
slowdown = 1
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100)
|
||||
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, /obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, /obj/item/device/radio, /obj/item/device/analyzer, /obj/item/weapon/melee/baton, /obj/item/weapon/gun, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/handcuffs, /obj/item/weapon/storage/briefcase/inflatable)
|
||||
siemens_coefficient = 0.6
|
||||
|
||||
//Commander
|
||||
/obj/item/clothing/head/helmet/space/rig/ert/commander
|
||||
name = "emergency response team commander helmet"
|
||||
desc = "A helmet worn by the commander of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured and space ready."
|
||||
icon_state = "rig0-ert_commander"
|
||||
item_state = "helm-command"
|
||||
item_color = "ert_commander"
|
||||
|
||||
/obj/item/clothing/suit/space/rig/ert/commander
|
||||
name = "emergency response team commander suit"
|
||||
desc = "A suit worn by the commander of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured, space ready, and fire resistant."
|
||||
icon_state = "ert_commander"
|
||||
item_state = "suit-command"
|
||||
|
||||
//Security
|
||||
/obj/item/clothing/head/helmet/space/rig/ert/security
|
||||
name = "emergency response team security helmet"
|
||||
desc = "A helmet worn by security members of a NanoTrasen Emergency Response Team. Has red highlights. Armoured and space ready."
|
||||
icon_state = "rig0-ert_security"
|
||||
item_state = "syndicate-helm-black-red"
|
||||
item_color = "ert_security"
|
||||
|
||||
/obj/item/clothing/suit/space/rig/ert/security
|
||||
name = "emergency response team security suit"
|
||||
desc = "A suit worn by security members of a NanoTrasen Emergency Response Team. Has red highlights. Armoured, space ready, and fire resistant."
|
||||
icon_state = "ert_security"
|
||||
item_state = "syndicate-black-red"
|
||||
|
||||
//Engineer
|
||||
/obj/item/clothing/head/helmet/space/rig/ert/engineer
|
||||
name = "emergency response team engineer helmet"
|
||||
desc = "A helmet worn by engineering members of a NanoTrasen Emergency Response Team. Has orange highlights. Armoured and space ready."
|
||||
icon_state = "rig0-ert_engineer"
|
||||
item_color = "ert_engineer"
|
||||
|
||||
/obj/item/clothing/suit/space/rig/ert/engineer
|
||||
name = "emergency response team engineer suit"
|
||||
desc = "A suit worn by the engineering of a NanoTrasen Emergency Response Team. Has orange highlights. Armoured, space ready, and fire resistant."
|
||||
icon_state = "ert_engineer"
|
||||
|
||||
//Medical
|
||||
/obj/item/clothing/head/helmet/space/rig/ert/medical
|
||||
name = "emergency response team medical helmet"
|
||||
desc = "A helmet worn by medical members of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready."
|
||||
icon_state = "rig0-ert_medical"
|
||||
item_color = "ert_medical"
|
||||
|
||||
/obj/item/clothing/suit/space/rig/ert/medical
|
||||
name = "emergency response team medical suit"
|
||||
desc = "A suit worn by medical members of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready."
|
||||
icon_state = "ert_medical"
|
||||
@@ -1,71 +0,0 @@
|
||||
/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"
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja_mask"
|
||||
allowed = list(/obj/item/weapon/cell)
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 25)
|
||||
siemens_coefficient = 0.2
|
||||
species_restricted = null
|
||||
body_parts_covered = HEAD|FACE
|
||||
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE
|
||||
|
||||
/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_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/cell)
|
||||
slowdown = 0
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
siemens_coefficient = 0.2
|
||||
species_restricted = null //Workaround for spawning alien ninja without internals.
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags_inv = HIDEJUMPSUIT|HIDETAIL
|
||||
supporting_limbs = list()
|
||||
|
||||
// Hardsuit breaching data
|
||||
breach_threshold = 30 //A suit breach is a major issue for ninjas. This should maybe help.
|
||||
can_breach = 1
|
||||
|
||||
//Important parts of the suit.
|
||||
var/mob/living/carbon/affecting = null//The wearer.
|
||||
var/obj/item/weapon/cell/cell//Starts out with a high-capacity cell using New().
|
||||
var/datum/effect/effect/system/spark_spread/spark_system//To create sparks.
|
||||
var/reagent_list[] = list("tricordrazine","tramadol","dexalinp","spaceacillin","anti_toxin","nutriment","radium","hyronalin")//The reagents ids which are added to the suit at New().
|
||||
var/stored_research[]//For stealing station research.
|
||||
var/obj/item/weapon/disk/tech_disk/t_disk//To copy design onto disk.
|
||||
|
||||
//Other articles of ninja gear worn together, used to easily reference them after initializing.
|
||||
var/obj/item/clothing/head/helmet/space/space_ninja/n_hood
|
||||
var/obj/item/clothing/shoes/space_ninja/n_shoes
|
||||
var/obj/item/clothing/gloves/space_ninja/n_gloves
|
||||
|
||||
//Main function variables.
|
||||
var/s_initialized = 0//Suit starts off.
|
||||
var/s_coold = 0//If the suit is on cooldown. Can be used to attach different cooldowns to abilities. Ticks down every second based on suit ntick().
|
||||
var/s_cost = 5.0//Base energy cost each ntick.
|
||||
var/s_acost = 25.0//Additional cost for additional powers active.
|
||||
var/k_cost = 200.0//Kamikaze energy cost each ntick.
|
||||
var/k_damage = 1.0//Brute damage potentially done by Kamikaze each ntick.
|
||||
var/s_delay = 40.0//How fast the suit does certain things, lower is faster. Can be overridden in specific procs. Also determines adverse probability.
|
||||
var/a_transfer = 20.0//How much reagent is transferred when injecting.
|
||||
var/r_maxamount = 80.0//How much reagent in total there is.
|
||||
|
||||
//Support function variables.
|
||||
var/spideros = 0//Mode of SpiderOS. This can change so I won't bother listing the modes here (0 is hub). Check ninja_equipment.dm for how it all works.
|
||||
var/s_active = 0//Stealth off.
|
||||
var/s_busy = 0//Is the suit busy with a process? Like AI hacking. Used for safety functions.
|
||||
var/kamikaze = 0//Kamikaze on or off.
|
||||
var/k_unlock = 0//To unlock Kamikaze.
|
||||
|
||||
//Ability function variables.
|
||||
var/s_bombs = 10.0//Number of starting ninja smoke bombs.
|
||||
var/a_boost = 3.0//Number of adrenaline boosters.
|
||||
|
||||
//Onboard AI related variables.
|
||||
var/mob/living/silicon/ai/AI//If there is an AI inside the suit.
|
||||
var/obj/item/device/paicard/pai//A slot for a pAI device
|
||||
var/obj/effect/overlay/hologram//Is the AI hologram on or off? Visible only to the wearer of the suit. This works by attaching an image to a blank overlay.
|
||||
var/flush = 0//If an AI purge is in progress.
|
||||
var/s_control = 1//If user in control of the suit.
|
||||
@@ -1,477 +0,0 @@
|
||||
//Regular rig suits
|
||||
/obj/item/clothing/head/helmet/space/rig
|
||||
name = "hardsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment."
|
||||
icon_state = "rig0-engineering"
|
||||
item_state = "eng_helm"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
|
||||
allowed = list(/obj/item/device/flashlight)
|
||||
var/brightness_on = 4 //luminosity when on
|
||||
var/on = 0
|
||||
item_color = "engineering" //Determines used sprites: rig[on]-[color] and rig[on]-[color]2 (lying down sprite)
|
||||
icon_action_button = "action_hardhat"
|
||||
heat_protection = HEAD
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
//Species-specific stuff.
|
||||
species_restricted = list("exclude","Unathi","Tajara","Skrell","Diona","Vox")
|
||||
sprite_sheets_refit = list(
|
||||
"Unathi" = 'icons/mob/species/unathi/helmet.dmi',
|
||||
"Tajara" = 'icons/mob/species/tajaran/helmet.dmi',
|
||||
"Skrell" = 'icons/mob/species/skrell/helmet.dmi',
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Unathi" = 'icons/obj/clothing/species/unathi/hats.dmi',
|
||||
"Tajara" = 'icons/obj/clothing/species/tajaran/hats.dmi',
|
||||
"Skrell" = 'icons/obj/clothing/species/skrell/hats.dmi',
|
||||
)
|
||||
|
||||
attack_self(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||
return
|
||||
on = !on
|
||||
icon_state = "rig[on]-[item_color]"
|
||||
// item_state = "rig[on]-[color]"
|
||||
|
||||
if(on) user.SetLuminosity(user.luminosity + brightness_on)
|
||||
else user.SetLuminosity(user.luminosity - brightness_on)
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_head()
|
||||
|
||||
pickup(mob/user)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity + brightness_on)
|
||||
// user.UpdateLuminosity()
|
||||
SetLuminosity(0)
|
||||
|
||||
dropped(mob/user)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
// user.UpdateLuminosity()
|
||||
SetLuminosity(brightness_on)
|
||||
|
||||
/obj/item/clothing/suit/space/rig
|
||||
name = "hardsuit"
|
||||
desc = "A special space suit for environments that might pose hazards beyond just the vacuum of space. Provides more protection than a standard space suit."
|
||||
icon_state = "rig-engineering"
|
||||
item_state = "eng_hardsuit"
|
||||
slowdown = 1
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit)
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
species_restricted = list("exclude","Unathi","Tajara","Diona","Vox")
|
||||
sprite_sheets_refit = list(
|
||||
"Unathi" = 'icons/mob/species/unathi/suit.dmi',
|
||||
"Tajara" = 'icons/mob/species/tajaran/suit.dmi',
|
||||
"Skrell" = 'icons/mob/species/skrell/suit.dmi',
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Unathi" = 'icons/obj/clothing/species/unathi/suits.dmi',
|
||||
"Tajara" = 'icons/obj/clothing/species/tajaran/suits.dmi',
|
||||
"Skrell" = 'icons/obj/clothing/species/skrell/suits.dmi',
|
||||
)
|
||||
|
||||
//Breach thresholds, should ideally be inherited by most (if not all) hardsuits.
|
||||
breach_threshold = 18
|
||||
can_breach = 1
|
||||
|
||||
//Component/device holders.
|
||||
var/obj/item/weapon/stock_parts/gloves = null // Basic capacitor allows insulation, upgrades allow shock gloves etc.
|
||||
|
||||
var/attached_boots = 1 // Can't wear boots if some are attached
|
||||
var/obj/item/clothing/shoes/magboots/boots = null // Deployable boots, if any.
|
||||
var/attached_helmet = 1 // Can't wear a helmet if one is deployable.
|
||||
var/obj/item/clothing/head/helmet/helmet = null // Deployable helmet, if any.
|
||||
|
||||
var/list/max_mounted_devices = 0 // Maximum devices. Easy.
|
||||
var/list/can_mount = null // Types of device that can be hardpoint mounted.
|
||||
var/list/mounted_devices = null // Holder for the above device.
|
||||
var/obj/item/active_device = null // Currently deployed device, if any.
|
||||
|
||||
/obj/item/clothing/suit/space/rig/equipped(mob/M)
|
||||
..()
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(!istype(H)) return
|
||||
|
||||
if(H.wear_suit != src)
|
||||
return
|
||||
|
||||
if(attached_helmet && helmet)
|
||||
if(H.head)
|
||||
M << "You are unable to deploy your suit's helmet as \the [H.head] is in the way."
|
||||
else
|
||||
M << "Your suit's helmet deploys with a hiss."
|
||||
//TODO: Species check, skull damage for forcing an unfitting helmet on?
|
||||
helmet.loc = H
|
||||
H.equip_to_slot(helmet, slot_head)
|
||||
helmet.canremove = 0
|
||||
|
||||
if(attached_boots && boots)
|
||||
if(H.shoes)
|
||||
M << "You are unable to deploy your suit's magboots as \the [H.shoes] are in the way."
|
||||
else
|
||||
M << "Your suit's boots deploy with a hiss."
|
||||
boots.loc = H
|
||||
H.equip_to_slot(boots, slot_shoes)
|
||||
boots.canremove = 0
|
||||
|
||||
/obj/item/clothing/suit/space/rig/dropped()
|
||||
..()
|
||||
|
||||
var/mob/living/carbon/human/H
|
||||
|
||||
if(helmet)
|
||||
H = helmet.loc
|
||||
if(istype(H))
|
||||
if(helmet && H.head == helmet)
|
||||
helmet.canremove = 1
|
||||
H.drop_from_inventory(helmet)
|
||||
helmet.loc = src
|
||||
|
||||
if(boots)
|
||||
H = boots.loc
|
||||
if(istype(H))
|
||||
if(boots && H.shoes == boots)
|
||||
boots.canremove = 1
|
||||
H.drop_from_inventory(boots)
|
||||
boots.loc = src
|
||||
|
||||
/*
|
||||
/obj/item/clothing/suit/space/rig/verb/get_mounted_device()
|
||||
|
||||
set name = "Deploy Mounted Device"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!can_mount)
|
||||
verbs -= /obj/item/clothing/suit/space/rig/verb/get_mounted_device
|
||||
verbs -= /obj/item/clothing/suit/space/rig/verb/stow_mounted_device
|
||||
return
|
||||
|
||||
if(!istype(usr, /mob/living)) return
|
||||
if(usr.stat) return
|
||||
|
||||
if(active_device)
|
||||
usr << "You already have \the [active_device] deployed."
|
||||
return
|
||||
|
||||
if(!mounted_devices.len)
|
||||
usr << "You do not have any devices mounted on \the [src]."
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/space/rig/verb/stow_mounted_device()
|
||||
|
||||
set name = "Stow Mounted Device"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!can_mount)
|
||||
verbs -= /obj/item/clothing/suit/space/rig/verb/get_mounted_device
|
||||
verbs -= /obj/item/clothing/suit/space/rig/verb/stow_mounted_device
|
||||
return
|
||||
|
||||
if(!istype(usr, /mob/living)) return
|
||||
|
||||
if(usr.stat) return
|
||||
|
||||
if(!active_device)
|
||||
usr << "You have no device currently deployed."
|
||||
return
|
||||
*/
|
||||
|
||||
/obj/item/clothing/suit/space/rig/verb/toggle_helmet()
|
||||
|
||||
set name = "Toggle Helmet"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!istype(src.loc,/mob/living)) return
|
||||
|
||||
if(!helmet)
|
||||
usr << "There is no helmet installed."
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = usr
|
||||
|
||||
if(!istype(H)) return
|
||||
if(H.stat) return
|
||||
if(H.wear_suit != src) return
|
||||
|
||||
if(H.head == helmet)
|
||||
helmet.canremove = 1
|
||||
H.drop_from_inventory(helmet)
|
||||
helmet.loc = src
|
||||
H << "\blue You retract your hardsuit helmet."
|
||||
else
|
||||
if(H.head)
|
||||
H << "\red You cannot deploy your helmet while wearing another helmet."
|
||||
return
|
||||
//TODO: Species check, skull damage for forcing an unfitting helmet on?
|
||||
helmet.loc = H
|
||||
helmet.pickup(H)
|
||||
H.equip_to_slot(helmet, slot_head)
|
||||
helmet.canremove = 0
|
||||
H << "\blue You deploy your hardsuit helmet, sealing you off from the world."
|
||||
|
||||
/obj/item/clothing/suit/space/rig/attackby(obj/item/W as obj, mob/user as mob)
|
||||
|
||||
if(!istype(user,/mob/living)) return
|
||||
|
||||
if(user.a_intent == "help")
|
||||
|
||||
if(istype(src.loc,/mob/living))
|
||||
user << "How do you propose to modify a hardsuit while it is being worn?"
|
||||
return
|
||||
|
||||
var/target_zone = user.zone_sel.selecting
|
||||
|
||||
if(target_zone == "head")
|
||||
|
||||
//Installing a component into or modifying the contents of the helmet.
|
||||
if(!attached_helmet)
|
||||
user << "\The [src] does not have a helmet mount."
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/weapon/screwdriver))
|
||||
if(!helmet)
|
||||
user << "\The [src] does not have a helmet installed."
|
||||
else
|
||||
user << "You detatch \the [helmet] from \the [src]'s helmet mount."
|
||||
helmet.loc = get_turf(src)
|
||||
src.helmet = null
|
||||
return
|
||||
else if(istype(W,/obj/item/clothing/head/helmet/space))
|
||||
if(helmet)
|
||||
user << "\The [src] already has a helmet installed."
|
||||
else
|
||||
user << "You attach \the [W] to \the [src]'s helmet mount."
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
src.helmet = W
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
else if(target_zone == "l_leg" || target_zone == "r_leg" || target_zone == "l_foot" || target_zone == "r_foot")
|
||||
|
||||
//Installing a component into or modifying the contents of the feet.
|
||||
if(!attached_boots)
|
||||
user << "\The [src] does not have boot mounts."
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/weapon/screwdriver))
|
||||
if(!boots)
|
||||
user << "\The [src] does not have any boots installed."
|
||||
else
|
||||
user << "You detatch \the [boots] from \the [src]'s boot mounts."
|
||||
boots.loc = get_turf(src)
|
||||
boots = null
|
||||
return
|
||||
else if(istype(W,/obj/item/clothing/shoes/magboots))
|
||||
if(boots)
|
||||
user << "\The [src] already has magboots installed."
|
||||
else
|
||||
user << "You attach \the [W] to \the [src]'s boot mounts."
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
boots = W
|
||||
else
|
||||
return ..()
|
||||
|
||||
/*
|
||||
else if(target_zone == "l_arm" || target_zone == "r_arm" || target_zone == "l_hand" || target_zone == "r_hand")
|
||||
|
||||
//Installing a component into or modifying the contents of the hands.
|
||||
|
||||
else if(target_zone == "torso" || target_zone == "groin")
|
||||
|
||||
//Modifying the cell or mounted devices
|
||||
|
||||
if(!mounted_devices)
|
||||
return
|
||||
*/
|
||||
|
||||
else //wat
|
||||
return ..()
|
||||
|
||||
..()
|
||||
|
||||
//Engineering rig
|
||||
/obj/item/clothing/head/helmet/space/rig/engineering
|
||||
name = "engineering hardsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding."
|
||||
icon_state = "rig0-engineering"
|
||||
item_state = "eng_helm"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80)
|
||||
|
||||
/obj/item/clothing/suit/space/rig/engineering
|
||||
name = "engineering hardsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding."
|
||||
icon_state = "rig-engineering"
|
||||
item_state = "eng_hardsuit"
|
||||
slowdown = 1
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
|
||||
|
||||
//Chief Engineer's rig
|
||||
/obj/item/clothing/head/helmet/space/rig/engineering/chief
|
||||
name = "advanced hardsuit helmet"
|
||||
desc = "An advanced helmet designed for work in a hazardous, low pressure environment. Shines with a high polish."
|
||||
icon_state = "rig0-white"
|
||||
item_state = "ce_helm"
|
||||
item_color = "white"
|
||||
sprite_sheets_refit = null
|
||||
sprite_sheets_obj = null
|
||||
|
||||
/obj/item/clothing/suit/space/rig/engineering/chief
|
||||
icon_state = "rig-white"
|
||||
name = "advanced hardsuit"
|
||||
desc = "An advanced suit that protects against hazardous, low pressure environments. Shines with a high polish."
|
||||
item_state = "ce_hardsuit"
|
||||
sprite_sheets_refit = null
|
||||
sprite_sheets_obj = null
|
||||
|
||||
//Mining rig
|
||||
/obj/item/clothing/head/helmet/space/rig/mining
|
||||
name = "mining hardsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has reinforced plating."
|
||||
icon_state = "rig0-mining"
|
||||
item_state = "mining_helm"
|
||||
item_color = "mining"
|
||||
armor = list(melee = 50, bullet = 5, laser = 20,energy = 5, bomb = 55, bio = 100, rad = 20)
|
||||
|
||||
/obj/item/clothing/suit/space/rig/mining
|
||||
icon_state = "rig-mining"
|
||||
name = "mining hardsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has reinforced plating."
|
||||
item_state = "mining_hardsuit"
|
||||
armor = list(melee = 50, bullet = 5, laser = 20,energy = 5, bomb = 55, bio = 100, rad = 20)
|
||||
|
||||
|
||||
//Syndicate rig
|
||||
/obj/item/clothing/head/helmet/space/rig/syndi
|
||||
name = "blood-red hardsuit helmet"
|
||||
desc = "An advanced helmet designed for work in special operations. Property of Gorlex Marauders."
|
||||
icon_state = "rig0-syndie"
|
||||
item_state = "syndie_helm"
|
||||
item_color = "syndie"
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 60)
|
||||
siemens_coefficient = 0.6
|
||||
var/obj/machinery/camera/camera
|
||||
species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox")
|
||||
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/syndi/attack_self(mob/user)
|
||||
if(camera)
|
||||
..(user)
|
||||
else
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.network = list("NUKE")
|
||||
cameranet.removeCamera(camera)
|
||||
camera.c_tag = user.name
|
||||
user << "\blue User scanned as [camera.c_tag]. Camera activated."
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/syndi/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
user << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
|
||||
|
||||
/obj/item/clothing/suit/space/rig/syndi
|
||||
icon_state = "rig-syndie"
|
||||
name = "blood-red hardsuit"
|
||||
desc = "An advanced suit that protects against injuries during special operations. Property of Gorlex Marauders."
|
||||
item_state = "syndie_hardsuit"
|
||||
slowdown = 1
|
||||
w_class = 3
|
||||
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs)
|
||||
siemens_coefficient = 0.6
|
||||
species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox")
|
||||
|
||||
|
||||
//Wizard Rig
|
||||
/obj/item/clothing/head/helmet/space/rig/wizard
|
||||
name = "gem-encrusted hardsuit helmet"
|
||||
desc = "A bizarre gem-encrusted helmet that radiates magical energies."
|
||||
icon_state = "rig0-wiz"
|
||||
item_state = "wiz_helm"
|
||||
item_color = "wiz"
|
||||
unacidable = 1 //No longer shall our kind be foiled by lone chemists with spray bottles!
|
||||
armor = list(melee = 40, bullet = 20, laser = 20,energy = 20, bomb = 35, bio = 100, rad = 60)
|
||||
siemens_coefficient = 0.7
|
||||
sprite_sheets_refit = null
|
||||
sprite_sheets_obj = null
|
||||
|
||||
/obj/item/clothing/suit/space/rig/wizard
|
||||
icon_state = "rig-wiz"
|
||||
name = "gem-encrusted hardsuit"
|
||||
desc = "A bizarre gem-encrusted suit that radiates magical energies."
|
||||
item_state = "wiz_hardsuit"
|
||||
slowdown = 1
|
||||
w_class = 3
|
||||
unacidable = 1
|
||||
armor = list(melee = 40, bullet = 20, laser = 20,energy = 20, bomb = 35, bio = 100, rad = 60)
|
||||
siemens_coefficient = 0.7
|
||||
sprite_sheets_refit = null
|
||||
sprite_sheets_obj = null
|
||||
|
||||
//Medical Rig
|
||||
/obj/item/clothing/head/helmet/space/rig/medical
|
||||
name = "medical hardsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has minor radiation shielding."
|
||||
icon_state = "rig0-medical"
|
||||
item_state = "medical_helm"
|
||||
item_color = "medical"
|
||||
armor = list(melee = 30, bullet = 5, laser = 20,energy = 5, bomb = 25, bio = 100, rad = 50)
|
||||
|
||||
/obj/item/clothing/suit/space/rig/medical
|
||||
icon_state = "rig-medical"
|
||||
name = "medical hardsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has minor radiation shielding."
|
||||
item_state = "medical_hardsuit"
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
|
||||
armor = list(melee = 30, bullet = 5, laser = 20,energy = 5, bomb = 25, bio = 100, rad = 50)
|
||||
|
||||
//Security
|
||||
/obj/item/clothing/head/helmet/space/rig/security
|
||||
name = "security hardsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has an additional layer of armor."
|
||||
icon_state = "rig0-sec"
|
||||
item_state = "sec_helm"
|
||||
item_color = "sec"
|
||||
armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
/obj/item/clothing/suit/space/rig/security
|
||||
icon_state = "rig-sec"
|
||||
name = "security hardsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has an additional layer of armor."
|
||||
item_state = "sec_hardsuit"
|
||||
armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton)
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
|
||||
//Atmospherics Rig (BS12)
|
||||
/obj/item/clothing/head/helmet/space/rig/atmos
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environments. Has improved thermal protection and minor radiation shielding."
|
||||
name = "atmospherics hardsuit helmet"
|
||||
icon_state = "rig0-atmos"
|
||||
item_state = "atmos_helm"
|
||||
item_color = "atmos"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 50)
|
||||
max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
/obj/item/clothing/suit/space/rig/atmos
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has improved thermal protection and minor radiation shielding."
|
||||
icon_state = "rig-atmos"
|
||||
name = "atmos hardsuit"
|
||||
item_state = "atmos_hardsuit"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 50)
|
||||
max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
223
code/modules/clothing/spacesuits/rig/modules/combat.dm
Normal file
223
code/modules/clothing/spacesuits/rig/modules/combat.dm
Normal file
@@ -0,0 +1,223 @@
|
||||
/*
|
||||
* Contains
|
||||
* /obj/item/rig_module/grenade_launcher
|
||||
* /obj/item/rig_module/mounted
|
||||
* /obj/item/rig_module/mounted/taser
|
||||
* /obj/item/rig_module/shield
|
||||
* /obj/item/rig_module/fabricator
|
||||
*/
|
||||
|
||||
/obj/item/rig_module/grenade_launcher
|
||||
|
||||
name = "mounted grenade launcher"
|
||||
desc = "A shoulder-mounted micro-explosive dispenser."
|
||||
selectable = 1
|
||||
|
||||
interface_name = "integrated grenade launcher"
|
||||
interface_desc = "Discharges loaded grenades against the wearer's location."
|
||||
|
||||
var/fire_force = 30
|
||||
var/fire_distance = 10
|
||||
|
||||
charges = list(
|
||||
list("flashbang", "flashbang", /obj/item/weapon/grenade/flashbang, 3),
|
||||
list("smoke bomb", "smoke bomb", /obj/item/weapon/grenade/smokebomb, 3),
|
||||
list("EMP grenade", "EMP grenade", /obj/item/weapon/grenade/empgrenade, 3),
|
||||
)
|
||||
|
||||
/obj/item/rig_module/grenade_launcher/accepts_item(var/obj/item/input_device, var/mob/living/user)
|
||||
|
||||
if(!istype(input_device) || !istype(user))
|
||||
return 0
|
||||
|
||||
var/datum/rig_charge/accepted_item
|
||||
for(var/charge in charges)
|
||||
var/datum/rig_charge/charge_datum = charges[charge]
|
||||
if(input_device.type == charge_datum.product_type)
|
||||
accepted_item = charge_datum
|
||||
break
|
||||
|
||||
if(!accepted_item)
|
||||
return 0
|
||||
|
||||
if(accepted_item.charges >= 5)
|
||||
user << "<span class='danger'>Another grenade of that type will not fit into the module.</span>"
|
||||
return 0
|
||||
|
||||
user << "<font color='blue'><b>You slot \the [input_device] into the suit module.</b></font>"
|
||||
user.drop_from_inventory(input_device)
|
||||
del(input_device)
|
||||
accepted_item.charges++
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/grenade_launcher/engage(atom/target)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
if(!target)
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
if(!charge_selected)
|
||||
H << "<span class='danger'>You have not selected a grenade type.</span>"
|
||||
return 0
|
||||
|
||||
var/datum/rig_charge/charge = charges[charge_selected]
|
||||
|
||||
if(!charge)
|
||||
return 0
|
||||
|
||||
if(charge.charges <= 0)
|
||||
H << "<span class='danger'>Insufficient grenades!</span>"
|
||||
return 0
|
||||
|
||||
charge.charges--
|
||||
var/obj/item/weapon/grenade/new_grenade = new charge.product_type(get_turf(H))
|
||||
H.visible_message("<span class='danger'>[H] launches \a [new_grenade]!")
|
||||
new_grenade.activate(H)
|
||||
new_grenade.throw_at(target,fire_force,fire_distance)
|
||||
|
||||
/obj/item/rig_module/mounted
|
||||
|
||||
name = "mounted laser cannon"
|
||||
desc = "A shoulder-mounted battery-powered laser cannon mount."
|
||||
selectable = 1
|
||||
usable = 1
|
||||
use_power_cost = 10
|
||||
|
||||
engage_string = "Configure"
|
||||
|
||||
interface_name = "mounted laser cannon"
|
||||
interface_desc = "A shoulder-mounted cell-powered laser cannon."
|
||||
|
||||
var/gun_type = /obj/item/weapon/gun/energy/lasercannon/mounted
|
||||
var/obj/item/weapon/gun/gun
|
||||
|
||||
/obj/item/rig_module/mounted/New()
|
||||
..()
|
||||
gun = new gun_type(src)
|
||||
|
||||
/obj/item/rig_module/mounted/engage(atom/target)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
if(!target)
|
||||
gun.attack_self(holder.wearer)
|
||||
return 1
|
||||
|
||||
gun.Fire(target,holder.wearer)
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/mounted/taser
|
||||
|
||||
name = "mounted taser"
|
||||
desc = "A shoulder-mounted energy projector."
|
||||
|
||||
usable = 0
|
||||
|
||||
suit_overlay_active = "mounted-taser"
|
||||
suit_overlay_inactive = "mounted-taser"
|
||||
|
||||
interface_name = "mounted energy gun"
|
||||
interface_desc = "A shoulder-mounted cell-powered energy gun."
|
||||
|
||||
gun_type = /obj/item/weapon/gun/energy/gun/mounted
|
||||
|
||||
/obj/item/rig_module/mounted/energy_blade
|
||||
|
||||
name = "energy blade projector"
|
||||
desc = "A powerful cutting beam projector."
|
||||
|
||||
activate_string = "Project Blade"
|
||||
deactivate_string = "Cancel Blade"
|
||||
|
||||
interface_name = "spider fang blade"
|
||||
interface_desc = "A lethal energy projector that can shape a blade projected from the hand of the wearer or launch radioactive darts."
|
||||
|
||||
usable = 0
|
||||
selectable = 1
|
||||
toggleable = 1
|
||||
use_power_cost = 50
|
||||
active_power_cost = 5
|
||||
|
||||
gun_type = /obj/item/weapon/gun/energy/crossbow/ninja
|
||||
|
||||
/obj/item/rig_module/mounted/energy_blade/process()
|
||||
|
||||
if(holder && holder.wearer)
|
||||
if(!(locate(/obj/item/weapon/melee/energy/blade) in holder.wearer))
|
||||
deactivate()
|
||||
return 0
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/rig_module/mounted/energy_blade/activate()
|
||||
|
||||
..()
|
||||
|
||||
var/mob/living/M = holder.wearer
|
||||
|
||||
if(M.l_hand && M.r_hand)
|
||||
M << "<span class='danger'>Your hands are full.</span>"
|
||||
deactivate()
|
||||
return
|
||||
|
||||
var/obj/item/weapon/melee/energy/blade/blade = new(M)
|
||||
blade.creator = M
|
||||
M.put_in_hands(blade)
|
||||
|
||||
/obj/item/rig_module/mounted/energy_blade/deactivate()
|
||||
|
||||
..()
|
||||
|
||||
var/mob/living/M = holder.wearer
|
||||
|
||||
if(!M)
|
||||
return
|
||||
|
||||
for(var/obj/item/weapon/melee/energy/blade/blade in M.contents)
|
||||
M.drop_from_inventory(blade)
|
||||
del(blade)
|
||||
|
||||
/obj/item/rig_module/fabricator
|
||||
|
||||
name = "matter fabricator"
|
||||
desc = "A self-contained microfactory system for hardsuit integration."
|
||||
selectable = 1
|
||||
usable = 1
|
||||
use_power_cost = 15
|
||||
|
||||
engage_string = "Fabricate Star"
|
||||
|
||||
interface_name = "death blossom launcher"
|
||||
interface_desc = "An integrated microfactory that produces poisoned throwing stars from thin air and electricity."
|
||||
|
||||
var/fabrication_type = /obj/item/weapon/star/ninja
|
||||
var/fire_force = 30
|
||||
var/fire_distance = 10
|
||||
|
||||
/obj/item/rig_module/fabricator/engage(atom/target)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/mob/living/H = holder.wearer
|
||||
|
||||
if(target)
|
||||
var/obj/item/firing = new fabrication_type()
|
||||
firing.loc = get_turf(src)
|
||||
H.visible_message("<span class='danger'>[H] launches \a [firing]!</span>")
|
||||
firing.throw_at(target,fire_force,fire_distance)
|
||||
else
|
||||
if(H.l_hand && H.r_hand)
|
||||
H << "<span class='danger'>Your hands are full."
|
||||
else
|
||||
var/obj/item/new_weapon = new fabrication_type()
|
||||
new_weapon.loc = H
|
||||
H << "<font color='blue'><b>You quickly fabricate \a [new_weapon].</b></font>"
|
||||
H.put_in_hands(new_weapon)
|
||||
|
||||
return 1
|
||||
436
code/modules/clothing/spacesuits/rig/modules/computer.dm
Normal file
436
code/modules/clothing/spacesuits/rig/modules/computer.dm
Normal file
@@ -0,0 +1,436 @@
|
||||
/*
|
||||
* Contains
|
||||
* /obj/item/rig_module/ai_container
|
||||
* /obj/item/rig_module/datajack
|
||||
* /obj/item/rig_module/power_sink
|
||||
* /obj/item/rig_module/electrowarfare_suite
|
||||
*/
|
||||
|
||||
/obj/item/ai_verbs
|
||||
name = "AI verb holder"
|
||||
|
||||
/obj/item/ai_verbs/verb/hardsuit_interface()
|
||||
set category = "Hardsuit"
|
||||
set name = "Open Hardsuit Interface"
|
||||
set src in usr
|
||||
|
||||
if(!usr.loc || !usr.loc.loc || !istype(usr.loc.loc, /obj/item/rig_module))
|
||||
usr << "You are not loaded into a hardsuit."
|
||||
return
|
||||
|
||||
var/obj/item/rig_module/module = usr.loc.loc
|
||||
if(!module.holder)
|
||||
usr << "Your module is not installed in a hardsuit."
|
||||
return
|
||||
|
||||
module.holder.ui_interact(usr)
|
||||
|
||||
/obj/item/rig_module/ai_container
|
||||
|
||||
name = "IIS module"
|
||||
desc = "An integrated intelligence system module suitable for most hardsuits."
|
||||
toggleable = 1
|
||||
usable = 1
|
||||
disruptive = 0
|
||||
activates_on_touch = 1
|
||||
|
||||
engage_string = "Eject AI"
|
||||
activate_string = "Enable Dataspike"
|
||||
deactivate_string = "Disable Dataspike"
|
||||
|
||||
interface_name = "integrated intelligence system"
|
||||
interface_desc = "A socket that supports a range of artificial intelligence systems."
|
||||
|
||||
var/mob/integrated_ai // Direct reference to the actual mob held in the suit.
|
||||
var/obj/item/ai_card // Reference to the MMI, posibrain, intellicard or pAI card previously holding the AI.
|
||||
var/obj/item/ai_verbs/verb_holder
|
||||
|
||||
/obj/item/rig_module/ai_container/proc/update_verb_holder()
|
||||
if(!verb_holder)
|
||||
verb_holder = new(src)
|
||||
if(integrated_ai)
|
||||
verb_holder.loc = integrated_ai
|
||||
else
|
||||
verb_holder.loc = src
|
||||
|
||||
/obj/item/rig_module/ai_container/accepts_item(var/obj/item/input_device, var/mob/living/user)
|
||||
|
||||
// Check if there's actually an AI to deal with.
|
||||
var/mob/living/silicon/ai/target_ai
|
||||
if(istype(input_device, /mob/living/silicon/ai))
|
||||
target_ai = input_device
|
||||
else
|
||||
target_ai = locate(/mob/living/silicon/ai) in input_device.contents
|
||||
|
||||
var/obj/item/device/aicard/card = ai_card
|
||||
|
||||
// Downloading from/loading to a terminal.
|
||||
if(istype(input_device,/obj/machinery/computer/aifixer) || istype(input_device,/mob/living/silicon/ai) || istype(input_device,/obj/structure/AIcore/deactivated))
|
||||
|
||||
// If we're stealing an AI, make sure we have a card for it.
|
||||
if(!card)
|
||||
card = new /obj/item/device/aicard(src)
|
||||
|
||||
// Terminal interaction only works with an intellicarded AI.
|
||||
if(!istype(card))
|
||||
return 0
|
||||
|
||||
// Since we've explicitly checked for three types, this should be safe.
|
||||
input_device.attackby(card,user)
|
||||
|
||||
// If the transfer failed we can delete the card.
|
||||
if(locate(/mob/living/silicon/ai) in card)
|
||||
ai_card = card
|
||||
integrated_ai = locate(/mob/living/silicon/ai) in card
|
||||
else
|
||||
eject_ai()
|
||||
update_verb_holder()
|
||||
return 1
|
||||
|
||||
if(istype(input_device,/obj/item/device/aicard))
|
||||
// We are carding the AI in our suit.
|
||||
if(integrated_ai)
|
||||
integrated_ai.attackby(input_device,user)
|
||||
// If the transfer was successful, we can clear out our vars.
|
||||
if(integrated_ai.loc != src)
|
||||
integrated_ai = null
|
||||
eject_ai()
|
||||
else
|
||||
// You're using an empty card on an empty suit, idiot.
|
||||
if(!target_ai)
|
||||
return 0
|
||||
integrate_ai(input_device,user)
|
||||
return 1
|
||||
|
||||
// Okay, it wasn't a terminal being touched, check for all the simple insertions.
|
||||
if(input_device.type in list(/obj/item/device/paicard, /obj/item/device/mmi, /obj/item/device/mmi/posibrain))
|
||||
integrate_ai(input_device,user)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/obj/item/rig_module/ai_container/engage(atom/target)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
if(!target)
|
||||
if(ai_card)
|
||||
if(istype(ai_card,/obj/item/device/aicard))
|
||||
ai_card.attack_self(H)
|
||||
else
|
||||
eject_ai(H)
|
||||
update_verb_holder()
|
||||
return 1
|
||||
|
||||
if(accepts_item(target,H))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/obj/item/rig_module/ai_container/removed()
|
||||
eject_ai()
|
||||
..()
|
||||
|
||||
/obj/item/rig_module/ai_container/proc/eject_ai(var/mob/user)
|
||||
|
||||
if(ai_card)
|
||||
if(istype(ai_card, /obj/item/device/aicard))
|
||||
if(integrated_ai && integrated_ai.client)
|
||||
if(user)
|
||||
user << "<span class='danger'>You cannot eject your currently stored AI. Purge it manually.</span>"
|
||||
return 0
|
||||
del(ai_card)
|
||||
else if(user)
|
||||
user.put_in_hands(ai_card)
|
||||
else
|
||||
ai_card.loc = get_turf(src)
|
||||
ai_card = null
|
||||
integrated_ai = null
|
||||
update_verb_holder()
|
||||
|
||||
/obj/item/rig_module/ai_container/proc/integrate_ai(var/obj/item/ai,var/mob/user)
|
||||
|
||||
if(!ai) return
|
||||
|
||||
// The ONLY THING all the different AI systems have in common is that they all store the mob inside an item.
|
||||
var/mob/living/ai_mob = locate(/mob/living) in ai.contents
|
||||
if(ai_mob)
|
||||
|
||||
if(ai_mob.key && ai_mob.client)
|
||||
|
||||
if(istype(ai, /obj/item/device/aicard))
|
||||
|
||||
if(!ai_card)
|
||||
ai_card = new /obj/item/device/aicard(src)
|
||||
|
||||
var/obj/item/device/aicard/source_card = ai
|
||||
var/obj/item/device/aicard/target_card = ai_card
|
||||
if(istype(source_card) && istype(target_card))
|
||||
if(target_card.grab_ai(ai_mob, user))
|
||||
source_card.clear()
|
||||
else
|
||||
return 0
|
||||
else
|
||||
return 0
|
||||
else
|
||||
user.drop_from_inventory(ai)
|
||||
ai.loc = src
|
||||
ai_card = ai
|
||||
ai_mob << "<font color='blue'>You have been transferred to \the [holder]'s [src].</font>"
|
||||
user << "<font color='blue'>You load [ai_mob] into \the [holder]'s [src].</font>"
|
||||
|
||||
integrated_ai = ai_mob
|
||||
|
||||
if(!(locate(integrated_ai) in ai_card))
|
||||
integrated_ai = null
|
||||
eject_ai()
|
||||
else
|
||||
user << "<span class='warning'>There is no active AI within \the [ai].</span>"
|
||||
else
|
||||
user << "<span class='warning'>There is no active AI within \the [ai].</span>"
|
||||
update_verb_holder()
|
||||
return
|
||||
|
||||
/obj/item/rig_module/datajack
|
||||
|
||||
name = "datajack module"
|
||||
desc = "A simple induction datalink module."
|
||||
toggleable = 1
|
||||
activates_on_touch = 1
|
||||
usable = 0
|
||||
|
||||
activate_string = "Enable Datajack"
|
||||
deactivate_string = "Disable Datajack"
|
||||
|
||||
interface_name = "contact datajack"
|
||||
interface_desc = "An induction-powered high-throughput datalink suitable for hacking encrypted networks."
|
||||
var/list/stored_research
|
||||
|
||||
/obj/item/rig_module/datajack/New()
|
||||
..()
|
||||
stored_research = list()
|
||||
|
||||
/obj/item/rig_module/datajack/engage(atom/target)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
if(target)
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
if(!accepts_item(target,H))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/datajack/accepts_item(var/obj/item/input_device, var/mob/living/user)
|
||||
|
||||
if(istype(input_device,/obj/item/weapon/disk/tech_disk))
|
||||
user << "You slot the disk into [src]."
|
||||
var/obj/item/weapon/disk/tech_disk/disk = input_device
|
||||
if(disk.stored)
|
||||
if(load_data(disk.stored))
|
||||
user << "<font color='blue'>Download successful; disk erased.</font>"
|
||||
disk.stored = null
|
||||
else
|
||||
user << "<span class='warning'>The disk is corrupt. It is useless to you.</span>"
|
||||
else
|
||||
user << "<span class='warning'>The disk is blank. It is useless to you.</span>"
|
||||
return 1
|
||||
|
||||
// I fucking hate R&D code. This typecheck spam would be totally unnecessary in a sane setup.
|
||||
else if(istype(input_device,/obj/machinery))
|
||||
var/datum/research/incoming_files
|
||||
if(istype(input_device,/obj/machinery/computer/rdconsole))
|
||||
var/obj/machinery/computer/rdconsole/input_machine = input_device
|
||||
incoming_files = input_machine.files
|
||||
else if(istype(input_device,/obj/machinery/r_n_d/server))
|
||||
var/obj/machinery/r_n_d/server/input_machine = input_device
|
||||
incoming_files = input_machine.files
|
||||
else if(istype(input_device,/obj/machinery/mecha_part_fabricator))
|
||||
var/obj/machinery/mecha_part_fabricator/input_machine = input_device
|
||||
incoming_files = input_machine.files
|
||||
|
||||
if(!incoming_files || !incoming_files.known_tech || !incoming_files.known_tech.len)
|
||||
user << "<span class='warning'>Memory failure. There is nothing accessible stored on this terminal.</span>"
|
||||
else
|
||||
// Maybe consider a way to drop all your data into a target repo in the future.
|
||||
if(load_data(incoming_files.known_tech))
|
||||
user << "<font color='blue'>Download successful; local and remote repositories synchronized.</font>"
|
||||
else
|
||||
user << "<span class='warning'>Scan complete. There is nothing useful stored on this terminal.</span>"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/rig_module/datajack/proc/load_data(var/incoming_data)
|
||||
|
||||
if(islist(incoming_data))
|
||||
for(var/entry in incoming_data)
|
||||
load_data(entry)
|
||||
return 1
|
||||
|
||||
if(istype(incoming_data, /datum/tech))
|
||||
var/data_found
|
||||
var/datum/tech/new_data = incoming_data
|
||||
for(var/datum/tech/current_data in stored_research)
|
||||
if(current_data.id == new_data.id)
|
||||
data_found = 1
|
||||
if(current_data.level < new_data.level)
|
||||
current_data.level = new_data.level
|
||||
break
|
||||
if(!data_found)
|
||||
stored_research += incoming_data
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/rig_module/electrowarfare_suite
|
||||
|
||||
name = "electrowarfare module"
|
||||
desc = "A bewilderingly complex bundle of fiber optics and chips."
|
||||
toggleable = 1
|
||||
usable = 0
|
||||
|
||||
engage_string = "Enable Countermeasures"
|
||||
deactivate_string = "Disable Countermeasures"
|
||||
|
||||
interface_name = "electrowarfare system"
|
||||
interface_desc = "An active counter-electronic warfare suite that disrupts AI tracking."
|
||||
|
||||
/obj/item/rig_module/electrowarfare_suite/activate()
|
||||
|
||||
if(!..())
|
||||
return
|
||||
|
||||
// This is not the best way to handle this, but I don't want it to mess with ling camo
|
||||
var/mob/living/M = holder.wearer
|
||||
M.digitalcamo++
|
||||
|
||||
/obj/item/rig_module/electrowarfare_suite/deactivate()
|
||||
|
||||
if(!..())
|
||||
return
|
||||
|
||||
var/mob/living/M = holder.wearer
|
||||
M.digitalcamo = max(0,(M.digitalcamo-1))
|
||||
|
||||
/obj/item/rig_module/power_sink
|
||||
|
||||
name = "hardsuit power sink"
|
||||
desc = "An heavy-duty power sink."
|
||||
toggleable = 1
|
||||
activates_on_touch = 1
|
||||
disruptive = 0
|
||||
|
||||
engage_string = "Enable Power Sink"
|
||||
deactivate_string = "Disable Power Sink"
|
||||
|
||||
interface_name = "niling d-sink"
|
||||
interface_desc = "Colloquially known as a power siphon, this module drains power through the suit hands into the suit battery."
|
||||
|
||||
var/atom/interfaced_with // Currently draining power from this device.
|
||||
var/total_power_drained = 0
|
||||
|
||||
/obj/item/rig_module/power_sink/deactivate()
|
||||
|
||||
if(interfaced_with)
|
||||
if(holder && holder.wearer)
|
||||
holder.wearer << "<span class = 'warning'>Your power sink retracts as the module deactivates.</span>"
|
||||
drain_complete()
|
||||
interfaced_with = null
|
||||
total_power_drained = 0
|
||||
return ..()
|
||||
|
||||
/obj/item/rig_module/power_sink/activate()
|
||||
interfaced_with = null
|
||||
total_power_drained = 0
|
||||
return ..()
|
||||
|
||||
/obj/item/rig_module/power_sink/engage(atom/target)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
//Target wasn't supplied or we're already draining.
|
||||
if(interfaced_with)
|
||||
return 0
|
||||
|
||||
if(!target)
|
||||
return 1
|
||||
|
||||
// Are we close enough?
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
if(!target.Adjacent(H))
|
||||
return 0
|
||||
|
||||
// Is it a valid power source?
|
||||
if(target.drain_power(1) <= 0)
|
||||
return 0
|
||||
|
||||
H << "<span class = 'danger'>You begin draining power from [target]!</span>"
|
||||
interfaced_with = target
|
||||
|
||||
holder.spark_system.start()
|
||||
playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/power_sink/accepts_item(var/obj/item/input_device, var/mob/living/user)
|
||||
var/can_drain = input_device.drain_power(1)
|
||||
if(can_drain > 0)
|
||||
engage(input_device)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/rig_module/power_sink/process()
|
||||
|
||||
if(!interfaced_with)
|
||||
return ..()
|
||||
|
||||
var/mob/living/carbon/human/H
|
||||
if(holder && holder.wearer)
|
||||
H = holder.wearer
|
||||
|
||||
if(!H || !istype(H))
|
||||
return 0
|
||||
|
||||
holder.spark_system.start()
|
||||
playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
|
||||
if(!holder.cell)
|
||||
H << "<span class = 'danger'>Your power sink flashes an error; there is no cell in your rig.</span>"
|
||||
drain_complete(H)
|
||||
return
|
||||
|
||||
if(!interfaced_with || !interfaced_with.Adjacent(H))
|
||||
H << "<span class = 'warning'>Your power sink retracts into its casing.</span>"
|
||||
drain_complete(H)
|
||||
return
|
||||
|
||||
var/target_drained = interfaced_with.drain_power()
|
||||
if(target_drained <= 0)
|
||||
H << "<span class = 'danger'>Your power sink flashes a red light; there is no power left in [interfaced_with].</span>"
|
||||
drain_complete(H)
|
||||
return
|
||||
|
||||
holder.cell.charge += target_drained
|
||||
total_power_drained += target_drained
|
||||
|
||||
if(holder.cell.charge > holder.cell.maxcharge)
|
||||
H << "<span class = 'warning'>Your power sink flashes an amber light; your rig cell is full.</span>"
|
||||
holder.cell.charge = holder.cell.maxcharge
|
||||
drain_complete(H)
|
||||
return
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/power_sink/proc/drain_complete(var/mob/living/M)
|
||||
|
||||
if(!interfaced_with)
|
||||
if(M) M << "<font color='blue'><b>Total power drained:</b> [total_power_drained]W.</font>"
|
||||
else
|
||||
if(M) M << "<font color='blue'><b>Total power drained from [interfaced_with]:</b> [total_power_drained]W.</font>"
|
||||
interfaced_with.drain_power(0,1) // Damage the victim.
|
||||
|
||||
interfaced_with = null
|
||||
total_power_drained = 0
|
||||
212
code/modules/clothing/spacesuits/rig/modules/modules.dm
Normal file
212
code/modules/clothing/spacesuits/rig/modules/modules.dm
Normal file
@@ -0,0 +1,212 @@
|
||||
/*
|
||||
* Rigsuit upgrades/abilities.
|
||||
*/
|
||||
|
||||
/datum/rig_charge
|
||||
var/short_name = "undef"
|
||||
var/display_name = "undefined"
|
||||
var/product_type = "undefined"
|
||||
var/charges = 0
|
||||
|
||||
/obj/item/rig_module
|
||||
name = "hardsuit upgrade"
|
||||
desc = "It looks pretty sciency."
|
||||
icon = 'icons/obj/rig_modules.dmi'
|
||||
icon_state = "module"
|
||||
matter = list("metal" = 20000, "plastic" = 30000, "glass" = 5000)
|
||||
|
||||
var/damage = 0
|
||||
var/obj/item/weapon/rig/holder
|
||||
|
||||
var/module_cooldown = 10
|
||||
var/next_use = 0
|
||||
|
||||
var/toggleable // Set to 1 for the device to show up as an active effect.
|
||||
var/usable // Set to 1 for the device to have an on-use effect.
|
||||
var/selectable // Set to 1 to be able to assign the device as primary system.
|
||||
var/redundant // Set to 1 to ignore duplicate module checking when installing.
|
||||
var/permanent // If set, the module can't be removed.
|
||||
var/disruptive = 1 // Can disrupt by other effects.
|
||||
var/activates_on_touch // If set, unarmed attacks will call engage() on the target.
|
||||
|
||||
var/active // Basic module status
|
||||
var/disruptable // Will deactivate if some other powers are used.
|
||||
|
||||
var/use_power_cost = 0 // Power used when single-use ability called.
|
||||
var/active_power_cost = 0 // Power used when turned on.
|
||||
var/passive_power_cost = 0 // Power used when turned off.
|
||||
|
||||
var/list/charges // Associative list of charge types and remaining numbers.
|
||||
var/charge_selected // Currently selected option used for charge dispensing.
|
||||
|
||||
// Icons.
|
||||
var/suit_overlay
|
||||
var/suit_overlay_active // If set, drawn over icon and mob when effect is active.
|
||||
var/suit_overlay_inactive // As above, inactive.
|
||||
var/suit_overlay_used // As above, when engaged.
|
||||
|
||||
//Display fluff
|
||||
var/interface_name = "hardsuit upgrade"
|
||||
var/interface_desc = "A generic hardsuit upgrade."
|
||||
var/engage_string = "Engage"
|
||||
var/activate_string = "Activate"
|
||||
var/deactivate_string = "Deactivate"
|
||||
|
||||
/obj/item/rig_module/examine()
|
||||
..()
|
||||
switch(damage)
|
||||
if(0)
|
||||
usr << "It is undamaged."
|
||||
if(1)
|
||||
usr << "It is badly damaged."
|
||||
if(2)
|
||||
usr << "It is almost completely destroyed."
|
||||
|
||||
/obj/item/rig_module/attackby(obj/item/W as obj, mob/user as mob)
|
||||
|
||||
if(istype(W,/obj/item/stack/nanopaste))
|
||||
|
||||
if(damage == 0)
|
||||
user << "There is no damage to mend."
|
||||
return
|
||||
|
||||
user << "You start mending the damaged portions of \the [src]..."
|
||||
|
||||
if(!do_after(user,30) || !W || !src)
|
||||
return
|
||||
|
||||
var/obj/item/stack/nanopaste/paste = W
|
||||
damage = 0
|
||||
user << "You mend the damage to [src] with [W]."
|
||||
paste.use(1)
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/stack/cable_coil))
|
||||
|
||||
switch(damage)
|
||||
if(0)
|
||||
user << "There is no damage to mend."
|
||||
return
|
||||
if(2)
|
||||
user << "There is no damage that you are capable of mending with such crude tools."
|
||||
return
|
||||
|
||||
var/obj/item/stack/cable_coil/cable = W
|
||||
if(!cable.amount >= 5)
|
||||
user << "You need five units of cable to repair \the [src]."
|
||||
return
|
||||
|
||||
user << "You start mending the damaged portions of \the [src]..."
|
||||
if(!do_after(user,30) || !W || !src)
|
||||
return
|
||||
|
||||
damage = 1
|
||||
user << "You mend some of damage to [src] with [W], but you will need more advanced tools to fix it completely."
|
||||
cable.use(5)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/rig_module/New()
|
||||
..()
|
||||
if(suit_overlay_inactive)
|
||||
suit_overlay = suit_overlay_inactive
|
||||
|
||||
if(charges && charges.len)
|
||||
var/list/processed_charges = list()
|
||||
for(var/list/charge in charges)
|
||||
var/datum/rig_charge/charge_dat = new
|
||||
|
||||
charge_dat.short_name = charge[1]
|
||||
charge_dat.display_name = charge[2]
|
||||
charge_dat.product_type = charge[3]
|
||||
charge_dat.charges = charge[4]
|
||||
|
||||
if(!charge_selected) charge_selected = charge_dat.short_name
|
||||
processed_charges[charge_dat.short_name] = charge_dat
|
||||
|
||||
charges = processed_charges
|
||||
|
||||
..()
|
||||
|
||||
// Called when the module is installed into a suit.
|
||||
/obj/item/rig_module/proc/installed(var/obj/item/weapon/rig/new_holder)
|
||||
holder = new_holder
|
||||
return
|
||||
|
||||
//Proc for one-use abilities like teleport.
|
||||
/obj/item/rig_module/proc/engage()
|
||||
|
||||
if(damage >= 2)
|
||||
usr << "<span class='warning'>The [interface_name] is damaged beyond use!</span>"
|
||||
|
||||
if(world.time < next_use)
|
||||
usr << "<span class='warning'>You cannot use the [interface_name] again so soon.</span>"
|
||||
return 0
|
||||
|
||||
if(!holder || holder.canremove)
|
||||
usr << "<span class='warning'>The suit is not initialized.</span>"
|
||||
return 0
|
||||
|
||||
if(holder.security_check_enabled && !(istype(usr,/mob/living/silicon) || holder.allowed(usr)))
|
||||
usr << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
if(!holder.check_power_cost(usr, use_power_cost, 0, src, (istype(usr,/mob/living/silicon ? 1 : 0) ) ) )
|
||||
return 0
|
||||
|
||||
next_use = world.time + module_cooldown
|
||||
|
||||
return 1
|
||||
|
||||
// Proc for toggling on active abilities.
|
||||
/obj/item/rig_module/proc/activate()
|
||||
|
||||
if(active || !engage())
|
||||
return 0
|
||||
|
||||
active = 1
|
||||
|
||||
spawn(1)
|
||||
if(suit_overlay_active)
|
||||
suit_overlay = suit_overlay_active
|
||||
else
|
||||
suit_overlay = null
|
||||
holder.update_icon()
|
||||
|
||||
return 1
|
||||
|
||||
// Proc for toggling off active abilities.
|
||||
/obj/item/rig_module/proc/deactivate()
|
||||
|
||||
if(!active)
|
||||
return 0
|
||||
|
||||
active = 0
|
||||
|
||||
spawn(1)
|
||||
if(suit_overlay_inactive)
|
||||
suit_overlay = suit_overlay_inactive
|
||||
else
|
||||
suit_overlay = null
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
|
||||
return 1
|
||||
|
||||
// Called when the module is uninstalled from a suit.
|
||||
/obj/item/rig_module/proc/removed()
|
||||
deactivate()
|
||||
holder = null
|
||||
return
|
||||
|
||||
// Called by the hardsuit each rig process tick.
|
||||
/obj/item/rig_module/process()
|
||||
if(active)
|
||||
return active_power_cost
|
||||
else
|
||||
return passive_power_cost
|
||||
|
||||
// Called by holder rigsuit attackby()
|
||||
// Checks if an item is usable with this module and handles it if it is
|
||||
/obj/item/rig_module/proc/accepts_item(var/obj/item/input_device)
|
||||
return 0
|
||||
178
code/modules/clothing/spacesuits/rig/modules/ninja.dm
Normal file
178
code/modules/clothing/spacesuits/rig/modules/ninja.dm
Normal file
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
* Contains
|
||||
* /obj/item/rig_module/stealth_field
|
||||
* /obj/item/rig_module/teleporter
|
||||
* /obj/item/rig_module/fabricator/energy_net
|
||||
* /obj/item/rig_module/self_destruct
|
||||
*/
|
||||
|
||||
/obj/item/rig_module/stealth_field
|
||||
|
||||
name = "active camouflage module"
|
||||
desc = "A robust hardsuit-integrated stealth module."
|
||||
icon_state = "stealth"
|
||||
|
||||
toggleable = 1
|
||||
disruptable = 1
|
||||
disruptive = 0
|
||||
|
||||
use_power_cost = 5
|
||||
active_power_cost = 1
|
||||
passive_power_cost = 0
|
||||
|
||||
activate_string = "Enable Cloak"
|
||||
deactivate_string = "Disable Cloak"
|
||||
|
||||
interface_name = "integrated stealth system"
|
||||
interface_desc = "An integrated active camouflage system."
|
||||
|
||||
suit_overlay_active = "stealth_active"
|
||||
suit_overlay_inactive = "stealth_inactive"
|
||||
|
||||
/obj/item/rig_module/stealth_field/activate()
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
H << "<font color='blue'><b>You are now invisible to normal detection.</b></font>"
|
||||
H.invisibility = INVISIBILITY_LEVEL_TWO
|
||||
|
||||
anim(get_turf(H), H, 'icons/effects/effects.dmi', "electricity",null,20,null)
|
||||
|
||||
H.visible_message("[H.name] vanishes into thin air!",1)
|
||||
|
||||
/obj/item/rig_module/stealth_field/deactivate()
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
H << "<span class='danger'>You are now visible.</span>"
|
||||
H.invisibility = 0
|
||||
|
||||
anim(get_turf(H), H,'icons/mob/mob.dmi',,"uncloak",,H.dir)
|
||||
anim(get_turf(H), H, 'icons/effects/effects.dmi', "electricity",null,20,null)
|
||||
|
||||
for(var/mob/O in oviewers(H))
|
||||
O.show_message("[H.name] appears from thin air!",1)
|
||||
playsound(get_turf(H), 'sound/effects/stealthoff.ogg', 75, 1)
|
||||
|
||||
|
||||
/obj/item/rig_module/teleporter
|
||||
|
||||
name = "teleportation module"
|
||||
desc = "A complex, sleek-looking, hardsuit-integrated teleportation module."
|
||||
use_power_cost = 40
|
||||
redundant = 1
|
||||
usable = 1
|
||||
selectable = 1
|
||||
|
||||
engage_string = "Emergency Leap"
|
||||
|
||||
interface_name = "VOID-shift phase projector"
|
||||
interface_desc = "An advanced teleportation system. It is capable of pinpoint precision or random leaps forward."
|
||||
|
||||
/obj/item/rig_module/teleporter/proc/phase_in(var/mob/M,var/turf/T)
|
||||
|
||||
if(!M || !T)
|
||||
return
|
||||
|
||||
holder.spark_system.start()
|
||||
playsound(T, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(T, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
anim(T,M,'icons/mob/mob.dmi',,"phasein",,M.dir)
|
||||
|
||||
/obj/item/rig_module/teleporter/proc/phase_out(var/mob/M,var/turf/T)
|
||||
|
||||
if(!M || !T)
|
||||
return
|
||||
|
||||
playsound(T, "sparks", 50, 1)
|
||||
anim(T,M,'icons/mob/mob.dmi',,"phaseout",,M.dir)
|
||||
|
||||
/obj/item/rig_module/teleporter/engage(atom/target)
|
||||
|
||||
if(!..()) return 0
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
var/turf/T
|
||||
if(target)
|
||||
T = get_turf(target)
|
||||
else
|
||||
T = get_teleport_loc(get_turf(H), H, rand(5, 9))
|
||||
|
||||
if(!T || T.density)
|
||||
H << "<span class='warning'>You cannot teleport into solid walls.</span>"
|
||||
return 0
|
||||
|
||||
phase_out(H,get_turf(H))
|
||||
H.loc = T
|
||||
phase_in(H,get_turf(H))
|
||||
|
||||
for(var/obj/item/weapon/grab/G in H.contents)
|
||||
if(G.affecting)
|
||||
phase_out(G.affecting,get_turf(G.affecting))
|
||||
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)
|
||||
phase_in(G.affecting,get_turf(G.affecting))
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/fabricator/energy_net
|
||||
|
||||
name = "net projector"
|
||||
desc = "Some kind of complex energy projector with a hardsuit mount."
|
||||
|
||||
interface_name = "energy net launcher"
|
||||
interface_desc = "An advanced energy-patterning projector used to capture targets."
|
||||
|
||||
engage_string = "Fabricate Net"
|
||||
|
||||
fabrication_type = /obj/item/weapon/energy_net
|
||||
use_power_cost = 70
|
||||
|
||||
/obj/item/rig_module/fabricator/energy_net/engage(atom/target)
|
||||
|
||||
if(holder && holder.wearer)
|
||||
if(..(target) && target)
|
||||
holder.wearer.Beam(target,"n_beam",,10)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/rig_module/self_destruct
|
||||
|
||||
name = "self-destruct module"
|
||||
desc = "Oh my God, Captain. A bomb."
|
||||
usable = 1
|
||||
active = 1
|
||||
permanent = 1
|
||||
|
||||
engage_string = "Detonate"
|
||||
|
||||
interface_name = "dead man's switch"
|
||||
interface_desc = "An integrated self-destruct module. When the wearer dies, so does the surrounding area. Do not press this button."
|
||||
|
||||
/obj/item/rig_module/self_destruct/activate()
|
||||
return
|
||||
|
||||
/obj/item/rig_module/self_destruct/deactivate()
|
||||
return
|
||||
|
||||
/obj/item/rig_module/self_destruct/process()
|
||||
|
||||
// Not being worn, leave it alone.
|
||||
if(!holder || !holder.wearer || !holder.wearer.wear_suit == holder)
|
||||
return 0
|
||||
|
||||
//OH SHIT.
|
||||
if(holder.wearer.stat == 2)
|
||||
engage()
|
||||
|
||||
/obj/item/rig_module/self_destruct/engage()
|
||||
explosion(get_turf(src), 0, 0, 3, 4)
|
||||
|
||||
/obj/item/rig_module/self_destruct/small/engage()
|
||||
explosion(get_turf(src), 0, 0, 1, 2)
|
||||
338
code/modules/clothing/spacesuits/rig/modules/utility.dm
Normal file
338
code/modules/clothing/spacesuits/rig/modules/utility.dm
Normal file
@@ -0,0 +1,338 @@
|
||||
/* Contains:
|
||||
* /obj/item/rig_module/device
|
||||
* /obj/item/rig_module/device/plasmacutter
|
||||
* /obj/item/rig_module/device/healthscanner
|
||||
* /obj/item/rig_module/device/drill
|
||||
* /obj/item/rig_module/device/orescanner
|
||||
* /obj/item/rig_module/device/rcd
|
||||
* /obj/item/rig_module/device/anomaly_scanner
|
||||
* /obj/item/rig_module/maneuvering_jets
|
||||
* /obj/item/rig_module/foam_sprayer
|
||||
* /obj/item/rig_module/device/broadcaster
|
||||
* /obj/item/rig_module/chem_dispenser
|
||||
* /obj/item/rig_module/chem_dispenser/injector
|
||||
* /obj/item/rig_module/voice
|
||||
*/
|
||||
|
||||
/obj/item/rig_module/device
|
||||
name = "mounted device"
|
||||
desc = "Some kind of hardsuit mount."
|
||||
usable = 0
|
||||
selectable = 1
|
||||
toggleable = 0
|
||||
disruptive = 0
|
||||
|
||||
var/device_type
|
||||
var/obj/item/device
|
||||
|
||||
/obj/item/rig_module/device/plasmacutter
|
||||
name = "hardsuit plasma cutter"
|
||||
desc = "A lethal-looking industrial cutter."
|
||||
interface_name = "plasma cutter"
|
||||
interface_desc = "A self-sustaining plasma arc capable of cutting through walls."
|
||||
suit_overlay_active = "plasmacutter"
|
||||
suit_overlay_inactive = "plasmacutter"
|
||||
|
||||
device_type = /obj/item/weapon/pickaxe/plasmacutter
|
||||
|
||||
/obj/item/rig_module/device/healthscanner
|
||||
name = "health scanner module"
|
||||
desc = "A hardsuit-mounted health scanner."
|
||||
interface_name = "health scanner"
|
||||
interface_desc = "Shows an informative health readout when used on a subject."
|
||||
|
||||
device_type = /obj/item/device/healthanalyzer
|
||||
|
||||
/obj/item/rig_module/device/drill
|
||||
name = "hardsuit drill mount"
|
||||
desc = "A very heavy diamond-tipped drill."
|
||||
interface_name = "mounted drill"
|
||||
interface_desc = "A diamond-tipped industrial drill."
|
||||
suit_overlay_active = "mounted-drill"
|
||||
suit_overlay_inactive = "mounted-drill"
|
||||
|
||||
device_type = /obj/item/weapon/pickaxe/diamonddrill
|
||||
|
||||
/obj/item/rig_module/device/anomaly_scanner
|
||||
name = "hardsuit anomaly scanner"
|
||||
desc = "You think it's called an Elder Sarsparilla or something."
|
||||
interface_name = "Alden-Saraspova counter"
|
||||
interface_desc = "An exotic particle detector commonly used by xenoarchaeologists."
|
||||
selectable = 1
|
||||
device_type = /obj/item/device/ano_scanner
|
||||
|
||||
/obj/item/rig_module/device/orescanner
|
||||
name = "ore scanner module"
|
||||
desc = "A clunky old ore scanner."
|
||||
interface_name = "ore detector"
|
||||
interface_desc = "A sonar system for detecting large masses of ore."
|
||||
|
||||
engage_string = "Begin Scan"
|
||||
|
||||
usable = 1
|
||||
selectable = 0
|
||||
|
||||
device_type = /obj/item/weapon/mining_scanner
|
||||
|
||||
/obj/item/rig_module/device/rcd
|
||||
name = "RCD mount"
|
||||
desc = "A cell-powered rapid construction device for a hardsuit."
|
||||
interface_name = "mounted RCD"
|
||||
interface_desc = "A device for building or removing walls. Cell-powered."
|
||||
usable = 1
|
||||
engage_string = "Configure RCD"
|
||||
|
||||
device_type = /obj/item/weapon/rcd/mounted
|
||||
|
||||
/obj/item/rig_module/device/New()
|
||||
..()
|
||||
if(device_type) device = new device_type(src)
|
||||
|
||||
/obj/item/rig_module/device/engage(atom/target)
|
||||
|
||||
if(!..() || !device)
|
||||
return 0
|
||||
|
||||
if(!target)
|
||||
device.attack_self(holder.wearer)
|
||||
return 1
|
||||
|
||||
var/resolved = target.attackby(device,holder.wearer)
|
||||
if(!resolved && device && target)
|
||||
device.afterattack(target,holder.wearer,1)
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/chem_dispenser
|
||||
name = "mounted chemical dispenser"
|
||||
desc = "A complex web of tubing and needles suitable for hardsuit use."
|
||||
usable = 1
|
||||
selectable = 0
|
||||
toggleable = 0
|
||||
disruptive = 0
|
||||
|
||||
engage_string = "Inject"
|
||||
|
||||
interface_name = "integrated chemical dispenser"
|
||||
interface_desc = "Dispenses loaded chemicals directly into the wearer's bloodstream."
|
||||
|
||||
charges = list(
|
||||
list("tricordrazine", "tricordrazine", 0, 80),
|
||||
list("tramadol", "tramadol", 0, 80),
|
||||
list("dexalin plus", "dexalinp", 0, 80),
|
||||
list("antibiotics", "spaceacillin", 0, 80),
|
||||
list("antitoxins", "anti_toxin", 0, 80),
|
||||
list("nutrients", "nutriment", 0, 80),
|
||||
list("hyronalin", "hyronalin", 0, 80),
|
||||
list("radium", "radium", 0, 80)
|
||||
)
|
||||
|
||||
var/max_reagent_volume = 80 //Used when refilling.
|
||||
|
||||
/obj/item/rig_module/chem_dispenser/accepts_item(var/obj/item/input_item, var/mob/living/user)
|
||||
|
||||
if(!input_item.is_open_container())
|
||||
return 0
|
||||
|
||||
if(!input_item.reagents || !input_item.reagents.total_volume)
|
||||
user << "\The [input_item] is empty."
|
||||
return 0
|
||||
|
||||
// Magical chemical filtration system, do not question it.
|
||||
var/total_transferred = 0
|
||||
for(var/datum/reagent/R in input_item.reagents.reagent_list)
|
||||
for(var/chargetype in charges)
|
||||
var/datum/rig_charge/charge = charges[chargetype]
|
||||
if(charge.display_name == R.id)
|
||||
|
||||
var/chems_to_transfer = R.volume
|
||||
|
||||
if((charge.charges + chems_to_transfer) > max_reagent_volume)
|
||||
chems_to_transfer = max_reagent_volume - charge.charges
|
||||
|
||||
charge.charges += chems_to_transfer
|
||||
input_item.reagents.remove_reagent(R.id, chems_to_transfer)
|
||||
total_transferred += chems_to_transfer
|
||||
|
||||
break
|
||||
|
||||
if(total_transferred)
|
||||
user << "<font color='blue'>You transfer [total_transferred] units into the suit reservoir.</font>"
|
||||
else
|
||||
user << "<span class='danger'>None of the reagents seem suitable.</span>"
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/chem_dispenser/engage(atom/target)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
if(!charge_selected)
|
||||
H << "<span class='danger'>You have not selected a chemical type.</span>"
|
||||
return 0
|
||||
|
||||
var/datum/rig_charge/charge = charges[charge_selected]
|
||||
|
||||
if(!charge)
|
||||
return 0
|
||||
|
||||
var/chems_to_use = 10
|
||||
if(charge.charges <= 0)
|
||||
H << "<span class='danger'>Insufficient chems!</span>"
|
||||
return 0
|
||||
else if(charge.charges < chems_to_use)
|
||||
chems_to_use = charge.charges
|
||||
|
||||
var/mob/living/target_mob
|
||||
if(target)
|
||||
if(istype(target,/mob/living))
|
||||
target_mob = target
|
||||
else
|
||||
return 0
|
||||
else
|
||||
target_mob = H
|
||||
|
||||
if(target_mob != H)
|
||||
H << "<span class='danger'>You inject [target_mob] with [chems_to_use] unit[chems_to_use == 1 ? "" : "s"] of [charge.display_name].</span>"
|
||||
target_mob << "<span class='danger'>You feel a rushing in your veins as [chems_to_use] unit[chems_to_use == 1 ? "" : "s"] of [charge.display_name] [chems_to_use == 1 ? "is" : "are"] injected.</span>"
|
||||
target_mob.reagents.add_reagent(charge.display_name, chems_to_use)
|
||||
|
||||
charge.charges -= chems_to_use
|
||||
if(charge.charges < 0) charge.charges = 0
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/chem_dispenser/combat
|
||||
|
||||
|
||||
/obj/item/rig_module/chem_dispenser/injector
|
||||
|
||||
name = "mounted chemical injector"
|
||||
desc = "A complex web of tubing and a large needle suitable for hardsuit use."
|
||||
usable = 0
|
||||
selectable = 1
|
||||
disruptive = 1
|
||||
|
||||
interface_name = "mounted chem injector"
|
||||
interface_desc = "Dispenses loaded chemicals via an arm-mounted injector."
|
||||
|
||||
/obj/item/rig_module/voice
|
||||
|
||||
name = "hardsuit voice synthesiser"
|
||||
desc = "A speaker box and sound processor."
|
||||
usable = 1
|
||||
selectable = 0
|
||||
toggleable = 0
|
||||
disruptive = 0
|
||||
|
||||
engage_string = "Configure Synthesiser"
|
||||
|
||||
interface_name = "voice synthesiser"
|
||||
interface_desc = "A flexible and powerful voice modulator system."
|
||||
|
||||
var/obj/item/voice_changer/voice_holder
|
||||
|
||||
/obj/item/rig_module/voice/New()
|
||||
..()
|
||||
voice_holder = new(src)
|
||||
voice_holder.active = 0
|
||||
|
||||
/obj/item/rig_module/voice/installed()
|
||||
..()
|
||||
holder.speech = src
|
||||
|
||||
/obj/item/rig_module/voice/engage()
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/choice= input("Would you like to toggle the synthesiser or set the name?") as null|anything in list("Enable","Disable","Set Name")
|
||||
|
||||
if(!choice)
|
||||
return 0
|
||||
|
||||
switch(choice)
|
||||
if("Enable")
|
||||
active = 1
|
||||
voice_holder.active = 1
|
||||
usr << "<font color='blue'>You enable the speech synthesiser.</font>"
|
||||
if("Disable")
|
||||
active = 0
|
||||
voice_holder.active = 0
|
||||
usr << "<font color='blue'>You disable the speech synthesiser.</font>"
|
||||
if("Set Name")
|
||||
var/raw_choice = input(usr, "Please enter a new name.") as text|null
|
||||
if(!raw_choice)
|
||||
return 0
|
||||
voice_holder.voice = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
|
||||
usr << "You are now mimicking <B>[voice_holder.voice]</B>.</font>"
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/maneuvering_jets
|
||||
|
||||
name = "hardsuit maneuvering jets"
|
||||
desc = "A compact gas thruster system for a hardsuit."
|
||||
usable = 1
|
||||
toggleable = 1
|
||||
selectable = 0
|
||||
disruptive = 0
|
||||
|
||||
suit_overlay_active = "maneuvering_active"
|
||||
suit_overlay_inactive = "maneuvering_inactive"
|
||||
|
||||
engage_string = "Toggle Stabilizers"
|
||||
activate_string = "Activate Thrusters"
|
||||
deactivate_string = "Deactivate Thrusters"
|
||||
|
||||
interface_name = "maneuvering jets"
|
||||
interface_desc = "An inbuilt EVA maneuvering system that runs off the rig air supply."
|
||||
|
||||
var/obj/item/weapon/tank/jetpack/rig/jets
|
||||
|
||||
/obj/item/rig_module/maneuvering_jets/engage()
|
||||
if(!..())
|
||||
return 0
|
||||
jets.toggle_rockets()
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/maneuvering_jets/activate()
|
||||
|
||||
if(active)
|
||||
return 0
|
||||
|
||||
active = 1
|
||||
|
||||
spawn(1)
|
||||
if(suit_overlay_active)
|
||||
suit_overlay = suit_overlay_active
|
||||
else
|
||||
suit_overlay = null
|
||||
holder.update_icon()
|
||||
|
||||
if(!jets.on)
|
||||
jets.toggle()
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/maneuvering_jets/deactivate()
|
||||
if(!..())
|
||||
return 0
|
||||
if(jets.on)
|
||||
jets.toggle()
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/maneuvering_jets/New()
|
||||
..()
|
||||
jets = new(src)
|
||||
|
||||
/obj/item/rig_module/maneuvering_jets/installed()
|
||||
..()
|
||||
jets.holder = holder
|
||||
jets.ion_trail.set_up(holder)
|
||||
|
||||
/obj/item/rig_module/maneuvering_jets/removed()
|
||||
..()
|
||||
jets.holder = null
|
||||
jets.ion_trail.set_up(jets)
|
||||
|
||||
/obj/item/rig_module/foam_sprayer
|
||||
118
code/modules/clothing/spacesuits/rig/modules/vision.dm
Normal file
118
code/modules/clothing/spacesuits/rig/modules/vision.dm
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Contains
|
||||
* /obj/item/rig_module/vision
|
||||
* /obj/item/rig_module/vision/meson
|
||||
* /obj/item/rig_module/vision/thermal
|
||||
*/
|
||||
|
||||
/datum/rig_vision
|
||||
var/mode
|
||||
var/obj/item/clothing/glasses/glasses
|
||||
|
||||
/datum/rig_vision/nvg
|
||||
mode = "night vision"
|
||||
/datum/rig_vision/nvg/New()
|
||||
glasses = new /obj/item/clothing/glasses/night
|
||||
|
||||
/datum/rig_vision/thermal
|
||||
mode = "thermal scanner"
|
||||
/datum/rig_vision/thermal/New()
|
||||
glasses = new /obj/item/clothing/glasses/thermal
|
||||
|
||||
/datum/rig_vision/meson
|
||||
mode = "meson scanner"
|
||||
/datum/rig_vision/meson/New()
|
||||
glasses = new /obj/item/clothing/glasses/meson
|
||||
|
||||
/obj/item/rig_module/vision
|
||||
|
||||
name = "hardsuit visor"
|
||||
desc = "A layered, translucent visor system for a hardsuit."
|
||||
|
||||
interface_name = "optical scanners"
|
||||
interface_desc = "An integrated multi-mode vision system."
|
||||
|
||||
usable = 1
|
||||
toggleable = 1
|
||||
disruptive = 0
|
||||
|
||||
engage_string = "Cycle Visor Mode"
|
||||
activate_string = "Enable Visor"
|
||||
deactivate_string = "Disable Visor"
|
||||
|
||||
var/datum/rig_vision/vision
|
||||
var/list/vision_modes = list(
|
||||
/datum/rig_vision/nvg,
|
||||
/datum/rig_vision/thermal,
|
||||
/datum/rig_vision/meson
|
||||
)
|
||||
|
||||
var/vision_index
|
||||
|
||||
/obj/item/rig_module/vision/meson
|
||||
|
||||
name = "hardsuit meson scanner"
|
||||
desc = "A layered, translucent visor system for a hardsuit."
|
||||
|
||||
usable = 0
|
||||
|
||||
interface_name = "meson scanner"
|
||||
interface_desc = "An integrated meson scanner."
|
||||
|
||||
vision_modes = list(/datum/rig_vision/meson)
|
||||
|
||||
/obj/item/rig_module/vision/thermal
|
||||
|
||||
name = "hardsuit thermal scanner"
|
||||
desc = "A layered, translucent visor system for a hardsuit."
|
||||
|
||||
usable = 0
|
||||
|
||||
interface_name = "thermal scanner"
|
||||
interface_desc = "An integrated thermal scanner."
|
||||
|
||||
vision_modes = list(/datum/rig_vision/thermal)
|
||||
|
||||
// There should only ever be one vision module installed in a suit.
|
||||
/obj/item/rig_module/vision/installed()
|
||||
..()
|
||||
holder.visor = src
|
||||
|
||||
/obj/item/rig_module/vision/engage()
|
||||
|
||||
var/starting_up = !active
|
||||
|
||||
if(!..() || !vision_modes)
|
||||
return 0
|
||||
|
||||
// Don't cycle if this engage() is being called by activate().
|
||||
if(starting_up)
|
||||
holder.wearer << "<font color='blue'>You activate your visual sensors.</font>"
|
||||
return 1
|
||||
|
||||
if(vision_modes.len > 1)
|
||||
vision_index++
|
||||
if(vision_index > vision_modes.len)
|
||||
vision_index = 1
|
||||
vision = vision_modes[vision_index]
|
||||
|
||||
holder.wearer << "<font color='blue'>You cycle your sensors to <b>[vision.mode]</b> mode.</font>"
|
||||
else
|
||||
holder.wearer << "<font color='blue'>Your sensors only have one mode.</font>"
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/vision/New()
|
||||
..()
|
||||
|
||||
if(!vision_modes)
|
||||
return
|
||||
|
||||
vision_index = 1
|
||||
var/list/processed_vision = list()
|
||||
|
||||
for(var/vision_mode in vision_modes)
|
||||
var/datum/rig_vision/vision_datum = new vision_mode
|
||||
if(!vision) vision = vision_datum
|
||||
processed_vision += vision_datum
|
||||
|
||||
vision_modes = processed_vision
|
||||
699
code/modules/clothing/spacesuits/rig/rig.dm
Normal file
699
code/modules/clothing/spacesuits/rig/rig.dm
Normal file
@@ -0,0 +1,699 @@
|
||||
#define ONLY_DEPLOY 1
|
||||
#define ONLY_RETRACT 2
|
||||
#define SEAL_DELAY 30
|
||||
|
||||
/*
|
||||
* Defines the behavior of hardsuits/rigs/power armour.
|
||||
*/
|
||||
|
||||
/obj/item/weapon/rig
|
||||
|
||||
name = "hardsuit control module"
|
||||
icon = 'icons/obj/rig_modules.dmi'
|
||||
desc = "A back-mounted hardsuit deployment and control mechanism."
|
||||
slot_flags = SLOT_BACK
|
||||
req_one_access = null
|
||||
req_access = null
|
||||
w_class = 4
|
||||
|
||||
// These values are passed on to all component pieces.
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
|
||||
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
siemens_coefficient = 0
|
||||
permeability_coefficient = 0
|
||||
|
||||
var/interface_path = "hardsuit.tmpl"
|
||||
var/ai_interface_path = "hardsuit.tmpl"
|
||||
var/interface_title = "Hardsuit Controller"
|
||||
|
||||
// Keeps track of what this rig should spawn with.
|
||||
var/suit_type = "hardsuit"
|
||||
var/list/initial_modules
|
||||
var/chest_type = /obj/item/clothing/suit/space/rig
|
||||
var/helm_type = /obj/item/clothing/head/helmet/space/rig
|
||||
var/boot_type = /obj/item/clothing/shoes/rig
|
||||
var/glove_type = /obj/item/clothing/gloves/rig
|
||||
var/cell_type = /obj/item/weapon/cell/high
|
||||
var/air_type = /obj/item/weapon/tank/oxygen
|
||||
|
||||
//Component/device holders.
|
||||
var/obj/item/weapon/tank/air_supply // Air tank, if any.
|
||||
var/obj/item/clothing/shoes/rig/boots = null // Deployable boots, if any.
|
||||
var/obj/item/clothing/suit/space/rig/chest // Deployable chestpiece, if any.
|
||||
var/obj/item/clothing/head/helmet/space/rig/helmet = null // Deployable helmet, if any.
|
||||
var/obj/item/clothing/gloves/rig/gloves = null // Deployable gauntlets, if any.
|
||||
var/obj/item/weapon/cell/cell // Power supply, if any.
|
||||
var/obj/item/rig_module/selected_module = null // Primary system (used with middle-click)
|
||||
var/obj/item/rig_module/vision/visor // Kinda shitty to have a var for a module, but saves time.
|
||||
var/obj/item/rig_module/voice/speech // As above.
|
||||
var/mob/living/carbon/human/wearer // The person currently wearing the rig.
|
||||
var/image/mob_icon // Holder for on-mob icon.
|
||||
var/list/installed_modules = list() // Power consumption/use bookkeeping.
|
||||
|
||||
// Rig status vars.
|
||||
var/open = 0 // Access panel status.
|
||||
var/locked = 1 // Lock status.
|
||||
var/subverted = 0
|
||||
var/interface_locked = 0
|
||||
var/control_overridden = 0
|
||||
var/ai_override_enabled = 0
|
||||
var/security_check_enabled = 1
|
||||
var/malfunctioning = 0
|
||||
var/malfunction_delay = 0
|
||||
var/electrified = 0
|
||||
var/locked_down = 0
|
||||
|
||||
var/sealing // Keeps track of seal status independantly of canremove.
|
||||
var/offline = 1 // Should we be applying suit maluses?
|
||||
var/offline_slowdown = 10 // If the suit is deployed and unpowered, it sets slowdown to this.
|
||||
var/vision_restriction
|
||||
var/offline_vision_restriction = 1 // 0 - none, 1 - welder vision, 2 - blind. Maybe move this to helmets.
|
||||
|
||||
// Wiring! How exciting.
|
||||
var/datum/wires/rig/wires
|
||||
var/datum/effect/effect/system/spark_spread/spark_system
|
||||
|
||||
/obj/item/weapon/rig/examine()
|
||||
..()
|
||||
if(wearer)
|
||||
for(var/obj/item/piece in list(helmet,gloves,chest,boots))
|
||||
if(!piece || piece.loc != wearer)
|
||||
continue
|
||||
usr << "\icon[piece] \The [piece] [piece.gender == PLURAL ? "are" : "is"] deployed."
|
||||
|
||||
if(src.loc == usr)
|
||||
usr << "The maintenance panel is [open ? "open" : "closed"]."
|
||||
usr << "Hardsuit systems are [offline ? "<font color='red'>offline</font>" : "<font color='green'>online</green>"]."
|
||||
|
||||
/obj/item/weapon/rig/New()
|
||||
..()
|
||||
|
||||
wires = new(src)
|
||||
|
||||
if((!req_access || !req_access.len) && (!req_one_access || !req_one_access.len))
|
||||
locked = 0
|
||||
|
||||
spark_system = new()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
processing_objects |= src
|
||||
|
||||
if(initial_modules && initial_modules.len)
|
||||
for(var/path in initial_modules)
|
||||
var/obj/item/rig_module/module = new path(src)
|
||||
installed_modules += module
|
||||
module.installed(src)
|
||||
|
||||
// Create and initialize our various segments.
|
||||
if(cell_type)
|
||||
cell = new cell_type(src)
|
||||
if(air_type)
|
||||
air_supply = new air_type(src)
|
||||
if(glove_type)
|
||||
gloves = new glove_type(src)
|
||||
verbs |= /obj/item/weapon/rig/proc/toggle_gauntlets
|
||||
if(helm_type)
|
||||
helmet = new helm_type(src)
|
||||
verbs |= /obj/item/weapon/rig/proc/toggle_helmet
|
||||
if(boot_type)
|
||||
boots = new boot_type(src)
|
||||
verbs |= /obj/item/weapon/rig/proc/toggle_boots
|
||||
if(chest_type)
|
||||
chest = new chest_type(src)
|
||||
verbs |= /obj/item/weapon/rig/proc/toggle_chest
|
||||
|
||||
for(var/obj/item/piece in list(gloves,helmet,boots,chest))
|
||||
if(!piece)
|
||||
continue
|
||||
piece.canremove = 0
|
||||
piece.name = "[suit_type] [initial(piece.name)]"
|
||||
piece.desc = "It seems to be part of a [src.name]."
|
||||
piece.icon_state = "[initial(icon_state)]"
|
||||
piece.armor = armor
|
||||
piece.min_cold_protection_temperature = min_cold_protection_temperature
|
||||
piece.max_heat_protection_temperature = max_heat_protection_temperature
|
||||
piece.siemens_coefficient = siemens_coefficient
|
||||
piece.permeability_coefficient = permeability_coefficient
|
||||
|
||||
spawn(1)
|
||||
var/mob/M = loc
|
||||
if(istype(M))
|
||||
toggle_seals(M,1)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/rig/Del()
|
||||
for(var/obj/item/piece in list(gloves,boots,helmet,chest))
|
||||
var/mob/living/M = piece.loc
|
||||
if(istype(M))
|
||||
M.drop_from_inventory(piece)
|
||||
del(piece)
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
/obj/item/weapon/rig/proc/suit_is_deployed()
|
||||
if(!istype(wearer) || src.loc != wearer || wearer.back != src)
|
||||
return 0
|
||||
if(helm_type && (!helmet || wearer.head != helmet))
|
||||
return 0
|
||||
if(glove_type && (!gloves || wearer.gloves != gloves))
|
||||
return 0
|
||||
if(boot_type && (!boots || wearer.shoes != boots))
|
||||
return 0
|
||||
if(chest_type && (!chest || wearer.wear_suit != chest))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/rig/proc/toggle_seals(var/mob/living/carbon/human/M,var/instant)
|
||||
|
||||
if(sealing) return
|
||||
|
||||
if(M && !(istype(M) && M.back == src ) && !istype(M,/mob/living/silicon) )
|
||||
return 0
|
||||
|
||||
if(!check_power_cost(M))
|
||||
return 0
|
||||
|
||||
deploy(M,instant)
|
||||
|
||||
var/seal_target = !canremove
|
||||
var/failed_to_seal
|
||||
|
||||
canremove = 0 // No removing the suit while unsealing.
|
||||
sealing = 1
|
||||
|
||||
if(!seal_target && !suit_is_deployed())
|
||||
M << "<span class='danger'>The suit flashes an error light. It can't function properly without being fully deployed.</span>"
|
||||
failed_to_seal = 1
|
||||
|
||||
if(!failed_to_seal && instant)
|
||||
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
|
||||
if(!piece) continue
|
||||
piece.icon_state = "[initial(icon_state)]_sealed"
|
||||
update_icon()
|
||||
|
||||
else if(!failed_to_seal)
|
||||
|
||||
M << "<font color='blue'>With a quiet hum, the suit begins running checks and adjusting components.</font>"
|
||||
|
||||
if(!do_after(M,SEAL_DELAY))
|
||||
if(M) M << "<span class='warning'>You must remain still while the suit is adjusting the components.</span>"
|
||||
failed_to_seal = 1
|
||||
|
||||
if(!M)
|
||||
failed_to_seal = 1
|
||||
else
|
||||
for(var/list/piece_data in list(list(M.shoes,boots,"boots"),list(M.gloves,gloves,"gloves"),list(M.head,helmet,"helmet"),list(M.wear_suit,chest,"chest")))
|
||||
|
||||
var/obj/item/piece = piece_data[1]
|
||||
var/obj/item/compare_piece = piece_data[2]
|
||||
var/msg_type = piece_data[3]
|
||||
|
||||
if(!piece)
|
||||
continue
|
||||
|
||||
if(!istype(M) || !istype(piece) || !istype(compare_piece) || !msg_type)
|
||||
if(!failed_to_seal)
|
||||
if(M) M << "<span class='warning'>You must remain still while the suit is adjusting the components.</span>"
|
||||
failed_to_seal = 1
|
||||
break
|
||||
|
||||
if(M.back == src && piece == compare_piece && do_after(M,SEAL_DELAY))
|
||||
piece.icon_state = "[initial(icon_state)][!seal_target ? "_sealed" : ""]"
|
||||
switch(msg_type)
|
||||
if("boots")
|
||||
M << "<font color='blue'>\The [piece] [!seal_target ? "seal around your feet" : "relax their grip on your legs"].</font>"
|
||||
M.update_inv_shoes()
|
||||
if("gloves")
|
||||
M << "<font color='blue'>\The [piece] [!seal_target ? "tighten around your fingers and wrists" : "become loose around your fingers"].</font>"
|
||||
M.update_inv_gloves()
|
||||
if("chest")
|
||||
M << "<font color='blue'>\The [piece] [!seal_target ? "cinches tight again your chest" : "releases your chest"].</font>"
|
||||
M.update_inv_wear_suit()
|
||||
if("helmet")
|
||||
M << "<font color='blue'>\The [piece] hisses [!seal_target ? "closed" : "open"].</font>"
|
||||
M.update_inv_head()
|
||||
if(!seal_target)
|
||||
if(flags & AIRTIGHT)
|
||||
helmet.flags |= AIRTIGHT
|
||||
helmet.flags_inv |= (HIDEEYES|HIDEFACE)
|
||||
helmet.body_parts_covered |= (FACE|EYES)
|
||||
else
|
||||
helmet.flags &= ~AIRTIGHT
|
||||
helmet.flags_inv &= ~(HIDEEYES|HIDEFACE)
|
||||
helmet.body_parts_covered &= ~(FACE|EYES)
|
||||
else
|
||||
failed_to_seal = 1
|
||||
|
||||
if((M && !(istype(M) && M.back == src) && !istype(M,/mob/living/silicon)) || (!seal_target && !suit_is_deployed()))
|
||||
failed_to_seal = 1
|
||||
|
||||
sealing = null
|
||||
|
||||
if(failed_to_seal)
|
||||
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
|
||||
if(!piece) continue
|
||||
piece.icon_state = "[initial(icon_state)][!seal_target ? "" : "_sealed"]"
|
||||
canremove = !seal_target
|
||||
if(helmet)
|
||||
if(canremove)
|
||||
if(flags & AIRTIGHT)
|
||||
helmet.flags |= AIRTIGHT
|
||||
helmet.flags_inv |= (HIDEEYES|HIDEFACE)
|
||||
helmet.body_parts_covered |= (FACE|EYES)
|
||||
else
|
||||
if(flags & AIRTIGHT)
|
||||
helmet.flags &= ~AIRTIGHT
|
||||
helmet.flags_inv &= ~(HIDEEYES|HIDEFACE)
|
||||
helmet.body_parts_covered &= ~(FACE|EYES)
|
||||
update_icon(1)
|
||||
return 0
|
||||
|
||||
// Success!
|
||||
canremove = seal_target
|
||||
M << "<font color='blue'><b>Your entire suit [canremove ? "loosens as the components relax" : "tightens around you as the components lock into place"].</b></font>"
|
||||
|
||||
if(canremove)
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
module.deactivate()
|
||||
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
|
||||
if(!piece) continue
|
||||
if(canremove && (flags & AIRTIGHT))
|
||||
piece.flags &= ~STOPSPRESSUREDMAGE
|
||||
piece.flags &= ~AIRTIGHT
|
||||
else
|
||||
piece.flags |= STOPSPRESSUREDMAGE
|
||||
piece.flags |= AIRTIGHT
|
||||
update_icon(1)
|
||||
|
||||
/obj/item/weapon/rig/process()
|
||||
|
||||
if(!istype(wearer) || loc != wearer || wearer.back != src || canremove || !cell || cell.charge <= 0)
|
||||
if(!cell || cell.charge <= 0)
|
||||
if(electrified >0)
|
||||
electrified = 0
|
||||
if(!offline)
|
||||
if(istype(wearer))
|
||||
if(!canremove)
|
||||
if (offline_slowdown < 3)
|
||||
wearer << "<span class='danger'>Your suit beeps stridently, and suddenly goes dead.</span>"
|
||||
else
|
||||
wearer << "<span class='danger'>Your suit beeps stridently, and suddenly you're wearing a leaden mass of metal and plastic instead of a powered suit.</span>"
|
||||
if(offline_vision_restriction == 1)
|
||||
wearer << "<span class='danger'>The suit optics flicker and die, leaving you with restricted vision.</span>"
|
||||
else if(offline_vision_restriction == 2)
|
||||
wearer << "<span class='danger'>The suit optics drop out completely, drowning you in darkness.</span>"
|
||||
if(!offline)
|
||||
offline = 1
|
||||
else
|
||||
if(offline)
|
||||
offline = 0
|
||||
slowdown = initial(slowdown)
|
||||
|
||||
if(offline)
|
||||
if(offline == 1)
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
module.deactivate()
|
||||
offline = 2
|
||||
slowdown = offline_slowdown
|
||||
return
|
||||
|
||||
if(cell && cell.charge > 0 && electrified > 0)
|
||||
electrified--
|
||||
|
||||
if(malfunction_delay > 0)
|
||||
malfunction_delay--
|
||||
else if(malfunctioning)
|
||||
malfunctioning--
|
||||
malfunction()
|
||||
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
cell.use(module.process()*10)
|
||||
|
||||
/obj/item/weapon/rig/proc/check_power_cost(var/mob/living/user, var/cost, var/use_unconcious, var/obj/item/rig_module/mod, var/user_is_ai)
|
||||
|
||||
if(!istype(user))
|
||||
return 0
|
||||
|
||||
var/fail_msg
|
||||
|
||||
if(!user_is_ai)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(istype(H) && H.back != src)
|
||||
fail_msg = "<span class='warning'>You must be wearing \the [src] to do this.</span>"
|
||||
else if(user.incorporeal_move)
|
||||
fail_msg = "<span class='warning'>You must be solid to do this.</span>"
|
||||
if(sealing)
|
||||
fail_msg = "<span class='warning'>The hardsuit is in the process of adjusting seals and cannot be activated.</span>"
|
||||
else if(!fail_msg && ((use_unconcious && user.stat > 1) || (!use_unconcious && user.stat)))
|
||||
fail_msg = "<span class='warning'>You are in no fit state to do that."
|
||||
else if(!cell)
|
||||
fail_msg = "<span class='warning'>There is no cell installed in the suit.</span>"
|
||||
else if(cost && cell.charge < cost * 10) //TODO: Cellrate?
|
||||
fail_msg = "<span class='warning'>Not enough stored power.</span>"
|
||||
|
||||
if(fail_msg)
|
||||
user << "[fail_msg]"
|
||||
return 0
|
||||
|
||||
// This is largely for cancelling stealth and whatever.
|
||||
if(mod && mod.disruptive)
|
||||
for(var/obj/item/rig_module/module in (installed_modules - mod))
|
||||
if(module.active && module.disruptable)
|
||||
module.deactivate()
|
||||
|
||||
cell.use(cost*10)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/rig/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
|
||||
if(!user)
|
||||
return
|
||||
|
||||
var/list/data = list()
|
||||
|
||||
if(selected_module)
|
||||
data["primarysystem"] = "[selected_module.interface_name]"
|
||||
|
||||
if(src.loc != user)
|
||||
data["ai"] = 1
|
||||
|
||||
data["seals"] = "[src.canremove]"
|
||||
data["sealing"] = "[src.sealing]"
|
||||
data["helmet"] = (helmet ? "[helmet.name]" : "None.")
|
||||
data["gauntlets"] = (gloves ? "[gloves.name]" : "None.")
|
||||
data["boots"] = (boots ? "[boots.name]" : "None.")
|
||||
data["chest"] = (chest ? "[chest.name]" : "None.")
|
||||
|
||||
data["charge"] = cell ? cell.charge : 0
|
||||
data["maxcharge"] = cell ? cell.maxcharge : 0
|
||||
data["chargestatus"] = cell ? Floor((cell.charge/cell.maxcharge)*50) : 0
|
||||
|
||||
data["emagged"] = subverted
|
||||
data["coverlock"] = locked
|
||||
data["interfacelock"] = interface_locked
|
||||
data["aicontrol"] = control_overridden
|
||||
data["aioverride"] = ai_override_enabled
|
||||
data["securitycheck"] = security_check_enabled
|
||||
data["malf"] = malfunctioning
|
||||
|
||||
|
||||
var/list/module_list = list()
|
||||
var/i = 1
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
var/list/module_data = list(
|
||||
"index" = i,
|
||||
"name" = "[module.interface_name]",
|
||||
"desc" = "[module.interface_desc]",
|
||||
"can_use" = "[module.usable]",
|
||||
"can_select" = "[module.selectable]",
|
||||
"can_toggle" = "[module.toggleable]",
|
||||
"is_active" = "[module.active]",
|
||||
"engagecost" = module.use_power_cost*10,
|
||||
"activecost" = module.active_power_cost*10,
|
||||
"passivecost" = module.passive_power_cost*10,
|
||||
"engagestring" = module.engage_string,
|
||||
"activatestring" = module.activate_string,
|
||||
"deactivatestring" = module.deactivate_string,
|
||||
"damage" = module.damage
|
||||
)
|
||||
|
||||
if(module.charges && module.charges.len)
|
||||
|
||||
module_data["charges"] = list()
|
||||
var/datum/rig_charge/selected = module.charges[module.charge_selected]
|
||||
module_data["chargetype"] = selected ? "[selected.display_name]" : "none"
|
||||
|
||||
for(var/chargetype in module.charges)
|
||||
var/datum/rig_charge/charge = module.charges[chargetype]
|
||||
module_data["charges"] += list(list("caption" = "[chargetype] ([charge.charges])", "index" = "[chargetype]"))
|
||||
|
||||
module_list += list(module_data)
|
||||
i++
|
||||
|
||||
if(module_list.len)
|
||||
data["modules"] = module_list
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 800, 600)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/item/weapon/rig/update_icon(var/update_mob_icon)
|
||||
|
||||
//TODO: Maybe consider a cache for this (use mob_icon as blank canvas, use suit icon overlay).
|
||||
overlays.Cut()
|
||||
if(mob_icon)
|
||||
mob_icon.overlays.Cut()
|
||||
|
||||
if(!mob_icon || update_mob_icon)
|
||||
var/species_icon = 'icons/mob/back.dmi'
|
||||
// Since setting mob_icon will override the species checks in
|
||||
// update_inv_wear_suit(), handle species checks here.
|
||||
if(wearer && sprite_sheets && sprite_sheets[wearer.species.name])
|
||||
species_icon = sprite_sheets[wearer.species.name]
|
||||
mob_icon = image("icon" = species_icon, "icon_state" = "[icon_state]")
|
||||
|
||||
if(installed_modules.len)
|
||||
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
if(module.suit_overlay)
|
||||
mob_icon.overlays += image("icon" = 'icons/mob/rig_modules.dmi', "icon_state" = "[module.suit_overlay]")
|
||||
chest.overlays += image("icon" = 'icons/mob/rig_modules.dmi', "icon_state" = "[module.suit_overlay]", "dir" = SOUTH)
|
||||
|
||||
if(wearer)
|
||||
wearer.update_inv_shoes()
|
||||
wearer.update_inv_gloves()
|
||||
wearer.update_inv_head()
|
||||
wearer.update_inv_wear_suit()
|
||||
wearer.update_inv_back()
|
||||
return
|
||||
|
||||
/obj/item/weapon/rig/Topic(href,href_list)
|
||||
|
||||
var/mob/living/carbon/human/H = usr
|
||||
|
||||
if((istype(H) && H.back == src) || (istype(H,/mob/living/silicon)))
|
||||
|
||||
if(istype(H,/mob/living/silicon))
|
||||
if(!control_overridden)
|
||||
usr << "<span class='danger'>Synthetic access disabled. Please consult hardware provider.</span>"
|
||||
return
|
||||
else if(security_check_enabled && !src.allowed(usr))
|
||||
usr << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
if(href_list["toggle_piece"])
|
||||
toggle_piece(href_list["toggle_piece"], H)
|
||||
else if(href_list["toggle_seals"])
|
||||
toggle_seals(H)
|
||||
else if(href_list["interact_module"])
|
||||
|
||||
var/module_index = text2num(href_list["interact_module"])
|
||||
|
||||
if(module_index > 0 && module_index <= installed_modules.len)
|
||||
var/obj/item/rig_module/module = installed_modules[module_index]
|
||||
switch(href_list["module_mode"])
|
||||
if("activate")
|
||||
module.activate()
|
||||
if("deactivate")
|
||||
module.deactivate()
|
||||
if("engage")
|
||||
module.engage()
|
||||
if("select")
|
||||
selected_module = module
|
||||
if("select_charge_type")
|
||||
module.charge_selected = href_list["charge_type"]
|
||||
else if(href_list["toggle_ai_control"])
|
||||
ai_override_enabled = !ai_override_enabled
|
||||
else if(href_list["toggle_suit_lock"])
|
||||
security_check_enabled = !security_check_enabled
|
||||
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/item/weapon/rig/equipped(mob/living/carbon/human/M)
|
||||
..()
|
||||
|
||||
if(istype(M) && M.back == src)
|
||||
M.visible_message("<font color='blue'>[M] starts putting on \the [src]...</font>", "<font color='blue'>You start putting on \the [src]...</font>")
|
||||
|
||||
if(!do_after(M,SEAL_DELAY))
|
||||
if(M && M.back == src)
|
||||
M.back = null
|
||||
M.drop_from_inventory(src)
|
||||
src.loc = get_turf(src)
|
||||
return
|
||||
|
||||
if(istype(M) && M.back == src)
|
||||
M.visible_message("<font color='blue'><b>[M] struggles into \the [src].</b></font>", "<font color='blue'><b>You struggle into \the [src].</b></font>")
|
||||
wearer = M
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/rig/proc/toggle_piece(var/piece, var/mob/living/carbon/human/H, var/deploy_mode)
|
||||
|
||||
if(sealing)
|
||||
return
|
||||
|
||||
if(!cell || !cell.charge)
|
||||
H << "<span class='warning'>The suit is out of power.</span>"
|
||||
return
|
||||
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
H << "<span class='warning'>The hardsuit is not being worn.</span>"
|
||||
return
|
||||
|
||||
var/obj/item/check_slot
|
||||
var/equip_to
|
||||
var/obj/item/use_obj
|
||||
|
||||
if(!H)
|
||||
return
|
||||
|
||||
switch(piece)
|
||||
if("helmet")
|
||||
equip_to = slot_head
|
||||
use_obj = helmet
|
||||
check_slot = H.head
|
||||
if("gauntlets")
|
||||
equip_to = slot_gloves
|
||||
use_obj = gloves
|
||||
check_slot = H.gloves
|
||||
if("boots")
|
||||
equip_to = slot_shoes
|
||||
use_obj = boots
|
||||
check_slot = H.shoes
|
||||
if("chest")
|
||||
equip_to = slot_wear_suit
|
||||
use_obj = chest
|
||||
check_slot = H.wear_suit
|
||||
|
||||
if(use_obj)
|
||||
if(check_slot == use_obj && deploy_mode != ONLY_DEPLOY)
|
||||
|
||||
var/mob/living/carbon/human/holder
|
||||
|
||||
if(use_obj)
|
||||
holder = use_obj.loc
|
||||
if(istype(holder))
|
||||
if(use_obj && check_slot == use_obj)
|
||||
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "retract" : "retracts"] swiftly.</b></font>"
|
||||
use_obj.canremove = 1
|
||||
holder.drop_from_inventory(use_obj)
|
||||
use_obj.canremove = 0
|
||||
use_obj.loc = src
|
||||
|
||||
else if (deploy_mode != ONLY_RETRACT)
|
||||
if(check_slot)
|
||||
if(check_slot != use_obj)
|
||||
H << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.</span>"
|
||||
return
|
||||
else
|
||||
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</b></span>"
|
||||
use_obj.loc = H
|
||||
H.equip_to_slot(use_obj, equip_to)
|
||||
|
||||
if(piece == "helmet" && helmet)
|
||||
helmet.update_light(H)
|
||||
|
||||
/obj/item/weapon/rig/proc/deploy(mob/M,var/sealed)
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(!H || !istype(H)) return
|
||||
|
||||
if(H.back != src)
|
||||
return
|
||||
|
||||
if(sealed)
|
||||
if(H.head)
|
||||
var/obj/item/garbage = H.head
|
||||
H.drop_from_inventory(garbage)
|
||||
H.head = null
|
||||
del(garbage)
|
||||
|
||||
if(H.gloves)
|
||||
var/obj/item/garbage = H.gloves
|
||||
H.drop_from_inventory(garbage)
|
||||
H.gloves = null
|
||||
del(garbage)
|
||||
|
||||
if(H.shoes)
|
||||
var/obj/item/garbage = H.shoes
|
||||
H.drop_from_inventory(garbage)
|
||||
H.shoes = null
|
||||
del(garbage)
|
||||
|
||||
if(H.wear_suit)
|
||||
var/obj/item/garbage = H.wear_suit
|
||||
H.drop_from_inventory(garbage)
|
||||
H.wear_suit = null
|
||||
del(garbage)
|
||||
|
||||
for(var/piece in list("helmet","gauntlets","chest","boots"))
|
||||
toggle_piece(piece, H, ONLY_DEPLOY)
|
||||
|
||||
/obj/item/weapon/rig/dropped()
|
||||
..()
|
||||
for(var/piece in list("helmet","gauntlets","chest","boots"))
|
||||
toggle_piece(piece, wearer, ONLY_RETRACT)
|
||||
wearer = null
|
||||
|
||||
//Todo
|
||||
/obj/item/weapon/rig/proc/malfunction()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rig/emp_act(severity)
|
||||
malfunctioning += severity*10
|
||||
if(malfunction_delay <= 0)
|
||||
malfunction_delay = 20
|
||||
take_hit(severity*10,"electrical pulse")
|
||||
|
||||
/obj/item/weapon/rig/proc/shock(mob/user)
|
||||
if (electrocute_mob(user, cell, src))
|
||||
spark_system.start()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rig/proc/take_hit(damage,source)
|
||||
|
||||
if(!installed_modules.len)
|
||||
return
|
||||
|
||||
if(!prob(max(0,(damage-(chest ? chest.breach_threshold : 0)))))
|
||||
return
|
||||
|
||||
var/list/valid_modules = list()
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
if(module.damage < 2)
|
||||
valid_modules |= module
|
||||
|
||||
if(!valid_modules.len)
|
||||
return
|
||||
|
||||
var/obj/item/rig_module/dam_module = pick(valid_modules)
|
||||
dam_module.damage++
|
||||
|
||||
if(!source)
|
||||
source = "hit"
|
||||
|
||||
if(wearer)
|
||||
wearer << "<span class='danger'>The [source] has [dam_module.damage >= 2 ? "destroyed" : "damaged"] your [dam_module.interface_name]!"
|
||||
dam_module.deactivate()
|
||||
|
||||
/*/obj/item/weapon/rig/proc/forced_move(dir)
|
||||
if(locked_down)
|
||||
return 0
|
||||
if(!control_overridden)
|
||||
return
|
||||
if(!wearer || wearer.back != src)
|
||||
return 0
|
||||
wearer.Move(null,dir)*/
|
||||
|
||||
#undef ONLY_DEPLOY
|
||||
#undef ONLY_RETRACT
|
||||
#undef SEAL_DELAY
|
||||
193
code/modules/clothing/spacesuits/rig/rig_attackby.dm
Normal file
193
code/modules/clothing/spacesuits/rig/rig_attackby.dm
Normal file
@@ -0,0 +1,193 @@
|
||||
/obj/item/weapon/rig/attackby(obj/item/W as obj, mob/user as mob)
|
||||
|
||||
if(!istype(user,/mob/living)) return 0
|
||||
|
||||
if(electrified != 0)
|
||||
if(cell && cell.charge >= 100)
|
||||
cell.use(100)
|
||||
if(shock(user, 100))
|
||||
return
|
||||
|
||||
// Pass repair items on to the chestpiece.
|
||||
if(chest && (istype(W,/obj/item/stack/sheet/mineral/plastic) || istype(W,/obj/item/stack/sheet/metal) || istype(W, /obj/item/weapon/weldingtool)))
|
||||
return chest.attackby(W,user)
|
||||
|
||||
// Lock or unlock the access panel.
|
||||
if(istype(W, /obj/item/weapon/card) || istype(W, /obj/item/device/pda))
|
||||
|
||||
if(subverted)
|
||||
locked = 0
|
||||
user << "<span class='danger'>It looks like the locking system has been shorted out.</span>"
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/card/emag))
|
||||
req_access = null
|
||||
req_one_access = null
|
||||
locked = 0
|
||||
subverted = 1
|
||||
user << "<span class='danger'>You short out the access protocol for the suit.</span>"
|
||||
return
|
||||
|
||||
if((!req_access || !req_access.len) && (!req_one_access || !req_one_access.len))
|
||||
locked = 0
|
||||
user << "<span class='danger'>\The [src] doesn't seem to have a locking mechanism.</span>"
|
||||
return
|
||||
|
||||
if(security_check_enabled && !src.allowed(user))
|
||||
user << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
locked = !locked
|
||||
user << "You [locked ? "lock" : "unlock"] \the [src] access panel."
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/weapon/crowbar))
|
||||
|
||||
if(!open && locked)
|
||||
user << "The access panel is locked shut."
|
||||
return
|
||||
|
||||
open = !open
|
||||
user << "You [open ? "open" : "close"] the access panel."
|
||||
return
|
||||
|
||||
if(open)
|
||||
|
||||
// Hacking.
|
||||
if(istype(W,/obj/item/weapon/wirecutters) || istype(W,/obj/item/device/multitool))
|
||||
if(open)
|
||||
wires.Interact(user)
|
||||
else
|
||||
user << "You can't reach the wiring."
|
||||
return
|
||||
// Air tank.
|
||||
if(istype(W,/obj/item/weapon/tank)) //Todo, some kind of check for suits without integrated air supplies.
|
||||
|
||||
if(air_supply)
|
||||
user << "\The [src] already has a tank installed."
|
||||
return
|
||||
|
||||
user.drop_from_inventory(W)
|
||||
air_supply = W
|
||||
W.loc = src
|
||||
user << "You slot [W] into [src] and tighten the connecting valve."
|
||||
return
|
||||
|
||||
// Check if this is a hardsuit upgrade or a modification.
|
||||
else if(istype(W,/obj/item/rig_module))
|
||||
|
||||
if(istype(src.loc,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
if(H.back == src)
|
||||
user << "<span class='danger'>You can't install a hardsuit module while the suit is being worn.</span>"
|
||||
return 1
|
||||
|
||||
if(!installed_modules) installed_modules = list()
|
||||
if(installed_modules.len)
|
||||
for(var/obj/item/rig_module/installed_mod in installed_modules)
|
||||
if(!installed_mod.redundant && istype(installed_mod,W))
|
||||
user << "The hardsuit already has a module of that class installed."
|
||||
return 1
|
||||
|
||||
var/obj/item/rig_module/mod = W
|
||||
user << "You begin installing \the [mod] into \the [src]."
|
||||
if(!do_after(user,40))
|
||||
return
|
||||
if(!user || !W)
|
||||
return
|
||||
user << "You install \the [mod] into \the [src]."
|
||||
user.drop_from_inventory(mod)
|
||||
installed_modules |= mod
|
||||
mod.loc = src
|
||||
mod.installed(src)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
else if(!cell && istype(W,/obj/item/weapon/cell))
|
||||
|
||||
user << "You jack \the [W] into \the [src]'s battery mount."
|
||||
user.drop_from_inventory(W)
|
||||
W.loc = src
|
||||
src.cell = W
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/weapon/wrench))
|
||||
|
||||
if(!air_supply)
|
||||
user << "There is not tank to remove."
|
||||
return
|
||||
|
||||
user.put_in_hands(air_supply)
|
||||
user << "You detach and remove \the [air_supply]."
|
||||
air_supply = null
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/weapon/screwdriver))
|
||||
|
||||
var/list/current_mounts = list()
|
||||
if(cell) current_mounts += "cell"
|
||||
if(installed_modules && installed_modules.len) current_mounts += "system module"
|
||||
|
||||
var/to_remove = input("Which would you like to modify?") as null|anything in current_mounts
|
||||
if(!to_remove)
|
||||
return
|
||||
|
||||
if(istype(src.loc,/mob/living/carbon/human) && to_remove != "cell")
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
if(H.back == src)
|
||||
user << "You can't remove an installed device while the hardsuit is being worn."
|
||||
return
|
||||
|
||||
switch(to_remove)
|
||||
|
||||
if("cell")
|
||||
|
||||
if(cell)
|
||||
user << "You detatch \the [cell] from \the [src]'s battery mount."
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
module.deactivate()
|
||||
cell.loc = user.put_in_hands(cell)
|
||||
cell = null
|
||||
else
|
||||
user << "There is nothing loaded in that mount."
|
||||
|
||||
if("system module")
|
||||
|
||||
var/list/possible_removals = list()
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
if(module.permanent)
|
||||
continue
|
||||
possible_removals[module.name] = module
|
||||
|
||||
if(!possible_removals.len)
|
||||
user << "There are no installed modules to remove."
|
||||
return
|
||||
|
||||
var/removal_choice = input("Which module would you like to remove?") as null|anything in possible_removals
|
||||
if(!removal_choice)
|
||||
return
|
||||
|
||||
var/obj/item/rig_module/removed = possible_removals[removal_choice]
|
||||
user << "You detatch \the [removed] from \the [src]."
|
||||
removed.loc = get_turf(src)
|
||||
removed.removed()
|
||||
installed_modules -= removed
|
||||
update_icon()
|
||||
|
||||
return
|
||||
|
||||
// If we've gotten this far, all we have left to do before we pass off to root procs
|
||||
// is check if any of the loaded modules want to use the item we've been given.
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
if(module.accepts_item(W,user)) //Item is handled in this proc
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/rig/attack_hand(var/mob/user)
|
||||
|
||||
if(electrified != 0)
|
||||
if(cell && cell.charge >= 100)
|
||||
cell.use(100)
|
||||
if(shock(user, 100))
|
||||
return
|
||||
..()
|
||||
66
code/modules/clothing/spacesuits/rig/rig_pieces.dm
Normal file
66
code/modules/clothing/spacesuits/rig/rig_pieces.dm
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Defines the helmets, gloves and shoes for rigs.
|
||||
*/
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig
|
||||
name = "helmet"
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | THICKMATERIAL
|
||||
flags_inv = HIDEEARS
|
||||
body_parts_covered = HEAD
|
||||
heat_protection = HEAD
|
||||
cold_protection = HEAD
|
||||
brightness_on = 4
|
||||
species_restricted = null
|
||||
|
||||
/obj/item/clothing/gloves/rig
|
||||
name = "gauntlets"
|
||||
flags = FPRINT | TABLEPASS | THICKMATERIAL
|
||||
body_parts_covered = HANDS
|
||||
heat_protection = HANDS
|
||||
cold_protection = HANDS
|
||||
species_restricted = null
|
||||
gender = PLURAL
|
||||
|
||||
/obj/item/clothing/shoes/rig
|
||||
name = "boots"
|
||||
cold_protection = FEET
|
||||
heat_protection = FEET
|
||||
species_restricted = null
|
||||
gender = PLURAL
|
||||
|
||||
/obj/item/clothing/suit/space/rig
|
||||
name = "chestpiece"
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit)
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags_inv = HIDEJUMPSUIT|HIDETAIL
|
||||
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | THICKMATERIAL | AIRTIGHT
|
||||
slowdown = 0
|
||||
breach_threshold = 35
|
||||
can_breach = 1
|
||||
supporting_limbs = list()
|
||||
|
||||
//TODO: move this to modules
|
||||
/obj/item/clothing/head/helmet/space/rig/proc/prevent_track()
|
||||
return 0
|
||||
|
||||
/obj/item/clothing/gloves/rig/Touch(var/atom/A, var/proximity)
|
||||
|
||||
if(!A || !proximity)
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(!istype(H) || !H.back)
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/rig/suit = H.back
|
||||
if(!suit || !istype(suit) || !suit.installed_modules.len)
|
||||
return 0
|
||||
|
||||
for(var/obj/item/rig_module/module in suit.installed_modules)
|
||||
if(module.active && module.activates_on_touch)
|
||||
if(module.engage(A))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
287
code/modules/clothing/spacesuits/rig/rig_verbs.dm
Normal file
287
code/modules/clothing/spacesuits/rig/rig_verbs.dm
Normal file
@@ -0,0 +1,287 @@
|
||||
// Interface for humans.
|
||||
/obj/item/weapon/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/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(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
|
||||
return
|
||||
|
||||
if(!check_power_cost(usr))
|
||||
return
|
||||
|
||||
if(canremove)
|
||||
usr << "<span class='warning'>The suit is not active.</span>"
|
||||
return
|
||||
|
||||
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
|
||||
wearer << "<span class='danger'>Access denied.</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/rig/proc/toggle_helmet()
|
||||
|
||||
set name = "Toggle Helmet"
|
||||
set desc = "Deploys or retracts your helmet."
|
||||
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((security_check_enabled && !src.allowed(wearer)) || control_overridden)
|
||||
wearer << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
toggle_piece("helmet",wearer)
|
||||
|
||||
/obj/item/weapon/rig/proc/toggle_chest()
|
||||
|
||||
set name = "Toggle Chestpiece"
|
||||
set desc = "Deploys or retracts your chestpiece."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
|
||||
wearer << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
toggle_piece("chest",wearer)
|
||||
|
||||
/obj/item/weapon/rig/proc/toggle_gauntlets()
|
||||
|
||||
set name = "Toggle Gauntlets"
|
||||
set desc = "Deploys or retracts your gauntlets."
|
||||
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((security_check_enabled && !src.allowed(wearer)) || control_overridden)
|
||||
wearer << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
toggle_piece("gauntlets",wearer)
|
||||
|
||||
/obj/item/weapon/rig/proc/toggle_boots()
|
||||
|
||||
set name = "Toggle Boots"
|
||||
set desc = "Deploys or retracts your 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((security_check_enabled && !src.allowed(wearer)) || control_overridden)
|
||||
wearer << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
toggle_piece("boots",wearer)
|
||||
|
||||
/obj/item/weapon/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((security_check_enabled && !src.allowed(wearer)) || control_overridden)
|
||||
wearer << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
if(!check_power_cost(usr))
|
||||
return
|
||||
|
||||
deploy(wearer)
|
||||
|
||||
/obj/item/weapon/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
|
||||
|
||||
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
|
||||
wearer << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
toggle_seals(wearer)
|
||||
|
||||
/obj/item/weapon/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/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(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
|
||||
return
|
||||
|
||||
if(!speech)
|
||||
usr << "<span class='warning'>The hardsuit does not have a speech synthesiser.</span>"
|
||||
return
|
||||
|
||||
speech.engage()
|
||||
|
||||
/obj/item/weapon/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
|
||||
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</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/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
|
||||
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</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/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(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</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()
|
||||
57
code/modules/clothing/spacesuits/rig/rig_wiring.dm
Normal file
57
code/modules/clothing/spacesuits/rig/rig_wiring.dm
Normal file
@@ -0,0 +1,57 @@
|
||||
/datum/wires/rig
|
||||
random = 1
|
||||
holder_type = /obj/item/weapon/rig
|
||||
wire_count = 5
|
||||
|
||||
#define RIG_SECURITY 1
|
||||
#define RIG_AI_OVERRIDE 2
|
||||
#define RIG_SYSTEM_CONTROL 4
|
||||
#define RIG_INTERFACE_LOCK 8
|
||||
#define RIG_INTERFACE_SHOCK 16
|
||||
/*
|
||||
* Rig security can be snipped to disable ID access checks on rig.
|
||||
* Rig AI override can be pulsed to toggle whether or not the AI can take control of the suit.
|
||||
* System control can be pulsed to toggle some malfunctions.
|
||||
* Interface lock can be pulsed to toggle whether or not the interface can be accessed.
|
||||
*/
|
||||
|
||||
/datum/wires/rig/UpdateCut(var/index, var/mended)
|
||||
|
||||
var/obj/item/weapon/rig/rig = holder
|
||||
switch(index)
|
||||
if(RIG_SECURITY)
|
||||
if(mended)
|
||||
rig.req_access = initial(rig.req_access)
|
||||
rig.req_one_access = initial(rig.req_one_access)
|
||||
if(RIG_INTERFACE_SHOCK)
|
||||
rig.electrified = mended ? 0 : -1
|
||||
rig.shock(usr,100)
|
||||
|
||||
/datum/wires/rig/UpdatePulsed(var/index)
|
||||
|
||||
var/obj/item/weapon/rig/rig = holder
|
||||
switch(index)
|
||||
if(RIG_SECURITY)
|
||||
rig.security_check_enabled = !rig.security_check_enabled
|
||||
rig.visible_message("\The [rig] twitches as several suit locks [rig.security_check_enabled?"close":"open"].")
|
||||
if(RIG_AI_OVERRIDE)
|
||||
rig.ai_override_enabled = !rig.ai_override_enabled
|
||||
rig.visible_message("A small red light on [rig] [rig.ai_override_enabled?"goes dead":"flickers on"].")
|
||||
if(RIG_SYSTEM_CONTROL)
|
||||
rig.malfunctioning += 10
|
||||
if(rig.malfunction_delay <= 0)
|
||||
rig.malfunction_delay = 20
|
||||
rig.shock(usr,100)
|
||||
if(RIG_INTERFACE_LOCK)
|
||||
rig.interface_locked = !rig.interface_locked
|
||||
rig.visible_message("\The [rig] clicks audibly as the software interface [rig.interface_locked?"darkens":"brightens"].")
|
||||
if(RIG_INTERFACE_SHOCK)
|
||||
if(rig.electrified != -1)
|
||||
rig.electrified = 30
|
||||
rig.shock(usr,100)
|
||||
|
||||
/datum/wires/rig/CanUse(var/mob/living/L)
|
||||
var/obj/item/weapon/rig/rig = holder
|
||||
if(rig.open)
|
||||
return 1
|
||||
return 0
|
||||
19
code/modules/clothing/spacesuits/rig/suits/alien.dm
Normal file
19
code/modules/clothing/spacesuits/rig/suits/alien.dm
Normal file
@@ -0,0 +1,19 @@
|
||||
/obj/item/weapon/rig/unathi
|
||||
name = "NT breacher chassis control module"
|
||||
desc = "A cheap NT knock-off of a Unathi battle-rig. Looks like a fish, moves like a fish, steers like a cow."
|
||||
suit_type = "NT breacher"
|
||||
icon_state = "breacher_rig_cheap"
|
||||
armor = list(melee = 60, bullet = 60, laser = 60, energy = 60, bomb = 70, bio = 100, rad = 50)
|
||||
slowdown = 6
|
||||
offline_slowdown = 10
|
||||
vision_restriction = 1
|
||||
offline_vision_restriction = 2
|
||||
|
||||
/obj/item/weapon/rig/unathi/fancy
|
||||
name = "breacher chassis control module"
|
||||
desc = "An authentic Unathi breacher chassis. Huge, bulky and absurdly heavy. It must be like wearing a tank."
|
||||
suit_type = "breacher chassis"
|
||||
icon_state = "breacher_rig"
|
||||
armor = list(melee = 90, bullet = 90, laser = 90, energy = 90, bomb = 90, bio = 100, rad = 80)
|
||||
vision_restriction = 0
|
||||
offline_vision_restriction = 2
|
||||
41
code/modules/clothing/spacesuits/rig/suits/combat.dm
Normal file
41
code/modules/clothing/spacesuits/rig/suits/combat.dm
Normal file
@@ -0,0 +1,41 @@
|
||||
/obj/item/clothing/head/helmet/space/rig/combat
|
||||
light_overlay = "helmet_light_green_dual"
|
||||
|
||||
/obj/item/weapon/rig/combat
|
||||
name = "combat hardsuit control module"
|
||||
desc = "A sleek and dangerous hardsuit for active combat."
|
||||
icon_state = "security_rig"
|
||||
suit_type = "combat hardsuit"
|
||||
armor = list(melee = 80, bullet = 65, laser = 50, energy = 15, bomb = 80, bio = 100, rad = 60)
|
||||
slowdown = 1
|
||||
offline_slowdown = 3
|
||||
offline_vision_restriction = 1
|
||||
|
||||
helm_type = /obj/item/clothing/head/helmet/space/rig/combat
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/mounted,
|
||||
/obj/item/rig_module/vision/thermal,
|
||||
/obj/item/rig_module/grenade_launcher,
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/power_sink,
|
||||
/obj/item/rig_module/electrowarfare_suite,
|
||||
/obj/item/rig_module/chem_dispenser/combat
|
||||
)
|
||||
|
||||
/obj/item/weapon/rig/combat/merc
|
||||
name = "crimson hardsuit control module"
|
||||
desc = "A blood-red hardsuit featuring some fairly illegal technology."
|
||||
icon_state = "merc_rig"
|
||||
suit_type = "crimson hardsuit"
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/mounted,
|
||||
/obj/item/rig_module/vision/thermal,
|
||||
/obj/item/rig_module/grenade_launcher,
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/power_sink,
|
||||
/obj/item/rig_module/electrowarfare_suite,
|
||||
/obj/item/rig_module/chem_dispenser/combat,
|
||||
/obj/item/rig_module/fabricator/energy_net
|
||||
)
|
||||
67
code/modules/clothing/spacesuits/rig/suits/ert.dm
Normal file
67
code/modules/clothing/spacesuits/rig/suits/ert.dm
Normal file
@@ -0,0 +1,67 @@
|
||||
/obj/item/clothing/head/helmet/space/rig/ert
|
||||
light_overlay = "helmet_light_dual"
|
||||
|
||||
/obj/item/weapon/rig/ert
|
||||
name = "ERT-C hardsuit control module"
|
||||
desc = "A suit worn by the commander of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured and space ready."
|
||||
suit_type = "ERT commander"
|
||||
icon_state = "ert_commander_rig"
|
||||
siemens_coefficient = 0.6
|
||||
offline_slowdown = 3
|
||||
|
||||
helm_type = /obj/item/clothing/head/helmet/space/rig/ert
|
||||
|
||||
req_access = list(access_cent_specops)
|
||||
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100)
|
||||
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \
|
||||
/obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, \
|
||||
/obj/item/device/radio, /obj/item/device/analyzer, /obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/pulse_rifle, \
|
||||
/obj/item/weapon/gun/energy/taser, /obj/item/weapon/melee/baton, /obj/item/weapon/gun/energy/gun)
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/maneuvering_jets,
|
||||
/obj/item/rig_module/datajack,
|
||||
/obj/item/rig_module/mounted
|
||||
)
|
||||
|
||||
/obj/item/weapon/rig/ert/engineer
|
||||
name = "ERT-E suit control module"
|
||||
desc = "A suit worn by the engineering division of a NanoTrasen Emergency Response Team. Has orange highlights. Armoured and space ready."
|
||||
suit_type = "ERT engineer"
|
||||
icon_state = "ert_engineer_rig"
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/maneuvering_jets,
|
||||
/obj/item/rig_module/device/plasmacutter,
|
||||
/obj/item/rig_module/device/rcd,
|
||||
/obj/item/rig_module/foam_sprayer
|
||||
)
|
||||
|
||||
/obj/item/weapon/rig/ert/medical
|
||||
name = "ERT-M suit control module"
|
||||
desc = "A suit worn by the medical division of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready."
|
||||
suit_type = "ERT medic"
|
||||
icon_state = "ert_medical_rig"
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/maneuvering_jets,
|
||||
/obj/item/rig_module/device/healthscanner,
|
||||
/obj/item/rig_module/chem_dispenser/injector
|
||||
)
|
||||
|
||||
/obj/item/weapon/rig/ert/security
|
||||
name = "ERT-S suit control module"
|
||||
desc = "A suit worn by the security division of a NanoTrasen Emergency Response Team. Has red highlights. Armoured and space ready."
|
||||
suit_type = "ERT security"
|
||||
icon_state = "ert_security_rig"
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/maneuvering_jets,
|
||||
/obj/item/rig_module/grenade_launcher,
|
||||
/obj/item/rig_module/mounted
|
||||
)
|
||||
91
code/modules/clothing/spacesuits/rig/suits/light.dm
Normal file
91
code/modules/clothing/spacesuits/rig/suits/light.dm
Normal file
@@ -0,0 +1,91 @@
|
||||
// Light rigs are not space-capable, but don't suffer excessive slowdown or sight issues when depowered.
|
||||
/obj/item/weapon/rig/light
|
||||
name = "light suit control module"
|
||||
desc = "A lighter, less armoured rig suit."
|
||||
icon_state = "ninja_rig"
|
||||
suit_type = "light suit"
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/cell)
|
||||
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
|
||||
slowdown = 0
|
||||
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | THICKMATERIAL
|
||||
offline_slowdown = 0
|
||||
offline_vision_restriction = 0
|
||||
|
||||
chest_type = /obj/item/clothing/suit/space/rig/light
|
||||
helm_type = /obj/item/clothing/head/helmet/space/rig/light
|
||||
boot_type = /obj/item/clothing/shoes/rig/light
|
||||
glove_type = /obj/item/clothing/gloves/rig/light
|
||||
|
||||
/obj/item/clothing/suit/space/rig/light
|
||||
name = "suit"
|
||||
|
||||
/obj/item/clothing/gloves/rig/light
|
||||
name = "gloves"
|
||||
|
||||
/obj/item/clothing/shoes/rig/light
|
||||
name = "shoes"
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/light
|
||||
name = "hood"
|
||||
|
||||
/obj/item/weapon/rig/light/hacker
|
||||
name = "cybersuit control module"
|
||||
suit_type = "cyber"
|
||||
desc = "An advanced powered armour suit with many cyberwarfare enhancements."
|
||||
icon_state = "hacker_rig"
|
||||
|
||||
req_access = list(access_syndicate)
|
||||
|
||||
helm_type = /obj/item/clothing/head/helmet/space/rig/mask
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/power_sink,
|
||||
/obj/item/rig_module/datajack
|
||||
)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/mask
|
||||
name = "mask"
|
||||
flags = FPRINT | TABLEPASS | THICKMATERIAL
|
||||
|
||||
/obj/item/weapon/rig/light/ninja
|
||||
name = "ominous suit control module"
|
||||
suit_type = "ominous"
|
||||
desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins."
|
||||
icon_state = "ninja_rig"
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/cell)
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
slowdown = 0
|
||||
|
||||
req_access = list(access_syndicate)
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/teleporter,
|
||||
/obj/item/rig_module/stealth_field,
|
||||
/obj/item/rig_module/mounted/energy_blade,
|
||||
/obj/item/rig_module/vision,
|
||||
/obj/item/rig_module/voice,
|
||||
/obj/item/rig_module/fabricator/energy_net,
|
||||
/obj/item/rig_module/chem_dispenser,
|
||||
/obj/item/rig_module/grenade_launcher,
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/power_sink,
|
||||
/obj/item/rig_module/datajack,
|
||||
/obj/item/rig_module/self_destruct
|
||||
)
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/rig/light/stealth
|
||||
name = "stealth suit control module"
|
||||
suit_type = "stealth"
|
||||
desc = "A highly advanced and expensive suit designed for covert operations."
|
||||
icon_state = "ninja_rig"
|
||||
|
||||
req_access = list(access_syndicate)
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/teleporter,
|
||||
/obj/item/rig_module/stealth_field,
|
||||
/obj/item/rig_module/vision
|
||||
)
|
||||
67
code/modules/clothing/spacesuits/rig/suits/station.dm
Normal file
67
code/modules/clothing/spacesuits/rig/suits/station.dm
Normal file
@@ -0,0 +1,67 @@
|
||||
/obj/item/weapon/rig/industrial
|
||||
name = "industrial suit control module"
|
||||
suit_type = "industrial hardsuit"
|
||||
desc = "A heavy, powerful rig used by construction crews and mining corporations."
|
||||
icon_state = "engineering_rig"
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
slowdown = 3
|
||||
offline_slowdown = 10
|
||||
offline_vision_restriction = 2
|
||||
|
||||
req_access = null
|
||||
req_one_access = null
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/device/plasmacutter,
|
||||
/obj/item/rig_module/device/drill,
|
||||
/obj/item/rig_module/device/orescanner,
|
||||
/obj/item/rig_module/device/rcd,
|
||||
/obj/item/rig_module/vision/meson
|
||||
)
|
||||
|
||||
//Chief Engineer's rig. This is sort of a halfway point between the old hardsuits (voidsuits) and the rig class.
|
||||
/obj/item/weapon/rig/ce
|
||||
|
||||
name = "advanced voidsuit control module"
|
||||
suit_type = "advanced voidsuit"
|
||||
desc = "An advanced voidsuit that protects against hazardous, low pressure environments. Shines with a high polish."
|
||||
icon_state = "ce_rig"
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
slowdown = 0
|
||||
offline_slowdown = 0
|
||||
offline_vision_restriction = 0
|
||||
|
||||
req_access = list(access_ce)
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/maneuvering_jets,
|
||||
/obj/item/rig_module/device/plasmacutter,
|
||||
/obj/item/rig_module/device/rcd,
|
||||
/obj/item/rig_module/vision/meson
|
||||
)
|
||||
|
||||
boot_type = null
|
||||
glove_type = null
|
||||
|
||||
/obj/item/weapon/rig/hazmat
|
||||
|
||||
name = "AMI control module"
|
||||
suit_type = "hazmat"
|
||||
desc = "An Anomalous Material Interaction hardsuit that protects against the strangest energies the universe can throw at it."
|
||||
icon_state = "science_rig"
|
||||
armor = list(melee = 15, bullet = 15, laser = 80, energy = 80, bomb = 60, bio = 100, rad = 100)
|
||||
slowdown = 1
|
||||
offline_slowdown = 3
|
||||
offline_vision_restriction = 1
|
||||
|
||||
req_access = list(access_rd)
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/maneuvering_jets,
|
||||
/obj/item/rig_module/device/anomaly_scanner
|
||||
)
|
||||
|
||||
boot_type = null
|
||||
glove_type = null
|
||||
@@ -1,11 +1,12 @@
|
||||
//Spacesuit
|
||||
//Note: Everything in modules/clothing/spacesuits should have the entire suit grouped together.
|
||||
// Meaning the the suit is defined directly after the corrisponding helmet. Just like below!
|
||||
|
||||
/obj/item/clothing/head/helmet/space
|
||||
name = "Space helmet"
|
||||
icon_state = "space"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment."
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL | AIRTIGHT
|
||||
item_state = "space"
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
|
||||
@@ -16,6 +17,34 @@
|
||||
siemens_coefficient = 0.9
|
||||
species_restricted = list("exclude","Diona","Vox")
|
||||
|
||||
var/obj/machinery/camera/camera
|
||||
var/list/camera_networks
|
||||
|
||||
light_overlay = "helmet_light"
|
||||
brightness_on = 4
|
||||
on = 0
|
||||
|
||||
/obj/item/clothing/head/helmet/space/attack_self(mob/user)
|
||||
|
||||
if(!camera && camera_networks)
|
||||
|
||||
if(!icon_action_button)
|
||||
icon_action_button = "[icon_state]"
|
||||
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.network = camera_networks
|
||||
cameranet.removeCamera(camera)
|
||||
camera.c_tag = user.name
|
||||
user << "\blue User scanned as [camera.c_tag]. Camera activated."
|
||||
return 1
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/head/helmet/space/examine()
|
||||
..()
|
||||
if(camera_networks && get_dist(usr,src) <= 1)
|
||||
usr << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
|
||||
|
||||
/obj/item/clothing/suit/space
|
||||
name = "Space suit"
|
||||
desc = "A suit that protects against low pressure environments. \"NSS EXODUS\" is written in large block letters on the back."
|
||||
|
||||
@@ -138,7 +138,6 @@
|
||||
icon_state = "syndicate-black-red"
|
||||
item_state = "syndicate-black-red"
|
||||
|
||||
|
||||
//Black with yellow/red engineering syndicate space suit
|
||||
/obj/item/clothing/head/helmet/space/syndicate/black/engie
|
||||
name = "Black Space Helmet"
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
|
||||
//NASA Voidsuit
|
||||
/obj/item/clothing/head/helmet/space/nasavoid
|
||||
name = "NASA Void Helmet"
|
||||
desc = "A high tech, NASA Centcom branch designed, dark red space suit helmet. Used for AI satellite maintenance."
|
||||
icon_state = "void"
|
||||
item_state = "void"
|
||||
|
||||
/obj/item/clothing/suit/space/nasavoid
|
||||
name = "NASA Voidsuit"
|
||||
icon_state = "void"
|
||||
item_state = "void"
|
||||
desc = "A high tech, NASA Centcom branch designed, dark red Space suit. Used for AI satellite maintenance."
|
||||
slowdown = 1
|
||||
24
code/modules/clothing/spacesuits/void/merc.dm
Normal file
24
code/modules/clothing/spacesuits/void/merc.dm
Normal file
@@ -0,0 +1,24 @@
|
||||
//Syndicate rig
|
||||
/obj/item/clothing/head/helmet/space/void/merc
|
||||
name = "blood-red voidsuit helmet"
|
||||
desc = "An advanced helmet designed for work in special operations. Property of Gorlex Marauders."
|
||||
icon_state = "rig0-syndie"
|
||||
item_state = "syndie_helm"
|
||||
item_color = "syndie"
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 60)
|
||||
siemens_coefficient = 0.6
|
||||
species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox")
|
||||
camera_networks = list("NUKE")
|
||||
light_overlay = "helmet_light_green" //todo: species-specific light overlays
|
||||
|
||||
/obj/item/clothing/suit/space/void/merc
|
||||
icon_state = "rig-syndie"
|
||||
name = "blood-red voidsuit"
|
||||
desc = "An advanced suit that protects against injuries during special operations. Property of Gorlex Marauders."
|
||||
item_state = "syndie_voidsuit"
|
||||
slowdown = 1
|
||||
w_class = 3
|
||||
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs)
|
||||
siemens_coefficient = 0.6
|
||||
species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox")
|
||||
90
code/modules/clothing/spacesuits/void/station.dm
Normal file
90
code/modules/clothing/spacesuits/void/station.dm
Normal file
@@ -0,0 +1,90 @@
|
||||
// Station voidsuits
|
||||
//Engineering rig
|
||||
/obj/item/clothing/head/helmet/space/void/engineering
|
||||
name = "engineering voidsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding."
|
||||
icon_state = "rig0-engineering"
|
||||
item_state = "eng_helm"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80)
|
||||
|
||||
/obj/item/clothing/suit/space/void/engineering
|
||||
name = "engineering voidsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding."
|
||||
icon_state = "rig-engineering"
|
||||
item_state = "eng_voidsuit"
|
||||
slowdown = 1
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
|
||||
|
||||
//Mining rig
|
||||
/obj/item/clothing/head/helmet/space/void/mining
|
||||
name = "mining voidsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has reinforced plating."
|
||||
icon_state = "rig0-mining"
|
||||
item_state = "mining_helm"
|
||||
item_color = "mining"
|
||||
armor = list(melee = 50, bullet = 5, laser = 20,energy = 5, bomb = 55, bio = 100, rad = 20)
|
||||
light_overlay = "helmet_light_dual"
|
||||
|
||||
/obj/item/clothing/suit/space/void/mining
|
||||
icon_state = "rig-mining"
|
||||
name = "mining voidsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has reinforced plating."
|
||||
item_state = "mining_voidsuit"
|
||||
armor = list(melee = 50, bullet = 5, laser = 20,energy = 5, bomb = 55, bio = 100, rad = 20)
|
||||
|
||||
//Medical Rig
|
||||
/obj/item/clothing/head/helmet/space/void/medical
|
||||
name = "medical voidsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has minor radiation shielding."
|
||||
icon_state = "rig0-medical"
|
||||
item_state = "medical_helm"
|
||||
item_color = "medical"
|
||||
armor = list(melee = 30, bullet = 5, laser = 20,energy = 5, bomb = 25, bio = 100, rad = 50)
|
||||
|
||||
/obj/item/clothing/suit/space/void/medical
|
||||
icon_state = "rig-medical"
|
||||
name = "medical voidsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has minor radiation shielding."
|
||||
item_state = "medical_voidsuit"
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
|
||||
armor = list(melee = 30, bullet = 5, laser = 20,energy = 5, bomb = 25, bio = 100, rad = 50)
|
||||
|
||||
//Security
|
||||
/obj/item/clothing/head/helmet/space/void/security
|
||||
name = "security voidsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has an additional layer of armor."
|
||||
icon_state = "rig0-sec"
|
||||
item_state = "sec_helm"
|
||||
item_color = "sec"
|
||||
armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)
|
||||
siemens_coefficient = 0.7
|
||||
light_overlay = "helmet_light_dual"
|
||||
|
||||
/obj/item/clothing/suit/space/void/security
|
||||
icon_state = "rig-sec"
|
||||
name = "security voidsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has an additional layer of armor."
|
||||
item_state = "sec_voidsuit"
|
||||
armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton)
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
//Atmospherics Rig (BS12)
|
||||
/obj/item/clothing/head/helmet/space/void/atmos
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environments. Has improved thermal protection and minor radiation shielding."
|
||||
name = "atmospherics voidsuit helmet"
|
||||
icon_state = "rig0-atmos"
|
||||
item_state = "atmos_helm"
|
||||
item_color = "atmos"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 50)
|
||||
max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
light_overlay = "helmet_light_dual"
|
||||
|
||||
/obj/item/clothing/suit/space/void/atmos
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has improved thermal protection and minor radiation shielding."
|
||||
icon_state = "rig-atmos"
|
||||
name = "atmos voidsuit"
|
||||
item_state = "atmos_voidsuit"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 50)
|
||||
max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
52
code/modules/clothing/spacesuits/void/void.dm
Normal file
52
code/modules/clothing/spacesuits/void/void.dm
Normal file
@@ -0,0 +1,52 @@
|
||||
//NASA Voidsuit
|
||||
/obj/item/clothing/head/helmet/space/void
|
||||
name = "void helmet"
|
||||
desc = "A high-tech dark red space suit helmet. Used for AI satellite maintenance."
|
||||
icon_state = "void"
|
||||
item_state = "void"
|
||||
|
||||
heat_protection = HEAD
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
//Species-specific stuff.
|
||||
species_restricted = list("exclude","Unathi","Tajara","Skrell","Diona","Vox")
|
||||
sprite_sheets_refit = list(
|
||||
"Unathi" = 'icons/mob/species/unathi/helmet.dmi',
|
||||
"Tajara" = 'icons/mob/species/tajaran/helmet.dmi',
|
||||
"Skrell" = 'icons/mob/species/skrell/helmet.dmi',
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Unathi" = 'icons/obj/clothing/species/unathi/hats.dmi',
|
||||
"Tajara" = 'icons/obj/clothing/species/tajaran/hats.dmi',
|
||||
"Skrell" = 'icons/obj/clothing/species/skrell/hats.dmi',
|
||||
)
|
||||
|
||||
light_overlay = "helmet_light"
|
||||
|
||||
/obj/item/clothing/suit/space/void
|
||||
name = "voidsuit"
|
||||
icon_state = "void"
|
||||
item_state = "void"
|
||||
desc = "A high-tech dark red space suit. Used for AI satellite maintenance."
|
||||
slowdown = 1
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit)
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
species_restricted = list("exclude","Unathi","Tajara","Diona","Vox")
|
||||
sprite_sheets_refit = list(
|
||||
"Unathi" = 'icons/mob/species/unathi/suit.dmi',
|
||||
"Tajara" = 'icons/mob/species/tajaran/suit.dmi',
|
||||
"Skrell" = 'icons/mob/species/skrell/suit.dmi',
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Unathi" = 'icons/obj/clothing/species/unathi/suits.dmi',
|
||||
"Tajara" = 'icons/obj/clothing/species/tajaran/suits.dmi',
|
||||
"Skrell" = 'icons/obj/clothing/species/skrell/suits.dmi',
|
||||
)
|
||||
|
||||
//Breach thresholds, should ideally be inherited by most (if not all) voidsuits.
|
||||
breach_threshold = 18
|
||||
can_breach = 1
|
||||
25
code/modules/clothing/spacesuits/void/wizard.dm
Normal file
25
code/modules/clothing/spacesuits/void/wizard.dm
Normal file
@@ -0,0 +1,25 @@
|
||||
//Wizard Rig
|
||||
/obj/item/clothing/head/helmet/space/void/wizard
|
||||
name = "gem-encrusted voidsuit helmet"
|
||||
desc = "A bizarre gem-encrusted helmet that radiates magical energies."
|
||||
icon_state = "rig0-wiz"
|
||||
item_state = "wiz_helm"
|
||||
item_color = "wiz"
|
||||
unacidable = 1 //No longer shall our kind be foiled by lone chemists with spray bottles!
|
||||
armor = list(melee = 40, bullet = 20, laser = 20,energy = 20, bomb = 35, bio = 100, rad = 60)
|
||||
siemens_coefficient = 0.7
|
||||
sprite_sheets_refit = null
|
||||
sprite_sheets_obj = null
|
||||
|
||||
/obj/item/clothing/suit/space/void/wizard
|
||||
icon_state = "rig-wiz"
|
||||
name = "gem-encrusted voidsuit"
|
||||
desc = "A bizarre gem-encrusted suit that radiates magical energies."
|
||||
item_state = "wiz_voidsuit"
|
||||
slowdown = 1
|
||||
w_class = 3
|
||||
unacidable = 1
|
||||
armor = list(melee = 40, bullet = 20, laser = 20,energy = 20, bomb = 35, bio = 100, rad = 60)
|
||||
siemens_coefficient = 0.7
|
||||
sprite_sheets_refit = null
|
||||
sprite_sheets_obj = null
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
var/blocked = list(/obj/item/clothing/suit/chameleon, /obj/item/clothing/suit/space/space_ninja,
|
||||
var/blocked = list(/obj/item/clothing/suit/chameleon,
|
||||
/obj/item/clothing/suit/golem, /obj/item/clothing/suit/cyborg_suit, /obj/item/clothing/suit/justice,
|
||||
/obj/item/clothing/suit/greatcoat)//Prevent infinite loops and bad suits.
|
||||
for(var/U in typesof(/obj/item/clothing/suit)-blocked)
|
||||
|
||||
@@ -533,19 +533,23 @@
|
||||
var/suit_icon // Sets suit icon_state and item_state.
|
||||
var/helmet_color // Sets item_color.
|
||||
var/uses = 2 // Uses before the kit deletes itself.
|
||||
var/new_light_overlay
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/attackby(var/obj/item/O as obj, mob/user as mob)
|
||||
/obj/item/clothing/head/helmet/space/void/attackby(var/obj/item/O as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
if(istype(O,/obj/item/device/kit/suit/fluff))
|
||||
|
||||
var/obj/item/device/kit/suit/fluff/kit = O
|
||||
name = "[kit.new_name] hardsuit helmet"
|
||||
name = "[kit.new_name] suit helmet"
|
||||
desc = kit.new_helmet_desc
|
||||
icon_state = kit.helmet_icon
|
||||
item_state = kit.helmet_icon
|
||||
item_color = kit.helmet_color
|
||||
|
||||
if(kit.new_light_overlay)
|
||||
light_overlay = kit.new_light_overlay
|
||||
|
||||
user << "You set about modifying the helmet into [src]."
|
||||
playsound(user.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
|
||||
@@ -554,13 +558,13 @@
|
||||
user.drop_item()
|
||||
del(O)
|
||||
|
||||
/obj/item/clothing/suit/space/rig/attackby(var/obj/item/O as obj, mob/user as mob)
|
||||
/obj/item/clothing/suit/space/void/attackby(var/obj/item/O as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
if(istype(O,/obj/item/device/kit/suit/fluff))
|
||||
|
||||
var/obj/item/device/kit/suit/fluff/kit = O
|
||||
name = "[kit.new_name] hardsuit"
|
||||
name = "[kit.new_name] voidsuit"
|
||||
desc = kit.new_suit_desc
|
||||
icon_state = kit.suit_icon
|
||||
item_state = kit.suit_icon
|
||||
@@ -608,6 +612,7 @@
|
||||
helmet_icon = "rig0-hazardhardsuit"
|
||||
suit_icon = "rig-hazardhardsuit"
|
||||
helmet_color = "hazardhardsuit"
|
||||
new_light_overlay = "helmet_light_dual"
|
||||
|
||||
//////// Meat Hook - Korom Bhararaya - Matthew951 ////////////////////////
|
||||
|
||||
@@ -1493,4 +1498,4 @@
|
||||
"rubs against [bff].",
|
||||
"purrs."))
|
||||
else if (bff.health <= 50)
|
||||
if (prob(10)) audible_emote("meows anxiously.")
|
||||
if (prob(10)) audible_emote("meows anxiously.")
|
||||
|
||||
@@ -346,7 +346,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
|
||||
/obj/item/weapon/hand_tele, /obj/item/weapon/rcd, /obj/item/weapon/tank/jetpack,\
|
||||
/obj/item/clothing/under/rank/captain, /obj/item/device/aicard,\
|
||||
/obj/item/clothing/shoes/magboots, /obj/item/blueprints, /obj/item/weapon/disk/nuclear,\
|
||||
/obj/item/clothing/suit/space/nasavoid, /obj/item/weapon/tank)
|
||||
/obj/item/clothing/suit/space/void, /obj/item/weapon/tank)
|
||||
|
||||
/proc/fake_attack(var/mob/living/target)
|
||||
// var/list/possible_clones = new/list()
|
||||
|
||||
@@ -15,7 +15,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
icon_state = "facehugger"
|
||||
item_state = "facehugger"
|
||||
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
|
||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | MASKINTERNALS
|
||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | AIRTIGHT
|
||||
body_parts_covered = FACE|EYES
|
||||
throw_range = 5
|
||||
|
||||
|
||||
@@ -102,12 +102,6 @@
|
||||
emote("deathgasp") //let the world KNOW WE ARE DEAD // Doing this with the deathgasp emote seems odd.
|
||||
if(species && species.death_sound) playsound(loc, species.death_sound, 80, 1, 1)
|
||||
|
||||
//For ninjas exploding when they die.
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/space/space_ninja) && wear_suit:s_initialized )
|
||||
src << browse(null, "window=spideros")//Just in case.
|
||||
var/location = loc
|
||||
explosion(location, 0, 0, 3, 4)
|
||||
|
||||
update_canmove()
|
||||
if(client) blind.layer = 0
|
||||
|
||||
|
||||
@@ -69,15 +69,18 @@
|
||||
var/datum/organ/internal/xenos/plasmavessel/P = internal_organs_by_name["plasma vessel"]
|
||||
if(P)
|
||||
stat(null, "Phoron Stored: [P.stored_plasma]/[P.max_plasma]")
|
||||
|
||||
if(back && istype(back,/obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/suit = back
|
||||
var/cell_status = "ERROR"
|
||||
if(suit.cell) cell_status = "[suit.cell.charge]/[suit.cell.maxcharge]"
|
||||
stat(null, "Suit charge: [cell_status]")
|
||||
|
||||
if(mind)
|
||||
if(mind.changeling)
|
||||
stat("Chemical Storage", mind.changeling.chem_charges)
|
||||
stat("Genetic Damage Time", mind.changeling.geneticdamage)
|
||||
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized)
|
||||
stat("Energy Charge", round(wear_suit:cell:charge/100))
|
||||
|
||||
|
||||
/mob/living/carbon/human/ex_act(severity)
|
||||
if(!blinded)
|
||||
flick("flash", flash)
|
||||
@@ -677,6 +680,10 @@
|
||||
if(istype(src.head, /obj/item/clothing/head/welding))
|
||||
if(!src.head:up)
|
||||
number += 2
|
||||
if(istype(back, /obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/O = back
|
||||
if(O.helmet && O.helmet == head && (O.helmet.body_parts_covered & EYES))
|
||||
number += 2
|
||||
if(istype(src.head, /obj/item/clothing/head/helmet/space))
|
||||
number += 2
|
||||
if(istype(src.glasses, /obj/item/clothing/glasses/thermal))
|
||||
@@ -1267,4 +1274,4 @@
|
||||
var/datum/organ/internal/eyes = internal_organs_by_name["eyes"]
|
||||
if(eyes && istype(eyes) && !eyes.status & ORGAN_CUT_AWAY)
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -355,12 +355,11 @@ This function restores all organs.
|
||||
if ((damage > 25 && prob(20)) || (damage > 50 && prob(60)))
|
||||
emote("scream")
|
||||
|
||||
|
||||
..(damage, damagetype, def_zone, blocked)
|
||||
return 1
|
||||
|
||||
//Handle BRUTE and BURN damage
|
||||
handle_suit_punctures(damagetype, damage)
|
||||
handle_suit_punctures(damagetype, damage, def_zone)
|
||||
|
||||
if(blocked >= 2) return 0
|
||||
|
||||
|
||||
@@ -414,13 +414,19 @@ emp_act
|
||||
w_uniform.add_blood(source)
|
||||
update_inv_w_uniform(0)
|
||||
|
||||
/mob/living/carbon/human/proc/handle_suit_punctures(var/damtype, var/damage)
|
||||
/mob/living/carbon/human/proc/handle_suit_punctures(var/damtype, var/damage, var/def_zone)
|
||||
|
||||
if(!wear_suit) return
|
||||
if(!istype(wear_suit,/obj/item/clothing/suit/space)) return
|
||||
// Tox and oxy don't matter to suits.
|
||||
if(damtype != BURN && damtype != BRUTE) return
|
||||
|
||||
var/obj/item/clothing/suit/space/SS = wear_suit
|
||||
var/penetrated_dam = max(0,(damage - SS.breach_threshold)) // - SS.damage)) - Consider uncommenting this if suits seem too hardy on dev.
|
||||
// The rig might soak this hit, if we're wearing one.
|
||||
if(back && istype(back,/obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/rig = back
|
||||
rig.take_hit(damage)
|
||||
|
||||
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
|
||||
// We may also be taking a suit breach.
|
||||
if(!wear_suit) return
|
||||
if(!istype(wear_suit,/obj/item/clothing/suit/space)) return
|
||||
var/obj/item/clothing/suit/space/SS = wear_suit
|
||||
var/penetrated_dam = max(0,(damage - SS.breach_threshold))
|
||||
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
|
||||
@@ -64,20 +64,28 @@
|
||||
return (tally+config.human_delay)
|
||||
|
||||
/mob/living/carbon/human/Process_Spacemove(var/check_drift = 0)
|
||||
//Can we act
|
||||
//Can we act?
|
||||
if(restrained()) return 0
|
||||
|
||||
//Do we have a working jetpack
|
||||
if(istype(back, /obj/item/weapon/tank/jetpack))
|
||||
var/obj/item/weapon/tank/jetpack/J = back
|
||||
if(((!check_drift) || (check_drift && J.stabilization_on)) && (!lying) && (J.allow_thrust(0.01, src)))
|
||||
//Do we have a working jetpack?
|
||||
var/obj/item/weapon/tank/jetpack/thrust
|
||||
if(back)
|
||||
if(istype(back,/obj/item/weapon/tank/jetpack))
|
||||
thrust = back
|
||||
else if(istype(back,/obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/rig = back
|
||||
for(var/obj/item/rig_module/maneuvering_jets/module in rig.installed_modules)
|
||||
thrust = module.jets
|
||||
break
|
||||
|
||||
if(thrust)
|
||||
if(((!check_drift) || (check_drift && thrust.stabilization_on)) && (!lying) && (thrust.allow_thrust(0.01, src)))
|
||||
inertia_dir = 0
|
||||
return 1
|
||||
// if(!check_drift && J.allow_thrust(0.01, src))
|
||||
// return 1
|
||||
|
||||
//If no working jetpack then use the other checks
|
||||
if(..()) return 1
|
||||
if(..())
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
var/temperature_alert = 0
|
||||
var/in_stasis = 0
|
||||
|
||||
|
||||
/mob/living/carbon/human/Life()
|
||||
|
||||
|
||||
@@ -423,10 +422,16 @@
|
||||
|
||||
proc/get_breath_from_internal(volume_needed)
|
||||
if(internal)
|
||||
if (!contents.Find(internal))
|
||||
internal = null
|
||||
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
|
||||
|
||||
var/obj/item/weapon/tank/rig_supply
|
||||
if(istype(back,/obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/rig = back
|
||||
if(!rig.offline && (rig.air_supply && internal == rig.air_supply))
|
||||
rig_supply = rig.air_supply
|
||||
|
||||
if (!rig_supply && (!contents.Find(internal) || !((wear_mask && (wear_mask.flags & AIRTIGHT)) || (head && (head.flags & AIRTIGHT)))))
|
||||
internal = null
|
||||
|
||||
if(internal)
|
||||
return internal.remove_air_volume(volume_needed)
|
||||
else if(internals)
|
||||
@@ -1180,6 +1185,14 @@
|
||||
|
||||
|
||||
//Eyes
|
||||
//Check rig first because it's two-check and other checks will override it.
|
||||
if(istype(back,/obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/O = back
|
||||
if(O.helmet && O.helmet == head && (O.helmet.body_parts_covered & EYES))
|
||||
if((O.offline && O.offline_vision_restriction == 2) || (!O.offline && O.vision_restriction == 2))
|
||||
blinded = 1
|
||||
|
||||
// Check everything else.
|
||||
if(!species.has_organ["eyes"]) // Presumably if a species has no eyes, they see via something else.
|
||||
eye_blind = 0
|
||||
blinded = 0
|
||||
@@ -1356,11 +1369,14 @@
|
||||
seer = 0
|
||||
|
||||
var/tmp/glasses_processed = 0
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja))
|
||||
var/obj/item/clothing/mask/gas/voice/space_ninja/O = wear_mask
|
||||
glasses_processed = 1
|
||||
process_glasses(O.ninja_vision.glasses)
|
||||
if(glasses)
|
||||
var/obj/item/weapon/rig/rig = back
|
||||
if(istype(rig) && rig.visor)
|
||||
if(!rig.helmet || (head && rig.helmet == head))
|
||||
if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses)
|
||||
glasses_processed = 1
|
||||
process_glasses(rig.visor.vision.glasses)
|
||||
|
||||
if(glasses && !glasses_processed)
|
||||
glasses_processed = 1
|
||||
process_glasses(glasses)
|
||||
|
||||
@@ -1470,19 +1486,22 @@
|
||||
|
||||
var/masked = 0
|
||||
|
||||
if( istype(head, /obj/item/clothing/head/welding) || istype(head, /obj/item/clothing/head/helmet/space/unathi))
|
||||
var/obj/item/clothing/head/welding/O = head
|
||||
if(!O.up && tinted_weldhelh)
|
||||
client.screen += global_hud.darkMask
|
||||
masked = 1
|
||||
|
||||
if(!masked && istype(glasses, /obj/item/clothing/glasses/welding) )
|
||||
if(!masked && istype(glasses, /obj/item/clothing/glasses/welding))
|
||||
var/obj/item/clothing/glasses/welding/O = glasses
|
||||
if(!O.up && tinted_weldhelh)
|
||||
client.screen += global_hud.darkMask
|
||||
client.screen |= global_hud.darkMask
|
||||
masked = 1
|
||||
|
||||
if(!masked && istype(back, /obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/O = back
|
||||
// Ugh, why is this done on a case by case basis? Why is there no flag for causing weldervision?
|
||||
if(O.helmet && O.helmet == head && (O.helmet.body_parts_covered & EYES))
|
||||
if((O.offline && O.offline_vision_restriction == 1) || (!O.offline && O.vision_restriction == 1))
|
||||
client.screen |= global_hud.darkMask
|
||||
|
||||
if(machine)
|
||||
if(!machine.check_eye(src)) reset_view(null)
|
||||
if(!machine.check_eye(src))
|
||||
reset_view(null)
|
||||
else
|
||||
var/isRemoteObserve = 0
|
||||
if((mRemote in mutations) && remoteview_target)
|
||||
|
||||
@@ -202,12 +202,22 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/GetVoice()
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
var/obj/item/clothing/mask/gas/voice/V = src.wear_mask
|
||||
if(V.vchange)
|
||||
return V.voice
|
||||
else
|
||||
return name
|
||||
|
||||
var/voice_sub
|
||||
if(istype(back,/obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/rig = back
|
||||
// todo: fix this shit
|
||||
if(rig.speech && rig.speech.voice_holder && rig.speech.voice_holder.active && rig.speech.voice_holder.voice)
|
||||
voice_sub = rig.speech.voice_holder.voice
|
||||
else
|
||||
for(var/obj/item/gear in list(wear_mask,wear_suit,head))
|
||||
if(!gear)
|
||||
continue
|
||||
var/obj/item/voice_changer/changer = locate() in gear
|
||||
if(changer && changer.active && changer.voice)
|
||||
voice_sub = changer.voice
|
||||
if(voice_sub)
|
||||
return voice_sub
|
||||
if(mind && mind.changeling && mind.changeling.mimicing)
|
||||
return mind.changeling.mimicing
|
||||
if(GetSpecialVoice())
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon_key is [species.race_key][g][husk][fat][hulk][skeleton][s_tone]
|
||||
*/
|
||||
var/global/list/human_icon_cache = list()
|
||||
var/global/list/light_overlay_cache = list()
|
||||
|
||||
///////////////////////
|
||||
//UPDATE_ICONS SYSTEM//
|
||||
@@ -729,6 +730,11 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
bloodsies.color = head.blood_color
|
||||
standing.overlays += bloodsies
|
||||
|
||||
if(istype(head,/obj/item/clothing/head))
|
||||
var/obj/item/clothing/head/hat = head
|
||||
if(hat.on && light_overlay_cache["[hat.light_overlay]"])
|
||||
standing.overlays |= light_overlay_cache["[hat.light_overlay]"]
|
||||
|
||||
overlays_standing[HEAD_LAYER] = standing
|
||||
|
||||
else
|
||||
@@ -753,10 +759,12 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_wear_suit(var/update_icons=1)
|
||||
|
||||
if( wear_suit && istype(wear_suit, /obj/item/clothing/suit) ) //TODO check this
|
||||
wear_suit.screen_loc = ui_oclothing //TODO
|
||||
|
||||
var/image/standing
|
||||
|
||||
if(wear_suit.icon_override)
|
||||
standing = image("icon" = wear_suit.icon_override, "icon_state" = "[wear_suit.icon_state]")
|
||||
else if(wear_suit.sprite_sheets && wear_suit.sprite_sheets[species.name])
|
||||
@@ -819,8 +827,12 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
/mob/living/carbon/human/update_inv_back(var/update_icons=1)
|
||||
if(back)
|
||||
back.screen_loc = ui_back //TODO
|
||||
var/obj/item/weapon/rig/rig = back
|
||||
if(back.icon_override)
|
||||
overlays_standing[BACK_LAYER] = image("icon" = back.icon_override, "icon_state" = "[back.icon_state]")
|
||||
//If this is a rig and a mob_icon is set, it will take species into account in the rig update_icon() proc.
|
||||
else if(istype(rig) && !rig.offline && rig.mob_icon)
|
||||
overlays_standing[BACK_LAYER] = rig.mob_icon
|
||||
else if(back.sprite_sheets && back.sprite_sheets[species.name])
|
||||
overlays_standing[BACK_LAYER] = image("icon" = back.sprite_sheets[species.name], "icon_state" = "[back.icon_state]")
|
||||
else
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
|
||||
|
||||
log_whisper("[src.name]/[src.key] : [message]")
|
||||
|
||||
if (src.client)
|
||||
@@ -21,17 +21,17 @@
|
||||
|
||||
if (src.stat)
|
||||
return
|
||||
|
||||
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //made consistent with say
|
||||
|
||||
if(name != GetVoice())
|
||||
alt_name = "(as [get_id_name("Unknown")])"
|
||||
|
||||
|
||||
//parse the language code and consume it
|
||||
var/datum/language/speaking = parse_language(message)
|
||||
if (speaking)
|
||||
message = copytext(message,3)
|
||||
|
||||
|
||||
whisper_say(message, speaking, alt_name)
|
||||
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
|
||||
if (speaking)
|
||||
verb = speaking.speech_verb + pick(" quietly", " softly")
|
||||
|
||||
|
||||
message = capitalize(trim(message))
|
||||
|
||||
|
||||
//TODO: handle_speech_problems for silent
|
||||
if (!message || silent || miming)
|
||||
return
|
||||
|
||||
|
||||
// Mute disability
|
||||
//TODO: handle_speech_problems
|
||||
if (src.sdisabilities & MUTE)
|
||||
@@ -61,7 +61,21 @@
|
||||
return
|
||||
|
||||
//looks like this only appears in whisper. Should it be elsewhere as well? Maybe handle_speech_problems?
|
||||
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown")
|
||||
var/voice_sub
|
||||
if(istype(back,/obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/rig = back
|
||||
// todo: fix this shit
|
||||
if(rig.speech && rig.speech.voice_holder && rig.speech.voice_holder.active && rig.speech.voice_holder.voice)
|
||||
voice_sub = rig.speech.voice_holder.voice
|
||||
else
|
||||
for(var/obj/item/gear in list(wear_mask,wear_suit,head))
|
||||
if(!gear)
|
||||
continue
|
||||
var/obj/item/voice_changer/changer = locate() in gear
|
||||
if(changer && changer.active && changer.voice)
|
||||
voice_sub = changer.voice
|
||||
|
||||
if(voice_sub == "Unknown")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
var/list/temp_message = text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
@@ -86,20 +100,20 @@
|
||||
|
||||
var/list/listening = hearers(message_range, src)
|
||||
listening |= src
|
||||
|
||||
|
||||
//ghosts
|
||||
for (var/mob/M in dead_mob_list) //does this include players who joined as observers as well?
|
||||
if (!(M.client))
|
||||
continue
|
||||
if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS))
|
||||
listening |= M
|
||||
|
||||
|
||||
//Pass whispers on to anything inside the immediate listeners.
|
||||
for(var/mob/L in listening)
|
||||
for(var/mob/C in L.contents)
|
||||
if(istype(C,/mob/living))
|
||||
listening += C
|
||||
|
||||
|
||||
//pass on the message to objects that can hear us.
|
||||
for (var/obj/O in view(message_range, src))
|
||||
spawn (0)
|
||||
@@ -119,17 +133,17 @@
|
||||
var/speech_bubble_test = say_test(message)
|
||||
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
|
||||
spawn(30) del(speech_bubble)
|
||||
|
||||
|
||||
for(var/mob/M in listening)
|
||||
M << speech_bubble
|
||||
M.hear_say(message, verb, speaking, alt_name, italics, src)
|
||||
|
||||
|
||||
if (eavesdropping.len)
|
||||
var/new_message = stars(message) //hopefully passing the message twice through stars() won't hurt... I guess if you already don't understand the language, when they speak it too quietly to hear normally you would be able to catch even less.
|
||||
for(var/mob/M in eavesdropping)
|
||||
M << speech_bubble
|
||||
M.hear_say(new_message, verb, speaking, alt_name, italics, src)
|
||||
|
||||
|
||||
if (watching.len)
|
||||
var/rendered = "<span class='game say'><span class='name'>[src.name]</span> whispers something.</span>"
|
||||
for (var/mob/M in watching)
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
if(internal)
|
||||
if (!contents.Find(internal))
|
||||
internal = null
|
||||
if (!wear_mask || !(wear_mask.flags|MASKINTERNALS) )
|
||||
if (!(wear_mask && (wear_mask.flags & AIRTIGHT)))
|
||||
internal = null
|
||||
if(internal)
|
||||
if (internals)
|
||||
|
||||
@@ -305,16 +305,19 @@ var/list/ai_verbs_default = list(
|
||||
//usr <<"You can only change your display once!"
|
||||
//return
|
||||
|
||||
|
||||
// displays the malf_ai information if the AI is the malf
|
||||
/mob/living/silicon/ai/show_malf_ai()
|
||||
/mob/living/silicon/ai/proc/is_malf()
|
||||
if(ticker.mode.name == "AI malfunction")
|
||||
var/datum/game_mode/malfunction/malf = ticker.mode
|
||||
for (var/datum/mind/malfai in malf.malf_ai)
|
||||
if (mind == malfai) // are we the evil one?
|
||||
if (malf.apcs >= 3)
|
||||
stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/(malf.apcs/3), 0)] seconds")
|
||||
if (mind == malfai)
|
||||
return malf
|
||||
return 0
|
||||
|
||||
// displays the malf_ai information if the AI is the malf
|
||||
/mob/living/silicon/ai/show_malf_ai()
|
||||
var/datum/game_mode/malfunction/malf = is_malf()
|
||||
if(malf && malf.apcs >= 3)
|
||||
stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/(malf.apcs/3), 0)] seconds")
|
||||
|
||||
/mob/living/silicon/ai/proc/ai_alerts()
|
||||
set category = "AI Commands"
|
||||
@@ -506,7 +509,7 @@ var/list/ai_verbs_default = list(
|
||||
else
|
||||
src << "\red System error. Cannot locate [html_decode(href_list["trackname"])]."
|
||||
return
|
||||
|
||||
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/meteorhit(obj/O as obj)
|
||||
@@ -579,7 +582,6 @@ var/list/ai_verbs_default = list(
|
||||
//src.cameraFollow = null
|
||||
src.view_core()
|
||||
|
||||
|
||||
//Replaces /mob/living/silicon/ai/verb/change_network() in ai.dm & camera.dm
|
||||
//Adds in /mob/living/silicon/ai/proc/ai_network_change() instead
|
||||
//Addition by Mord_Sith to define AI's network change ability
|
||||
@@ -738,7 +740,12 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
|
||||
/mob/living/silicon/ai/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(istype(W, /obj/item/device/aicard))
|
||||
|
||||
var/obj/item/device/aicard/card = W
|
||||
card.grab_ai(src, user)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
if(anchored)
|
||||
user.visible_message("\blue \The [user] starts to unbolt \the [src] from the plating...")
|
||||
if(!do_after(user,40))
|
||||
|
||||
@@ -52,7 +52,8 @@
|
||||
spawn( 0 )
|
||||
O.mode = 2
|
||||
if (istype(loc, /obj/item/device/aicard))
|
||||
loc.icon_state = "aicard-404"
|
||||
var/obj/item/device/aicard/card = loc
|
||||
card.update_icon()
|
||||
|
||||
tod = worldtime2text() //weasellos time of death patch
|
||||
if(mind) mind.store_memory("Time of death: [tod]", 0)
|
||||
|
||||
@@ -284,19 +284,20 @@
|
||||
return
|
||||
|
||||
last_special = world.time + 100
|
||||
canmove = 1
|
||||
|
||||
//I'm not sure how much of this is necessary, but I would rather avoid issues.
|
||||
if(istype(card.loc,/mob))
|
||||
if(istype(card.loc,/obj/item/rig_module))
|
||||
src << "There is no room to unfold inside this rig module. You're good and stuck."
|
||||
return 0
|
||||
else if(istype(card.loc,/mob))
|
||||
var/mob/holder = card.loc
|
||||
holder.drop_from_inventory(card)
|
||||
else if(istype(card.loc,/obj/item/clothing/suit/space/space_ninja))
|
||||
var/obj/item/clothing/suit/space/space_ninja/holder = card.loc
|
||||
holder.pai = null
|
||||
else if(istype(card.loc,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/holder = card.loc
|
||||
holder.pai = null
|
||||
|
||||
canmove = 1
|
||||
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
src.client.eye = src
|
||||
src.forceMove(get_turf(card))
|
||||
|
||||
@@ -78,6 +78,24 @@ var/list/robot_verbs_default = list(
|
||||
var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
|
||||
var/braintype = "Cyborg"
|
||||
|
||||
/mob/living/silicon/robot/drain_power(var/drain_check)
|
||||
|
||||
if(drain_check)
|
||||
return 1
|
||||
|
||||
if(!cell || !cell.charge)
|
||||
return 0
|
||||
|
||||
if(cell.charge)
|
||||
src << "<span class='danger'>Warning: Unauthorized access through power channel 12 detected.</span>"
|
||||
var/drained_power = rand(200,400)
|
||||
if(cell.charge < drained_power)
|
||||
drained_power = cell.charge
|
||||
cell.use(drained_power)
|
||||
return drained_power
|
||||
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/New(loc,var/syndie = 0,var/unfinished = 0)
|
||||
spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
|
||||
@@ -103,12 +103,12 @@
|
||||
/obj/effect/landmark/mobcorpse/syndicatecommando
|
||||
name = "Syndicate Commando"
|
||||
corpseuniform = /obj/item/clothing/under/syndicate
|
||||
corpsesuit = /obj/item/clothing/suit/space/rig/syndi
|
||||
corpsesuit = /obj/item/clothing/suit/space/void/merc
|
||||
corpseshoes = /obj/item/clothing/shoes/swat
|
||||
corpsegloves = /obj/item/clothing/gloves/swat
|
||||
corpseradio = /obj/item/device/radio/headset
|
||||
corpsemask = /obj/item/clothing/mask/gas/syndicate
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/rig/syndi
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/void/merc
|
||||
corpseback = /obj/item/weapon/tank/jetpack/oxygen
|
||||
corpsepocket1 = /obj/item/weapon/tank/emergency_oxygen
|
||||
corpseid = 1
|
||||
|
||||
@@ -62,6 +62,13 @@
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message( message, 1, blind_message, 2)
|
||||
|
||||
// Returns an amount of power drawn from the object (-1 if it's not viable).
|
||||
// If drain_check is set it will not actually drain power, just return a value.
|
||||
// If surge is set, it will destroy/damage the recipient and not return any power.
|
||||
// Not sure where to define this, so it can sit here for the rest of time.
|
||||
/atom/proc/drain_power(var/drain_check,var/surge)
|
||||
return -1
|
||||
|
||||
// Show a message to all mobs in earshot of this one
|
||||
// This would be for audible actions by the src mob
|
||||
// message is the message output to anyone who can hear.
|
||||
@@ -1070,7 +1077,7 @@ mob/proc/yank_out_object()
|
||||
var/datum/organ/external/affected
|
||||
|
||||
for(var/datum/organ/external/organ in H.organs) //Grab the organ holding the implant.
|
||||
for(var/obj/item/weapon/O in organ.implants)
|
||||
for(var/obj/item/O in organ.implants)
|
||||
if(O == selection)
|
||||
affected = organ
|
||||
|
||||
|
||||
@@ -116,6 +116,23 @@
|
||||
if(terminal)
|
||||
terminal.connect_to_network()
|
||||
|
||||
/obj/machinery/power/apc/drain_power(var/drain_check, var/surge)
|
||||
|
||||
if(drain_check)
|
||||
return 1
|
||||
|
||||
if(!cell)
|
||||
return 0
|
||||
|
||||
if(surge && !emagged)
|
||||
flick("apc-spark", src)
|
||||
emagged = 1
|
||||
locked = 0
|
||||
update_icon()
|
||||
return 0
|
||||
|
||||
return cell.drain_power(drain_check)
|
||||
|
||||
/obj/machinery/power/apc/New(turf/loc, var/ndir, var/building=0)
|
||||
..()
|
||||
wires = new(src)
|
||||
|
||||
@@ -36,6 +36,27 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
color = COLOR_RED
|
||||
var/obj/machinery/power/breakerbox/breaker_box
|
||||
|
||||
/obj/structure/cable/drain_power(var/drain_check)
|
||||
|
||||
if(drain_check)
|
||||
return 1
|
||||
|
||||
var/datum/powernet/PN = get_powernet()
|
||||
if(!PN) return 0
|
||||
|
||||
var/drained_power = round(rand(200,400)/2)
|
||||
var/drained_this_tick = PN.draw_power(drained_power)
|
||||
|
||||
if(drained_this_tick < drained_power)
|
||||
for(var/obj/machinery/power/terminal/T in PN.nodes)
|
||||
if(istype(T.master, /obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/AP = T.master
|
||||
if(AP.emagged)
|
||||
continue
|
||||
drained_power += AP.drain_power() //Indirect draw won't emag the APC, should this be amended?
|
||||
|
||||
return drained_power
|
||||
|
||||
/obj/structure/cable/yellow
|
||||
color = COLOR_YELLOW
|
||||
|
||||
|
||||
@@ -9,6 +9,17 @@
|
||||
spawn(5)
|
||||
updateicon()
|
||||
|
||||
/obj/item/weapon/cell/drain_power(var/drain_check)
|
||||
|
||||
if(drain_check)
|
||||
return 1
|
||||
|
||||
var/drained_power = rand(200,400)
|
||||
if(charge < drained_power)
|
||||
drained_power = charge
|
||||
use(drained_power)
|
||||
return drained_power
|
||||
|
||||
/obj/item/weapon/cell/proc/updateicon()
|
||||
overlays.Cut()
|
||||
|
||||
@@ -56,7 +67,7 @@
|
||||
/obj/item/weapon/cell/examine(mob/user)
|
||||
if(get_dist(src, user) > 1)
|
||||
return
|
||||
|
||||
|
||||
if(maxcharge <= 2500)
|
||||
user << "[desc]\nThe manufacturer's label states this cell has a power rating of [maxcharge], and that you should not swallow it.\nThe charge meter reads [round(src.percent() )]%."
|
||||
else
|
||||
@@ -64,16 +75,6 @@
|
||||
if(crit_fail)
|
||||
user << "\red This power cell seems to be faulty."
|
||||
|
||||
/obj/item/weapon/cell/attack_self(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/clothing/gloves/space_ninja/SNG = H.gloves
|
||||
if(!istype(SNG) || !SNG.candrain || !SNG.draining) return
|
||||
|
||||
SNG.drain("CELL",src,H.wear_suit)
|
||||
return
|
||||
|
||||
/obj/item/weapon/cell/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/syringe))
|
||||
|
||||
@@ -37,6 +37,23 @@
|
||||
var/building_terminal = 0 //Suggestions about how to avoid clickspam building several terminals accepted!
|
||||
var/obj/machinery/power/terminal/terminal = null
|
||||
|
||||
/obj/machinery/power/smes/drain_power(var/drain_check)
|
||||
|
||||
if(drain_check)
|
||||
return 1
|
||||
|
||||
if(!charge)
|
||||
return 0
|
||||
|
||||
if(charge)
|
||||
var/drained_power = rand(200,400)
|
||||
if(charge < drained_power)
|
||||
drained_power = charge
|
||||
charge -= drained_power
|
||||
return drained_power
|
||||
|
||||
return 0
|
||||
|
||||
/obj/machinery/power/smes/New()
|
||||
..()
|
||||
spawn(5)
|
||||
|
||||
@@ -77,6 +77,18 @@ obj/item/weapon/gun/energy/laser/retro
|
||||
isHandgun()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/energy/lasercannon/mounted/load_into_chamber()
|
||||
if(in_chamber)
|
||||
return 1
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(istype(H) && H.back)
|
||||
var/obj/item/weapon/rig/suit = H.back
|
||||
if(istype(suit) && suit.cell && suit.cell.charge >= 250)
|
||||
suit.cell.use(250)
|
||||
in_chamber = new /obj/item/projectile/beam/heavylaser(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/energy/lasercannon/cyborg/load_into_chamber()
|
||||
if(in_chamber)
|
||||
return 1
|
||||
@@ -84,7 +96,7 @@ obj/item/weapon/gun/energy/laser/retro
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
R.cell.use(250)
|
||||
in_chamber = new/obj/item/projectile/beam(src)
|
||||
in_chamber = new/obj/item/projectile/beam/heavylaser(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -35,8 +35,18 @@
|
||||
else
|
||||
user.update_inv_r_hand()
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/mounted/load_into_chamber()
|
||||
if(in_chamber)
|
||||
return 1
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(istype(H) && H.back)
|
||||
var/obj/item/weapon/rig/suit = H.back
|
||||
if(istype(suit) && suit.cell && suit.cell.charge >= 250)
|
||||
suit.cell.use(250)
|
||||
var/prog_path = text2path(projectile_type)
|
||||
in_chamber = new prog_path(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/nuclear
|
||||
name = "Advanced Energy Gun"
|
||||
|
||||
@@ -96,7 +96,9 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/ninja
|
||||
name = "energy dart thrower"
|
||||
projectile_type = "/obj/item/projectile/energy/dart"
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/largecrossbow
|
||||
name = "Energy Crossbow"
|
||||
|
||||
@@ -1358,6 +1358,21 @@ datum
|
||||
..()
|
||||
return
|
||||
|
||||
adrenaline
|
||||
name = "Adrenaline"
|
||||
id = "adrenaline"
|
||||
description = "Adrenaline is a hormone used as a drug to treat cardiac arrest and other cardiac dysrhythmias resulting in diminished or absent cardiac output."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
M.SetParalysis(0)
|
||||
M.SetWeakened(0)
|
||||
M.adjustToxLoss(rand(3))
|
||||
..()
|
||||
return
|
||||
|
||||
cryoxadone
|
||||
name = "Cryoxadone"
|
||||
id = "cryoxadone"
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
/obj/machinery/sleeper,
|
||||
/obj/machinery/smartfridge/,
|
||||
/obj/machinery/biogenerator,
|
||||
/obj/machinery/constructable_frame)
|
||||
/obj/machinery/constructable_frame
|
||||
)
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -119,10 +120,6 @@
|
||||
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "\blue You transfer [trans] units of the solution to [target]."
|
||||
|
||||
//Safety for dumping stuff into a ninja suit. It handles everything through attackby() and this is unnecessary.
|
||||
else if(istype(target, /obj/item/clothing/suit/space/space_ninja))
|
||||
return
|
||||
|
||||
else if(istype(target, /obj/machinery/bunsen_burner))
|
||||
return
|
||||
|
||||
|
||||
@@ -90,6 +90,11 @@ proc/GetAnomalySusceptibility(var/mob/living/carbon/human/H)
|
||||
var/protected = 0
|
||||
|
||||
//anomaly suits give best protection, but excavation suits are almost as good
|
||||
if(istype(H.back,/obj/item/weapon/rig/hazmat))
|
||||
var/obj/item/weapon/rig/hazmat/rig = H.back
|
||||
if(rig.suit_is_deployed() && !rig.offline)
|
||||
protected += 1
|
||||
|
||||
if(istype(H.wear_suit,/obj/item/clothing/suit/bio_suit/anomaly))
|
||||
protected += 0.6
|
||||
else if(istype(H.wear_suit,/obj/item/clothing/suit/space/anomaly))
|
||||
|
||||
Reference in New Issue
Block a user