Merge pull request #13011 from timothyteakettle/insane-shot-eyepatch

adds a cybernetic eyepatch to the syndicate uplink
This commit is contained in:
silicons
2020-08-11 01:47:32 -07:00
committed by GitHub
17 changed files with 77 additions and 29 deletions

View File

@@ -178,6 +178,7 @@
#define TRAIT_FREERUNNING "freerunning" #define TRAIT_FREERUNNING "freerunning"
#define TRAIT_SKITTISH "skittish" #define TRAIT_SKITTISH "skittish"
#define TRAIT_POOR_AIM "poor_aim" #define TRAIT_POOR_AIM "poor_aim"
#define TRAIT_INSANE_AIM "insane_aim" //they don't miss. they never miss. it was all part of their immaculate plan.
#define TRAIT_PROSOPAGNOSIA "prosopagnosia" #define TRAIT_PROSOPAGNOSIA "prosopagnosia"
#define TRAIT_DRUNK_HEALING "drunk_healing" #define TRAIT_DRUNK_HEALING "drunk_healing"
#define TRAIT_TAGGER "tagger" #define TRAIT_TAGGER "tagger"
@@ -202,7 +203,7 @@
#define TRAIT_NO_ALCOHOL "alcohol_intolerance" #define TRAIT_NO_ALCOHOL "alcohol_intolerance"
#define TRAIT_MUTATION_STASIS "mutation_stasis" //Prevents processed genetics mutations from processing. #define TRAIT_MUTATION_STASIS "mutation_stasis" //Prevents processed genetics mutations from processing.
#define TRAIT_FAST_PUMP "fast_pump" #define TRAIT_FAST_PUMP "fast_pump"
#define TRAIT_NICE_SHOT "nice_shot" //hnnnnnnnggggg..... you're pretty good.... #define TRAIT_NICE_SHOT "nice_shot" //hnnnnnnnggggg..... you're pretty good...
// mobility flag traits // mobility flag traits
// IN THE FUTURE, IT WOULD BE NICE TO DO SOMETHING SIMILAR TO https://github.com/tgstation/tgstation/pull/48923/files (ofcourse not nearly the same because I have my.. thoughts on it) // IN THE FUTURE, IT WOULD BE NICE TO DO SOMETHING SIMILAR TO https://github.com/tgstation/tgstation/pull/48923/files (ofcourse not nearly the same because I have my.. thoughts on it)

View File

@@ -92,6 +92,7 @@ Class Procs:
pressure_resistance = 15 pressure_resistance = 15
max_integrity = 200 max_integrity = 200
layer = BELOW_OBJ_LAYER //keeps shit coming out of the machine from ending up underneath it. layer = BELOW_OBJ_LAYER //keeps shit coming out of the machine from ending up underneath it.
flags_1 = DEFAULT_RICOCHET_1
flags_ricochet = RICOCHET_HARD flags_ricochet = RICOCHET_HARD
ricochet_chance_mod = 0.3 ricochet_chance_mod = 0.3

View File

@@ -11,7 +11,7 @@
max_integrity = 350 max_integrity = 350
armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 70) armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 70)
CanAtmosPass = ATMOS_PASS_DENSITY CanAtmosPass = ATMOS_PASS_DENSITY
flags_1 = PREVENT_CLICK_UNDER_1 flags_1 = PREVENT_CLICK_UNDER_1|DEFAULT_RICOCHET_1
ricochet_chance_mod = 0.8 ricochet_chance_mod = 0.8
interaction_flags_atom = INTERACT_ATOM_UI_INTERACT interaction_flags_atom = INTERACT_ATOM_UI_INTERACT

View File

