mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
Merge pull request #8376 from MarsM0nd/suiting_up
Small fixes and improvments for rigsuits
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
//Component/device holders.
|
||||
var/obj/item/weapon/tank/air_supply // Air tank, if any.
|
||||
var/obj/item/clothing/shoes/magboots/boots = null // Deployable boots, if any.
|
||||
var/obj/item/clothing/shoes/under_boots = null //Boots that are between the feet and the rig boots, if any.
|
||||
var/obj/item/clothing/suit/space/new_rig/chest // Deployable chestpiece, if any.
|
||||
var/obj/item/clothing/head/helmet/space/new_rig/helmet = null // Deployable helmet, if any.
|
||||
var/obj/item/clothing/gloves/rig/gloves = null // Deployable gauntlets, if any.
|
||||
@@ -71,6 +72,7 @@
|
||||
var/sealing // Keeps track of seal status independantly of NODROP.
|
||||
var/offline = 1 // Should we be applying suit maluses?
|
||||
var/offline_slowdown = 3 // If the suit is deployed and unpowered, it sets slowdown to this.
|
||||
var/active_slowdown = 3 // How much the deployed suit slows down if powered.
|
||||
var/vision_restriction
|
||||
var/offline_vision_restriction = 1 // 0 - none, 1 - welder vision, 2 - blind. Maybe move this to helmets.
|
||||
var/airtight = 1 //If set, will adjust AIRTIGHT and STOPSPRESSUREDMAGE flags on components. Otherwise it should leave them untouched.
|
||||
@@ -108,7 +110,7 @@
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
processing_objects |= src
|
||||
processing_objects.Add(src)
|
||||
|
||||
if(initial_modules && initial_modules.len)
|
||||
for(var/path in initial_modules)
|
||||
@@ -164,7 +166,7 @@
|
||||
if(istype(M))
|
||||
M.unEquip(piece)
|
||||
qdel(piece)
|
||||
processing_objects -= src
|
||||
processing_objects.Remove(src)
|
||||
QDEL_NULL(wires)
|
||||
QDEL_NULL(spark_system)
|
||||
return ..()
|
||||
@@ -438,6 +440,15 @@
|
||||
M.unEquip(piece)
|
||||
piece.forceMove(src)
|
||||
|
||||
if(cell && cell.charge > 0 && electrified > 0)
|
||||
electrified--
|
||||
|
||||
if(malfunction_delay > 0)
|
||||
malfunction_delay--
|
||||
else if(malfunctioning)
|
||||
malfunctioning--
|
||||
malfunction()
|
||||
|
||||
if(!istype(wearer) || loc != wearer || wearer.back != src || !(flags & NODROP) || !cell || cell.charge <= 0)
|
||||
if(!cell || cell.charge <= 0)
|
||||
if(electrified > 0)
|
||||
@@ -462,7 +473,7 @@
|
||||
offline = 0
|
||||
if(istype(wearer) && !wearer.wearing_rig)
|
||||
wearer.wearing_rig = src
|
||||
chest.slowdown = initial(slowdown)
|
||||
chest.slowdown = active_slowdown
|
||||
|
||||
if(offline)
|
||||
if(offline == 1)
|
||||
@@ -472,14 +483,6 @@
|
||||
chest.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)
|
||||
@@ -721,6 +724,12 @@
|
||||
if(isliving(uneq_piece.loc))
|
||||
var/mob/living/L = uneq_piece.loc
|
||||
L.unEquip(uneq_piece, 1)
|
||||
if(uneq_piece == boots)
|
||||
if(under_boots)
|
||||
if(L.equip_to_slot_if_possible(under_boots, slot_shoes))
|
||||
under_boots = null
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Somehow, your [under_boots] got stuck to the [boots], and were retracted with them. ((This shouldn't happen, bug report this.))</span>")
|
||||
uneq_piece.forceMove(src)
|
||||
return 0
|
||||
|
||||
@@ -767,7 +776,12 @@
|
||||
|
||||
if(to_strip)
|
||||
to_strip.unEquip(use_obj, 1)
|
||||
|
||||
if(use_obj == boots)
|
||||
if(under_boots)
|
||||
if(to_strip.equip_to_slot_if_possible(under_boots, slot_shoes))
|
||||
under_boots = null
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Somehow, your [under_boots] got stuck to the [boots], and were retracted with them. ((This shouldn't happen, bug report this.))</span>")
|
||||
use_obj.forceMove(src)
|
||||
if(wearer)
|
||||
to_chat(wearer, "<span class='notice'>Your [use_obj] [use_obj.gender == PLURAL ? "retract" : "retracts"] swiftly.")
|
||||
@@ -775,8 +789,13 @@
|
||||
else if(deploy_mode != ONLY_RETRACT)
|
||||
if(check_slot)
|
||||
if(check_slot != use_obj) //If use_obj is already in check_slot, silently bail. Otherwise, tell the user why the part didn't deploy.
|
||||
to_chat(wearer, "<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
|
||||
if(use_obj == boots)
|
||||
under_boots = check_slot
|
||||
wearer.unEquip(under_boots)
|
||||
under_boots.forceMove(src)
|
||||
else
|
||||
to_chat(wearer, "<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
|
||||
use_obj.forceMove(wearer)
|
||||
if(!wearer.equip_to_slot_if_possible(use_obj, equip_to, 0, 1))
|
||||
use_obj.forceMove(src)
|
||||
@@ -798,9 +817,9 @@
|
||||
if(gloves && wearer.gloves && wearer.gloves != gloves)
|
||||
to_chat(user, "<span class='danger'>\The [wearer.gloves] is preventing \the [src] from deploying!</span>")
|
||||
return 0
|
||||
if(boots && wearer.shoes && wearer.shoes != boots)
|
||||
/*if(boots && wearer.shoes && wearer.shoes != boots)
|
||||
to_chat(user, "<span class='danger'>\The [wearer.shoes] is preventing \the [src] from deploying!</span>")
|
||||
return 0
|
||||
return 0*/
|
||||
if(chest && wearer.wear_suit && wearer.wear_suit != chest)
|
||||
to_chat(user, "<span class='danger'>\The [wearer.wear_suit] is preventing \the [src] from deploying!</span>")
|
||||
return 0
|
||||
@@ -836,10 +855,11 @@
|
||||
take_hit((100/severity_class), "electrical pulse", 1)
|
||||
|
||||
/obj/item/weapon/rig/proc/shock(mob/user)
|
||||
if(electrocute_mob(user, cell, src)) //electrocute_mob() handles removing charge from the cell, no need to do that here.
|
||||
spark_system.start()
|
||||
if(user.stunned)
|
||||
return 1
|
||||
if(get_dist(src, user) <= 1) //Needs to be adjecant to the rig to get shocked.
|
||||
if(electrocute_mob(user, cell, src)) //electrocute_mob() handles removing charge from the cell, no need to do that here.
|
||||
spark_system.start()
|
||||
if(user.stunned)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rig/proc/take_hit(damage, source, is_emp=0)
|
||||
|
||||
@@ -50,8 +50,21 @@
|
||||
rig.electrified = 30
|
||||
rig.shock(usr,100)
|
||||
|
||||
/datum/wires/rig/GetWireName(index)
|
||||
switch(index)
|
||||
if(RIG_SECURITY)
|
||||
return "ID check"
|
||||
if(RIG_AI_OVERRIDE)
|
||||
return "AI control"
|
||||
if(RIG_SYSTEM_CONTROL)
|
||||
return "System control"
|
||||
if(RIG_INTERFACE_LOCK)
|
||||
return "Interface lock"
|
||||
if(RIG_INTERFACE_SHOCK)
|
||||
return "Electrification"
|
||||
|
||||
/datum/wires/rig/CanUse(var/mob/living/L)
|
||||
var/obj/item/weapon/rig/rig = holder
|
||||
if(rig.open)
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "breacher_rig_cheap"
|
||||
armor = list(melee = 30, bullet = 30, laser = 30, energy = 30, bomb = 45, bio = 100, rad = 50)
|
||||
emp_protection = -20
|
||||
slowdown = 6
|
||||
active_slowdown = 6
|
||||
offline_slowdown = 10
|
||||
vision_restriction = 1
|
||||
offline_vision_restriction = 2
|
||||
@@ -43,4 +43,4 @@
|
||||
species_restricted = list("Unathi")
|
||||
sprite_sheets = list(
|
||||
"Unathi" = 'icons/mob/species/unathi/feet.dmi'
|
||||
)
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon_state = "security_rig"
|
||||
suit_type = "combat hardsuit"
|
||||
armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100)
|
||||
slowdown = 1
|
||||
active_slowdown = 1
|
||||
offline_slowdown = 3
|
||||
offline_vision_restriction = 1
|
||||
|
||||
@@ -25,4 +25,4 @@
|
||||
// /obj/item/rig_module/power_sink,
|
||||
/obj/item/rig_module/electrowarfare_suite,
|
||||
/obj/item/rig_module/chem_dispenser/combat
|
||||
)
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
suit_type = "light suit"
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank,/obj/item/weapon/stock_parts/cell)
|
||||
emp_protection = 10
|
||||
slowdown = 0
|
||||
active_slowdown = 0
|
||||
flags = STOPSPRESSUREDMAGE | THICKMATERIAL
|
||||
offline_slowdown = 0
|
||||
offline_vision_restriction = 0
|
||||
@@ -77,7 +77,7 @@
|
||||
icon_state = "ninja_rig"
|
||||
armor = list(melee = 50, bullet = 15, laser = 30, energy = 10, bomb = 25, bio = 100, rad = 30)
|
||||
emp_protection = 40 //change this to 30 if too high.
|
||||
slowdown = 0
|
||||
active_slowdown = 0
|
||||
|
||||
chest_type = /obj/item/clothing/suit/space/new_rig/light/ninja
|
||||
glove_type = /obj/item/clothing/gloves/rig/light/ninja
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon_state = "merc_rig"
|
||||
suit_type = "crimson hardsuit"
|
||||
armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 50)
|
||||
slowdown = 1
|
||||
active_slowdown = 1
|
||||
offline_slowdown = 3
|
||||
offline_vision_restriction = 1
|
||||
|
||||
@@ -29,4 +29,4 @@
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/electrowarfare_suite, //might as well
|
||||
)
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
icon_state = "internalaffairs_rig"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
siemens_coefficient = 0.9
|
||||
slowdown = 0
|
||||
active_slowdown = 0
|
||||
offline_slowdown = 0
|
||||
offline_vision_restriction = 0
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
desc = "A heavy, powerful rig used by construction crews and mining corporations."
|
||||
icon_state = "engineering_rig"
|
||||
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75)
|
||||
slowdown = 3
|
||||
active_slowdown = 3
|
||||
offline_slowdown = 10
|
||||
offline_vision_restriction = 2
|
||||
emp_protection = -20
|
||||
@@ -80,7 +80,7 @@
|
||||
suit_type = "EVA hardsuit"
|
||||
desc = "A light rig for repairs and maintenance to the outside of habitats and vessels."
|
||||
icon_state = "eva_rig"
|
||||
slowdown = 0
|
||||
active_slowdown = 0
|
||||
offline_slowdown = 1
|
||||
offline_vision_restriction = 1
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
desc = "An advanced voidsuit that protects against hazardous, low pressure environments. Shines with a high polish."
|
||||
icon_state = "ce_rig"
|
||||
armor = list(melee = 40, bullet = 5, laser = 10, energy = 5, bomb = 50, bio = 100, rad = 90)
|
||||
slowdown = 0
|
||||
active_slowdown = 0
|
||||
offline_slowdown = 0
|
||||
offline_vision_restriction = 0
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
suit_type = "hazmat hardsuit"
|
||||
desc = "An Anomalous Material Interaction hardsuit that protects against the strangest energies the universe can throw at it."
|
||||
icon_state = "science_rig"
|
||||
slowdown = 1
|
||||
active_slowdown = 1
|
||||
offline_vision_restriction = 1
|
||||
|
||||
helm_type = /obj/item/clothing/head/helmet/space/new_rig/hazmat
|
||||
@@ -176,7 +176,7 @@
|
||||
desc = "A durable suit designed for medical rescue in high risk areas."
|
||||
icon_state = "medical_rig"
|
||||
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 50)
|
||||
slowdown = 1
|
||||
active_slowdown = 1
|
||||
offline_vision_restriction = 1
|
||||
|
||||
helm_type = /obj/item/clothing/head/helmet/space/new_rig/medical
|
||||
@@ -201,7 +201,7 @@
|
||||
desc = "A Security hardsuit designed for prolonged EVA in dangerous environments."
|
||||
icon_state = "hazard_rig"
|
||||
armor = list(melee = 30, bullet = 15, laser = 30, energy = 10, bomb = 10, bio = 100, rad = 50)
|
||||
slowdown = 1
|
||||
active_slowdown = 1
|
||||
offline_slowdown = 3
|
||||
offline_vision_restriction = 1
|
||||
|
||||
@@ -220,4 +220,4 @@
|
||||
/obj/item/rig_module/maneuvering_jets,
|
||||
/obj/item/rig_module/grenade_launcher,
|
||||
/obj/item/rig_module/mounted/taser
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user