From 42cc20278e0f77cd62f49ae5005ef800856aa92f Mon Sep 17 00:00:00 2001
From: mistyLuminescence <32139558+mistyLuminescence@users.noreply.github.com>
Date: Thu, 23 May 2019 17:58:29 +0100
Subject: [PATCH] Big Bugfix Bonanza
---
code/game/machinery/computer/camera.dm | 2 +-
code/game/machinery/computer/medical.dm | 4 ++
code/game/machinery/recharger.dm | 18 ++++++--
.../mecha/equipment/tools/medical_tools.dm | 7 +++-
.../circuitboards/computer/camera_monitor.dm | 4 ++
.../circuitboards/computer/computer.dm | 4 ++
.../clothing/spacesuits/miscellaneous.dm | 2 +-
.../clothing/spacesuits/void/zaddat.dm | 6 +++
code/modules/mob/living/bot/secbot.dm | 2 +-
.../living/carbon/human/human_attackhand.dm | 5 ++-
code/modules/organs/organ_external.dm | 7 ++++
.../changelogs/mistyLuminescence - bugfix.yml | 42 +++++++++++++++++++
12 files changed, 94 insertions(+), 9 deletions(-)
create mode 100644 html/changelogs/mistyLuminescence - bugfix.yml
diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm
index 4ac34cf1571..c4930193b5b 100644
--- a/code/game/machinery/computer/camera.dm
+++ b/code/game/machinery/computer/camera.dm
@@ -248,7 +248,7 @@
icon_state = "television"
icon_keyboard = null
icon_screen = "detective_tv"
- circuit = null
+ circuit = /obj/item/weapon/circuitboard/security/tv
light_color = "#3848B3"
light_power_on = 0.5
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index 0c24c15b3ef..048cb85b9be 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -553,4 +553,8 @@
icon_state = "laptop"
icon_keyboard = "laptop_key"
icon_screen = "medlaptop"
+<<<<<<< HEAD
+=======
+ circuit = /obj/item/weapon/circuitboard/med_data/laptop
+>>>>>>> 209cb36... Big Bugfix Bonanza (#6170)
density = 0
\ No newline at end of file
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 9ff888c74ac..3205d16a619 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -7,6 +7,7 @@ obj/machinery/recharger
use_power = 1
idle_power_usage = 4
active_power_usage = 40000 //40 kW
+ var/efficiency = 40000 //will provide the modified power rate when upgraded
var/obj/item/charging = null
var/list/allowed_devices = list(/obj/item/weapon/gun/energy, /obj/item/weapon/melee/baton, /obj/item/modular_computer, /obj/item/weapon/computer_hardware/battery_module, /obj/item/weapon/cell, /obj/item/device/flashlight, /obj/item/device/electronic_assembly, /obj/item/weapon/weldingtool/electric, /obj/item/ammo_magazine/smart, /obj/item/device/flash, /obj/item/ammo_casing/nsfw_batt) //VOREStation Add - NSFW Batteries
var/icon_state_charged = "recharger2"
@@ -68,6 +69,8 @@ obj/machinery/recharger
return
else if(default_deconstruction_crowbar(user, G))
return
+ else if(default_part_replacement(user, G))
+ return
/obj/machinery/recharger/attack_hand(mob/user as mob)
if(istype(user,/mob/living/silicon))
@@ -95,7 +98,7 @@ obj/machinery/recharger
var/obj/item/modular_computer/C = charging
if(!C.battery_module.battery.fully_charged())
icon_state = icon_state_charging
- C.battery_module.battery.give(active_power_usage*CELLRATE)
+ C.battery_module.battery.give(CELLRATE*efficiency)
update_use_power(2)
else
icon_state = icon_state_charged
@@ -105,7 +108,7 @@ obj/machinery/recharger
var/obj/item/weapon/computer_hardware/battery_module/BM = charging
if(!BM.battery.fully_charged())
icon_state = icon_state_charging
- BM.battery.give(active_power_usage*CELLRATE)
+ BM.battery.give(CELLRATE*efficiency)
update_use_power(2)
else
icon_state = icon_state_charged
@@ -116,7 +119,7 @@ obj/machinery/recharger
if(istype(C))
if(!C.fully_charged())
icon_state = icon_state_charging
- C.give(active_power_usage*CELLRATE)
+ C.give(CELLRATE*efficiency)
update_use_power(2)
else
icon_state = icon_state_charged
@@ -153,13 +156,20 @@ obj/machinery/recharger
else
icon_state = icon_state_idle
+/obj/machinery/recharger/RefreshParts()
+ var/E = 0
+ for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts)
+ E += C.rating
+ efficiency = active_power_usage * (1+ (E - 1)*0.5)
+
/obj/machinery/recharger/wallcharger
name = "wall recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "wrecharger0"
plane = TURF_PLANE
layer = ABOVE_TURF_LAYER
- active_power_usage = 25000 //25 kW , It's more specialized than the standalone recharger (guns, batons, and flashlights only) so make it more powerful
+ active_power_usage = 60000 //60 kW , It's more specialized than the standalone recharger (guns, batons, and flashlights only) so make it more powerful
+ efficiency = 60000
allowed_devices = list(/obj/item/weapon/gun/energy, /obj/item/weapon/gun/magnetic, /obj/item/weapon/melee/baton, /obj/item/device/flashlight, /obj/item/weapon/cell/device)
icon_state_charged = "wrecharger2"
icon_state_charging = "wrecharger1"
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index f763304fc0e..e5263a173df 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -515,7 +515,8 @@
if(M)
S.icon_state = initial(S.icon_state)
S.icon = initial(S.icon)
- S.reagents.trans_to_mob(M, S.reagents.total_volume, CHEM_BLOOD)
+ if(M.can_inject())
+ S.reagents.trans_to_mob(M, S.reagents.total_volume, CHEM_BLOOD)
M.take_organ_damage(2)
S.visible_message(" [M] was hit by the syringe!")
break
@@ -667,9 +668,13 @@
else if(R.reagent_state == 2 && add_known_reagent(R.id,R.name))
occupant_message("Reagent analyzed, identified as [R.name] and added to database.")
send_byjax(chassis.occupant,"msyringegun.browser","reagents_form",get_reagents_form())
+<<<<<<< HEAD
else
occupant_message("Reagent \"[R.name]\" unable to be scanned, skipping.")
occupant_message("Analyzis complete.")
+=======
+ occupant_message("Analysis complete.")
+>>>>>>> 209cb36... Big Bugfix Bonanza (#6170)
return 1
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/add_known_reagent(r_id,r_name)
diff --git a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm
index a304184e254..6eb53a10f30 100644
--- a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm
+++ b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm
@@ -14,6 +14,10 @@
..()
network = using_map.station_networks
+/obj/item/weapon/circuitboard/security/tv
+ name = T_BOARD("security camera monitor - television")
+ build_path = /obj/machinery/computer/security/wooden_tv
+
/obj/item/weapon/circuitboard/security/engineering
name = T_BOARD("engineering camera monitor")
build_path = /obj/machinery/computer/security/engineering
diff --git a/code/game/objects/items/weapons/circuitboards/computer/computer.dm b/code/game/objects/items/weapons/circuitboards/computer/computer.dm
index c15d73036ac..8bc26a13f1d 100644
--- a/code/game/objects/items/weapons/circuitboards/computer/computer.dm
+++ b/code/game/objects/items/weapons/circuitboards/computer/computer.dm
@@ -21,6 +21,10 @@
name = T_BOARD("medical records console")
build_path = /obj/machinery/computer/med_data
+/obj/item/weapon/circuitboard/med_data/laptop
+ name = T_BOARD("medical records laptop")
+ build_path = /obj/machinery/computer/med_data/laptop
+
/obj/item/weapon/circuitboard/scan_consolenew
name = T_BOARD("DNA machine")
build_path = /obj/machinery/computer/scan_consolenew
diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm
index 1d449261e7e..28009030a35 100644
--- a/code/modules/clothing/spacesuits/miscellaneous.dm
+++ b/code/modules/clothing/spacesuits/miscellaneous.dm
@@ -17,7 +17,7 @@
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.02
item_flags = 0
- body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS
+ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/weapon/tank/emergency/oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
slowdown = 1.5
armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50)
diff --git a/code/modules/clothing/spacesuits/void/zaddat.dm b/code/modules/clothing/spacesuits/void/zaddat.dm
index cbf08d8c71b..103cf39c121 100644
--- a/code/modules/clothing/spacesuits/void/zaddat.dm
+++ b/code/modules/clothing/spacesuits/void/zaddat.dm
@@ -42,6 +42,7 @@
switch(suit_style)
if("Engineer")
name = "\improper Engineer's Guild Shroud"
+ base_name = "\improper Engineer's Guild Shroud"
desc = "This rugged Shroud was created by the Xozi Engineering Guild."
icon_state = "zaddat_engie"
item_state = "zaddat_engie"
@@ -52,6 +53,7 @@
helmet.item_state = "zaddat_engie"
if("Spacer")
name = "\improper Spacer's Guild Shroud"
+ base_name = "\improper Spacer's Guild Shroud"
desc = "The blue plastic Shroud worn by members of the Zaddat Spacer's Guild."
icon_state = "zaddat_spacer"
item_state = "zaddat_spacer"
@@ -62,6 +64,7 @@
helmet.item_state = "zaddat_spacer"
if("Knight")
name = "\improper Knight's Shroud"
+ base_name = "\improper Knight's Shroud"
desc = "This distinctive steel-plated Shroud was popularized by the Noble Guild."
icon_state = "zaddat_knight"
item_state = "zaddat_knight"
@@ -72,6 +75,7 @@
helmet.item_state = "zaddat_knight"
if("Fashion")
name = "\improper Avazi House Shroud"
+ base_name = "\improper Avazi House Shroud"
desc = "The designers of the Avazi Fashion House are among the most renowned in Zaddat society, and their Shroud designs second to none."
icon_state = "zaddat_fashion"
item_state = "zaddat_fashion"
@@ -82,6 +86,7 @@
helmet.item_state = "zaddat_fashion"
if("Bishop")
name = "\improper Bishop-patterned Shroud"
+ base_name = "\improper Bishop-patterned Shroud"
desc = "The bold designers of the Dzaz Fashion House chose to make this Bishop-themed Shroud design as a commentary on the symbiotic nature of Vanax and human culture. Allegedly."
icon_state = "zaddat_bishop"
item_state = "zaddat_bishop"
@@ -92,6 +97,7 @@
helmet.item_state = "zaddat_bishop"
if("Rugged")
name = "rugged Shroud"
+ base_name = "rugged Shroud"
desc = "This Shroud was patterned after from First Contact era human voidsuits."
icon_state = "zaddat_rugged"
item_state = "zaddat_rugged"
diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm
index 3b2d8eb11e8..2372def546d 100644
--- a/code/modules/mob/living/bot/secbot.dm
+++ b/code/modules/mob/living/bot/secbot.dm
@@ -137,7 +137,7 @@
/mob/living/bot/secbot/attackby(var/obj/item/O, var/mob/user)
var/curhealth = health
. = ..()
- if(health < curhealth)
+ if(health < curhealth && on == 1)
react_to_attack(user)
/mob/living/bot/secbot/bullet_act(var/obj/item/projectile/P)
diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm
index dadf02f7038..ad0ceb7f624 100644
--- a/code/modules/mob/living/carbon/human/human_attackhand.dm
+++ b/code/modules/mob/living/carbon/human/human_attackhand.dm
@@ -27,6 +27,8 @@
if(!temp || !temp.is_usable())
H << "You can't use your hand."
return
+ if(H.lying)
+ return
M.break_cloak()
..()
@@ -105,7 +107,7 @@
spawn(30)
cpr_time = 1
- H.visible_message("\The [H] is trying perform CPR on \the [src]!")
+ H.visible_message("\The [H] is trying to perform CPR on \the [src]!")
if(!do_after(H, 30))
return
@@ -135,6 +137,7 @@
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
if(buckled)
M << "You cannot grab [src], [TT.he] is buckled in!"
+ return
if(!G) //the grab will delete itself in New if affecting is anchored
return
M.put_in_active_hand(G)
diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm
index 048a91271bb..c8b02f02b82 100644
--- a/code/modules/organs/organ_external.dm
+++ b/code/modules/organs/organ_external.dm
@@ -952,6 +952,13 @@ Note that amputating the affected organ does in fact remove the infection from t
qdel(src)
+ if(victim.l_hand)
+ if(istype(victim.l_hand,/obj/item/weapon/material/twohanded)) //if they're holding a two-handed weapon, drop it now they've lost a hand
+ victim.l_hand.update_held_icon()
+ if(victim.r_hand)
+ if(istype(victim.r_hand,/obj/item/weapon/material/twohanded))
+ victim.r_hand.update_held_icon()
+
/****************************************************
HELPERS
****************************************************/
diff --git a/html/changelogs/mistyLuminescence - bugfix.yml b/html/changelogs/mistyLuminescence - bugfix.yml
new file mode 100644
index 00000000000..b33e3f0786d
--- /dev/null
+++ b/html/changelogs/mistyLuminescence - bugfix.yml
@@ -0,0 +1,42 @@
+################################
+# Example Changelog File
+#
+# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
+#
+# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
+# When it is, any changes listed below will disappear.
+#
+# Valid Prefixes:
+# bugfix
+# wip (For works in progress)
+# tweak
+# soundadd
+# sounddel
+# rscadd (general adding of nice things)
+# rscdel (general deleting of nice things)
+# imageadd
+# imagedel
+# maptweak
+# spellcheck (typo fixes)
+# experiment
+#################################
+
+# Your name.
+author: mistyLuminescence
+
+# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
+delete-after: True
+
+# Any changes you've made. See valid prefix list above.
+# INDENT WITH TWO SPACES. NOT TABS. SPACES.
+# SCREW THIS UP AND IT WON'T WORK.
+# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
+# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
+changes:
+ - bugfix: Prone people can no longer interact with an empty hand.
+ - bugfix: Two-handed items are now correctly unwielded when the user's offhand is severed.
+ - bugfix: Mecha syringe guns now respect pierceproof clothing.
+ - bugfix: Securitrons now correctly ignore attacks when disabled.
+ - bugfix: Rechargers now correctly benefit from upgraded capacitors.
+ - bugfix: Medical record laptops and detective TV camera consoles no longer turn into regular consoles when de- and re-constructed.
+ - bugfix: Zaddat Shrouds now retain their base name when damaged, if the shroud has been customized.