Files
Paradise/code/modules/projectiles/guns/projectile/bow.dm
Vi3trice f4b37b4177 Port TG updating appearances (#17943)
* Get pants that match or else you gonna look silly yo

* Posters

* Fix other hud elements

* Rereviewed

* Update shotglass.dm

* Fix for new merged PRs

* Typo

* Coming across other stuff

* Update theblob.dm

* No takebacksies

* smh i forget to leave a comment

* Updated for the detgun and cards

* Should have rerun langserver again

* No longer plastic, more in scope

* Damn you bluespace

* Reverting turret logic, out of scope at this point

* Tweak that part

* Went over energy guns again, and fixed UI White's sprite sheet

* Welding masks, glasses, and JUSTICE

* Update portable_atmospherics.dm

* Cleaning up, clearing things up

* Review and suggestions

* Update valve.dm

* More tweaks

* Missing character

* Not distinct lightmasks, so they can be overlays

* Update generator.dm

* Add parameter so holodeck doesn't try to make a perfect copy

* Update unsorted.dm

* Spiders

* Better fix for spiders, fix vamps too

* Ghosts

* Update telekinesis.dm

* Cleaning up old procs

* It's set up to not copy datums... Unless they're in a list

* Donuts, duct tape, and detgun. D3VR coming to Early Access

* Update procs that interact with doors so they call update_state instead

* Forgot one spot, and actually might as well just force lock

* Cleaning up other things... Sigh, and kitty ears

* oops

* Getting used to how it works

* blinds

* Going back to the suit obscuring thing, so it doesn't update all the time

* Missed that from merging master

* I made this PR and forgot about it

* Fix runtimes in cards

* Make things a bit more unified

* Update update_icons.dm

* yarn, really?

* Update library_equipment.dm

* Update shieldgen.dm

* Every time Charlie merges something, I go back and see if I can improve things further

* what's this? more?

* Update misc_special.dm

* wow, paper

* Review

* More reviews

* To be sure, seems like being broken messed something sometimes

* Brought airlocks closer to how TG works to iron out some stuff

* Pizza and morgue

* Doesn't seem to hurt, tried with holodeck

* Revert "Doesn't seem to hurt, tried with holodeck"

This reverts commit 158529302b.

* Icon conflict

* Fix organ damage

* Don't ask how. Why. It's like that on prod too.

* Cutting down on things and updating from TG.

* More flexible. Just in case the thing you stuck it on didn't destroy.

* Hydro was one the things I touched earlier on, better rework it

* Reviews

* Cleaning up further, also bri'ish

* Undo a change I did, and switch over to a more recent implementation

* Update biogenerator.dm

* Rolling back to old airlocks, but with new duct taped note

* Functionally the same. I'd just rather not have the smoothing happen there

* Went over APCs again

* Fix welding helmet names in species files

* Update airlock.dm

* Update persistent_overlay.dm

* Oh, topic
2022-07-21 08:11:59 +02:00

99 lines
2.5 KiB
Plaintext

/obj/item/gun/projectile/bow
name = "bow"
desc = "A sturdy bow made out of wood and reinforced with iron."
icon_state = "bow_unloaded"
item_state = "bow"
fire_sound = 'sound/weapons/grenadelaunch.ogg'
mag_type = /obj/item/ammo_box/magazine/internal/bow
flags = HANDSLOW
weapon_weight = WEAPON_HEAVY
var/draw_sound = 'sound/weapons/draw_bow.ogg'
var/ready_to_fire = 0
var/slowdown_when_ready = 2
/obj/item/gun/projectile/bow/update_icon_state()
if(magazine.ammo_count() && !ready_to_fire)
icon_state = "bow_loaded"
else if(ready_to_fire)
icon_state = "bow_firing"
slowdown = slowdown_when_ready
else
icon_state = initial(icon_state)
slowdown = initial(slowdown)
/obj/item/gun/projectile/bow/dropped(mob/user)
..()
if(magazine && magazine.ammo_count())
magazine.empty_magazine()
ready_to_fire = FALSE
update_icon()
/obj/item/gun/projectile/bow/attack_self(mob/living/user)
if(!ready_to_fire && magazine.ammo_count())
ready_to_fire = TRUE
playsound(user, draw_sound, 100, 1)
update_icon()
else
ready_to_fire = FALSE
update_icon()
/obj/item/gun/projectile/bow/attackby(obj/item/A, mob/user, params)
var/num_loaded = magazine.attackby(A, user, params, 1)
if(num_loaded)
to_chat(user, "<span class='notice'>You ready \the [A] into \the [src].</span>")
update_icon()
chamber_round()
/obj/item/gun/projectile/bow/can_shoot()
. = ..()
if(!ready_to_fire)
return FALSE
/obj/item/gun/projectile/bow/shoot_with_empty_chamber(mob/living/user as mob|obj)
return
/obj/item/gun/projectile/bow/process_chamber(eject_casing = 0, empty_chamber = 1)
. = ..()
ready_to_fire = FALSE
update_icon()
// ammo
/obj/item/ammo_box/magazine/internal/bow
name = "bow internal magazine"
ammo_type = /obj/item/ammo_casing/caseless/arrow
caliber = "arrow"
max_ammo = 1
/obj/item/projectile/bullet/reusable/arrow
name = "arrow"
icon_state = "arrow"
ammo_type = /obj/item/ammo_casing/caseless/arrow
range = 10
damage = 25
damage_type = BRUTE
/obj/item/ammo_casing/caseless/arrow
name = "arrow"
desc = "Stab, stab, stab."
icon_state = "arrow"
force = 10
projectile_type = /obj/item/projectile/bullet/reusable/arrow
muzzle_flash_effect = null
caliber = "arrow"
//quiver
/obj/item/storage/backpack/quiver
name = "quiver"
desc = "A quiver for holding arrows."
icon_state = "quiver"
item_state = "quiver"
storage_slots = 20
can_hold = list(
/obj/item/ammo_casing/caseless/arrow
)
/obj/item/storage/backpack/quiver/full/populate_contents()
for(var/i in 1 to storage_slots)
new /obj/item/ammo_casing/caseless/arrow(src)