mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Reworks the lwap to make it better. (#20884)
* Boss you killed a child... AMAZING MISSION COMPL- * small patch fix other stuff later * More fixes to clicking on the dot * lwap scopes better / decativates on movement * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * requested changes * lower speed by marms suggestion * scope keeps creeping * Apply suggestions from code review Co-authored-by: Farie82 <farie82@users.noreply.github.com> * henks changes * define --------- Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
|
||||
/obj/item/weaponcrafting/gunkit/lwap
|
||||
name = "\improper lwap laser sniper parts kit"
|
||||
desc = "A suitcase containing the necessary gun parts to transform an accelerator laser cannon into an even meaner laser sniper. Somehow turns the laser purple!"
|
||||
desc = "A suitcase containing the necessary gun parts to transform an laser gun into an advanced piercing laser sniper. Now with wall hacks!"
|
||||
origin_tech = "combat=6;magnets=6;powerstorage=4"
|
||||
|
||||
/obj/item/weaponcrafting/gunkit/plasma
|
||||
|
||||
@@ -222,13 +222,17 @@
|
||||
name = "LWAP Laser Sniper"
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
result = list(/obj/item/gun/energy/lwap)
|
||||
reqs = list(/obj/item/gun/energy/lasercannon = 1,
|
||||
reqs = list(/obj/item/gun/energy/laser = 1,
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/weaponcrafting/gunkit/lwap = 1)
|
||||
time = 10 SECONDS
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_WEAPON
|
||||
|
||||
/datum/crafting_recipe/lwap/New()
|
||||
..()
|
||||
blacklist += subtypesof(/obj/item/gun/energy/laser)
|
||||
|
||||
/datum/crafting_recipe/silencer
|
||||
name = "u-ION Silencer"
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
|
||||
@@ -111,35 +111,88 @@
|
||||
/obj/item/gun/energy/lasercannon/cyborg/emp_act()
|
||||
return
|
||||
|
||||
#define PROCESS_TIME_PLUS_DECISECOND 2.1 SECONDS //This ensures that you cant move and scope the lwap.
|
||||
|
||||
/obj/item/gun/energy/lwap
|
||||
name = "LWAP laser sniper"
|
||||
desc = "A highly advanced laser sniper that does more damage the farther away the target is, but fires slowly."
|
||||
desc = "A highly advanced laser sniper that does more damage the farther away the target is, but fires slowly. Comes with a super advanced scope, which can highlight threats through walls, and pierce one object, after being deployed for a while."
|
||||
icon_state = "esniper"
|
||||
item_state = null
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 12
|
||||
flags = CONDUCT
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
can_holster = FALSE
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
origin_tech = "combat=6;magnets=6;powerstorage=4"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/sniper)
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/sniper, /obj/item/ammo_casing/energy/laser/sniper/pierce)
|
||||
zoomable = TRUE
|
||||
zoom_amt = 7
|
||||
shaded_charge = TRUE
|
||||
/// Is the scope fully online or not?
|
||||
var/scope_active = FALSE
|
||||
var/stored_dir
|
||||
|
||||
/obj/item/gun/energy/lwap/Initialize(mapload, ...)
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/gun/energy/lwap/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/gun/energy/lwap/zoom(mob/living/user, forced_zoom)
|
||||
. = ..()
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
stored_dir = H.dir
|
||||
if(scope_active && !zoomed)
|
||||
select_fire(H)
|
||||
H.remove_status_effect(STATUS_EFFECT_LWAPSCOPE)
|
||||
scope_active = FALSE
|
||||
return
|
||||
if(zoomed && do_after(user, 3 SECONDS, target = src))
|
||||
if(zoomed && !scope_active) //We check after to be sure.
|
||||
scope_active = TRUE
|
||||
to_chat(user, "<b><span class='robot'>SCOPE_CREEPER_[rand(1, 9999)] Online.</span></b>")
|
||||
select_fire(H)
|
||||
H.apply_status_effect(STATUS_EFFECT_LWAPSCOPE, stored_dir)
|
||||
|
||||
/obj/item/gun/energy/lwap/process()
|
||||
. = ..()
|
||||
if(!isliving(loc))
|
||||
return
|
||||
var/mob/living/M = loc
|
||||
if(world.time - M.last_movement <= PROCESS_TIME_PLUS_DECISECOND && zoomed) //If they have moved in the last process cycle.
|
||||
to_chat(M, "<span class='warning'>[src]'s scope is overloaded by movement and shuts down!</span>")
|
||||
zoom(M, FALSE)
|
||||
|
||||
/obj/item/gun/energy/lwap/attack_self()
|
||||
return //no manual ammo changing.
|
||||
|
||||
#undef PROCESS_TIME_PLUS_DECISECOND
|
||||
/obj/item/ammo_casing/energy/laser/sniper
|
||||
projectile_type = /obj/item/projectile/beam/laser/sniper
|
||||
muzzle_flash_color = LIGHT_COLOR_PINK
|
||||
select_name = "sniper"
|
||||
muzzle_flash_range = MUZZLE_FLASH_RANGE_STRONG
|
||||
muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_STRONG
|
||||
select_name = null
|
||||
fire_sound = 'sound/weapons/marauder.ogg'
|
||||
delay = 5 SECONDS
|
||||
|
||||
/obj/item/ammo_casing/energy/laser/sniper/pierce
|
||||
projectile_type = /obj/item/projectile/beam/laser/sniper/pierce
|
||||
|
||||
/obj/item/projectile/beam/laser/sniper
|
||||
name = "sniper laser"
|
||||
icon_state = "sniperlaser"
|
||||
range = 255
|
||||
damage = 10
|
||||
speed = 0.75
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
|
||||
var/can_knockdown = TRUE
|
||||
|
||||
/obj/item/projectile/beam/laser/sniper/Range()
|
||||
..()
|
||||
@@ -147,9 +200,14 @@
|
||||
|
||||
/obj/item/projectile/beam/laser/sniper/on_hit(atom/target, blocked = 0, hit_zone)
|
||||
..()
|
||||
var/mob/living/carbon/human/M = target
|
||||
if(istype(M) && damage >= 40)
|
||||
M.KnockDown(2 SECONDS * (damage / 10))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(istype(H) && damage >= 40 && can_knockdown)
|
||||
H.KnockDown(2 SECONDS * (damage / 10))
|
||||
can_knockdown = FALSE //Projectiles that pierce can not knockdown, no wall knockdowns.
|
||||
|
||||
/obj/item/projectile/beam/laser/sniper/pierce
|
||||
forcedodge = 1 // Can pierce one mob.
|
||||
speed = 0.5
|
||||
|
||||
/obj/item/gun/energy/xray
|
||||
name = "xray laser gun"
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
icon_state = "blastwave"
|
||||
damage = 0
|
||||
nodamage = FALSE
|
||||
forcedodge = TRUE
|
||||
forcedodge = -1
|
||||
range = 150
|
||||
var/heavyr = 0
|
||||
var/mediumr = 0
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
icon_state = "gauss"
|
||||
name = "penetrator round"
|
||||
damage = 60
|
||||
forcedodge = 1
|
||||
forcedodge = -1
|
||||
dismemberment = 0
|
||||
weaken = 0
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
damage = 15
|
||||
tile_dropoff = 0.75
|
||||
irradiate = 30
|
||||
forcedodge = 1
|
||||
forcedodge = -1
|
||||
range = 15
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
@@ -54,7 +54,8 @@
|
||||
var/drowsy = 0
|
||||
var/stamina = 0
|
||||
var/jitter = 0
|
||||
var/forcedodge = 0 //to pass through everything
|
||||
/// Number of times an object can pass through an object. -1 is infinite
|
||||
var/forcedodge = 0
|
||||
var/dismemberment = 0 //The higher the number, the greater the bonus to dismembering. 0 will not dismember at all.
|
||||
var/impact_effect_type //what type of impact effect to show when hitting something
|
||||
var/ricochets = 0
|
||||
@@ -228,6 +229,8 @@
|
||||
prehit(A)
|
||||
var/permutation = A.bullet_act(src, def_zone) // searches for return value, could be deleted after run so check A isn't null
|
||||
if(permutation == -1 || forcedodge)// the bullet passes through a dense object!
|
||||
if(forcedodge)
|
||||
forcedodge -= 1
|
||||
loc = target_turf
|
||||
if(A)
|
||||
permutated.Add(A)
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
id = "lwap"
|
||||
req_tech = list("combat" = 7, "magnets" = 7, "powerstorage" = 5)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 5000, MAT_GLASS = 5000, MAT_GOLD = 5000, MAT_DIAMOND = 5000)
|
||||
materials = list(MAT_METAL = 15000, MAT_GLASS = 8000, MAT_GOLD = 5000, MAT_DIAMOND = 8000)
|
||||
build_path = /obj/item/weaponcrafting/gunkit/lwap
|
||||
category = list("Weapons")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user