WT Rework and Nerf (#20536)

* Reworks and nerfs WTs

* Removes some duplicate comments

* Makes WT ammo box's normal sized items because I forgot to at first

* Adds a var to WT mags to check if they are being loaded to prevent people from queueing up multiple reload processes at once

* Sanity checks work properly now

* Implements changes requested, empty magazines now available from RND, ammo crate contains 5 full magazines, mag size set back to 20, magazines made normal sized items and fit in assault belt

* Update code/__HELPERS/mob_helpers.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/__HELPERS/mob_helpers.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Magazines fit in security webbings

* I forgot a comma

* Apply suggestions from code review

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>

* Applying various reviewer suggestions

* Applies various suggestions

* removes moving_do_after now that its a param

* Apply suggestions from code review

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

* solves the merge conflict hopefully

* step one of trying to fix conflict again

* step two hopefully fixes conflict

* Delete ammo.dmi

* Merge branch 'master' into wt-rework

* Apply suggestions from code review

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>

* Applying various reviewer suggestions

* Revert "Applying various reviewer suggestions"

This reverts commit 7081e9aa2b.

* Revert "Apply suggestions from code review"

This reverts commit 96dab4f8b8.

* Revert "Merge branch 'master' into wt-rework"

This reverts commit 6906a67654.

* Merge branch 'master' into wt-rework

* please god work

* Update code/modules/projectiles/ammunition.dm

* Update code/modules/projectiles/ammunition/magazines.dm

---------

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
Samman166
2023-05-25 18:41:56 +02:00
committed by GitHub
co-authored by Henri215 S34N SteelSlayer Farie82
parent 8b7f4c8b69
commit 49b26c4eba
8 changed files with 150 additions and 31 deletions
+5 -2
View File
@@ -52,6 +52,8 @@
/obj/item/ammo_casing/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/ammo_box))
var/obj/item/ammo_box/box = I
if(box.slow_loading)
return
if(isturf(loc))
var/boolets = 0
for(var/obj/item/ammo_casing/bullet in loc)
@@ -130,10 +132,11 @@
var/multi_sprite_step = AMMO_MULTI_SPRITE_STEP_NONE // see update_icon_state() for details
var/caliber
var/multiload = 1
var/slow_loading = FALSE
var/list/initial_mats //For calculating refund values.
/obj/item/ammo_box/New()
..()
/obj/item/ammo_box/Initialize(mapload)
. = ..()
for(var/i in 1 to max_ammo)
stored_ammo += new ammo_type(src)
update_appearance(UPDATE_DESC|UPDATE_ICON)
@@ -65,6 +65,30 @@
ammo_type = /obj/item/ammo_casing/n762
max_ammo = 14
/obj/item/ammo_box/wt550
name = "ammo box (4.6x30mm)"
icon_state = "riflebox"
origin_tech = "combat=2"
ammo_type = /obj/item/ammo_casing/c46x30mm
w_class = WEIGHT_CLASS_NORMAL
max_ammo = 20
multiload = 0
/obj/item/ammo_box/wt550/wtap
name = "ammo box (Armor Piercing 4.6x30mm)"
icon_state = "wtbox_AP"
ammo_type = /obj/item/ammo_casing/c46x30mm/ap
/obj/item/ammo_box/wt550/wtic
name = "ammo box (Incendiary 4.6x30mm)"
icon_state = "wtbox_inc"
ammo_type = /obj/item/ammo_casing/c46x30mm/inc
/obj/item/ammo_box/wt550/wttx
name = "ammo box (Toxin Tipped 4.6x30mm)"
icon_state = "wtbox_tox"
ammo_type = /obj/item/ammo_casing/c46x30mm/tox
/obj/item/ammo_box/laser
name = "ammo box (laser)"
icon_state = "laserbox"
@@ -154,8 +154,8 @@
max_ammo = 6
multiload = 0
/obj/item/ammo_box/magazine/internal/rus357/New()
..()
/obj/item/ammo_box/magazine/internal/rus357/Initialize(mapload)
. = ..()
stored_ammo.Cut() // We only want 1 bullet in there
stored_ammo += new ammo_type(src)
@@ -258,6 +258,37 @@
caliber = "4.6x30mm"
max_ammo = 20
multi_sprite_step = 4
multiload = 0
slow_loading = TRUE
w_class = WEIGHT_CLASS_NORMAL
///A var to check if the mag is being loaded
var/being_loaded = FALSE
/// There are two reloading processes ongoing so cancel them
var/double_loaded = FALSE
/obj/item/ammo_box/magazine/wt550m9/attackby(obj/item/A, mob/user, params)
if(istype(A, /obj/item/ammo_casing))
var/obj/item/ammo_casing/AC = A
if(give_round(AC))
user.drop_item()
AC.loc = src
return
if(istype(A, /obj/item/ammo_box/wt550) || istype(A, /obj/item/ammo_box/magazine/wt550m9))
to_chat(user, "<span class='notice'>You begin to load the magazine with [A].</span>")
var/obj/item/ammo_box/AB = A
for(var/obj/item/ammo_casing/AC in AB.stored_ammo)
if(length(stored_ammo) >= max_ammo)
to_chat(user, "<span class='notice'>You stop loading the magazine with [A].</span>")
break
if(do_after_once(user, 0.5 SECONDS, target = src, allow_moving = TRUE, must_be_held = TRUE, attempt_cancel_message = "<span class='notice'>You stop loading the magazine with [A].</span>"))
src.give_round(AC)
AB.stored_ammo -= AC
update_mat_value()
update_appearance(UPDATE_DESC|UPDATE_ICON_STATE)
AB.update_appearance(UPDATE_DESC|UPDATE_ICON_STATE)
playsound(src, 'sound/weapons/gun_interactions/bulletinsert.ogg', 50, 1)
else
break
/obj/item/ammo_box/magazine/wt550m9/wtap
name = "wt550 magazine (Armour Piercing 4.6x30mm)"
@@ -274,6 +305,16 @@
icon_state = "46x30mmtI"
ammo_type = /obj/item/ammo_casing/c46x30mm/inc
/obj/item/ammo_box/magazine/wt550m9/empty
name = "wt550 magazine (4.6x30mm)"
icon_state = "46x30mmt"
ammo_type = /obj/item/ammo_casing/c46x30mm
/obj/item/ammo_box/magazine/wt550m9/empty/Initialize(mapload)
. = ..()
stored_ammo.Cut()
update_appearance(UPDATE_DESC|UPDATE_ICON)
/obj/item/ammo_box/magazine/uzim9mm
name = "uzi magazine (9mm)"
icon_state = "uzi9mm"