@@ -298,7 +298,7 @@
/obj/machinery/door/firedoor/border_only /obj/machinery/door/firedoor/border_only
icon = 'icons/obj/doors/edge_Doorfire.dmi' icon = 'icons/obj/doors/edge_Doorfire.dmi'
flags_1 = ON_BORDER_1 flags_1 = ON_BORDER_1|DEFAULT_RICOCHET_1
CanAtmosPass = ATMOS_PASS_PROC CanAtmosPass = ATMOS_PASS_PROC
/obj/machinery/door/firedoor/border_only/closed /obj/machinery/door/firedoor/border_only/closed
@@ -320,7 +320,7 @@
to_chat(M, "<span class='notice'>You pull [M.pulling] through [src] right as it closes</span>") to_chat(M, "<span class='notice'>You pull [M.pulling] through [src] right as it closes</span>")
M.pulling.forceMove(T1) M.pulling.forceMove(T1)
M.start_pulling(M2) M.start_pulling(M2)
for(var/mob/living/M in T2) for(var/mob/living/M in T2)
if(M.stat == CONSCIOUS && M.pulling && M.pulling.loc == T1 && !M.pulling.anchored && M.pulling.move_resist <= M.move_force) if(M.stat == CONSCIOUS && M.pulling && M.pulling.loc == T1 && !M.pulling.anchored && M.pulling.move_resist <= M.move_force)
var/mob/living/M2 = M.pulling var/mob/living/M2 = M.pulling

View File

@@ -11,7 +11,7 @@
integrity_failure = 0 integrity_failure = 0
armor = list("melee" = 20, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 70, "acid" = 100) armor = list("melee" = 20, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 70, "acid" = 100)
visible = FALSE visible = FALSE
flags_1 = ON_BORDER_1 flags_1 = ON_BORDER_1|DEFAULT_RICOCHET_1
opacity = 0 opacity = 0
CanAtmosPass = ATMOS_PASS_PROC CanAtmosPass = ATMOS_PASS_PROC
interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_REQUIRES_SILICON | INTERACT_MACHINE_OPEN interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_REQUIRES_SILICON | INTERACT_MACHINE_OPEN

View File

@@ -9,8 +9,10 @@
var/mob/living/structureclimber var/mob/living/structureclimber
var/broken = 0 //similar to machinery's stat BROKEN var/broken = 0 //similar to machinery's stat BROKEN
layer = BELOW_OBJ_LAYER layer = BELOW_OBJ_LAYER
flags_ricochet = RICOCHET_HARD //ricochets on structures commented out for now because there's a lot of structures that /shouldnt/ be ricocheting and those need to be reviewed first
ricochet_chance_mod = 0.5 //flags_1 = DEFAULT_RICOCHET_1
//flags_ricochet = RICOCHET_HARD
//ricochet_chance_mod = 0.5
/obj/structure/Initialize() /obj/structure/Initialize()
if (!armor) if (!armor)

View File

@@ -17,7 +17,6 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
layer = ABOVE_OBJ_LAYER //Just above doors layer = ABOVE_OBJ_LAYER //Just above doors
pressure_resistance = 4*ONE_ATMOSPHERE pressure_resistance = 4*ONE_ATMOSPHERE
anchored = TRUE //initially is 0 for tile smoothing anchored = TRUE //initially is 0 for tile smoothing
flags_1 = ON_BORDER_1
max_integrity = 25 max_integrity = 25
var/ini_dir = null var/ini_dir = null
var/state = WINDOW_OUT_OF_FRAME var/state = WINDOW_OUT_OF_FRAME
@@ -38,7 +37,8 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
var/hitsound = 'sound/effects/Glasshit.ogg' var/hitsound = 'sound/effects/Glasshit.ogg'
rad_insulation = RAD_VERY_LIGHT_INSULATION rad_insulation = RAD_VERY_LIGHT_INSULATION
rad_flags = RAD_PROTECT_CONTENTS rad_flags = RAD_PROTECT_CONTENTS
flags_ricochet = RICOCHET_HARD flags_1 = ON_BORDER_1|DEFAULT_RICOCHET_1
flags_ricochet = RICOCHET_HARD
ricochet_chance_mod = 0.4 ricochet_chance_mod = 0.4
attack_hand_speed = CLICK_CD_MELEE attack_hand_speed = CLICK_CD_MELEE
attack_hand_is_action = TRUE attack_hand_is_action = TRUE

