diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 66efb08bedec..7721a9643fb5 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -16,6 +16,26 @@ ///TRUE Means that it closes a flap over its contents, and therefore update_icon should lift that flap when opened. If it doesn't have _half and _full iconstates, this doesn't matter either way. var/flap = TRUE +/obj/item/storage/belt/gun/flaregun/dump_into(obj/item/storage/origin_storage, mob/user) + + if(length(holstered_guns) < 1 && length(contents) >= (storage_slots-1)) + + to_chat(user, SPAN_WARNING("[src] is full.")) + return FALSE + return ..() + +/obj/item/storage/belt/gun/flaregun/handle_item_insertion(obj/item/new_item, prevent_warning = FALSE, mob/user) + + if(istype(new_item, /obj/item/device/flashlight/flare) && length(holstered_guns) < 1 && length(contents) >= (storage_slots-1)) + return FALSE + return ..() + +/obj/item/storage/belt/gun/flaregun/has_room(obj/item/new_item, W_class_override = null) + + if(istype(new_item, /obj/item/device/flashlight/flare) && length(holstered_guns) < 1 && length(contents) >= (storage_slots-1)) + return FALSE //No slot open because gun in holster. + return ..() + /obj/item/storage/belt/equipped(mob/user, slot) switch(slot) if(WEAR_WAIST, WEAR_J_STORE, WEAR_BACK) @@ -766,7 +786,7 @@ for(var/i = 1 to storage_slots) new /obj/item/weapon/throwing_knife(src) -/obj/item/storage/belt/knifepouch/_item_insertion(obj/item/W, prevent_warning = 0) +/obj/item/storage/belt/knifepouch/_item_insertion(obj/item/new_item, prevent_warning = FALSE) ..() playsound(src, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE) @@ -913,6 +933,7 @@ for(var/slot in holster_slots) if(AM == holster_slots[slot]["gun"]) holster_slots[slot]["gun"] = null + update_gun_icon(slot) return @@ -988,7 +1009,7 @@ to_chat(usr, SPAN_WARNING("[src] can't hold any more ammo.")) return FALSE -/obj/item/storage/belt/gun/_item_insertion(obj/item/W, prevent_warning = 0) +/obj/item/storage/belt/gun/_item_insertion(obj/item/W, prevent_warning = FALSE) if(isgun(W)) holstered_guns += W for(var/slot in holster_slots) diff --git a/code/game/objects/items/storage/storage.dm b/code/game/objects/items/storage/storage.dm index 36f946efdfdc..5a6b7d2b9b05 100644 --- a/code/game/objects/items/storage/storage.dm +++ b/code/game/objects/items/storage/storage.dm @@ -31,7 +31,6 @@ var/storage_flags = STORAGE_FLAGS_DEFAULT var/has_gamemode_skin = FALSE ///Whether to use map-variant skins. - /obj/item/storage/MouseDrop(obj/over_object as obj) if(CAN_PICKUP(usr, src)) if(over_object == usr) // this must come before the screen objects only block @@ -378,12 +377,12 @@ var/list/global/item_storage_box_cache = list() return ///Returns TRUE if there is room for the given item. W_class_override allows checking for just a generic W_class, meant for checking shotgun handfuls without having to spawn and delete one just to check. -/obj/item/storage/proc/has_room(obj/item/W as obj, W_class_override = null) +/obj/item/storage/proc/has_room(obj/item/new_item, W_class_override = null) if(storage_slots != null && contents.len < storage_slots) return TRUE //At least one open slot. //calculate storage space only for containers that don't have slots if (storage_slots == null) - var/sum_storage_cost = W_class_override ? W_class_override : W.get_storage_cost() //Takes the override if there is one, the given item otherwise. + var/sum_storage_cost = W_class_override ? W_class_override : new_item.get_storage_cost() //Takes the override if there is one, the given item otherwise. for(var/obj/item/I in contents) sum_storage_cost += I.get_storage_cost() //Adds up the combined storage costs which will be in the storage item if the item is added to it. @@ -455,23 +454,23 @@ That's done by can_be_inserted(). Its checks are whether the item exists, is an The stop_warning parameter will stop the insertion message from being displayed. It is intended for cases where you are inserting multiple items at once, such as when picking up all the items on a tile with one click. user can be null, it refers to the potential mob doing the insertion.**/ -/obj/item/storage/proc/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user) - if(!istype(W)) +/obj/item/storage/proc/handle_item_insertion(obj/item/new_item, prevent_warning = FALSE, mob/user) + if(!istype(new_item)) return FALSE - if(user && W.loc == user) - if(!user.drop_inv_item_to_loc(W, src)) + if(user && new_item.loc == user) + if(!user.drop_inv_item_to_loc(new_item, src)) return FALSE else - W.forceMove(src) + new_item.forceMove(src) - _item_insertion(W, prevent_warning, user) + _item_insertion(new_item, prevent_warning, user) return TRUE /**Inserts the item. Separate proc because handle_item_insertion isn't guaranteed to insert and it therefore isn't safe to override it before calling parent. Updates icon when done. Can be called directly but only if the item was spawned inside src - handle_item_insertion is safer. W is always an item. stop_warning prevents messaging. user may be null.**/ -/obj/item/storage/proc/_item_insertion(obj/item/W, prevent_warning = 0, mob/user) +/obj/item/storage/proc/_item_insertion(obj/item/W, prevent_warning = FALSE, mob/user) W.on_enter_storage(src) if(user) if (user.client && user.s_active != src) @@ -721,25 +720,26 @@ W is always an item. stop_warning prevents messaging. user may be null.**/ to_chat(user, SPAN_WARNING("[ammo_dumping] is empty.")) return TRUE -/obj/item/storage/proc/dump_into(obj/item/storage/M, mob/user) +/obj/item/storage/proc/dump_into(obj/item/storage/origin_storage, mob/user) + if(user.action_busy) return - if(!M.contents.len) - to_chat(user, SPAN_WARNING("[M] is empty.")) + if(!origin_storage.contents.len) + to_chat(user, SPAN_WARNING("[origin_storage] is empty.")) return - if(!has_room(M.contents[1])) //Does it have room for the first item to be inserted? + if(!has_room(origin_storage.contents[1])) //Does it have room for the first item to be inserted? to_chat(user, SPAN_WARNING("[src] is full.")) return - to_chat(user, SPAN_NOTICE("You start refilling [src] with [M].")) + to_chat(user, SPAN_NOTICE("You start refilling [src] with [origin_storage].")) if(!do_after(user, 1.5 SECONDS, INTERRUPT_ALL, BUSY_ICON_GENERIC)) return - for(var/obj/item/I in M) - if(!has_room(I)) + for(var/obj/item/new_item in origin_storage) + if(!has_room(new_item)) break - M.remove_from_storage(I) - handle_item_insertion(I, TRUE, user) //quiet insertion + origin_storage.remove_from_storage(new_item) + handle_item_insertion(new_item, TRUE, user) //quiet insertion playsound(user.loc, "rustle", 15, TRUE, 6) return TRUE diff --git a/code/modules/projectiles/guns/specialist.dm b/code/modules/projectiles/guns/specialist.dm index 184c0ed38266..7152106869a9 100644 --- a/code/modules/projectiles/guns/specialist.dm +++ b/code/modules/projectiles/guns/specialist.dm @@ -580,7 +580,7 @@ /obj/item/weapon/gun/rifle/m4ra_custom/set_gun_attachment_offsets() - attachable_offset = list("muzzle_x" = 43, "muzzle_y" = 17,"rail_x" = 23, "rail_y" = 21, "under_x" = 30, "under_y" = 11, "stock_x" = 24, "stock_y" = 13, "special_x" = 37, "special_y" = 16) + attachable_offset = list("muzzle_x" = 43, "muzzle_y" = 17,"rail_x" = 23, "rail_y" = 21, "under_x" = 30, "under_y" = 11, "stock_x" = 24, "stock_y" = 13, "special_x" = 39, "special_y" = 17) /obj/item/weapon/gun/rifle/m4ra_custom/set_gun_config_values() ..() diff --git a/html/changelogs/AutoChangeLog-pr-4192.yml b/html/changelogs/AutoChangeLog-pr-4192.yml deleted file mode 100644 index cf75c5562e04..000000000000 --- a/html/changelogs/AutoChangeLog-pr-4192.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: "Drathek" -delete-after: True -changes: - - bugfix: "Fixed mapped in maps for solaris ridge not opening correctly." - - refactor: "Refactored current_map to use a global list instead to remove the need for duplicate definitions." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-4196.yml b/html/changelogs/AutoChangeLog-pr-4196.yml deleted file mode 100644 index 70f42836a8de..000000000000 --- a/html/changelogs/AutoChangeLog-pr-4196.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Drathek" -delete-after: True -changes: - - ui: "Fix Hotkeys TGUI lag and the inability to map Ctrl + R. Also now offers a little bit more time to map combinations of keys." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-4202.yml b/html/changelogs/AutoChangeLog-pr-4202.yml new file mode 100644 index 000000000000..e744587580fb --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-4202.yml @@ -0,0 +1,4 @@ +author: "CapCamIII" +delete-after: True +changes: + - bugfix: "fixes the offset on m4ra custom barrel, it should appropriately be sat right on the gun sprite" \ No newline at end of file diff --git a/html/changelogs/archive/2023-08.yml b/html/changelogs/archive/2023-08.yml index 097cc288fa17..6e252ade22b8 100644 --- a/html/changelogs/archive/2023-08.yml +++ b/html/changelogs/archive/2023-08.yml @@ -272,3 +272,14 @@ - maptweak: Replaces some cave walls on LV624 with junglewalls (nothing will change gameplay wise) - maptweak: Adds bin to Research Chem/Req room and moves item blocking pillbox +2023-08-19: + Drathek: + - bugfix: Fixed mapped in maps for solaris ridge not opening correctly. + - refactor: Refactored current_map to use a global list instead to remove the need + for duplicate definitions. + - ui: Fix Hotkeys TGUI lag and the inability to map Ctrl + R. Also now offers a + little bit more time to map combinations of keys. +2023-08-20: + Huffie56: + - bugfix: prevent belt flare being filled by dump in action leaving no space for + flare gun.