mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-09 16:09:15 +00:00
Kills obj/item/projectile in favour of obj/projectile (#46692)
* Kills obj/item/projectile in favour of obj/projectile * Resolves conflicts properly * fixes that one map * it lives
This commit is contained in:
@@ -14,9 +14,9 @@
|
||||
"e" = (
|
||||
/obj/machinery/porta_turret/syndicate{
|
||||
desc = "A ballistic machine gun auto-turret that fires bluespace bullets.";
|
||||
lethal_projectile = /obj/item/projectile/magic/teleport;
|
||||
lethal_projectile = /obj/projectile/magic/teleport;
|
||||
name = "displacement turret";
|
||||
stun_projectile = /obj/item/projectile/magic/teleport
|
||||
stun_projectile = /obj/projectile/magic/teleport
|
||||
},
|
||||
/turf/open/floor/plasteel/grimy{
|
||||
icon_state = "engine"
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
#define COMSIG_ATOM_EX_ACT "atom_ex_act" //from base of atom/ex_act(): (severity, target)
|
||||
#define COMSIG_ATOM_EMP_ACT "atom_emp_act" //from base of atom/emp_act(): (severity)
|
||||
#define COMSIG_ATOM_FIRE_ACT "atom_fire_act" //from base of atom/fire_act(): (exposed_temperature, exposed_volume)
|
||||
#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act" //from base of atom/bullet_act(): (/obj/item/projectile, def_zone)
|
||||
#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act" //from base of atom/bullet_act(): (/obj/projectile, def_zone)
|
||||
#define COMSIG_ATOM_BLOB_ACT "atom_blob_act" //from base of atom/blob_act(): (/obj/structure/blob)
|
||||
#define COMSIG_ATOM_ACID_ACT "atom_acid_act" //from base of atom/acid_act(): (acidpwr, acid_volume)
|
||||
#define COMSIG_ATOM_EMAG_ACT "atom_emag_act" //from base of atom/emag_act(): (/mob/user)
|
||||
@@ -286,9 +286,9 @@
|
||||
// /obj/item/pen signals
|
||||
#define COMSIG_PEN_ROTATED "pen_rotated" //called after rotation in /obj/item/pen/attack_self(): (rotation, mob/living/carbon/user)
|
||||
|
||||
// /obj/item/projectile signals (sent to the firer)
|
||||
#define COMSIG_PROJECTILE_ON_HIT "projectile_on_hit" // from base of /obj/item/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle)
|
||||
#define COMSIG_PROJECTILE_BEFORE_FIRE "projectile_before_fire" // from base of /obj/item/projectile/proc/fire(): (obj/item/projectile, atom/original_target)
|
||||
// /obj/projectile signals (sent to the firer)
|
||||
#define COMSIG_PROJECTILE_ON_HIT "projectile_on_hit" // from base of /obj/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle)
|
||||
#define COMSIG_PROJECTILE_BEFORE_FIRE "projectile_before_fire" // from base of /obj/projectile/proc/fire(): (obj/projectile, atom/original_target)
|
||||
#define COMSIG_PROJECTILE_PREHIT "com_proj_prehit" // sent to targets during the process_hit proc of projectiles
|
||||
|
||||
// /obj/mecha signals
|
||||
|
||||
@@ -231,7 +231,7 @@ GLOBAL_LIST_INIT(pointed_types, typecacheof(list(
|
||||
|
||||
#define isbodypart(A) (istype(A, /obj/item/bodypart))
|
||||
|
||||
#define isprojectile(A) (istype(A, /obj/item/projectile))
|
||||
#define isprojectile(A) (istype(A, /obj/projectile))
|
||||
|
||||
#define isgun(A) (istype(A, /obj/item/gun))
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/obj/effect,
|
||||
/obj/docking_port,
|
||||
/atom/movable/lighting_object,
|
||||
/obj/item/projectile,
|
||||
/obj/projectile,
|
||||
))
|
||||
var/list/processing_list = list(location)
|
||||
. = list()
|
||||
|
||||
@@ -10,7 +10,7 @@ PROCESSING_SUBSYSTEM_DEF(projectiles)
|
||||
/datum/controller/subsystem/processing/projectiles/proc/set_pixel_speed(new_speed)
|
||||
global_pixel_speed = new_speed
|
||||
for(var/i in processing)
|
||||
var/obj/item/projectile/P = i
|
||||
var/obj/projectile/P = i
|
||||
if(istype(P)) //there's non projectiles on this too.
|
||||
P.set_pixel_speed(new_speed)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/obj/docking_port,
|
||||
/obj/structure/lattice,
|
||||
/obj/structure/stone_tile,
|
||||
/obj/item/projectile,
|
||||
/obj/projectile,
|
||||
/obj/effect/projectile,
|
||||
/obj/effect/portal,
|
||||
/obj/effect/abstract,
|
||||
|
||||
@@ -124,23 +124,23 @@
|
||||
/datum/fantasy_affix/shrapnel/apply(datum/component/fantasy/comp, newName)
|
||||
. = ..()
|
||||
// higher means more likely
|
||||
var/list/weighted_projectile_types = list(/obj/item/projectile/meteor = 1,
|
||||
/obj/item/projectile/energy/nuclear_particle = 1,
|
||||
/obj/item/projectile/beam/pulse = 1,
|
||||
/obj/item/projectile/bullet/honker = 15,
|
||||
/obj/item/projectile/temp = 15,
|
||||
/obj/item/projectile/ion = 15,
|
||||
/obj/item/projectile/magic/door = 15,
|
||||
/obj/item/projectile/magic/locker = 15,
|
||||
/obj/item/projectile/magic/fetch = 15,
|
||||
/obj/item/projectile/beam/emitter = 15,
|
||||
/obj/item/projectile/magic/flying = 15,
|
||||
/obj/item/projectile/energy/net = 15,
|
||||
/obj/item/projectile/bullet/incendiary/c9mm = 15,
|
||||
/obj/item/projectile/temp/hot = 15,
|
||||
/obj/item/projectile/beam/disabler = 15)
|
||||
var/list/weighted_projectile_types = list(/obj/projectile/meteor = 1,
|
||||
/obj/projectile/energy/nuclear_particle = 1,
|
||||
/obj/projectile/beam/pulse = 1,
|
||||
/obj/projectile/bullet/honker = 15,
|
||||
/obj/projectile/temp = 15,
|
||||
/obj/projectile/ion = 15,
|
||||
/obj/projectile/magic/door = 15,
|
||||
/obj/projectile/magic/locker = 15,
|
||||
/obj/projectile/magic/fetch = 15,
|
||||
/obj/projectile/beam/emitter = 15,
|
||||
/obj/projectile/magic/flying = 15,
|
||||
/obj/projectile/energy/net = 15,
|
||||
/obj/projectile/bullet/incendiary/c9mm = 15,
|
||||
/obj/projectile/temp/hot = 15,
|
||||
/obj/projectile/beam/disabler = 15)
|
||||
|
||||
var/obj/item/projectile/picked_projectiletype = pickweight(weighted_projectile_types)
|
||||
var/obj/projectile/picked_projectiletype = pickweight(weighted_projectile_types)
|
||||
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/shrapnel, picked_projectiletype)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
return
|
||||
var/turf/target_turf = get_turf(target)
|
||||
for(var/turf/shootat_turf in RANGE_TURFS(radius, target) - RANGE_TURFS(radius-1, target))
|
||||
var/obj/item/projectile/P = new projectile_type(target_turf)
|
||||
var/obj/projectile/P = new projectile_type(target_turf)
|
||||
|
||||
//Shooting Code:
|
||||
P.range = radius+1
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
var/obj/item/I = AM
|
||||
if(I.item_flags & ABSTRACT)
|
||||
return
|
||||
else if(istype(AM, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = AM
|
||||
else if(istype(AM, /obj/projectile))
|
||||
var/obj/projectile/P = AM
|
||||
if(P.original != parent)
|
||||
return
|
||||
if(istype(AM, /obj/effect/dummy/phased_mob)) //don't squeek if they're in a phased/jaunting container.
|
||||
|
||||
@@ -72,5 +72,5 @@
|
||||
return
|
||||
|
||||
///Gets called when a projectile hits the owner. Returning anything other than BULLET_ACT_HIT will stop the projectile from hitting the mob.
|
||||
/datum/martial_art/proc/on_projectile_hit(mob/living/carbon/human/A, obj/item/projectile/P, def_zone)
|
||||
/datum/martial_art/proc/on_projectile_hit(mob/living/carbon/human/A, obj/projectile/P, def_zone)
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/on_projectile_hit(mob/living/carbon/human/A, obj/item/projectile/P, def_zone)
|
||||
/datum/martial_art/the_sleeping_carp/on_projectile_hit(mob/living/carbon/human/A, obj/projectile/P, def_zone)
|
||||
. = ..()
|
||||
if(A.incapacitated(FALSE, TRUE)) //NO STUN
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
charge_max = 600
|
||||
clothes_req = FALSE
|
||||
range = 20
|
||||
projectile_type = /obj/item/projectile/magic/aoe/fireball/firebreath
|
||||
projectile_type = /obj/projectile/magic/aoe/fireball/firebreath
|
||||
base_icon_state = "fireball"
|
||||
action_icon_state = "fireball0"
|
||||
sound = 'sound/magic/demon_dies.ogg' //horrifying lizard noises
|
||||
@@ -138,10 +138,10 @@
|
||||
to_chat(C,"<span class='warning'>Something in front of your mouth caught fire!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/effect/proc_holder/spell/aimed/firebreath/ready_projectile(obj/item/projectile/P, atom/target, mob/user, iteration)
|
||||
if(!istype(P, /obj/item/projectile/magic/aoe/fireball))
|
||||
/obj/effect/proc_holder/spell/aimed/firebreath/ready_projectile(obj/projectile/P, atom/target, mob/user, iteration)
|
||||
if(!istype(P, /obj/projectile/magic/aoe/fireball))
|
||||
return
|
||||
var/obj/item/projectile/magic/aoe/fireball/F = P
|
||||
var/obj/projectile/magic/aoe/fireball/F = P
|
||||
switch(strength)
|
||||
if(1 to 3)
|
||||
F.exp_light = strength-1
|
||||
@@ -149,7 +149,7 @@
|
||||
F.exp_heavy = strength-3
|
||||
F.exp_fire += strength
|
||||
|
||||
/obj/item/projectile/magic/aoe/fireball/firebreath
|
||||
/obj/projectile/magic/aoe/fireball/firebreath
|
||||
name = "fire breath"
|
||||
exp_heavy = 0
|
||||
exp_light = 0
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
cooldown_min = 150
|
||||
clothes_req = FALSE
|
||||
range = 3
|
||||
projectile_type = /obj/item/projectile/temp/cryo
|
||||
projectile_type = /obj/projectile/temp/cryo
|
||||
base_icon_state = "icebeam"
|
||||
action_icon_state = "icebeam"
|
||||
active_msg = "You focus your cryokinesis!"
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
return
|
||||
to_chat(source, "<span class='warning'>You shoot with your laser eyes!</span>")
|
||||
source.changeNext_move(CLICK_CD_RANGE)
|
||||
var/obj/item/projectile/beam/laser_eyes/LE = new(source.loc)
|
||||
var/obj/projectile/beam/laser_eyes/LE = new(source.loc)
|
||||
LE.firer = source
|
||||
LE.def_zone = ran_zone(source.zone_selected)
|
||||
LE.preparePixelProjectile(target, source, mouseparams)
|
||||
@@ -111,7 +111,7 @@
|
||||
playsound(source, 'sound/weapons/taser2.ogg', 75, TRUE)
|
||||
|
||||
///Projectile type used by laser eyes
|
||||
/obj/item/projectile/beam/laser_eyes
|
||||
/obj/projectile/beam/laser_eyes
|
||||
name = "beam"
|
||||
icon = 'icons/effects/genetics.dmi'
|
||||
icon_state = "eyelasers"
|
||||
|
||||
@@ -511,7 +511,7 @@
|
||||
new/obj/effect/temp_visual/dir_setting/curse/grasp_portal(spawn_turf, owner.dir)
|
||||
playsound(spawn_turf, 'sound/effects/curse2.ogg', 80, TRUE, -1)
|
||||
var/turf/ownerloc = get_turf(owner)
|
||||
var/obj/item/projectile/curse_hand/C = new (spawn_turf)
|
||||
var/obj/projectile/curse_hand/C = new (spawn_turf)
|
||||
C.preparePixelProjectile(ownerloc, spawn_turf)
|
||||
C.fire()
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/atom/proc/handle_ricochet(obj/item/projectile/P)
|
||||
/atom/proc/handle_ricochet(obj/projectile/P)
|
||||
return
|
||||
|
||||
///Can the mover object pass this atom, while heading for the target turf
|
||||
@@ -413,7 +413,7 @@
|
||||
*
|
||||
* Default behaviour is to send the COMSIG_ATOM_BULLET_ACT and then call on_hit() on the projectile
|
||||
*/
|
||||
/atom/proc/bullet_act(obj/item/projectile/P, def_zone)
|
||||
/atom/proc/bullet_act(obj/projectile/P, def_zone)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_BULLET_ACT, P, def_zone)
|
||||
. = P.on_hit(src, 0, def_zone)
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
||||
var/global/list/spawn_forbidden = list(
|
||||
/obj/item/tk_grab, /obj/item/implant, // not implanter, the actual thing that is inside you
|
||||
/obj/item/assembly, /obj/item/onetankbomb, /obj/item/pda/ai,
|
||||
/obj/item/smallDelivery, /obj/item/projectile,
|
||||
/obj/item/smallDelivery, /obj/projectile,
|
||||
/obj/item/borg/sight, /obj/item/borg/stun, /obj/item/robot_module)
|
||||
|
||||
/datum/hSB/proc/update()
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
/obj/structure/barricade/CanPass(atom/movable/mover, turf/target)//So bullets will fly over and stuff.
|
||||
if(locate(/obj/structure/barricade) in get_turf(mover))
|
||||
return 1
|
||||
else if(istype(mover, /obj/item/projectile))
|
||||
else if(istype(mover, /obj/projectile))
|
||||
if(!anchored)
|
||||
return 1
|
||||
var/obj/item/projectile/proj = mover
|
||||
var/obj/projectile/proj = mover
|
||||
if(proj.firer && Adjacent(proj.firer))
|
||||
return 1
|
||||
if(prob(proj_pass_rate))
|
||||
|
||||
@@ -542,7 +542,7 @@
|
||||
break
|
||||
|
||||
update_icon()
|
||||
var/obj/item/projectile/A
|
||||
var/obj/projectile/A
|
||||
//any emagged turrets drains 2x power and uses a different projectile?
|
||||
if(mode == TURRET_STUN)
|
||||
use_power(reqpower)
|
||||
@@ -645,8 +645,8 @@
|
||||
scan_range = 9
|
||||
req_access = list(ACCESS_SYNDICATE)
|
||||
mode = TURRET_LETHAL
|
||||
stun_projectile = /obj/item/projectile/bullet
|
||||
lethal_projectile = /obj/item/projectile/bullet
|
||||
stun_projectile = /obj/projectile/bullet
|
||||
lethal_projectile = /obj/projectile/bullet
|
||||
lethal_projectile_sound = 'sound/weapons/gun/pistol/shot.ogg'
|
||||
stun_projectile_sound = 'sound/weapons/gun/pistol/shot.ogg'
|
||||
icon_state = "syndie_off"
|
||||
@@ -667,23 +667,23 @@
|
||||
/obj/machinery/porta_turret/syndicate/energy
|
||||
icon_state = "standard_lethal"
|
||||
base_icon_state = "standard"
|
||||
stun_projectile = /obj/item/projectile/energy/electrode
|
||||
stun_projectile = /obj/projectile/energy/electrode
|
||||
stun_projectile_sound = 'sound/weapons/taser.ogg'
|
||||
lethal_projectile = /obj/item/projectile/beam/laser
|
||||
lethal_projectile = /obj/projectile/beam/laser
|
||||
lethal_projectile_sound = 'sound/weapons/laser.ogg'
|
||||
desc = "An energy blaster auto-turret."
|
||||
|
||||
/obj/machinery/porta_turret/syndicate/energy/heavy
|
||||
icon_state = "standard_lethal"
|
||||
base_icon_state = "standard"
|
||||
stun_projectile = /obj/item/projectile/energy/electrode
|
||||
stun_projectile = /obj/projectile/energy/electrode
|
||||
stun_projectile_sound = 'sound/weapons/taser.ogg'
|
||||
lethal_projectile = /obj/item/projectile/beam/laser/heavylaser
|
||||
lethal_projectile = /obj/projectile/beam/laser/heavylaser
|
||||
lethal_projectile_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||
desc = "An energy blaster auto-turret."
|
||||
|
||||
/obj/machinery/porta_turret/syndicate/energy/raven
|
||||
stun_projectile = /obj/item/projectile/beam/laser
|
||||
stun_projectile = /obj/projectile/beam/laser
|
||||
stun_projectile_sound = 'sound/weapons/laser.ogg'
|
||||
faction = list("neutral","silicon","turret")
|
||||
|
||||
@@ -691,14 +691,14 @@
|
||||
/obj/machinery/porta_turret/syndicate/pod
|
||||
integrity_failure = 20
|
||||
max_integrity = 40
|
||||
stun_projectile = /obj/item/projectile/bullet/syndicate_turret
|
||||
lethal_projectile = /obj/item/projectile/bullet/syndicate_turret
|
||||
stun_projectile = /obj/projectile/bullet/syndicate_turret
|
||||
lethal_projectile = /obj/projectile/bullet/syndicate_turret
|
||||
|
||||
/obj/machinery/porta_turret/syndicate/shuttle
|
||||
scan_range = 9
|
||||
shot_delay = 3
|
||||
stun_projectile = /obj/item/projectile/bullet/p50/penetrator/shuttle
|
||||
lethal_projectile = /obj/item/projectile/bullet/p50/penetrator/shuttle
|
||||
stun_projectile = /obj/projectile/bullet/p50/penetrator/shuttle
|
||||
lethal_projectile = /obj/projectile/bullet/p50/penetrator/shuttle
|
||||
lethal_projectile_sound = 'sound/weapons/gun/smg/shot.ogg'
|
||||
stun_projectile_sound = 'sound/weapons/gun/smg/shot.ogg'
|
||||
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 80, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
|
||||
@@ -723,7 +723,7 @@
|
||||
name = "perimeter defense turret"
|
||||
desc = "A plasma beam turret calibrated to defend outposts against non-humanoid fauna. It is more effective when exposed to the environment."
|
||||
installation = null
|
||||
lethal_projectile = /obj/item/projectile/plasma/turret
|
||||
lethal_projectile = /obj/projectile/plasma/turret
|
||||
lethal_projectile_sound = 'sound/weapons/plasma_cutter.ogg'
|
||||
mode = TURRET_LETHAL //It would be useless in stun mode anyway
|
||||
faction = list("neutral","silicon","turret") //Minebots, medibots, etc that should not be shot.
|
||||
@@ -749,8 +749,8 @@
|
||||
use_power = NO_POWER_USE
|
||||
has_cover = 0
|
||||
scan_range = 9
|
||||
stun_projectile = /obj/item/projectile/beam/laser
|
||||
lethal_projectile = /obj/item/projectile/beam/laser
|
||||
stun_projectile = /obj/projectile/beam/laser
|
||||
lethal_projectile = /obj/projectile/beam/laser
|
||||
lethal_projectile_sound = 'sound/weapons/plasma_cutter.ogg'
|
||||
stun_projectile_sound = 'sound/weapons/plasma_cutter.ogg'
|
||||
icon_state = "syndie_off"
|
||||
@@ -773,8 +773,8 @@
|
||||
integrity_failure = 60
|
||||
name = "Old Laser Turret"
|
||||
desc = "A turret built with substandard parts and run down further with age. Still capable of delivering lethal lasers to the odd space carp, but not much else."
|
||||
stun_projectile = /obj/item/projectile/beam/weak/penetrator
|
||||
lethal_projectile = /obj/item/projectile/beam/weak/penetrator
|
||||
stun_projectile = /obj/projectile/beam/weak/penetrator
|
||||
lethal_projectile = /obj/projectile/beam/weak/penetrator
|
||||
faction = list("neutral","silicon","turret")
|
||||
|
||||
////////////////////////
|
||||
@@ -999,16 +999,16 @@
|
||||
|
||||
/obj/item/gun/energy/laser/bluetag/get_turret_properties()
|
||||
. = ..()
|
||||
.["stun_projectile"] = /obj/item/projectile/beam/lasertag/bluetag
|
||||
.["lethal_projectile"] = /obj/item/projectile/beam/lasertag/bluetag
|
||||
.["stun_projectile"] = /obj/projectile/beam/lasertag/bluetag
|
||||
.["lethal_projectile"] = /obj/projectile/beam/lasertag/bluetag
|
||||
.["base_icon_state"] = "blue"
|
||||
.["shot_delay"] = 30
|
||||
.["team_color"] = "blue"
|
||||
|
||||
/obj/item/gun/energy/laser/redtag/get_turret_properties()
|
||||
. = ..()
|
||||
.["stun_projectile"] = /obj/item/projectile/beam/lasertag/redtag
|
||||
.["lethal_projectile"] = /obj/item/projectile/beam/lasertag/redtag
|
||||
.["stun_projectile"] = /obj/projectile/beam/lasertag/redtag
|
||||
.["lethal_projectile"] = /obj/projectile/beam/lasertag/redtag
|
||||
.["base_icon_state"] = "red"
|
||||
.["shot_delay"] = 30
|
||||
.["team_color"] = "red"
|
||||
@@ -1070,14 +1070,14 @@
|
||||
installation = /obj/item/gun/energy/laser/bluetag
|
||||
team_color = "blue"
|
||||
|
||||
/obj/machinery/porta_turret/lasertag/bullet_act(obj/item/projectile/P)
|
||||
/obj/machinery/porta_turret/lasertag/bullet_act(obj/projectile/P)
|
||||
. = ..()
|
||||
if(on)
|
||||
if(team_color == "blue")
|
||||
if(istype(P, /obj/item/projectile/beam/lasertag/redtag))
|
||||
if(istype(P, /obj/projectile/beam/lasertag/redtag))
|
||||
on = FALSE
|
||||
addtimer(VARSET_CALLBACK(src, on, TRUE), 10 SECONDS)
|
||||
else if(team_color == "red")
|
||||
if(istype(P, /obj/item/projectile/beam/lasertag/bluetag))
|
||||
if(istype(P, /obj/projectile/beam/lasertag/bluetag))
|
||||
on = FALSE
|
||||
addtimer(VARSET_CALLBACK(src, on, TRUE), 10 SECONDS)
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
if(istype(mover) && (mover.pass_flags & PASSGLASS))
|
||||
return prob(20)
|
||||
else
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
if(istype(mover, /obj/projectile))
|
||||
return prob(10)
|
||||
else
|
||||
return !density
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
SEND_SIGNAL(shield, COMSIG_MECHA_ACTION_ACTIVATE, source, signal_args)
|
||||
|
||||
//Redirects projectiles to the shield if defense_check decides they should be blocked and returns true.
|
||||
/obj/mecha/combat/durand/proc/prehit(obj/item/projectile/source, list/signal_args)
|
||||
/obj/mecha/combat/durand/proc/prehit(obj/projectile/source, list/signal_args)
|
||||
if(defense_check(source.loc) && shield)
|
||||
signal_args[2] = shield
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
set_ready_state(0)
|
||||
for(var/i=1 to get_shot_amount())
|
||||
var/obj/item/projectile/A = new projectile(curloc)
|
||||
var/obj/projectile/A = new projectile(curloc)
|
||||
A.firer = chassis.occupant
|
||||
A.original = target
|
||||
if(!A.suppressed && firing_effect_type)
|
||||
@@ -80,7 +80,7 @@
|
||||
desc = "A weapon for combat exosuits. Shoots basic lasers."
|
||||
icon_state = "mecha_laser"
|
||||
energy_drain = 30
|
||||
projectile = /obj/item/projectile/beam/laser
|
||||
projectile = /obj/projectile/beam/laser
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
harmful = TRUE
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
desc = "A weapon for combat exosuits. Shoots basic disablers."
|
||||
icon_state = "mecha_disabler"
|
||||
energy_drain = 30
|
||||
projectile = /obj/item/projectile/beam/disabler
|
||||
projectile = /obj/projectile/beam/disabler
|
||||
fire_sound = 'sound/weapons/taser2.ogg'
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy
|
||||
@@ -99,7 +99,7 @@
|
||||
desc = "A weapon for combat exosuits. Shoots heavy lasers."
|
||||
icon_state = "mecha_laser"
|
||||
energy_drain = 60
|
||||
projectile = /obj/item/projectile/beam/laser/heavylaser
|
||||
projectile = /obj/projectile/beam/laser/heavylaser
|
||||
fire_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/ion
|
||||
@@ -108,7 +108,7 @@
|
||||
desc = "A weapon for combat exosuits. Shoots technology-disabling ion beams. Don't catch yourself in the blast!"
|
||||
icon_state = "mecha_ion"
|
||||
energy_drain = 120
|
||||
projectile = /obj/item/projectile/ion
|
||||
projectile = /obj/projectile/ion
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/tesla
|
||||
@@ -117,7 +117,7 @@
|
||||
desc = "A weapon for combat exosuits. Fires bolts of electricity similar to the experimental tesla engine."
|
||||
icon_state = "mecha_ion"
|
||||
energy_drain = 500
|
||||
projectile = /obj/item/projectile/energy/tesla/cannon
|
||||
projectile = /obj/projectile/energy/tesla/cannon
|
||||
fire_sound = 'sound/magic/lightningbolt.ogg'
|
||||
harmful = TRUE
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
desc = "A weapon for combat exosuits. Shoots powerful destructive blasts capable of demolishing obstacles."
|
||||
icon_state = "mecha_pulse"
|
||||
energy_drain = 120
|
||||
projectile = /obj/item/projectile/beam/pulse/heavy
|
||||
projectile = /obj/projectile/beam/pulse/heavy
|
||||
fire_sound = 'sound/weapons/marauder.ogg'
|
||||
harmful = TRUE
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
|
||||
energy_drain = 30
|
||||
projectile = /obj/item/projectile/plasma/adv/mech
|
||||
projectile = /obj/projectile/plasma/adv/mech
|
||||
fire_sound = 'sound/weapons/plasma_cutter.ogg'
|
||||
harmful = TRUE
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
icon_state = "mecha_taser"
|
||||
energy_drain = 20
|
||||
equip_cooldown = 8
|
||||
projectile = /obj/item/projectile/energy/electrode
|
||||
projectile = /obj/projectile/energy/electrode
|
||||
fire_sound = 'sound/weapons/taser.ogg'
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
desc = "A weapon for combat exosuits. Shoots incendiary bullets."
|
||||
icon_state = "mecha_carbine"
|
||||
equip_cooldown = 10
|
||||
projectile = /obj/item/projectile/bullet/incendiary/fnx99
|
||||
projectile = /obj/projectile/bullet/incendiary/fnx99
|
||||
projectiles = 24
|
||||
projectiles_cache = 24
|
||||
projectiles_cache_max = 96
|
||||
@@ -293,7 +293,7 @@
|
||||
fire_sound = 'sound/weapons/gun/general/heavy_shot_suppressed.ogg'
|
||||
icon_state = "mecha_mime"
|
||||
equip_cooldown = 30
|
||||
projectile = /obj/item/projectile/bullet/mime
|
||||
projectile = /obj/projectile/bullet/mime
|
||||
projectiles = 6
|
||||
projectile_energy_cost = 50
|
||||
harmful = TRUE
|
||||
@@ -303,7 +303,7 @@
|
||||
desc = "A weapon for combat exosuits. Shoots a spread of pellets."
|
||||
icon_state = "mecha_scatter"
|
||||
equip_cooldown = 20
|
||||
projectile = /obj/item/projectile/bullet/scattershot
|
||||
projectile = /obj/projectile/bullet/scattershot
|
||||
projectiles = 40
|
||||
projectiles_cache = 40
|
||||
projectiles_cache_max = 160
|
||||
@@ -317,7 +317,7 @@
|
||||
desc = "A weapon for combat exosuits. Shoots a rapid, three shot burst."
|
||||
icon_state = "mecha_uac2"
|
||||
equip_cooldown = 10
|
||||
projectile = /obj/item/projectile/bullet/lmg
|
||||
projectile = /obj/projectile/bullet/lmg
|
||||
projectiles = 300
|
||||
projectiles_cache = 300
|
||||
projectiles_cache_max = 1200
|
||||
@@ -332,7 +332,7 @@
|
||||
name = "\improper SRM-8 missile rack"
|
||||
desc = "A weapon for combat exosuits. Launches light explosive missiles."
|
||||
icon_state = "mecha_missilerack"
|
||||
projectile = /obj/item/projectile/bullet/a84mm_he
|
||||
projectile = /obj/projectile/bullet/a84mm_he
|
||||
fire_sound = 'sound/weapons/gun/general/rocket_launch.ogg'
|
||||
projectiles = 8
|
||||
projectiles_cache = 0
|
||||
@@ -346,7 +346,7 @@
|
||||
name = "\improper BRM-6 missile rack"
|
||||
desc = "A weapon for combat exosuits. Launches low-explosive breaching missiles designed to explode only when striking a sturdy target."
|
||||
icon_state = "mecha_missilerack_six"
|
||||
projectile = /obj/item/projectile/bullet/a84mm_br
|
||||
projectile = /obj/projectile/bullet/a84mm_br
|
||||
fire_sound = 'sound/weapons/gun/general/rocket_launch.ogg'
|
||||
projectiles = 6
|
||||
projectiles_cache = 0
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
log_message("Hit by [AM].", LOG_MECHA, color="red")
|
||||
. = ..()
|
||||
|
||||
/obj/mecha/bullet_act(obj/item/projectile/Proj) //wrapper
|
||||
/obj/mecha/bullet_act(obj/projectile/Proj) //wrapper
|
||||
if (!enclosed && occupant && !silicon_pilot && !Proj.force_hit && (Proj.def_zone == BODY_ZONE_HEAD || Proj.def_zone == BODY_ZONE_CHEST)) //allows bullets to hit the pilot of open-canopy mechs
|
||||
occupant.bullet_act(Proj) //If the sides are open, the occupant can be hit
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
@@ -134,8 +134,8 @@
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /obj/item/projectile/beam))
|
||||
var/obj/item/projectile/beam/B = mover
|
||||
if(istype(mover, /obj/projectile/beam))
|
||||
var/obj/projectile/beam/B = mover
|
||||
B.damage = (B.damage/2)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
var/turf/real_target = get_link_target_turf()
|
||||
if(!istype(real_target))
|
||||
return FALSE
|
||||
if(!force && (!ismecha(M) && !istype(M, /obj/item/projectile) && M.anchored && !allow_anchored))
|
||||
if(!force && (!ismecha(M) && !istype(M, /obj/projectile) && M.anchored && !allow_anchored))
|
||||
return
|
||||
if(ismegafauna(M))
|
||||
message_admins("[M] has used a portal at [ADMIN_VERBOSEJMP(src)] made by [usr].")
|
||||
@@ -166,8 +166,8 @@
|
||||
else
|
||||
last_effect = world.time
|
||||
if(do_teleport(M, real_target, innate_accuracy_penalty, no_effects = no_effect, channel = teleport_channel))
|
||||
if(istype(M, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = M
|
||||
if(istype(M, /obj/projectile))
|
||||
var/obj/projectile/P = M
|
||||
P.ignore_source_check = TRUE
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
if(prob(50))
|
||||
to_chat(mover, "<span class='danger'>You get stuck in \the [src] for a moment.</span>")
|
||||
return FALSE
|
||||
else if(istype(mover, /obj/item/projectile))
|
||||
else if(istype(mover, /obj/projectile))
|
||||
return prob(30)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
if(EAST)
|
||||
icon_state = "beam_splash_e"
|
||||
|
||||
/obj/item/projectile/curse_hand/update_icon()
|
||||
/obj/projectile/curse_hand/update_icon()
|
||||
icon_state = "[icon_state][handedness]"
|
||||
|
||||
/obj/effect/temp_visual/wizard
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
if(prob(I.force))
|
||||
push_over()
|
||||
|
||||
/obj/item/cardboard_cutout/bullet_act(obj/item/projectile/P)
|
||||
if(istype(P, /obj/item/projectile/bullet/reusable))
|
||||
/obj/item/cardboard_cutout/bullet_act(obj/projectile/P)
|
||||
if(istype(P, /obj/projectile/bullet/reusable))
|
||||
P.on_hit(src, 0)
|
||||
visible_message("<span class='danger'>[src] is hit by [P]!</span>")
|
||||
playsound(src, 'sound/weapons/slice.ogg', 50, TRUE)
|
||||
|
||||
@@ -120,20 +120,20 @@
|
||||
TED.pass_mind(M)
|
||||
|
||||
|
||||
/obj/item/projectile/energy/chrono_beam
|
||||
/obj/projectile/energy/chrono_beam
|
||||
name = "eradication beam"
|
||||
icon_state = "chronobolt"
|
||||
range = CHRONO_BEAM_RANGE
|
||||
nodamage = TRUE
|
||||
var/obj/item/gun/energy/chrono_gun/gun = null
|
||||
|
||||
/obj/item/projectile/energy/chrono_beam/Initialize()
|
||||
/obj/projectile/energy/chrono_beam/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/ammo_casing/energy/chrono_beam/C = loc
|
||||
if(istype(C))
|
||||
gun = C.gun
|
||||
|
||||
/obj/item/projectile/energy/chrono_beam/on_hit(atom/target)
|
||||
/obj/projectile/energy/chrono_beam/on_hit(atom/target)
|
||||
if(target && gun && isliving(target))
|
||||
var/obj/structure/chrono_field/F = new(target.loc, target, gun)
|
||||
gun.field_connect(F)
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
/obj/item/ammo_casing/energy/chrono_beam
|
||||
name = "eradication beam"
|
||||
projectile_type = /obj/item/projectile/energy/chrono_beam
|
||||
projectile_type = /obj/projectile/energy/chrono_beam
|
||||
icon_state = "chronobolt"
|
||||
e_cost = 0
|
||||
var/obj/item/gun/energy/chrono_gun/gun
|
||||
@@ -238,9 +238,9 @@
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/chrono_field/bullet_act(obj/item/projectile/P)
|
||||
if(istype(P, /obj/item/projectile/energy/chrono_beam))
|
||||
var/obj/item/projectile/energy/chrono_beam/beam = P
|
||||
/obj/structure/chrono_field/bullet_act(obj/projectile/P)
|
||||
if(istype(P, /obj/projectile/energy/chrono_beam))
|
||||
var/obj/projectile/energy/chrono_beam/beam = P
|
||||
var/obj/item/gun/energy/chrono_gun/Pgun = beam.gun
|
||||
if(Pgun && istype(Pgun))
|
||||
Pgun.field_connect(src)
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
create_with_tank = TRUE
|
||||
|
||||
/obj/item/flamethrower/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
var/obj/item/projectile/P = hitby
|
||||
var/obj/projectile/P = hitby
|
||||
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
|
||||
owner.visible_message("<span class='danger'>\The [attack_text] hits the fueltank on [owner]'s [name], rupturing it! What a shot!</span>")
|
||||
var/turf/target_turf = get_turf(owner)
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/grenade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
var/obj/item/projectile/P = hitby
|
||||
var/obj/projectile/P = hitby
|
||||
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
|
||||
owner.visible_message("<span class='danger'>[attack_text] hits [owner]'s [src], setting it off! What a shot!</span>")
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/latexballon/bullet_act(obj/item/projectile/P)
|
||||
/obj/item/latexballon/bullet_act(obj/projectile/P)
|
||||
if(!P.nodamage)
|
||||
burst()
|
||||
return ..()
|
||||
|
||||
@@ -471,7 +471,7 @@
|
||||
"<span class='hear'>You hear a loud crack as you are washed with a wave of heat.</span>")
|
||||
consume_everything()
|
||||
|
||||
/obj/item/melee/supermatter_sword/bullet_act(obj/item/projectile/P)
|
||||
/obj/item/melee/supermatter_sword/bullet_act(obj/projectile/P)
|
||||
visible_message("<span class='danger'>[P] smacks into [src] and rapidly flashes to ash.</span>",\
|
||||
"<span class='hear'>You hear a loud crack as you are washed with a wave of heat.</span>")
|
||||
consume_everything(P)
|
||||
|
||||
@@ -493,18 +493,18 @@
|
||||
/obj/item/ammo_casing/caseless/gumball
|
||||
name = "Gumball"
|
||||
desc = "Why are you seeing this?!"
|
||||
projectile_type = /obj/item/projectile/bullet/reusable/gumball
|
||||
projectile_type = /obj/projectile/bullet/reusable/gumball
|
||||
click_cooldown_override = 2
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/reusable/gumball
|
||||
/obj/projectile/bullet/reusable/gumball
|
||||
name = "gumball"
|
||||
desc = "Oh noes! A fast-moving gumball!"
|
||||
icon_state = "gumball"
|
||||
ammo_type = /obj/item/reagent_containers/food/snacks/gumball/cyborg
|
||||
nodamage = TRUE
|
||||
|
||||
/obj/item/projectile/bullet/reusable/gumball/handle_drop()
|
||||
/obj/projectile/bullet/reusable/gumball/handle_drop()
|
||||
if(!dropped)
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/item/reagent_containers/food/snacks/gumball/S = new ammo_type(T)
|
||||
@@ -514,10 +514,10 @@
|
||||
/obj/item/ammo_casing/caseless/lollipop //NEEDS RANDOMIZED COLOR LOGIC.
|
||||
name = "Lollipop"
|
||||
desc = "Why are you seeing this?!"
|
||||
projectile_type = /obj/item/projectile/bullet/reusable/lollipop
|
||||
projectile_type = /obj/projectile/bullet/reusable/lollipop
|
||||
click_cooldown_override = 2
|
||||
|
||||
/obj/item/projectile/bullet/reusable/lollipop
|
||||
/obj/projectile/bullet/reusable/lollipop
|
||||
name = "lollipop"
|
||||
desc = "Oh noes! A fast-moving lollipop!"
|
||||
icon_state = "lollipop_1"
|
||||
@@ -525,7 +525,7 @@
|
||||
var/color2 = rgb(0, 0, 0)
|
||||
nodamage = TRUE
|
||||
|
||||
/obj/item/projectile/bullet/reusable/lollipop/Initialize()
|
||||
/obj/projectile/bullet/reusable/lollipop/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/reagent_containers/food/snacks/lollipop/S = new ammo_type(src)
|
||||
color2 = S.headcolor
|
||||
@@ -533,7 +533,7 @@
|
||||
head.color = color2
|
||||
add_overlay(head)
|
||||
|
||||
/obj/item/projectile/bullet/reusable/lollipop/handle_drop()
|
||||
/obj/projectile/bullet/reusable/lollipop/handle_drop()
|
||||
if(!dropped)
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/item/reagent_containers/food/snacks/lollipop/S = new ammo_type(T)
|
||||
@@ -559,7 +559,7 @@
|
||||
var/projectile_damage_tick_ecost_coefficient = 2 //Lasers get half their damage chopped off, drains 50 power/tick. Note that fields are processed 5 times per second.
|
||||
var/projectile_speed_coefficient = 1.5 //Higher the coefficient slower the projectile.
|
||||
var/projectile_tick_speed_ecost = 15
|
||||
var/list/obj/item/projectile/tracked
|
||||
var/list/obj/projectile/tracked
|
||||
var/image/projectile_effect
|
||||
var/field_radius = 3
|
||||
var/active = FALSE
|
||||
@@ -652,7 +652,7 @@
|
||||
/obj/item/borg/projectile_dampen/proc/process_usage()
|
||||
var/usage = 0
|
||||
for(var/I in tracked)
|
||||
var/obj/item/projectile/P = I
|
||||
var/obj/projectile/P = I
|
||||
if(!P.stun && P.nodamage) //No damage
|
||||
continue
|
||||
usage += projectile_tick_speed_ecost
|
||||
@@ -673,7 +673,7 @@
|
||||
host.cell.use(energy_recharge*energy_recharge_cyborg_drain_coefficient)
|
||||
energy += energy_recharge
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/dampen_projectile(obj/item/projectile/P, track_projectile = TRUE)
|
||||
/obj/item/borg/projectile_dampen/proc/dampen_projectile(obj/projectile/P, track_projectile = TRUE)
|
||||
if(tracked[P])
|
||||
return
|
||||
if(track_projectile)
|
||||
@@ -682,7 +682,7 @@
|
||||
P.speed *= projectile_speed_coefficient
|
||||
P.add_overlay(projectile_effect)
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/restore_projectile(obj/item/projectile/P)
|
||||
/obj/item/borg/projectile_dampen/proc/restore_projectile(obj/projectile/P)
|
||||
tracked -= P
|
||||
P.damage *= (1/projectile_damage_coefficient)
|
||||
P.speed *= (1/projectile_speed_coefficient)
|
||||
|
||||
@@ -60,17 +60,17 @@
|
||||
#define DECALTYPE_SCORCH 1
|
||||
#define DECALTYPE_BULLET 2
|
||||
|
||||
/obj/item/target/clown/bullet_act(obj/item/projectile/P)
|
||||
/obj/item/target/clown/bullet_act(obj/projectile/P)
|
||||
. = ..()
|
||||
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, TRUE)
|
||||
|
||||
/obj/item/target/bullet_act(obj/item/projectile/P)
|
||||
if(istype(P, /obj/item/projectile/bullet/reusable)) // If it's a foam dart, don't bother with any of this other shit
|
||||
/obj/item/target/bullet_act(obj/projectile/P)
|
||||
if(istype(P, /obj/projectile/bullet/reusable)) // If it's a foam dart, don't bother with any of this other shit
|
||||
return P.on_hit(src, 0)
|
||||
var/p_x = P.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset P.p_x!"
|
||||
var/p_y = P.p_y + pick(0,0,0,0,0,-1,1)
|
||||
var/decaltype = DECALTYPE_SCORCH
|
||||
if(istype(P, /obj/item/projectile/bullet))
|
||||
if(istype(P, /obj/projectile/bullet))
|
||||
decaltype = DECALTYPE_BULLET
|
||||
var/icon/C = icon(icon,icon_state)
|
||||
if(C.GetPixel(p_x, p_y) && P.original == src && overlays.len <= 35) // if the located pixel isn't blank (null)
|
||||
@@ -83,7 +83,7 @@
|
||||
bullet_hole.pixel_y = p_y - 1
|
||||
if(decaltype == DECALTYPE_SCORCH)
|
||||
bullet_hole.setDir(pick(NORTH,SOUTH,EAST,WEST))// random scorch design
|
||||
if(P.damage >= 20 || istype(P, /obj/item/projectile/beam/practice))
|
||||
if(P.damage >= 20 || istype(P, /obj/projectile/beam/practice))
|
||||
bullet_hole.setDir(pick(NORTH,SOUTH,EAST,WEST))
|
||||
else
|
||||
bullet_hole.icon_state = "light_scorch"
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
if(3)
|
||||
take_damage(rand(10, 90), BRUTE, "bomb", 0)
|
||||
|
||||
/obj/bullet_act(obj/item/projectile/P)
|
||||
/obj/bullet_act(obj/projectile/P)
|
||||
. = ..()
|
||||
playsound(src, P.hitsound, 50, TRUE)
|
||||
visible_message("<span class='danger'>[src] is hit by \a [P]!</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
|
||||
@@ -275,7 +275,7 @@
|
||||
if(istype(mover) && (mover.pass_flags & PASSGRILLE))
|
||||
return prob(girderpasschance)
|
||||
else
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
if(istype(mover, /obj/projectile))
|
||||
return prob(girderpasschance)
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
if(istype(mover) && (mover.pass_flags & PASSGRILLE))
|
||||
return TRUE
|
||||
else
|
||||
if(istype(mover, /obj/item/projectile) && density)
|
||||
if(istype(mover, /obj/projectile) && density)
|
||||
return prob(30)
|
||||
else
|
||||
return !density
|
||||
|
||||
@@ -104,11 +104,11 @@
|
||||
max_integrity = 10
|
||||
allow_walk = 0
|
||||
|
||||
/obj/structure/holosign/barrier/cyborg/bullet_act(obj/item/projectile/P)
|
||||
/obj/structure/holosign/barrier/cyborg/bullet_act(obj/projectile/P)
|
||||
take_damage((P.damage / 5) , BRUTE, "melee", 1) //Doesn't really matter what damage flag it is.
|
||||
if(istype(P, /obj/item/projectile/energy/electrode))
|
||||
if(istype(P, /obj/projectile/energy/electrode))
|
||||
take_damage(10, BRUTE, "melee", 1) //Tasers aren't harmful.
|
||||
if(istype(P, /obj/item/projectile/beam/disabler))
|
||||
if(istype(P, /obj/projectile/beam/disabler))
|
||||
take_damage(5, BRUTE, "melee", 1) //Disablers aren't harmful.
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
max_integrity = 20
|
||||
var/shockcd = 0
|
||||
|
||||
/obj/structure/holosign/barrier/cyborg/hacked/bullet_act(obj/item/projectile/P)
|
||||
/obj/structure/holosign/barrier/cyborg/hacked/bullet_act(obj/projectile/P)
|
||||
take_damage(P.damage, BRUTE, "melee", 1) //Yeah no this doesn't get projectile resistance.
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
layer = ABOVE_MOB_LAYER
|
||||
var/view_range = 10
|
||||
var/cooldown = 0
|
||||
var/projectile_type = /obj/item/projectile/bullet/manned_turret
|
||||
var/projectile_type = /obj/projectile/bullet/manned_turret
|
||||
var/rate_of_fire = 1
|
||||
var/number_of_shots = 40
|
||||
var/cooldown_duration = 90
|
||||
@@ -151,7 +151,7 @@
|
||||
var/turf/targets_from = get_turf(src)
|
||||
if(QDELETED(target))
|
||||
target = target_turf
|
||||
var/obj/item/projectile/P = new projectile_type(targets_from)
|
||||
var/obj/projectile/P = new projectile_type(targets_from)
|
||||
P.starting = targets_from
|
||||
P.firer = user
|
||||
P.original = target
|
||||
@@ -166,7 +166,7 @@
|
||||
/obj/machinery/manned_turret/ultimate // Admin-only proof of concept for autoclicker automatics
|
||||
name = "Infinity Gun"
|
||||
view_range = 12
|
||||
projectile_type = /obj/item/projectile/bullet/manned_turret
|
||||
projectile_type = /obj/projectile/bullet/manned_turret
|
||||
|
||||
/obj/machinery/manned_turret/ultimate/checkfire(atom/targeted_atom, mob/user)
|
||||
target = targeted_atom
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
var/framebuildstackamount = 5
|
||||
var/buildstacktype = /obj/item/stack/sheet/metal
|
||||
var/buildstackamount = 0
|
||||
var/list/allowed_projectile_typecache = list(/obj/item/projectile/beam)
|
||||
var/list/allowed_projectile_typecache = list(/obj/projectile/beam)
|
||||
var/rotation_angle = -1
|
||||
|
||||
/obj/structure/reflector/Initialize()
|
||||
@@ -58,7 +58,7 @@
|
||||
/obj/structure/reflector/proc/dir_map_to_angle(dir)
|
||||
return 0
|
||||
|
||||
/obj/structure/reflector/bullet_act(obj/item/projectile/P)
|
||||
/obj/structure/reflector/bullet_act(obj/projectile/P)
|
||||
var/pdir = P.dir
|
||||
var/pangle = P.Angle
|
||||
var/ploc = get_turf(P)
|
||||
@@ -68,7 +68,7 @@
|
||||
return ..()
|
||||
return BULLET_ACT_FORCE_PIERCE
|
||||
|
||||
/obj/structure/reflector/proc/auto_reflect(obj/item/projectile/P, pdir, turf/ploc, pangle)
|
||||
/obj/structure/reflector/proc/auto_reflect(obj/projectile/P, pdir, turf/ploc, pangle)
|
||||
P.ignore_source_check = TRUE
|
||||
P.range = P.decayedRange
|
||||
P.decayedRange = max(P.decayedRange--, 0)
|
||||
@@ -193,7 +193,7 @@
|
||||
admin = TRUE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/reflector/single/auto_reflect(obj/item/projectile/P, pdir, turf/ploc, pangle)
|
||||
/obj/structure/reflector/single/auto_reflect(obj/projectile/P, pdir, turf/ploc, pangle)
|
||||
var/incidence = GET_ANGLE_OF_INCIDENCE(rotation_angle, (P.Angle + 180))
|
||||
if(abs(incidence) > 90 && abs(incidence) < 270)
|
||||
return FALSE
|
||||
@@ -219,7 +219,7 @@
|
||||
admin = TRUE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/reflector/double/auto_reflect(obj/item/projectile/P, pdir, turf/ploc, pangle)
|
||||
/obj/structure/reflector/double/auto_reflect(obj/projectile/P, pdir, turf/ploc, pangle)
|
||||
var/incidence = GET_ANGLE_OF_INCIDENCE(rotation_angle, (P.Angle + 180))
|
||||
var/new_angle = SIMPLIFY_DEGREES(rotation_angle + incidence)
|
||||
P.setAngle(new_angle)
|
||||
@@ -243,7 +243,7 @@
|
||||
admin = TRUE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/reflector/box/auto_reflect(obj/item/projectile/P)
|
||||
/obj/structure/reflector/box/auto_reflect(obj/projectile/P)
|
||||
P.setAngle(rotation_angle)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
PlasmaBurn(exposed_temperature)
|
||||
|
||||
|
||||
/obj/structure/statue/plasma/bullet_act(obj/item/projectile/Proj)
|
||||
/obj/structure/statue/plasma/bullet_act(obj/projectile/Proj)
|
||||
var/burn = FALSE
|
||||
if(!(Proj.nodamage) && Proj.damage_type == BURN && !QDELETED(src))
|
||||
burn = TRUE
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
pinned_target.forceMove(user.drop_location())
|
||||
to_chat(user, "<span class='notice'>You take the target out of the stake.</span>")
|
||||
|
||||
/obj/structure/target_stake/bullet_act(obj/item/projectile/P)
|
||||
/obj/structure/target_stake/bullet_act(obj/projectile/P)
|
||||
if(pinned_target)
|
||||
pinned_target.bullet_act(P)
|
||||
else
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
else
|
||||
if(istype(AM, /obj/structure/window))
|
||||
return FALSE
|
||||
if(istype(AM, /obj/item/projectile))
|
||||
if(istype(AM, /obj/projectile))
|
||||
return TRUE
|
||||
if((locate(/obj/structure/lattice) in src))
|
||||
return TRUE
|
||||
|
||||
@@ -115,10 +115,10 @@
|
||||
if(exposed_temperature > 300)
|
||||
PlasmaBurn(exposed_temperature)
|
||||
|
||||
/turf/closed/wall/mineral/plasma/bullet_act(obj/item/projectile/Proj)
|
||||
if(istype(Proj, /obj/item/projectile/beam))
|
||||
/turf/closed/wall/mineral/plasma/bullet_act(obj/projectile/Proj)
|
||||
if(istype(Proj, /obj/projectile/beam))
|
||||
PlasmaBurn(2500)
|
||||
else if(istype(Proj, /obj/item/projectile/ion))
|
||||
else if(istype(Proj, /obj/projectile/ion))
|
||||
PlasmaBurn(500)
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
/turf/closed/wall/attack_tk()
|
||||
return
|
||||
|
||||
/turf/closed/wall/handle_ricochet(obj/item/projectile/P) //A huge pile of shitcode!
|
||||
/turf/closed/wall/handle_ricochet(obj/projectile/P) //A huge pile of shitcode!
|
||||
var/turf/p_turf = get_turf(P)
|
||||
var/face_direction = get_dir(src, p_turf)
|
||||
var/face_angle = dir2angle(face_direction)
|
||||
|
||||
@@ -567,7 +567,7 @@
|
||||
/turf/proc/Melt()
|
||||
return ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
|
||||
/turf/bullet_act(obj/item/projectile/P)
|
||||
/turf/bullet_act(obj/projectile/P)
|
||||
. = ..()
|
||||
if(. != BULLET_ACT_FORCE_PIERCE)
|
||||
. = BULLET_ACT_TURF
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
brute_resist = 0.5
|
||||
explosion_block = 2
|
||||
|
||||
/obj/structure/blob/shield/reflective/handle_ricochet(obj/item/projectile/P)
|
||||
/obj/structure/blob/shield/reflective/handle_ricochet(obj/projectile/P)
|
||||
var/turf/p_turf = get_turf(P)
|
||||
var/face_direction = get_dir(src, p_turf)
|
||||
var/face_angle = dir2angle(face_direction)
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
/obj/item/ammo_casing/magic/tentacle
|
||||
name = "tentacle"
|
||||
desc = "A tentacle."
|
||||
projectile_type = /obj/item/projectile/tentacle
|
||||
projectile_type = /obj/projectile/tentacle
|
||||
caliber = "tentacle"
|
||||
icon_state = "tentacle_end"
|
||||
firing_effect_type = null
|
||||
@@ -290,7 +290,7 @@
|
||||
gun = null
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/tentacle
|
||||
/obj/projectile/tentacle
|
||||
name = "tentacle"
|
||||
icon_state = "tentacle_end"
|
||||
pass_flags = PASSTABLE
|
||||
@@ -301,20 +301,20 @@
|
||||
var/chain
|
||||
var/obj/item/ammo_casing/magic/tentacle/source //the item that shot it
|
||||
|
||||
/obj/item/projectile/tentacle/Initialize()
|
||||
/obj/projectile/tentacle/Initialize()
|
||||
source = loc
|
||||
. = ..()
|
||||
|
||||
/obj/item/projectile/tentacle/fire(setAngle)
|
||||
/obj/projectile/tentacle/fire(setAngle)
|
||||
if(firer)
|
||||
chain = firer.Beam(src, icon_state = "tentacle", time = INFINITY, maxdistance = INFINITY, beam_sleep_time = 1)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/tentacle/proc/reset_throw(mob/living/carbon/human/H)
|
||||
/obj/projectile/tentacle/proc/reset_throw(mob/living/carbon/human/H)
|
||||
if(H.in_throw_mode)
|
||||
H.throw_mode_off() //Don't annoy the changeling if he doesn't catch the item
|
||||
|
||||
/obj/item/projectile/tentacle/proc/tentacle_grab(mob/living/carbon/human/H, mob/living/carbon/C)
|
||||
/obj/projectile/tentacle/proc/tentacle_grab(mob/living/carbon/human/H, mob/living/carbon/C)
|
||||
if(H.Adjacent(C))
|
||||
if(H.get_active_held_item() && !H.get_inactive_held_item())
|
||||
H.swap_hand()
|
||||
@@ -323,7 +323,7 @@
|
||||
C.grabbedby(H)
|
||||
C.grippedby(H, instant = TRUE) //instant aggro grab
|
||||
|
||||
/obj/item/projectile/tentacle/proc/tentacle_stab(mob/living/carbon/human/H, mob/living/carbon/C)
|
||||
/obj/projectile/tentacle/proc/tentacle_stab(mob/living/carbon/human/H, mob/living/carbon/C)
|
||||
if(H.Adjacent(C))
|
||||
for(var/obj/item/I in H.held_items)
|
||||
if(I.get_sharpness())
|
||||
@@ -334,7 +334,7 @@
|
||||
playsound(get_turf(H),I.hitsound,75,TRUE)
|
||||
return
|
||||
|
||||
/obj/item/projectile/tentacle/on_hit(atom/target, blocked = FALSE)
|
||||
/obj/projectile/tentacle/on_hit(atom/target, blocked = FALSE)
|
||||
var/mob/living/carbon/human/H = firer
|
||||
if(blocked >= 100)
|
||||
return BULLET_ACT_BLOCK
|
||||
@@ -389,7 +389,7 @@
|
||||
L.throw_at(get_step_towards(H,L), 8, 2)
|
||||
. = BULLET_ACT_HIT
|
||||
|
||||
/obj/item/projectile/tentacle/Destroy()
|
||||
/obj/projectile/tentacle/Destroy()
|
||||
qdel(chain)
|
||||
source = null
|
||||
return ..()
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
clockwork_say(ranged_ability_user, text2ratvar("Purge all untruths and honor Engine!"))
|
||||
log_combat(ranged_ability_user, U, "fired at with Kindle")
|
||||
playsound(ranged_ability_user, 'sound/magic/blink.ogg', 50, TRUE, frequency = 0.5)
|
||||
var/obj/item/projectile/kindle/A = new(T)
|
||||
var/obj/projectile/kindle/A = new(T)
|
||||
A.preparePixelProjectile(target, caller, params)
|
||||
A.fire()
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/projectile/kindle
|
||||
/obj/projectile/kindle
|
||||
name = "kindled flame"
|
||||
icon_state = "pulse0"
|
||||
nodamage = TRUE
|
||||
@@ -173,11 +173,11 @@
|
||||
range = 3
|
||||
log_override = TRUE
|
||||
|
||||
/obj/item/projectile/kindle/Destroy()
|
||||
/obj/projectile/kindle/Destroy()
|
||||
visible_message("<span class='warning'>[src] flickers out!</span>")
|
||||
. = ..()
|
||||
|
||||
/obj/item/projectile/kindle/on_hit(atom/target, blocked = FALSE)
|
||||
/obj/projectile/kindle/on_hit(atom/target, blocked = FALSE)
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(is_servant_of_ratvar(L) || L.stat || L.has_status_effect(STATUS_EFFECT_KINDLE))
|
||||
|
||||
@@ -80,15 +80,15 @@
|
||||
break
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/marauder/bullet_act(obj/item/projectile/P)
|
||||
/mob/living/simple_animal/hostile/clockwork/marauder/bullet_act(obj/projectile/P)
|
||||
if(deflect_projectile(P))
|
||||
return BULLET_ACT_BLOCK
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/marauder/proc/deflect_projectile(obj/item/projectile/P)
|
||||
/mob/living/simple_animal/hostile/clockwork/marauder/proc/deflect_projectile(obj/projectile/P)
|
||||
if(!shield_health)
|
||||
return
|
||||
var/energy_projectile = istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam)
|
||||
var/energy_projectile = istype(P, /obj/projectile/energy) || istype(P, /obj/projectile/beam)
|
||||
visible_message("<span class='danger'>[src] deflects [P] with [p_their()] shield!</span>", \
|
||||
"<span class='danger'>You block [P] with your shield! <i>Blocks left:</i> <b>[shield_health - 1]</b></span>")
|
||||
if(energy_projectile)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/destructible/clockwork/trap/brass_skewer/bullet_act(obj/item/projectile/P)
|
||||
/obj/structure/destructible/clockwork/trap/brass_skewer/bullet_act(obj/projectile/P)
|
||||
if(buckled_mobs && LAZYLEN(buckled_mobs))
|
||||
var/mob/living/L = buckled_mobs[1]
|
||||
return L.bullet_act(P)
|
||||
|
||||
@@ -755,17 +755,17 @@
|
||||
ammo_type = /obj/item/ammo_casing/magic/arcane_barrage/blood
|
||||
|
||||
/obj/item/ammo_casing/magic/arcane_barrage/blood
|
||||
projectile_type = /obj/item/projectile/magic/arcane_barrage/blood
|
||||
projectile_type = /obj/projectile/magic/arcane_barrage/blood
|
||||
firing_effect_type = /obj/effect/temp_visual/cult/sparks
|
||||
|
||||
/obj/item/projectile/magic/arcane_barrage/blood
|
||||
/obj/projectile/magic/arcane_barrage/blood
|
||||
name = "blood bolt"
|
||||
icon_state = "mini_leaper"
|
||||
nondirectional_sprite = TRUE
|
||||
damage_type = BRUTE
|
||||
impact_effect_type = /obj/effect/temp_visual/dir_setting/bloodsplatter
|
||||
|
||||
/obj/item/projectile/magic/arcane_barrage/blood/Bump(atom/target)
|
||||
/obj/projectile/magic/arcane_barrage/blood/Bump(atom/target)
|
||||
var/turf/T = get_turf(target)
|
||||
playsound(T, 'sound/effects/splat.ogg', 50, TRUE)
|
||||
if(iscultist(target))
|
||||
@@ -914,8 +914,8 @@
|
||||
|
||||
/obj/item/shield/mirror/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(iscultist(owner))
|
||||
if(istype(hitby, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = hitby
|
||||
if(istype(hitby, /obj/projectile))
|
||||
var/obj/projectile/P = hitby
|
||||
if(P.damage_type == BRUTE || P.damage_type == BURN)
|
||||
if(P.damage >= 30)
|
||||
var/turf/T = get_turf(owner)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
mob_size = MOB_SIZE_TINY
|
||||
ventcrawler = VENTCRAWLER_ALWAYS
|
||||
ranged = 1
|
||||
projectiletype = /obj/item/projectile/beam/disabler
|
||||
projectiletype = /obj/projectile/beam/disabler
|
||||
ranged_cooldown_time = 20
|
||||
projectilesound = 'sound/weapons/taser2.ogg'
|
||||
loot = list(/obj/effect/decal/cleanable/robot_debris, /obj/item/stack/ore/bluespace_crystal)
|
||||
@@ -136,7 +136,7 @@
|
||||
death()
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/CanPass(atom/movable/O)
|
||||
if(istype(O, /obj/item/projectile/beam/disabler))//Allows for swarmers to fight as a group without wasting their shots hitting each other
|
||||
if(istype(O, /obj/projectile/beam/disabler))//Allows for swarmers to fight as a group without wasting their shots hitting each other
|
||||
return 1
|
||||
if(isswarmer(O))
|
||||
return 1
|
||||
@@ -633,7 +633,7 @@
|
||||
/obj/structure/swarmer/blockade/CanPass(atom/movable/O)
|
||||
if(isswarmer(O))
|
||||
return 1
|
||||
if(istype(O, /obj/item/projectile/beam/disabler))
|
||||
if(istype(O, /obj/projectile/beam/disabler))
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/proc/CreateSwarmer()
|
||||
|
||||
@@ -404,7 +404,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
/datum/AI_Module/large/upgrade_turrets/upgrade(mob/living/silicon/ai/AI)
|
||||
for(var/obj/machinery/porta_turret/ai/turret in GLOB.machines)
|
||||
turret.obj_integrity += 30
|
||||
turret.lethal_projectile = /obj/item/projectile/beam/laser/heavylaser //Once you see it, you will know what it means to FEAR.
|
||||
turret.lethal_projectile = /obj/projectile/beam/laser/heavylaser //Once you see it, you will know what it means to FEAR.
|
||||
turret.lethal_projectile_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||
|
||||
|
||||
|
||||
@@ -389,12 +389,12 @@
|
||||
ammo_type = /obj/item/ammo_casing/a50/ctf
|
||||
|
||||
/obj/item/ammo_casing/a50/ctf
|
||||
projectile_type = /obj/item/projectile/bullet/ctf
|
||||
projectile_type = /obj/projectile/bullet/ctf
|
||||
|
||||
/obj/item/projectile/bullet/ctf
|
||||
/obj/projectile/bullet/ctf
|
||||
damage = 0
|
||||
|
||||
/obj/item/projectile/bullet/ctf/prehit(atom/target)
|
||||
/obj/projectile/bullet/ctf/prehit(atom/target)
|
||||
if(is_ctf_target(target))
|
||||
damage = 60
|
||||
. = ..()
|
||||
@@ -424,13 +424,13 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/ammo_casing/caseless/laser/ctf
|
||||
projectile_type = /obj/item/projectile/beam/ctf
|
||||
projectile_type = /obj/projectile/beam/ctf
|
||||
|
||||
/obj/item/projectile/beam/ctf
|
||||
/obj/projectile/beam/ctf
|
||||
damage = 0
|
||||
icon_state = "omnilaser"
|
||||
|
||||
/obj/item/projectile/beam/ctf/prehit(atom/target)
|
||||
/obj/projectile/beam/ctf/prehit(atom/target)
|
||||
if(is_ctf_target(target))
|
||||
damage = 150
|
||||
. = ..()
|
||||
@@ -453,9 +453,9 @@
|
||||
ammo_type = /obj/item/ammo_casing/caseless/laser/ctf/red
|
||||
|
||||
/obj/item/ammo_casing/caseless/laser/ctf/red
|
||||
projectile_type = /obj/item/projectile/beam/ctf/red
|
||||
projectile_type = /obj/projectile/beam/ctf/red
|
||||
|
||||
/obj/item/projectile/beam/ctf/red
|
||||
/obj/projectile/beam/ctf/red
|
||||
icon_state = "laser"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
|
||||
|
||||
@@ -468,9 +468,9 @@
|
||||
ammo_type = /obj/item/ammo_casing/caseless/laser/ctf/blue
|
||||
|
||||
/obj/item/ammo_casing/caseless/laser/ctf/blue
|
||||
projectile_type = /obj/item/projectile/beam/ctf/blue
|
||||
projectile_type = /obj/projectile/beam/ctf/blue
|
||||
|
||||
/obj/item/projectile/beam/ctf/blue
|
||||
/obj/projectile/beam/ctf/blue
|
||||
icon_state = "bluelaser"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
name ="retro laser"
|
||||
icon_state = "retro"
|
||||
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's security or military forces."
|
||||
// projectile_type = "/obj/item/projectile/practice"
|
||||
// projectile_type = "/obj/projectile/practice"
|
||||
clumsy_check = 0 //No sense in having a harmless gun blow up in the clowns face
|
||||
|
||||
//Syndicate sub-machine guns.
|
||||
|
||||
@@ -32,15 +32,15 @@
|
||||
ranged = 1
|
||||
retreat_distance = 2
|
||||
minimum_distance = 0 //Between shots they can and will close in to nash
|
||||
projectiletype = /obj/item/projectile/magic
|
||||
projectiletype = /obj/projectile/magic
|
||||
projectilesound = 'sound/weapons/emitter.ogg'
|
||||
maxHealth = 50
|
||||
health = 50
|
||||
gold_core_spawnable = NO_SPAWN
|
||||
random_color = FALSE
|
||||
var/allowed_projectile_types = list(/obj/item/projectile/magic/change, /obj/item/projectile/magic/animate, /obj/item/projectile/magic/resurrection,
|
||||
/obj/item/projectile/magic/death, /obj/item/projectile/magic/teleport, /obj/item/projectile/magic/door, /obj/item/projectile/magic/aoe/fireball,
|
||||
/obj/item/projectile/magic/spellblade, /obj/item/projectile/magic/arcane_barrage)
|
||||
var/allowed_projectile_types = list(/obj/projectile/magic/change, /obj/projectile/magic/animate, /obj/projectile/magic/resurrection,
|
||||
/obj/projectile/magic/death, /obj/projectile/magic/teleport, /obj/projectile/magic/door, /obj/projectile/magic/aoe/fireball,
|
||||
/obj/projectile/magic/spellblade, /obj/projectile/magic/arcane_barrage)
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/ranged/Initialize()
|
||||
projectiletype = pick(allowed_projectile_types)
|
||||
@@ -60,13 +60,13 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/ranged/xenobiology // these are for the xenobio gold slime pool
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
allowed_projectile_types = list(/obj/item/projectile/magic/change, /obj/item/projectile/magic/animate, /obj/item/projectile/magic/resurrection,
|
||||
/obj/item/projectile/magic/teleport, /obj/item/projectile/magic/door, /obj/item/projectile/magic/aoe/fireball, /obj/item/projectile/magic/spellblade,
|
||||
/obj/item/projectile/magic/arcane_barrage) //thanks Lett1
|
||||
allowed_projectile_types = list(/obj/projectile/magic/change, /obj/projectile/magic/animate, /obj/projectile/magic/resurrection,
|
||||
/obj/projectile/magic/teleport, /obj/projectile/magic/door, /obj/projectile/magic/aoe/fireball, /obj/projectile/magic/spellblade,
|
||||
/obj/projectile/magic/arcane_barrage) //thanks Lett1
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/ranged/chaos/xenobiology
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
allowed_projectile_types = list(/obj/item/projectile/magic/change, /obj/item/projectile/magic/animate, /obj/item/projectile/magic/resurrection,
|
||||
/obj/item/projectile/magic/teleport, /obj/item/projectile/magic/door, /obj/item/projectile/magic/aoe/fireball, /obj/item/projectile/magic/spellblade,
|
||||
/obj/item/projectile/magic/arcane_barrage)
|
||||
allowed_projectile_types = list(/obj/projectile/magic/change, /obj/projectile/magic/animate, /obj/projectile/magic/resurrection,
|
||||
/obj/projectile/magic/teleport, /obj/projectile/magic/door, /obj/projectile/magic/aoe/fireball, /obj/projectile/magic/spellblade,
|
||||
/obj/projectile/magic/arcane_barrage)
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
var/static/image/southeast_corner = image('icons/effects/fields.dmi', icon_state = "projectile_dampen_southeast")
|
||||
var/static/image/generic_edge = image('icons/effects/fields.dmi', icon_state = "projectile_dampen_generic")
|
||||
var/obj/item/borg/projectile_dampen/projector = null
|
||||
var/list/obj/item/projectile/tracked
|
||||
var/list/obj/item/projectile/staging
|
||||
var/list/obj/projectile/tracked
|
||||
var/list/obj/projectile/staging
|
||||
use_host_turf = TRUE
|
||||
|
||||
/datum/proximity_monitor/advanced/peaceborg_dampener/New()
|
||||
@@ -33,9 +33,9 @@
|
||||
if(!istype(projector))
|
||||
qdel(src)
|
||||
var/list/ranged = list()
|
||||
for(var/obj/item/projectile/P in range(current_range, get_turf(host)))
|
||||
for(var/obj/projectile/P in range(current_range, get_turf(host)))
|
||||
ranged += P
|
||||
for(var/obj/item/projectile/P in tracked)
|
||||
for(var/obj/projectile/P in tracked)
|
||||
if(!(P in ranged) || !P.loc)
|
||||
release_projectile(P)
|
||||
for(var/mob/living/silicon/robot/R in range(current_range, get_turf(host)))
|
||||
@@ -80,20 +80,20 @@
|
||||
else
|
||||
return generic_edge
|
||||
|
||||
/datum/proximity_monitor/advanced/peaceborg_dampener/proc/capture_projectile(obj/item/projectile/P, track_projectile = TRUE)
|
||||
/datum/proximity_monitor/advanced/peaceborg_dampener/proc/capture_projectile(obj/projectile/P, track_projectile = TRUE)
|
||||
if(P in tracked)
|
||||
return
|
||||
projector.dampen_projectile(P, track_projectile)
|
||||
if(track_projectile)
|
||||
tracked += P
|
||||
|
||||
/datum/proximity_monitor/advanced/peaceborg_dampener/proc/release_projectile(obj/item/projectile/P)
|
||||
/datum/proximity_monitor/advanced/peaceborg_dampener/proc/release_projectile(obj/projectile/P)
|
||||
projector.restore_projectile(P)
|
||||
tracked -= P
|
||||
|
||||
/datum/proximity_monitor/advanced/peaceborg_dampener/field_edge_uncrossed(atom/movable/AM, obj/effect/abstract/proximity_checker/advanced/field_edge/F)
|
||||
if(!is_turf_in_field(get_turf(AM), src))
|
||||
if(istype(AM, /obj/item/projectile))
|
||||
if(istype(AM, /obj/projectile))
|
||||
if(AM in tracked)
|
||||
release_projectile(AM)
|
||||
else
|
||||
@@ -101,13 +101,13 @@
|
||||
return ..()
|
||||
|
||||
/datum/proximity_monitor/advanced/peaceborg_dampener/field_edge_crossed(atom/movable/AM, obj/effect/abstract/proximity_checker/advanced/field_edge/F)
|
||||
if(istype(AM, /obj/item/projectile) && !(AM in tracked) && staging[AM] && !is_turf_in_field(staging[AM], src))
|
||||
if(istype(AM, /obj/projectile) && !(AM in tracked) && staging[AM] && !is_turf_in_field(staging[AM], src))
|
||||
capture_projectile(AM)
|
||||
staging -= AM
|
||||
return ..()
|
||||
|
||||
/datum/proximity_monitor/advanced/peaceborg_dampener/field_edge_canpass(atom/movable/AM, obj/effect/abstract/proximity_checker/advanced/field_edge/F, turf/entering)
|
||||
if(istype(AM, /obj/item/projectile))
|
||||
if(istype(AM, /obj/projectile))
|
||||
staging[AM] = get_turf(AM)
|
||||
. = ..()
|
||||
if(!.)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
var/frozen = TRUE
|
||||
if(isliving(A))
|
||||
freeze_mob(A)
|
||||
else if(istype(A, /obj/item/projectile))
|
||||
else if(istype(A, /obj/projectile))
|
||||
freeze_projectile(A)
|
||||
else if(istype(A, /obj/mecha))
|
||||
freeze_mecha(A)
|
||||
@@ -116,7 +116,7 @@
|
||||
unfreeze_throwing(A)
|
||||
if(isliving(A))
|
||||
unfreeze_mob(A)
|
||||
else if(istype(A, /obj/item/projectile))
|
||||
else if(istype(A, /obj/projectile))
|
||||
unfreeze_projectile(A)
|
||||
else if(istype(A, /obj/mecha))
|
||||
unfreeze_mecha(A)
|
||||
@@ -127,14 +127,14 @@
|
||||
A.move_resist = frozen_things[A]
|
||||
frozen_things -= A
|
||||
global_frozen_atoms -= A
|
||||
|
||||
|
||||
|
||||
/datum/proximity_monitor/advanced/timestop/proc/freeze_mecha(obj/mecha/M)
|
||||
M.completely_disabled = TRUE
|
||||
|
||||
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_mecha(obj/mecha/M)
|
||||
M.completely_disabled = FALSE
|
||||
|
||||
|
||||
|
||||
/datum/proximity_monitor/advanced/timestop/proc/freeze_throwing(atom/movable/AM)
|
||||
var/datum/thrownthing/T = AM.throwing
|
||||
@@ -171,10 +171,10 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/proximity_monitor/advanced/timestop/proc/freeze_projectile(obj/item/projectile/P)
|
||||
/datum/proximity_monitor/advanced/timestop/proc/freeze_projectile(obj/projectile/P)
|
||||
P.paused = TRUE
|
||||
|
||||
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_projectile(obj/item/projectile/P)
|
||||
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_projectile(obj/projectile/P)
|
||||
P.paused = FALSE
|
||||
|
||||
/datum/proximity_monitor/advanced/timestop/proc/freeze_mob(mob/living/L)
|
||||
|
||||
@@ -1290,9 +1290,9 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
qdel(src)
|
||||
return
|
||||
var/turf/start = pick(startlocs)
|
||||
var/proj_type = pick(subtypesof(/obj/item/projectile/hallucination))
|
||||
var/proj_type = pick(subtypesof(/obj/projectile/hallucination))
|
||||
feedback_details += "Type: [proj_type]"
|
||||
var/obj/item/projectile/hallucination/H = new proj_type(start)
|
||||
var/obj/projectile/hallucination/H = new proj_type(start)
|
||||
target.playsound_local(start, H.hal_fire_sound, 60, 1)
|
||||
H.hal_target = target
|
||||
H.preparePixelProjectile(target, start)
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
qdel(src)
|
||||
target.Bumped(B)
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/bullet_act(obj/item/projectile/P)
|
||||
/obj/item/reagent_containers/food/drinks/bullet_act(obj/projectile/P)
|
||||
. = ..()
|
||||
if(!(P.nodamage) && P.damage_type == BRUTE && !QDELETED(src))
|
||||
var/atom/T = get_turf(src)
|
||||
@@ -442,7 +442,7 @@
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/bullet_act(obj/item/projectile/P)
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/bullet_act(obj/projectile/P)
|
||||
. = ..()
|
||||
if(!(P.nodamage) && P.damage_type == BRUTE && !QDELETED(src))
|
||||
var/obj/item/trash/can/crushed_can = new /obj/item/trash/can(src.loc)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
..()
|
||||
|
||||
/obj/structure/holohoop/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
if (isitem(AM) && !istype(AM,/obj/item/projectile))
|
||||
if (isitem(AM) && !istype(AM,/obj/projectile))
|
||||
if(prob(50))
|
||||
AM.forceMove(get_turf(src))
|
||||
visible_message("<span class='warning'>Swish! [AM] lands in [src].</span>")
|
||||
|
||||
@@ -91,12 +91,12 @@
|
||||
return connected
|
||||
|
||||
|
||||
/obj/machinery/hydroponics/bullet_act(obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
|
||||
/obj/machinery/hydroponics/bullet_act(obj/projectile/Proj) //Works with the Somatoray to modify plant variables.
|
||||
if(!myseed)
|
||||
return ..()
|
||||
if(istype(Proj , /obj/item/projectile/energy/floramut))
|
||||
if(istype(Proj , /obj/projectile/energy/floramut))
|
||||
mutate()
|
||||
else if(istype(Proj , /obj/item/projectile/energy/florayield))
|
||||
else if(istype(Proj , /obj/projectile/energy/florayield))
|
||||
return myseed.bullet_act(Proj)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -129,8 +129,8 @@
|
||||
|
||||
|
||||
|
||||
/obj/item/seeds/bullet_act(obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
|
||||
if(istype(Proj, /obj/item/projectile/energy/florayield))
|
||||
/obj/item/seeds/bullet_act(obj/projectile/Proj) //Works with the Somatoray to modify plant variables.
|
||||
if(istype(Proj, /obj/projectile/energy/florayield))
|
||||
var/rating = 1
|
||||
if(istype(loc, /obj/machinery/hydroponics))
|
||||
var/obj/machinery/hydroponics/H = loc
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
force = 0 //You can't hit stuff unless wielded
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
force_unwielded = 0
|
||||
force_unwielded = 0
|
||||
force_wielded = 20
|
||||
throwforce = 5
|
||||
throw_speed = 4
|
||||
@@ -84,7 +84,7 @@
|
||||
var/turf/proj_turf = user.loc
|
||||
if(!isturf(proj_turf))
|
||||
return
|
||||
var/obj/item/projectile/destabilizer/D = new /obj/item/projectile/destabilizer(proj_turf)
|
||||
var/obj/projectile/destabilizer/D = new /obj/projectile/destabilizer(proj_turf)
|
||||
for(var/t in trophies)
|
||||
var/obj/item/crusher_trophy/T = t
|
||||
T.on_projectile_fire(D, user)
|
||||
@@ -155,7 +155,7 @@
|
||||
item_state = "crusher[wielded]"
|
||||
|
||||
//destablizing force
|
||||
/obj/item/projectile/destabilizer
|
||||
/obj/projectile/destabilizer
|
||||
name = "destabilizing force"
|
||||
icon_state = "pulse1"
|
||||
nodamage = TRUE
|
||||
@@ -166,11 +166,11 @@
|
||||
log_override = TRUE
|
||||
var/obj/item/twohanded/kinetic_crusher/hammer_synced
|
||||
|
||||
/obj/item/projectile/destabilizer/Destroy()
|
||||
/obj/projectile/destabilizer/Destroy()
|
||||
hammer_synced = null
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/destabilizer/on_hit(atom/target, blocked = FALSE)
|
||||
/obj/projectile/destabilizer/on_hit(atom/target, blocked = FALSE)
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
var/had_effect = (L.has_status_effect(STATUS_EFFECT_CRUSHERMARK)) //used as a boolean
|
||||
@@ -226,7 +226,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/crusher_trophy/proc/on_melee_hit(mob/living/target, mob/living/user) //the target and the user
|
||||
/obj/item/crusher_trophy/proc/on_projectile_fire(obj/item/projectile/destabilizer/marker, mob/living/user) //the projectile fired and the user
|
||||
/obj/item/crusher_trophy/proc/on_projectile_fire(obj/projectile/destabilizer/marker, mob/living/user) //the projectile fired and the user
|
||||
/obj/item/crusher_trophy/proc/on_mark_application(mob/living/target, datum/status_effect/crusher_mark/mark, had_mark) //the target, the mark applied, and if the target had a mark before
|
||||
/obj/item/crusher_trophy/proc/on_mark_detonation(mob/living/target, mob/living/user) //the target and the user
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
/obj/item/crusher_trophy/blaster_tubes/magma_wing/effect_desc()
|
||||
return "mark detonation to make the next destabilizer shot deal <b>[bonus_value]</b> damage"
|
||||
|
||||
/obj/item/crusher_trophy/blaster_tubes/magma_wing/on_projectile_fire(obj/item/projectile/destabilizer/marker, mob/living/user)
|
||||
/obj/item/crusher_trophy/blaster_tubes/magma_wing/on_projectile_fire(obj/projectile/destabilizer/marker, mob/living/user)
|
||||
if(deadly_shot)
|
||||
marker.name = "heated [marker.name]"
|
||||
marker.icon_state = "lava"
|
||||
@@ -400,7 +400,7 @@
|
||||
/obj/item/crusher_trophy/blaster_tubes/effect_desc()
|
||||
return "mark detonation to make the next destabilizer shot deal <b>[bonus_value]</b> damage but move slower"
|
||||
|
||||
/obj/item/crusher_trophy/blaster_tubes/on_projectile_fire(obj/item/projectile/destabilizer/marker, mob/living/user)
|
||||
/obj/item/crusher_trophy/blaster_tubes/on_projectile_fire(obj/projectile/destabilizer/marker, mob/living/user)
|
||||
if(deadly_shot)
|
||||
marker.name = "deadly [marker.name]"
|
||||
marker.icon_state = "chronobolt"
|
||||
|
||||
@@ -405,11 +405,11 @@
|
||||
/obj/item/ammo_casing/magic/hook
|
||||
name = "hook"
|
||||
desc = "A hook."
|
||||
projectile_type = /obj/item/projectile/hook
|
||||
projectile_type = /obj/projectile/hook
|
||||
caliber = "hook"
|
||||
icon_state = "hook"
|
||||
|
||||
/obj/item/projectile/hook
|
||||
/obj/projectile/hook
|
||||
name = "hook"
|
||||
icon_state = "hook"
|
||||
icon = 'icons/obj/lavaland/artefacts.dmi'
|
||||
@@ -421,13 +421,13 @@
|
||||
paralyze = 30
|
||||
var/chain
|
||||
|
||||
/obj/item/projectile/hook/fire(setAngle)
|
||||
/obj/projectile/hook/fire(setAngle)
|
||||
if(firer)
|
||||
chain = firer.Beam(src, icon_state = "chain", time = INFINITY, maxdistance = INFINITY)
|
||||
..()
|
||||
//TODO: root the firer until the chain returns
|
||||
|
||||
/obj/item/projectile/hook/on_hit(atom/target)
|
||||
/obj/projectile/hook/on_hit(atom/target)
|
||||
. = ..()
|
||||
if(ismovableatom(target))
|
||||
var/atom/movable/A = target
|
||||
@@ -438,7 +438,7 @@
|
||||
//TODO: keep the chain beamed to A
|
||||
//TODO: needs a callback to delete the chain
|
||||
|
||||
/obj/item/projectile/hook/Destroy()
|
||||
/obj/projectile/hook/Destroy()
|
||||
qdel(chain)
|
||||
return ..()
|
||||
|
||||
@@ -451,9 +451,9 @@
|
||||
to_chat(user, "<span class='warning'>The [src] isn't ready to fire yet!</span>")
|
||||
|
||||
/obj/item/ammo_casing/magic/hook/bounty
|
||||
projectile_type = /obj/item/projectile/hook/bounty
|
||||
projectile_type = /obj/projectile/hook/bounty
|
||||
|
||||
/obj/item/projectile/hook/bounty
|
||||
/obj/projectile/hook/bounty
|
||||
damage = 0
|
||||
paralyze = 20
|
||||
|
||||
@@ -1069,8 +1069,8 @@
|
||||
/obj/structure/closet/crate/necropolis/colossus
|
||||
name = "colossus chest"
|
||||
|
||||
/obj/structure/closet/crate/necropolis/colossus/bullet_act(obj/item/projectile/P)
|
||||
if(istype(P, /obj/item/projectile/colossus))
|
||||
/obj/structure/closet/crate/necropolis/colossus/bullet_act(obj/projectile/P)
|
||||
if(istype(P, /obj/projectile/colossus))
|
||||
return BULLET_ACT_FORCE_PIERCE
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -132,14 +132,14 @@
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/CanPass(atom/movable/O)
|
||||
if(istype(O, /obj/item/projectile/kinetic))
|
||||
var/obj/item/projectile/kinetic/K = O
|
||||
if(istype(O, /obj/projectile/kinetic))
|
||||
var/obj/projectile/kinetic/K = O
|
||||
if(K.kinetic_gun)
|
||||
for(var/A in K.kinetic_gun.get_modkits())
|
||||
var/obj/item/borg/upgrade/modkit/M = A
|
||||
if(istype(M, /obj/item/borg/upgrade/modkit/minebot_passthrough))
|
||||
return TRUE
|
||||
if(istype(O, /obj/item/projectile/destabilizer))
|
||||
if(istype(O, /obj/projectile/destabilizer))
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/required/gibtonite/bullet_act(obj/item/projectile/P)
|
||||
/obj/item/twohanded/required/gibtonite/bullet_act(obj/projectile/P)
|
||||
GibtoniteReaction(P.firer)
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ Doesn't work on other aliens/AI.*/
|
||||
return FALSE
|
||||
|
||||
user.visible_message("<span class='danger'>[user] spits neurotoxin!", "<span class='alertalien'>You spit neurotoxin.</span>")
|
||||
var/obj/item/projectile/bullet/neurotoxin/A = new /obj/item/projectile/bullet/neurotoxin(user.loc)
|
||||
var/obj/projectile/bullet/neurotoxin/A = new /obj/projectile/bullet/neurotoxin(user.loc)
|
||||
A.preparePixelProjectile(target, user, params)
|
||||
A.fire()
|
||||
user.newtonian_move(get_dir(U, T))
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if(check_mask &&(wear_mask?.flags_cover & PEPPERPROOF))
|
||||
return wear_mask
|
||||
|
||||
/mob/living/carbon/check_projectile_dismemberment(obj/item/projectile/P, def_zone)
|
||||
/mob/living/carbon/check_projectile_dismemberment(obj/projectile/P, def_zone)
|
||||
var/obj/item/bodypart/affecting = get_bodypart(def_zone)
|
||||
if(affecting && affecting.dismemberable && affecting.get_damage() >= (affecting.max_damage - P.dismemberment))
|
||||
affecting.dismember(P.damtype)
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
protection += physiology.armor.getRating(d_type)
|
||||
return protection
|
||||
|
||||
/mob/living/carbon/human/on_hit(obj/item/projectile/P)
|
||||
/mob/living/carbon/human/on_hit(obj/projectile/P)
|
||||
if(dna && dna.species)
|
||||
dna.species.on_hit(P, src)
|
||||
|
||||
|
||||
/mob/living/carbon/human/bullet_act(obj/item/projectile/P, def_zone)
|
||||
/mob/living/carbon/human/bullet_act(obj/projectile/P, def_zone)
|
||||
if(dna && dna.species)
|
||||
var/spec_return = dna.species.bullet_act(P, src)
|
||||
if(spec_return)
|
||||
|
||||
@@ -1606,15 +1606,15 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_BRAIN, damage_amount)
|
||||
return 1
|
||||
|
||||
/datum/species/proc/on_hit(obj/item/projectile/P, mob/living/carbon/human/H)
|
||||
/datum/species/proc/on_hit(obj/projectile/P, mob/living/carbon/human/H)
|
||||
// called when hit by a projectile
|
||||
switch(P.type)
|
||||
if(/obj/item/projectile/energy/floramut) // overwritten by plants/pods
|
||||
if(/obj/projectile/energy/floramut) // overwritten by plants/pods
|
||||
H.show_message("<span class='notice'>The radiation beam dissipates harmlessly through your body.</span>")
|
||||
if(/obj/item/projectile/energy/florayield)
|
||||
if(/obj/projectile/energy/florayield)
|
||||
H.show_message("<span class='notice'>The radiation beam dissipates harmlessly through your body.</span>")
|
||||
|
||||
/datum/species/proc/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H)
|
||||
/datum/species/proc/bullet_act(obj/projectile/P, mob/living/carbon/human/H)
|
||||
// called before a projectile hit
|
||||
return 0
|
||||
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
new /obj/item/stack/ore/glass(get_turf(H))
|
||||
qdel(H)
|
||||
|
||||
/datum/species/golem/sand/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H)
|
||||
/datum/species/golem/sand/bullet_act(obj/projectile/P, mob/living/carbon/human/H)
|
||||
if(!(P.original == H && P.firer == H))
|
||||
if(P.flag == "bullet" || P.flag == "bomb")
|
||||
playsound(H, 'sound/effects/shovel_dig.ogg', 70, TRUE)
|
||||
@@ -386,7 +386,7 @@
|
||||
new /obj/item/shard(get_turf(H))
|
||||
qdel(H)
|
||||
|
||||
/datum/species/golem/glass/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H)
|
||||
/datum/species/golem/glass/bullet_act(obj/projectile/P, mob/living/carbon/human/H)
|
||||
if(!(P.original == H && P.firer == H)) //self-shots don't reflect
|
||||
if(P.flag == "laser" || P.flag == "energy")
|
||||
H.visible_message("<span class='danger'>The [P.name] gets reflected by [H]'s glass skin!</span>", \
|
||||
@@ -443,7 +443,7 @@
|
||||
if(world.time > last_teleport + teleport_cooldown && user != H)
|
||||
reactive_teleport(H)
|
||||
|
||||
/datum/species/golem/bluespace/on_hit(obj/item/projectile/P, mob/living/carbon/human/H)
|
||||
/datum/species/golem/bluespace/on_hit(obj/projectile/P, mob/living/carbon/human/H)
|
||||
..()
|
||||
if(world.time > last_teleport + teleport_cooldown)
|
||||
reactive_teleport(H)
|
||||
@@ -542,7 +542,7 @@
|
||||
new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
|
||||
last_banana = world.time
|
||||
|
||||
/datum/species/golem/bananium/on_hit(obj/item/projectile/P, mob/living/carbon/human/H)
|
||||
/datum/species/golem/bananium/on_hit(obj/projectile/P, mob/living/carbon/human/H)
|
||||
..()
|
||||
if(world.time > last_banana + banana_cooldown)
|
||||
new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
|
||||
@@ -826,7 +826,7 @@
|
||||
var/last_gong_time = 0
|
||||
var/gong_cooldown = 150
|
||||
|
||||
/datum/species/golem/bronze/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H)
|
||||
/datum/species/golem/bronze/bullet_act(obj/projectile/P, mob/living/carbon/human/H)
|
||||
if(!(world.time > last_gong_time + gong_cooldown))
|
||||
return ..()
|
||||
if(P.flag == "bullet" || P.flag == "bomb")
|
||||
@@ -848,7 +848,7 @@
|
||||
if(world.time > last_gong_time + gong_cooldown)
|
||||
gong(H)
|
||||
|
||||
/datum/species/golem/bronze/on_hit(obj/item/projectile/P, mob/living/carbon/human/H)
|
||||
/datum/species/golem/bronze/on_hit(obj/projectile/P, mob/living/carbon/human/H)
|
||||
..()
|
||||
if(world.time > last_gong_time + gong_cooldown)
|
||||
gong(H)
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
|
||||
return 1
|
||||
|
||||
/datum/species/pod/on_hit(obj/item/projectile/P, mob/living/carbon/human/H)
|
||||
/datum/species/pod/on_hit(obj/projectile/P, mob/living/carbon/human/H)
|
||||
switch(P.type)
|
||||
if(/obj/item/projectile/energy/floramut)
|
||||
if(/obj/projectile/energy/floramut)
|
||||
if(prob(15))
|
||||
H.rad_act(rand(30,80))
|
||||
H.Paralyze(100)
|
||||
@@ -56,5 +56,5 @@
|
||||
else
|
||||
H.adjustFireLoss(rand(5,15))
|
||||
H.show_message("<span class='userdanger'>The radiation beam singes you!</span>")
|
||||
if(/obj/item/projectile/energy/florayield)
|
||||
if(/obj/projectile/energy/florayield)
|
||||
H.set_nutrition(min(H.nutrition+30, NUTRITION_LEVEL_FULL))
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
C.fully_replace_character_name("[pick(GLOB.nightmare_names)]")
|
||||
|
||||
/datum/species/shadow/nightmare/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H)
|
||||
/datum/species/shadow/nightmare/bullet_act(obj/projectile/P, mob/living/carbon/human/H)
|
||||
var/turf/T = H.loc
|
||||
if(istype(T))
|
||||
var/light_amount = T.get_lumcount()
|
||||
|
||||
@@ -393,8 +393,8 @@
|
||||
if((W.force) && (!target) && (W.damtype != STAMINA) )
|
||||
retaliate(user)
|
||||
|
||||
/mob/living/carbon/monkey/bullet_act(obj/item/projectile/Proj)
|
||||
if(istype(Proj , /obj/item/projectile/beam)||istype(Proj, /obj/item/projectile/bullet))
|
||||
/mob/living/carbon/monkey/bullet_act(obj/projectile/Proj)
|
||||
if(istype(Proj , /obj/projectile/beam)||istype(Proj, /obj/projectile/bullet))
|
||||
if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))
|
||||
if(!Proj.nodamage && Proj.damage < src.health && isliving(Proj.firer))
|
||||
retaliate(Proj.firer)
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
return FALSE
|
||||
/mob/living/proc/is_pepper_proof(check_head = TRUE, check_mask = TRUE)
|
||||
return FALSE
|
||||
/mob/living/proc/on_hit(obj/item/projectile/P)
|
||||
/mob/living/proc/on_hit(obj/projectile/P)
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
/mob/living/bullet_act(obj/item/projectile/P, def_zone)
|
||||
/mob/living/bullet_act(obj/projectile/P, def_zone)
|
||||
var/armor = run_armor_check(def_zone, P.flag, "","",P.armour_penetration)
|
||||
var/on_hit_state = P.on_hit(src, armor)
|
||||
if(!P.nodamage && on_hit_state != BULLET_ACT_BLOCK)
|
||||
@@ -53,7 +53,7 @@
|
||||
check_projectile_dismemberment(P, def_zone)
|
||||
return on_hit_state ? BULLET_ACT_HIT : BULLET_ACT_BLOCK
|
||||
|
||||
/mob/living/proc/check_projectile_dismemberment(obj/item/projectile/P, def_zone)
|
||||
/mob/living/proc/check_projectile_dismemberment(obj/projectile/P, def_zone)
|
||||
return 0
|
||||
|
||||
/obj/item/proc/get_volume_by_throwforce_and_or_w_class()
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/mob/living/CanPass(atom/movable/mover, turf/target)
|
||||
if((mover.pass_flags & PASSMOB))
|
||||
return TRUE
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = mover
|
||||
if(istype(mover, /obj/projectile))
|
||||
var/obj/projectile/P = mover
|
||||
return !P.can_hit_target(src, P.permutated, src == P.original, TRUE)
|
||||
if(mover.throwing)
|
||||
return (!density || !(mobility_flags & MOBILITY_STAND) || (mover.throwing.thrower == src && !ismob(mover)))
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/ai/bullet_act(obj/item/projectile/Proj)
|
||||
/mob/living/silicon/ai/bullet_act(obj/projectile/Proj)
|
||||
. = ..(Proj)
|
||||
updatehealth()
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
visible_message("<span class='danger'>[user] stomps on [src]!.</span>")
|
||||
take_holo_damage(2)
|
||||
|
||||
/mob/living/silicon/pai/bullet_act(obj/item/projectile/Proj)
|
||||
/mob/living/silicon/pai/bullet_act(obj/projectile/Proj)
|
||||
if(Proj.stun)
|
||||
fold_in(force = TRUE)
|
||||
src.visible_message("<span class='warning'>The electrically-charged projectile disrupts [src]'s holomatrix, forcing [src] to fold in!</span>")
|
||||
|
||||
@@ -181,7 +181,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
|
||||
if (stat != DEAD)
|
||||
adjustBruteLoss(30)
|
||||
|
||||
/mob/living/silicon/robot/bullet_act(var/obj/item/projectile/Proj, def_zone)
|
||||
/mob/living/silicon/robot/bullet_act(obj/projectile/Proj, def_zone)
|
||||
. = ..()
|
||||
updatehealth()
|
||||
if(prob(75) && Proj.damage > 0)
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
M.visible_message("<span class='boldwarning'>[M] is thrown off of [src]!</span>")
|
||||
flash_act(affect_silicon = 1)
|
||||
|
||||
/mob/living/silicon/bullet_act(obj/item/projectile/Proj, def_zone)
|
||||
/mob/living/silicon/bullet_act(obj/projectile/Proj, def_zone)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_BULLET_ACT, Proj, def_zone)
|
||||
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
adjustBruteLoss(Proj.damage)
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
apply_damage(damage, damagetype, null, getarmor(null, armorcheck))
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/bullet_act(obj/item/projectile/Proj)
|
||||
/mob/living/simple_animal/bullet_act(obj/projectile/Proj)
|
||||
apply_damage(Proj.damage, Proj.damage_type)
|
||||
Proj.on_hit(src)
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
baton_type = /obj/item/toy/sword
|
||||
weapon_force = 0
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/grievous/bullet_act(obj/item/projectile/P)
|
||||
/mob/living/simple_animal/bot/secbot/grievous/bullet_act(obj/projectile/P)
|
||||
visible_message("<span class='warning'>[src] deflects [P] with its energy swords!</span>")
|
||||
playsound(src, 'sound/weapons/blade1.ogg', 50, TRUE)
|
||||
return BULLET_ACT_BLOCK
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
do_sparks(5, TRUE, src)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/bullet_act(obj/item/projectile/Proj)
|
||||
/mob/living/simple_animal/bot/bullet_act(obj/projectile/Proj)
|
||||
if(Proj && (Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
if(prob(75) && Proj.damage > 0)
|
||||
do_sparks(5, TRUE, src)
|
||||
|
||||
@@ -1,124 +1,124 @@
|
||||
/mob/living/simple_animal/bot/secbot/ed209
|
||||
name = "\improper ED-209 Security Robot"
|
||||
desc = "A security robot. He looks less than thrilled."
|
||||
icon_state = "ed209"
|
||||
density = TRUE
|
||||
health = 100
|
||||
maxHealth = 100
|
||||
obj_damage = 60
|
||||
environment_smash = ENVIRONMENT_SMASH_WALLS //Walls can't stop THE LAW
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
|
||||
model = "ED-209"
|
||||
window_id = "autoed209"
|
||||
window_name = "Automatic Security Unit v2.6"
|
||||
ranged = TRUE
|
||||
var/lastfired = 0
|
||||
var/shot_delay = 15
|
||||
var/shoot_sound = 'sound/weapons/laser.ogg'
|
||||
var/projectile = /obj/item/projectile/beam/disabler
|
||||
var/fair_market_projectile = /obj/item/projectile/bullet/c38 // For shooting the worst scumbags of all: the poor
|
||||
do_footstep = TRUE
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/Initialize(mapload)
|
||||
. = ..()
|
||||
set_weapon() //giving it the right projectile and firing sound.
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/bot_reset()
|
||||
..()
|
||||
set_weapon()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/set_custom_texts()
|
||||
text_hack = "You disable [name]'s combat inhibitor."
|
||||
text_dehack = "You restore [name]'s combat inhibitor."
|
||||
text_dehack_fail = "[name] ignores your attempts to restrict him!"
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/emag_act(mob/user)
|
||||
..()
|
||||
icon_state = "ed209[on]"
|
||||
set_weapon()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/handle_automated_action()
|
||||
var/judgement_criteria = judgement_criteria()
|
||||
var/list/targets = list()
|
||||
for(var/mob/living/carbon/C in view(7,src)) //Let's find us a target
|
||||
var/threatlevel = 0
|
||||
if(C.incapacitated())
|
||||
continue
|
||||
threatlevel = C.assess_threat(judgement_criteria, weaponcheck=CALLBACK(src, .proc/check_for_weapons))
|
||||
//speak(C.real_name + text(": threat: []", threatlevel))
|
||||
if(threatlevel < 4 )
|
||||
continue
|
||||
var/dst = get_dist(src, C)
|
||||
if(dst <= 1 || dst > 7)
|
||||
continue
|
||||
targets += C
|
||||
if(targets.len>0)
|
||||
var/mob/living/carbon/t = pick(targets)
|
||||
if(t.stat != DEAD && !t.handcuffed) //we don't shoot people who are dead, cuffed or lying down.
|
||||
shootAt(t)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/proc/set_weapon() //used to update the projectile type and firing sound
|
||||
shoot_sound = 'sound/weapons/laser.ogg'
|
||||
if(emagged == 2)
|
||||
projectile = /obj/item/projectile/beam
|
||||
else
|
||||
projectile = /obj/item/projectile/beam/disabler
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/proc/shootAt(mob/target)
|
||||
if(world.time <= lastfired + shot_delay)
|
||||
return
|
||||
lastfired = world.time
|
||||
var/turf/T = loc
|
||||
var/turf/U = get_turf(target)
|
||||
if(!U)
|
||||
return
|
||||
if(!isturf(T))
|
||||
return
|
||||
|
||||
if(!projectile)
|
||||
return
|
||||
|
||||
var/obj/item/projectile/A = new projectile (loc)
|
||||
playsound(src, shoot_sound, 50, TRUE)
|
||||
A.preparePixelProjectile(target, src)
|
||||
A.fire()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/emp_act(severity)
|
||||
if(severity == 2 && prob(70))
|
||||
severity = 1
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if (severity >= 2)
|
||||
new /obj/effect/temp_visual/emp(loc)
|
||||
var/list/mob/living/carbon/targets = new
|
||||
for(var/mob/living/carbon/C in view(12,src))
|
||||
if(C.stat==DEAD)
|
||||
continue
|
||||
targets += C
|
||||
if(targets.len)
|
||||
if(prob(50))
|
||||
var/mob/toshoot = pick(targets)
|
||||
if(toshoot)
|
||||
targets-=toshoot
|
||||
if(prob(50) && emagged < 2)
|
||||
emagged = 2
|
||||
set_weapon()
|
||||
shootAt(toshoot)
|
||||
emagged = FALSE
|
||||
set_weapon()
|
||||
else
|
||||
shootAt(toshoot)
|
||||
else if(prob(50))
|
||||
if(targets.len)
|
||||
var/mob/toarrest = pick(targets)
|
||||
if(toarrest)
|
||||
target = toarrest
|
||||
mode = BOT_HUNT
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/RangedAttack(atom/A)
|
||||
if(!on)
|
||||
return
|
||||
shootAt(A)
|
||||
/mob/living/simple_animal/bot/secbot/ed209
|
||||
name = "\improper ED-209 Security Robot"
|
||||
desc = "A security robot. He looks less than thrilled."
|
||||
icon_state = "ed209"
|
||||
density = TRUE
|
||||
health = 100
|
||||
maxHealth = 100
|
||||
obj_damage = 60
|
||||
environment_smash = ENVIRONMENT_SMASH_WALLS //Walls can't stop THE LAW
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
|
||||
model = "ED-209"
|
||||
window_id = "autoed209"
|
||||
window_name = "Automatic Security Unit v2.6"
|
||||
ranged = TRUE
|
||||
var/lastfired = 0
|
||||
var/shot_delay = 15
|
||||
var/shoot_sound = 'sound/weapons/laser.ogg'
|
||||
var/projectile = /obj/projectile/beam/disabler
|
||||
var/fair_market_projectile = /obj/projectile/bullet/c38 // For shooting the worst scumbags of all: the poor
|
||||
do_footstep = TRUE
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/Initialize(mapload)
|
||||
. = ..()
|
||||
set_weapon() //giving it the right projectile and firing sound.
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/bot_reset()
|
||||
..()
|
||||
set_weapon()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/set_custom_texts()
|
||||
text_hack = "You disable [name]'s combat inhibitor."
|
||||
text_dehack = "You restore [name]'s combat inhibitor."
|
||||
text_dehack_fail = "[name] ignores your attempts to restrict him!"
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/emag_act(mob/user)
|
||||
..()
|
||||
icon_state = "ed209[on]"
|
||||
set_weapon()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/handle_automated_action()
|
||||
var/judgement_criteria = judgement_criteria()
|
||||
var/list/targets = list()
|
||||
for(var/mob/living/carbon/C in view(7,src)) //Let's find us a target
|
||||
var/threatlevel = 0
|
||||
if(C.incapacitated())
|
||||
continue
|
||||
threatlevel = C.assess_threat(judgement_criteria, weaponcheck=CALLBACK(src, .proc/check_for_weapons))
|
||||
//speak(C.real_name + text(": threat: []", threatlevel))
|
||||
if(threatlevel < 4 )
|
||||
continue
|
||||
var/dst = get_dist(src, C)
|
||||
if(dst <= 1 || dst > 7)
|
||||
continue
|
||||
targets += C
|
||||
if(targets.len>0)
|
||||
var/mob/living/carbon/t = pick(targets)
|
||||
if(t.stat != DEAD && !t.handcuffed) //we don't shoot people who are dead, cuffed or lying down.
|
||||
shootAt(t)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/proc/set_weapon() //used to update the projectile type and firing sound
|
||||
shoot_sound = 'sound/weapons/laser.ogg'
|
||||
if(emagged == 2)
|
||||
projectile = /obj/projectile/beam
|
||||
else
|
||||
projectile = /obj/projectile/beam/disabler
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/proc/shootAt(mob/target)
|
||||
if(world.time <= lastfired + shot_delay)
|
||||
return
|
||||
lastfired = world.time
|
||||
var/turf/T = loc
|
||||
var/turf/U = get_turf(target)
|
||||
if(!U)
|
||||
return
|
||||
if(!isturf(T))
|
||||
return
|
||||
|
||||
if(!projectile)
|
||||
return
|
||||
|
||||
var/obj/projectile/A = new projectile (loc)
|
||||
playsound(src, shoot_sound, 50, TRUE)
|
||||
A.preparePixelProjectile(target, src)
|
||||
A.fire()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/emp_act(severity)
|
||||
if(severity == 2 && prob(70))
|
||||
severity = 1
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if (severity >= 2)
|
||||
new /obj/effect/temp_visual/emp(loc)
|
||||
var/list/mob/living/carbon/targets = new
|
||||
for(var/mob/living/carbon/C in view(12,src))
|
||||
if(C.stat==DEAD)
|
||||
continue
|
||||
targets += C
|
||||
if(targets.len)
|
||||
if(prob(50))
|
||||
var/mob/toshoot = pick(targets)
|
||||
if(toshoot)
|
||||
targets-=toshoot
|
||||
if(prob(50) && emagged < 2)
|
||||
emagged = 2
|
||||
set_weapon()
|
||||
shootAt(toshoot)
|
||||
emagged = FALSE
|
||||
set_weapon()
|
||||
else
|
||||
shootAt(toshoot)
|
||||
else if(prob(50))
|
||||
if(targets.len)
|
||||
var/mob/toarrest = pick(targets)
|
||||
if(toarrest)
|
||||
target = toarrest
|
||||
mode = BOT_HUNT
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/ed209/RangedAttack(atom/A)
|
||||
if(!on)
|
||||
return
|
||||
shootAt(A)
|
||||
|
||||
@@ -135,8 +135,8 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
|
||||
playsound(src, 'sound/machines/honkbot_evil_laugh.ogg', 75, TRUE, -1) // evil laughter
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bot/honkbot/bullet_act(obj/item/projectile/Proj)
|
||||
if((istype(Proj,/obj/item/projectile/beam)) || (istype(Proj,/obj/item/projectile/bullet) && (Proj.damage_type == BURN))||(Proj.damage_type == BRUTE) && (!Proj.nodamage && Proj.damage < health && ishuman(Proj.firer)))
|
||||
/mob/living/simple_animal/bot/honkbot/bullet_act(obj/projectile/Proj)
|
||||
if((istype(Proj,/obj/projectile/beam)) || (istype(Proj,/obj/projectile/bullet) && (Proj.damage_type == BURN))||(Proj.damage_type == BRUTE) && (!Proj.nodamage && Proj.damage < health && ishuman(Proj.firer)))
|
||||
retaliate(Proj.firer)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
wires.cut_random()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/bullet_act(obj/item/projectile/Proj)
|
||||
/mob/living/simple_animal/bot/mulebot/bullet_act(obj/projectile/Proj)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(prob(50) && !isnull(load))
|
||||
|
||||
@@ -222,8 +222,8 @@ Auto Patrol: []"},
|
||||
declare_arrests = FALSE
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/bullet_act(obj/item/projectile/Proj)
|
||||
if(istype(Proj , /obj/item/projectile/beam)||istype(Proj, /obj/item/projectile/bullet))
|
||||
/mob/living/simple_animal/bot/secbot/bullet_act(obj/projectile/Proj)
|
||||
if(istype(Proj , /obj/projectile/beam)||istype(Proj, /obj/projectile/bullet))
|
||||
if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))
|
||||
if(!Proj.nodamage && Proj.damage < src.health && ishuman(Proj.firer))
|
||||
retaliate(Proj.firer)
|
||||
|
||||
@@ -144,8 +144,8 @@
|
||||
AIStatus = AI_ON
|
||||
environment_smash = ENVIRONMENT_SMASH_STRUCTURES //only token destruction, don't smash the cult wall NO STOP
|
||||
|
||||
/mob/living/simple_animal/hostile/construct/armored/bullet_act(obj/item/projectile/P)
|
||||
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
|
||||
/mob/living/simple_animal/hostile/construct/armored/bullet_act(obj/projectile/P)
|
||||
if(istype(P, /obj/projectile/energy) || istype(P, /obj/projectile/beam))
|
||||
var/reflectchance = 40 - round(P.damage/3)
|
||||
if(prob(reflectchance))
|
||||
apply_damage(P.damage * 0.5, P.damage_type)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//Ranged
|
||||
/obj/item/projectile/guardian
|
||||
/obj/projectile/guardian
|
||||
name = "crystal spray"
|
||||
icon_state = "guardian"
|
||||
damage = 5
|
||||
@@ -12,7 +12,7 @@
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 10
|
||||
damage_coeff = list(BRUTE = 0.9, BURN = 0.9, TOX = 0.9, CLONE = 0.9, STAMINA = 0, OXY = 0.9)
|
||||
projectiletype = /obj/item/projectile/guardian
|
||||
projectiletype = /obj/projectile/guardian
|
||||
ranged_cooldown_time = 1 //fast!
|
||||
projectilesound = 'sound/effects/hit_on_shattered_glass.ogg'
|
||||
ranged = 1
|
||||
@@ -54,8 +54,8 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/ranged/Shoot(atom/targeted_atom)
|
||||
. = ..()
|
||||
if(istype(., /obj/item/projectile))
|
||||
var/obj/item/projectile/P = .
|
||||
if(istype(., /obj/projectile))
|
||||
var/obj/projectile/P = .
|
||||
if(namedatum)
|
||||
P.color = namedatum.colour
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
ranged = 1
|
||||
retreat_distance = 5
|
||||
minimum_distance = 5
|
||||
projectiletype = /obj/item/projectile/neurotox
|
||||
projectiletype = /obj/projectile/neurotox
|
||||
projectilesound = 'sound/weapons/pierce.ogg'
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
move_to_delay = 4
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/xeno = 4,
|
||||
/obj/item/stack/sheet/animalhide/xeno = 1)
|
||||
projectiletype = /obj/item/projectile/neurotox
|
||||
projectiletype = /obj/projectile/neurotox
|
||||
projectilesound = 'sound/weapons/pierce.ogg'
|
||||
status_flags = 0
|
||||
unique_name = 0
|
||||
@@ -141,7 +141,7 @@
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
gold_core_spawnable = NO_SPAWN
|
||||
|
||||
/obj/item/projectile/neurotox
|
||||
/obj/projectile/neurotox
|
||||
name = "neurotoxin"
|
||||
damage = 30
|
||||
icon_state = "toxin"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
health = 1000
|
||||
maxHealth = 1000
|
||||
loot = list(/obj/effect/temp_visual/paperwiz_dying)
|
||||
projectiletype = /obj/item/projectile/temp
|
||||
projectiletype = /obj/projectile/temp
|
||||
projectilesound = 'sound/weapons/emitter.ogg'
|
||||
attack_sound = 'sound/hallucinations/growl1.ogg'
|
||||
var/list/copies = list()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "dark_wizard"
|
||||
icon_living = "dark_wizard"
|
||||
move_to_delay = 10
|
||||
projectiletype = /obj/item/projectile/temp/earth_bolt
|
||||
projectiletype = /obj/projectile/temp/earth_bolt
|
||||
projectilesound = 'sound/magic/ethereal_enter.ogg'
|
||||
ranged = TRUE
|
||||
ranged_message = "earth bolts"
|
||||
@@ -28,11 +28,11 @@
|
||||
weather_immunities = list("lava","ash")
|
||||
minbodytemp = 0
|
||||
maxbodytemp = INFINITY
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
loot = list(/obj/effect/decal/remains/human)
|
||||
del_on_death = TRUE
|
||||
|
||||
/obj/item/projectile/temp/earth_bolt
|
||||
/obj/projectile/temp/earth_bolt
|
||||
name = "earth bolt"
|
||||
icon_state = "declone"
|
||||
damage = 4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/projectile/hivebotbullet
|
||||
/obj/projectile/hivebotbullet
|
||||
damage = 10
|
||||
damage_type = BRUTE
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
attacktext = "claws"
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
projectilesound = 'sound/weapons/gun/pistol/shot.ogg'
|
||||
projectiletype = /obj/item/projectile/hivebotbullet
|
||||
projectiletype = /obj/projectile/hivebotbullet
|
||||
faction = list("hivebot")
|
||||
check_friendly_fire = 1
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
FindTarget(list(user), 1)
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/bullet_act(obj/item/projectile/P)
|
||||
/mob/living/simple_animal/hostile/bullet_act(obj/projectile/P)
|
||||
if(stat == CONSCIOUS && !target && AIStatus != AI_OFF && !client)
|
||||
if(P.firer && get_dist(src, P.firer) <= aggro_vision_range)
|
||||
FindTarget(list(P.firer), 1)
|
||||
@@ -409,7 +409,7 @@
|
||||
playsound(src, projectilesound, 100, TRUE)
|
||||
casing.fire_casing(targeted_atom, src, null, null, null, ran_zone(), 0, src)
|
||||
else if(projectiletype)
|
||||
var/obj/item/projectile/P = new projectiletype(startloc)
|
||||
var/obj/projectile/P = new projectiletype(startloc)
|
||||
playsound(src, projectilesound, 100, TRUE)
|
||||
P.starting = startloc
|
||||
P.firer = src
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
maxHealth = 300
|
||||
health = 300
|
||||
ranged = TRUE
|
||||
projectiletype = /obj/item/projectile/leaper
|
||||
projectiletype = /obj/projectile/leaper
|
||||
projectilesound = 'sound/weapons/pierce.ogg'
|
||||
ranged_cooldown_time = 30
|
||||
pixel_x = -16
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
do_footstep = TRUE
|
||||
|
||||
/obj/item/projectile/leaper
|
||||
/obj/projectile/leaper
|
||||
name = "leaper bubble"
|
||||
icon_state = "leaper"
|
||||
paralyze = 50
|
||||
@@ -38,7 +38,7 @@
|
||||
nondirectional_sprite = TRUE
|
||||
impact_effect_type = /obj/effect/temp_visual/leaper_projectile_impact
|
||||
|
||||
/obj/item/projectile/leaper/on_hit(atom/target, blocked = FALSE)
|
||||
/obj/projectile/leaper/on_hit(atom/target, blocked = FALSE)
|
||||
..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
@@ -48,7 +48,7 @@
|
||||
var/mob/living/simple_animal/L = target
|
||||
L.adjustHealth(25)
|
||||
|
||||
/obj/item/projectile/leaper/on_range()
|
||||
/obj/projectile/leaper/on_range()
|
||||
var/turf/T = get_turf(src)
|
||||
..()
|
||||
new /obj/structure/leaper_bubble(T)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
speak_emote = list("chitters")
|
||||
attack_sound = 'sound/weapons/bladeslice.ogg'
|
||||
ranged_cooldown_time = 60
|
||||
projectiletype = /obj/item/projectile/mega_arachnid
|
||||
projectiletype = /obj/projectile/mega_arachnid
|
||||
projectilesound = 'sound/weapons/pierce.ogg'
|
||||
alpha = 50
|
||||
|
||||
@@ -48,13 +48,13 @@
|
||||
..()
|
||||
alpha = 50
|
||||
|
||||
/obj/item/projectile/mega_arachnid
|
||||
/obj/projectile/mega_arachnid
|
||||
name = "flesh snare"
|
||||
nodamage = TRUE
|
||||
damage = 0
|
||||
icon_state = "tentacle_end"
|
||||
|
||||
/obj/item/projectile/mega_arachnid/on_hit(atom/target, blocked = FALSE)
|
||||
/obj/projectile/mega_arachnid/on_hit(atom/target, blocked = FALSE)
|
||||
if(iscarbon(target) && blocked < 100)
|
||||
var/obj/item/restraints/legcuffs/beartrap/mega_arachnid/B = new /obj/item/restraints/legcuffs/beartrap/mega_arachnid(get_turf(target))
|
||||
B.Crossed(target)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
aggro_vision_range = 15
|
||||
ranged = TRUE
|
||||
ranged_cooldown_time = 10
|
||||
projectiletype = /obj/item/projectile/seedling
|
||||
projectiletype = /obj/projectile/seedling
|
||||
projectilesound = 'sound/weapons/pierce.ogg'
|
||||
robust_searching = TRUE
|
||||
stat_attack = UNCONSCIOUS
|
||||
@@ -35,7 +35,7 @@
|
||||
var/mob/living/beam_debuff_target
|
||||
var/solar_beam_identifier = 0
|
||||
|
||||
/obj/item/projectile/seedling
|
||||
/obj/projectile/seedling
|
||||
name = "solar energy"
|
||||
icon_state = "seedling"
|
||||
damage = 10
|
||||
@@ -47,7 +47,7 @@
|
||||
hitsound_wall = 'sound/weapons/effects/searwall.ogg'
|
||||
nondirectional_sprite = TRUE
|
||||
|
||||
/obj/item/projectile/seedling/Bump(atom/A)//Stops seedlings from destroying other jungle mobs through FF
|
||||
/obj/projectile/seedling/Bump(atom/A)//Stops seedlings from destroying other jungle mobs through FF
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
if("jungle" in L.faction)
|
||||
@@ -181,7 +181,7 @@
|
||||
Shoot(target)
|
||||
return
|
||||
var/turf/our_turf = get_turf(src)
|
||||
var/obj/item/projectile/seedling/readied_shot = new /obj/item/projectile/seedling(our_turf)
|
||||
var/obj/projectile/seedling/readied_shot = new /obj/projectile/seedling(our_turf)
|
||||
readied_shot.preparePixelProjectile(target, src, null, rand(-10, 10))
|
||||
readied_shot.fire()
|
||||
playsound(src, projectilesound, 100, TRUE)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user