Device and weapon

This commit is contained in:
izac112
2024-12-01 00:56:26 +01:00
parent 3973dca1ff
commit a2ad915045
124 changed files with 1307 additions and 1295 deletions
+2 -2
View File
@@ -447,12 +447,12 @@
if(recoil_mode > 0)
if(mysize <= 0.5)
nerd.Weaken(1*recoil_mode)
if(!istype(src,/obj/item/weapon/gun/energy))
if(!istype(src,/obj/item/gun/energy))
nerd.adjustBruteLoss((5-mysize*4)*recoil_mode)
to_chat(nerd, "<span class='danger'>You're so tiny that you drop the gun and hurt yourself from the recoil!</span>")
else
to_chat(nerd, "<span class='danger'>You're so tiny that the pull of the trigger causes you to drop the gun!</span>")
//YAWNEDIT: Knockdown code end
// Similar to the above proc, but does not require a user, which is ideal for things like turrets.
@@ -1,5 +1,5 @@
///START OF GAUSS WEAPONRY -Radiantflash ///
/obj/item/weapon/gun/energy/soapenergy/gauss
/obj/item/gun/energy/soapenergy/gauss
name = "gauss pistol"
icon = 'icons/obj/gun_yw.dmi'
icon_state = "gausspistol"
@@ -16,7 +16,7 @@
charge_meter = 1
fire_delay = 10 //old technology
/obj/item/weapon/gun/energy/soapenergy/gaussrifle
/obj/item/gun/energy/soapenergy/gaussrifle
name = "gauss rifle"
icon = 'icons/obj/gun_yw.dmi'
icon_state = "gaussrifle"
@@ -1,5 +1,5 @@
/obj/item/weapon/gun/energy/hunter
/obj/item/gun/energy/hunter
name = "Hybrid 'Hunter' net gun"
desc = "A Hephaestus-designed hybrid of a taser and the energy net gun, usually dubbed 'Hunter' stunner and energy net launcher, \
for when you want criminals to stop acting like they're on a 20th century British comedy sketch show."
@@ -21,7 +21,7 @@
list(mode_name="capture", projectile_type=/obj/item/projectile/beam/energy_net, fire_sound = 'sound/weapons/eluger.ogg', charge_cost=1200, fire_delay=50)
)
/obj/item/weapon/gun/energy/hunter/update_icon()
/obj/item/gun/energy/hunter/update_icon()
overlays.Cut()
if(power_supply)
@@ -1,4 +1,4 @@
/obj/item/weapon/gun/energy/sf2000
/obj/item/gun/energy/sf2000
name = "SF 2000"
desc = "A oddly shaped red colored energy gun, can fire both stun and lethal lasers"
icon_state = "lasgunstun"
@@ -17,7 +17,7 @@
)
/obj/item/weapon/gun/energy/gun/burst/mg42
/obj/item/gun/energy/gun/burst/mg42
name = "MG42-E"
desc = "Space Blitzkrieg."
icon = 'icons/obj/gun_yw.dmi'
@@ -44,7 +44,7 @@
list(mode_name="15 laser burst, ye boi.", burst=15, fire_delay=null, move_delay=4, burst_accuracy=list(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), dispersion=list(0.0, 0.2, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), projectile_type=/obj/item/projectile/beam/burstlaser, modifystate="mg42-e", fire_sound='sound/weapons/Laser.ogg'),
)
/obj/item/weapon/gun/energy/x01
/obj/item/gun/energy/x01
name = "X01 energy gun"
desc = "A rare weapon, handcrafted by a ArcLight manufactury on Luna. This one appears customized with older technology for the price a small fortune."
icon_state = "x01stun"
@@ -1,8 +1,9 @@
// -------------- Protector -------------
/obj/item/gun/energy/gun/protector
name = "secure small energy gun"
"The WT-98a 'Protector' is a common sidearm developed by Ward-Takahashi GMC. It features a powerful stun mode, and an alert-level-locked lethal mode, only usable when the connected jurisdiction allows. It also features an integrated flashlight!" // YW EDIT
desc = "The WT-98a 'Protector' is a common sidearm developed by Ward-Takahashi GMC. It features a powerful stun mode, and an alert-level-locked lethal mode, only usable when the connected jurisdiction allows. It also features an integrated flashlight!" // YW EDIT
catalogue_data = list(/datum/category_item/catalogue/information/organization/ward_takahashi) // YW EDIT
description_info = "This gun can only be fired in lethal mode while on higher security alert levels. It is legal for sec to carry for this reason, since it cannot be used for lethal force until SOP allows it, in essence."
description_fluff = "One of the few sidearms developed by Ward-Takahashi, this gun has a wireless connection to the computer's datacore to ensure it can't be used without authorization from heads of staff who have raised the alert level. Until then, *click*!"
description_antag = "The gun can be emagged to remove the lethal security level restriction, allowing it to be fired on lethal mode at all times."
@@ -1,4 +1,4 @@
/obj/item/weapon/gun/projectile/automatic/mg42
/obj/item/gun/projectile/automatic/mg42
name = "MG42"
desc = "Entfesseln die Holle" //Unleash the hell
icon = 'icons/obj/gun_yw.dmi'
@@ -32,43 +32,43 @@
var/cover_open = 0
/obj/item/weapon/gun/projectile/automatic/mg42/special_check(mob/user)
/obj/item/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)
/obj/item/gun/projectile/automatic/mg42/proc/toggle_cover(mob/user)
cover_open = !cover_open
user << "<b>You [cover_open ? "open" : "close"] [src]'s cover.</b>"
update_icon()
update_held_icon()
/obj/item/weapon/gun/projectile/automatic/mg42/attack_self(mob/user as mob)
/obj/item/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)
/obj/item/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()
/obj/item/gun/projectile/automatic/mg42/update_icon()
icon_state = "mg42[cover_open ? "open" : "closed"][ammo_magazine ? "" : "-empty"][cover_open && ammo_magazine && ammo_magazine.stored_ammo.len == 0 ? "0" : ""]"
item_state = "mg42"
update_held_icon()
/obj/item/weapon/gun/projectile/automatic/mg42/load_ammo(var/obj/item/A, mob/user)
/obj/item/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)
/obj/item/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
..()
..()
@@ -1,5 +1,5 @@
/******GLOCK******/
/obj/item/weapon/gun/projectile/automatic/glock
/obj/item/gun/projectile/automatic/glock
name = "Glock G18"
desc = "A automatic handgun that uses .9mm rounds."
icon_state = "glock"
@@ -16,7 +16,7 @@
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))
)
/obj/item/weapon/gun/projectile/automatic/glock/update_icon()
/obj/item/gun/projectile/automatic/glock/update_icon()
..()
if(ammo_magazine)
icon_state = "[initial(icon_state)]"
@@ -25,7 +25,7 @@
/*******PPK*******/
/obj/item/weapon/gun/projectile/ppk
/obj/item/gun/projectile/ppk
name = "PPK"
desc = "A handgun that uses .9mm rounds."
icon_state = "ppk"
@@ -37,7 +37,7 @@
magazine_type = /obj/item/ammo_magazine/m9mm
allowed_magazines = list(/obj/item/ammo_magazine/m9mm)
/obj/item/weapon/gun/projectile/ppk/update_icon()
/obj/item/gun/projectile/ppk/update_icon()
..()
if(ammo_magazine)
icon_state = "[initial(icon_state)]"
@@ -46,7 +46,7 @@
/*******M2024*******/
/obj/item/weapon/gun/projectile/m2024
/obj/item/gun/projectile/m2024
name = "Custom M2024"
desc = "Customized model of old yet reliable sol .45 handgun with the name 'M2024'. Used to be popular, still appreciated for it's effectiveness."
icon_state = "m2024"
@@ -58,7 +58,7 @@
magazine_type = /obj/item/ammo_magazine/m2024
allowed_magazines = list(/obj/item/ammo_magazine/m2024,/obj/item/ammo_magazine/m45)
/obj/item/weapon/gun/projectile/m2024/update_icon()
/obj/item/gun/projectile/m2024/update_icon()
..()
if(ammo_magazine)
icon_state = "[initial(icon_state)]"
@@ -66,7 +66,7 @@
icon_state = "[initial(icon_state)]-empty"
/*******M1911 Custom fluff*******/
/obj/item/weapon/gun/projectile/fluff/m1911
/obj/item/gun/projectile/fluff/m1911
name = "M1911 Custom"
desc = "A modernized, customized M1911 pistol with a rail for attachments such as flashlight or laser sight (fooken laser sights). It's engraved, and the engraving says, 'For honorable duty.' It's original, Sol Gov firearm from Earth, not a cheap mars replica."
icon_state = "m1911"
@@ -78,9 +78,9 @@
magazine_type = /obj/item/ammo_magazine/m45
allowed_magazines = list(/obj/item/ammo_magazine/m45)
/obj/item/weapon/gun/projectile/m2024/update_icon()
/obj/item/gun/projectile/m2024/update_icon()
..()
if(ammo_magazine)
icon_state = "[initial(icon_state)]"
else
icon_state = "[initial(icon_state)]-empty"
icon_state = "[initial(icon_state)]-empty"
@@ -1,13 +1,13 @@
/obj/item/weapon/gun/projectile/revolver/nova
/obj/item/gun/projectile/revolver/nova
name = "Nova"
desc = "Heavily modified revolver, with alas only 6 round chamber but fiery firepower of 357 calibre. Make it count. Uses .357 rounds." // Yes I'm serious. -Spades
icon_state = "nova"
icon = 'icons/obj/gun_yw.dmi'
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
/obj/item/weapon/gun/projectile/revolver/cerberus
/obj/item/gun/projectile/revolver/cerberus
name = "Cerberus"
desc = "A high-power, fancy looking revolver that can stop nearly everything it's pointed at. Comes with a standard six-round-cylinder. There is ,Hesphiastos Industries, stamped along it's cylinder." // Yes I'm serious. -Spades
icon_state = "cerb"
icon = 'icons/obj/gun_yw.dmi'
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
@@ -1,4 +1,4 @@
/obj/item/weapon/gun/projectile/revolvershotgun
/obj/item/gun/projectile/revolvershotgun
name = "Jackhammer"
desc = "Uses 12g rounds."
icon = 'icons/obj/gun_yw.dmi'
@@ -15,7 +15,7 @@
allowed_magazines = list(/obj/item/ammo_magazine/m12gdrumjack)
projectile_type = /obj/item/projectile/bullet/shotgun
/obj/item/weapon/gun/projectile/revolvershotgun/update_icon()
/obj/item/gun/projectile/revolvershotgun/update_icon()
..()
if(ammo_magazine)
icon_state = "revolvshot"
@@ -77,7 +77,7 @@
fire_sound = 'sound/weapons/Gunshot_shotgun.ogg'
damage = 13
/obj/item/weapon/storage/box/scattershot
/obj/item/storage/box/scattershot
name = "box of shotgun scatter shells"
desc = "It has a picture of a shell and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death. High spread factor, just shoot and pray."
icon = 'icons/obj/ammo_yw.dmi'
@@ -85,5 +85,5 @@
item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit")
starts_with = list(/obj/item/ammo_casing/a12g/scatter = 8)
/obj/item/weapon/storage/box/scattershot/large
starts_with = list(/obj/item/ammo_casing/a12g/scatter = 16)
/obj/item/storage/box/scattershot/large
starts_with = list(/obj/item/ammo_casing/a12g/scatter = 16)