Skip to content

Commit 6413f87

Browse files
authored
Logging for equipping a weapon (Monkestation#976)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- Note: PRs including balance changes authored by anyone other than maintainers and official devs will not be considered. --> ## About The Pull Request Logs weapon equipping <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review or prevent the PR from being merged! --> ## Why It's Good For The Game admins want it <!-- Please add a short description of why you think these changes would benefit the game. If you can't justify it in words, it might not be worth adding. --> ## Pre-Merge Checklist <!-- Don't bother filling these in while creating your Pull Request, just click the checkboxes after the Pull Request is opened and you are redirected to the page. --> - [ ] You tested this on a local server. - [ ] This code did not runtime during testing. - [ ] You documented all of your changes. <!-- Neither the compiler nor workflow checks are perfect at detecting runtimes and errors. It is important to test your code/feature/fix locally. -->
1 parent 5e25ef3 commit 6413f87

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

code/modules/mob/inventory.dm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@
176176
hud_used.throw_icon?.update_icon()
177177
hud_used.give_intent?.update_icon()
178178
givingto = null
179+
if((istype(I, /obj/item/weapon) || istype(I, /obj/item/gun) || I.force >= 15) && !forced && client)
180+
// is this the right hand?
181+
var/right_hand = FALSE
182+
if(hand_index == LEFT_HANDS)
183+
right_hand = TRUE
184+
log_message("[key_name(src)] has equipped [I] in their [right_hand ? "right hand" : "left hand"], combat mode: [cmode ? "COMBAT" : "PASSIVE"].", LOG_ATTACK, color="#3333ff") // into attack logs
179185
return hand_index
180186

181187
//Puts the item into the first available left hand if possible and calls all necessary triggers/updates. returns 1 on success.

0 commit comments

Comments
 (0)