Merge branch 'master' into stuff
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
@@ -79,7 +80,10 @@
|
||||
/obj/item/gun/Initialize()
|
||||
. = ..()
|
||||
if(pin)
|
||||
pin = new pin(src)
|
||||
if(no_pin_required)
|
||||
pin = null
|
||||
else
|
||||
pin = new pin(src)
|
||||
if(gun_light)
|
||||
alight = new (src)
|
||||
if(zoomable)
|
||||
@@ -107,6 +111,8 @@
|
||||
|
||||
/obj/item/gun/examine(mob/user)
|
||||
. = ..()
|
||||
if(no_pin_required)
|
||||
return
|
||||
if(pin)
|
||||
. += "It has \a [pin] installed."
|
||||
else
|
||||
@@ -229,6 +235,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
|
||||
|
||||
@@ -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', 75, 0) //gets way too high pitched if the freq varies
|
||||
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
|
||||
@@ -79,6 +79,7 @@
|
||||
/obj/item/gun/ballistic/automatic/pistol/stickman
|
||||
name = "flat gun"
|
||||
desc = "A 2 dimensional gun.. what?"
|
||||
can_suppress = FALSE
|
||||
icon_state = "flatgun"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/pistol/stickman/pickup(mob/living/user)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -90,6 +90,10 @@
|
||||
var/decayedRange //stores original range
|
||||
var/reflect_range_decrease = 5 //amount of original range that falls off when reflecting, so it doesn't go forever
|
||||
var/is_reflectable = FALSE // Can it be reflected or not?
|
||||
|
||||
/// factor to multiply by for zone accuracy percent.
|
||||
var/zone_accuracy_factor = 1
|
||||
|
||||
//Effects
|
||||
var/stun = 0
|
||||
var/knockdown = 0
|
||||
@@ -185,10 +189,6 @@
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target_loca, splatter_dir, bloodtype_to_color())
|
||||
|
||||
if(iscarbon(L) && !HAS_TRAIT(L, TRAIT_NOMARROW))
|
||||
var/mob/living/carbon/C = L
|
||||
C.bleed(damage)
|
||||
else
|
||||
L.add_splatter_floor(target_loca)
|
||||
else if(impact_effect_type && !hitscan)
|
||||
new impact_effect_type(target_loca, hitx, hity)
|
||||
@@ -211,11 +211,8 @@
|
||||
L.on_hit(src)
|
||||
|
||||
var/reagent_note
|
||||
if(reagents && reagents.reagent_list)
|
||||
reagent_note = " REAGENTS:"
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
reagent_note += R.type + " ("
|
||||
reagent_note += num2text(R.volume) + ") "
|
||||
if(reagents)
|
||||
reagent_note = reagents.log_list()
|
||||
|
||||
if(ismob(firer))
|
||||
log_combat(firer, L, "shot", src, reagent_note)
|
||||
@@ -253,7 +250,8 @@
|
||||
return TRUE
|
||||
|
||||
var/distance = get_dist(T, starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations.
|
||||
def_zone = ran_zone(def_zone, max(100-(7*distance), 5)) //Lower accurancy/longer range tradeoff. 7 is a balanced number to use.
|
||||
if(check_zone(def_zone) != BODY_ZONE_CHEST)
|
||||
def_zone = ran_zone(def_zone, max(100-(7*distance), 5) * zone_accuracy_factor) //Lower accurancy/longer range tradeoff. 7 is a balanced number to use.
|
||||
|
||||
if(isturf(A) && hitsound_wall)
|
||||
var/volume = CLAMP(vol_by_damage() + 20, 0, 100)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
knockdown = 100
|
||||
dismemberment = 50
|
||||
armour_penetration = 50
|
||||
zone_accuracy_factor = 100 //guarunteed 100%
|
||||
var/breakthings = TRUE
|
||||
|
||||
/obj/item/projectile/bullet/p50/on_hit(atom/target, blocked = 0)
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user