Skip to content

Commit

Permalink
Fix weird hardpoint and vehicle examines
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed Jun 21, 2024
1 parent 0132ce0 commit dd53597
Show file tree
Hide file tree
Showing 28 changed files with 50 additions and 28 deletions.
2 changes: 1 addition & 1 deletion code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ cases. Override_icon_state should be a list.*/
size = "huge"
if(SIZE_MASSIVE)
size = "massive"
. += "This is a [blood_color ? blood_color != COLOR_OIL ? "bloody " : "oil-stained " : ""][icon2html(src, user)][src.name]. It is a [size] item."
. += "[p_are() == "are" ? "These are " : "This is a "][blood_color ? blood_color != COLOR_OIL ? "bloody " : "oil-stained " : ""][icon2html(src, user)][src.name]. [p_they(TRUE)] [p_are()] a [size] item."
if(desc)
. += desc
if(desc_lore)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/armor/ballistic.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/armor/ballistic
name = "Ballistic Armor"
name = "\improper Ballistic Armor"
desc = "Protects the vehicle from high-penetration weapons"

icon_state = "ballistic_armor"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/armor/caustic.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/armor/caustic
name = "Caustic Armor"
name = "\improper Caustic Armor"
desc = "Protects vehicles from most types of acid"

icon_state = "caustic_armor"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/armor/concussive.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/armor/concussive
name = "Concussive Armor"
name = "\improper Concussive Armor"
desc = "Protects the vehicle from high-impact weapons"

icon_state = "concussive_armor"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/armor/paladin.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/armor/paladin
name = "Paladin Armor"
name = "\improper Paladin Armor"
desc = "Protects the vehicle from large incoming explosive projectiles"

icon_state = "paladin_armor"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/armor/snowplow.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/armor/snowplow
name = "Snowplow"
name = "\improper Snowplow"
desc = "Clears a path in the snow for friendlies"

icon_state = "snowplow"
Expand Down
6 changes: 6 additions & 0 deletions code/modules/vehicles/hardpoints/hardpoint.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@
//------GENERAL PROCS----------
//-----------------------------

/obj/item/hardpoint/p_s(temp_gender)
if(!temp_gender)
temp_gender = gender
if(temp_gender == PLURAL)
. = "s"

/obj/item/hardpoint/Initialize()
. = ..()
set_bullet_traits()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/holder/tank_turret.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/holder/tank_turret
name = "M34A2-A Multipurpose Turret"
name = "\improper M34A2-A Multipurpose Turret"
desc = "The centerpiece of the tank. Designed to support quick installation and deinstallation of various tank weapon modules. Has inbuilt smoke screen deployment system."

icon = 'icons/obj/vehicles/tank.dmi'
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/primary/autocannon.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/primary/autocannon
name = "AC3-E Autocannon"
name = "\improper AC3-E Autocannon"
desc = "A primary autocannon for tanks that shoots explosive flak rounds"

icon_state = "ace_autocannon"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/primary/dual_cannon.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// APC cannons
/obj/item/hardpoint/primary/dualcannon
name = "PARS-159 Boyars Dualcannon"
name = "\improper PARS-159 Boyars Dualcannon"
desc = "A primary two-barrel cannon for the APC that shoots 20mm IFF-compatible rounds."
icon = 'icons/obj/vehicles/hardpoints/apc.dmi'

Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/primary/flamer.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/primary/flamer
name = "DRG-N Offensive Flamer Unit"
name = "\improper DRG-N Offensive Flamer Unit"
desc = "A primary weapon for the tank that spews fire everywhere."

icon_state = "drgn_flamer"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/primary/ltb.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/primary/cannon
name = "LTB Cannon"
name = "\improper LTB Cannon"
desc = "A primary cannon for tanks that shoots explosive rounds"

icon_state = "ltb_cannon"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/primary/minigun.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/primary/minigun
name = "LTAA-AP Minigun"
name = "\improper LTAA-AP Minigun"
desc = "A primary weapon for tanks that spews bullets"

icon_state = "ltaaap_minigun"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/secondary/cupola.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/secondary/m56cupola
name = "M56 Cupola"
name = "\improper M56 Cupola"
desc = "A secondary weapon for tanks that shoots bullets"

icon_state = "m56_cupola"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/secondary/flamer.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/secondary/small_flamer
name = "LZR-N Flamer Unit"
name = "\improper LZR-N Flamer Unit"
desc = "A secondary weapon for tanks that spews hot fire."

