Skip to content

Commit

Permalink
sigh
Browse files Browse the repository at this point in the history
  • Loading branch information
silicons committed Nov 6, 2024
1 parent ccc1c28 commit 2b2f929
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
7 changes: 4 additions & 3 deletions code/__HELPERS/type_processing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
/obj/item/mecha_parts/mecha_equipment/weapon = "//mech_weapon",
/obj/item/mecha_parts = "//mech_part",
/obj/item/organ = "//organ",
/obj/item/gun/ballistic = "//ballistic",
/obj/item/gun/energy = "//energy",
/obj/item/gun/magnetic = "//magnetic",
/obj/item/gun_attachment = "//gun-attachment",
/obj/item/gun/ballistic = "//gun-ballistic",
/obj/item/gun/energy = "//gun-energy",
/obj/item/gun/magnetic = "//gun-magnetic",
/obj/item/gun = "//gun",
/obj/item/ammo_casing = "//ammo",
/obj/item/ammo_magazine = "//magazine",
Expand Down
14 changes: 8 additions & 6 deletions code/modules/mob/inventory/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@
if(!shieldcall.shields_in_inventory)
continue
user.unregister_shieldcall(shieldcall)
// fire signals
. = SEND_SIGNAL(src, COMSIG_ITEM_DROPPED, user, flags, newLoc)
SEND_SIGNAL(user, COMSIG_MOB_ITEM_DROPPED, src, flags, newLoc)

//! LEGACY
hud_unlayerise()
Expand All @@ -136,6 +133,10 @@
zoom() //binoculars, scope, etc
//! END

// fire signals
. = SEND_SIGNAL(src, COMSIG_ITEM_DROPPED, user, flags, newLoc)
SEND_SIGNAL(user, COMSIG_MOB_ITEM_DROPPED, src, flags, newLoc)

if((item_flags & ITEM_DROPDEL) && !(flags & INV_OP_DELETING))
qdel(src)
. |= ITEM_RELOCATED_BY_DROPPED
Expand Down Expand Up @@ -170,9 +171,6 @@
user.register_shieldcall(shieldcall)
// storage stuff
obj_storage?.on_pickup(user)
// fire signals
SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user, flags, oldLoc)
SEND_SIGNAL(user, COMSIG_MOB_ITEM_PICKUP, src, flags, oldLoc)

//! LEGACY
reset_pixel_offsets()
Expand All @@ -183,6 +181,10 @@
playsound(src, pickup_sound, 20, ignore_walls = FALSE)
//! END

// fire signals
SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user, flags, oldLoc)
SEND_SIGNAL(user, COMSIG_MOB_ITEM_PICKUP, src, flags, oldLoc)

/**
* update our worn icon if we can
*/
Expand Down
4 changes: 4 additions & 0 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,10 @@
if(holding_mob)
attachment.unregister_attachment_actions(holding_mob)
attachment.on_detach(src)
// be extra extra extra EXTRA sure it doesn't still have an overlay
// todo: once we figure out why this is happening we should ASSERT() it to catch shitcode
if(attachment.gun_applied_overlay)
cut_overlay(attachment.gun_applied_overlay, TRUE)
on_attachment_uninstall(attachment)
attachment.attached = null
LAZYREMOVE(attachments, attachment)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/gun_attachment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
var/gun_state
/// the current applied overlay
///
/// * only the gun can modify this, and you shouldn't be using this for anything in a non-read-only
/// * only update_gun_overlay() can modify this, and you shouldn't be using this for anything in a non-read-only
/// context. no, you are not special; there's no exceptions
var/appearance/gun_applied_overlay

Expand Down

0 comments on commit 2b2f929

Please sign in to comment.