View File

@@ -192,6 +192,7 @@
icon_state = "map-shuttle" icon_state = "map-shuttle"
explosion_block = 3 explosion_block = 3
flags_1 = CAN_BE_DIRTY_1 | DEFAULT_RICOCHET_1 flags_1 = CAN_BE_DIRTY_1 | DEFAULT_RICOCHET_1
flags_ricochet = RICOCHET_SHINY | RICOCHET_HARD
sheet_type = /obj/item/stack/sheet/mineral/titanium sheet_type = /obj/item/stack/sheet/mineral/titanium
smooth = SMOOTH_MORE|SMOOTH_DIAGONAL smooth = SMOOTH_MORE|SMOOTH_DIAGONAL
canSmoothWith = list(/turf/closed/wall/mineral/titanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/shuttle, /obj/structure/shuttle/engine/heater, /obj/structure/falsewall/titanium) canSmoothWith = list(/turf/closed/wall/mineral/titanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/shuttle, /obj/structure/shuttle/engine/heater, /obj/structure/falsewall/titanium)

View File

@@ -6,7 +6,8 @@
icon = 'icons/turf/walls/wall.dmi' icon = 'icons/turf/walls/wall.dmi'
icon_state = "wall" icon_state = "wall"
explosion_block = 1 explosion_block = 1
flags_1 = DEFAULT_RICOCHET_1
flags_ricochet = RICOCHET_HARD
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall
attack_hand_speed = 8 attack_hand_speed = 8

View File

@@ -45,11 +45,8 @@
desc = "A solid wall of slightly twitching tendrils with a reflective glow." desc = "A solid wall of slightly twitching tendrils with a reflective glow."
damaged_desc = "A wall of twitching tendrils with a reflective glow." damaged_desc = "A wall of twitching tendrils with a reflective glow."
icon_state = "blob_glow" icon_state = "blob_glow"
flags_ricochet = RICOCHET_SHINY
point_return = 8 point_return = 8
max_integrity = 100 max_integrity = 100
brute_resist = 1 brute_resist = 1
explosion_block = 2 explosion_block = 2
/obj/structure/blob/shield/reflective/check_projectile_ricochet(obj/item/projectile/P)
return PROJECTILE_RICOCHET_FORCE

View File

@@ -149,6 +149,30 @@
icon_state = "eyepatch" icon_state = "eyepatch"
item_state = "eyepatch" item_state = "eyepatch"
/obj/item/clothing/glasses/eyepatch/syndicate
name = "cybernetic eyepatch"
desc = "An eyepatch used to enhance one's aim with guns."
icon_state = "syndicatepatch"
item_state = "syndicatepatch"
resistance_flags = ACID_PROOF
/obj/item/clothing/glasses/eyepatch/syndicate/equipped(mob/living/carbon/human/user, slot)
. = ..()
if(slot == SLOT_GLASSES)
user.visible_message("<span class='warning'>Circuitry from the eyepatch links itself to your brain as you put on the eyepatch.")
if(HAS_TRAIT(user, TRAIT_POOR_AIM))
user.visible_message("<span class='warning'>You hear a fizzing noise from the circuit. That can't be good.")
ADD_TRAIT(user, TRAIT_INSANE_AIM, "SYNDICATE_EYEPATCH_AIM")
ADD_TRAIT(src, TRAIT_NODROP, "SYNDICATE_EYEPATCH_NODROP")
/obj/item/clothing/glasses/eyepatch/syndicate/dropped(mob/living/carbon/human/user)
. = ..()
REMOVE_TRAIT(user, TRAIT_INSANE_AIM, "SYNDICATE_EYEPATCH_AIM")
var/obj/item/organ/eyes/eyes = user.getorganslot(ORGAN_SLOT_EYES)
if(eyes)
eyes.applyOrganDamage(30)
user.visible_message("<span class='warning'>Your eye stings as the circuitry is removed from your eye!")
/obj/item/clothing/glasses/monocle /obj/item/clothing/glasses/monocle
name = "monocle" name = "monocle"
desc = "Such a dapper eyepiece!" desc = "Such a dapper eyepiece!"

