mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
for real this time
This commit is contained in:
8
code/modules/projectiles/ammunition/caseless/arrow.dm
Normal file
8
code/modules/projectiles/ammunition/caseless/arrow.dm
Normal file
@@ -0,0 +1,8 @@
|
||||
/obj/item/ammo_casing/caseless/arrow
|
||||
name = "wooden arrow"
|
||||
desc = "An arrow made of wood, typically fired from a bow."
|
||||
projectile_type = /obj/item/projectile/bullet/reusable/arrow
|
||||
caliber = "arrow"
|
||||
icon_state = "arrow"
|
||||
throwforce = 3 //good luck hitting someone with the pointy end of the arrow
|
||||
throw_speed = 3
|
||||
6
code/modules/projectiles/boxes_magazines/internal/bow.dm
Normal file
6
code/modules/projectiles/boxes_magazines/internal/bow.dm
Normal file
@@ -0,0 +1,6 @@
|
||||
/obj/item/ammo_box/magazine/internal/bow
|
||||
name = "bow... magazine?" //shouldn't be seeing this
|
||||
ammo_type = /obj/item/ammo_casing/caseless/arrow
|
||||
caliber = "arrow"
|
||||
max_ammo = 1
|
||||
start_empty = 1
|
||||
@@ -51,6 +51,7 @@
|
||||
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
|
||||
|
||||
var/obj/item/firing_pin/pin = /obj/item/firing_pin //standard firing pin for most guns
|
||||
var/no_pin_required = FALSE //whether the gun can be fired without a pin
|
||||
|
||||
var/obj/item/flashlight/gun_light
|
||||
var/can_flashlight = 0
|
||||
@@ -107,6 +108,8 @@
|
||||
|
||||
/obj/item/gun/examine(mob/user)
|
||||
. = ..()
|
||||
if(no_pin_required)
|
||||
return
|
||||
if(pin)
|
||||
. += "It has \a [pin] installed."
|
||||
else
|
||||
@@ -226,6 +229,8 @@
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/proc/handle_pins(mob/living/user)
|
||||
if(no_pin_required)
|
||||
return TRUE
|
||||
if(pin)
|
||||
if(pin.pin_auth(user) || (pin.obj_flags & EMAGGED))
|
||||
return TRUE
|
||||
|
||||
53
code/modules/projectiles/guns/ballistic/bow.dm
Normal file
53
code/modules/projectiles/guns/ballistic/bow.dm
Normal file
@@ -0,0 +1,53 @@
|
||||
/obj/item/gun/ballistic/bow
|
||||
name = "wooden bow"
|
||||
desc = "Some sort of primitive projectile weapon. Used to fire arrows."
|
||||
icon_state = "bow"
|
||||
item_state = "bow"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
weapon_weight = WEAPON_HEAVY //need both hands to fire
|
||||
force = 5
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/bow
|
||||
fire_sound = 'sound/weapons/bowfire.wav'
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
item_flags = NONE
|
||||
casing_ejector = FALSE
|
||||
inaccuracy_modifier = 0.33 //to counteract the innaccuracy from WEAPON_HEAVY, bows are supposed to be accurate but only able to be fired with both hands
|
||||
pin = null
|
||||
no_pin_required = TRUE
|
||||
trigger_guard = TRIGGER_GUARD_NONE //so ashwalkers can use it
|
||||
|
||||
/obj/item/gun/ballistic/bow/shoot_with_empty_chamber()
|
||||
return
|
||||
|
||||
/obj/item/gun/ballistic/bow/chamber_round()
|
||||
chambered = magazine.get_round(1)
|
||||
|
||||
/obj/item/gun/ballistic/bow/afterattack()
|
||||
. = ..()
|
||||
if (chambered)
|
||||
chambered = null
|
||||
magazine.get_round(0)
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/bow/attack_self(mob/living/user)
|
||||
if (chambered)
|
||||
var/obj/item/ammo_casing/AC = magazine.get_round(0)
|
||||
user.put_in_hands(AC)
|
||||
chambered = null
|
||||
to_chat(user, "<span class='notice'>You gently release the bowstring, removing the arrow.</span>")
|
||||
else if (get_ammo())
|
||||
to_chat(user, "<span class='notice'>You draw back the bowstring.</span>")
|
||||
playsound(src, 'sound/weapons/bowdraw.wav', 100, 1)
|
||||
chamber_round()
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/bow/attackby(obj/item/I, mob/user, params)
|
||||
if (magazine.attackby(I, user, params, 1))
|
||||
to_chat(user, "<span class='notice'>You notch the arrow.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/bow/update_icon()
|
||||
icon_state = "bow_[get_ammo() ? (chambered ? "firing" : "loaded") : "unloaded"]"
|
||||
|
||||
/obj/item/gun/ballistic/bow/can_shoot()
|
||||
return chambered
|
||||
@@ -23,6 +23,8 @@
|
||||
if(proximity_flag)
|
||||
if(istype(target, /obj/item/gun))
|
||||
var/obj/item/gun/G = target
|
||||
if(G.no_pin_required)
|
||||
return
|
||||
if(G.pin && (force_replace || G.pin.pin_removeable))
|
||||
G.pin.forceMove(get_turf(G))
|
||||
G.pin.gun_remove(user)
|
||||
|
||||
6
code/modules/projectiles/projectile/reusable/arrow.dm
Normal file
6
code/modules/projectiles/projectile/reusable/arrow.dm
Normal file
@@ -0,0 +1,6 @@
|
||||
/obj/item/projectile/bullet/reusable/arrow
|
||||
name = "wooden arrow"
|
||||
desc = "Woosh!"
|
||||
damage = 15
|
||||
icon_state = "arrow"
|
||||
ammo_type = /obj/item/ammo_casing/caseless/arrow
|
||||
BIN
sound/weapons/bowdraw.wav
Normal file
BIN
sound/weapons/bowdraw.wav
Normal file
Binary file not shown.
BIN
sound/weapons/bowfire.wav
Normal file
BIN
sound/weapons/bowfire.wav
Normal file
Binary file not shown.
Reference in New Issue
Block a user