From a16f5d04b795cf86dac2d0fb362dd716dc16cfd2 Mon Sep 17 00:00:00 2001 From: qweq12yt <45515587+qweq12yt@users.noreply.github.com> Date: Tue, 16 Mar 2021 02:54:13 -0300 Subject: [PATCH] partial derringer - windup needs balance --- .../boxes_magazines/internal/revolver.dm | 5 +++ .../projectiles/guns/ballistic/revolver.dm | 22 ++++++++++ code/modules/projectiles/guns/energy/laser.dm | 39 ++++++++++++++++++ sound/weapons/derringer.ogg | Bin 0 -> 18802 bytes sound/weapons/wind_up_1.ogg | Bin 0 -> 50468 bytes sound/weapons/wind_up_2.ogg | Bin 0 -> 48557 bytes sound/weapons/wind_up_3.ogg | Bin 0 -> 46702 bytes 7 files changed, 66 insertions(+) create mode 100644 sound/weapons/derringer.ogg create mode 100644 sound/weapons/wind_up_1.ogg create mode 100644 sound/weapons/wind_up_2.ogg create mode 100644 sound/weapons/wind_up_3.ogg diff --git a/code/modules/projectiles/boxes_magazines/internal/revolver.dm b/code/modules/projectiles/boxes_magazines/internal/revolver.dm index a9cad1adc8..d7fbf45bb4 100644 --- a/code/modules/projectiles/boxes_magazines/internal/revolver.dm +++ b/code/modules/projectiles/boxes_magazines/internal/revolver.dm @@ -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 diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index 0d60203cb5..137fd2c640 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -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("[user] extends their hand in [pbtarget]'s direction.", null, null, DEFAULT_MESSAGE_RANGE) + diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 8e61221cc8..910279e88d 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -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!") diff --git a/sound/weapons/derringer.ogg b/sound/weapons/derringer.ogg new file mode 100644 index 0000000000000000000000000000000000000000..637d652ebfedbec59cf8fa245db06a78d2767c3f GIT binary patch literal 18802 zcmeFZbyQT}yD)x+1_=?Q1Oz1oB}JMM!Js9iySuvv1ZhD)Iz>qVC8WD^K%}H4M!Fe> zn0XKS`QG>YyT7~M`&;X--+%96&t5y8y`Qt6+Ru)IvZbXOfCc>Xgh>BQhzW)?LKq<) zjxHwFu2)4^u!es?oc{vXLX@vs{>O9G5(4Iq>%?$xSYZCs^A7uOS6m>3mbH`B17#OW zCOd1BSAP&Ny
Tk&=M`Y$P_}olc5*RyHFt31yh23<{?uQnE67SXIXW3yI-0v0
zswgQxu(viNxvEip{6txKQ()?Xjl^jHz;ysHV&NoB
zuz11wDKVGBJ0oCm8N !xU=Kze$W5jVEna
z1O+f^-YX~r;3wb~WEw2(&fsO%2tbQaeeP_OE5DZF;my6&tSHT`v
zaWFh{lj%!T7&=lQ`xg_g*bV?tKKd?a`aX~vs`tlS9%{NuOu8ygf~2^j$p85X`Xevk
zK$tTvl5AiE0&&KF$N~eqrO73DLi`sK2oRpT!jv|Wb~q$Lnzou#M43L;7NMTbURRWo
z{)dBh!?epFFFE^DyK+)T(p-mM5T||moASPqj$c~z9W0|oWRP~#8iR1w-_!7mrnSJf
z+9PReg>{r*Dk3qRy}C~QZ-4)YMUg?qaGS^y*dpR*x@{eyKA1w8W$X+QUX}f4@qvPT
zGoGU9&J1Sqe~V{A$(+xez~~lBnvlcS%lVNp=Iv9tqSq>_wCtbUg8z)12>?Q_|B>Q<
zMSn#3uM~fbkG$8
YPhwt~gXm_f9keTy>jo9@ndwgJ9XyWTy%1?EKj|m!!67Wr?-1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