Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds safety logging for quick equip baguloosing #36710

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/game/objects/items/devices/PDA/PDA.dm
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ var/global/msg_id = 0
(istype(I,/obj/item/weapon/spacecash) && id && id.virtual_wallet)

/obj/item/device/pda/quick_store(var/obj/item/I,mob/user)
..()
return !(attackby(I,user))

/obj/item/device/pda/proc/add_to_virtual_wallet(var/amount, var/mob/user, var/atom/giver)
Expand Down
9 changes: 9 additions & 0 deletions code/game/objects/items/weapons/storage/bluespace.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@
user.drop_item(src)
qdel(user)

/obj/item/weapon/storage/backpack/holding/quick_store(var/obj/item/I,mob/user)
if(user?.client)
var/list/recursive_list = recursive_type_check(I, /obj/item/weapon/storage/backpack/holding)
if(recursive_list.len)
var/report = " created a baguloose from quick equipping in [(world.time - user.client.last_quick_stored) / 10] seconds, might be worth noting."
message_admins("[key_name_admin(user)][report]") // any info about the baguloose is shown below anyways
log_game("[key_name(user)][report]")
return ..()

/obj/item/weapon/storage/backpack/holding/handle_item_insertion(obj/item/W, prevent_warning)
. = ..()
if(W == src)
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/weapons/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@
return can_be_inserted(I,1)

/obj/item/weapon/storage/quick_store(var/obj/item/I,mob/user)
..()
return handle_item_insertion(I,0)

//Call this proc to handle the removal of an item from the storage item. The item will be moved to the atom sent as new_target
Expand Down
5 changes: 5 additions & 0 deletions code/game/objects/objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,12 @@ a {
/obj/proc/can_quick_store(var/obj/item/I) //proc used to check that the current object can store another through quick equip
return 0

/client
var/last_quick_stored = 0

/obj/proc/quick_store(var/obj/item/I,mob/user) //proc used to handle quick storing
if(user?.client)
user.client.last_quick_stored = world.time
return 0

/**
Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
return 1

/obj/item/clothing/quick_store(var/obj/item/I,mob/user)
..()
for(var/obj/item/clothing/accessory/storage/A in accessories)
if(A.hold && A.hold.handle_item_insertion(I,0))
return 1
Expand Down
Loading