Skip to content

Commit

Permalink
[MIRROR] Fixes cyborg omnitool combat behaviour. (#2511) (#3341)
Browse files Browse the repository at this point in the history
* Fixes cyborg omnitool combat behaviour. (#83243)

## About The Pull Request
Fixes engineering cyborg omnitool from choosing the wrong reference for
the screwdriver and crowbar. Also fixes cyborg omnitool not transferring
the wound_bonus, bare_wound_bonus, and armour_penetration.
## Why It's Good For The Game
So they behave naturally.
## Changelog
:cl:
fix: Fixes engineering cyborg screwdriver not being pointy. Fixes
engineering cyborg crowbar from being pointy.
fix: Fixes cyborg omnitools not using the correct wound bonus and armour
penetration values.
/:cl:

* Fixes cyborg omnitool combat behaviour.

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Pickle-Coding <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
4 people authored May 16, 2024
1 parent ca00b87 commit 38e18a3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions code/game/objects/items/robot/items/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,16 @@
if(isnull(reference))
sharpness = NONE
force = initial(force)
wound_bonus = 0
bare_wound_bonus = 0
armour_penetration = 0
hitsound = initial(hitsound)
usesound = initial(usesound)
else
force = initial(reference.force)
wound_bonus = reference::wound_bonus
bare_wound_bonus = reference::bare_wound_bonus
armour_penetration = reference::armour_penetration
sharpness = initial(reference.sharpness)
hitsound = initial(reference.hitsound)
usesound = initial(reference.usesound)
Expand Down Expand Up @@ -372,10 +378,10 @@
RemoveElement(/datum/element/eyestab)
switch(tool_behaviour)
if(TOOL_SCREWDRIVER)
reference = /obj/item/crowbar
reference = /obj/item/screwdriver
AddElement(/datum/element/eyestab)
if(TOOL_CROWBAR)
reference = /obj/item/surgicaldrill
reference = /obj/item/crowbar
if(TOOL_WRENCH)
reference = /obj/item/wrench
if(TOOL_WIRECUTTER)
Expand Down

0 comments on commit 38e18a3

Please sign in to comment.