View File

@@ -36,6 +36,14 @@
if(isgun(fired_from)) if(isgun(fired_from))
var/obj/item/gun/G = fired_from var/obj/item/gun/G = fired_from
BB.damage *= G.projectile_damage_multiplier BB.damage *= G.projectile_damage_multiplier
if(HAS_TRAIT(user, TRAIT_INSANE_AIM))
BB.ricochets_max = max(BB.ricochets_max, 10) //bouncy!
BB.ricochet_chance = max(BB.ricochet_chance, 100) //it wont decay so we can leave it at 100 for always bouncing
BB.ricochet_auto_aim_range = max(BB.ricochet_auto_aim_range, 3)
BB.ricochet_auto_aim_angle = max(BB.ricochet_auto_aim_angle, 360) //it can turn full circle and shoot you in the face because our aim? is insane.
BB.ricochet_decay_chance = 0
BB.ricochet_decay_damage = max(BB.ricochet_decay_damage, 0.1)
BB.ricochet_incidence_leeway = 0
if(reagents && BB.reagents) if(reagents && BB.reagents)
reagents.trans_to(BB, reagents.total_volume) //For chemical darts/bullets reagents.trans_to(BB, reagents.total_volume) //For chemical darts/bullets

View File

@@ -29,7 +29,7 @@
trigger_guard = TRIGGER_GUARD_NORMAL //trigger guard on the weapon, hulks can't fire them with their big meaty fingers trigger_guard = TRIGGER_GUARD_NORMAL //trigger guard on the weapon, hulks can't fire them with their big meaty fingers
var/sawn_desc = null //description change if weapon is sawn-off var/sawn_desc = null //description change if weapon is sawn-off
var/sawn_off = FALSE var/sawn_off = FALSE
/// can we be put into a turret /// can we be put into a turret
var/can_turret = TRUE var/can_turret = TRUE
/// can we be put in a circuit /// can we be put in a circuit
@@ -310,8 +310,6 @@
randomized_gun_spread = rand(0, spread) randomized_gun_spread = rand(0, spread)
else if(burst_size > 1 && burst_spread) else if(burst_size > 1 && burst_spread)
randomized_gun_spread = rand(0, burst_spread) randomized_gun_spread = rand(0, burst_spread)
if(HAS_TRAIT(user, TRAIT_POOR_AIM)) //nice shootin' tex
bonus_spread += 25
var/randomized_bonus_spread = rand(0, bonus_spread) var/randomized_bonus_spread = rand(0, bonus_spread)
if(burst_size > 1) if(burst_size > 1)
@@ -603,10 +601,16 @@
var/penalty = (last_fire + GUN_AIMING_TIME + fire_delay) - world.time var/penalty = (last_fire + GUN_AIMING_TIME + fire_delay) - world.time
if(penalty > 0) //Yet we only penalize users firing it multiple times in a haste. fire_delay isn't necessarily cumbersomeness. if(penalty > 0) //Yet we only penalize users firing it multiple times in a haste. fire_delay isn't necessarily cumbersomeness.
aiming_delay = penalty aiming_delay = penalty
if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE)) //To be removed in favor of something less tactless later. if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE) || HAS_TRAIT(user, TRAIT_INSANE_AIM)) //To be removed in favor of something less tactless later.
base_inaccuracy /= 1.5 base_inaccuracy /= 1.5
if(stamloss > STAMINA_NEAR_SOFTCRIT) //This can null out the above bonus. if(stamloss > STAMINA_NEAR_SOFTCRIT) //This can null out the above bonus.
base_inaccuracy *= 1 + (stamloss - STAMINA_NEAR_SOFTCRIT)/(STAMINA_NEAR_CRIT - STAMINA_NEAR_SOFTCRIT)*0.5 base_inaccuracy *= 1 + (stamloss - STAMINA_NEAR_SOFTCRIT)/(STAMINA_NEAR_CRIT - STAMINA_NEAR_SOFTCRIT)*0.5
if(HAS_TRAIT(user, TRAIT_POOR_AIM)) //nice shootin' tex
if(!HAS_TRAIT(user, TRAIT_INSANE_AIM))
bonus_spread += 25
else
//you have both poor aim and insane aim, why?
bonus_spread += rand(0,50)
var/mult = max((GUN_AIMING_TIME + aiming_delay + user.last_click_move - world.time)/GUN_AIMING_TIME, -0.5) //Yes, there is a bonus for taking time aiming. var/mult = max((GUN_AIMING_TIME + aiming_delay + user.last_click_move - world.time)/GUN_AIMING_TIME, -0.5) //Yes, there is a bonus for taking time aiming.
if(mult < 0) //accurate weapons should provide a proper bonus with negative inaccuracy. the opposite is true too. if(mult < 0) //accurate weapons should provide a proper bonus with negative inaccuracy. the opposite is true too.
mult *= 1/inaccuracy_modifier mult *= 1/inaccuracy_modifier

