partial derringer - windup needs balance
This commit is contained in:
@@ -20,3 +20,8 @@
|
||||
/obj/item/ammo_box/magazine/internal/rus357/Initialize()
|
||||
stored_ammo += new ammo_type(src)
|
||||
. = ..()
|
||||
|
||||
// just to keep consistent with the derringer being on revolver.dm
|
||||
/obj/item/ammo_box/magazine/internal/cylinder/derringer
|
||||
caliber = list("38")
|
||||
max_ammo = 2
|
||||
|
||||
@@ -494,3 +494,25 @@
|
||||
var/mutable_appearance/charge_bar = mutable_appearance(icon, "[initial(icon_state)]_charge", color = batt_color)
|
||||
charge_bar.pixel_x = i
|
||||
. += charge_bar
|
||||
|
||||
// the derringer is neither a pistol or revolver, but for code sake, it fits here
|
||||
/obj/item/gun/ballistic/revolver/derringer
|
||||
name = "derringer pistol"
|
||||
desc = "A favorite among progressive dentists and vengeful action heroes. Hides neatly inside your sleeves! Uses .38-special rounds."
|
||||
fire_sound = "sound/weapons/derringer.ogg"
|
||||
icon_state = "pistol" // placeholder
|
||||
item_state = null // not visible in sprite, we want it jango style (not having it show on mob examine would be good as well)
|
||||
suppressed = TRUE // this gotta be good for SOMETHING
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/derringer
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
// you can't spin a derringer!
|
||||
/obj/item/gun/ballistic/revolver/derringer/do_spin()
|
||||
return
|
||||
|
||||
// the little reference
|
||||
/obj/item/gun/ballistic/revolver/derringer/shoot_live_shot(mob/living/user, pointblank, mob/pbtarget, message, stam_cost)
|
||||
. = ..()
|
||||
if(pointblank)
|
||||
user.visible_message("<span class='notice'>[user] extends their hand in [pbtarget]'s direction.</span>", null, null, DEFAULT_MESSAGE_RANGE)
|
||||
|
||||
|
||||
@@ -246,3 +246,42 @@
|
||||
chambered.BB.damage *= 5
|
||||
|
||||
process_fire(target, user, TRUE, params)
|
||||
|
||||
// wind-up laser for your hilarious antics
|
||||
/obj/item/gun/energy/laser/windupgun
|
||||
name = "wind-up rifle"
|
||||
cell_type = /obj/item/stock_parts/cell/empty
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser)
|
||||
desc = "A rifle using not so state-of-the-art mechanism of self charging. Music Box included"
|
||||
icon_state = "laser"
|
||||
item_state = "laser"
|
||||
can_charge = FALSE // it is wind-up after all
|
||||
dead_cell = TRUE
|
||||
shaded_charge = FALSE // we don't want to see charge ammount, or do we?
|
||||
var/music_box_state = -1 // part of the song to play
|
||||
var/music_part = "" // and the path for said part
|
||||
|
||||
/obj/item/gun/energy/laser/windupgun/proc/set_music_state()
|
||||
music_box_state = (music_box_state + 1) % 4
|
||||
switch (music_box_state)
|
||||
if (0)
|
||||
music_part = "sound/weapons/wind_up_1.ogg"
|
||||
if (1)
|
||||
music_part = "sound/weapons/wind_up_2.ogg"
|
||||
if (2)
|
||||
music_part = "sound/weapons/wind_up_1.ogg"
|
||||
if (3)
|
||||
music_part = "sound/weapons/wind_up_3.ogg"
|
||||
|
||||
/obj/item/gun/energy/laser/windupgun/attack_self(mob/living/user)
|
||||
to_chat(user, "You begin turning the key...")
|
||||
set_music_state()
|
||||
playsound(user, music_part, 15, FALSE, ignore_walls = FALSE)
|
||||
var/done = FALSE
|
||||
if(do_after(user, 40, target = user))
|
||||
cell.give(cell.maxcharge)
|
||||
done = TRUE
|
||||
if(done)
|
||||
to_chat(user, "You fully wind up the laser gun!")
|
||||
else
|
||||
to_chat(user, "You need to stay still while winding it!")
|
||||
|
||||
Reference in New Issue
Block a user