mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 22:54:32 +01:00
Deconflict
This commit is contained in:
@@ -40,14 +40,16 @@
|
||||
if(!istype(targloc) || !istype(curloc) || !BB)
|
||||
return 0
|
||||
BB.ammo_casing = src
|
||||
|
||||
|
||||
if(target && get_dist(user, target) <= 1) //Point blank shot must always hit
|
||||
BB.prehit(target)
|
||||
target.bullet_act(BB, BB.def_zone)
|
||||
QDEL_NULL(BB)
|
||||
return 1
|
||||
|
||||
if(targloc == curloc)
|
||||
if(target) //if the target is right on our location we go straight to bullet_act()
|
||||
BB.prehit(target)
|
||||
target.bullet_act(BB, BB.def_zone)
|
||||
QDEL_NULL(BB)
|
||||
return 1
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
var/obj/item/flashlight/gun_light = null
|
||||
var/can_flashlight = 0
|
||||
|
||||
var/can_bayonet = FALSE //if a bayonet can be added or removed if it already has one.
|
||||
var/obj/item/kitchen/knife/bayonet
|
||||
var/mutable_appearance/knife_overlay
|
||||
var/knife_x_offset = 0
|
||||
var/knife_y_offset = 0
|
||||
|
||||
var/list/upgrades = list()
|
||||
|
||||
var/ammo_x_offset = 0 //used for positioning ammo count overlay on sprite
|
||||
@@ -69,12 +75,27 @@
|
||||
verbs += /obj/item/gun/proc/toggle_gunlight
|
||||
build_zooming()
|
||||
|
||||
/obj/item/gun/Destroy()
|
||||
QDEL_NULL(bayonet)
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/handle_atom_del(atom/A)
|
||||
if(A == bayonet)
|
||||
clear_bayonet()
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/examine(mob/user)
|
||||
..()
|
||||
if(unique_reskin && !current_skin)
|
||||
to_chat(user, "<span class='notice'>Alt-click it to reskin it.</span>")
|
||||
if(unique_rename)
|
||||
to_chat(user, "<span class='notice'>Use a pen on it to rename it.</span>")
|
||||
if(bayonet)
|
||||
to_chat(user, "It has \a [bayonet] [can_bayonet ? "" : "permanently "]affixed to it.")
|
||||
if(can_bayonet) //if it has a bayonet and this is false, the bayonet is permanent.
|
||||
to_chat(user, "<span class='info'>[bayonet] looks like it can be <b>unscrewed</b> from [src].</span>")
|
||||
else if(can_bayonet)
|
||||
to_chat(user, "It has a <b>bayonet</b> lug on it.")
|
||||
|
||||
/obj/item/gun/proc/process_chamber()
|
||||
return 0
|
||||
@@ -163,7 +184,7 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
obj/item/gun/proc/newshot()
|
||||
/obj/item/gun/proc/newshot()
|
||||
return
|
||||
|
||||
/obj/item/gun/proc/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override)
|
||||
@@ -233,11 +254,19 @@ obj/item/gun/proc/newshot()
|
||||
user.update_inv_r_hand()
|
||||
feedback_add_details("gun_fired","[type]")
|
||||
|
||||
/obj/item/gun/attack(mob/M as mob, mob/user)
|
||||
/obj/item/gun/attack(mob/M, mob/user)
|
||||
if(user.a_intent == INTENT_HARM) //Flogging
|
||||
..()
|
||||
else
|
||||
return
|
||||
if(bayonet)
|
||||
M.attackby(bayonet, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/attack_obj(obj/O, mob/user)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(bayonet)
|
||||
O.attackby(bayonet, user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/flashlight/seclite))
|
||||
@@ -257,7 +286,7 @@ obj/item/gun/proc/newshot()
|
||||
if(loc == user)
|
||||
A.Grant(user)
|
||||
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(isscrewdriver(I))
|
||||
if(gun_light && can_flashlight)
|
||||
for(var/obj/item/flashlight/seclite/S in src)
|
||||
to_chat(user, "<span class='notice'>You unscrew the seclite from [src].</span>")
|
||||
@@ -268,11 +297,32 @@ obj/item/gun/proc/newshot()
|
||||
update_icon()
|
||||
for(var/datum/action/item_action/toggle_gunlight/TGL in actions)
|
||||
qdel(TGL)
|
||||
else if(bayonet && can_bayonet) //if it has a bayonet, and the bayonet can be removed
|
||||
bayonet.forceMove(get_turf(user))
|
||||
clear_bayonet()
|
||||
|
||||
if(unique_rename)
|
||||
if(istype(I, /obj/item/pen))
|
||||
rename_gun(user)
|
||||
..()
|
||||
if(istype(I, /obj/item/kitchen/knife))
|
||||
var/obj/item/kitchen/knife/K = I
|
||||
if(!can_bayonet || !K.bayonet || bayonet) //ensure the gun has an attachment point available, and that the knife is compatible with it.
|
||||
return ..()
|
||||
if(!user.drop_item())
|
||||
return
|
||||
K.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You attach [K] to [src]'s bayonet lug.</span>")
|
||||
bayonet = K
|
||||
var/state = "bayonet" //Generic state.
|
||||
if(bayonet.icon_state in icon_states('icons/obj/guns/bayonets.dmi')) //Snowflake state?
|
||||
state = bayonet.icon_state
|
||||
var/icon/bayonet_icons = 'icons/obj/guns/bayonets.dmi'
|
||||
knife_overlay = mutable_appearance(bayonet_icons, state)
|
||||
knife_overlay.pixel_x = knife_x_offset
|
||||
knife_overlay.pixel_y = knife_y_offset
|
||||
overlays += knife_overlay
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/proc/toggle_gunlight()
|
||||
set name = "Toggle Gun Light"
|
||||
@@ -305,6 +355,15 @@ obj/item/gun/proc/newshot()
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/gun/proc/clear_bayonet()
|
||||
if(!bayonet)
|
||||
return
|
||||
bayonet = null
|
||||
if(knife_overlay)
|
||||
overlays -= knife_overlay
|
||||
knife_overlay = null
|
||||
return TRUE
|
||||
|
||||
/obj/item/gun/extinguish_light()
|
||||
if(gun_light.on)
|
||||
toggle_gunlight()
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/sonic)
|
||||
cell_type = /obj/item/stock_parts/cell/super
|
||||
restricted_species = list(/datum/species/vox/armalis)
|
||||
sprite_sheets_inhand = list("Vox Armalis" = 'icons/mob/species/armalis/held.dmi') //Big guns big birds.
|
||||
|
||||
/obj/item/gun/energy/noisecannon/update_icon()
|
||||
return
|
||||
|
||||
@@ -101,6 +101,8 @@
|
||||
beakers += B
|
||||
to_chat(user, "<span class='notice'>You slot [B] into [src].</span>")
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/dartgun/can_shoot()
|
||||
if(!cartridge)
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
if(gun_light.on)
|
||||
iconF = "flight_on"
|
||||
overlays += image(icon = icon, icon_state = iconF, pixel_x = flight_x_offset, pixel_y = flight_y_offset)
|
||||
if(bayonet && can_bayonet)
|
||||
overlays += knife_overlay
|
||||
if(itemState)
|
||||
itemState += "[ratio]"
|
||||
item_state = itemState
|
||||
|
||||
@@ -16,10 +16,15 @@
|
||||
var/holds_charge = FALSE
|
||||
var/unique_frequency = FALSE // modified by KA modkits
|
||||
var/overheat = FALSE
|
||||
can_bayonet = TRUE
|
||||
knife_x_offset = 20
|
||||
knife_y_offset = 12
|
||||
|
||||
var/max_mod_capacity = 100
|
||||
var/list/modkits = list()
|
||||
|
||||
var/recharge_timerid
|
||||
|
||||
var/empty_state = "kineticgun_empty"
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/examine(mob/user)
|
||||
@@ -30,20 +35,20 @@
|
||||
var/obj/item/borg/upgrade/modkit/M = A
|
||||
to_chat(user, "<span class='notice'>There is a [M.name] mod installed, using <b>[M.cost]%</b> capacity.</span>")
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/attackby(obj/item/A, mob/user)
|
||||
if(istype(A, /obj/item/crowbar))
|
||||
/obj/item/gun/energy/kinetic_accelerator/attackby(obj/item/I, mob/user)
|
||||
if(iscrowbar(I))
|
||||
if(modkits.len)
|
||||
to_chat(user, "<span class='notice'>You pry the modifications out.</span>")
|
||||
playsound(loc, A.usesound, 100, 1)
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
for(var/obj/item/borg/upgrade/modkit/M in modkits)
|
||||
M.uninstall(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no modifications currently installed.</span>")
|
||||
else if(istype(A, /obj/item/borg/upgrade/modkit))
|
||||
var/obj/item/borg/upgrade/modkit/MK = A
|
||||
else if(istype(I, /obj/item/borg/upgrade/modkit))
|
||||
var/obj/item/borg/upgrade/modkit/MK = I
|
||||
MK.install(src, user)
|
||||
else
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/get_remaining_mod_capacity()
|
||||
var/current_capacity_used = 0
|
||||
@@ -58,6 +63,7 @@
|
||||
. += A
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
K.kinetic_gun = src //do something special on-hit, easy!
|
||||
for(var/A in get_modkits())
|
||||
var/obj/item/borg/upgrade/modkit/M = A
|
||||
M.modify_projectile(K)
|
||||
@@ -67,6 +73,12 @@
|
||||
unique_frequency = TRUE
|
||||
max_mod_capacity = 80
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/minebot
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
|
||||
overheat_time = 20
|
||||
holds_charge = TRUE
|
||||
unique_frequency = TRUE
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/New()
|
||||
. = ..()
|
||||
if(!holds_charge)
|
||||
@@ -83,7 +95,7 @@
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/dropped()
|
||||
. = ..()
|
||||
if(!holds_charge)
|
||||
if(!QDELING(src) && !holds_charge)
|
||||
// Put it on a delay because moving item from slot to hand
|
||||
// calls dropped().
|
||||
spawn(2)
|
||||
@@ -97,24 +109,25 @@
|
||||
power_supply.use(500)
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/attempt_reload()
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/attempt_reload(recharge_time)
|
||||
if(overheat)
|
||||
return
|
||||
if(!recharge_time)
|
||||
recharge_time = overheat_time
|
||||
overheat = TRUE
|
||||
|
||||
var/carried = 0
|
||||
if(!unique_frequency)
|
||||
for(var/obj/item/gun/energy/kinetic_accelerator/K in \
|
||||
loc.GetAllContents())
|
||||
|
||||
carried++
|
||||
for(var/obj/item/gun/energy/kinetic_accelerator/K in loc.GetAllContents())
|
||||
if(!K.unique_frequency)
|
||||
carried++
|
||||
|
||||
carried = max(carried, 1)
|
||||
else
|
||||
carried = 1
|
||||
|
||||
spawn(overheat_time * carried)
|
||||
reload()
|
||||
deltimer(recharge_timerid)
|
||||
recharge_timerid = addtimer(CALLBACK(src, .proc/reload), recharge_time * carried, TIMER_STOPPABLE)
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/emp_act(severity)
|
||||
return
|
||||
@@ -138,6 +151,8 @@
|
||||
if(gun_light.on)
|
||||
iconF = "flight_on"
|
||||
overlays += image(icon = icon, icon_state = iconF, pixel_x = flight_x_offset, pixel_y = flight_y_offset)
|
||||
if(bayonet && can_bayonet)
|
||||
overlays += knife_overlay
|
||||
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/experimental
|
||||
@@ -161,16 +176,6 @@
|
||||
var/obj/item/gun/energy/kinetic_accelerator/KA = loc
|
||||
KA.modify_projectile(BB)
|
||||
|
||||
var/turf/proj_turf = get_turf(BB)
|
||||
if(!isturf(proj_turf))
|
||||
return
|
||||
var/datum/gas_mixture/environment = proj_turf.return_air()
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure > 50)
|
||||
BB.name = "weakened [BB.name]"
|
||||
var/obj/item/projectile/kinetic/K = BB
|
||||
K.damage *= K.pressure_decrease
|
||||
|
||||
|
||||
//Projectiles
|
||||
/obj/item/projectile/kinetic
|
||||
@@ -181,10 +186,9 @@
|
||||
flag = "bomb"
|
||||
range = 3
|
||||
|
||||
var/pressure_decrease_active = FALSE
|
||||
var/pressure_decrease = 0.25
|
||||
var/turf_aoe = FALSE
|
||||
var/mob_aoe = FALSE
|
||||
var/list/hit_overlays = list()
|
||||
var/obj/item/gun/energy/kinetic_accelerator/kinetic_gun
|
||||
|
||||
/obj/item/projectile/kinetic/pod
|
||||
range = 4
|
||||
@@ -193,9 +197,22 @@
|
||||
damage = 50
|
||||
pressure_decrease = 0.5
|
||||
|
||||
/obj/item/projectile/kinetic/pod/enhanced
|
||||
turf_aoe = TRUE
|
||||
mob_aoe = TRUE
|
||||
/obj/item/projectile/kinetic/Destroy()
|
||||
kinetic_gun = null
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/kinetic/prehit(atom/target)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(kinetic_gun)
|
||||
var/list/mods = kinetic_gun.get_modkits()
|
||||
for(var/obj/item/borg/upgrade/modkit/M in mods)
|
||||
M.projectile_prehit(src, target, kinetic_gun)
|
||||
if(!lavaland_equipment_pressure_check(get_turf(target)))
|
||||
name = "weakened [name]"
|
||||
damage = damage * pressure_decrease
|
||||
pressure_decrease_active = TRUE
|
||||
|
||||
|
||||
/obj/item/projectile/kinetic/on_range()
|
||||
strike_thing()
|
||||
@@ -209,30 +226,22 @@
|
||||
var/turf/target_turf = get_turf(target)
|
||||
if(!target_turf)
|
||||
target_turf = get_turf(src)
|
||||
if(kinetic_gun) //hopefully whoever shot this was not very, very unfortunate.
|
||||
var/list/mods = kinetic_gun.get_modkits()
|
||||
for(var/obj/item/borg/upgrade/modkit/M in mods)
|
||||
M.projectile_strike_predamage(src, target_turf, target, kinetic_gun)
|
||||
for(var/obj/item/borg/upgrade/modkit/M in mods)
|
||||
M.projectile_strike(src, target_turf, target, kinetic_gun)
|
||||
if(ismineralturf(target_turf))
|
||||
var/turf/simulated/mineral/M = target_turf
|
||||
M.gets_drilled(firer)
|
||||
var/obj/effect/temp_visual/kinetic_blast/K = new /obj/effect/temp_visual/kinetic_blast(target_turf)
|
||||
K.color = color
|
||||
for(var/type in hit_overlays)
|
||||
new type(target_turf)
|
||||
if(turf_aoe)
|
||||
for(var/T in RANGE_TURFS(1, target_turf) - target_turf)
|
||||
if(ismineralturf(T))
|
||||
var/turf/simulated/mineral/M = T
|
||||
M.gets_drilled(firer)
|
||||
if(mob_aoe)
|
||||
for(var/mob/living/L in range(1, target_turf) - firer - target)
|
||||
var/armor = L.run_armor_check(def_zone, flag, "", "", armour_penetration)
|
||||
L.apply_damage(damage*mob_aoe, damage_type, def_zone, armor)
|
||||
L.visible_message("<span class='danger'>[L] is hit by \a [src]!</span>",
|
||||
"<span class='userdanger'>You are hit by \a [src]!</span>")
|
||||
add_attack_logs(firer, L, "Shot with a [type]")
|
||||
|
||||
|
||||
//Modkits
|
||||
/obj/item/borg/upgrade/modkit
|
||||
name = "modification kit"
|
||||
name = "kinetic accelerator modification kit"
|
||||
desc = "An upgrade for kinetic accelerators."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "modkit"
|
||||
@@ -244,6 +253,8 @@
|
||||
var/maximum_of_type = 1
|
||||
var/cost = 30
|
||||
var/modifier = 1 //For use in any mod kit that has numerical modifiers
|
||||
var/minebot_upgrade = TRUE
|
||||
var/minebot_exclusive = FALSE
|
||||
|
||||
/obj/item/borg/upgrade/modkit/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
@@ -253,7 +264,7 @@
|
||||
if(istype(A, /obj/item/gun/energy/kinetic_accelerator) && !issilicon(user))
|
||||
install(A, user)
|
||||
else
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/borg/upgrade/modkit/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
@@ -264,6 +275,13 @@
|
||||
|
||||
/obj/item/borg/upgrade/modkit/proc/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
. = TRUE
|
||||
if(minebot_upgrade)
|
||||
if(minebot_exclusive && !istype(KA.loc, /mob/living/simple_animal/hostile/mining_drone))
|
||||
to_chat(user, "<span class='notice'>The modkit you're trying to install is only rated for minebot use.</span>")
|
||||
return FALSE
|
||||
else if(istype(KA.loc, /mob/living/simple_animal/hostile/mining_drone))
|
||||
to_chat(user, "<span class='notice'>The modkit you're trying to install is not rated for minebot use.</span>")
|
||||
return FALSE
|
||||
if(denied_type)
|
||||
var/number_of_denied = 0
|
||||
for(var/A in KA.get_modkits())
|
||||
@@ -292,6 +310,12 @@
|
||||
|
||||
/obj/item/borg/upgrade/modkit/proc/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
|
||||
//use this one for effects you want to trigger before any damage is done at all and before damage is decreased by pressure
|
||||
/obj/item/borg/upgrade/modkit/proc/projectile_prehit(obj/item/projectile/kinetic/K, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
//use this one for effects you want to trigger before mods that do damage
|
||||
/obj/item/borg/upgrade/modkit/proc/projectile_strike_predamage(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
//and this one for things that don't need to trigger before other damage-dealing mods
|
||||
/obj/item/borg/upgrade/modkit/proc/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
|
||||
//Range
|
||||
/obj/item/borg/upgrade/modkit/range
|
||||
@@ -317,8 +341,9 @@
|
||||
//Cooldown
|
||||
/obj/item/borg/upgrade/modkit/cooldown
|
||||
name = "cooldown decrease"
|
||||
desc = "Decreases the cooldown of a kinetic accelerator."
|
||||
modifier = 2.5
|
||||
desc = "Decreases the cooldown of a kinetic accelerator. Not rated for minebot use."
|
||||
modifier = 3.2
|
||||
minebot_upgrade = FALSE
|
||||
|
||||
/obj/item/borg/upgrade/modkit/cooldown/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
. = ..()
|
||||
@@ -329,25 +354,61 @@
|
||||
KA.overheat_time += modifier
|
||||
..()
|
||||
|
||||
/obj/item/borg/upgrade/modkit/cooldown/minebot
|
||||
name = "minebot cooldown decrease"
|
||||
desc = "Decreases the cooldown of a kinetic accelerator. Only rated for minebot use."
|
||||
icon_state = "door_electronics"
|
||||
icon = 'icons/obj/module.dmi'
|
||||
denied_type = /obj/item/borg/upgrade/modkit/cooldown/minebot
|
||||
modifier = 10
|
||||
cost = 0
|
||||
minebot_upgrade = TRUE
|
||||
minebot_exclusive = TRUE
|
||||
|
||||
//AoE blasts
|
||||
/obj/item/borg/upgrade/modkit/aoe
|
||||
modifier = 0
|
||||
var/turf_aoe = FALSE
|
||||
var/stats_stolen = FALSE
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
K.name = "kinetic explosion"
|
||||
if(!K.turf_aoe && !K.mob_aoe)
|
||||
K.hit_overlays += /obj/effect/temp_visual/explosion/fast
|
||||
K.mob_aoe += modifier
|
||||
/obj/item/borg/upgrade/modkit/aoe/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
if(..())
|
||||
return
|
||||
for(var/obj/item/borg/upgrade/modkit/aoe/AOE in KA.modkits) //make sure only one of the aoe modules has values if somebody has multiple
|
||||
if(AOE.stats_stolen || AOE == src)
|
||||
continue
|
||||
modifier += AOE.modifier //take its modifiers
|
||||
AOE.modifier = 0
|
||||
turf_aoe += AOE.turf_aoe
|
||||
AOE.turf_aoe = FALSE
|
||||
AOE.stats_stolen = TRUE
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/uninstall(obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
..()
|
||||
modifier = initial(modifier) //get our modifiers back
|
||||
turf_aoe = initial(turf_aoe)
|
||||
stats_stolen = FALSE
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
if(stats_stolen)
|
||||
return
|
||||
new /obj/effect/temp_visual/explosion/fast(target_turf)
|
||||
if(turf_aoe)
|
||||
for(var/T in RANGE_TURFS(1, target_turf) - target_turf)
|
||||
if(ismineralturf(T))
|
||||
var/turf/simulated/mineral/M = T
|
||||
M.gets_drilled(K.firer)
|
||||
if(modifier)
|
||||
for(var/mob/living/L in range(1, target_turf) - K.firer - target)
|
||||
var/armor = L.run_armor_check(K.def_zone, K.flag, "", "", K.armour_penetration)
|
||||
L.apply_damage(K.damage * modifier, K.damage_type, K.def_zone, armor)
|
||||
to_chat(L, "<span class='userdanger'>You're struck by a [K.name]!</span>")
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/turfs
|
||||
name = "mining explosion"
|
||||
desc = "Causes the kinetic accelerator to destroy rock in an AoE."
|
||||
denied_type = /obj/item/borg/upgrade/modkit/aoe/turfs
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/turfs/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
..()
|
||||
K.turf_aoe = TRUE
|
||||
turf_aoe = TRUE
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/turfs/andmobs
|
||||
name = "offensive mining explosion"
|
||||
@@ -360,15 +421,111 @@
|
||||
desc = "Causes the kinetic accelerator to damage mobs in an AoE."
|
||||
modifier = 0.2
|
||||
|
||||
//Minebot passthrough
|
||||
/obj/item/borg/upgrade/modkit/minebot_passthrough
|
||||
name = "minebot passthrough"
|
||||
desc = "Causes kinetic accelerator shots to pass through minebots."
|
||||
cost = 0
|
||||
|
||||
//Tendril-unique modules
|
||||
/obj/item/borg/upgrade/modkit/cooldown/repeater
|
||||
name = "rapid repeater"
|
||||
desc = "Quarters the kinetic accelerator's cooldown on striking a living target, but greatly increases the base cooldown."
|
||||
denied_type = /obj/item/borg/upgrade/modkit/cooldown/repeater
|
||||
modifier = -14 //Makes the cooldown 3 seconds(with no cooldown mods) if you miss. Don't miss.
|
||||
cost = 50
|
||||
|
||||
/obj/item/borg/upgrade/modkit/cooldown/repeater/projectile_strike_predamage(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
var/valid_repeat = FALSE
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(L.stat != DEAD)
|
||||
valid_repeat = TRUE
|
||||
if(ismineralturf(target_turf))
|
||||
valid_repeat = TRUE
|
||||
if(valid_repeat)
|
||||
KA.overheat = FALSE
|
||||
KA.attempt_reload(KA.overheat_time * 0.25) //If you hit, the cooldown drops to 0.75 seconds.
|
||||
|
||||
/obj/item/borg/upgrade/modkit/lifesteal
|
||||
name = "lifesteal crystal"
|
||||
desc = "Causes kinetic accelerator shots to slightly heal the firer on striking a living target."
|
||||
icon_state = "modkit_crystal"
|
||||
modifier = 2.5 //Not a very effective method of healing.
|
||||
cost = 20
|
||||
var/static/list/damage_heal_order = list(BRUTE, BURN, OXY)
|
||||
|
||||
/obj/item/borg/upgrade/modkit/lifesteal/projectile_prehit(obj/item/projectile/kinetic/K, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
if(isliving(target) && isliving(K.firer))
|
||||
var/mob/living/L = target
|
||||
if(L.stat == DEAD)
|
||||
return
|
||||
L = K.firer
|
||||
L.heal_ordered_damage(modifier, damage_heal_order)
|
||||
|
||||
/obj/item/borg/upgrade/modkit/resonator_blasts
|
||||
name = "resonator blast"
|
||||
desc = "Causes kinetic accelerator shots to leave and detonate resonator blasts."
|
||||
denied_type = /obj/item/borg/upgrade/modkit/resonator_blasts
|
||||
cost = 30
|
||||
modifier = 0.25 //A bonus 15 damage if you burst the field on a target, 60 if you lure them into it.
|
||||
|
||||
/obj/item/borg/upgrade/modkit/resonator_blasts/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
if(target_turf && !ismineralturf(target_turf)) //Don't make fields on mineral turfs.
|
||||
var/obj/effect/temp_visual/resonance/R = locate(/obj/effect/temp_visual/resonance) in target_turf
|
||||
if(R)
|
||||
R.damage_multiplier = modifier
|
||||
R.burst()
|
||||
return
|
||||
new /obj/effect/temp_visual/resonance(target_turf, K.firer, null, 30)
|
||||
|
||||
/obj/item/borg/upgrade/modkit/bounty
|
||||
name = "death syphon"
|
||||
desc = "Killing or assisting in killing a creature permanently increases your damage against that type of creature."
|
||||
denied_type = /obj/item/borg/upgrade/modkit/bounty
|
||||
modifier = 1.25
|
||||
cost = 30
|
||||
var/maximum_bounty = 25
|
||||
var/list/bounties_reaped = list()
|
||||
|
||||
/obj/item/borg/upgrade/modkit/bounty/projectile_prehit(obj/item/projectile/kinetic/K, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
var/list/existing_marks = L.has_status_effect_list(STATUS_EFFECT_SYPHONMARK)
|
||||
for(var/i in existing_marks)
|
||||
var/datum/status_effect/syphon_mark/SM = i
|
||||
if(SM.reward_target == src) //we want to allow multiple people with bounty modkits to use them, but we need to replace our own marks so we don't multi-reward
|
||||
SM.reward_target = null
|
||||
qdel(SM)
|
||||
L.apply_status_effect(STATUS_EFFECT_SYPHONMARK, src)
|
||||
|
||||
/obj/item/borg/upgrade/modkit/bounty/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(bounties_reaped[L.type])
|
||||
var/kill_modifier = 1
|
||||
if(K.pressure_decrease_active)
|
||||
kill_modifier *= K.pressure_decrease
|
||||
var/armor = L.run_armor_check(K.def_zone, K.flag, "", "", K.armour_penetration)
|
||||
L.apply_damage(bounties_reaped[L.type]*kill_modifier, K.damage_type, K.def_zone, armor)
|
||||
|
||||
/obj/item/borg/upgrade/modkit/bounty/proc/get_kill(mob/living/L)
|
||||
var/bonus_mod = 1
|
||||
if(ismegafauna(L)) //megafauna reward
|
||||
bonus_mod = 4
|
||||
if(!bounties_reaped[L.type])
|
||||
bounties_reaped[L.type] = min(modifier * bonus_mod, maximum_bounty)
|
||||
else
|
||||
bounties_reaped[L.type] = min(bounties_reaped[L.type] + (modifier * bonus_mod), maximum_bounty)
|
||||
|
||||
//Indoors
|
||||
/obj/item/borg/upgrade/modkit/indoors
|
||||
name = "decrease pressure penalty"
|
||||
desc = "Increases the damage a kinetic accelerator does in a high pressure environment."
|
||||
desc = "A syndicate modification kit that increases the damage a kinetic accelerator does in high pressure environments."
|
||||
modifier = 2
|
||||
denied_type = /obj/item/borg/upgrade/modkit/indoors
|
||||
maximum_of_type = 2
|
||||
cost = 40
|
||||
cost = 35
|
||||
|
||||
/obj/item/borg/upgrade/modkit/indoors/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
K.pressure_decrease *= modifier
|
||||
@@ -431,7 +588,7 @@
|
||||
|
||||
/obj/item/borg/upgrade/modkit/tracer/adjustable
|
||||
name = "adjustable tracer bolts"
|
||||
desc = "Causes kinetic accelerator bolts to have a adjustably-colored tracer trail and explosion. Use in-hand to change color."
|
||||
desc = "Causes kinetic accelerator bolts to have an adjustable-colored tracer trail and explosion. Use in-hand to change color."
|
||||
|
||||
/obj/item/borg/upgrade/modkit/tracer/adjustable/attack_self(mob/user)
|
||||
bolt_color = input(user,"Choose Color") as color
|
||||
bolt_color = input(user,"","Choose Color",bolt_color) as color|null
|
||||
@@ -175,7 +175,7 @@
|
||||
power_supply.give(500)
|
||||
to_chat(user, "<span class='notice'>You insert [A] in [src], recharging it.</span>")
|
||||
else
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/update_icon()
|
||||
return
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
to_chat(user, "<span class='notice'>[grenades.len] / [max_grenades] grenades.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The grenade launcher cannot hold more grenades.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/grenadelauncher/afterattack(obj/target, mob/user , flag)
|
||||
if(target == user)
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
icon_state = "[current_skin][suppressed ? "-suppressed" : ""][sawn_state ? "-sawn" : ""]"
|
||||
else
|
||||
icon_state = "[initial(icon_state)][suppressed ? "-suppressed" : ""][sawn_state ? "-sawn" : ""]"
|
||||
if(bayonet && can_bayonet)
|
||||
overlays += knife_overlay
|
||||
|
||||
/obj/item/gun/projectile/process_chamber(eject_casing = 1, empty_chamber = 1)
|
||||
var/obj/item/ammo_casing/AC = chambered //Find chambered round
|
||||
@@ -66,7 +68,6 @@
|
||||
return
|
||||
|
||||
/obj/item/gun/projectile/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/ammo_box/magazine))
|
||||
var/obj/item/ammo_box/magazine/AM = A
|
||||
if(istype(AM, mag_type))
|
||||
@@ -108,7 +109,8 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't seem to figure out how to fit [S] on [src].</span>")
|
||||
return
|
||||
return 0
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/projectile/attack_hand(mob/user)
|
||||
if(loc == user)
|
||||
@@ -178,6 +180,9 @@
|
||||
if(sawn_state == SAWN_OFF)
|
||||
to_chat(user, "<span class='warning'>\The [src] is already shortened!</span>")
|
||||
return
|
||||
if(bayonet)
|
||||
to_chat(user, "<span class='warning'>You cannot saw-off [src] with [bayonet] attached!</span>")
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("[user] begins to shorten \the [src].", "<span class='notice'>You begin to shorten \the [src]...</span>")
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
if(select == 1)
|
||||
overlays += "[initial(icon_state)]burst"
|
||||
icon_state = "[initial(icon_state)][magazine ? "-[magazine.max_ammo]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
|
||||
if(bayonet && can_bayonet)
|
||||
overlays += knife_overlay
|
||||
|
||||
/obj/item/gun/projectile/automatic/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
. = ..()
|
||||
@@ -96,6 +98,9 @@
|
||||
fire_sound = 'sound/weapons/gunshots/gunshot_smg.ogg'
|
||||
fire_delay = 2
|
||||
burst_size = 2
|
||||
can_bayonet = TRUE
|
||||
knife_x_offset = 26
|
||||
knife_y_offset = 12
|
||||
|
||||
/obj/item/gun/projectile/automatic/c20r/New()
|
||||
..()
|
||||
@@ -123,6 +128,9 @@
|
||||
can_suppress = 0
|
||||
burst_size = 1
|
||||
actions_types = list()
|
||||
can_bayonet = TRUE
|
||||
knife_x_offset = 25
|
||||
knife_y_offset = 12
|
||||
|
||||
/obj/item/gun/projectile/automatic/wt550/update_icon()
|
||||
..()
|
||||
@@ -172,7 +180,7 @@
|
||||
underbarrel.attack_self()
|
||||
underbarrel.attackby(A, user, params)
|
||||
else
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/projectile/automatic/m90/update_icon()
|
||||
..()
|
||||
|
||||
@@ -115,7 +115,6 @@
|
||||
..()
|
||||
|
||||
/obj/item/gun/projectile/revolver/detective/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/screwdriver))
|
||||
if(magazine.caliber == "38")
|
||||
to_chat(user, "<span class='notice'>You begin to reinforce the barrel of [src]...</span>")
|
||||
@@ -143,6 +142,8 @@
|
||||
magazine.caliber = "38"
|
||||
desc = initial(desc)
|
||||
to_chat(user, "<span class='notice'>You remove the modifications on [src]. Now it will fire .38 rounds.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/projectile/revolver/fingergun //Summoned by the Finger Gun spell, from advanced mimery traitor item
|
||||
name = "\improper finger gun"
|
||||
@@ -347,7 +348,6 @@
|
||||
options["Cancel"] = null
|
||||
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing))
|
||||
chamber_round()
|
||||
if(istype(A, /obj/item/melee/energy))
|
||||
@@ -356,6 +356,8 @@
|
||||
sawoff(user)
|
||||
if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter))
|
||||
sawoff(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/attack_self(mob/living/user)
|
||||
var/num_unloaded = 0
|
||||
@@ -394,7 +396,6 @@
|
||||
var/slung = 0
|
||||
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/improvised/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/stack/cable_coil) && !sawn_state)
|
||||
var/obj/item/stack/cable_coil/C = A
|
||||
if(C.use(10))
|
||||
@@ -406,6 +407,8 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need at least ten lengths of cable if you want to make a sling.</span>")
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/improvised/update_icon()
|
||||
..()
|
||||
@@ -450,9 +453,10 @@
|
||||
return
|
||||
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/improvised/cane/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/stack/cable_coil))
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/improvised/cane/examine(mob/user) // HAD TO REPEAT EXAMINE CODE BECAUSE GUN CODE DOESNT STEALTH
|
||||
var/f_name = "\a [src]."
|
||||
|
||||
@@ -50,14 +50,14 @@
|
||||
to_chat(user, "<span class='notice'>You remove the magazine from [src].</span>")
|
||||
|
||||
|
||||
/obj/item/gun/projectile/automatic/l6_saw/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/automatic/l6_saw/attackby(obj/item/A, mob/user, params)
|
||||
if(istype(A, /obj/item/ammo_box/magazine))
|
||||
var/obj/item/ammo_box/magazine/AM = A
|
||||
if(istype(AM, mag_type))
|
||||
if(!cover_open)
|
||||
to_chat(user, "<span class='warning'>[src]'s cover is closed! You can't insert a new mag.</span>")
|
||||
return
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//ammo//
|
||||
|
||||
|
||||
@@ -86,7 +86,6 @@
|
||||
sawn_state = SAWN_INTACT
|
||||
|
||||
/obj/item/gun/projectile/shotgun/riot/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter))
|
||||
sawoff(user)
|
||||
if(istype(A, /obj/item/melee/energy))
|
||||
@@ -95,6 +94,8 @@
|
||||
sawoff(user)
|
||||
if(istype(A, /obj/item/pipe))
|
||||
unsaw(A, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/projectile/shotgun/riot/sawoff(mob/user)
|
||||
if(sawn_state == SAWN_OFF)
|
||||
@@ -210,6 +211,9 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/boltaction
|
||||
fire_sound = 'sound/weapons/gunshots/gunshot_rifle.ogg'
|
||||
var/bolt_open = 0
|
||||
can_bayonet = TRUE
|
||||
knife_x_offset = 27
|
||||
knife_y_offset = 13
|
||||
|
||||
/obj/item/gun/projectile/shotgun/boltaction/pump(mob/M)
|
||||
playsound(M, 'sound/weapons/gun_interactions/rifle_load.ogg', 60, 1)
|
||||
@@ -242,6 +246,7 @@
|
||||
desc = "Careful not to lose your head."
|
||||
var/guns_left = 30
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/enchanted
|
||||
can_bayonet = FALSE
|
||||
|
||||
/obj/item/gun/projectile/shotgun/boltaction/enchanted/New()
|
||||
..()
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
to_chat(user, "<span class='notice'>[rockets.len] / [max_rockets] rockets.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>[src] cannot hold more rockets.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/rocketlauncher/can_shoot()
|
||||
return rockets.len
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
return 1
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] cannot hold more syringes.</span>")
|
||||
return 0
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/syringe/rapidsyringe
|
||||
name = "rapid syringe gun"
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
var/spread = 0 //amount (in degrees) of projectile spread
|
||||
var/legacy = FALSE //legacy projectile system
|
||||
animate_movement = 0
|
||||
|
||||
|
||||
var/ignore_source_check = FALSE
|
||||
|
||||
|
||||
var/damage = 10
|
||||
var/tile_dropoff = 0 //how much damage should be decremented as the bullet moves
|
||||
var/tile_dropoff_s = 0 //same as above but for stamina
|
||||
@@ -56,6 +56,7 @@
|
||||
var/jitter = 0
|
||||
var/forcedodge = 0 //to pass through everything
|
||||
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
|
||||
var/ricochets_max = 2
|
||||
var/ricochet_chance = 0
|
||||
@@ -80,11 +81,31 @@
|
||||
/obj/item/projectile/proc/on_range() //if we want there to be effects when they reach the end of their range
|
||||
qdel(src)
|
||||
|
||||
/obj/item/projectile/proc/prehit(atom/target)
|
||||
return TRUE
|
||||
|
||||
/obj/item/projectile/proc/on_hit(atom/target, blocked = 0, hit_zone)
|
||||
var/turf/target_loca = get_turf(target)
|
||||
var/hitx
|
||||
var/hity
|
||||
if(target == original)
|
||||
hitx = target.pixel_x + p_x - 16
|
||||
hity = target.pixel_y + p_y - 16
|
||||
else
|
||||
hitx = target.pixel_x + rand(-8, 8)
|
||||
hity = target.pixel_y + rand(-8, 8)
|
||||
if(!nodamage && (damage_type == BRUTE || damage_type == BURN) && iswallturf(target_loca) && prob(75))
|
||||
var/turf/simulated/wall/W = target_loca
|
||||
if(impact_effect_type)
|
||||
new impact_effect_type(target_loca, hitx, hity)
|
||||
|
||||
W.add_dent(WALL_DENT_SHOT, hitx, hity)
|
||||
return 0
|
||||
if(alwayslog)
|
||||
add_attack_logs(firer, target, "Shot with a [type]")
|
||||
if(!isliving(target))
|
||||
if(impact_effect_type)
|
||||
new impact_effect_type(target_loca, hitx, hity)
|
||||
return 0
|
||||
var/mob/living/L = target
|
||||
var/mob/living/carbon/human/H
|
||||
@@ -115,7 +136,8 @@
|
||||
M.bloody_hands(H)
|
||||
/* Uncomment when bloody_body stops randomly not transferring blood colour.
|
||||
M.bloody_body(H) */
|
||||
|
||||
else if(impact_effect_type)
|
||||
new impact_effect_type(target_loca, hitx, hity)
|
||||
var/organ_hit_text = ""
|
||||
if(L.has_limbs)
|
||||
organ_hit_text = " in \the [parse_zone(def_zone)]"
|
||||
@@ -162,7 +184,7 @@
|
||||
/obj/item/projectile/Bump(atom/A, yes)
|
||||
if(!yes) //prevents double bumps.
|
||||
return
|
||||
|
||||
|
||||
if(check_ricochet(A) && check_ricochet_flag(A) && ricochets < ricochets_max)
|
||||
ricochets++
|
||||
if(A.handle_ricochet(src))
|
||||
@@ -190,7 +212,7 @@
|
||||
return
|
||||
|
||||
var/turf/target_turf = get_turf(A)
|
||||
|
||||
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!
|
||||
loc = target_turf
|
||||
@@ -204,6 +226,7 @@
|
||||
mobs_list += L
|
||||
if(mobs_list.len)
|
||||
var/mob/living/picked_mob = pick(mobs_list)
|
||||
prehit(picked_mob)
|
||||
picked_mob.bullet_act(src, def_zone)
|
||||
qdel(src)
|
||||
|
||||
@@ -293,7 +316,7 @@ obj/item/projectile/Crossed(atom/movable/AM, oldloc) //A mob moving on a tile wi
|
||||
/obj/item/projectile/proc/dumbfire(var/dir)
|
||||
current = get_ranged_target_turf(src, dir, world.maxx) //world.maxx is the range. Not sure how to handle this better.
|
||||
fire()
|
||||
|
||||
|
||||
|
||||
/obj/item/projectile/proc/on_ricochet(atom/A)
|
||||
return
|
||||
@@ -307,7 +330,7 @@ obj/item/projectile/Crossed(atom/movable/AM, oldloc) //A mob moving on a tile wi
|
||||
if(A.flags_2 & CHECK_RICOCHET_1)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/item/projectile/proc/setAngle(new_angle) //wrapper for overrides.
|
||||
Angle = new_angle
|
||||
return TRUE
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
hitsound_wall = 'sound/weapons/effects/searwall.ogg'
|
||||
flag = "laser"
|
||||
eyeblur = 2
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
|
||||
is_reflectable = TRUE
|
||||
light_range = 2
|
||||
light_color = LIGHT_COLOR_RED
|
||||
@@ -38,6 +39,7 @@
|
||||
irradiate = 30
|
||||
forcedodge = 1
|
||||
range = 15
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
/obj/item/projectile/beam/disabler
|
||||
@@ -48,12 +50,14 @@
|
||||
flag = "energy"
|
||||
hitsound = 'sound/weapons/tap.ogg'
|
||||
eyeblur = 0
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/item/projectile/beam/pulse
|
||||
name = "pulse"
|
||||
icon_state = "u_laser"
|
||||
damage = 50
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
|
||||
light_color = LIGHT_COLOR_DARKBLUE
|
||||
|
||||
/obj/item/projectile/beam/pulse/on_hit(var/atom/target, var/blocked = 0)
|
||||
@@ -70,6 +74,7 @@
|
||||
damage = 30
|
||||
legacy = 1
|
||||
animate_movement = SLIDE_STEPS
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
/obj/item/projectile/beam/emitter/singularity_pull()
|
||||
@@ -84,6 +89,7 @@
|
||||
flag = "laser"
|
||||
var/suit_types = list(/obj/item/clothing/suit/redtag, /obj/item/clothing/suit/bluetag)
|
||||
log_override = TRUE
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
|
||||
light_color = LIGHT_COLOR_DARKBLUE
|
||||
|
||||
/obj/item/projectile/beam/lasertag/on_hit(atom/target, blocked = 0)
|
||||
@@ -102,6 +108,7 @@
|
||||
/obj/item/projectile/beam/lasertag/redtag
|
||||
icon_state = "laser"
|
||||
suit_types = list(/obj/item/clothing/suit/bluetag)
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/item/projectile/beam/lasertag/bluetag
|
||||
@@ -115,6 +122,7 @@
|
||||
stun = 5
|
||||
weaken = 5
|
||||
stutter = 5
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
|
||||
light_color = LIGHT_COLOR_PINK
|
||||
|
||||
/obj/item/projectile/beam/immolator
|
||||
@@ -142,14 +150,17 @@
|
||||
icon_state = "purple_laser"
|
||||
damage = 200
|
||||
damage_type = BURN
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
|
||||
light_color = LIGHT_COLOR_PURPLE
|
||||
|
||||
/obj/item/projectile/beam/instakill/blue
|
||||
icon_state = "blue_laser"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
|
||||
light_color = LIGHT_COLOR_DARKBLUE
|
||||
|
||||
/obj/item/projectile/beam/instakill/red
|
||||
icon_state = "red_laser"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/item/projectile/beam/instakill/on_hit(atom/target)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
damage_type = BRUTE
|
||||
flag = "bullet"
|
||||
hitsound_wall = "ricochet"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet //beanbag, heavy stamina damage
|
||||
name = "beanbag slug"
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
damage = 20
|
||||
damage_type = CLONE
|
||||
irradiate = 10
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
|
||||
|
||||
/obj/item/projectile/energy/dart
|
||||
name = "dart"
|
||||
@@ -73,6 +74,7 @@
|
||||
/obj/item/projectile/energy/shock_revolver
|
||||
name = "shock bolt"
|
||||
icon_state = "purple_laser"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
|
||||
var/chain
|
||||
|
||||
/obj/item/ammo_casing/energy/shock_revolver/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "How do you even reuse a bullet?"
|
||||
var/ammo_type = /obj/item/ammo_casing/caseless/
|
||||
var/dropped = 0
|
||||
impact_effect_type = null
|
||||
|
||||
/obj/item/projectile/bullet/reusable/on_hit(atom/target, blocked = 0)
|
||||
. = ..()
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
alwayslog = TRUE
|
||||
damage_type = BURN
|
||||
nodamage = 1
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/ion
|
||||
flag = "energy"
|
||||
|
||||
/obj/item/projectile/ion/on_hit(var/atom/target, var/blocked = 0)
|
||||
@@ -129,6 +130,7 @@
|
||||
damage = 0
|
||||
damage_type = TOX
|
||||
nodamage = 1
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
|
||||
flag = "energy"
|
||||
|
||||
/obj/item/projectile/energy/floramut/on_hit(var/atom/target, var/blocked = 0)
|
||||
@@ -244,18 +246,7 @@
|
||||
damage = 5
|
||||
range = 3
|
||||
dismemberment = 20
|
||||
|
||||
/obj/item/projectile/plasma/New()
|
||||
var/turf/proj_turf = get_turf(src)
|
||||
if(!istype(proj_turf, /turf))
|
||||
return
|
||||
var/datum/gas_mixture/environment = proj_turf.return_air()
|
||||
if(environment)
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure < 30)
|
||||
name = "full strength plasma blast"
|
||||
damage *= 3
|
||||
..()
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
|
||||
|
||||
/obj/item/projectile/plasma/on_hit(atom/target)
|
||||
. = ..()
|
||||
@@ -267,7 +258,8 @@
|
||||
forcedodge = 0
|
||||
|
||||
/obj/item/projectile/plasma/adv
|
||||
range = 6
|
||||
damage = 7
|
||||
range = 5
|
||||
|
||||
/obj/item/projectile/plasma/adv/mech
|
||||
damage = 10
|
||||
|
||||
Reference in New Issue
Block a user