Skip to content

Commit

Permalink
Modularize and table flip (#4182)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shoddd authored Nov 11, 2024
1 parent fba9da8 commit b842b6a
Show file tree
Hide file tree
Showing 14 changed files with 96 additions and 86 deletions.
2 changes: 0 additions & 2 deletions code/__DEFINES/projectiles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
#define CALIBER_38 ".38"
/// The caliber used by the chaplain's revolver.
#define CALIBER_77 ".77"
/// The caliber used by long revolver and long rifle
#define CALIBER_45L ".45l"
/// The caliber used by the C-20r SMG, the tommygun, and the M1911 pistol.
#define CALIBER_45 ".45"
/// The caliber used by sniper rifles and the desert eagle.
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/~monkestation/projectiles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
/// Caliber used by the pepperball gun
#define CALIBER_PEPPERBALL "pepperball"

/// The caliber used by long revolver and long rifle
#define CALIBER_45L ".45l"

// open to suggestions on where to put these overrides
// hugely not a fan of this but we do what we gotta

Expand Down
14 changes: 0 additions & 14 deletions code/modules/projectiles/ammunition/ballistic/revolver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,3 @@
name = ".38 Iceblox bullet casing"
desc = "A .38 Iceblox bullet casing."
projectile_type = /obj/projectile/bullet/c38/iceblox

// .45 (Lever Rifle and Long Revolver)

/obj/item/ammo_casing/g45l
name = ".45 Long bullet casing "
desc = "A .45 Long bullet casing."
caliber = CALIBER_45L
projectile_type = /obj/projectile/bullet/g45l

/obj/item/ammo_casing/g45l/rubber
name = ".45 Long rubber bullet casing"
desc = "A .45 Long rubber bullet casing."
caliber = CALIBER_45L
projectile_type = /obj/projectile/bullet/g45l/rubber
14 changes: 0 additions & 14 deletions code/modules/projectiles/boxes_magazines/ammo_boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,6 @@
desc = "Designed to quickly reload revolvers. Iceblox bullets contain a cryogenic payload."
ammo_type = /obj/item/ammo_casing/c38/iceblox

/obj/item/ammo_box/g45l
name = "ammo box (.45 Long Lethal)"
desc = "This box contains .45 Long lethal cartridges."
ammo_type = /obj/item/ammo_casing/g45l
icon_state = "45box"
max_ammo = 24

/obj/item/ammo_box/g45l/rubber
name = "ammo box (.45 Long Rubber)"
desc = "Brought to you at great expense,this box contains .45 Long rubber cartridges."
icon_state = "45box"
ammo_type = /obj/item/ammo_casing/g45l/rubber
max_ammo = 24

/obj/item/ammo_box/c9mm
name = "ammo box (9mm)"
icon_state = "9mmbox"
Expand Down
6 changes: 0 additions & 6 deletions code/modules/projectiles/boxes_magazines/internal/revolver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,3 @@
/obj/item/ammo_box/magazine/internal/rus357/Initialize(mapload)
stored_ammo += new ammo_type(src)
. = ..()

/obj/item/ammo_box/magazine/internal/cylinder/rev45l
name = ".45 Long revolver cylinder"
ammo_type = /obj/item/ammo_casing/g45l
caliber = CALIBER_45L
max_ammo = 6
12 changes: 0 additions & 12 deletions code/modules/projectiles/guns/ballistic/revolver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,6 @@

accepted_magazine_type = /obj/item/ammo_box/magazine/internal/cylinder/rev762

/obj/item/gun/ballistic/revolver/r45l
name = "\improper .45 Long Revolver"
desc = "A cheap .45 Long Revolver. Pray the timing keeps."
icon_state = "45revolver"
accepted_magazine_type = /obj/item/ammo_box/magazine/internal/cylinder/rev45l
obj_flags = UNIQUE_RENAME

unique_reskin = list("Default" = "45revolver",
"Cowboy" = "357colt",
"Lucky" = "lucky" //Well do ya?
)

// A gun to play Russian Roulette!
// You can spin the chamber to randomize the position of the bullet.

Expand Down
19 changes: 0 additions & 19 deletions code/modules/projectiles/guns/ballistic/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -344,22 +344,3 @@
hook.afterattack(target, user, proximity_flag, click_parameters)
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN

// Lever gun
/obj/item/gun/ballistic/shotgun/leveraction
name = "brush gun"
desc = "While lever-actions have been horribly out of date for hundreds of years now, \
putting a nicely sized hole in a man-sized target with a .45 Long round has stayed relatively timeless."
icon_state = "brushgun"
bolt_wording = "Lever"
cartridge_wording = "bullet"
accepted_magazine_type = /obj/item/ammo_box/magazine/internal/shot/levergun
projectile_wound_bonus = 10
projectile_damage_multiplier = 1.1
w_class = WEIGHT_CLASS_BULKY
force = 10
flags_1 = CONDUCT_1
semi_auto = FALSE
internal_magazine = TRUE
casing_ejector = FALSE
weapon_weight = WEAPON_HEAVY

17 changes: 0 additions & 17 deletions code/modules/projectiles/projectile/bullets/revolver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,3 @@
ricochet_auto_aim_range = 6
ricochet_incidence_leeway = 80
ricochet_decay_chance = 1

// .45 (Lever Rifle and Long Revolver)

/obj/projectile/bullet/g45l/rubber
name = ".45 Long rubber bullet"
damage = 5
stamina = 35
weak_against_armour = TRUE
sharpness = NONE
embedding = null

/obj/projectile/bullet/g45l
name = ".45 Long bullet"
damage = 35
wound_bonus = -5
sharpness = SHARP_EDGED
embedding = list(embed_chance=25, fall_chance=2, jostle_chance=2, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.4, pain_mult=3, jostle_pain_mult=5, rip_time=1 SECONDS)
Binary file modified icons/obj/weapons/guns/ballistic.dmi
Binary file not shown.
85 changes: 85 additions & 0 deletions monkestation/code/game/objects/items/guns/long_guns.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// Lever gun
/obj/item/gun/ballistic/shotgun/leveraction
name = "brush gun"
desc = "While lever-actions have been horribly out of date for hundreds of years now, \
putting a nicely sized hole in a man-sized target with a .45 Long round has stayed relatively timeless."
icon_state = "brushgun"
icon = 'monkestation/icons/obj/guns/guns.dmi'
bolt_wording = "Lever"
cartridge_wording = "bullet"
accepted_magazine_type = /obj/item/ammo_box/magazine/internal/shot/levergun
projectile_wound_bonus = 10
projectile_damage_multiplier = 1.1
w_class = WEIGHT_CLASS_BULKY
force = 10
flags_1 = CONDUCT_1
semi_auto = FALSE
internal_magazine = TRUE
casing_ejector = FALSE
weapon_weight = WEAPON_HEAVY
pb_knockback = 0

// Revolver
/obj/item/gun/ballistic/revolver/r45l
name = "\improper .45 Long Revolver"
desc = "A cheap .45 Long Revolver. Pray the timing keeps."
icon_state = "45revolver"
icon = 'monkestation/icons/obj/guns/guns.dmi'
accepted_magazine_type = /obj/item/ammo_box/magazine/internal/cylinder/rev45l
obj_flags = UNIQUE_RENAME

unique_reskin = list("Default" = "45revolver",
"Cowboy" = "357colt",
"Lucky" = "lucky" //Well do ya?
)

// .45 (Lever Rifle and Long Revolver)

/obj/projectile/bullet/g45l/rubber
name = ".45 Long rubber bullet"
damage = 5
stamina = 35
weak_against_armour = TRUE
sharpness = NONE
embedding = null

/obj/projectile/bullet/g45l
name = ".45 Long bullet"
damage = 35
wound_bonus = -5
sharpness = SHARP_EDGED
embedding = list(embed_chance=25, fall_chance=2, jostle_chance=2, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.4, pain_mult=3, jostle_pain_mult=5, rip_time=1 SECONDS)

// .45 (Lever Rifle and Long Revolver)

/obj/item/ammo_casing/g45l
name = ".45 Long bullet casing "
desc = "A .45 Long bullet casing."
caliber = CALIBER_45L
projectile_type = /obj/projectile/bullet/g45l

/obj/item/ammo_casing/g45l/rubber
name = ".45 Long rubber bullet casing"
desc = "A .45 Long rubber bullet casing."
caliber = CALIBER_45L
projectile_type = /obj/projectile/bullet/g45l/rubber

/obj/item/ammo_box/g45l
name = "ammo box (.45 Long Lethal)"
desc = "This box contains .45 Long lethal cartridges."
ammo_type = /obj/item/ammo_casing/g45l
icon_state = "45box"
max_ammo = 24

/obj/item/ammo_box/g45l/rubber
name = "ammo box (.45 Long Rubber)"
desc = "Brought to you at great expense,this box contains .45 Long rubber cartridges."
icon_state = "45box"
ammo_type = /obj/item/ammo_casing/g45l/rubber
max_ammo = 24

/obj/item/ammo_box/magazine/internal/cylinder/rev45l
name = ".45 Long revolver cylinder"
ammo_type = /obj/item/ammo_casing/g45l
caliber = CALIBER_45L
max_ammo = 6
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@

/obj/structure/flippedtable/CtrlShiftClick(mob/user)
if(!istype(user) || iscorticalborer(user))
return FALSE
return
if(isobserver(user) && !is_admin(user.client)) //prevent ghosts from unflipping tables but still allows admins to fuck around
return
if(!user.CanReach(src))
return
user.balloon_alert_to_viewers("flipping table upright...")
if(do_after(user, max_integrity * 0.25))
var/obj/structure/table/unflipped_table = new table_type(src.loc)
Expand Down
3 changes: 2 additions & 1 deletion monkestation/code/modules/cargo/crates/imports.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
access_view = ACCESS_ARMORY
crate_type = /obj/structure/closet/crate/secure/weapon


// MONKESTATION ADDITION START
/datum/supply_pack/imports/Lrevolvercrate
name = "Long Revolver Crate"
desc = "We got these old revolvers from a unnamed man, enjoy them"
Expand Down Expand Up @@ -83,3 +83,4 @@
access = ACCESS_ARMORY
access_view = ACCESS_ARMORY
crate_type = /obj/structure/closet/crate/secure/weapon
// MONKESTATION ADDITION END
Binary file modified monkestation/icons/obj/guns/guns.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5982,6 +5982,7 @@
#include "monkestation\code\game\objects\items\granters\maintenanceencyclopedia.dm"
#include "monkestation\code\game\objects\items\grenades\monkey_barrel.dm"
#include "monkestation\code\game\objects\items\guns\crank_guns.dm"
#include "monkestation\code\game\objects\items\guns\long_guns.dm"
#include "monkestation\code\game\objects\items\guns\shotguns.dm"
#include "monkestation\code\game\objects\items\guns\SRN.dm"
#include "monkestation\code\game\objects\items\guns\wt_ammo.dm"
Expand Down

0 comments on commit b842b6a

Please sign in to comment.