mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-27 10:32:40 +00:00
Donk-Soft! (#8305)
* Initial port * Various fixes * Doomguy Costume Addition Halloween just around the corner, I wanted to add a costume that uses the new toy guns. * Merge conflict, fixes
This commit is contained in:
@@ -22,7 +22,33 @@
|
||||
*/
|
||||
/************************************************************************/
|
||||
|
||||
///////// Foam /////////
|
||||
|
||||
/obj/item/ammo_magazine/mfoam_dart/pistol
|
||||
name = "\improper Donk-Soft pistol magazine"
|
||||
icon_state = "45"
|
||||
mag_type = MAGAZINE
|
||||
ammo_type = /obj/item/ammo_casing/afoam_dart
|
||||
matter = list(MAT_PLASTIC = 250)
|
||||
caliber = "foam"
|
||||
max_ammo = 9
|
||||
multiple_sprites = 1
|
||||
|
||||
/obj/item/ammo_magazine/mfoam_dart/pistol/empty
|
||||
initial_ammo = 0
|
||||
|
||||
/obj/item/ammo_magazine/mfoam_dart/smg
|
||||
name = "\improper Donk-Soft smg magazine"
|
||||
icon_state = "10mm"
|
||||
mag_type = MAGAZINE
|
||||
ammo_type = /obj/item/ammo_casing/afoam_dart
|
||||
matter = list(MAT_PLASTIC = 250)
|
||||
caliber = "foam"
|
||||
max_ammo = 20
|
||||
multiple_sprites = 1
|
||||
|
||||
/obj/item/ammo_magazine/mfoam_dart/pistol/smg
|
||||
initial_ammo = 0
|
||||
|
||||
///////// .357 /////////
|
||||
|
||||
|
||||
@@ -19,6 +19,20 @@
|
||||
*/
|
||||
/************************************************************************/
|
||||
|
||||
/*
|
||||
* Foam
|
||||
*/
|
||||
|
||||
/obj/item/ammo_casing/afoam_dart
|
||||
name = "foam dart"
|
||||
desc = "It's Donk or Don't! Ages 8 and up."
|
||||
projectile_type = /obj/item/projectile/bullet/foam_dart
|
||||
matter = list(MAT_PLASTIC = 60)
|
||||
caliber = "foam"
|
||||
icon = 'icons/obj/gun_toy.dmi'
|
||||
icon_state = "foamdart"
|
||||
caseless = 1
|
||||
|
||||
/*
|
||||
* .357
|
||||
*/
|
||||
|
||||
@@ -29,20 +29,25 @@
|
||||
pump(user)
|
||||
recentpump = world.time
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/pump/proc/pump(mob/M as mob)
|
||||
/obj/item/weapon/gun/projectile/shotgun/pump/proc/pump(mob/M)
|
||||
playsound(src, action_sound, 60, 1)
|
||||
|
||||
if(chambered)//We have a shell in the chamber
|
||||
chambered.loc = get_turf(src)//Eject casing
|
||||
// We have a shell in the chamber
|
||||
if(chambered)
|
||||
if(chambered.caseless)
|
||||
qdel(chambered) // Delete casing
|
||||
else
|
||||
chambered.loc = get_turf(src) // Eject casing
|
||||
chambered = null
|
||||
|
||||
// Load next shell
|
||||
if(loaded.len)
|
||||
var/obj/item/ammo_casing/AC = loaded[1] //load next casing.
|
||||
loaded -= AC //Remove casing from loaded list.
|
||||
var/obj/item/ammo_casing/AC = loaded[1] // load next casing.
|
||||
loaded -= AC // Remove casing from loaded list.
|
||||
chambered = AC
|
||||
|
||||
if(pump_animation)//This affects all bolt action and shotguns.
|
||||
flick("[pump_animation]", src)//This plays any pumping
|
||||
if(pump_animation) // This affects all bolt action and shotguns.
|
||||
flick("[pump_animation]", src) // This plays any pumping
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
167
code/modules/projectiles/guns/projectile/toy.dm
Normal file
167
code/modules/projectiles/guns/projectile/toy.dm
Normal file
@@ -0,0 +1,167 @@
|
||||
/* Toys Guns!
|
||||
* Contains:
|
||||
* Shotgun
|
||||
* Pistol
|
||||
* N99 Pistol
|
||||
* Levergun
|
||||
* Revolver
|
||||
* Big Iron
|
||||
* Crossbow
|
||||
* Sawn Off
|
||||
* SMG
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Shotgun
|
||||
*/
|
||||
/obj/item/weapon/gun/projectile/shotgun/pump/toy
|
||||
name = "\improper Donk-Soft shotgun"
|
||||
desc = "Donk-Soft foam shotgun! It's Donk or Don't! Ages 8 and up."
|
||||
icon = 'icons/obj/gun_toy.dmi'
|
||||
icon_state = "shotgun"
|
||||
item_state = "shotgun"
|
||||
max_shells = 6
|
||||
w_class = ITEMSIZE_LARGE
|
||||
force = 2
|
||||
slot_flags = null
|
||||
caliber = "foam"
|
||||
origin_tech = list(TECH_COMBAT = 1, TECH_MATERIAL = 1)
|
||||
load_method = SINGLE_CASING
|
||||
ammo_type = /obj/item/ammo_casing/afoam_dart
|
||||
projectile_type = /obj/item/projectile/bullet/foam_dart
|
||||
matter = list(MAT_PLASTIC = 2000)
|
||||
handle_casings = null
|
||||
recoil = null //it's a toy
|
||||
|
||||
/*
|
||||
* Pistol
|
||||
*/
|
||||
/obj/item/weapon/gun/projectile/pistol/toy
|
||||
name = "\improper Donk-Soft pistol"
|
||||
desc = "Donk-Soft foam pistol! It's Donk or Don't! Ages 8 and up."
|
||||
icon = 'icons/obj/gun_toy.dmi'
|
||||
icon_state = "pistol"
|
||||
item_state = "gun"
|
||||
magazine_type = /obj/item/ammo_magazine/mfoam_dart/pistol
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/mfoam_dart/pistol)
|
||||
projectile_type = /obj/item/projectile/bullet/foam_dart
|
||||
caliber = "foam"
|
||||
origin_tech = list(TECH_COMBAT = 1, TECH_MATERIAL = 1)
|
||||
load_method = MAGAZINE
|
||||
matter = list(MAT_PLASTIC = 1000)
|
||||
recoil = null //it's a toy
|
||||
|
||||
/obj/item/weapon/gun/projectile/pistol/toy/update_icon()
|
||||
if(ammo_magazine)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-e"
|
||||
|
||||
/*
|
||||
* N99 Pistol
|
||||
*/
|
||||
/obj/item/weapon/gun/projectile/pistol/toy/n99
|
||||
name = "\improper Donk-Soft commemorative pistol"
|
||||
desc = "A special made Donk-Soft pistol to promote 'Radius: Legend of the Demon Core', a popular post-apocolyptic TV series."
|
||||
icon_state = "n99"
|
||||
item_state = "gun"
|
||||
|
||||
/obj/item/weapon/gun/projectile/pistol/toy/n99/update_icon()
|
||||
if(ammo_magazine)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-e"
|
||||
|
||||
/*
|
||||
* Levergun
|
||||
*/
|
||||
/obj/item/weapon/gun/projectile/shotgun/pump/toy/levergun
|
||||
name = "\improper Donk-Soft levergun"
|
||||
desc = "Donk-Soft foam levergun! Time to cowboy up! Ages 8 and up."
|
||||
icon_state = "leveraction"
|
||||
item_state = "leveraction"
|
||||
max_shells = 5
|
||||
pump_animation = "leveraction-cycling"
|
||||
|
||||
/*
|
||||
* Revolver
|
||||
*/
|
||||
/obj/item/weapon/gun/projectile/revolver/toy
|
||||
name = "\improper Donk-Soft revolver"
|
||||
desc = "Donk-Soft foam revolver! Time to cowboy up! Ages 8 and up."
|
||||
icon = 'icons/obj/gun_toy.dmi'
|
||||
icon_state = "revolver"
|
||||
item_state = "revolver"
|
||||
caliber = "foam"
|
||||
ammo_type = /obj/item/ammo_casing/afoam_dart
|
||||
projectile_type = /obj/item/projectile/bullet/foam_dart
|
||||
origin_tech = list(TECH_COMBAT = 1, TECH_MATERIAL = 1)
|
||||
load_method = SINGLE_CASING
|
||||
max_shells = 6
|
||||
matter = list(MAT_PLASTIC = 1000)
|
||||
handle_casings = null
|
||||
recoil = null //it's a toy
|
||||
|
||||
/*
|
||||
* Big Iron
|
||||
*/
|
||||
/obj/item/weapon/gun/projectile/revolver/toy/big_iron
|
||||
name = "\improper Donk-Soft big iron"
|
||||
desc = "A special made Donk-Soft pistol to promote 'A Fistful of Phoron', a popular frontier novel series."
|
||||
icon_state = "big_iron"
|
||||
item_state = "revolver"
|
||||
|
||||
/*
|
||||
* Crossbow
|
||||
*/
|
||||
/obj/item/weapon/gun/projectile/revolver/toy/crossbow
|
||||
name = "\improper Donk-Soft crossbow"
|
||||
desc = "Donk-Soft foam pistol! It's Donk or Don't! Ages 8 and up."
|
||||
icon = 'icons/obj/gun_toy.dmi'
|
||||
icon_state = "foamcrossbow"
|
||||
item_state = "foamcrossbow"
|
||||
max_shells = 5
|
||||
|
||||
/*
|
||||
* Sawn Off
|
||||
*/
|
||||
/obj/item/weapon/gun/projectile/revolver/toy/sawnoff //revolver code just because it's easier
|
||||
name = "\improper Donk-Soft sawn off shotgun"
|
||||
desc = "Donk-Soft foam sawn off! It's Donk or Don't! Ages 8 and up."
|
||||
icon = 'icons/obj/gun_toy.dmi'
|
||||
icon_state = "sawnshotgun"
|
||||
item_state = "dshotgun"
|
||||
max_shells = 2
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
matter = list(MAT_PLASTIC = 1500)
|
||||
|
||||
/*
|
||||
* SMG
|
||||
*/
|
||||
/obj/item/weapon/gun/projectile/automatic/toy
|
||||
name = "\improper Donk-Soft SMG"
|
||||
desc = "Donk-Soft foam SMG! It's Donk or Don't! Ages 8 and up."
|
||||
icon = 'icons/obj/gun_toy.dmi'
|
||||
icon_state = "smg"
|
||||
caliber = "foam"
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
load_method = MAGAZINE
|
||||
origin_tech = list(TECH_COMBAT = 1, TECH_MATERIAL = 1)
|
||||
slot_flags = SLOT_BELT
|
||||
magazine_type = /obj/item/ammo_magazine/mfoam_dart/smg
|
||||
allowed_magazines = list(/obj/item/ammo_magazine/mfoam_dart/smg)
|
||||
projectile_type = /obj/item/projectile/bullet/foam_dart
|
||||
matter = list(MAT_PLASTIC = 1500)
|
||||
recoil = null //it's a toy
|
||||
|
||||
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=2, burst_accuracy=list(0,-2,-2), dispersion=null)
|
||||
)
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/toy/update_icon()
|
||||
if(ammo_magazine)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-e"
|
||||
@@ -65,6 +65,32 @@
|
||||
|
||||
return 0
|
||||
|
||||
/* foam dart projectiles */
|
||||
|
||||
/obj/item/projectile/bullet/foam_dart
|
||||
name = "foam dart"
|
||||
desc = "I hope you're wearing eye protection."
|
||||
damage = 0 // It's a damn toy.
|
||||
damage_type = OXY
|
||||
nodamage = TRUE
|
||||
icon = 'icons/obj/gun_toy.dmi'
|
||||
icon_state = "foamdart_proj"
|
||||
range = 15
|
||||
impact_effect_type = null
|
||||
fire_sound = 'sound/items/syringeproj.ogg'
|
||||
|
||||
/obj/item/projectile/bullet/foam_dart/on_impact(var/atom/A)
|
||||
. = ..()
|
||||
var/turf/T = get_turf(loc)
|
||||
if(istype(T))
|
||||
new /obj/item/ammo_casing/afoam_dart(get_turf(loc))
|
||||
|
||||
/obj/item/projectile/bullet/foam_dart/on_range(var/atom/A)
|
||||
. = ..()
|
||||
var/turf/T = get_turf(loc)
|
||||
if(istype(T))
|
||||
new /obj/item/ammo_casing/afoam_dart(get_turf(loc))
|
||||
|
||||
/* short-casing projectiles, like the kind used in pistols or SMGs */
|
||||
|
||||
/obj/item/projectile/bullet/pistol // 9mm pistols and most SMGs. Sacrifice power for capacity.
|
||||
|
||||
Reference in New Issue
Block a user