Merge remote-tracking branch 'citadel/master' into combat_v7

This commit is contained in:
silicons
2021-04-26 14:17:43 -07:00
480 changed files with 310849 additions and 306446 deletions
@@ -73,3 +73,11 @@
name = ".38 DumDum bullet casing"
desc = "A .38 DumDum bullet casing."
projectile_type = /obj/item/projectile/bullet/c38/dumdum
//.45-70 GOVT (Gunslinger's Derringer)
/obj/item/ammo_casing/g4570
name= ".45-70 Govt bullet casing"
desc = "An exceedingly rare .45-70 Govt bullet casing."
caliber = "45-70g"
projectile_type = /obj/item/projectile/bullet/g4570
@@ -0,0 +1,30 @@
/obj/item/ammo_box/magazine/internal/derringer
name = "derringer muzzle"
ammo_type = /obj/item/ammo_casing/c38
caliber = "38"
max_ammo = 2
multiload = FALSE
/obj/item/ammo_box/magazine/internal/derringer/ammo_count(countempties = 1)
if (!countempties)
var/boolets = 0
for(var/obj/item/ammo_casing/bullet in stored_ammo)
if(bullet.BB)
boolets++
return boolets
else
return ..()
/obj/item/ammo_box/magazine/internal/derringer/a357
name = "\improper derringer muzzle"
ammo_type = /obj/item/ammo_casing/a357
caliber = "357"
max_ammo = 2
multiload = FALSE
/obj/item/ammo_box/magazine/internal/derringer/g4570
name = "\improper derringer muzzle"
ammo_type = /obj/item/ammo_casing/g4570
caliber = "45-70g"
max_ammo = 2
multiload = FALSE
@@ -55,3 +55,9 @@
name = "triple-barrel shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/incapacitate
max_ammo = 3
/obj/item/ammo_box/magazine/internal/shot/levergun
name = "levergun internal magazine"
ammo_type = /obj/item/ammo_casing/c38 // they're rubber by default, i guess
caliber = "38"
max_ammo = 7
+6 -1
View File
@@ -8,6 +8,7 @@
var/obj/item/ammo_box/magazine/magazine
var/casing_ejector = TRUE //whether the gun ejects the chambered casing
var/magazine_wording = "magazine"
var/sawn_item_state = "gun"
/obj/item/gun/ballistic/Initialize()
. = ..()
@@ -198,13 +199,17 @@
name = "sawn-off [src.name]"
desc = sawn_desc
w_class = WEIGHT_CLASS_NORMAL
item_state = "gun"
item_state = sawn_item_state
slot_flags &= ~ITEM_SLOT_BACK //you can't sling it on your back
slot_flags |= ITEM_SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
sawn_off = TRUE
update_icon()
return 1
/// is something supposed to happen here?
/obj/item/gun/ballistic/proc/on_sawoff(mob/user)
return
// Sawing guns related proc
/obj/item/gun/ballistic/proc/blow_up(mob/user)
. = 0
@@ -0,0 +1,74 @@
/obj/item/gun/ballistic/derringer
name = "\improper .38 Derringer"
desc = "A easily concealable derringer. Uses .38 ammo"
icon = 'icons/obj/guns/projectile.dmi'
icon_state = "derringer"
mag_type = /obj/item/ammo_box/magazine/internal/derringer
obj_flags = UNIQUE_RENAME
fire_sound = 'sound/weapons/revolvershot.ogg'
casing_ejector = FALSE
w_class = WEIGHT_CLASS_TINY
/obj/item/gun/ballistic/derringer/Initialize()
..()
transform *= 0.8 //Spriter too lazy to make icons smaller than default revolvers, local coder hacks in solution.
/obj/item/gun/ballistic/derringer/get_ammo(countchambered = FALSE, countempties = TRUE)
var/boolets = 0 //legacy var name maturity
if (chambered && countchambered)
boolets++
if (magazine)
boolets += magazine.ammo_count(countempties)
return boolets
/obj/item/gun/ballistic/derringer/attackby(obj/item/A, mob/user, params)
. = ..()
if(.)
return
var/num_loaded = magazine.attackby(A, user, params, 1)
if(num_loaded)
to_chat(user, "<span class='notice'>You load [num_loaded] shell\s into \the [src].</span>")
playsound(user, 'sound/weapons/bulletinsert.ogg', 60, 1)
A.update_icon()
update_icon()
chamber_round(0)
/obj/item/gun/ballistic/derringer/attack_self(mob/living/user)
var/num_unloaded = 0
while (get_ammo() > 0)
var/obj/item/ammo_casing/CB
CB = magazine.get_round(0)
chambered = null
CB.forceMove(drop_location())
CB.update_icon()
num_unloaded++
if (num_unloaded)
to_chat(user, "<span class='notice'>You break open \the [src] and unload [num_unloaded] bullets\s.</span>")
else
to_chat(user, "<span class='warning'>[src] is empty!</span>")
/obj/item/gun/ballistic/derringer/examine(mob/user)
. = ..()
var/live_ammo = get_ammo(FALSE, FALSE)
. += "[live_ammo ? live_ammo : "None"] of those are live rounds."
/obj/item/gun/ballistic/derringer/traitor
name = "\improper .357 Syndicate Derringer"
desc = "An easily concealable derriger, if not for the bright red and black. Uses .357 ammo"
icon_state = "derringer_syndie"
mag_type = /obj/item/ammo_box/magazine/internal/derringer/a357
/obj/item/gun/ballistic/derringer/gold
name = "\improper Golden Derringer"
desc = "The golden sheen is somewhat counterintuitive as a stealth weapon, but it looks cool. Uses .357 ammo"
icon_state = "derringer_gold"
mag_type = /obj/item/ammo_box/magazine/internal/derringer/a357
fire_sound = 'sound/weapons/resonator_blast.ogg'
/obj/item/gun/ballistic/derringer/nukeop
name = "\improper Gunslinger's Derringer"
desc = "Sandalwood grip, wellkempt blue-grey steel barrels, and a crash like thunder itself. Uses the exceedingly rare 45-70 Govt. ammo"
icon_state = "derringer"
mag_type = /obj/item/ammo_box/magazine/internal/derringer/g4570
fire_sound = 'sound/weapons/gunshotshotgunshot.ogg'
@@ -12,6 +12,7 @@
casing_ejector = FALSE
var/recentpump = 0 // to prevent spammage
weapon_weight = WEAPON_HEAVY
sawn_item_state = "sawnshotgun"
/obj/item/gun/ballistic/shotgun/attackby(obj/item/A, mob/user, params)
. = ..()
@@ -335,3 +336,34 @@
//our hook gun!
var/obj/item/gun/magic/hook/bounty/hook
var/toggled = FALSE
// hey you kids like
// LEVER GUNS?
/obj/item/gun/ballistic/shotgun/leveraction
name = "lever-action rifle"
desc = "While lever-actions have been horribly out of date for hundreds of years now, \
the reported potential versatility of .38 Special is worth paying attention to."
fire_sound = "sound/weapons/revolvershot.ogg"
mag_type = /obj/item/ammo_box/magazine/internal/shot/levergun
icon_state = "levercarabine"
item_state = "leveraction"
sawn_item_state = "maresleg"
/obj/item/gun/ballistic/shotgun/leveraction/attackby(obj/item/A, mob/user, params)
..()
if(A.tool_behaviour == TOOL_SAW || istype(A, /obj/item/gun/energy/plasmacutter))
sawoff(user)
if(istype(A, /obj/item/melee/transforming/energy))
var/obj/item/melee/transforming/energy/W = A
if(W.active)
sawoff(user)
/obj/item/gun/ballistic/shotgun/leveraction/on_sawoff(mob/user)
magazine.max_ammo-- // sawing off drops from 7+1 to 6+1
/obj/item/gun/ballistic/shotgun/leveraction/update_icon_state()
if(current_skin)
icon_state = "[unique_reskin[current_skin]][sawn_off ? "-sawn" : ""][chambered ? "" : "-e"]"
else
icon_state = "[initial(icon_state)][sawn_off ? "-sawn" : ""][chambered ? "" : "-e"]"
@@ -138,3 +138,13 @@
embedding = list(embed_chance=90, fall_chance=2, jostle_chance=5, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.4, pain_mult=5, jostle_pain_mult=6, rip_time=10)
wound_falloff_tile = -1
embed_falloff_tile = -5
//.45-70 GOVT (Gunslinger's Derringer)
//0bserver here. For all that is holy, do me a flavor, and do NOT allow people easy access to this ammo. This is meant for extremely lucky traitors, and nuclear operatives.
/obj/item/projectile/bullet/g4570
name = ".45-70 Govt bullet"
damage = 60
armour_penetration = 40
wound_bonus = -80