mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
MG42 m8
This commit is contained in:
@@ -56,4 +56,27 @@
|
||||
|
||||
/obj/item/ammo_magazine/gl9mm/practice
|
||||
name = "glock magazine (9mm practice)"
|
||||
ammo_type = /obj/item/ammo_casing/c9mmp
|
||||
ammo_type = /obj/item/ammo_casing/c9mmp
|
||||
|
||||
/******* MG42 ********/
|
||||
/obj/item/ammo_magazine/mg42
|
||||
name = "drum mag (7.92x57mm Mauser)"
|
||||
icon = 'icons/obj/gun_yw.dmi'
|
||||
icon_state = "mg42_75rnd"
|
||||
caliber = "mauser"
|
||||
ammo_type = /obj/item/ammo_casing/mg42
|
||||
max_ammo = 75
|
||||
multiple_sprites = 0
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
mag_type = MAGAZINE
|
||||
origin_tech = list(TECH_COMBAT = 2)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 10000)
|
||||
|
||||
/obj/item/ammo_casing/mg42
|
||||
desc = "A 7.92<EFBFBD>57mm Mauser casing."
|
||||
icon_state = "rifle-casing"
|
||||
caliber = "mauser"
|
||||
projectile_type = /obj/item/projectile/bullet/rifle/a762
|
||||
|
||||
/obj/item/ammo_magazine/mg42/empty
|
||||
initial_ammo = 0
|
||||
70
code/modules/projectiles/guns/projectile/automatic_yw.dm
Normal file
70
code/modules/projectiles/guns/projectile/automatic_yw.dm
Normal file
@@ -0,0 +1,70 @@
|
||||
/obj/item/weapon/gun/projectile/automatic/mg42
|
||||
name = "MG42"
|
||||
desc = "Entfesseln die Holle" //Unleash the hell
|
||||
icon = 'icons/obj/gun_yw.dmi'
|
||||
icon_state = "mg42closed"
|
||||
item_state = "mg42closed"
|
||||
w_class = ITEMSIZE_LARGE
|
||||
force = 10
|
||||
slot_flags = 0
|
||||
max_shells = 75
|
||||
caliber = "mauser"
|
||||
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 1, TECH_ILLEGAL = 2)
|
||||
ammo_type = "/obj/item/ammo_casing/mg42" // Is this really needed anymore?
|
||||
fire_sound = 'sound/weapons/mg42.ogg'
|
||||
load_method = MAGAZINE
|
||||
magazine_type = /obj/item/ammo_magazine/mg42
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/mg42)
|
||||
burst_delay = 0.5
|
||||
|
||||
one_handed_penalty = 6
|
||||
|
||||
firemodes = list(
|
||||
list(mode_name="semiauto", burst=1, fire_delay=0, move_delay=null, burst_accuracy=null, dispersion=null),
|
||||
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0)),
|
||||
list(mode_name="short bursts", burst=5, move_delay=6, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2)),
|
||||
list(mode_name="15-round bursts.. unleash hell", burst=15, move_delay=6, burst_accuracy = list(0,-1,-1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2))
|
||||
)
|
||||
|
||||
var/cover_open = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/mg42/special_check(mob/user)
|
||||
if(cover_open)
|
||||
user << "<span class='warning'>[src]'s cover is open! Close it before firing!</span>"
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/mg42/proc/toggle_cover(mob/user)
|
||||
cover_open = !cover_open
|
||||
user << "<span class='notice'>You [cover_open ? "open" : "close"] [src]'s cover.</span>"
|
||||
update_icon()
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/mg42/attack_self(mob/user as mob)
|
||||
if(cover_open)
|
||||
toggle_cover(user) //close the cover
|
||||
else
|
||||
return ..() //once closed, behave like normal
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/mg42/attack_hand(mob/user as mob)
|
||||
if(!cover_open && user.get_inactive_hand() == src)
|
||||
toggle_cover(user) //open the cover
|
||||
else
|
||||
return ..() //once open, behave like normal
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/mg42/update_icon()
|
||||
icon_state = "mg42[cover_open ? "open" : "closed"][ammo_magazine ? "" : "-empty"]"
|
||||
item_state = "mg42[cover_open ? "open" : "closed"][ammo_magazine ? "" : "-empty"]"
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/mg42/load_ammo(var/obj/item/A, mob/user)
|
||||
if(!cover_open)
|
||||
user << "<span class='warning'>You need to open the cover to load [src].</span>"
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/mg42/unload_ammo(mob/user, var/allow_dump=1)
|
||||
if(!cover_open)
|
||||
user << "<span class='warning'>You need to open the cover to unload [src].</span>"
|
||||
return
|
||||
..()
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
sound/weapons/mg42.ogg
Normal file
BIN
sound/weapons/mg42.ogg
Normal file
Binary file not shown.
@@ -1932,6 +1932,7 @@
|
||||
#include "code\modules\projectiles\guns\launcher\syringe_gun.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\automatic.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\automatic_vr.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\automatic_yw.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\boltaction.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\dartgun.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\pistol.dm"
|
||||
|
||||
Reference in New Issue
Block a user