From d06b2a0a1242faac62ce7bc05135a6a8b2bf3dc7 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Thu, 26 Feb 2015 00:05:04 -0500 Subject: [PATCH 1/5] EMP briefly blocks switching/engaging modules --- code/modules/clothing/spacesuits/rig/rig.dm | 14 +++++++++++--- code/modules/clothing/spacesuits/rig/rig_verbs.dm | 15 +++++++++++++++ .../clothing/spacesuits/rig/suits/light.dm | 3 +++ 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index c66f2a986cd..5d1addd4719 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -493,6 +493,8 @@ return 1 if(istype(user)) + if(malfunction_check(user)) + return 0 if(user.back != src) return 0 if(locked_dna) @@ -509,10 +511,10 @@ return 1 +//TODO: Fix Topic vulnerabilities for malfunction and AI override. /obj/item/weapon/rig/Topic(href,href_list) - if(!check_suit_access(usr)) - return + return 0 if(href_list["toggle_piece"]) if(ishuman(usr) && (usr.stat || usr.stunned || usr.lying)) @@ -545,7 +547,7 @@ usr.set_machine(src) src.add_fingerprint(usr) - return 1 + return 0 /obj/item/weapon/rig/proc/notify_ai(var/message) if(!message || !installed_modules || !installed_modules.len) @@ -724,6 +726,12 @@ wearer << "The [source] has [dam_module.damage >= 2 ? "destroyed" : "damaged"] your [dam_module.interface_name]!" dam_module.deactivate() +/obj/item/weapon/rig/proc/malfunction_check(var/mob/living/carbon/human/user) + if(malfunctioning) + user << "ERROR: Hardware fault. Rebooting interface..." + return 1 + return 0 + /*/obj/item/weapon/rig/proc/forced_move(dir) if(locked_down) return 0 diff --git a/code/modules/clothing/spacesuits/rig/rig_verbs.dm b/code/modules/clothing/spacesuits/rig/rig_verbs.dm index ce20244734a..09db9b03252 100644 --- a/code/modules/clothing/spacesuits/rig/rig_verbs.dm +++ b/code/modules/clothing/spacesuits/rig/rig_verbs.dm @@ -141,6 +141,9 @@ set category = "Hardsuit" set src = usr.contents + if(malfunction_check(usr)) + return + if(!check_power_cost(usr, 0, 0, 0, 0)) return @@ -168,6 +171,9 @@ set category = "Hardsuit" set src = usr.contents + if(malfunction_check(usr)) + return + if(canremove) usr << "The suit is not active." return @@ -189,6 +195,9 @@ set category = "Hardsuit" set src = usr.contents + if(malfunction_check(usr)) + return + if(!check_power_cost(usr, 0, 0, 0, 0)) return @@ -222,6 +231,9 @@ set category = "Hardsuit" set src = usr.contents + if(malfunction_check(usr)) + return + if(!check_power_cost(usr, 0, 0, 0, 0)) return @@ -257,6 +269,9 @@ set category = "Hardsuit" set src = usr.contents + if(malfunction_check(usr)) + return + if(canremove) usr << "The suit is not active." return diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm index 0a18f3c640d..6c89a0058be 100644 --- a/code/modules/clothing/spacesuits/rig/suits/light.dm +++ b/code/modules/clothing/spacesuits/rig/suits/light.dm @@ -75,6 +75,9 @@ ..() +/obj/item/weapon/rig/light/ninja/malfunction_check() + return 0 //even as strong as ninjas are, they may not be able to afford being blocked from switching modules for 20 seconds + /obj/item/weapon/rig/light/stealth name = "stealth suit control module" suit_type = "stealth" From a8c315ad525929acb6e95fe03c222bb09414710d Mon Sep 17 00:00:00 2001 From: mwerezak Date: Thu, 26 Feb 2015 00:41:46 -0500 Subject: [PATCH 2/5] Updates rig emp_act EMPing hardsuits drains a bit of charge. Module damage is dealt to damaged modules first. Various other adjustments. --- .../spacesuits/rig/modules/computer.dm | 30 +++++++++- code/modules/clothing/spacesuits/rig/rig.dm | 60 ++++++++++++++----- .../clothing/spacesuits/rig/rig_pieces.dm | 4 +- .../clothing/spacesuits/rig/suits/light.dm | 5 +- .../clothing/spacesuits/rig/suits/station.dm | 1 + 5 files changed, 80 insertions(+), 20 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm index 3d66c646029..a6c549b6663 100644 --- a/code/modules/clothing/spacesuits/rig/modules/computer.dm +++ b/code/modules/clothing/spacesuits/rig/modules/computer.dm @@ -441,4 +441,32 @@ drain_loc = null interfaced_with = null - total_power_drained = 0 \ No newline at end of file + total_power_drained = 0 + +/* +//Maybe make this use power when active or something +/obj/item/rig_module/emp_shielding + name = "\improper EMP dissipation module" + desc = "A bewilderingly complex bundle of fiber optics and chips." + toggleable = 1 + usable = 0 + + activate_string = "Enable active EMP shielding" + deactivate_string = "Disable active EMP shielding" + + interface_name = "active EMP shielding system" + interface_desc = "A highly experimental system that augments the hardsuit's existing EM shielding." + var/protection_amount = 20 + +/obj/item/rig_module/emp_shielding/activate() + if(!..()) + return + + holder.emp_protection += protection_amount + +/obj/item/rig_module/emp_shielding/deactivate() + if(!..()) + return + + holder.emp_protection = max(0,(holder.emp_protection - protection_amount)) +*/ diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 5d1addd4719..6ce4c072935 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -72,6 +72,8 @@ var/vision_restriction var/offline_vision_restriction = 1 // 0 - none, 1 - welder vision, 2 - blind. Maybe move this to helmets. + var/emp_protection = 0 + // Wiring! How exciting. var/datum/wires/rig/wires var/datum/effect/effect/system/spark_spread/spark_system @@ -336,6 +338,7 @@ for(var/obj/item/rig_module/module in installed_modules) module.deactivate() offline = 2 + malfunction_delay = 0 //ensures that people aren't stuck in their suit if the cell runs out while malfunctioning. chest.slowdown = offline_slowdown return @@ -416,7 +419,7 @@ data["aicontrol"] = control_overridden data["aioverride"] = ai_override_enabled data["securitycheck"] = security_check_enabled - data["malf"] = malfunctioning + data["malf"] = malfunction_delay var/list/module_list = list() @@ -686,13 +689,20 @@ //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") + return 0 + +/obj/item/weapon/rig/emp_act(severity_class) + //set malfunctioning + if(emp_protection < 40) + malfunctioning += 10 + if(malfunction_delay <= 0) + malfunction_delay = max(malfunction_delay, round(30/severity_class)) + + //drain some charge + if(cell) cell.emp_act(severity_class + 15) + + //possibly damage some modules + take_hit((100/severity_class), "electrical pulse", 1) /obj/item/weapon/rig/proc/shock(mob/user) if (electrocute_mob(user, cell, src)) @@ -705,29 +715,49 @@ if(!installed_modules.len) return - if(!prob(max(0,(damage-(chest ? chest.breach_threshold : 0))))) + var/chance + if(!is_emp) + chance = 2*max(0, damage - (chest? chest.breach_threshold : 0)) + else + //Want this to be roughly independant of the number of modules, that way people designing hardsuits + //don't have to worry (as much) about how adding that extra module will affect emp resiliance. + chance = max(0, damage - emp_protection)*min(installed_modules.len/15, 1) + + if(!prob(chance)) return + //deal addition damage to already damaged module first. + //This way the chances of a module being disabled aren't so remote. var/list/valid_modules = list() + var/list/damaged_modules = list() for(var/obj/item/rig_module/module in installed_modules) if(module.damage < 2) valid_modules |= module + if(module.damage > 0) + damaged_modules |= module - if(!valid_modules.len) - return + var/obj/item/rig_module/dam_module = null + if(damaged_modules.len) + dam_module = pick(damaged_modules) + else if(valid_modules.len) + dam_module = pick(valid_modules) + + if(!dam_module) return - var/obj/item/rig_module/dam_module = pick(valid_modules) dam_module.damage++ if(!source) source = "hit" - if(wearer) - wearer << "The [source] has [dam_module.damage >= 2 ? "destroyed" : "damaged"] your [dam_module.interface_name]!" + if(wearer) + if(dam_module.damage >= 2) + wearer << "The [source] has disabled your [dam_module.interface_name]!" + else + wearer << "The [source] has damaged your [dam_module.interface_name]!" dam_module.deactivate() /obj/item/weapon/rig/proc/malfunction_check(var/mob/living/carbon/human/user) - if(malfunctioning) + if(malfunction_delay) user << "ERROR: Hardware fault. Rebooting interface..." return 1 return 0 diff --git a/code/modules/clothing/spacesuits/rig/rig_pieces.dm b/code/modules/clothing/spacesuits/rig/rig_pieces.dm index fd802ecb63d..4a519605244 100644 --- a/code/modules/clothing/spacesuits/rig/rig_pieces.dm +++ b/code/modules/clothing/spacesuits/rig/rig_pieces.dm @@ -39,7 +39,9 @@ flags_inv = HIDEJUMPSUIT|HIDETAIL flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT slowdown = 0 - breach_threshold = 35 + //With 0.05 resiliance, will reach 10 breach damage after 18 laser carbine blasts. Completely immune to smg hits. + breach_threshold = 28 + resilience = 0.05 can_breach = 1 sprite_sheets = list("Tajara" = 'icons/mob/species/tajaran/suit.dmi',"Unathi" = 'icons/mob/species/unathi/suit.dmi') supporting_limbs = list() diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm index 6c89a0058be..3471fa04735 100644 --- a/code/modules/clothing/spacesuits/rig/suits/light.dm +++ b/code/modules/clothing/spacesuits/rig/suits/light.dm @@ -6,6 +6,7 @@ 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) + emp_protection = 10 slowdown = 0 flags = STOPPRESSUREDAMAGE | THICKMATERIAL offline_slowdown = 0 @@ -54,6 +55,7 @@ desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins." icon_state = "ninja_rig" armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) + emp_protection = 40 slowdown = 0 req_access = list(access_syndicate) @@ -75,9 +77,6 @@ ..() -/obj/item/weapon/rig/light/ninja/malfunction_check() - return 0 //even as strong as ninjas are, they may not be able to afford being blocked from switching modules for 20 seconds - /obj/item/weapon/rig/light/stealth name = "stealth suit control module" suit_type = "stealth" diff --git a/code/modules/clothing/spacesuits/rig/suits/station.dm b/code/modules/clothing/spacesuits/rig/suits/station.dm index 44959068eb4..ea2c5fc9822 100644 --- a/code/modules/clothing/spacesuits/rig/suits/station.dm +++ b/code/modules/clothing/spacesuits/rig/suits/station.dm @@ -7,6 +7,7 @@ slowdown = 3 offline_slowdown = 10 offline_vision_restriction = 2 + emp_protection = -20 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) From 55a3b94995400e9f00ee6ea862d36f5027385e63 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sat, 28 Feb 2015 03:33:16 -0500 Subject: [PATCH 3/5] Hardsuit adjustments, fixes Default inherited offline_slowdown set to 3, as most hardsuits use this value. ERT no longer get rad immunity, they have enough advantages - instead only ERT engineers get that. ERT engineer gauntlets are also now insulated, allowing them to do wiring work in space. Fixed a compile error. Fixed mounted laser cannons taking too long to recharge. --- code/modules/clothing/spacesuits/rig/rig.dm | 4 ++-- code/modules/clothing/spacesuits/rig/suits/alien.dm | 3 ++- code/modules/clothing/spacesuits/rig/suits/combat.dm | 1 - code/modules/clothing/spacesuits/rig/suits/ert.dm | 9 +++++++-- code/modules/clothing/spacesuits/rig/suits/merc.dm | 1 - code/modules/clothing/spacesuits/rig/suits/station.dm | 3 --- code/modules/projectiles/guns/energy/laser.dm | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 6ce4c072935..e9dd8343561 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -68,7 +68,7 @@ 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/offline_slowdown = 3 // 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. @@ -710,7 +710,7 @@ return 1 return 0 -/obj/item/weapon/rig/proc/take_hit(damage,source) +/obj/item/weapon/rig/proc/take_hit(damage, source, is_emp=0) if(!installed_modules.len) return diff --git a/code/modules/clothing/spacesuits/rig/suits/alien.dm b/code/modules/clothing/spacesuits/rig/suits/alien.dm index 5b35d6a139f..cb64d2be448 100644 --- a/code/modules/clothing/spacesuits/rig/suits/alien.dm +++ b/code/modules/clothing/spacesuits/rig/suits/alien.dm @@ -4,6 +4,7 @@ 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) + emp_protection = -20 slowdown = 6 offline_slowdown = 10 vision_restriction = 1 @@ -16,4 +17,4 @@ icon_state = "breacher_rig" armor = list(melee = 90, bullet = 90, laser = 90, energy = 90, bomb = 90, bio = 100, rad = 80) vision_restriction = 0 - slowdown = 4 \ No newline at end of file + slowdown = 4 diff --git a/code/modules/clothing/spacesuits/rig/suits/combat.dm b/code/modules/clothing/spacesuits/rig/suits/combat.dm index 55716179c6a..9be2576838b 100644 --- a/code/modules/clothing/spacesuits/rig/suits/combat.dm +++ b/code/modules/clothing/spacesuits/rig/suits/combat.dm @@ -8,7 +8,6 @@ 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 diff --git a/code/modules/clothing/spacesuits/rig/suits/ert.dm b/code/modules/clothing/spacesuits/rig/suits/ert.dm index d3db4baf84e..121f0286865 100644 --- a/code/modules/clothing/spacesuits/rig/suits/ert.dm +++ b/code/modules/clothing/spacesuits/rig/suits/ert.dm @@ -7,13 +7,12 @@ 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" - 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) + armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 60) 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, \ @@ -30,6 +29,9 @@ 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" + armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100) + + glove_type = /obj/item/clothing/gloves/rig/ert_engineer initial_modules = list( /obj/item/rig_module/ai_container, @@ -38,6 +40,9 @@ /obj/item/rig_module/device/rcd ) +/obj/item/clothing/gloves/rig/ert_engineer + siemens_coefficient = 0 + /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." diff --git a/code/modules/clothing/spacesuits/rig/suits/merc.dm b/code/modules/clothing/spacesuits/rig/suits/merc.dm index 22add920141..8e7b70d5f2b 100644 --- a/code/modules/clothing/spacesuits/rig/suits/merc.dm +++ b/code/modules/clothing/spacesuits/rig/suits/merc.dm @@ -9,7 +9,6 @@ suit_type = "crimson 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/merc diff --git a/code/modules/clothing/spacesuits/rig/suits/station.dm b/code/modules/clothing/spacesuits/rig/suits/station.dm index ea2c5fc9822..74fd7a16fe6 100644 --- a/code/modules/clothing/spacesuits/rig/suits/station.dm +++ b/code/modules/clothing/spacesuits/rig/suits/station.dm @@ -57,7 +57,6 @@ 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 helm_type = /obj/item/clothing/head/helmet/space/rig/ert @@ -80,7 +79,6 @@ icon_state = "medical_rig" armor = list(melee = 30, bullet = 15, laser = 20, energy = 60, bomb = 30, bio = 100, rad = 100) slowdown = 1 - offline_slowdown = 3 offline_vision_restriction = 1 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,/obj/item/roller ) @@ -101,7 +99,6 @@ icon_state = "hazard_rig" armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10) slowdown = 1 - offline_slowdown = 3 offline_vision_restriction = 1 helm_type = /obj/item/clothing/head/helmet/space/rig/ert diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 28f95d8211a..45cd4b06643 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -52,7 +52,7 @@ obj/item/weapon/gun/energy/laser/retro /obj/item/weapon/gun/energy/lasercannon/mounted self_recharge = 1 use_external_power = 1 - recharge_time = 25 + recharge_time = 8 /obj/item/weapon/gun/energy/xray name = "xray laser gun" From a026922115f1ce182b002ee5fd8b5fc4a41c39c8 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sat, 28 Feb 2015 04:10:04 -0500 Subject: [PATCH 4/5] More hardsuit fixes, ion rifle fix Fixes modules being usable when destroyed. Fixes charge display for fractional charge values. Fixes ion rifles EMPing themselves. --- code/modules/clothing/spacesuits/rig/modules/modules.dm | 5 +++-- code/modules/clothing/spacesuits/rig/rig.dm | 6 +++--- code/modules/projectiles/guns/energy/special.dm | 4 +--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/modules/modules.dm b/code/modules/clothing/spacesuits/rig/modules/modules.dm index 830e0d784ce..17498a31b23 100644 --- a/code/modules/clothing/spacesuits/rig/modules/modules.dm +++ b/code/modules/clothing/spacesuits/rig/modules/modules.dm @@ -138,6 +138,7 @@ if(damage >= 2) usr << "The [interface_name] is damaged beyond use!" + return 0 if(world.time < next_use) usr << "You cannot use the [interface_name] again so soon." @@ -147,7 +148,7 @@ usr << "The suit is not initialized." return 0 - if(usr.lying || usr.stat || usr.stunned || usr.paralysis) + if(usr.lying || usr.stat || usr.stunned || usr.paralysis || usr.weakened) usr << "You cannot use the suit in this state." return 0 @@ -157,7 +158,7 @@ if(holder.security_check_enabled && !holder.check_suit_access(usr)) usr << "Access denied." - return + return 0 if(!holder.check_power_cost(usr, use_power_cost, 0, src, (istype(usr,/mob/living/silicon ? 1 : 0) ) ) ) return 0 diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 7a09fe5bc7d..2f5d1f54746 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -313,8 +313,9 @@ if(!istype(wearer) || loc != wearer || wearer.back != src || canremove || !cell || cell.charge <= 0) if(!cell || cell.charge <= 0) - if(electrified >0) + if(electrified > 0) electrified = 0 + malfunction_delay = 0 //ensures that people aren't stuck in their suit if the cell runs out while malfunctioning. if(!offline) if(istype(wearer)) if(!canremove) @@ -338,7 +339,6 @@ for(var/obj/item/rig_module/module in installed_modules) module.deactivate() offline = 2 - malfunction_delay = 0 //ensures that people aren't stuck in their suit if the cell runs out while malfunctioning. chest.slowdown = offline_slowdown return @@ -409,7 +409,7 @@ data["boots"] = (boots ? "[boots.name]" : "None.") data["chest"] = (chest ? "[chest.name]" : "None.") - data["charge"] = cell ? cell.charge : 0 + data["charge"] = cell ? round(cell.charge,1) : 0 data["maxcharge"] = cell ? cell.maxcharge : 0 data["chargestatus"] = cell ? Floor((cell.charge/cell.maxcharge)*50) : 0 diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 76bcebac3c2..31480de9c8b 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -13,9 +13,7 @@ projectile_type = /obj/item/projectile/ion /obj/item/weapon/gun/energy/ionrifle/emp_act(severity) - if(severity > 2) - return //so it doesn't EMP itself, I guess - ..() + ..(max(severity, 2)) //so it doesn't EMP itself, I guess /obj/item/weapon/gun/energy/ionrifle/update_icon() ..() From 8d1a92a0f5ab9fb61a86afadffd892a87364d559 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sat, 28 Feb 2015 04:36:43 -0500 Subject: [PATCH 5/5] Hardsuit tweaks Spider fang blade uses power faster. Light hardsuits (minus ninja suit) have voidsuit-level breach thresholds. If the suit is malfunctioning when it runs out of power then you will need someone to cut you out. --- .../clothing/spacesuits/rig/modules/combat.dm | 2 +- code/modules/clothing/spacesuits/rig/rig.dm | 14 ++++++++------ code/modules/clothing/spacesuits/rig/suits/ert.dm | 1 + .../modules/clothing/spacesuits/rig/suits/light.dm | 10 +++++++++- code/modules/projectiles/guns/energy/laser.dm | 2 +- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/modules/combat.dm b/code/modules/clothing/spacesuits/rig/modules/combat.dm index 605bff6be80..b106e412554 100644 --- a/code/modules/clothing/spacesuits/rig/modules/combat.dm +++ b/code/modules/clothing/spacesuits/rig/modules/combat.dm @@ -151,7 +151,7 @@ selectable = 1 toggleable = 1 use_power_cost = 50 - active_power_cost = 5 + active_power_cost = 10 passive_power_cost = 0 gun_type = /obj/item/weapon/gun/energy/crossbow/ninja diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 2f5d1f54746..d003d64d599 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -315,14 +315,13 @@ if(!cell || cell.charge <= 0) if(electrified > 0) electrified = 0 - malfunction_delay = 0 //ensures that people aren't stuck in their suit if the cell runs out while malfunctioning. if(!offline) if(istype(wearer)) if(!canremove) if (offline_slowdown < 3) wearer << "Your suit beeps stridently, and suddenly goes dead." else - wearer << "Your suit beeps stridently, and suddenly you're wearing a leaden mass of metal and plastic instead of a powered suit." + wearer << "Your suit beeps stridently, and suddenly you're wearing a leaden mass of metal and plastic composites instead of a powered suit." if(offline_vision_restriction == 1) wearer << "The suit optics flicker and die, leaving you with restricted vision." else if(offline_vision_restriction == 2) @@ -693,7 +692,7 @@ /obj/item/weapon/rig/emp_act(severity_class) //set malfunctioning - if(emp_protection < 40) + if(emp_protection < 30) //for ninjas, really. malfunctioning += 10 if(malfunction_delay <= 0) malfunction_delay = max(malfunction_delay, round(30/severity_class)) @@ -719,8 +718,8 @@ if(!is_emp) chance = 2*max(0, damage - (chest? chest.breach_threshold : 0)) else - //Want this to be roughly independant of the number of modules, that way people designing hardsuits - //don't have to worry (as much) about how adding that extra module will affect emp resiliance. + //Want this to be roughly independant of the number of modules, meaning that X emp hits will disable Y% of the suit's modules on average. + //that way people designing hardsuits don't have to worry (as much) about how adding that extra module will affect emp resiliance by 'soaking' hits for other modules chance = max(0, damage - emp_protection)*min(installed_modules.len/15, 1) if(!prob(chance)) @@ -758,7 +757,10 @@ /obj/item/weapon/rig/proc/malfunction_check(var/mob/living/carbon/human/user) if(malfunction_delay) - user << "ERROR: Hardware fault. Rebooting interface..." + if(offline) + user << "The suit is completely unresponsive." + else + user << "ERROR: Hardware fault. Rebooting interface..." return 1 return 0 diff --git a/code/modules/clothing/spacesuits/rig/suits/ert.dm b/code/modules/clothing/spacesuits/rig/suits/ert.dm index 121f0286865..feec1f58103 100644 --- a/code/modules/clothing/spacesuits/rig/suits/ert.dm +++ b/code/modules/clothing/spacesuits/rig/suits/ert.dm @@ -41,6 +41,7 @@ ) /obj/item/clothing/gloves/rig/ert_engineer + name = "insulated gauntlets" siemens_coefficient = 0 /obj/item/weapon/rig/ert/medical diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm index 3471fa04735..55442c0a02b 100644 --- a/code/modules/clothing/spacesuits/rig/suits/light.dm +++ b/code/modules/clothing/spacesuits/rig/suits/light.dm @@ -19,6 +19,8 @@ /obj/item/clothing/suit/space/rig/light name = "suit" + breach_threshold = 18 //comparable to voidsuits + resilience = 0.2 /obj/item/clothing/gloves/rig/light name = "gloves" @@ -55,9 +57,11 @@ desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins." icon_state = "ninja_rig" armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) - emp_protection = 40 + emp_protection = 40 //change this to 30 if too high. slowdown = 0 + chest_type = /obj/item/clothing/suit/space/rig/light/ninja + req_access = list(access_syndicate) initial_modules = list( @@ -77,6 +81,10 @@ ..() +/obj/item/clothing/suit/space/rig/light/ninja + breach_threshold = 28 //comparable to regular hardsuits + resilience = 0.05 + /obj/item/weapon/rig/light/stealth name = "stealth suit control module" suit_type = "stealth" diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 622c23d0cef..2bc36508d81 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -59,7 +59,7 @@ obj/item/weapon/gun/energy/retro /obj/item/weapon/gun/energy/lasercannon/mounted self_recharge = 1 use_external_power = 1 - recharge_time = 8 + recharge_time = 10 /obj/item/weapon/gun/energy/xray name = "xray laser gun"