Files
FluffyandGitHub a3a4d46fa7 Hitby refactor (#19624)
Refactored hitby to be in line with TG's version.
Refactored item weight defines to a more clear naming scheme, also in
line with TG's version.
Refactored how the movement bumps are handled, ported signals to handle
them, in preparation for the movement update.
Fixed disposal hit bouncing the hitting atom on the wall.
Items do not push other items anymore if they are tiny.
2024-07-28 20:52:08 +00:00

73 lines
2.3 KiB
Plaintext

/obj/item/gun/projectile/musket
name = "adhomian musket"
desc = "A rustic firearm, used by Tajaran soldiers during the adhomian gunpowder age"
desc_extended = "The Gunpowder Age was marked by the slow replacement of traditional Adhomian battle tactics and weapons, that included melee weapons and crossbows, in favor of \
cannons and primitive firing lines. The Kingdoms of Amohda, Nal'tor and Das'nrra were the first countries to make use of this new technology."
icon = 'icons/obj/guns/musket.dmi'
icon_state = "musket"
item_state = "musket"
load_method = SINGLE_CASING
handle_casings = DELETE_CASINGS
max_shells = 1
caliber = "musket"
slot_flags = SLOT_BACK
is_wieldable = TRUE
w_class = WEIGHT_CLASS_BULKY
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 2)
fire_delay = ROF_SPECIAL
fire_sound = 'sound/weapons/gunshot/musket.ogg'
recoil = 4
ammo_type = /obj/item/ammo_casing/musket
var/has_powder = FALSE
/obj/item/gun/projectile/musket/special_check(mob/user)
if(!has_powder)
to_chat(user, SPAN_WARNING("\The [src] is not loaded with gunpowder!"))
return FALSE
if(!wielded)
to_chat(user, SPAN_WARNING("You can't fire without stabilizing \the [src]!"))
return FALSE
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
smoke.set_up(3, 0, user.loc)
smoke.start()
has_powder = FALSE
return ..()
/obj/item/gun/projectile/musket/attackby(obj/item/attacking_item, mob/user)
..()
if (istype(attacking_item, /obj/item/reagent_containers))
if(has_powder)
to_chat(user, SPAN_WARNING("\The [src] is already full of gunpowder."))
return
var/obj/item/reagent_containers/C = attacking_item
if(C.reagents.has_reagent(/singleton/reagent/gunpowder, 5))
if(do_after(user, 15))
if(has_powder)
return
C.reagents.remove_reagent(/singleton/reagent/gunpowder, 5)
has_powder = TRUE
to_chat(user, SPAN_NOTICE("You fill \the [src] with gunpowder."))
/obj/item/reagent_containers/powder_horn
name = "powder horn"
desc = "An ivory container for gunpowder."
icon = 'icons/obj/guns/musket.dmi'
icon_state = "powderhorn"
w_class = WEIGHT_CLASS_NORMAL
slot_flags = SLOT_BELT
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5)
volume = 30
reagents_to_add = list(/singleton/reagent/gunpowder = 30)