icon_state = "flamer"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/secondary/frontalcannon
name = "Bleihagel RE-RE700 Frontal Cannon"
name = "\improper Bleihagel RE-RE700 Frontal Cannon"
desc = "The marketing department over at Bleihagel would have you believe that the RE-RE700 is an original design. However, experts who pried the cover off the cannon have discovered an object with a striking similarity to the popular M56 Cupola. It is still unknown why the cannon has two barrels."
icon = 'icons/obj/vehicles/hardpoints/apc.dmi'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/secondary/grenade_launcher
name = "M92T Grenade Launcher"
name = "\improper M92T Grenade Launcher"
desc = "A secondary weapon for tanks that shoots grenades."

icon_state = "glauncher"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/secondary/tow.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/secondary/towlauncher
name = "TOW Launcher"
name = "\improper TOW Launcher"
desc = "A secondary weapon for tanks that shoots rockets"

icon_state = "tow_launcher"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//this is Cupola guns that are fired from the sides of APC by support gunners
/obj/item/hardpoint/special/firing_port_weapon
name = "M56 FPW"
name = "\improper M56 FPW"
desc = "A modified M56B Smartgun installed on the sides of M577 Armored Personnel Carrier as a Firing Port Weapon. Used by support gunners to cover friendly infantry at APC sides."

icon = 'icons/obj/vehicles/hardpoints/apc.dmi'
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/support/artillery.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/support/artillery_module
name = "Artillery Module"
name = "\improper Artillery Module"
desc = "Allows the user to look far into the distance."

icon_state = "artillery"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/support/flare.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/support/flare_launcher
name = "M-87F Flare Launcher"
name = "\improper M-87F Flare Launcher"
desc = "A support module for APCs that shoots flares."
icon = 'icons/obj/vehicles/hardpoints/apc.dmi'

Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/support/iwsa.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/support/weapons_sensor
name = "Integrated Weapons Sensor Array"
name = "\improper Integrated Weapons Sensor Array"
desc = "Improves the accuracy and fire rate of all onboard weapons"

icon_state = "warray"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/support/overdrive.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/support/overdrive_enhancer
name = "Overdrive Enhancer"
name = "\improper Overdrive Enhancer"
desc = "Increases the movement speed of the vehicle it's attached to"

icon_state = "odrive_enhancer"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/wheels/apc_wheels.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/locomotion/apc_wheels
name = "APC Wheels"
name = "\improper APC Wheels"
desc = "Integral to the movement of the APC."
icon = 'icons/obj/vehicles/hardpoints/apc.dmi'

Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/hardpoints/wheels/arc_wheels.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/locomotion/arc_wheels
name = "ARC Wheels"
name = "\improper ARC Wheels"
desc = "Integral to the movement of the ARC."
icon = 'icons/obj/vehicles/hardpoints/arc.dmi'

Expand Down
16 changes: 16 additions & 0 deletions code/modules/vehicles/hardpoints/wheels/locomotion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@
var/move_momentum_build_factor = 0
var/move_turn_momentum_loss_factor = 0

/obj/item/hardpoint/locomotion/p_are(temp_gender)
if(!temp_gender)
temp_gender = gender
. = "is"
if(temp_gender == PLURAL)
. = "are"

/obj/item/hardpoint/locomotion/p_they(capitalized, temp_gender)
if(!temp_gender)
temp_gender = gender
. = "it"
if(temp_gender == PLURAL)
. = "they"
if(capitalized)
. = capitalize(.)

/obj/item/hardpoint/locomotion/deactivate()
owner.move_delay = initial(owner.move_delay)
owner.move_max_momentum = initial(owner.move_max_momentum)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/vehicles/hardpoints/wheels/treads.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/item/hardpoint/locomotion/treads
name = "Treads"
name = "\improper Treads"
desc = "Integral to the movement of the vehicle."

icon_state = "treads"
Expand All @@ -17,7 +17,7 @@
move_turn_momentum_loss_factor = 0.6

/obj/item/hardpoint/locomotion/treads/robust
name = "Reinforced Treads"
name = "\improper Reinforced Treads"
desc = "These treads are made of a tougher material and are more durable. However, the extra weight slows the tank down slightly."

health = 500
Expand Down
4 changes: 2 additions & 2 deletions code/modules/vehicles/multitile/multitile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
/obj/vehicle/multitile/get_examine_text(mob/user)
. = ..()
for(var/obj/item/hardpoint/H in hardpoints)
. += "There is \a [H] module installed."
. += "There [H.p_are()] \a [H] module[H.p_s()] installed."
H.examine(user, TRUE)
if(clamped)
. += "There is a vehicle clamp attached."
Expand All @@ -267,7 +267,7 @@
for(var/datum/role_reserved_slots/RRS in interior.role_reserved_slots)
passengers_amount += RRS.taken
if(passengers_amount > 0)
. += "You can sense approximately [passengers_amount] hosts inside."
. += "You can sense approximately [passengers_amount] host\s inside."

/obj/vehicle/multitile/proc/load_hardpoints()
return
Expand Down

0 comments on commit dd53597

Please sign in to comment.