Skip to content
This repository was archived by the owner on Sep 17, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/__DEFINES/maps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ require only minor tweaks.
#define ZTRAITS_SPACE list(ZTRAIT_SPACE_RUINS = TRUE)
#define ZTRAITS_LAVALAND list(ZTRAIT_MINING = TRUE, ZTRAIT_LAVA_RUINS = TRUE, ZTRAIT_BOMBCAP_MULTIPLIER = 2)
#define ZTRAITS_REEBE list(ZTRAIT_REEBE = TRUE, ZTRAIT_BOMBCAP_MULTIPLIER = 0.5)
#define ZTRAITS_SHIPS list(ZTRAIT_STATION = TRUE, ZTRAIT_BOMBCAP_MULTIPLIER = 0.5)
#define ZTRAITS_SHIPS list(ZTRAIT_STATION = TRUE)



Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/skills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,6 @@

/datum/skill/piloting
name = "piloting"

/datum/skill/aiming
name = "aiming"
12 changes: 7 additions & 5 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
var/sawn_desc = null //description change if weapon is sawn-off
var/sawn_off = FALSE
var/burst_size = 1 //how large a burst is
var/fire_delay = 0 //rate of fire for burst firing and semi auto
var/fire_delay = 2 //rate of fire for burst firing and semi auto
var/firing_burst = 0 //Prevent the weapon from firing again while already firing
var/semicd = 0 //cooldown handler
var/weapon_weight = WEAPON_LIGHT
var/spread = 0 //Spread induced by the gun itself.
var/spread = 25 //Spread induced by the gun itself.
var/randomspread = 1 //Set to 0 for shotguns. This is used for weapons that don't fire all their bullets at once.

lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
Expand Down Expand Up @@ -251,8 +251,9 @@
var/sprd = 0
var/randomized_gun_spread = 0
var/rand_spr = rand()
if(spread)
randomized_gun_spread = rand(0,spread)
var/datum/skill/S = user.skills.getskill("aiming")
if(spread && S.value > 0)
randomized_gun_spread = (rand(1,spread) / S.value)
if(user.has_trait(TRAIT_POOR_AIM)) //nice shootin' tex
bonus_spread += 25
var/randomized_bonus_spread = rand(0, bonus_spread)
Expand All @@ -268,6 +269,7 @@
to_chat(user, "<span class='notice'> [src] is lethally chambered! You don't want to risk harming anyone...</span>")
return
sprd = round((rand() - 0.5) * DUALWIELD_PENALTY_EXTRA_MULTIPLIER * (randomized_gun_spread + randomized_bonus_spread))
log_world("[sprd]")
if(!chambered.fire_casing(target, user, params, , suppressed, zone_override, sprd))
shoot_with_empty_chamber(user)
return
Expand All @@ -282,7 +284,7 @@
process_chamber()
update_icon()
semicd = TRUE
addtimer(CALLBACK(src, .proc/reset_semicd), fire_delay)
addtimer(CALLBACK(src, .proc/reset_semicd), fire_delay SECONDS)

if(user)
user.update_inv_hands()
Expand Down