diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 8f775b048ba..642e9b18411 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -1058,7 +1058,8 @@ Turret.eshot_sound = E.fire_sound Turret.egun = E.can_switch_modes Turret.sprite_set = E.turret_sprite_set - Turret.lethal_icon = E.turret_is_lethal + if(E.turret_is_lethal) + Turret.lethal_icon = 1 // Check if gun has wielded delay, turret will have same fire rate as the gun. if(E.fire_delay_wielded > 0) Turret.shot_delay = max(E.fire_delay_wielded, 4) diff --git a/code/game/objects/random/weapon.dm b/code/game/objects/random/weapon.dm index 0249a78f5b9..a73727f43d0 100644 --- a/code/game/objects/random/weapon.dm +++ b/code/game/objects/random/weapon.dm @@ -244,7 +244,7 @@ if(istype(spawned,/obj/item/gun/energy/)) var/obj/item/gun/energy/E = spawned E.charge_cost *= 2 - E.self_recharge = 0 + E.self_recharge = FALSE E.reliability = 90 /obj/random/mine diff --git a/code/modules/mob/living/silicon/robot/combat_robot.dm b/code/modules/mob/living/silicon/robot/combat_robot.dm index b13c228c097..110eee8efd2 100644 --- a/code/modules/mob/living/silicon/robot/combat_robot.dm +++ b/code/modules/mob/living/silicon/robot/combat_robot.dm @@ -65,8 +65,8 @@ max_shots = 20 charge_cost = 100 projectile_type = /obj/projectile/bullet/pistol/medium/ap - self_recharge = 1 - use_external_power = 1 + self_recharge = TRUE + use_external_power = TRUE recharge_time = 5 sel_mode = 1 needspin = FALSE @@ -82,7 +82,7 @@ desc = "A weapon favored by mercenary infiltration teams, this one is suited to be used by robots." max_shots = 4 charge_cost = 200 - use_external_power = 1 + use_external_power = TRUE /obj/item/gun/launcher/grenade/cyborg name = "mounted grenade launcher" diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 0bafc5e8030..ea69b76b439 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -1,10 +1,10 @@ -/* - Defines a firing mode for a gun. - - A firemode is created from a list of fire mode settings. Each setting modifies the value of the gun var with the same name. - If the fire mode value for a setting is null, it will be replaced with the initial value of that gun's variable when the firemode is created. - Obviously not compatible with variables that take a null value. If a setting is not present, then the corresponding var will not be modified. -*/ +/** + * Defines a firing mode for a gun. + * + * A firemode is created from a list of fire mode settings. Each setting modifies the value of the gun var with the same name. + * If the fire mode value for a setting is null, it will be replaced with the initial value of that gun's variable when the firemode is created. + * Obviously not compatible with variables that take a null value. If a setting is not present, then the corresponding var will not be modified. + */ /datum/firemode var/name = "default" var/list/settings = list() @@ -39,7 +39,7 @@ LAZYCLEARLIST(original_settings) original_settings = null -//Parent gun type. Guns are weapons that can be aimed at mobs and act over a distance +/// Parent gun type. Guns are weapons that can be aimed at mobs and act over a distance. /obj/item/gun name = "gun" desc = "It's a gun. It's pretty terrible, though." @@ -65,94 +65,116 @@ * Suppression vars */ - ///Does the gun have a suppressor attached, or should it be suppressed? This will modify firing messages to obscure their source, and change the firing sound to use suppressed_sound + /// Does the gun have a suppressor attached, or should it be suppressed? This will modify firing messages to obscure their source, and change the firing sound to use suppressed_sound var/suppressed = FALSE - ///The suppressor item currently attached to the gun + /// The suppressor item currently attached to the gun var/obj/item/suppressor/suppressor - ///Whether the weapon can have a suppressor attached + /// Whether the weapon can have a suppressor attached var/can_suppress = FALSE - ///Whether the weapon can have a suppressor unattached + /// Whether the weapon can have a suppressor unattached var/can_unsuppress = TRUE /* * Sound vars */ - ///Sound of the gun firing + /// Sound of the gun firing. var/fire_sound = 'sound/weapons/gunshot/gunshot1.ogg' - ///Whether to vary the frequency of the firing sound + /// Whether to vary the frequency of the firing sound. var/vary_fire_sound = TRUE - ///The volume of the firing sound + /// The volume of the firing sound. var/fire_sound_volume = 50 - ///Sound of the gun firing when empty (dryfiring) + /// Sound of the gun firing when empty (dryfiring). var/empty_sound = /singleton/sound_category/out_of_ammo - ///Determines what a player should hear in audible_message when the gun is fired. e.g gunshot, blast + /// Determines what a player should hear in audible_message when the gun is fired. e.g gunshot, blast. var/fire_sound_text = "gunshot" - ///The firing sound to play when suppressed = TRUE + /// The firing sound to play when suppressed = TRUE. var/suppressed_sound = 'sound/weapons/gunshot/gunshot_suppressed.ogg' - ///The volume of the suppressed sound + /// The volume of the suppressed sound. var/suppressed_volume = 60 - ///The sound of the safety being turned on + /// The sound of the safety being turned on. var/safetyon_sound = 'sound/weapons/blade_open.ogg' - ///The sound of the safety being turned off + /// The sound of the safety being turned off. var/safetyoff_sound = 'sound/weapons/blade_close.ogg' drop_sound = 'sound/items/drop/gun.ogg' pickup_sound = 'sound/items/pickup/gun.ogg' var/burst = 1 var/can_autofire = FALSE - var/fire_delay = 6 //delay after shooting before the gun can be used again - var/burst_delay = 1 //delay between shots, if firing in bursts + /// Delay after shooting before the gun can be used again + var/fire_delay = 6 + /// Delay between shots, if firing in bursts + var/burst_delay = 1 var/move_delay = 0 - var/recoil = 0 //screen shake + /// Screen shake. + var/recoil = 0 var/muzzle_flash = 3 - var/accuracy = 0 //accuracy is measured in tiles. +1 accuracy means that everything is effectively one tile closer for the purpose of miss chance, -1 means the opposite. launchers are not supported, at the moment. - var/offhand_accuracy = 0 // the higher this number, the more accurate this weapon is when fired from the off-hand + /// Accuracy is measured in tiles. +1 accuracy means that everything is effectively one tile closer for the purpose of miss chance, -1 means the opposite. launchers are not supported, at the moment. + var/accuracy = 0 + /// The higher this number, the more accurate this weapon is when fired from the off-hand. + var/offhand_accuracy = 0 var/scoped_accuracy = null - var/list/burst_accuracy = list(0) //allows for different accuracies for each shot in a burst. Applied on top of accuracy + /// Allows for different accuracies for each shot in a burst. Applied on top of accuracy. + var/list/burst_accuracy = list(0) var/list/dispersion = list(0) + /// The weapon's reliability; impacts probability rolls for misfires/failures of different sorts. As of 2025/11, only implemented for science modular weapons. var/reliability = 100 + /// Standard firing pin for most guns. + var/obj/item/device/firing_pin/pin = /obj/item/device/firing_pin + var/cyborg_maptext_override var/displays_maptext = FALSE + /// If this weapon can have an ammo display attached. var/can_ammo_display = TRUE + /// The ammo display attached to this weapon. var/obj/item/ammo_display maptext_x = 22 maptext_y = 2 - var/obj/item/device/firing_pin/pin = /obj/item/device/firing_pin //standard firing pin for most guns. - + /// If this weapon can have a bayonet attached. var/can_bayonet = FALSE + /// The bayonet attached to this weapon. var/obj/item/material/knife/bayonet/bayonet var/knife_x_offset = 0 var/knife_y_offset = 0 var/next_fire_time = 0 - var/sel_mode = 1 //index of the currently selected mode + /// Index of the currently selected mode. + var/sel_mode = 1 var/list/firemodes = list() - var/markings = 0 // for marking kills with a knife + /// For marking kills with a knife. + var/markings = 0 - //wielding information + // Wielding information var/fire_delay_wielded var/recoil_wielded var/accuracy_wielded var/wielded = 0 var/needspin = TRUE + /// Can this weapon be dual-wielded? var/is_wieldable = FALSE var/wield_sound = /singleton/sound_category/generic_wield_sound var/unwield_sound = null - var/one_hand_fa_penalty = 0 // Additional accuracy/dispersion penalty for using full auto one-handed + /// Additional accuracy/dispersion penalty for using full auto one-handed + var/one_hand_fa_penalty = 0 - //aiming system stuff - var/multi_aim = 0 //Used to determine if you can target multiple people. - var/tmp/list/mob/living/aim_targets //List of who yer targeting. - var/tmp/mob/living/last_moved_mob //Used to fire faster at more than one person. + // Aiming system stuff + /// Can this gun target multiple people? + var/multi_aim = 0 + /// List of who is being targeted. + var/tmp/list/mob/living/aim_targets + /// Used to fire faster at more than one person. + var/tmp/mob/living/last_moved_mob var/tmp/lock_time = -100 - var/safety_state = TRUE + + /// Whether or not the gun has a safety. var/has_safety = TRUE + /// Whether the gun's safety is currently engaged. + var/safety_state = TRUE var/image/safety_overlay /// If TRUE, applies the user's ID iff_faction to the projectile. As of 2025/11, code making use of this is not currently implemented. @@ -164,6 +186,25 @@ . += "To fire, toggle the safety with CTRL-click (or enable HARM intent), then click where you want to shoot." else . += "To fire, because this weapon has no safety, just click where you want to shoot." + if(is_wieldable) + . += "This weapon can be wielded with two hands to improve firing stability; use it on yourself while your inactive hand is empty to wield it." + . += "Use an object with a sharp edge, like a knife, to carve a notch into this." + +/obj/item/gun/assembly_hints(mob/user, distance, is_adjacent) + . += ..() + if(can_bayonet && !bayonet) + . += "This weapon can support the attachment of a bayonet." + if(can_ammo_display && !ammo_display) + . += "This weapon can support the attachment of an ammo display." + +/obj/item/gun/disassembly_hints(mob/user, distance, is_adjacent) + . += ..() + if(bayonet) + . += "The bayonet can be removed from this weapon with a crowbar." + if(ammo_display) + . += "The ammo display can be removed from this weapon with a wrench." + if(pin) + . += "The firing pin can be removed from this weapon with a screwdriver. Most firing pins are rather fragile, and this has a chance of breaking it!" /obj/item/gun/feedback_hints(mob/user, distance, is_adjacent) . += ..() @@ -348,6 +389,14 @@ var/shoot_time = max(fire_time, appropriate_delay) return shoot_time +/** + * Attempts to fire the weapon. This does several things, namely: + * * Adds fingerprints to the weapon. + * * Checks for the safety's engagement. + * * Runs reliability checks, and executes any custom-coded failure events. + * * Fire time checks to avoid spam, as well as handling shoot delay. + * * Makes the user face their target (duh). + */ /obj/item/gun/proc/fire_checks(atom/target, mob/living/user, clickparams, pointblank=0, reflex=0) if(!user || !target) return FALSE @@ -428,7 +477,7 @@ var/shoot_time = burst > 1 ? burst_delay + 1 : fire_delay user.setClickCooldown(shoot_time) -// Similar to the above proc, but does not require a user, which is ideal for things like turrets. +/// Similar to the Fire() proc, but does not require a user, which is ideal for things like turrets. /obj/item/gun/proc/Fire_userless(atom/target) if(!target) return FALSE @@ -928,7 +977,13 @@ QDEL_NULL(suppressor) return ..() - +/** + * This proc is only called when a weapon has already hit a failure chance, based on prob(100-reliability) during the fire_checks proc. + * Based on the weapon's relability value, this proc checks if the severity of the failure exceeds the default (1). It then executes + * either small_*, medium_*, or critical_fail procs. These are empty returns by default, and must be coded for each weapon/component. + * + * As of 2025/11, reliability failures are only implemented for Science's modular weaponry system. + */ /obj/item/gun/proc/handle_reliability_fail(var/mob/user) var/severity = 1 if(prob(100-reliability)) diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index f9407450ad8..d64cdf54a0a 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -11,21 +11,31 @@ safetyon_sound = 'sound/weapons/laser_safetyon.ogg' safetyoff_sound = 'sound/weapons/laser_safetyoff.ogg' - var/has_icon_ratio = TRUE // Does this gun use the ratio system to modify its icon_state? - var/has_item_ratio = TRUE // Does this gun use the ratio system to paint its item_states? + /// Does this gun use the ratio system to modify its icon_state? + var/has_icon_ratio = TRUE + /// Does this gun use the ratio system to paint its item_states? + var/has_item_ratio = TRUE - var/obj/item/cell/power_supply //What type of power cell this uses - var/charge_cost = 200 //How much energy is needed to fire. - var/max_shots = 10 //Determines the capacity of the weapon's power cell. Specifying a cell_type overrides this value. + /// What type of power cell this uses. + var/obj/item/cell/power_supply + /// How much energy is needed to fire. + var/charge_cost = 200 + /// Determines the capacity of the weapon's power cell. Specifying a cell_type overrides this value. + var/max_shots = 10 var/cell_type = null - var/projectile_type = /obj/projectile/beam/practice //also passed to turrets + /// Also passed to turrets. + var/projectile_type = /obj/projectile/beam/practice var/modifystate - var/charge_meter = 1 //if set, the icon state will be chosen based on the current charge - var/list/required_firemode_auth //This list matches with firemode index, used to determine which firemodes get unlocked with what level of authorization. + /// If set, the icon state will be chosen based on the current charge. + var/charge_meter = 1 + /// This list matches with firemode index, used to determine which firemodes get unlocked with what level of authorization. + var/list/required_firemode_auth //self-recharging - var/self_recharge = 0 //if set, the weapon will recharge itself - var/use_external_power = 0 //if set, the weapon will look for an external power source to draw from, otherwise it recharges magically + /// If set, the weapon will recharge itself. + var/self_recharge = FALSE + /// If set, the weapon will look for an external power source to draw from, otherwise it recharges magically + var/use_external_power = FALSE var/recharge_time = 4 /// Multiplies by charge cost to determine how much charge should be returned var/recharge_multiplier = 1 @@ -34,17 +44,25 @@ /// External power source for the gun. Checked by get_external_power_supply() var/obj/item/recharger - //vars passed to turrets - var/can_turret = 0 //1 allows you to attach the gun on a turret - var/secondary_projectile_type = null //if null, turret defaults to projectile_type - var/secondary_fire_sound = null //if null, turret defaults to fire_sound - var/can_switch_modes = 0 //1 allows switching lethal and stun modes - var/turret_sprite_set = "carbine" //set of sprites to use for the turret gun - var/turret_is_lethal = 1 //is the gun in lethal (secondary) mode by default + // Vars passed to turrets + /// If TRUE, allows you to attach the gun on a turret. + var/can_turret = FALSE + /// If null, turret defaults to projectile_type. + var/secondary_projectile_type = null + /// If null, turret defaults to fire_sound. + var/secondary_fire_sound = null + /// If TRUE, allows switching lethal and stun modes. + var/can_switch_modes = FALSE + /// Set of sprites to use for the turret gun. + var/turret_sprite_set = "carbine" + /// Is the gun in lethal (secondary) mode by default? + var/turret_is_lethal = TRUE /obj/item/gun/energy/mechanics_hints(mob/user, distance, is_adjacent) . += ..() . += "This is an energy weapon. Most energy weapons can fire through windows harmlessly. Energy weapons must be recharged once depleted." + if(can_turret) + . += "This weapon can be installed on a turret mount." /obj/item/gun/energy/feedback_hints(mob/user, distance, is_adjacent) . += ..() diff --git a/code/modules/projectiles/guns/energy/blaster.dm b/code/modules/projectiles/guns/energy/blaster.dm index 5f962718e77..6b29bea0eb5 100644 --- a/code/modules/projectiles/guns/energy/blaster.dm +++ b/code/modules/projectiles/guns/energy/blaster.dm @@ -169,13 +169,17 @@ list(mode_name="full auto", can_autofire=1, burst=1, fire_delay=5, fire_delay_wielded=2, one_hand_fa_penalty=12, burst_accuracy = list(0,-1,-1,-2,-2,-2,-3,-3), dispersion = list(5, 10, 15, 20, 25)) //same as the assault rifle ) -/obj/item/gun/energy/blaster/himeo/get_examine_text(mob/user, distance, is_adjacent, infix, suffix) //stolen from the plasma cutter - . = ..() +/obj/item/gun/energy/blaster/himeo/mechanics_hints(mob/user, distance, is_adjacent) + . += ..() + . += "When fully drained, this weapon will automatically eject the empty energy cell, allowing for rapid reload." + +/obj/item/gun/energy/blaster/himeo/feedback_hints(mob/user, distance, is_adjacent) + . += ..() if(is_adjacent) if(power_supply) - . += FONT_SMALL(SPAN_NOTICE("It has a [capitalize_first_letters(power_supply.name)] in the cell mount.")) + . += SPAN_NOTICE("It has a [capitalize_first_letters(power_supply.name)] in the cell mount.") else - . += FONT_SMALL(SPAN_WARNING("It has no cell installed.")) + . += SPAN_WARNING("It has no cell installed.") /obj/item/gun/energy/blaster/himeo/attackby(obj/item/attacking_item, mob/user) if(attacking_item.isscrewdriver()) diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 24ef135f760..fb0acd5e605 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -13,8 +13,8 @@ origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2) matter = list(DEFAULT_WALL_MATERIAL = 2000) projectile_type = /obj/projectile/beam/midlaser - can_turret = 1 - turret_is_lethal = 1 + can_turret = TRUE + turret_is_lethal = TRUE turret_sprite_set = "laser" modifystate = "laserrifle" @@ -50,8 +50,8 @@ offhand_accuracy = 1 projectile_type = /obj/projectile/beam fire_delay = 5 - can_turret = 1 - turret_is_lethal = 1 + can_turret = TRUE + turret_is_lethal = TRUE turret_sprite_set = "retro" modifystate = "retro" @@ -71,9 +71,9 @@ projectile_type = /obj/projectile/beam origin_tech = null max_shots = 5 //to compensate a bit for self-recharging - self_recharge = 1 - can_turret = 1 - turret_is_lethal = 1 + self_recharge = TRUE + can_turret = TRUE + turret_is_lethal = TRUE turret_sprite_set = "captain" /obj/item/gun/energy/captain/mechanics_hints(mob/user, distance, is_adjacent) @@ -94,18 +94,18 @@ charge_cost = 400 max_shots = 5 fire_delay = 20 - can_turret = 1 - turret_is_lethal = 1 + can_turret = TRUE + turret_is_lethal = TRUE turret_sprite_set = "cannon" modifystate = "lasercannon" /obj/item/gun/energy/lasercannon/mounted name = "mounted laser cannon" - self_recharge = 1 - use_external_power = 1 + self_recharge = TRUE + use_external_power = TRUE recharge_time = 10 - can_turret = 0 + can_turret = FALSE /obj/item/gun/energy/lasercannon/mounted/cyborg/overclocked recharge_time = 1 @@ -126,17 +126,17 @@ max_shots = 20 fire_delay = 4 burst_delay = 4 - can_turret = 1 - turret_is_lethal = 1 + can_turret = TRUE + turret_is_lethal = TRUE turret_sprite_set = "xray" /obj/item/gun/energy/xray/mounted name = "mounted xray laser gun" charge_cost = 200 - self_recharge = 1 - use_external_power = 1 + self_recharge = TRUE + use_external_power = TRUE recharge_time = 5 - can_turret = 0 + can_turret = FALSE /obj/item/gun/energy/sniperrifle name = "marksman energy rifle" @@ -156,9 +156,9 @@ w_class = WEIGHT_CLASS_BULKY accuracy = -3 //shooting at the hip scoped_accuracy = 4 - can_turret = 1 + can_turret = TRUE turret_sprite_set = "sniper" - turret_is_lethal = 1 + turret_is_lethal = TRUE is_wieldable = TRUE diff --git a/code/modules/projectiles/guns/energy/modular.dm b/code/modules/projectiles/guns/energy/modular.dm index 1a969a7e6e9..5c6238f8c85 100644 --- a/code/modules/projectiles/guns/energy/modular.dm +++ b/code/modules/projectiles/guns/energy/modular.dm @@ -146,7 +146,7 @@ if(MOD_SILENCE) suppressed = TRUE if(MOD_NUCLEAR_CHARGE) - self_recharge = 1 + self_recharge = TRUE criticality *= 2 fire_delay *= modifier.fire_delay reliability += modifier.reliability diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index fd798b5e514..d2f75fc4247 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -9,11 +9,11 @@ slot_flags = SLOT_BELT accuracy = 1 max_shots = 15 - can_turret = 1 + can_turret = TRUE secondary_projectile_type = /obj/projectile/beam secondary_fire_sound = 'sound/weapons/laser1.ogg' - can_switch_modes = 1 - turret_is_lethal = 0 + can_switch_modes = TRUE + turret_is_lethal = FALSE projectile_type = /obj/projectile/beam/stun origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2) @@ -30,9 +30,9 @@ /obj/item/gun/energy/gun/mounted name = "mounted energy gun" - self_recharge = 1 - use_external_power = 1 - can_turret = 0 + self_recharge = TRUE + use_external_power = TRUE + can_turret = FALSE /obj/item/gun/energy/gun/nuclear name = "advanced energy gun" @@ -43,7 +43,7 @@ origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 5, TECH_POWER = 3) slot_flags = SLOT_BELT force = 18 //looks heavier than a pistol - self_recharge = 1 + self_recharge = TRUE modifystate = null reliability = 95 turret_sprite_set = "nuclear" @@ -133,12 +133,12 @@ slot_flags = SLOT_BELT|SLOT_HOLSTER max_shots = 10 fire_delay = 4 - can_turret = 1 + can_turret = TRUE secondary_projectile_type = /obj/projectile/beam/pistol secondary_fire_sound = 'sound/weapons/laser1.ogg' - can_switch_modes = 1 + can_switch_modes = TRUE turret_sprite_set = "carbine" - turret_is_lethal = 0 + turret_is_lethal = FALSE projectile_type = /obj/projectile/beam/stun origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2) @@ -240,7 +240,7 @@ fire_delay = 5 secondary_projectile_type = /obj/projectile/beam/pistol/scc/weak secondary_fire_sound = 'sound/weapons/energy_repeater.ogg' - can_switch_modes = 1 + can_switch_modes = TRUE projectile_type = /obj/projectile/beam/stun origin_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 3) @@ -309,7 +309,7 @@ max_shots = 25 secondary_projectile_type = /obj/projectile/beam secondary_fire_sound = 'sound/weapons/laser1.ogg' - can_switch_modes = 1 + can_switch_modes = TRUE projectile_type = /obj/projectile/beam/stun origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2) @@ -323,10 +323,10 @@ has_item_ratio = FALSE /obj/item/gun/energy/gun/qukala/mounted - self_recharge = 1 - use_external_power = 1 + self_recharge = TRUE + use_external_power = TRUE recharge_time = 10 - can_turret = 0 + can_turret = FALSE /obj/item/gun/energy/fedpistol name = "nralakk energy pistol" diff --git a/code/modules/projectiles/guns/energy/pulse.dm b/code/modules/projectiles/guns/energy/pulse.dm index 8e4665e1be2..6f12ad5cd19 100644 --- a/code/modules/projectiles/guns/energy/pulse.dm +++ b/code/modules/projectiles/guns/energy/pulse.dm @@ -11,12 +11,12 @@ sel_mode = 2 accuracy = 1 max_shots = 10 - can_turret = 1 + can_turret = TRUE secondary_projectile_type = /obj/projectile/beam/pulse secondary_fire_sound = 'sound/weapons/pulse.ogg' - can_switch_modes = 0 + can_switch_modes = FALSE turret_sprite_set = "pulse" - turret_is_lethal = 1 + turret_is_lethal = TRUE firemodes = list( list(mode_name="stun", projectile_type=/obj/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg'), @@ -27,10 +27,10 @@ /obj/item/gun/energy/pulse/mounted name = "mounted pulse carbine" charge_cost = 400 - self_recharge = 1 - use_external_power = 1 + self_recharge = TRUE + use_external_power = TRUE recharge_time = 10 - can_turret = 0 + can_turret = FALSE /obj/item/gun/energy/pulse/pistol name = "pulse pistol" diff --git a/code/modules/projectiles/guns/energy/rifle.dm b/code/modules/projectiles/guns/energy/rifle.dm index 69fc447fd3d..4a745a25930 100644 --- a/code/modules/projectiles/guns/energy/rifle.dm +++ b/code/modules/projectiles/guns/energy/rifle.dm @@ -13,12 +13,12 @@ fire_delay = 6 burst_delay = 3 accuracy = -1 - can_turret = 1 + can_turret = TRUE secondary_projectile_type = /obj/projectile/beam secondary_fire_sound = 'sound/weapons/laser1.ogg' - can_switch_modes = 1 + can_switch_modes = TRUE turret_sprite_set = "carbine" - turret_is_lethal = 0 + turret_is_lethal = FALSE has_item_ratio = FALSE fire_delay_wielded = 5 @@ -52,9 +52,9 @@ projectile_type = /obj/projectile/beam/midlaser secondary_projectile_type = null secondary_fire_sound = null - can_switch_modes = 0 + can_switch_modes = FALSE turret_sprite_set = "laser" - turret_is_lethal = 1 + turret_is_lethal = TRUE firemodes = list() modifystate = null @@ -106,9 +106,9 @@ accuracy = -2 secondary_projectile_type = null secondary_fire_sound = null - can_switch_modes = 0 + can_switch_modes = FALSE turret_sprite_set = "cannon" - turret_is_lethal = 1 + turret_is_lethal = TRUE modifystate = "lasercannon" @@ -130,9 +130,9 @@ burst_delay = 6 secondary_projectile_type = null secondary_fire_sound = null - can_switch_modes = 0 + can_switch_modes = FALSE turret_sprite_set = "xray" - turret_is_lethal = 1 + turret_is_lethal = TRUE /obj/item/gun/energy/rifle/pulse name = "pulse rifle" @@ -146,9 +146,9 @@ origin_tech = list(TECH_COMBAT = 7, TECH_MATERIAL = 6, TECH_MAGNET = 4) secondary_projectile_type = /obj/projectile/beam/pulse secondary_fire_sound = 'sound/weapons/pulse.ogg' - can_switch_modes = 0 + can_switch_modes = FALSE turret_sprite_set = "pulse" - turret_is_lethal = 1 + turret_is_lethal = TRUE modifystate = null @@ -184,8 +184,8 @@ origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3, TECH_MAGNET = 2, TECH_ILLEGAL = 2) secondary_projectile_type = null secondary_fire_sound = null - can_switch_modes = 0 - can_turret = 0 + can_switch_modes = FALSE + can_turret = FALSE zoomdevicename = "rifle scope" var/atom/movable/screen/overlay = null @@ -217,7 +217,7 @@ slot_flags = SLOT_BACK charge_cost = 300 max_shots = 4 - can_turret = 1 + can_turret = TRUE turret_sprite_set = "ion" firemodes = list() @@ -226,10 +226,10 @@ /obj/item/gun/energy/rifle/ionrifle/mounted name = "mounted ion rifle" - self_recharge = 1 - use_external_power = 1 + self_recharge = TRUE + use_external_power = TRUE recharge_time = 10 - can_turret = 0 + can_turret = FALSE /obj/item/gun/energy/rifle/laser/qukala name = "geop cannon" diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 2e09a17e941..4f138cf1756 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -23,7 +23,7 @@ projectile_type = /obj/projectile/energy/floramut origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3, TECH_POWER = 3) modifystate = "floramut" - self_recharge = 1 + self_recharge = TRUE var/singleton/plantgene/gene = null firemodes = list( @@ -71,10 +71,10 @@ w_class = WEIGHT_CLASS_BULKY max_shots = 10 projectile_type = /obj/projectile/meteor - self_recharge = 1 + self_recharge = TRUE recharge_time = 5 //Time it takes for shots to recharge (in ticks) charge_meter = 0 - can_turret = 1 + can_turret = TRUE turret_sprite_set = "meteor" /obj/item/gun/energy/meteorgun/pen @@ -86,7 +86,7 @@ item_state = "pen" w_class = WEIGHT_CLASS_TINY slot_flags = SLOT_BELT - can_turret = 0 + can_turret = FALSE /obj/item/gun/energy/mindflayer @@ -98,7 +98,7 @@ has_item_ratio = FALSE projectile_type = /obj/projectile/beam/mindflayer fire_sound = 'sound/weapons/laser1.ogg' - can_turret = 1 + can_turret = TRUE turret_sprite_set = "xray" /obj/item/gun/energy/toxgun @@ -112,8 +112,8 @@ w_class = WEIGHT_CLASS_NORMAL origin_tech = list(TECH_COMBAT = 5, TECH_PHORON = 4) projectile_type = /obj/projectile/energy/phoron - can_turret = 1 - turret_is_lethal = 0 + can_turret = TRUE + turret_is_lethal = FALSE turret_sprite_set = "net" /obj/item/gun/energy/mousegun @@ -174,8 +174,8 @@ w_class = WEIGHT_CLASS_NORMAL max_shots = 4 fire_delay = 25 - can_turret = 1 - turret_is_lethal = 0 + can_turret = TRUE + turret_is_lethal = FALSE turret_sprite_set = "net" /obj/item/gun/energy/net/mounted @@ -281,7 +281,7 @@ origin_tech = list(TECH_COMBAT = 6, TECH_PHORON = 4, TECH_POWER = 4) fire_sound = 'sound/weapons/laser1.ogg' slot_flags = SLOT_BACK | SLOT_HOLSTER | SLOT_BELT - self_recharge = 1 + self_recharge = TRUE recharge_time = 7 accuracy = 1 recoil = 1 @@ -291,7 +291,7 @@ burst = 1 burst_delay = 1 fire_delay = 5 - can_turret = 1 + can_turret = TRUE turret_sprite_set = "laser" @@ -321,7 +321,7 @@ armor_penetration = 40 atom_flags = ATOM_FLAG_NO_BLOOD can_embed = 0 - self_recharge = 1 + self_recharge = TRUE recharge_time = 2 needspin = FALSE is_wieldable = TRUE @@ -461,7 +461,7 @@ max_shots = 10 accuracy = 1 fire_delay = 1 - can_turret = 0 + can_turret = FALSE /obj/item/gun/energy/tesla name = "tesla gun" @@ -484,10 +484,10 @@ /obj/item/gun/energy/tesla/mounted name = "mounted tesla carbine" - self_recharge = 1 - use_external_power = 1 + self_recharge = TRUE + use_external_power = TRUE recharge_time = 10 - can_turret = 0 + can_turret = FALSE /obj/item/gun/energy/gravity_gun name = "gravity gun" @@ -632,10 +632,10 @@ projectile_type = /obj/projectile/beam/xray // can't wear a hardsuit, and it's only 15 damage with a lot of AP charge_cost = 100 max_shots = 20 - self_recharge = 1 // bioreactor in the backpack; not entirely defenseless against EMPs + self_recharge = TRUE // bioreactor in the backpack; not entirely defenseless against EMPs fire_delay = 35 burst_delay = 2 - can_turret = 0 + can_turret = FALSE is_wieldable = TRUE diff --git a/code/modules/projectiles/guns/energy/stun.dm b/code/modules/projectiles/guns/energy/stun.dm index 505890194c8..719bb290630 100644 --- a/code/modules/projectiles/guns/energy/stun.dm +++ b/code/modules/projectiles/guns/energy/stun.dm @@ -8,15 +8,15 @@ max_shots = 5 accuracy = 1 // More of a buff to secborgs and mounted taser users. projectile_type = /obj/projectile/energy/electrode - can_turret = 1 + can_turret = TRUE turret_sprite_set = "carbine" - turret_is_lethal = 0 + turret_is_lethal = FALSE /obj/item/gun/energy/taser/mounted name = "mounted taser gun" - self_recharge = 1 - use_external_power = 1 - can_turret = 0 + self_recharge = TRUE + use_external_power = TRUE + can_turret = FALSE /obj/item/gun/energy/stunrevolver name = "stun revolver" @@ -48,9 +48,9 @@ fire_sound = 'sound/weapons/Genhit.ogg' projectile_type = /obj/projectile/energy/bolt max_shots = 5 - self_recharge = 1 + self_recharge = TRUE charge_meter = 0 - can_turret = 1 + can_turret = TRUE turret_sprite_set = "crossbow" charge_failure_message = "'s charging socket was removed to make room for a minaturized reactor." diff --git a/code/modules/projectiles/guns/energy/temperature.dm b/code/modules/projectiles/guns/energy/temperature.dm index 101787e0811..b9600e1f59c 100644 --- a/code/modules/projectiles/guns/energy/temperature.dm +++ b/code/modules/projectiles/guns/energy/temperature.dm @@ -14,7 +14,7 @@ slot_flags = SLOT_BELT|SLOT_BACK projectile_type = /obj/projectile/temp - can_turret = 1 + can_turret = TRUE turret_sprite_set = "temperature" cell_type = /obj/item/cell/crap //WAS High, but brought down to match energy use diff --git a/code/modules/projectiles/guns/projectile/rifle.dm b/code/modules/projectiles/guns/projectile/rifle.dm index b10ec543fe5..b102fe28ffb 100644 --- a/code/modules/projectiles/guns/projectile/rifle.dm +++ b/code/modules/projectiles/guns/projectile/rifle.dm @@ -370,8 +370,8 @@ max_shots = 3 charge_cost = 500 projectile_type = /obj/projectile/bullet/gauss/highex - self_recharge = 1 - use_external_power = 1 + self_recharge = TRUE + use_external_power = TRUE recharge_time = 12 needspin = FALSE diff --git a/html/changelogs/Bat-GunCleanup.yml b/html/changelogs/Bat-GunCleanup.yml new file mode 100644 index 00000000000..52db9e3f3bf --- /dev/null +++ b/html/changelogs/Bat-GunCleanup.yml @@ -0,0 +1,59 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: Batrachophrenoboocosmomachia + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - qol: "Updates various extended information hints for some gun types." + - code_imp: "Updates boolean formatting, dmdocs, miscellaneous cleanup, no mechanics changes."