View File

@@ -327,16 +327,18 @@
if(!trajectory) if(!trajectory)
return return
var/turf/T = get_turf(A) var/turf/T = get_turf(A)
if(check_ricochet(A) && A.handle_ricochet(src)) //if you can ricochet, attempt to ricochet off the object if(check_ricochet_flag(A) && check_ricochet(A)) //if you can ricochet, attempt to ricochet off the object
on_ricochet(A) //if allowed, use autoaim to ricochet into someone, otherwise default to ricocheting off the object from above ricochets++
var/datum/point/pcache = trajectory.copy_to() if(A.handle_ricochet(src))
if(hitscan) on_ricochet(A) //if allowed, use autoaim to ricochet into someone, otherwise default to ricocheting off the object from above
store_hitscan_collision(pcache) var/datum/point/pcache = trajectory.copy_to()
decayedRange = max(0, decayedRange - reflect_range_decrease) if(hitscan)
ricochet_chance *= ricochet_decay_chance store_hitscan_collision(pcache)
damage *= ricochet_decay_damage decayedRange = max(0, decayedRange - reflect_range_decrease)
range = decayedRange ricochet_chance *= ricochet_decay_chance
return TRUE damage *= ricochet_decay_damage
range = decayedRange
return TRUE
var/distance = get_dist(T, starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations. var/distance = get_dist(T, starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations.
if(def_zone && check_zone(def_zone) != BODY_ZONE_CHEST) if(def_zone && check_zone(def_zone) != BODY_ZONE_CHEST)
@@ -680,7 +682,8 @@
if(!ignore_source_check && firer) if(!ignore_source_check && firer)
var/mob/M = firer var/mob/M = firer
if((target == firer) || ((target == firer.loc) && ismecha(firer.loc)) || (target in firer.buckled_mobs) || (istype(M) && (M.buckled == target))) if((target == firer) || ((target == firer.loc) && ismecha(firer.loc)) || (target in firer.buckled_mobs) || (istype(M) && (M.buckled == target)))
return FALSE if(!ricochets) //if it has ricocheted, it can hit the firer.
return FALSE
if(!ignore_loc && (loc != target.loc)) if(!ignore_loc && (loc != target.loc))
return FALSE return FALSE
if(target in passthrough) if(target in passthrough)

View File

@@ -97,3 +97,9 @@
item = /obj/item/clothing/gloves/tackler/combat/insulated item = /obj/item/clothing/gloves/tackler/combat/insulated
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops) include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops)
cost = 2 cost = 2
/datum/uplink_item/device_tools/syndicate_eyepatch
name = "Mechanical Eyepatch"
desc = "An eyepatch that connects itself to your eye socket, enhancing your shooting to an impossible degree, allowing your bullets to ricochet far more often than usual."
item = /obj/item/clothing/glasses/eyepatch/syndicate
cost = 8

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 15 KiB