mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-15 03:52:43 +00:00
* 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
94 lines
2.5 KiB
Plaintext
94 lines
2.5 KiB
Plaintext
/obj/item/gun/throw
|
|
name = "abstract item thrower"
|
|
desc = "This shouldn't be here, yell at a coder."
|
|
fire_sound = 'sound/weapons/punchmiss.ogg'
|
|
fire_sound_text = "thwock"
|
|
|
|
var/obj/item/to_launch
|
|
var/list/valid_projectile_type
|
|
var/max_capacity = 1
|
|
var/list/loaded_projectiles = list()
|
|
|
|
var/projectile_speed = 1
|
|
var/projectile_range = 1
|
|
|
|
/obj/item/gun/throw/proc/notify_ammo_count()
|
|
return
|
|
|
|
/obj/item/gun/throw/proc/get_throwrange()
|
|
return projectile_range
|
|
|
|
/obj/item/gun/throw/proc/get_throwspeed()
|
|
return projectile_speed
|
|
|
|
/obj/item/gun/throw/proc/modify_projectile(obj/item/I, on_chamber = 0)
|
|
return
|
|
|
|
/obj/item/gun/throw/proc/get_ammocount(include_loaded = 1)
|
|
var/count = loaded_projectiles.len
|
|
if(include_loaded && to_launch)
|
|
count++
|
|
return count
|
|
|
|
/obj/item/gun/throw/examine(mob/user)
|
|
. = ..()
|
|
. += "<span class='notice'>It is [to_launch ? "loaded with \a [to_launch]" : "not loaded"].</span>"
|
|
. += notify_ammo_count()
|
|
|
|
/obj/item/gun/throw/Destroy()
|
|
QDEL_NULL(to_launch)
|
|
QDEL_LIST(loaded_projectiles)
|
|
loaded_projectiles = null
|
|
return ..()
|
|
|
|
/obj/item/gun/throw/update_icon_state()
|
|
return
|
|
|
|
/obj/item/gun/throw/update_overlays()
|
|
return list()
|
|
|
|
/obj/item/gun/throw/attackby(obj/item/I, mob/user, params)
|
|
if(istype(I, valid_projectile_type) && !(I.flags & NODROP))
|
|
if(get_ammocount() < max_capacity)
|
|
user.drop_item()
|
|
I.forceMove(src)
|
|
loaded_projectiles += I
|
|
to_chat(user, "<span class='notice'>You load [I] into [src].</span>")
|
|
if(!to_launch)
|
|
process_chamber()
|
|
to_chat(user, notify_ammo_count())
|
|
else
|
|
to_chat(user, "<span class='warning'>[src] cannot hold any more projectiles.</span>")
|
|
else
|
|
to_chat(user, "<span class='warning'>You cannot load [I] into [src]!</span>")
|
|
|
|
/obj/item/gun/throw/process_chamber()
|
|
if(!to_launch && loaded_projectiles.len)
|
|
to_launch = loaded_projectiles[1]
|
|
loaded_projectiles -= to_launch
|
|
return
|
|
|
|
/obj/item/gun/throw/can_shoot()
|
|
if(to_launch)
|
|
return 1
|
|
return 0
|
|
|
|
/obj/item/gun/throw/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override)
|
|
add_fingerprint(user)
|
|
if(semicd)
|
|
return
|
|
|
|
var/obj/item/I = to_launch
|
|
I.forceMove(get_turf(src))
|
|
to_launch = null
|
|
modify_projectile(I)
|
|
playsound(user, fire_sound, 50, 1)
|
|
I.throw_at(target, get_throwrange(), get_throwspeed(), user, FALSE)
|
|
message_admins("[key_name_admin(user)] fired \a [I] from a [src].")
|
|
log_game("[key_name_admin(user)] used \a [src].")
|
|
process_chamber()
|
|
|
|
semicd = 1
|
|
spawn(fire_delay)
|
|
semicd = 0
|