diff --git a/code/__DEFINES/dcs/signals/atom/mob/living/signals_human.dm b/code/__DEFINES/dcs/signals/atom/mob/living/signals_human.dm index b38339d1af17..0a9e00b59e04 100644 --- a/code/__DEFINES/dcs/signals/atom/mob/living/signals_human.dm +++ b/code/__DEFINES/dcs/signals/atom/mob/living/signals_human.dm @@ -12,7 +12,7 @@ #define COMSIG_HUMAN_REVIVED "human_revived" /// From /mob/living/carbon/human/bullet_act #define COMSIG_HUMAN_PRE_BULLET_ACT "human_pre_bullet_act" -/// From /mob/living/carbon/human/bullet_act(): (damage_result, ammo_flags, obj/item/projectile/P) +/// From /mob/living/carbon/human/bullet_act(): (damage_result, ammo_flags, obj/projectile/P) #define COMSIG_HUMAN_BULLET_ACT "human_bullet_act" #define COMPONENT_CANCEL_BULLET_ACT (1<<0) diff --git a/code/__DEFINES/dcs/signals/atom/signals_projectile.dm b/code/__DEFINES/dcs/signals/atom/signals_projectile.dm index 861f351a1f58..46014d5351d5 100644 --- a/code/__DEFINES/dcs/signals/atom/signals_projectile.dm +++ b/code/__DEFINES/dcs/signals/atom/signals_projectile.dm @@ -15,17 +15,17 @@ #define COMSIG_AMMO_POINT_BLANK "ammo_point_blank" #define COMPONENT_CANCEL_AMMO_POINT_BLANK (1<<0) -/// From /obj/item/projectile/handle_mob(): (mob/living/target) +/// From /obj/projectile/handle_mob(): (mob/living/target) #define COMSIG_BULLET_PRE_HANDLE_MOB "bullet_pre_handle_mob" -/// From /obj/item/projectile/handle_mob(): (mob/living/target) +/// From /obj/projectile/handle_mob(): (mob/living/target) #define COMSIG_BULLET_POST_HANDLE_MOB "bullet_post_handle_mob" -/// From /obj/item/projectile/handle_obj(): (obj/target, did_hit) +/// From /obj/projectile/handle_obj(): (obj/target, did_hit) #define COMSIG_BULLET_POST_HANDLE_OBJ "bullet_post_handle_obj" -/// From /obj/item/projectile/handle_obj(): (obj/target) +/// From /obj/projectile/handle_obj(): (obj/target) #define COMSIG_BULLET_PRE_HANDLE_OBJ "bullet_pre_handle_obj" -/// From /obj/item/projectile/scan_a_turf(): (turf/target) +/// From /obj/projectile/scan_a_turf(): (turf/target) #define COMSIG_BULLET_POST_HANDLE_TURF "bullet_post_handle_turf" -/// From /obj/item/projectile/scan_a_turf(): (turf/target) +/// From /obj/projectile/scan_a_turf(): (turf/target) #define COMSIG_BULLET_PRE_HANDLE_TURF "bullet_pre_handle_turf" #define COMPONENT_BULLET_PASS_THROUGH (1<<0) #define COMSIG_BULLET_TERMINAL "bullet_terminal" diff --git a/code/controllers/subsystem/projectiles.dm b/code/controllers/subsystem/projectiles.dm index 075a4f7facc5..a23303ea282d 100644 --- a/code/controllers/subsystem/projectiles.dm +++ b/code/controllers/subsystem/projectiles.dm @@ -6,11 +6,11 @@ SUBSYSTEM_DEF(projectiles) priority = SS_PRIORITY_PROJECTILES /// List of projectiles handled by the subsystem - VAR_PRIVATE/list/obj/item/projectile/projectiles + VAR_PRIVATE/list/obj/projectile/projectiles /// List of projectiles on hold due to sleeping - VAR_PRIVATE/list/obj/item/projectile/sleepers + VAR_PRIVATE/list/obj/projectile/sleepers /// List of projectiles handled this controller firing - VAR_PRIVATE/list/obj/item/projectile/flying + VAR_PRIVATE/list/obj/projectile/flying /* * Scheduling notes: @@ -42,14 +42,14 @@ SUBSYSTEM_DEF(projectiles) flying = projectiles.Copy() flying -= sleepers while(flying.len) - var/obj/item/projectile/projectile = flying[flying.len] + var/obj/projectile/projectile = flying[flying.len] flying.len-- var/delta_time = wait * world.tick_lag * (1 SECONDS) handle_projectile_flight(projectile, delta_time) if(MC_TICK_CHECK) return -/datum/controller/subsystem/projectiles/proc/handle_projectile_flight(obj/item/projectile/projectile, delta_time) +/datum/controller/subsystem/projectiles/proc/handle_projectile_flight(obj/projectile/projectile, delta_time) PRIVATE_PROC(TRUE) set waitfor = FALSE // We're in double-check land here because there ARE rulebreakers. @@ -66,15 +66,15 @@ SUBSYSTEM_DEF(projectiles) stop_projectile(projectile) // Ideally this was already done thru process() qdel(projectile) -/datum/controller/subsystem/projectiles/proc/process_wrapper(obj/item/projectile/projectile, delta_time) +/datum/controller/subsystem/projectiles/proc/process_wrapper(obj/projectile/projectile, delta_time) // set waitfor=TRUE . = PROC_RETURN_SLEEP . = projectile.process(delta_time) sleepers -= projectile // Recover from sleep -/datum/controller/subsystem/projectiles/proc/queue_projectile(obj/item/projectile/projectile) +/datum/controller/subsystem/projectiles/proc/queue_projectile(obj/projectile/projectile) projectiles |= projectile -/datum/controller/subsystem/projectiles/proc/stop_projectile(obj/item/projectile/projectile) +/datum/controller/subsystem/projectiles/proc/stop_projectile(obj/projectile/projectile) projectiles -= projectile flying -= projectile // avoids problems with deleted projs projectile.speed = 0 diff --git a/code/datums/components/cluster_stack.dm b/code/datums/components/cluster_stack.dm index c79ce855e5b1..01d266d01a15 100644 --- a/code/datums/components/cluster_stack.dm +++ b/code/datums/components/cluster_stack.dm @@ -75,7 +75,7 @@ SIGNAL_HANDLER L += "Cluster Stack: [cluster_stacks]/[MAX_CLUSTER_STACKS]" -/datum/component/cluster_stack/proc/apply_cluster_stacks(mob/living/L, damage_result, ammo_flags, obj/item/projectile/P) +/datum/component/cluster_stack/proc/apply_cluster_stacks(mob/living/L, damage_result, ammo_flags, obj/projectile/P) SIGNAL_HANDLER if(cluster_stacks >= MAX_CLUSTER_STACKS) var/old_dmg_cont = damage_counter diff --git a/code/datums/elements/bullet_trait/bullet_trait.md b/code/datums/elements/bullet_trait/bullet_trait.md index 9253b3a6311a..8081843bd000 100644 --- a/code/datums/elements/bullet_trait/bullet_trait.md +++ b/code/datums/elements/bullet_trait/bullet_trait.md @@ -1,7 +1,7 @@ # A PROTOTYPE FOR MAKING ANY BULLET TRAITS Element representing traits that can be applied to bullets upon being fired -* Must be attached to a projectile (`/obj/item/projectile` in `projectile.dm`) +* Must be attached to a projectile (`/obj/projectile` in `projectile.dm`) * Allows for the customization of bullet behavior based on ammo types or guns (or other things) By convention, bullet_traits should be named bullet_trait_[insert rest of name here] @@ -16,7 +16,7 @@ By convention, bullet_traits should be named bullet_trait_[insert rest of name h /datum/element/bullet_trait/databaseAttach(datum/target) . = ..() // All bullet traits can only be applied to projectiles - if(!istype(target, /obj/item/projectile)) + if(!istype(target, /obj/projectile)) return ELEMENT_INCOMPATIBLE [handling here] diff --git a/code/datums/elements/bullet_trait/damage_boost.dm b/code/datums/elements/bullet_trait/damage_boost.dm index 1d93851dd73d..a0370f2d36b6 100644 --- a/code/datums/elements/bullet_trait/damage_boost.dm +++ b/code/datums/elements/bullet_trait/damage_boost.dm @@ -44,7 +44,7 @@ GLOBAL_LIST_INIT(damage_boost_vehicles, typecacheof(/obj/vehicle/multitile)) */ /datum/element/bullet_trait_damage_boost/Attach(datum/target, damage_mult, list/damage_boosted_atoms) . = ..() - if(!istype(target, /obj/item/projectile)) + if(!istype(target, /obj/projectile)) return ELEMENT_INCOMPATIBLE src.damage_mult = damage_mult @@ -66,7 +66,7 @@ GLOBAL_LIST_INIT(damage_boost_vehicles, typecacheof(/obj/vehicle/multitile)) //add more cases for other interactions (switch doesn't seem to work with istype) else return 0 -/datum/element/bullet_trait_damage_boost/proc/handle_bullet(obj/item/projectile/P, atom/A) +/datum/element/bullet_trait_damage_boost/proc/handle_bullet(obj/projectile/P, atom/A) SIGNAL_HANDLER atom_type = check_type(A) diff --git a/code/datums/elements/bullet_trait/iff.dm b/code/datums/elements/bullet_trait/iff.dm index bd08c100d0f4..ab48b29f4812 100644 --- a/code/datums/elements/bullet_trait/iff.dm +++ b/code/datums/elements/bullet_trait/iff.dm @@ -1,5 +1,5 @@ /// This is the iff_group -/obj/item/projectile/var/runtime_iff_group +/obj/projectile/var/runtime_iff_group /datum/element/bullet_trait_iff // General bullet trait vars @@ -13,7 +13,7 @@ /datum/element/bullet_trait_iff/Attach(datum/target, iff_group) . = ..() - if(!istype(target, /obj/item/projectile)) + if(!istype(target, /obj/projectile)) return ELEMENT_INCOMPATIBLE if(!iff_group) @@ -39,7 +39,7 @@ /datum/element/bullet_trait_iff/proc/set_iff(datum/target, mob/living/carbon/human/firer) SIGNAL_HANDLER - var/obj/item/projectile/P = target + var/obj/projectile/P = target P.runtime_iff_group = get_user_iff_group(firer) // We have a "cache" to avoid getting ID card iff every shot, diff --git a/code/datums/elements/bullet_trait/ignored_range.dm b/code/datums/elements/bullet_trait/ignored_range.dm index 668e5dab2dd7..3910fb400bdb 100644 --- a/code/datums/elements/bullet_trait/ignored_range.dm +++ b/code/datums/elements/bullet_trait/ignored_range.dm @@ -12,7 +12,7 @@ /datum/element/bullet_trait_ignored_range/Attach(datum/target, range_to_ignore) . = ..() ignored_range = range_to_ignore - if(!istype(target, /obj/item/projectile)) + if(!istype(target, /obj/projectile)) return ELEMENT_INCOMPATIBLE RegisterSignal(target, COMSIG_BULLET_CHECK_MOB_SKIPPING, PROC_REF(check_distance)) @@ -22,7 +22,7 @@ return ..() -/datum/element/bullet_trait_ignored_range/proc/check_distance(obj/item/projectile/P, mob/living/carbon/human/projectile_target) +/datum/element/bullet_trait_ignored_range/proc/check_distance(obj/projectile/P, mob/living/carbon/human/projectile_target) SIGNAL_HANDLER if(P.distance_travelled <= ignored_range) diff --git a/code/datums/elements/bullet_trait/incendiary.dm b/code/datums/elements/bullet_trait/incendiary.dm index c7f6e75e8e3b..2d5d0a15f368 100644 --- a/code/datums/elements/bullet_trait/incendiary.dm +++ b/code/datums/elements/bullet_trait/incendiary.dm @@ -8,7 +8,7 @@ /datum/element/bullet_trait_incendiary/Attach(datum/target, reagent = /datum/reagent/napalm/ut, stacks = 20) . = ..() - if(!istype(target, /obj/item/projectile)) + if(!istype(target, /obj/projectile)) return ELEMENT_INCOMPATIBLE if(ispath(reagent)) diff --git a/code/datums/elements/bullet_trait/penetrating.dm b/code/datums/elements/bullet_trait/penetrating.dm index 00fb330a7330..d3ba8a78f7f4 100644 --- a/code/datums/elements/bullet_trait/penetrating.dm +++ b/code/datums/elements/bullet_trait/penetrating.dm @@ -8,7 +8,7 @@ /datum/element/bullet_trait_penetrating/Attach(datum/target, distance_loss_per_hit = 3) . = ..() - if(!istype(target, /obj/item/projectile)) + if(!istype(target, /obj/projectile)) return ELEMENT_INCOMPATIBLE src.distance_loss_per_hit = distance_loss_per_hit @@ -27,13 +27,13 @@ )) return ..() -/datum/element/bullet_trait_penetrating/proc/handle_passthrough_movables(obj/item/projectile/P, atom/movable/A, did_hit) +/datum/element/bullet_trait_penetrating/proc/handle_passthrough_movables(obj/projectile/P, atom/movable/A, did_hit) SIGNAL_HANDLER if(did_hit) P.distance_travelled += distance_loss_per_hit return COMPONENT_BULLET_PASS_THROUGH -/datum/element/bullet_trait_penetrating/proc/handle_passthrough_turf(obj/item/projectile/P, turf/closed/wall/T) +/datum/element/bullet_trait_penetrating/proc/handle_passthrough_turf(obj/projectile/P, turf/closed/wall/T) SIGNAL_HANDLER P.distance_travelled += distance_loss_per_hit diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 17b37ce76630..544af45d7bca 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -215,7 +215,7 @@ /atom/movable/clone/get_examine_text(mob/user) return src.mstr.get_examine_text(user) -/atom/movable/clone/bullet_act(obj/item/projectile/P) +/atom/movable/clone/bullet_act(obj/projectile/P) return src.mstr.bullet_act(P) ///////////////////// diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 7e548d02d919..3c2c81ff0ce7 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -90,7 +90,7 @@ update_flag density = FALSE update_icon() -/obj/structure/machinery/portable_atmospherics/canister/bullet_act(obj/item/projectile/Proj) +/obj/structure/machinery/portable_atmospherics/canister/bullet_act(obj/projectile/Proj) if(Proj.ammo.damage) update_health(round(Proj.ammo.damage / 2)) ..() diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm index aff1efa3de66..5e4aaf36989d 100644 --- a/code/game/machinery/bots/bots.dm +++ b/code/game/machinery/bots/bots.dm @@ -89,7 +89,7 @@ else ..() -/obj/structure/machinery/bot/bullet_act(obj/item/projectile/Proj) +/obj/structure/machinery/bot/bullet_act(obj/projectile/Proj) health -= Proj.ammo.damage ..() healthcheck() diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 03dbe299b1f7..08de86581518 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -166,7 +166,7 @@ /obj/structure/holohoop/BlockedPassDirs(atom/movable/mover, target_dir) if(istype(mover,/obj/item) && mover.throwing) var/obj/item/I = mover - if(istype(I, /obj/item/projectile)) + if(istype(I, /obj/projectile)) return BLOCKED_MOVEMENT if(prob(50)) I.forceMove(src.loc) diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 8fa0b9b86a0c..adce72f7d8b6 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -56,7 +56,7 @@ else return -/obj/structure/machinery/computer/bullet_act(obj/item/projectile/Proj) +/obj/structure/machinery/computer/bullet_act(obj/projectile/Proj) if(exproof) visible_message("[Proj] ricochets off [src]!") return 0 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index e3e5fd3bee87..dc28cdca6f5c 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -162,7 +162,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( else return FALSE -/obj/structure/machinery/door/airlock/bullet_act(obj/item/projectile/P) +/obj/structure/machinery/door/airlock/bullet_act(obj/projectile/P) bullet_ping(P) if(P.damage) if(P.ammo.flags_ammo_behavior & AMMO_ROCKET) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index e9006a9f2fb4..2b57fbd0a44d 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -123,7 +123,7 @@ qdel(src) return -/obj/structure/machinery/door/window/bullet_act(obj/item/projectile/Proj) +/obj/structure/machinery/door/window/bullet_act(obj/projectile/Proj) bullet_ping(Proj) if(Proj.ammo.damage) take_damage(round(Proj.ammo.damage / 2)) diff --git a/code/game/machinery/telecomms/presets.dm b/code/game/machinery/telecomms/presets.dm index 47d4bb20849b..d8596a623920 100644 --- a/code/game/machinery/telecomms/presets.dm +++ b/code/game/machinery/telecomms/presets.dm @@ -76,7 +76,7 @@ if(!on) msg_admin_niche("Portable communication relay shut down for Z-Level [src.z] [ADMIN_JMP(src)]") -/obj/structure/machinery/telecomms/relay/preset/tower/bullet_act(obj/item/projectile/P) +/obj/structure/machinery/telecomms/relay/preset/tower/bullet_act(obj/projectile/P) ..() if(istype(P.ammo, /datum/ammo/xeno/boiler_gas)) update_health(50) diff --git a/code/game/objects/effects/decals/misc.dm b/code/game/objects/effects/decals/misc.dm index 5391ed2710a8..338f8b9a7e8e 100644 --- a/code/game/objects/effects/decals/misc.dm +++ b/code/game/objects/effects/decals/misc.dm @@ -79,7 +79,7 @@ deconstruct(FALSE) return -/obj/effect/decal/mecha_wreckage/bullet_act(obj/item/projectile/Proj) +/obj/effect/decal/mecha_wreckage/bullet_act(obj/projectile/Proj) return 1 /obj/effect/decal/mecha_wreckage/attack_alien(mob/living/carbon/xenomorph/M) diff --git a/code/game/objects/effects/effect_system/foam.dm b/code/game/objects/effects/effect_system/foam.dm index a7647dbd4489..f26736c8bfc4 100644 --- a/code/game/objects/effects/effect_system/foam.dm +++ b/code/game/objects/effects/effect_system/foam.dm @@ -188,7 +188,7 @@ /obj/structure/foamed_metal/ex_act(severity) take_damage(severity * FOAMED_METAL_EXPLOSION_DMG) -/obj/structure/foamed_metal/bullet_act(obj/item/projectile/P) +/obj/structure/foamed_metal/bullet_act(obj/projectile/P) if(P.ammo.damage_type == HALLOSS || P.ammo.damage_type == TOX || P.ammo.damage_type == CLONE || P.damage == 0) return diff --git a/code/game/objects/effects/effect_system/smoke.dm b/code/game/objects/effects/effect_system/smoke.dm index 2eb36930c542..018e579840d5 100644 --- a/code/game/objects/effects/effect_system/smoke.dm +++ b/code/game/objects/effects/effect_system/smoke.dm @@ -63,8 +63,8 @@ /obj/effect/particle_effect/smoke/Crossed(atom/movable/M) ..() - if(istype(M, /obj/item/projectile/beam)) - var/obj/item/projectile/beam/B = M + if(istype(M, /obj/projectile/beam)) + var/obj/projectile/beam/B = M B.damage = (B.damage/2) if(iscarbon(M)) affect(M) diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 9c74cd71fbad..f9b5ddb42f68 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -38,7 +38,7 @@ health -= damage healthcheck() -/obj/effect/spider/bullet_act(obj/item/projectile/Proj) +/obj/effect/spider/bullet_act(obj/projectile/Proj) ..() health -= Proj.ammo.damage healthcheck() @@ -67,7 +67,7 @@ if(prob(50)) to_chat(mover, SPAN_WARNING("You get stuck in [src] for a moment.")) return BLOCKED_MOVEMENT - else if(istype(mover, /obj/item/projectile)) + else if(istype(mover, /obj/projectile)) if(prob(30)) return BLOCKED_MOVEMENT return NO_BLOCKED_MOVEMENT diff --git a/code/game/objects/items/reagent_containers/food/drinks/bottle.dm b/code/game/objects/items/reagent_containers/food/drinks/bottle.dm index e1936fbaaec4..0e63a19c7ef1 100644 --- a/code/game/objects/items/reagent_containers/food/drinks/bottle.dm +++ b/code/game/objects/items/reagent_containers/food/drinks/bottle.dm @@ -13,7 +13,7 @@ var/isGlass = TRUE black_market_value = 25 -/obj/item/reagent_container/food/drinks/bottle/bullet_act(obj/item/projectile/P) +/obj/item/reagent_container/food/drinks/bottle/bullet_act(obj/projectile/P) . = ..() if(isGlass) smash() diff --git a/code/game/objects/items/reagent_containers/food/drinks/drinkingglass.dm b/code/game/objects/items/reagent_containers/food/drinks/drinkingglass.dm index 31a0e517c725..eea71cd1a4bc 100644 --- a/code/game/objects/items/reagent_containers/food/drinks/drinkingglass.dm +++ b/code/game/objects/items/reagent_containers/food/drinks/drinkingglass.dm @@ -682,7 +682,7 @@ return -/obj/item/reagent_container/food/drinks/drinkingglass/bullet_act(obj/item/projectile/P) +/obj/item/reagent_container/food/drinks/drinkingglass/bullet_act(obj/projectile/P) . = ..() smash() diff --git a/code/game/objects/items/shards.dm b/code/game/objects/items/shards.dm index f46f5b5a5fc0..459a7444378c 100644 --- a/code/game/objects/items/shards.dm +++ b/code/game/objects/items/shards.dm @@ -75,7 +75,7 @@ // Shrapnel. -// on_embed is called from projectile.dm, bullet_act(obj/item/projectile/P). +// on_embed is called from projectile.dm, bullet_act(obj/projectile/P). // on_embedded_movement is called from human.dm, handle_embedded_objects(). /obj/item/large_shrapnel/proc/on_embedded_movement(mob/living/embedded_mob) diff --git a/code/game/objects/items/tools/maintenance_tools.dm b/code/game/objects/items/tools/maintenance_tools.dm index b8affb0de616..4b849f399023 100644 --- a/code/game/objects/items/tools/maintenance_tools.dm +++ b/code/game/objects/items/tools/maintenance_tools.dm @@ -732,7 +732,7 @@ Welding backpack else . += "No punctures are seen on \the [src] upon closer inspection." -/obj/item/tool/weldpack/bullet_act(obj/item/projectile/P) +/obj/item/tool/weldpack/bullet_act(obj/projectile/P) var/damage = P.damage health -= damage ..() diff --git a/code/game/objects/items/weapons/misc.dm b/code/game/objects/items/weapons/misc.dm index 26a0a59b8090..d46619e581e9 100644 --- a/code/game/objects/items/weapons/misc.dm +++ b/code/game/objects/items/weapons/misc.dm @@ -27,7 +27,7 @@ edge = 0 var/icon/broken_outline = icon('icons/obj/items/drinks.dmi', "broken") -/obj/item/weapon/broken_bottle/bullet_act(obj/item/projectile/P) +/obj/item/weapon/broken_bottle/bullet_act(obj/projectile/P) . = ..() new/obj/item/shard(src.loc) new/obj/item/shard(src.loc) @@ -50,7 +50,7 @@ edge = 0 var/icon/broken_outline = icon('icons/obj/items/drinks.dmi', "broken") -/obj/item/weapon/broken_glass/bullet_act(obj/item/projectile/P) +/obj/item/weapon/broken_glass/bullet_act(obj/projectile/P) . = ..() new/obj/item/shard(src.loc) new/obj/item/shard(src.loc) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 24f019b9f89f..a99e91a12ec3 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -353,7 +353,7 @@ return ..() -/obj/bullet_act(obj/item/projectile/P) +/obj/bullet_act(obj/projectile/P) //Tasers and the like should not damage objects. if(P.ammo.damage_type == HALLOSS || P.ammo.damage_type == TOX || P.ammo.damage_type == CLONE || P.damage == 0) return 0 diff --git a/code/game/objects/shrapnel.dm b/code/game/objects/shrapnel.dm index 23fff8cbd906..d201584c7f3a 100644 --- a/code/game/objects/shrapnel.dm +++ b/code/game/objects/shrapnel.dm @@ -29,7 +29,7 @@ for(var/i=0;i= EXPLOSION_THRESHOLD_VLOW) deconstruct(FALSE) -/obj/structure/flora/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/structure/flora/get_projectile_hit_boolean(obj/projectile/P) . = ..() return FALSE diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index d014ebfe3b94..e719359ab439 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -316,7 +316,7 @@ return FALSE -/obj/structure/girder/bullet_act(obj/item/projectile/P) +/obj/structure/girder/bullet_act(obj/projectile/P) //Tasers and the like should not damage girders. if(P.ammo.damage_type == HALLOSS || P.ammo.damage_type == TOX || P.ammo.damage_type == CLONE || P.damage == 0) return FALSE diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 5386e50bc9f3..0f864ee2f116 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -101,12 +101,12 @@ /obj/structure/grille/BlockedPassDirs(atom/movable/mover, target_dir) - if(istype(mover, /obj/item/projectile) && prob(90)) + if(istype(mover, /obj/projectile) && prob(90)) return NO_BLOCKED_MOVEMENT return ..() -/obj/structure/grille/bullet_act(obj/item/projectile/Proj) +/obj/structure/grille/bullet_act(obj/projectile/Proj) //Tasers and the like should not damage grilles. if(Proj.ammo.damage_type == HALLOSS) diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index 1c7f616f52cb..c67c7381f723 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -44,7 +44,7 @@ health = 50 var/deflated = FALSE -/obj/structure/inflatable/bullet_act(obj/item/projectile/Proj) +/obj/structure/inflatable/bullet_act(obj/projectile/Proj) health -= Proj.damage ..() if(health <= 0 && !deflated) diff --git a/code/game/objects/structures/lamarr_cage.dm b/code/game/objects/structures/lamarr_cage.dm index dd9a0c19db9b..fbae7a387a63 100644 --- a/code/game/objects/structures/lamarr_cage.dm +++ b/code/game/objects/structures/lamarr_cage.dm @@ -26,7 +26,7 @@ deconstruct(FALSE) -/obj/structure/lamarr/bullet_act(obj/item/projectile/Proj) +/obj/structure/lamarr/bullet_act(obj/projectile/Proj) health -= Proj.damage ..() src.healthcheck() diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 5660f342f90b..a8d76843313a 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -89,7 +89,7 @@ shard_target.take_damage(15) -/obj/structure/mirror/bullet_act(obj/item/projectile/Proj) +/obj/structure/mirror/bullet_act(obj/projectile/Proj) if(prob(Proj.damage * 2)) if(!shattered) shatter() diff --git a/code/game/objects/structures/misc.dm b/code/game/objects/structures/misc.dm index 9323bca2877e..d290925d4cdf 100644 --- a/code/game/objects/structures/misc.dm +++ b/code/game/objects/structures/misc.dm @@ -12,7 +12,7 @@ if (PF) PF.flags_can_pass_all = PASS_HIGH_OVER_ONLY -/obj/structure/showcase/bullet_act(obj/item/projectile/P) +/obj/structure/showcase/bullet_act(obj/projectile/P) var/damage = P.damage health -= damage ..() diff --git a/code/game/objects/structures/props.dm b/code/game/objects/structures/props.dm index 66598d602691..59e24e4c6b73 100644 --- a/code/game/objects/structures/props.dm +++ b/code/game/objects/structures/props.dm @@ -1338,7 +1338,7 @@ attacked() return ..() -/obj/structure/prop/invuln/joey/bullet_act(obj/item/projectile/P) +/obj/structure/prop/invuln/joey/bullet_act(obj/projectile/P) attacked() return ..() diff --git a/code/game/objects/structures/reagent_dispensers.dm b/code/game/objects/structures/reagent_dispensers.dm index f20a7cfc25d6..7dc6d883a2d5 100644 --- a/code/game/objects/structures/reagent_dispensers.dm +++ b/code/game/objects/structures/reagent_dispensers.dm @@ -68,7 +68,7 @@ if(health <= 0) deconstruct(FALSE) -/obj/structure/reagent_dispensers/bullet_act(obj/item/projectile/Proj) +/obj/structure/reagent_dispensers/bullet_act(obj/projectile/Proj) health -= Proj.damage if(Proj.firer) msg_admin_niche("[key_name_admin(Proj.firer)] fired a projectile at [name] in [loc.loc.name] ([loc.x],[loc.y],[loc.z]) [ADMIN_JMP(loc)].") @@ -296,7 +296,7 @@ return ..() -/obj/structure/reagent_dispensers/fueltank/bullet_act(obj/item/projectile/Proj) +/obj/structure/reagent_dispensers/fueltank/bullet_act(obj/projectile/Proj) if(exploding) return 0 if(ismob(Proj.firer)) source_mob = WEAKREF(Proj.firer) diff --git a/code/game/objects/structures/stool_bed_chair_nest/janicart.dm b/code/game/objects/structures/stool_bed_chair_nest/janicart.dm index ba5e46a2ce7a..15baa15aa1a4 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/janicart.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/janicart.dm @@ -103,7 +103,7 @@ buckled_mob.pixel_y = 7 -/obj/structure/bed/chair/janicart/bullet_act(obj/item/projectile/Proj) +/obj/structure/bed/chair/janicart/bullet_act(obj/projectile/Proj) if(buckled_mob) if(prob(85)) return buckled_mob.bullet_act(Proj) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 090c5ad56f87..c064abe27fea 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -117,7 +117,7 @@ if(make_hit_sound) playsound(loc, 'sound/effects/Glasshit.ogg', 25, 1) -/obj/structure/window/bullet_act(obj/item/projectile/Proj) +/obj/structure/window/bullet_act(obj/projectile/Proj) //Tasers and the like should not damage windows. var/ammo_flags = Proj.ammo.flags_ammo_behavior | Proj.projectile_override_flags if(Proj.ammo.damage_type == HALLOSS || Proj.damage <= 0 || ammo_flags == AMMO_ENERGY) diff --git a/code/game/objects/structures/window_frame.dm b/code/game/objects/structures/window_frame.dm index 810b0560bf8b..2c165b424dad 100644 --- a/code/game/objects/structures/window_frame.dm +++ b/code/game/objects/structures/window_frame.dm @@ -148,7 +148,7 @@ . = ..() -/obj/structure/window_frame/bullet_act(obj/item/projectile/P) +/obj/structure/window_frame/bullet_act(obj/projectile/P) bullet_ping(P) take_damage(P.damage) return TRUE diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index bc0375e0b850..b4b3591f4736 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -154,7 +154,7 @@ if(override) return override & COMPONENT_TURF_ALLOW_MOVEMENT - if(isobserver(mover) || istype(mover, /obj/item/projectile)) + if(isobserver(mover) || istype(mover, /obj/projectile)) return TRUE var/fdir = get_dir(mover, src) diff --git a/code/game/turfs/walls/wall_types.dm b/code/game/turfs/walls/wall_types.dm index 5338ae26c000..10232e375b9c 100644 --- a/code/game/turfs/walls/wall_types.dm +++ b/code/game/turfs/walls/wall_types.dm @@ -993,10 +993,10 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) else return attack_hand(user) -/obj/structure/alien/movable_wall/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/structure/alien/movable_wall/get_projectile_hit_boolean(obj/projectile/P) return TRUE -/obj/structure/alien/movable_wall/bullet_act(obj/item/projectile/P) +/obj/structure/alien/movable_wall/bullet_act(obj/projectile/P) . = ..() take_damage(P.damage) @@ -1110,7 +1110,7 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) var/explosive_multiplier = 0.3 var/reflection_multiplier = 0.5 -/turf/closed/wall/resin/reflective/bullet_act(obj/item/projectile/P) +/turf/closed/wall/resin/reflective/bullet_act(obj/projectile/P) if(src in P.permutated) return @@ -1122,7 +1122,7 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) // Bullet gets absorbed if it has IFF or can't be reflected. return - var/obj/item/projectile/new_proj = new(src, construction_data ? construction_data : create_cause_data(initial(name))) + var/obj/projectile/new_proj = new(src, construction_data ? construction_data : create_cause_data(initial(name))) new_proj.generate_bullet(P.ammo) new_proj.damage = P.damage * reflection_multiplier // don't make it too punishing new_proj.accuracy = HIT_ACCURACY_TIER_7 // 35% chance to hit something @@ -1138,7 +1138,7 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) return TRUE -/turf/closed/wall/resin/reflective/proc/bullet_ignore_turf(obj/item/projectile/P, turf/T) +/turf/closed/wall/resin/reflective/proc/bullet_ignore_turf(obj/projectile/P, turf/T) SIGNAL_HANDLER if(T == src) return COMPONENT_BULLET_PASS_THROUGH diff --git a/code/modules/cm_aliens/Ovipositor.dm b/code/modules/cm_aliens/Ovipositor.dm index 9758497b7009..07d3466a279d 100644 --- a/code/modules/cm_aliens/Ovipositor.dm +++ b/code/modules/cm_aliens/Ovipositor.dm @@ -89,9 +89,9 @@ SPAN_DANGER("You nudge your head against [src].")) // Density override -/obj/ovipositor/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/ovipositor/get_projectile_hit_boolean(obj/projectile/P) return TRUE -/obj/ovipositor/bullet_act(obj/item/projectile/Proj) +/obj/ovipositor/bullet_act(obj/projectile/Proj) health -= Proj.damage return 1 diff --git a/code/modules/cm_aliens/XenoStructures.dm b/code/modules/cm_aliens/XenoStructures.dm index 08e451407989..73ced8099427 100644 --- a/code/modules/cm_aliens/XenoStructures.dm +++ b/code/modules/cm_aliens/XenoStructures.dm @@ -50,7 +50,7 @@ health -= 50 healthcheck() -/obj/effect/alien/resin/bullet_act(obj/item/projectile/Proj) +/obj/effect/alien/resin/bullet_act(obj/projectile/Proj) health -= Proj.damage ..() healthcheck() @@ -375,7 +375,7 @@ health -= dam healthcheck() -/obj/structure/mineral_door/resin/bullet_act(obj/item/projectile/Proj) +/obj/structure/mineral_door/resin/bullet_act(obj/projectile/Proj) health -= Proj.damage ..() healthcheck() @@ -630,7 +630,7 @@ STOP_PROCESSING(SSprocessing, src) return ..() -/obj/effect/alien/resin/acid_pillar/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/effect/alien/resin/acid_pillar/get_projectile_hit_boolean(obj/projectile/P) return TRUE /obj/effect/alien/resin/acid_pillar/proc/forsaken_handling() @@ -758,7 +758,7 @@ SIGNAL_HANDLER hitby(AM) -/obj/effect/alien/resin/resin_pillar/proc/handle_bullet(turf/T, obj/item/projectile/P) +/obj/effect/alien/resin/resin_pillar/proc/handle_bullet(turf/T, obj/projectile/P) SIGNAL_HANDLER bullet_act(P) return COMPONENT_BULLET_ACT_OVERRIDE @@ -897,7 +897,7 @@ var/range = 3 -/obj/item/explosive/grenade/alien/acid/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/item/explosive/grenade/alien/acid/get_projectile_hit_boolean(obj/projectile/P) return FALSE /obj/item/explosive/grenade/alien/acid/prime(force) diff --git a/code/modules/cm_aliens/structures/egg.dm b/code/modules/cm_aliens/structures/egg.dm index cf6fa4e3665e..a0e8e5054d45 100644 --- a/code/modules/cm_aliens/structures/egg.dm +++ b/code/modules/cm_aliens/structures/egg.dm @@ -151,7 +151,7 @@ else child.go_idle() -/obj/effect/alien/egg/bullet_act(obj/item/projectile/P) +/obj/effect/alien/egg/bullet_act(obj/projectile/P) ..() var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags if(ammo_flags & (AMMO_XENO)) diff --git a/code/modules/cm_aliens/structures/fruit.dm b/code/modules/cm_aliens/structures/fruit.dm index bb899a6ff25b..e54cb9417d7c 100644 --- a/code/modules/cm_aliens/structures/fruit.dm +++ b/code/modules/cm_aliens/structures/fruit.dm @@ -86,7 +86,7 @@ qdel(src) ..() -/obj/effect/alien/resin/fruit/bullet_act(obj/item/projectile/P) +/obj/effect/alien/resin/fruit/bullet_act(obj/projectile/P) var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags if(ammo_flags & (AMMO_XENO)) return diff --git a/code/modules/cm_aliens/structures/trap.dm b/code/modules/cm_aliens/structures/trap.dm index 5e1c51538ce6..bc8eb7e6c7c0 100644 --- a/code/modules/cm_aliens/structures/trap.dm +++ b/code/modules/cm_aliens/structures/trap.dm @@ -85,7 +85,7 @@ trigger_trap(TRUE) ..() -/obj/effect/alien/resin/trap/bullet_act(obj/item/projectile/P) +/obj/effect/alien/resin/trap/bullet_act(obj/projectile/P) var/mob/living/carbon/xenomorph/X = P.firer if(istype(X) && HIVE_ALLIED_TO_HIVE(X.hivenumber, hivenumber)) return diff --git a/code/modules/cm_aliens/structures/tunnel.dm b/code/modules/cm_aliens/structures/tunnel.dm index 0e1008cfbf12..f716d69b5b7e 100644 --- a/code/modules/cm_aliens/structures/tunnel.dm +++ b/code/modules/cm_aliens/structures/tunnel.dm @@ -76,7 +76,7 @@ visible_message(SPAN_DANGER("[src] suddenly collapses!")) qdel(src) -/obj/structure/tunnel/bullet_act(obj/item/projectile/Proj) +/obj/structure/tunnel/bullet_act(obj/projectile/Proj) return FALSE /obj/structure/tunnel/ex_act(severity) diff --git a/code/modules/cm_aliens/structures/xeno_structures_boilertrap.dm b/code/modules/cm_aliens/structures/xeno_structures_boilertrap.dm index 965238e81b65..0194ea74d3a6 100644 --- a/code/modules/cm_aliens/structures/xeno_structures_boilertrap.dm +++ b/code/modules/cm_aliens/structures/xeno_structures_boilertrap.dm @@ -43,7 +43,7 @@ . = ..() qdel(src) -/obj/effect/alien/resin/boilertrap/bullet_act(obj/item/projectile/P) +/obj/effect/alien/resin/boilertrap/bullet_act(obj/projectile/P) var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags if(ammo_flags & (AMMO_XENO)) return diff --git a/code/modules/cm_marines/equipment/mortar/mortars.dm b/code/modules/cm_marines/equipment/mortar/mortars.dm index f78fc9d94837..86bc3f5917c0 100644 --- a/code/modules/cm_marines/equipment/mortar/mortars.dm +++ b/code/modules/cm_marines/equipment/mortar/mortars.dm @@ -50,7 +50,7 @@ if (PF) PF.flags_can_pass_all = PASS_OVER -/obj/structure/mortar/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/structure/mortar/get_projectile_hit_boolean(obj/projectile/P) if(P.original == src) return TRUE else diff --git a/code/modules/cm_marines/overwatch.dm b/code/modules/cm_marines/overwatch.dm index 070cf1f6c1cf..1dcad6fceae2 100644 --- a/code/modules/cm_marines/overwatch.dm +++ b/code/modules/cm_marines/overwatch.dm @@ -39,7 +39,7 @@ /obj/structure/machinery/computer/overwatch/attackby(obj/I as obj, mob/user as mob) //Can't break or disassemble. return -/obj/structure/machinery/computer/overwatch/bullet_act(obj/item/projectile/Proj) //Can't shoot it +/obj/structure/machinery/computer/overwatch/bullet_act(obj/projectile/Proj) //Can't shoot it return FALSE /obj/structure/machinery/computer/overwatch/attack_remote(mob/user as mob) diff --git a/code/modules/cm_marines/smartgun_mount.dm b/code/modules/cm_marines/smartgun_mount.dm index b72120d2038e..89d027876023 100644 --- a/code/modules/cm_marines/smartgun_mount.dm +++ b/code/modules/cm_marines/smartgun_mount.dm @@ -255,7 +255,7 @@ PF.flags_can_pass_all = PASS_HIGH_OVER_ONLY|PASS_AROUND|PASS_OVER_THROW_ITEM //Making so rockets don't hit M56D -/obj/structure/machinery/m56d_post/calculate_cover_hit_boolean(obj/item/projectile/P, distance = 0, cade_direction_correct = FALSE) +/obj/structure/machinery/m56d_post/calculate_cover_hit_boolean(obj/projectile/P, distance = 0, cade_direction_correct = FALSE) var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags if(ammo_flags & AMMO_ROCKET) return 0 @@ -447,7 +447,7 @@ var/health_max = 200 //Why not just give it sentry-tier health for now. var/atom/target = null // required for shooting at things. var/datum/ammo/bullet/machinegun/ammo = /datum/ammo/bullet/machinegun - var/obj/item/projectile/in_chamber = null + var/obj/projectile/in_chamber = null var/locked = 0 //1 means its locked inplace (this will be for sandbag MGs) var/is_bursting = 0 var/muzzle_flash_lum = 4 @@ -479,7 +479,7 @@ PF.flags_can_pass_all = PASS_AROUND|PASS_OVER_THROW_ITEM|PASS_OVER_THROW_MOB //Making so rockets don't hit M56D -/obj/structure/machinery/m56d_hmg/calculate_cover_hit_boolean(obj/item/projectile/P, distance = 0, cade_direction_correct = FALSE) +/obj/structure/machinery/m56d_hmg/calculate_cover_hit_boolean(obj/projectile/P, distance = 0, cade_direction_correct = FALSE) var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags if(ammo_flags & AMMO_ROCKET) return 0 @@ -646,7 +646,7 @@ if(50 to 75) damage_state = M56D_DMG_SLIGHT if(75 to INFINITY) damage_state = M56D_DMG_NONE -/obj/structure/machinery/m56d_hmg/bullet_act(obj/item/projectile/P) //Nope. +/obj/structure/machinery/m56d_hmg/bullet_act(obj/projectile/P) //Nope. bullet_ping(P) visible_message(SPAN_WARNING("[src] is hit by the [P.name]!")) update_health(round(P.damage / 10)) //Universal low damage to what amounts to a post with a gun. @@ -671,7 +671,7 @@ return 0 //Out of ammo. var/datum/cause_data/cause_data = create_cause_data(initial(name)) - in_chamber = new /obj/item/projectile(loc, cause_data) //New bullet! + in_chamber = new /obj/projectile(loc, cause_data) //New bullet! in_chamber.generate_bullet(ammo) return 1 @@ -719,7 +719,7 @@ return if(load_into_chamber() == 1) - if(istype(in_chamber,/obj/item/projectile)) + if(istype(in_chamber,/obj/projectile)) in_chamber.original = target var/initial_angle = Get_Angle(T, U) diff --git a/code/modules/cm_preds/smartdisc.dm b/code/modules/cm_preds/smartdisc.dm index 068ff3550024..f0262f5f140a 100644 --- a/code/modules/cm_preds/smartdisc.dm +++ b/code/modules/cm_preds/smartdisc.dm @@ -163,7 +163,7 @@ /mob/living/simple_animal/hostile/smartdisc/Collided(atom/movable/AM) return -/mob/living/simple_animal/hostile/smartdisc/bullet_act(obj/item/projectile/Proj) +/mob/living/simple_animal/hostile/smartdisc/bullet_act(obj/projectile/Proj) if(prob(60 - Proj.damage)) return 0 diff --git a/code/modules/cm_preds/yaut_bracers.dm b/code/modules/cm_preds/yaut_bracers.dm index a94cde9887c3..c9976c7fea89 100644 --- a/code/modules/cm_preds/yaut_bracers.dm +++ b/code/modules/cm_preds/yaut_bracers.dm @@ -308,7 +308,7 @@ embedded_id.set_user_data(user) //Any projectile can decloak a predator. It does defeat one free bullet though. -/obj/item/clothing/gloves/yautja/hunter/proc/bullet_hit(mob/living/carbon/human/H, obj/item/projectile/P) +/obj/item/clothing/gloves/yautja/hunter/proc/bullet_hit(mob/living/carbon/human/H, obj/projectile/P) SIGNAL_HANDLER var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags diff --git a/code/modules/cm_preds/yaut_weapons.dm b/code/modules/cm_preds/yaut_weapons.dm index 5ff13c843ee3..de84819eeb94 100644 --- a/code/modules/cm_preds/yaut_weapons.dm +++ b/code/modules/cm_preds/yaut_weapons.dm @@ -874,7 +874,7 @@ update_icon() return TRUE -/obj/item/weapon/gun/launcher/spike/delete_bullet(obj/item/projectile/projectile_to_fire, refund = 0) +/obj/item/weapon/gun/launcher/spike/delete_bullet(obj/projectile/projectile_to_fire, refund = 0) qdel(projectile_to_fire) if(refund) spikes++ return TRUE @@ -960,7 +960,7 @@ /obj/item/weapon/gun/energy/yautja/plasmarifle/load_into_chamber() ammo = GLOB.ammo_list[/datum/ammo/energy/yautja/rifle/bolt] charge_time -= 10 - var/obj/item/projectile/projectile = create_bullet(ammo, initial(name)) + var/obj/projectile/projectile = create_bullet(ammo, initial(name)) projectile.SetLuminosity(1) in_chamber = projectile return in_chamber @@ -972,7 +972,7 @@ update_icon() return TRUE -/obj/item/weapon/gun/energy/yautja/plasmarifle/delete_bullet(obj/item/projectile/projectile_to_fire, refund = 0) +/obj/item/weapon/gun/energy/yautja/plasmarifle/delete_bullet(obj/projectile/projectile_to_fire, refund = 0) qdel(projectile_to_fire) if(refund) charge_time *= 2 return TRUE @@ -1057,7 +1057,7 @@ /obj/item/weapon/gun/energy/yautja/plasmapistol/load_into_chamber() if(charge_time < 1) return - var/obj/item/projectile/projectile = create_bullet(ammo, initial(name)) + var/obj/projectile/projectile = create_bullet(ammo, initial(name)) projectile.SetLuminosity(1) in_chamber = projectile charge_time -= shot_cost @@ -1070,7 +1070,7 @@ /obj/item/weapon/gun/energy/yautja/plasmapistol/reload_into_chamber() return TRUE -/obj/item/weapon/gun/energy/yautja/plasmapistol/delete_bullet(obj/item/projectile/projectile_to_fire, refund = 0) +/obj/item/weapon/gun/energy/yautja/plasmapistol/delete_bullet(obj/projectile/projectile_to_fire, refund = 0) qdel(projectile_to_fire) if(refund) charge_time += shot_cost @@ -1259,7 +1259,7 @@ /obj/item/weapon/gun/energy/yautja/plasma_caster/reload_into_chamber() return TRUE -/obj/item/weapon/gun/energy/yautja/plasma_caster/delete_bullet(obj/item/projectile/projectile_to_fire, refund = 0) +/obj/item/weapon/gun/energy/yautja/plasma_caster/delete_bullet(obj/projectile/projectile_to_fire, refund = 0) qdel(projectile_to_fire) if(refund) source.charge += charge_cost diff --git a/code/modules/cm_tech/implements/armor.dm b/code/modules/cm_tech/implements/armor.dm index de196647eaca..c08bf6d3c128 100644 --- a/code/modules/cm_tech/implements/armor.dm +++ b/code/modules/cm_tech/implements/armor.dm @@ -94,7 +94,7 @@ COMSIG_HUMAN_BULLET_ACT )) -/obj/item/clothing/accessory/health/proc/take_bullet_damage(mob/living/carbon/human/user, damage, ammo_flags, obj/item/projectile/P) +/obj/item/clothing/accessory/health/proc/take_bullet_damage(mob/living/carbon/human/user, damage, ammo_flags, obj/projectile/P) SIGNAL_HANDLER if(damage <= 0 || (ammo_flags & AMMO_IGNORE_ARMOR)) return diff --git a/code/modules/cm_tech/implements/medical_czsp.dm b/code/modules/cm_tech/implements/medical_czsp.dm index 3eed2fc9f619..30eda5b8af29 100644 --- a/code/modules/cm_tech/implements/medical_czsp.dm +++ b/code/modules/cm_tech/implements/medical_czsp.dm @@ -203,7 +203,7 @@ click_empty(user) return NONE - var/obj/item/projectile/pill/P = new /obj/item/projectile/pill(src, user, src) + var/obj/projectile/pill/P = new /obj/projectile/pill(src, user, src) P.generate_bullet(GLOB.ammo_list[/datum/ammo/pill], 0, 0) pill_to_use.forceMove(P) @@ -221,16 +221,16 @@ damage = 0 -/datum/ammo/pill/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/pill/on_hit_mob(mob/M, obj/projectile/P) . = ..() if(!ishuman(M)) return - if(!istype(P, /obj/item/projectile/pill)) + if(!istype(P, /obj/projectile/pill)) return - var/obj/item/projectile/pill/pill_projectile = P + var/obj/projectile/pill/pill_projectile = P if(QDELETED(pill_projectile.source_pill)) pill_projectile.source_pill = null @@ -240,9 +240,9 @@ pill_reagents.trans_to(M, pill_reagents.total_volume) -/obj/item/projectile/pill +/obj/projectile/pill var/obj/item/reagent_container/pill/source_pill -/obj/item/projectile/pill/Destroy() +/obj/projectile/pill/Destroy() . = ..() source_pill = null diff --git a/code/modules/cm_tech/implements/railgun.dm b/code/modules/cm_tech/implements/railgun.dm index b69f9a9d13a8..bef2f3d656ab 100644 --- a/code/modules/cm_tech/implements/railgun.dm +++ b/code/modules/cm_tech/implements/railgun.dm @@ -63,7 +63,7 @@ GLOBAL_DATUM(railgun_eye_location, /datum/coords) /obj/structure/machinery/computer/railgun/attackby(obj/I as obj, mob/user as mob) //Can't break or disassemble. return -/obj/structure/machinery/computer/railgun/bullet_act(obj/item/projectile/Proj) //Can't shoot it +/obj/structure/machinery/computer/railgun/bullet_act(obj/projectile/Proj) //Can't shoot it return FALSE /obj/structure/machinery/computer/railgun/proc/set_operator(mob/living/carbon/human/H) diff --git a/code/modules/cm_tech/resources/resource.dm b/code/modules/cm_tech/resources/resource.dm index eda0af9f63b8..44af2234afd3 100644 --- a/code/modules/cm_tech/resources/resource.dm +++ b/code/modules/cm_tech/resources/resource.dm @@ -85,7 +85,7 @@ health = Clamp(health - damage, 0, max_health) healthcheck() -/obj/structure/resource_node/bullet_act(obj/item/projectile/P) +/obj/structure/resource_node/bullet_act(obj/projectile/P) take_damage(P.damage) /obj/structure/resource_node/ex_act(severity, direction) diff --git a/code/modules/defenses/defenses.dm b/code/modules/defenses/defenses.dm index f47ae3e4d77b..d2c5e63fee29 100644 --- a/code/modules/defenses/defenses.dm +++ b/code/modules/defenses/defenses.dm @@ -448,7 +448,7 @@ return update_health(severity) -/obj/structure/machinery/defenses/bullet_act(obj/item/projectile/P) +/obj/structure/machinery/defenses/bullet_act(obj/projectile/P) bullet_ping(P) visible_message(SPAN_WARNING("[src] is hit by the [P]!")) var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags diff --git a/code/modules/defenses/sentry.dm b/code/modules/defenses/sentry.dm index 86464d97f5a3..40d90c45f54e 100644 --- a/code/modules/defenses/sentry.dm +++ b/code/modules/defenses/sentry.dm @@ -309,7 +309,7 @@ low_ammo_timer = null /obj/structure/machinery/defenses/sentry/proc/actual_fire(atom/target) - var/obj/item/projectile/new_projectile = new(src, create_cause_data(initial(name), owner_mob, src)) + var/obj/projectile/new_projectile = new(src, create_cause_data(initial(name), owner_mob, src)) new_projectile.generate_bullet(new ammo.default_ammo) new_projectile.damage *= damage_mult new_projectile.accuracy *= accuracy_mult diff --git a/code/modules/defenses/sentry_flamer.dm b/code/modules/defenses/sentry_flamer.dm index 747435ccb285..9ae794e3c811 100644 --- a/code/modules/defenses/sentry_flamer.dm +++ b/code/modules/defenses/sentry_flamer.dm @@ -29,7 +29,7 @@ fire_delay = 0.5 /obj/structure/machinery/defenses/sentry/flamer/actual_fire(atom/A) - var/obj/item/projectile/P = new(create_cause_data(initial(name), owner_mob)) + var/obj/projectile/P = new(create_cause_data(initial(name), owner_mob)) P.generate_bullet(new ammo.default_ammo) GIVE_BULLET_TRAIT(P, /datum/element/bullet_trait_iff, faction_group) P.fire_at(A, src, owner_mob, P.ammo.max_range, P.ammo.shell_speed, null) diff --git a/code/modules/hydroponics/hydro_tray.dm b/code/modules/hydroponics/hydro_tray.dm index 9549b8fa59c1..b4ac54e9f08c 100644 --- a/code/modules/hydroponics/hydro_tray.dm +++ b/code/modules/hydroponics/hydro_tray.dm @@ -148,7 +148,7 @@ if (PF) PF.flags_can_pass_all = PASS_OVER|PASS_AROUND|PASS_TYPE_CRAWLER -/obj/structure/machinery/portable_atmospherics/hydroponics/bullet_act(obj/item/projectile/Proj) +/obj/structure/machinery/portable_atmospherics/hydroponics/bullet_act(obj/projectile/Proj) //Don't act on seeds like dionaea that shouldn't change. if(seed && seed.immutable > 0) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index bc86ea40361c..2c8bd8946b54 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -159,7 +159,7 @@ return die() -/obj/item/clothing/mask/facehugger/bullet_act(obj/item/projectile/P) +/obj/item/clothing/mask/facehugger/bullet_act(obj/projectile/P) ..() var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags if(ammo_flags & (AMMO_XENO)) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/boiler/boiler_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/boiler/boiler_powers.dm index dff6c82efbf8..6748b662b118 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/boiler/boiler_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/boiler/boiler_powers.dm @@ -298,7 +298,7 @@ xeno.visible_message(SPAN_XENOWARNING("The [xeno] fires a blast of acid at [target]!"), SPAN_XENOWARNING("You fire a blast of acid at [target]!")) var/turf/target_turf = locate(target.x, target.y, target.z) - var/obj/item/projectile/proj = new(xeno.loc, create_cause_data("acid shotgun", xeno)) + var/obj/projectile/proj = new(xeno.loc, create_cause_data("acid shotgun", xeno)) var/datum/ammo/ammoDatum = new ammo_type() proj.generate_bullet(ammoDatum) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm index a9cffb196cb3..7a8151d8aa02 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm @@ -778,7 +778,7 @@ SPAN_XENOWARNING("You spit a [xeno.ammo.name] at [atom]!") ) playsound(xeno.loc, sound_to_play, 25, 1) - var/obj/item/projectile/proj = new (current_turf, create_cause_data(xeno.ammo.name, xeno)) + var/obj/projectile/proj = new (current_turf, create_cause_data(xeno.ammo.name, xeno)) proj.generate_bullet(xeno.ammo) proj.permutated += xeno proj.def_zone = xeno.get_limbzone_target() diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/praetorian/praetorian_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/praetorian/praetorian_powers.dm index 70666e83bc74..3975a229bbc1 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/praetorian/praetorian_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/praetorian/praetorian_powers.dm @@ -218,7 +218,7 @@ stabbing_xeno.visible_message(SPAN_XENODANGER("\The [stabbing_xeno] uncoils and wildly throws out its tail!"), SPAN_XENODANGER("You uncoil your tail wildly in front of you!")) - var/obj/item/projectile/hook_projectile = new /obj/item/projectile(stabbing_xeno.loc, create_cause_data(initial(stabbing_xeno.caste_type), stabbing_xeno)) + var/obj/projectile/hook_projectile = new /obj/projectile(stabbing_xeno.loc, create_cause_data(initial(stabbing_xeno.caste_type), stabbing_xeno)) var/datum/ammo/ammoDatum = GLOB.ammo_list[/datum/ammo/xeno/oppressor_tail] diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/ravager/ravager_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/ravager/ravager_powers.dm index 9107a9670048..cd4533eabc83 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/ravager/ravager_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/ravager/ravager_powers.dm @@ -521,7 +521,7 @@ X.visible_message(SPAN_XENOWARNING("The [X] fires their spikes at [A]!"), SPAN_XENOWARNING("You fire your spikes at [A]!")) var/turf/target = locate(A.x, A.y, A.z) - var/obj/item/projectile/P = new /obj/item/projectile(X.loc, create_cause_data(initial(X.caste_type), X)) + var/obj/projectile/P = new /obj/projectile(X.loc, create_cause_data(initial(X.caste_type), X)) var/datum/ammo/ammoDatum = GLOB.ammo_list[ammo_type] diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/runner/runner_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/runner/runner_powers.dm index 64e4b73cfbd2..4cbba8455397 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/runner/runner_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/runner/runner_powers.dm @@ -15,7 +15,7 @@ X.visible_message(SPAN_XENOWARNING("[X] fires a burst of bone chips at [A]!"), SPAN_XENOWARNING("You fire a burst of bone chips at [A]!")) var/turf/target = locate(A.x, A.y, A.z) - var/obj/item/projectile/P = new /obj/item/projectile(X.loc, create_cause_data(initial(X.caste_type), X)) + var/obj/projectile/P = new /obj/projectile(X.loc, create_cause_data(initial(X.caste_type), X)) var/datum/ammo/ammoDatum = GLOB.ammo_list[ammo_type] diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/sentinel/sentinel_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/sentinel/sentinel_powers.dm index 58384a01a3fa..b058756d3ef8 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/sentinel/sentinel_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/sentinel/sentinel_powers.dm @@ -21,7 +21,7 @@ playsound(xeno.loc, sound_to_play, 25, 1) xeno.ammo = GLOB.ammo_list[/datum/ammo/xeno/toxin] - var/obj/item/projectile/projectile = new /obj/item/projectile(current_turf, create_cause_data(initial(xeno.caste_type), xeno)) + var/obj/projectile/projectile = new /obj/projectile(current_turf, create_cause_data(initial(xeno.caste_type), xeno)) projectile.generate_bullet(xeno.ammo) projectile.permutated += xeno projectile.def_zone = xeno.get_limbzone_target() @@ -56,7 +56,7 @@ playsound(xeno.loc, sound_to_play, 25, 1) xeno.ammo = GLOB.ammo_list[/datum/ammo/xeno/toxin/shotgun] - var/obj/item/projectile/projectile = new /obj/item/projectile(current_turf, create_cause_data(initial(xeno.caste_type), xeno)) + var/obj/projectile/projectile = new /obj/projectile(current_turf, create_cause_data(initial(xeno.caste_type), xeno)) projectile.generate_bullet(xeno.ammo) projectile.permutated += xeno projectile.def_zone = xeno.get_limbzone_target() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 7edcb7d4fede..f364c94f393b 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -408,7 +408,7 @@ var/list/robot_verbs_default = list( /mob/living/silicon/robot/is_mob_restrained() return 0 -/mob/living/silicon/robot/bullet_act(obj/item/projectile/Proj) +/mob/living/silicon/robot/bullet_act(obj/projectile/Proj) ..(Proj) if(prob(75) && Proj.damage > 0) spark_system.start() return 2 diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 3bebedfc12c8..ffe85017bb28 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -122,7 +122,7 @@ else wound_icon_carrier.icon_state = "[caste_name]_walk_[health_threshold]" -/mob/living/simple_animal/hostile/alien/bullet_act(obj/item/projectile/P) +/mob/living/simple_animal/hostile/alien/bullet_act(obj/projectile/P) . = ..() if(P.damage) var/splatter_dir = get_dir(P.starting, loc)//loc is the xeno getting hit, P.starting is the turf of where the projectile got spawned @@ -187,8 +187,8 @@ // melee_damage_lower = 15 // melee_damage_upper = 15 // ranged = 1 -// projectiletype = /obj/item/projectile/neurotox +// projectiletype = /obj/projectile/neurotox // projectilesound = 'sound/weapons/pierce.ogg' -/obj/item/projectile/neurotox +/obj/projectile/neurotox damage = 30 icon_state = "toxin" diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm index 9266e67db495..3d37f8ea57c1 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm @@ -20,7 +20,7 @@ health = 300 maxHealth = 300 speed = 8 - projectiletype = /obj/item/projectile/beam/drone + projectiletype = /obj/projectile/beam/drone projectilesound = 'sound/weapons/Laser3.ogg' destroy_surroundings = 0 var/datum/effect_system/ion_trail_follow/ion_trail @@ -52,7 +52,7 @@ /mob/living/simple_animal/hostile/retaliate/malf_drone/Initialize() . = ..() if(prob(5)) - projectiletype = /obj/item/projectile/beam/pulse/drone + projectiletype = /obj/projectile/beam/pulse/drone projectilesound = 'sound/weapons/pulse2.ogg' ion_trail = new ion_trail.set_up(src) @@ -215,8 +215,8 @@ return ..() -/obj/item/projectile/beam/drone +/obj/projectile/beam/drone damage = 15 -/obj/item/projectile/beam/pulse/drone +/obj/projectile/beam/pulse/drone damage = 10 diff --git a/code/modules/mob/living/simple_animal/hostile/russian.dm b/code/modules/mob/living/simple_animal/hostile/russian.dm index 9d13ae92bd1c..1394ec113e6b 100644 --- a/code/modules/mob/living/simple_animal/hostile/russian.dm +++ b/code/modules/mob/living/simple_animal/hostile/russian.dm @@ -40,7 +40,7 @@ corpse = /obj/effect/landmark/corpsespawner/russian/ranged weapon1 = /obj/item/weapon/gun/pistol ranged = 1 - projectiletype = /obj/item/projectile + projectiletype = /obj/projectile projectilesound = 'sound/weapons/Gunshot.ogg' casingtype = null @@ -84,7 +84,7 @@ /mob/living/simple_animal/hostile/UPP/ranged //weapon1 = /obj/item/weapon/gun/projectile/mateba ranged = 1 - projectiletype = /obj/item/projectile + projectiletype = /obj/projectile projectilesound = 'sound/weapons/Gunshot.ogg' casingtype = null diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 36dd6402f9b0..0f15bd1d8f7b 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -254,7 +254,7 @@ return //Bullets -/mob/living/simple_animal/parrot/bullet_act(obj/item/projectile/Proj) +/mob/living/simple_animal/parrot/bullet_act(obj/projectile/Proj) ..() if(!stat && !client) if(parrot_state == PARROT_PERCH) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 094cdf5ac9ac..7f3415d988e5 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -605,7 +605,7 @@ if(prob(max(0, exposed_temperature - 673))) //0% at <400C, 100% at >500C broken() -/obj/structure/machinery/light/bullet_act(obj/item/projectile/P) +/obj/structure/machinery/light/bullet_act(obj/projectile/P) src.bullet_ping(P) if(P.ammo.damage_type == BRUTE) if(P.damage > 10) diff --git a/code/modules/projectiles/ammo_datums.dm b/code/modules/projectiles/ammo_datums.dm index d09c7ad7bb26..5992883464f9 100644 --- a/code/modules/projectiles/ammo_datums.dm +++ b/code/modules/projectiles/ammo_datums.dm @@ -59,7 +59,7 @@ /datum/ammo/New() set_bullet_traits() -/datum/ammo/proc/on_bullet_generation(obj/item/projectile/generated_projectile, mob/bullet_generator) //NOT used on New(), applied to the projectiles. +/datum/ammo/proc/on_bullet_generation(obj/projectile/generated_projectile, mob/bullet_generator) //NOT used on New(), applied to the projectiles. return /// Populate traits_to_give in this proc @@ -69,40 +69,40 @@ /datum/ammo/can_vv_modify() return FALSE -/datum/ammo/proc/do_at_half_range(obj/item/projectile/P) +/datum/ammo/proc/do_at_half_range(obj/projectile/P) SHOULD_NOT_SLEEP(TRUE) return /datum/ammo/proc/on_embed(mob/embedded_mob, obj/limb/target_organ) return -/datum/ammo/proc/do_at_max_range(obj/item/projectile/P) +/datum/ammo/proc/do_at_max_range(obj/projectile/P) SHOULD_NOT_SLEEP(TRUE) return -/datum/ammo/proc/on_shield_block(mob/M, obj/item/projectile/P) //Does it do something special when shield blocked? Ie. a flare or grenade that still blows up. +/datum/ammo/proc/on_shield_block(mob/M, obj/projectile/P) //Does it do something special when shield blocked? Ie. a flare or grenade that still blows up. return -/datum/ammo/proc/on_hit_turf(turf/T, obj/item/projectile/P) //Special effects when hitting dense turfs. +/datum/ammo/proc/on_hit_turf(turf/T, obj/projectile/P) //Special effects when hitting dense turfs. SHOULD_NOT_SLEEP(TRUE) return -/datum/ammo/proc/on_hit_mob(mob/M, obj/item/projectile/P, mob/user) //Special effects when hitting mobs. +/datum/ammo/proc/on_hit_mob(mob/M, obj/projectile/P, mob/user) //Special effects when hitting mobs. SHOULD_NOT_SLEEP(TRUE) return ///Special effects when pointblanking mobs. Ultimately called from /living/attackby(). Return TRUE to end the PB attempt. -/datum/ammo/proc/on_pointblank(mob/living/L, obj/item/projectile/P, mob/living/user, obj/item/weapon/gun/fired_from) +/datum/ammo/proc/on_pointblank(mob/living/L, obj/projectile/P, mob/living/user, obj/item/weapon/gun/fired_from) return -/datum/ammo/proc/on_hit_obj(obj/O, obj/item/projectile/P) //Special effects when hitting objects. +/datum/ammo/proc/on_hit_obj(obj/O, obj/projectile/P) //Special effects when hitting objects. SHOULD_NOT_SLEEP(TRUE) return -/datum/ammo/proc/on_near_target(turf/T, obj/item/projectile/P) //Special effects when passing near something. Range of things that triggers it is controlled by other ammo flags. +/datum/ammo/proc/on_near_target(turf/T, obj/projectile/P) //Special effects when passing near something. Range of things that triggers it is controlled by other ammo flags. return 0 //return 0 means it flies even after being near something. Return 1 means it stops -/datum/ammo/proc/knockback(mob/living/living_mob, obj/item/projectile/fired_projectile, max_range = 2) +/datum/ammo/proc/knockback(mob/living/living_mob, obj/projectile/fired_projectile, max_range = 2) if(!living_mob || living_mob == fired_projectile.firer) return if(fired_projectile.distance_travelled > max_range || living_mob.lying) @@ -115,7 +115,7 @@ knockback_effects(living_mob, fired_projectile) slam_back(living_mob, fired_projectile) -/datum/ammo/proc/slam_back(mob/living/living_mob, obj/item/projectile/fired_projectile) +/datum/ammo/proc/slam_back(mob/living/living_mob, obj/projectile/fired_projectile) //Either knockback or slam them into an obstacle. var/direction = Get_Compass_Dir(fired_projectile.z ? fired_projectile : fired_projectile.firer, living_mob) //More precise than get_dir. if(!direction) //Same tile. @@ -128,7 +128,7 @@ living_mob.apply_damage(MELEE_FORCE_TIER_2) ///The applied effects for knockback(), overwrite to change slow/stun amounts for different ammo datums -/datum/ammo/proc/knockback_effects(mob/living/living_mob, obj/item/projectile/fired_projectile) +/datum/ammo/proc/knockback_effects(mob/living/living_mob, obj/projectile/fired_projectile) if(iscarbonsizexeno(living_mob)) var/mob/living/carbon/xenomorph/target = living_mob target.apply_effect(0.7, WEAKEN) // 0.9 seconds of stun, per agreement from Balance Team when switched from MC stuns to exact stuns @@ -138,7 +138,7 @@ else living_mob.apply_stamina_damage(fired_projectile.ammo.damage, fired_projectile.def_zone, ARMOR_BULLET) -/datum/ammo/proc/pushback(mob/target_mob, obj/item/projectile/fired_projectile, max_range = 2) +/datum/ammo/proc/pushback(mob/target_mob, obj/projectile/fired_projectile, max_range = 2) if(!target_mob || target_mob == fired_projectile.firer || fired_projectile.distance_travelled > max_range || target_mob.lying) return @@ -148,7 +148,7 @@ to_chat(target_mob, isxeno(target_mob) ? SPAN_XENODANGER("You are pushed back by the sudden impact!") : SPAN_HIGHDANGER("You are pushed back by the sudden impact!"), null, 4, CHAT_TYPE_TAKING_HIT) slam_back(target_mob, fired_projectile, max_range) -/datum/ammo/proc/burst(atom/target, obj/item/projectile/P, damage_type = BRUTE, range = 1, damage_div = 2, show_message = SHOW_MESSAGE_VISIBLE) //damage_div says how much we divide damage +/datum/ammo/proc/burst(atom/target, obj/projectile/P, damage_type = BRUTE, range = 1, damage_div = 2, show_message = SHOW_MESSAGE_VISIBLE) //damage_div says how much we divide damage if(!target || !P) return for(var/mob/living/carbon/M in orange(range,target)) if(P.firer == M) @@ -174,7 +174,7 @@ else P.play_hit_effect(M) -/datum/ammo/proc/fire_bonus_projectiles(obj/item/projectile/original_P) +/datum/ammo/proc/fire_bonus_projectiles(obj/projectile/original_P) set waitfor = 0 var/turf/curloc = get_turf(original_P.shot_from) @@ -183,7 +183,7 @@ for(var/i in 1 to bonus_projectiles_amount) //Want to run this for the number of bonus projectiles. var/final_angle = initial_angle - var/obj/item/projectile/P = new /obj/item/projectile(curloc, original_P.weapon_cause_data) + var/obj/projectile/P = new /obj/projectile(curloc, original_P.weapon_cause_data) P.generate_bullet(GLOB.ammo_list[bonus_projectiles_type]) //No bonus damage or anything. P.accuracy = round(P.accuracy * original_P.accuracy/initial(original_P.accuracy)) //if the gun changes the accuracy of the main projectile, it also affects the bonus ones. original_P.give_bullet_traits(P) @@ -227,7 +227,7 @@ shrapnel_type = /obj/item/shard/shrapnel shell_speed = AMMO_SPEED_TIER_4 -/datum/ammo/bullet/proc/handle_battlefield_execution(datum/ammo/firing_ammo, mob/living/hit_mob, obj/item/projectile/firing_projectile, mob/living/user, obj/item/weapon/gun/fired_from) +/datum/ammo/bullet/proc/handle_battlefield_execution(datum/ammo/firing_ammo, mob/living/hit_mob, obj/projectile/firing_projectile, mob/living/user, obj/item/weapon/gun/fired_from) SIGNAL_HANDLER if(!user || hit_mob == user || user.zone_selected != "head" || user.a_intent != INTENT_HARM || !ishuman_strict(hit_mob)) @@ -247,7 +247,7 @@ return COMPONENT_CANCEL_AMMO_POINT_BLANK -/datum/ammo/bullet/proc/attempt_battlefield_execution(datum/ammo/firing_ammo, mob/living/carbon/human/execution_target, obj/item/projectile/firing_projectile, mob/living/user, obj/item/weapon/gun/fired_from) +/datum/ammo/bullet/proc/attempt_battlefield_execution(datum/ammo/firing_ammo, mob/living/carbon/human/execution_target, obj/projectile/firing_projectile, mob/living/user, obj/item/weapon/gun/fired_from) user.affected_message(execution_target, SPAN_HIGHDANGER("You aim \the [fired_from] at [execution_target]'s head!"), SPAN_HIGHDANGER("[user] aims \the [fired_from] directly at your head!"), @@ -348,16 +348,16 @@ var/acid_per_hit = 10 var/organic_damage_mult = 3 -/datum/ammo/bullet/pistol/ap/toxin/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/pistol/ap/toxin/on_hit_mob(mob/M, obj/projectile/P) . = ..() M.AddComponent(/datum/component/toxic_buildup, acid_per_hit) -/datum/ammo/bullet/pistol/ap/toxin/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/bullet/pistol/ap/toxin/on_hit_turf(turf/T, obj/projectile/P) . = ..() if(T.flags_turf & TURF_ORGANIC) P.damage *= organic_damage_mult -/datum/ammo/bullet/pistol/ap/toxin/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/bullet/pistol/ap/toxin/on_hit_obj(obj/O, obj/projectile/P) . = ..() if(O.flags_obj & OBJ_ORGANIC) P.damage *= organic_damage_mult @@ -414,7 +414,7 @@ ..() RegisterSignal(src, COMSIG_AMMO_POINT_BLANK, PROC_REF(handle_battlefield_execution)) -/datum/ammo/bullet/pistol/heavy/super/highimpact/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/pistol/heavy/super/highimpact/on_hit_mob(mob/M, obj/projectile/P) knockback(M, P, 4) /datum/ammo/bullet/pistol/deagle @@ -472,16 +472,16 @@ var/acid_per_hit = 10 var/organic_damage_mult = 3 -/datum/ammo/bullet/pistol/squash/toxin/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/pistol/squash/toxin/on_hit_mob(mob/M, obj/projectile/P) . = ..() M.AddComponent(/datum/component/toxic_buildup, acid_per_hit) -/datum/ammo/bullet/pistol/squash/toxin/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/bullet/pistol/squash/toxin/on_hit_turf(turf/T, obj/projectile/P) . = ..() if(T.flags_turf & TURF_ORGANIC) P.damage *= organic_damage_mult -/datum/ammo/bullet/pistol/squash/toxin/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/bullet/pistol/squash/toxin/on_hit_obj(obj/O, obj/projectile/P) . = ..() if(O.flags_obj & OBJ_ORGANIC) P.damage *= organic_damage_mult @@ -530,7 +530,7 @@ BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_incendiary) )) -/datum/ammo/bullet/pistol/mankey/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/bullet/pistol/mankey/on_hit_mob(mob/M,obj/projectile/P) if(P && P.loc && !M.stat && !istype(M,/mob/living/carbon/human/monkey)) P.visible_message(SPAN_DANGER("The [src] chimpers furiously!")) new /mob/living/carbon/human/monkey(P.loc) @@ -573,7 +573,7 @@ penetration = ARMOR_PENETRATION_TIER_4 accuracy = HIT_ACCURACY_TIER_3 -/datum/ammo/bullet/revolver/heavy/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/revolver/heavy/on_hit_mob(mob/M, obj/projectile/P) knockback(M, P, 4) /datum/ammo/bullet/revolver/incendiary @@ -591,16 +591,16 @@ var/acid_per_hit = 10 var/organic_damage_mult = 3 -/datum/ammo/bullet/revolver/marksman/toxin/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/revolver/marksman/toxin/on_hit_mob(mob/M, obj/projectile/P) . = ..() M.AddComponent(/datum/component/toxic_buildup, acid_per_hit) -/datum/ammo/bullet/revolver/marksman/toxin/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/bullet/revolver/marksman/toxin/on_hit_turf(turf/T, obj/projectile/P) . = ..() if(T.flags_turf & TURF_ORGANIC) P.damage *= organic_damage_mult -/datum/ammo/bullet/revolver/marksman/toxin/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/bullet/revolver/marksman/toxin/on_hit_obj(obj/O, obj/projectile/P) . = ..() if(O.flags_obj & OBJ_ORGANIC) P.damage *= organic_damage_mult @@ -640,7 +640,7 @@ shrapnel_type = /obj/item/shard/shrapnel/nagant //roughly 35 or so damage -/datum/ammo/bullet/revolver/nagant/shrapnel/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/revolver/nagant/shrapnel/on_hit_mob(mob/M, obj/projectile/P) pushback(M, P, 1) /datum/ammo/bullet/revolver/nagant/shrapnel_bits @@ -693,7 +693,7 @@ ..() RegisterSignal(src, COMSIG_AMMO_POINT_BLANK, PROC_REF(handle_battlefield_execution)) -/datum/ammo/bullet/revolver/mateba/highimpact/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/revolver/mateba/highimpact/on_hit_mob(mob/M, obj/projectile/P) knockback(M, P, 4) /datum/ammo/bullet/revolver/mateba/highimpact/explosive //if you ever put this in normal gameplay, i am going to scream @@ -704,15 +704,15 @@ penetration = ARMOR_PENETRATION_TIER_10 flags_ammo_behavior = AMMO_EXPLOSIVE|AMMO_BALLISTIC -/datum/ammo/bullet/revolver/mateba/highimpact/explosive/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/revolver/mateba/highimpact/explosive/on_hit_mob(mob/M, obj/projectile/P) ..() cell_explosion(get_turf(M), 120, 30, EXPLOSION_FALLOFF_SHAPE_LINEAR, P.dir, P.weapon_cause_data) -/datum/ammo/bullet/revolver/mateba/highimpact/explosive/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/bullet/revolver/mateba/highimpact/explosive/on_hit_obj(obj/O, obj/projectile/P) ..() cell_explosion(get_turf(O), 120, 30, EXPLOSION_FALLOFF_SHAPE_LINEAR, P.dir, P.weapon_cause_data) -/datum/ammo/bullet/revolver/mateba/highimpact/explosive/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/bullet/revolver/mateba/highimpact/explosive/on_hit_turf(turf/T, obj/projectile/P) ..() cell_explosion(T, 120, 30, EXPLOSION_FALLOFF_SHAPE_LINEAR, P.dir, P.weapon_cause_data) @@ -770,16 +770,16 @@ var/acid_per_hit = 5 var/organic_damage_mult = 3 -/datum/ammo/bullet/smg/ap/toxin/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/smg/ap/toxin/on_hit_mob(mob/M, obj/projectile/P) . = ..() M.AddComponent(/datum/component/toxic_buildup, acid_per_hit) -/datum/ammo/bullet/smg/ap/toxin/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/bullet/smg/ap/toxin/on_hit_turf(turf/T, obj/projectile/P) . = ..() if(T.flags_turf & TURF_ORGANIC) P.damage *= organic_damage_mult -/datum/ammo/bullet/smg/ap/toxin/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/bullet/smg/ap/toxin/on_hit_obj(obj/O, obj/projectile/P) . = ..() if(O.flags_obj & OBJ_ORGANIC) P.damage *= organic_damage_mult @@ -887,7 +887,7 @@ damage = 30 var/holo_stacks = 10 -/datum/ammo/bullet/rifle/holo_target/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/rifle/holo_target/on_hit_mob(mob/M, obj/projectile/P) . = ..() M.AddComponent(/datum/component/bonus_damage_stack, holo_stacks, world.time) @@ -905,13 +905,13 @@ shell_speed = AMMO_SPEED_TIER_4 damage_falloff = DAMAGE_FALLOFF_TIER_9 -/datum/ammo/bullet/rifle/explosive/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/rifle/explosive/on_hit_mob(mob/M, obj/projectile/P) cell_explosion(get_turf(M), 80, 40, EXPLOSION_FALLOFF_SHAPE_LINEAR, P.dir, P.weapon_cause_data) -/datum/ammo/bullet/rifle/explosive/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/bullet/rifle/explosive/on_hit_obj(obj/O, obj/projectile/P) cell_explosion(get_turf(O), 80, 40, EXPLOSION_FALLOFF_SHAPE_LINEAR, P.dir, P.weapon_cause_data) -/datum/ammo/bullet/rifle/explosive/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/bullet/rifle/explosive/on_hit_turf(turf/T, obj/projectile/P) if(T.density) cell_explosion(T, 80, 40, EXPLOSION_FALLOFF_SHAPE_LINEAR, P.dir, P.weapon_cause_data) @@ -927,16 +927,16 @@ var/acid_per_hit = 7 var/organic_damage_mult = 3 -/datum/ammo/bullet/rifle/ap/toxin/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/rifle/ap/toxin/on_hit_mob(mob/M, obj/projectile/P) . = ..() M.AddComponent(/datum/component/toxic_buildup, acid_per_hit) -/datum/ammo/bullet/rifle/ap/toxin/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/bullet/rifle/ap/toxin/on_hit_turf(turf/T, obj/projectile/P) . = ..() if(T.flags_turf & TURF_ORGANIC) P.damage *= organic_damage_mult -/datum/ammo/bullet/rifle/ap/toxin/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/bullet/rifle/ap/toxin/on_hit_obj(obj/O, obj/projectile/P) . = ..() if(O.flags_obj & OBJ_ORGANIC) P.damage *= organic_damage_mult @@ -1032,10 +1032,10 @@ penetration = ARMOR_PENETRATION_TIER_10 shell_speed = AMMO_SPEED_TIER_6 -/datum/ammo/bullet/rifle/m4ra/impact/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/rifle/m4ra/impact/on_hit_mob(mob/M, obj/projectile/P) knockback(M, P, 32) // Can knockback basically at max range -/datum/ammo/bullet/rifle/m4ra/impact/knockback_effects(mob/living/living_mob, obj/item/projectile/fired_projectile) +/datum/ammo/bullet/rifle/m4ra/impact/knockback_effects(mob/living/living_mob, obj/projectile/fired_projectile) if(iscarbonsizexeno(living_mob)) var/mob/living/carbon/xenomorph/target = living_mob to_chat(target, SPAN_XENODANGER("You are shaken and slowed by the sudden impact!")) @@ -1093,10 +1093,10 @@ damage_armor_punch = 2 handful_state = "slug_shell" -/datum/ammo/bullet/shotgun/slug/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/bullet/shotgun/slug/on_hit_mob(mob/M,obj/projectile/P) knockback(M, P, 6) -/datum/ammo/bullet/shotgun/slug/knockback_effects(mob/living/living_mob, obj/item/projectile/fired_projectile) +/datum/ammo/bullet/shotgun/slug/knockback_effects(mob/living/living_mob, obj/projectile/fired_projectile) if(iscarbonsizexeno(living_mob)) var/mob/living/carbon/xenomorph/target = living_mob to_chat(target, SPAN_XENODANGER("You are shaken and slowed by the sudden impact!")) @@ -1126,7 +1126,7 @@ shell_speed = AMMO_SPEED_TIER_3 handful_state = "beanbag_slug" -/datum/ammo/bullet/shotgun/beanbag/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/shotgun/beanbag/on_hit_mob(mob/M, obj/projectile/P) if(!M || M == P.firer) return if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -1151,14 +1151,14 @@ BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_incendiary) )) -/datum/ammo/bullet/shotgun/incendiary/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/bullet/shotgun/incendiary/on_hit_mob(mob/M,obj/projectile/P) burst(get_turf(M),P,damage_type) knockback(M,P) -/datum/ammo/bullet/shotgun/incendiary/on_hit_obj(obj/O,obj/item/projectile/P) +/datum/ammo/bullet/shotgun/incendiary/on_hit_obj(obj/O,obj/projectile/P) burst(get_turf(P),P,damage_type) -/datum/ammo/bullet/shotgun/incendiary/on_hit_turf(turf/T,obj/item/projectile/P) +/datum/ammo/bullet/shotgun/incendiary/on_hit_turf(turf/T,obj/projectile/P) burst(get_turf(T),P,damage_type) @@ -1225,7 +1225,7 @@ BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_incendiary) )) -/datum/ammo/bullet/shotgun/buckshot/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/bullet/shotgun/buckshot/on_hit_mob(mob/M,obj/projectile/P) knockback(M,P) //buckshot variant only used by the masterkey shotgun attachment. @@ -1273,7 +1273,7 @@ damage_armor_punch = 0 pen_armor_punch = 0 -/datum/ammo/bullet/shotgun/heavy/buckshot/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/bullet/shotgun/heavy/buckshot/on_hit_mob(mob/M,obj/projectile/P) knockback(M,P) /datum/ammo/bullet/shotgun/heavy/buckshot/spread @@ -1317,10 +1317,10 @@ penetration = ARMOR_PENETRATION_TIER_6 damage_armor_punch = 2 -/datum/ammo/bullet/shotgun/heavy/slug/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/bullet/shotgun/heavy/slug/on_hit_mob(mob/M,obj/projectile/P) knockback(M, P, 7) -/datum/ammo/bullet/shotgun/heavy/slug/knockback_effects(mob/living/living_mob, obj/item/projectile/fired_projectile) +/datum/ammo/bullet/shotgun/heavy/slug/knockback_effects(mob/living/living_mob, obj/projectile/fired_projectile) if(iscarbonsizexeno(living_mob)) var/mob/living/carbon/xenomorph/target = living_mob to_chat(target, SPAN_XENODANGER("You are shaken and slowed by the sudden impact!")) @@ -1349,7 +1349,7 @@ accuracy = HIT_ACCURACY_TIER_2 shell_speed = AMMO_SPEED_TIER_2 -/datum/ammo/bullet/shotgun/heavy/beanbag/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/shotgun/heavy/beanbag/on_hit_mob(mob/M, obj/projectile/P) if(!M || M == P.firer) return if(ishuman(M)) @@ -1398,7 +1398,7 @@ effective_range_max = EFFECTIVE_RANGE_MAX_TIER_2 //Full damage up to this distance, then falloff for each tile beyond. var/hit_messages = list() -/datum/ammo/bullet/shotgun/twobore/on_hit_mob(mob/living/M, obj/item/projectile/P) +/datum/ammo/bullet/shotgun/twobore/on_hit_mob(mob/living/M, obj/projectile/P) var/mob/shooter = P.firer if(shooter && ismob(shooter) && HAS_TRAIT(shooter, TRAIT_TWOBORE_TRAINING) && M.stat != DEAD && prob(40)) //Death is handled by periodic life() checks so this should have a chance to fire on a killshot. if(!length(hit_messages)) //Pick and remove lines, refill on exhaustion. @@ -1422,7 +1422,7 @@ step(M, get_dir(P.firer, M)) -/datum/ammo/bullet/shotgun/twobore/knockback_effects(mob/living/living_mob, obj/item/projectile/fired_projectile) +/datum/ammo/bullet/shotgun/twobore/knockback_effects(mob/living/living_mob, obj/projectile/fired_projectile) if(iscarbonsizexeno(living_mob)) var/mob/living/carbon/xenomorph/target = living_mob to_chat(target, SPAN_XENODANGER("You are shaken and slowed by the sudden impact!")) @@ -1456,7 +1456,7 @@ accuracy = HIT_ACCURACY_TIER_1 handful_state = "tracking_lever_action_bullet" -/datum/ammo/bullet/lever_action/tracker/on_hit_mob(mob/M, obj/item/projectile/P, mob/user) +/datum/ammo/bullet/lever_action/tracker/on_hit_mob(mob/M, obj/projectile/P, mob/user) //SEND_SIGNAL(user, COMSIG_BULLET_TRACKING, user, M) M.visible_message(SPAN_DANGER("You hear a faint beep under [M]'s [M.mob_size > MOB_SIZE_HUMAN ? "chitin" : "skin"].")) @@ -1525,7 +1525,7 @@ shell_speed = AMMO_SPEED_TIER_6 damage_falloff = 0 -/datum/ammo/bullet/sniper/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/bullet/sniper/on_hit_mob(mob/M,obj/projectile/P) if((P.projectile_flags & PROJECTILE_BULLSEYE) && M == P.original) var/mob/living/L = M L.apply_armoured_damage(damage*2, ARMOR_BULLET, BRUTE, null, penetration) @@ -1547,7 +1547,7 @@ BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_incendiary) )) -/datum/ammo/bullet/sniper/incendiary/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/bullet/sniper/incendiary/on_hit_mob(mob/M,obj/projectile/P) if((P.projectile_flags & PROJECTILE_BULLSEYE) && M == P.original) var/mob/living/L = M var/blind_duration = 5 @@ -1570,7 +1570,7 @@ damage_var_high = PROJECTILE_VARIANCE_TIER_8 //Documenting old code: This converts to a variance of 96-109% damage. -Kaga penetration = 0 -/datum/ammo/bullet/sniper/flak/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/bullet/sniper/flak/on_hit_mob(mob/M,obj/projectile/P) if((P.projectile_flags & PROJECTILE_BULLSEYE) && M == P.original) var/slow_duration = 7 var/mob/living/L = M @@ -1585,7 +1585,7 @@ burst(get_turf(M),P,damage_type, 2 , 2) burst(get_turf(M),P,damage_type, 1 , 2 , 0) -/datum/ammo/bullet/sniper/flak/on_near_target(turf/T, obj/item/projectile/P) +/datum/ammo/bullet/sniper/flak/on_near_target(turf/T, obj/projectile/P) burst(T,P,damage_type, 2 , 2) burst(T,P,damage_type, 1 , 2, 0) return 1 @@ -1595,7 +1595,7 @@ damage = 42 penetration = ARMOR_PENETRATION_TIER_6 -/datum/ammo/bullet/sniper/crude/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/sniper/crude/on_hit_mob(mob/M, obj/projectile/P) . = ..() pushback(M, P, 3) @@ -1607,7 +1607,7 @@ damage = 125 shell_speed = AMMO_SPEED_TIER_6 -/datum/ammo/bullet/sniper/anti_materiel/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/bullet/sniper/anti_materiel/on_hit_mob(mob/M,obj/projectile/P) if((P.projectile_flags & PROJECTILE_BULLSEYE) && M == P.original) var/mob/living/L = M var/size_damage_mod = 0.8 @@ -1635,7 +1635,7 @@ BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_penetrating) )) -/datum/ammo/bullet/sniper/elite/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/bullet/sniper/elite/on_hit_mob(mob/M,obj/projectile/P) if((P.projectile_flags & PROJECTILE_BULLSEYE) && M == P.original) var/mob/living/L = M var/size_damage_mod = 0.5 @@ -1667,20 +1667,20 @@ max_range = 32 shell_speed = AMMO_SPEED_TIER_6 -/datum/ammo/bullet/tank/flak/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/bullet/tank/flak/on_hit_mob(mob/M,obj/projectile/P) burst(get_turf(M),P,damage_type, 2 , 3) burst(get_turf(M),P,damage_type, 1 , 3 , 0) -/datum/ammo/bullet/tank/flak/on_near_target(turf/T, obj/item/projectile/P) +/datum/ammo/bullet/tank/flak/on_near_target(turf/T, obj/projectile/P) burst(get_turf(T),P,damage_type, 2 , 3) burst(get_turf(T),P,damage_type, 1 , 3, 0) return 1 -/datum/ammo/bullet/tank/flak/on_hit_obj(obj/O,obj/item/projectile/P) +/datum/ammo/bullet/tank/flak/on_hit_obj(obj/O,obj/projectile/P) burst(get_turf(P),P,damage_type, 2 , 3) burst(get_turf(P),P,damage_type, 1 , 3 , 0) -/datum/ammo/bullet/tank/flak/on_hit_turf(turf/T,obj/item/projectile/P) +/datum/ammo/bullet/tank/flak/on_hit_turf(turf/T,obj/projectile/P) burst(get_turf(T),P,damage_type, 2 , 3) burst(get_turf(T),P,damage_type, 1 , 3 , 0) @@ -1699,23 +1699,23 @@ max_range = 12 shell_speed = AMMO_SPEED_TIER_5 -/datum/ammo/bullet/tank/dualcannon/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/bullet/tank/dualcannon/on_hit_mob(mob/M,obj/projectile/P) for(var/mob/living/carbon/L in get_turf(M)) if(L.stat == CONSCIOUS && L.mob_size <= MOB_SIZE_XENO) shake_camera(L, 1, 1) -/datum/ammo/bullet/tank/dualcannon/on_near_target(turf/T, obj/item/projectile/P) +/datum/ammo/bullet/tank/dualcannon/on_near_target(turf/T, obj/projectile/P) for(var/mob/living/carbon/L in T) if(L.stat == CONSCIOUS && L.mob_size <= MOB_SIZE_XENO) shake_camera(L, 1, 1) return 1 -/datum/ammo/bullet/tank/dualcannon/on_hit_obj(obj/O,obj/item/projectile/P) +/datum/ammo/bullet/tank/dualcannon/on_hit_obj(obj/O,obj/projectile/P) for(var/mob/living/carbon/L in get_turf(O)) if(L.stat == CONSCIOUS && L.mob_size <= MOB_SIZE_XENO) shake_camera(L, 1, 1) -/datum/ammo/bullet/tank/dualcannon/on_hit_turf(turf/T,obj/item/projectile/P) +/datum/ammo/bullet/tank/dualcannon/on_hit_turf(turf/T,obj/projectile/P) for(var/mob/living/carbon/L in T) if(L.stat == CONSCIOUS && L.mob_size <= MOB_SIZE_XENO) shake_camera(L, 1, 1) @@ -1895,24 +1895,24 @@ smoke = null . = ..() -/datum/ammo/rocket/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/rocket/on_hit_mob(mob/M, obj/projectile/P) cell_explosion(get_turf(M), 150, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) smoke.set_up(1, get_turf(M)) if(ishuman_strict(M)) // No yautya or synths. Makes humans gib on direct hit. M.ex_act(350, P.dir, P.weapon_cause_data, 100) smoke.start() -/datum/ammo/rocket/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/rocket/on_hit_obj(obj/O, obj/projectile/P) cell_explosion(get_turf(O), 150, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) smoke.set_up(1, get_turf(O)) smoke.start() -/datum/ammo/rocket/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/rocket/on_hit_turf(turf/T, obj/projectile/P) cell_explosion(T, 150, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) smoke.set_up(1, T) smoke.start() -/datum/ammo/rocket/do_at_max_range(obj/item/projectile/P) +/datum/ammo/rocket/do_at_max_range(obj/projectile/P) cell_explosion(get_turf(P), 150, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) smoke.set_up(1, get_turf(P)) smoke.start() @@ -1929,7 +1929,7 @@ damage = 10 penetration= ARMOR_PENETRATION_TIER_10 -/datum/ammo/rocket/ap/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/rocket/ap/on_hit_mob(mob/M, obj/projectile/P) var/turf/T = get_turf(M) M.ex_act(150, P.dir, P.weapon_cause_data, 100) M.apply_effect(2, WEAKEN) @@ -1940,14 +1940,14 @@ smoke.set_up(1, T) smoke.start() -/datum/ammo/rocket/ap/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/rocket/ap/on_hit_obj(obj/O, obj/projectile/P) var/turf/T = get_turf(O) O.ex_act(150, P.dir, P.weapon_cause_data, 100) cell_explosion(T, 100, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) smoke.set_up(1, T) smoke.start() -/datum/ammo/rocket/ap/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/rocket/ap/on_hit_turf(turf/T, obj/projectile/P) var/hit_something = 0 for(var/mob/M in T) M.ex_act(150, P.dir, P.weapon_cause_data, 100) @@ -1968,7 +1968,7 @@ smoke.set_up(1, T) smoke.start() -/datum/ammo/rocket/ap/do_at_max_range(obj/item/projectile/P) +/datum/ammo/rocket/ap/do_at_max_range(obj/projectile/P) var/turf/T = get_turf(P) var/hit_something = 0 for(var/mob/M in T) @@ -1996,7 +1996,7 @@ shrapnel_chance = 5 shrapnel_type = /obj/item/large_shrapnel/at_rocket_dud -/datum/ammo/rocket/ap/anti_tank/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/rocket/ap/anti_tank/on_hit_obj(obj/O, obj/projectile/P) if(istype(O, /obj/vehicle/multitile)) var/obj/vehicle/multitile/M = O M.next_move = world.time + vehicle_slowdown_time @@ -2022,19 +2022,19 @@ damage = 25 shell_speed = AMMO_SPEED_TIER_3 -/datum/ammo/rocket/ltb/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/rocket/ltb/on_hit_mob(mob/M, obj/projectile/P) cell_explosion(get_turf(M), 220, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) cell_explosion(get_turf(M), 200, 100, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) -/datum/ammo/rocket/ltb/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/rocket/ltb/on_hit_obj(obj/O, obj/projectile/P) cell_explosion(get_turf(O), 220, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) cell_explosion(get_turf(O), 200, 100, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) -/datum/ammo/rocket/ltb/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/rocket/ltb/on_hit_turf(turf/T, obj/projectile/P) cell_explosion(get_turf(T), 220, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) cell_explosion(get_turf(T), 200, 100, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) -/datum/ammo/rocket/ltb/do_at_max_range(obj/item/projectile/P) +/datum/ammo/rocket/ltb/do_at_max_range(obj/projectile/P) cell_explosion(get_turf(P), 220, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) cell_explosion(get_turf(P), 200, 100, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) @@ -2067,16 +2067,16 @@ landingSmoke.start() landingSmoke = null -/datum/ammo/rocket/wp/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/rocket/wp/on_hit_mob(mob/M, obj/projectile/P) drop_flame(get_turf(M), P.weapon_cause_data) -/datum/ammo/rocket/wp/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/rocket/wp/on_hit_obj(obj/O, obj/projectile/P) drop_flame(get_turf(O), P.weapon_cause_data) -/datum/ammo/rocket/wp/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/rocket/wp/on_hit_turf(turf/T, obj/projectile/P) drop_flame(T, P.weapon_cause_data) -/datum/ammo/rocket/wp/do_at_max_range(obj/item/projectile/P) +/datum/ammo/rocket/wp/do_at_max_range(obj/projectile/P) drop_flame(get_turf(P), P.weapon_cause_data) /datum/ammo/rocket/wp/quad @@ -2087,26 +2087,26 @@ max_range = 32 shell_speed = AMMO_SPEED_TIER_3 -/datum/ammo/rocket/wp/quad/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/rocket/wp/quad/on_hit_mob(mob/M, obj/projectile/P) drop_flame(get_turf(M), P.weapon_cause_data) explosion(P.loc, -1, 2, 4, 5, , , ,P.weapon_cause_data) -/datum/ammo/rocket/wp/quad/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/rocket/wp/quad/on_hit_obj(obj/O, obj/projectile/P) drop_flame(get_turf(O), P.weapon_cause_data) explosion(P.loc, -1, 2, 4, 5, , , ,P.weapon_cause_data) -/datum/ammo/rocket/wp/quad/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/rocket/wp/quad/on_hit_turf(turf/T, obj/projectile/P) drop_flame(T, P.weapon_cause_data) explosion(P.loc, -1, 2, 4, 5, , , ,P.weapon_cause_data) -/datum/ammo/rocket/wp/quad/do_at_max_range(obj/item/projectile/P) +/datum/ammo/rocket/wp/quad/do_at_max_range(obj/projectile/P) drop_flame(get_turf(P), P.weapon_cause_data) explosion(P.loc, -1, 2, 4, 5, , , ,P.weapon_cause_data) /datum/ammo/rocket/custom name = "custom rocket" -/datum/ammo/rocket/custom/proc/prime(atom/A, obj/item/projectile/P) +/datum/ammo/rocket/custom/proc/prime(atom/A, obj/projectile/P) var/obj/item/weapon/gun/launcher/rocket/launcher = P.shot_from var/obj/item/ammo_magazine/rocket/custom/rocket = launcher.current_mag if(rocket.locked && rocket.warhead && rocket.warhead.detonator) @@ -2118,16 +2118,16 @@ smoke.set_up(1, get_turf(A)) smoke.start() -/datum/ammo/rocket/custom/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/rocket/custom/on_hit_mob(mob/M, obj/projectile/P) prime(M, P) -/datum/ammo/rocket/custom/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/rocket/custom/on_hit_obj(obj/O, obj/projectile/P) prime(O, P) -/datum/ammo/rocket/custom/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/rocket/custom/on_hit_turf(turf/T, obj/projectile/P) prime(T, P) -/datum/ammo/rocket/custom/do_at_max_range(obj/item/projectile/P) +/datum/ammo/rocket/custom/do_at_max_range(obj/projectile/P) prime(null, P) /* @@ -2166,7 +2166,7 @@ shell_speed = AMMO_SPEED_TIER_1 // Slightly faster hit_effect_color = "#FFFF00" -/datum/ammo/energy/taser/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/energy/taser/on_hit_mob(mob/M, obj/projectile/P) if(ishuman(M)) var/mob/living/carbon/human/H = M H.disable_special_items() // Disables scout cloak @@ -2185,7 +2185,7 @@ stamina_damage = 25 //why not shell_speed = AMMO_SPEED_TIER_3 -/datum/ammo/energy/rxfm_eva/on_hit_mob(mob/living/M, obj/item/projectile/P) +/datum/ammo/energy/rxfm_eva/on_hit_mob(mob/living/M, obj/projectile/P) ..() if(prob(10)) //small chance for one to ignite on hit M.fire_act() @@ -2235,7 +2235,7 @@ icon_state = "shrapnel_plasma" damage_type = BURN -/datum/ammo/bullet/shrapnel/plasma/on_hit_mob(mob/hit_mob, obj/item/projectile/hit_projectile) +/datum/ammo/bullet/shrapnel/plasma/on_hit_mob(mob/hit_mob, obj/projectile/hit_projectile) hit_mob.apply_effect(2, WEAKEN) /datum/ammo/energy/yautja/caster @@ -2263,7 +2263,7 @@ damage = 0 flags_ammo_behavior = AMMO_ENERGY|AMMO_IGNORE_RESIST -/datum/ammo/energy/yautja/caster/bolt/stun/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/energy/yautja/caster/bolt/stun/on_hit_mob(mob/M, obj/projectile/P) var/mob/living/carbon/C = M var/stun_time = src.stun_time if(istype(C)) @@ -2296,13 +2296,13 @@ var/vehicle_slowdown_time = 5 SECONDS -/datum/ammo/energy/yautja/caster/sphere/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/energy/yautja/caster/sphere/on_hit_mob(mob/M, obj/projectile/P) cell_explosion(P, 170, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) -/datum/ammo/energy/yautja/caster/sphere/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/energy/yautja/caster/sphere/on_hit_turf(turf/T, obj/projectile/P) cell_explosion(P, 170, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) -/datum/ammo/energy/yautja/caster/sphere/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/energy/yautja/caster/sphere/on_hit_obj(obj/O, obj/projectile/P) if(istype(O, /obj/vehicle/multitile)) var/obj/vehicle/multitile/multitile_vehicle = O multitile_vehicle.next_move = world.time + vehicle_slowdown_time @@ -2312,7 +2312,7 @@ multitile_vehicle.ex_act(150, P.dir, P.weapon_cause_data, 100) cell_explosion(get_turf(P), 170, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) -/datum/ammo/energy/yautja/caster/sphere/do_at_max_range(obj/item/projectile/P) +/datum/ammo/energy/yautja/caster/sphere/do_at_max_range(obj/projectile/P) cell_explosion(get_turf(P), 170, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, P.weapon_cause_data) @@ -2326,19 +2326,19 @@ var/stun_range = 4 // Big var/stun_time = 6 -/datum/ammo/energy/yautja/caster/sphere/stun/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/energy/yautja/caster/sphere/stun/on_hit_mob(mob/M, obj/projectile/P) do_area_stun(P) -/datum/ammo/energy/yautja/caster/sphere/stun/on_hit_turf(turf/T,obj/item/projectile/P) +/datum/ammo/energy/yautja/caster/sphere/stun/on_hit_turf(turf/T,obj/projectile/P) do_area_stun(P) -/datum/ammo/energy/yautja/caster/sphere/stun/on_hit_obj(obj/O,obj/item/projectile/P) +/datum/ammo/energy/yautja/caster/sphere/stun/on_hit_obj(obj/O,obj/projectile/P) do_area_stun(P) -/datum/ammo/energy/yautja/caster/sphere/stun/do_at_max_range(obj/item/projectile/P) +/datum/ammo/energy/yautja/caster/sphere/stun/do_at_max_range(obj/projectile/P) do_area_stun(P) -/datum/ammo/energy/yautja/caster/sphere/stun/proc/do_area_stun(obj/item/projectile/P) +/datum/ammo/energy/yautja/caster/sphere/stun/proc/do_area_stun(obj/projectile/P) playsound(P, 'sound/weapons/wave.ogg', 75, 1, 25) for (var/mob/living/carbon/M in view(src.stun_range, get_turf(P))) var/stun_time = src.stun_time @@ -2454,7 +2454,7 @@ M.apply_effect(0.7, WEAKEN) M.visible_message(SPAN_DANGER("[M] falls prone.")) -/datum/ammo/xeno/toxin/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/xeno/toxin/on_hit_mob(mob/M,obj/projectile/P) if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.status_flags & XENO_HOST) @@ -2478,7 +2478,7 @@ accuracy = HIT_ACCURACY_TIER_5*2 max_range = 6 - 1 -/datum/ammo/xeno/toxin/queen/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/xeno/toxin/queen/on_hit_mob(mob/M,obj/projectile/P) neuro_callback.Invoke(M, effect_power, TRUE) /datum/ammo/xeno/toxin/shotgun @@ -2503,7 +2503,7 @@ bonus_projectiles_amount = 0 -/*proc/neuro_flak(turf/T, obj/item/projectile/P, datum/callback/CB, power, insta_neuro, radius) +/*proc/neuro_flak(turf/T, obj/projectile/P, datum/callback/CB, power, insta_neuro, radius) if(!T) return FALSE var/firer = P.firer var/hit_someone = FALSE @@ -2527,13 +2527,13 @@ spit_cost = 50 flags_ammo_behavior = AMMO_XENO|AMMO_IGNORE_RESIST -/datum/ammo/xeno/toxin/burst/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/xeno/toxin/burst/on_hit_mob(mob/M, obj/projectile/P) if(isxeno(M) && isxeno(P.firer) && M:hivenumber == P.firer:hivenumber) neuro_callback.Invoke(M, effect_power*1.5, TRUE) neuro_flak(get_turf(M), P, neuro_callback, effect_power, FALSE, 1) -/datum/ammo/xeno/toxin/burst/on_near_target(turf/T, obj/item/projectile/P) +/datum/ammo/xeno/toxin/burst/on_near_target(turf/T, obj/projectile/P) return neuro_flak(T, P, neuro_callback, effect_power, FALSE, 1) /datum/ammo/xeno/sticky @@ -2548,16 +2548,16 @@ accuracy_var_high = PROJECTILE_VARIANCE_TIER_4 max_range = 32 -/datum/ammo/xeno/sticky/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/xeno/sticky/on_hit_mob(mob/M,obj/projectile/P) drop_resin(get_turf(P)) -/datum/ammo/xeno/sticky/on_hit_obj(obj/O,obj/item/projectile/P) +/datum/ammo/xeno/sticky/on_hit_obj(obj/O,obj/projectile/P) drop_resin(get_turf(P)) -/datum/ammo/xeno/sticky/on_hit_turf(turf/T,obj/item/projectile/P) +/datum/ammo/xeno/sticky/on_hit_turf(turf/T,obj/projectile/P) drop_resin(T) -/datum/ammo/xeno/sticky/do_at_max_range(obj/item/projectile/P) +/datum/ammo/xeno/sticky/do_at_max_range(obj/projectile/P) drop_resin(get_turf(P)) /datum/ammo/xeno/sticky/proc/drop_resin(turf/T) @@ -2590,10 +2590,10 @@ penetration = ARMOR_PENETRATION_TIER_2 shell_speed = AMMO_SPEED_TIER_3 -/datum/ammo/xeno/acid/on_shield_block(mob/M, obj/item/projectile/P) +/datum/ammo/xeno/acid/on_shield_block(mob/M, obj/projectile/P) burst(M,P,damage_type) -/datum/ammo/xeno/acid/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/xeno/acid/on_hit_mob(mob/M, obj/projectile/P) if(iscarbon(M)) var/mob/living/carbon/C = M if(C.status_flags & XENO_HOST && HAS_TRAIT(C, TRAIT_NESTED) || C.stat == DEAD) @@ -2606,7 +2606,7 @@ damage = 30 max_range = 6 -/datum/ammo/xeno/acid/spatter/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/xeno/acid/spatter/on_hit_mob(mob/M, obj/projectile/P) . = ..() if(. == FALSE) return @@ -2638,7 +2638,7 @@ apply_delegate = FALSE -/datum/ammo/xeno/acid/prae_nade/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/xeno/acid/prae_nade/on_hit_mob(mob/M, obj/projectile/P) if (!ishuman(M)) return @@ -2668,16 +2668,16 @@ shell_speed = AMMO_SPEED_TIER_1 scatter = SCATTER_AMOUNT_TIER_10 -/datum/ammo/xeno/prae_skillshot/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/xeno/prae_skillshot/on_hit_mob(mob/M, obj/projectile/P) acid_stacks_aoe(get_turf(P)) -/datum/ammo/xeno/prae_skillshot/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/xeno/prae_skillshot/on_hit_obj(obj/O, obj/projectile/P) acid_stacks_aoe(get_turf(P)) -/datum/ammo/xeno/prae_skillshot/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/xeno/prae_skillshot/on_hit_turf(turf/T, obj/projectile/P) acid_stacks_aoe(get_turf(P)) -/datum/ammo/xeno/prae_skillshot/do_at_max_range(obj/item/projectile/P) +/datum/ammo/xeno/prae_skillshot/do_at_max_range(obj/projectile/P) acid_stacks_aoe(get_turf(P)) /datum/ammo/xeno/prae_skillshot/proc/acid_stacks_aoe(turf/T) @@ -2729,7 +2729,7 @@ smoke_system = null . = ..() -/datum/ammo/xeno/boiler_gas/on_hit_mob(mob/moob, obj/item/projectile/proj) +/datum/ammo/xeno/boiler_gas/on_hit_mob(mob/moob, obj/projectile/proj) if(iscarbon(moob)) var/mob/living/carbon/carbon = moob if(carbon.status_flags & XENO_HOST && HAS_TRAIT(carbon, TRAIT_NESTED) || carbon.stat == DEAD) @@ -2742,22 +2742,22 @@ to_chat(moob, SPAN_HIGHDANGER("Neurotoxic liquid spreads all over you and immediately soaks into your pores and orifices! Oh fuck!")) // Fucked up but have a chance to escape rather than being game-ended drop_nade(get_turf(proj), proj,TRUE) -/datum/ammo/xeno/boiler_gas/on_hit_obj(obj/outbacksteakhouse, obj/item/projectile/proj) +/datum/ammo/xeno/boiler_gas/on_hit_obj(obj/outbacksteakhouse, obj/projectile/proj) drop_nade(get_turf(proj), proj) -/datum/ammo/xeno/boiler_gas/on_hit_turf(turf/Turf, obj/item/projectile/proj) +/datum/ammo/xeno/boiler_gas/on_hit_turf(turf/Turf, obj/projectile/proj) if(Turf.density && isturf(proj.loc)) drop_nade(proj.loc, proj) //we don't want the gas globs to land on dense turfs, they block smoke expansion. else drop_nade(Turf, proj) -/datum/ammo/xeno/boiler_gas/do_at_max_range(obj/item/projectile/proj) +/datum/ammo/xeno/boiler_gas/do_at_max_range(obj/projectile/proj) drop_nade(get_turf(proj), proj) -/datum/ammo/xeno/boiler_gas/proc/set_xeno_smoke(obj/item/projectile/proj) +/datum/ammo/xeno/boiler_gas/proc/set_xeno_smoke(obj/projectile/proj) smoke_system = new /datum/effect_system/smoke_spread/xeno_weaken() -/datum/ammo/xeno/boiler_gas/proc/drop_nade(turf/turf, obj/item/projectile/proj) +/datum/ammo/xeno/boiler_gas/proc/drop_nade(turf/turf, obj/projectile/proj) var/lifetime_mult = 1.0 var/datum/cause_data if(isboiler(proj.firer)) @@ -2776,10 +2776,10 @@ smokerange = 3 -/datum/ammo/xeno/boiler_gas/acid/set_xeno_smoke(obj/item/projectile/proj) +/datum/ammo/xeno/boiler_gas/acid/set_xeno_smoke(obj/projectile/proj) smoke_system = new /datum/effect_system/smoke_spread/xeno_acid() -/datum/ammo/xeno/boiler_gas/acid/on_hit_mob(mob/moob, obj/item/projectile/proj) +/datum/ammo/xeno/boiler_gas/acid/on_hit_mob(mob/moob, obj/projectile/proj) if(iscarbon(moob)) var/mob/living/carbon/carbon = moob if(carbon.status_flags & XENO_HOST && HAS_TRAIT(carbon, TRAIT_NESTED) || carbon.stat == DEAD) @@ -2807,7 +2807,7 @@ shrapnel_type = /obj/item/shard/shrapnel/bone_chips shrapnel_chance = 60 -/datum/ammo/xeno/bone_chips/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/xeno/bone_chips/on_hit_mob(mob/M, obj/projectile/P) if(iscarbon(M)) var/mob/living/carbon/C = M if((HAS_FLAG(C.status_flags, XENO_HOST) && HAS_TRAIT(C, TRAIT_NESTED)) || C.stat == DEAD) @@ -2837,7 +2837,7 @@ damage = 10 shrapnel_chance = 0 -/datum/ammo/xeno/bone_chips/spread/runner/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/xeno/bone_chips/spread/runner/on_hit_mob(mob/M, obj/projectile/P) if(iscarbon(M)) var/mob/living/carbon/C = M if((HAS_FLAG(C.status_flags, XENO_HOST) && HAS_TRAIT(C, TRAIT_NESTED)) || C.stat == DEAD) @@ -2858,12 +2858,12 @@ max_range = 4 accuracy = HIT_ACCURACY_TIER_MAX -/datum/ammo/xeno/oppressor_tail/on_bullet_generation(obj/item/projectile/generated_projectile, mob/bullet_generator) +/datum/ammo/xeno/oppressor_tail/on_bullet_generation(obj/projectile/generated_projectile, mob/bullet_generator) //The projectile has no icon, so the overlay shows up in FRONT of the projectile, and the beam connects to it in the middle. var/image/hook_overlay = new(icon = 'icons/effects/beam.dmi', icon_state = "oppressor_tail_hook", layer = BELOW_MOB_LAYER) generated_projectile.overlays += hook_overlay -/datum/ammo/xeno/oppressor_tail/on_hit_mob(mob/target, obj/item/projectile/fired_proj) +/datum/ammo/xeno/oppressor_tail/on_hit_mob(mob/target, obj/projectile/fired_proj) var/mob/living/carbon/xenomorph/xeno_firer = fired_proj.firer if(xeno_firer.can_not_harm(target)) return @@ -2904,7 +2904,7 @@ shell_speed = AMMO_SPEED_TIER_2 shrapnel_chance = 5 -/datum/ammo/bullet/shrapnel/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/bullet/shrapnel/on_hit_obj(obj/O, obj/projectile/P) if(istype(O, /obj/structure/barricade)) var/obj/structure/barricade/B = O B.health -= rand(2, 5) @@ -2929,7 +2929,7 @@ shell_speed = AMMO_SPEED_TIER_3//she fast af boi penetration = ARMOR_PENETRATION_TIER_5 -/datum/ammo/bullet/shrapnel/hornet_rounds/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/shrapnel/hornet_rounds/on_hit_mob(mob/M, obj/projectile/P) . = ..() M.AddComponent(/datum/component/bonus_damage_stack, 10, world.time) @@ -3015,7 +3015,7 @@ shrapnel_chance = SHRAPNEL_CHANCE_TIER_2 accuracy = HIT_ACCURACY_TIER_MAX -/datum/ammo/bullet/shrapnel/jagged/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/bullet/shrapnel/jagged/on_hit_mob(mob/M, obj/projectile/P) if(isxeno(M)) M.apply_effect(0.4, SLOW) @@ -3077,16 +3077,16 @@ BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_incendiary) )) -/datum/ammo/flamethrower/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/flamethrower/on_hit_mob(mob/M, obj/projectile/P) drop_flame(get_turf(M), P.weapon_cause_data) -/datum/ammo/flamethrower/on_hit_obj(obj/O, obj/item/projectile/P) +/datum/ammo/flamethrower/on_hit_obj(obj/O, obj/projectile/P) drop_flame(get_turf(O), P.weapon_cause_data) -/datum/ammo/flamethrower/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/flamethrower/on_hit_turf(turf/T, obj/projectile/P) drop_flame(T, P.weapon_cause_data) -/datum/ammo/flamethrower/do_at_max_range(obj/item/projectile/P) +/datum/ammo/flamethrower/do_at_max_range(obj/projectile/P) drop_flame(get_turf(P), P.weapon_cause_data) /datum/ammo/flamethrower/tank_flamer @@ -3157,22 +3157,22 @@ BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_incendiary) )) -/datum/ammo/flare/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/flare/on_hit_mob(mob/M,obj/projectile/P) drop_flare(get_turf(M), P, P.firer) -/datum/ammo/flare/on_hit_obj(obj/O,obj/item/projectile/P) +/datum/ammo/flare/on_hit_obj(obj/O,obj/projectile/P) drop_flare(get_turf(P), P, P.firer) -/datum/ammo/flare/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/flare/on_hit_turf(turf/T, obj/projectile/P) if(T.density && isturf(P.loc)) drop_flare(P.loc, P, P.firer) else drop_flare(T, P, P.firer) -/datum/ammo/flare/do_at_max_range(obj/item/projectile/P, mob/firer) +/datum/ammo/flare/do_at_max_range(obj/projectile/P, mob/firer) drop_flare(get_turf(P), P, P.firer) -/datum/ammo/flare/proc/drop_flare(turf/T, obj/item/projectile/fired_projectile, mob/firer) +/datum/ammo/flare/proc/drop_flare(turf/T, obj/projectile/fired_projectile, mob/firer) var/obj/item/device/flashlight/flare/G = new flare_type(T) var/matrix/rotation = matrix() rotation.Turn(fired_projectile.angle - 90) @@ -3186,7 +3186,7 @@ flare_type = /obj/item/device/flashlight/flare/signal/gun handful_type = /obj/item/device/flashlight/flare/signal -/datum/ammo/flare/signal/drop_flare(turf/T, obj/item/projectile/fired_projectile, mob/firer) +/datum/ammo/flare/signal/drop_flare(turf/T, obj/projectile/fired_projectile, mob/firer) var/obj/item/device/flashlight/flare/signal/gun/signal_flare = ..() signal_flare.activate_signal(firer) if(istype(fired_projectile.shot_from, /obj/item/weapon/gun/flare)) @@ -3224,7 +3224,7 @@ if(istype(target_organ)) target_organ.embed(new can_type) -/datum/ammo/souto/on_hit_mob(mob/M, obj/item/projectile/P) +/datum/ammo/souto/on_hit_mob(mob/M, obj/projectile/P) if(!M || M == P.firer) return if(M.throw_mode && !M.get_active_hand()) //empty active hand and we're in throw mode. If so we catch the can. if(!M.is_mob_incapacitated()) // People who are not able to catch cannot catch. @@ -3245,25 +3245,25 @@ if(P.contents.len) drop_can(P.loc, P) //We make a can at the location. -/datum/ammo/souto/on_hit_obj(obj/O,obj/item/projectile/P) +/datum/ammo/souto/on_hit_obj(obj/O,obj/projectile/P) drop_can(P.loc, P) //We make a can at the location. -/datum/ammo/souto/on_hit_turf(turf/T, obj/item/projectile/P) +/datum/ammo/souto/on_hit_turf(turf/T, obj/projectile/P) drop_can(P.loc, P) //We make a can at the location. -/datum/ammo/souto/do_at_max_range(obj/item/projectile/P) +/datum/ammo/souto/do_at_max_range(obj/projectile/P) drop_can(P.loc, P) //We make a can at the location. -/datum/ammo/souto/on_shield_block(mob/M, obj/item/projectile/P) +/datum/ammo/souto/on_shield_block(mob/M, obj/projectile/P) drop_can(P.loc, P) //We make a can at the location. -/datum/ammo/souto/proc/drop_can(loc, obj/item/projectile/P) +/datum/ammo/souto/proc/drop_can(loc, obj/projectile/P) if(P.contents.len) for(var/obj/item/I in P.contents) I.forceMove(loc) randomize_projectile(P) -/datum/ammo/souto/proc/randomize_projectile(obj/item/projectile/P) +/datum/ammo/souto/proc/randomize_projectile(obj/projectile/P) shrapnel_type = pick(typesof(/obj/item/reagent_container/food/drinks/cans/souto)-/obj/item/reagent_container/food/drinks/cans/souto) /datum/ammo/grenade_container @@ -3278,19 +3278,19 @@ accuracy = HIT_ACCURACY_TIER_3 max_range = 6 -/datum/ammo/grenade_container/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/grenade_container/on_hit_mob(mob/M,obj/projectile/P) drop_nade(P) -/datum/ammo/grenade_container/on_hit_obj(obj/O,obj/item/projectile/P) +/datum/ammo/grenade_container/on_hit_obj(obj/O,obj/projectile/P) drop_nade(P) -/datum/ammo/grenade_container/on_hit_turf(turf/T,obj/item/projectile/P) +/datum/ammo/grenade_container/on_hit_turf(turf/T,obj/projectile/P) drop_nade(P) -/datum/ammo/grenade_container/do_at_max_range(obj/item/projectile/P) +/datum/ammo/grenade_container/do_at_max_range(obj/projectile/P) drop_nade(P) -/datum/ammo/grenade_container/proc/drop_nade(obj/item/projectile/P) +/datum/ammo/grenade_container/proc/drop_nade(obj/projectile/P) var/turf/T = get_turf(P) var/obj/item/explosive/grenade/G = new nade_type(T) G.visible_message(SPAN_WARNING("\A [G] lands on [T]!")) @@ -3317,16 +3317,16 @@ accuracy = HIT_ACCURACY_TIER_3 max_range = 6 -/datum/ammo/hugger_container/on_hit_mob(mob/M,obj/item/projectile/P) +/datum/ammo/hugger_container/on_hit_mob(mob/M,obj/projectile/P) spawn_hugger(get_turf(P)) -/datum/ammo/hugger_container/on_hit_obj(obj/O,obj/item/projectile/P) +/datum/ammo/hugger_container/on_hit_obj(obj/O,obj/projectile/P) spawn_hugger(get_turf(P)) -/datum/ammo/hugger_container/on_hit_turf(turf/T,obj/item/projectile/P) +/datum/ammo/hugger_container/on_hit_turf(turf/T,obj/projectile/P) spawn_hugger(get_turf(P)) -/datum/ammo/hugger_container/do_at_max_range(obj/item/projectile/P) +/datum/ammo/hugger_container/do_at_max_range(obj/projectile/P) spawn_hugger(get_turf(P)) /datum/ammo/hugger_container/proc/spawn_hugger(turf/T) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 257edd9a7720..788205edb05b 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -53,7 +53,7 @@ Ammo will be replaced on New() for things that do not use mags.**/ var/datum/ammo/ammo = null ///What is currently in the chamber. Most guns will want something in the chamber upon creation. - var/obj/item/projectile/in_chamber = null + var/obj/projectile/in_chamber = null /*Ammo mags may or may not be internal, though the difference is a few additional variables. If they are not internal, don't call on those unique vars. This is done for quicker pathing. Just keep in mind most mags aren't internal, though some are. This is also the default magazine path loaded into a projectile weapon for reverse lookups on New(). Leave this null to do your own thing.*/ @@ -951,7 +951,7 @@ and you're good to go. if(active_attachable.current_rounds > 0) //If it's still got ammo and stuff. active_attachable.current_rounds-- - var/obj/item/projectile/bullet = create_bullet(active_attachable.ammo, initial(name)) + var/obj/projectile/bullet = create_bullet(active_attachable.ammo, initial(name)) // For now, only bullet traits from the attachment itself will apply to its projectiles for(var/entry in active_attachable.traits_to_give_attached) var/list/L @@ -971,7 +971,7 @@ and you're good to go. else return ready_in_chamber()//We're not using the active attachable, we must use the active mag if there is one. -/obj/item/weapon/gun/proc/apply_traits(obj/item/projectile/P) +/obj/item/weapon/gun/proc/apply_traits(obj/projectile/P) // Apply bullet traits from gun for(var/entry in traits_to_give) var/list/L @@ -1018,7 +1018,7 @@ and you're good to go. if(isliving(loc)) var/mob/M = loc weapon_source_mob = M - var/obj/item/projectile/P = new /obj/item/projectile(src, create_cause_data(bullet_source, weapon_source_mob)) + var/obj/projectile/P = new /obj/projectile(src, create_cause_data(bullet_source, weapon_source_mob)) P.generate_bullet(chambered, 0, NO_FLAGS) return P @@ -1052,14 +1052,14 @@ and you're good to go. return in_chamber //Returns the projectile if it's actually successful. -/obj/item/weapon/gun/proc/delete_bullet(obj/item/projectile/projectile_to_fire, refund = 0) +/obj/item/weapon/gun/proc/delete_bullet(obj/projectile/projectile_to_fire, refund = 0) if(active_attachable) //Attachables don't chamber rounds, so we want to delete it right away. qdel(projectile_to_fire) //Getting rid of it. Attachables only use ammo after the cycle is over. if(refund) active_attachable.current_rounds++ //Refund the bullet. return 1 -/obj/item/weapon/gun/proc/clear_jam(obj/item/projectile/projectile_to_fire, mob/user as mob) //Guns jamming, great. +/obj/item/weapon/gun/proc/clear_jam(obj/projectile/projectile_to_fire, mob/user as mob) //Guns jamming, great. flags_gun_features &= ~GUN_BURST_FIRING // Also want to turn off bursting, in case that was on. It probably was. delete_bullet(projectile_to_fire, 1) //We're going to clear up anything inside if we need to. //If it's a regular bullet, we're just going to keep it chambered. @@ -1138,7 +1138,7 @@ and you're good to go. return TRUE //The gun should return the bullet that it already loaded from the end cycle of the last Fire(). - var/obj/item/projectile/projectile_to_fire = load_into_chamber(user) //Load a bullet in or check for existing one. + var/obj/projectile/projectile_to_fire = load_into_chamber(user) //Load a bullet in or check for existing one. if(!projectile_to_fire) //If there is nothing to fire, click. click_empty(user) flags_gun_features &= ~GUN_BURST_FIRING @@ -1199,7 +1199,7 @@ and you're good to go. //This is where the projectile leaves the barrel and deals with projectile code only. //vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv in_chamber = null // It's not in the gun anymore - INVOKE_ASYNC(projectile_to_fire, TYPE_PROC_REF(/obj/item/projectile, fire_at), target, user, src, projectile_to_fire?.ammo?.max_range, bullet_velocity, original_target) + INVOKE_ASYNC(projectile_to_fire, TYPE_PROC_REF(/obj/projectile, fire_at), target, user, src, projectile_to_fire?.ammo?.max_range, bullet_velocity, original_target) projectile_to_fire = null // Important: firing might have made projectile collide early and ALREADY have deleted it. We clear it too. //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1267,7 +1267,7 @@ and you're good to go. if(active_attachable && !(active_attachable.flags_attach_features & ATTACH_PROJECTILE)) active_attachable.activate_attachment(src, null, TRUE)//We're not firing off a nade into our mouth. - var/obj/item/projectile/projectile_to_fire = load_into_chamber(user) + var/obj/projectile/projectile_to_fire = load_into_chamber(user) if(projectile_to_fire) //We actually have a projectile, let's move on. user.visible_message(SPAN_WARNING("[user] pulls the trigger!")) var/actual_sound @@ -1367,7 +1367,7 @@ and you're good to go. if(QDELETED(attacked_mob)) //Target deceased. break - var/obj/item/projectile/projectile_to_fire = load_into_chamber(user) + var/obj/projectile/projectile_to_fire = load_into_chamber(user) if(!projectile_to_fire) click_empty(user) break @@ -1398,9 +1398,9 @@ and you're good to go. simulate_recoil(1, user) if(projectile_to_fire.ammo.bonus_projectiles_amount) - var/obj/item/projectile/BP + var/obj/projectile/BP for(var/i in 1 to projectile_to_fire.ammo.bonus_projectiles_amount) - BP = new /obj/item/projectile(attacked_mob.loc, create_cause_data(initial(name), user)) + BP = new /obj/projectile(attacked_mob.loc, create_cause_data(initial(name), user)) BP.generate_bullet(GLOB.ammo_list[projectile_to_fire.ammo.bonus_projectiles_type], 0, NO_FLAGS) BP.accuracy = round(BP.accuracy * projectile_to_fire.accuracy/initial(projectile_to_fire.accuracy)) //Modifies accuracy of pellets per fire_bonus_projectiles. BP.damage *= damage_buff @@ -1567,7 +1567,7 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed to_chat(user, SPAN_DANGER("[current_mag.current_rounds][chambered ? "+1" : ""] / [current_mag.max_rounds] ROUNDS REMAINING")) //This proc applies some bonus effects to the shot/makes the message when a bullet is actually fired. -/obj/item/weapon/gun/proc/apply_bullet_effects(obj/item/projectile/projectile_to_fire, mob/user, reflex = 0, dual_wield = 0) +/obj/item/weapon/gun/proc/apply_bullet_effects(obj/projectile/projectile_to_fire, mob/user, reflex = 0, dual_wield = 0) var/actual_sound = fire_sound if(isnull(fire_sound)) actual_sound = pick(fire_sounds) @@ -1644,7 +1644,7 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed return 1 -/obj/item/weapon/gun/proc/simulate_scatter(obj/item/projectile/projectile_to_fire, atom/target, turf/curloc, turf/targloc, mob/user, bullets_fired = 1) +/obj/item/weapon/gun/proc/simulate_scatter(obj/projectile/projectile_to_fire, atom/target, turf/curloc, turf/targloc, mob/user, bullets_fired = 1) var/fire_angle = Get_Angle(curloc, targloc) var/total_scatter_angle = projectile_to_fire.scatter diff --git a/code/modules/projectiles/gun_attachables.dm b/code/modules/projectiles/gun_attachables.dm index eb0e53986f9d..84202d9cf481 100644 --- a/code/modules/projectiles/gun_attachables.dm +++ b/code/modules/projectiles/gun_attachables.dm @@ -2514,7 +2514,7 @@ Defined in conflicts.dm of the #defines folder. gun.last_fired = world.time gun.current_mag.reagents.remove_reagent(flamer_reagent.id, FLAME_REAGENT_USE_AMOUNT * fuel_per_projectile) - var/obj/item/projectile/P = new(src, create_cause_data(initial(name), user, src)) + var/obj/projectile/P = new(src, create_cause_data(initial(name), user, src)) var/datum/ammo/flamethrower/ammo_datum = new projectile_type ammo_datum.flamer_reagent_type = flamer_reagent.type P.generate_bullet(ammo_datum) diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 5733b01195ff..adca6a7cce6f 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -96,7 +96,7 @@ update_icon() return TRUE -/obj/item/weapon/gun/energy/delete_bullet(obj/item/projectile/projectile_to_fire, refund = 0) +/obj/item/weapon/gun/energy/delete_bullet(obj/projectile/projectile_to_fire, refund = 0) qdel(projectile_to_fire) if(refund) cell.charge += charge_cost return TRUE diff --git a/code/modules/projectiles/guns/lever_action.dm b/code/modules/projectiles/guns/lever_action.dm index 73d9330e2a53..81d7dc166cd3 100644 --- a/code/modules/projectiles/guns/lever_action.dm +++ b/code/modules/projectiles/guns/lever_action.dm @@ -495,7 +495,7 @@ their unique feature is that a direct hit will buff your damage and firerate if(!able_to_fire(user) || !target) //checks here since we don't want to fuck up applying the increase return NONE if(floating_penetration && in_chamber) //has to go before actual firing - var/obj/item/projectile/P = in_chamber + var/obj/projectile/P = in_chamber switch(floating_penetration) if(FLOATING_PENETRATION_TIER_1) P.ammo = GLOB.ammo_list[/datum/ammo/bullet/lever_action/xm88/pen20] @@ -525,7 +525,7 @@ their unique feature is that a direct hit will buff your damage and firerate wield_delay = initial(wield_delay) cur_onehand_chance = initial(cur_onehand_chance) if(in_chamber) - var/obj/item/projectile/P = in_chamber + var/obj/projectile/P = in_chamber P.ammo = GLOB.ammo_list[/datum/ammo/bullet/lever_action/xm88] floating_penetration = FLOATING_PENETRATION_TIER_0 //these are init configs and so cannot be initial() diff --git a/code/modules/projectiles/guns/revolvers.dm b/code/modules/projectiles/guns/revolvers.dm index 7a8782f34d7d..29432a697412 100644 --- a/code/modules/projectiles/guns/revolvers.dm +++ b/code/modules/projectiles/guns/revolvers.dm @@ -182,7 +182,7 @@ rotate_cylinder() return 1 -/obj/item/weapon/gun/revolver/delete_bullet(obj/item/projectile/projectile_to_fire, refund = 0) +/obj/item/weapon/gun/revolver/delete_bullet(obj/projectile/projectile_to_fire, refund = 0) qdel(projectile_to_fire) if(refund && current_mag) current_mag.current_rounds++ diff --git a/code/modules/projectiles/guns/shotguns.dm b/code/modules/projectiles/guns/shotguns.dm index 3c366df40b57..27d2c25a257a 100644 --- a/code/modules/projectiles/guns/shotguns.dm +++ b/code/modules/projectiles/guns/shotguns.dm @@ -590,7 +590,7 @@ can cause issues with ammo types getting mixed up during the burst. //We can't make a projectile without a mag or active attachable. -/obj/item/weapon/gun/shotgun/double/delete_bullet(obj/item/projectile/projectile_to_fire, refund = 0) +/obj/item/weapon/gun/shotgun/double/delete_bullet(obj/projectile/projectile_to_fire, refund = 0) qdel(projectile_to_fire) if(!current_mag) return diff --git a/code/modules/projectiles/guns/specialist.dm b/code/modules/projectiles/guns/specialist.dm index a73335971ffa..fb676852f7a5 100644 --- a/code/modules/projectiles/guns/specialist.dm +++ b/code/modules/projectiles/guns/specialist.dm @@ -155,7 +155,7 @@ if(!check_can_use(target, TRUE)) return - var/obj/item/projectile/aimed_proj = sniper_rifle.in_chamber + var/obj/projectile/aimed_proj = sniper_rifle.in_chamber aimed_proj.projectile_flags |= PROJECTILE_BULLSEYE aimed_proj.AddComponent(/datum/component/homing_projectile, target, human) sniper_rifle.Fire(target, human) @@ -183,7 +183,7 @@ to_chat(H, SPAN_WARNING("\The [M] is too close to get a proper shot!")) return FALSE - var/obj/item/projectile/P = sniper_rifle.in_chamber + var/obj/projectile/P = sniper_rifle.in_chamber // TODO: Make the below logic only occur in certain circumstances. Check goggles, maybe? -Kaga if(check_shot_is_blocked(H, M, P)) to_chat(H, SPAN_WARNING("Something is in the way, or you're out of range!")) @@ -195,7 +195,7 @@ COOLDOWN_START(sniper_rifle, aimed_shot_cooldown, sniper_rifle.aimed_shot_cooldown_delay) return TRUE -/datum/action/item_action/specialist/aimed_shot/proc/check_shot_is_blocked(mob/firer, mob/target, obj/item/projectile/P) +/datum/action/item_action/specialist/aimed_shot/proc/check_shot_is_blocked(mob/firer, mob/target, obj/projectile/P) var/list/turf/path = getline2(firer, target, include_from_atom = FALSE) if(!path.len || get_dist(firer, target) > P.ammo.max_range) return TRUE @@ -1100,7 +1100,7 @@ /obj/item/weapon/gun/launcher/rocket/reload_into_chamber(mob/user) return TRUE -/obj/item/weapon/gun/launcher/rocket/delete_bullet(obj/item/projectile/projectile_to_fire, refund = 0) +/obj/item/weapon/gun/launcher/rocket/delete_bullet(obj/projectile/projectile_to_fire, refund = 0) if(!current_mag) return qdel(projectile_to_fire) @@ -1194,7 +1194,7 @@ current_mag.current_rounds = 0 //Adding in the rocket backblast. The tile behind the specialist gets blasted hard enough to down and slightly wound anyone -/obj/item/weapon/gun/launcher/rocket/apply_bullet_effects(obj/item/projectile/projectile_to_fire, mob/user, i = 1, reflex = 0) +/obj/item/weapon/gun/launcher/rocket/apply_bullet_effects(obj/projectile/projectile_to_fire, mob/user, i = 1, reflex = 0) . = ..() if(!HAS_TRAIT(user, TRAIT_EAR_PROTECTION) && ishuman(user)) var/mob/living/carbon/human/huser = user diff --git a/code/modules/projectiles/homing_projectile_component.dm b/code/modules/projectiles/homing_projectile_component.dm index 92e803de10b1..8fd36fd67f31 100644 --- a/code/modules/projectiles/homing_projectile_component.dm +++ b/code/modules/projectiles/homing_projectile_component.dm @@ -3,7 +3,7 @@ var/atom/homing_target /datum/component/homing_projectile/Initialize(atom/homing_target, mob/shooter) - if(!istype(parent, /obj/item/projectile)) + if(!istype(parent, /obj/projectile)) return COMPONENT_INCOMPATIBLE if(isliving(homing_target)) @@ -13,7 +13,7 @@ if(shooter && ishuman(homing_target)) // Don't track friendlies var/mob/living/carbon/human/human_target = homing_target - var/obj/item/projectile/projectile = parent + var/obj/projectile/projectile = parent if(SEND_SIGNAL(parent, COMSIG_BULLET_CHECK_MOB_SKIPPING, human_target) & COMPONENT_SKIP_MOB\ || projectile.runtime_iff_group && human_target.get_target_lock(projectile.runtime_iff_group)\ ) @@ -33,7 +33,7 @@ return ..() /datum/component/homing_projectile/proc/terminal_retarget() - var/obj/item/projectile/projectile = parent + var/obj/projectile/projectile = parent var/turf/homing_turf = get_turf(homing_target) projectile.speed *= 2 // Double speed to ensure hitting next tick despite eventual movement projectile.retarget(homing_turf, keep_angle = FALSE) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index eccba14a442a..07c04df06b9b 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -4,7 +4,7 @@ #define DEBUG_XENO_DEFENSE 0 //The actual bullet objects. -/obj/item/projectile +/obj/projectile name = "projectile" icon = 'icons/obj/items/weapons/projectiles.dmi' icon_state = "bullet" @@ -70,14 +70,14 @@ /// The flicker that plays when a bullet hits a target. Usually red. Can be nulled so it doesn't show up at all. var/hit_effect_color = "#FF0000" -/obj/item/projectile/Initialize(mapload, datum/cause_data/cause_data) +/obj/projectile/Initialize(mapload, datum/cause_data/cause_data) . = ..() path = list() permutated = list() weapon_cause_data = istype(cause_data) ? cause_data : create_cause_data(cause_data) firer = cause_data?.resolve_mob() -/obj/item/projectile/Destroy() +/obj/projectile/Destroy() speed = 0 ammo = null shot_from = null @@ -92,22 +92,22 @@ SSprojectiles.stop_projectile(src) return ..() -/obj/item/projectile/proc/apply_bullet_trait(list/entry) +/obj/projectile/proc/apply_bullet_trait(list/entry) bullet_traits += list(entry.Copy()) // Need to use the proc instead of the wrapper because each entry is a list _AddElement(entry) -/obj/item/projectile/proc/give_bullet_traits(obj/item/projectile/to_give) +/obj/projectile/proc/give_bullet_traits(obj/projectile/to_give) for(var/list/entry in bullet_traits) to_give.apply_bullet_trait(entry.Copy()) -/obj/item/projectile/Collided(atom/movable/AM) +/obj/projectile/Collided(atom/movable/AM) if(AM && !(AM in permutated)) if(scan_a_turf(AM.loc)) SSprojectiles.stop_projectile(src) qdel(src) -/obj/item/projectile/Crossed(atom/movable/AM) +/obj/projectile/Crossed(atom/movable/AM) /* Fun fact: Crossed is called for any contents involving operations. * This notably means, inserting a magazing in a gun Crossed() it with the bullets in the gun. */ if(!loc?.z) @@ -118,10 +118,10 @@ qdel(src) -/obj/item/projectile/ex_act() +/obj/projectile/ex_act() return FALSE //We do not want anything to delete these, simply to make sure that all the bullet references are not runtiming. Otherwise, constantly need to check if the bullet exists. -/obj/item/projectile/proc/generate_bullet(datum/ammo/ammo_datum, bonus_damage = 0, special_flags = 0, mob/bullet_generator) +/obj/projectile/proc/generate_bullet(datum/ammo/ammo_datum, bonus_damage = 0, special_flags = 0, mob/bullet_generator) ammo = ammo_datum name = ammo.name icon = ammo.icon @@ -150,7 +150,7 @@ // Need to use the proc instead of the wrapper because each entry is a list apply_bullet_trait(L) -/obj/item/projectile/proc/calculate_damage() +/obj/projectile/proc/calculate_damage() if(effective_range_min && distance_travelled < effective_range_min) return max(0, damage - round((effective_range_min - distance_travelled) * damage_buildup)) else if(distance_travelled > effective_range_max) @@ -158,7 +158,7 @@ return damage // Target, firer, shot from (i.e. the gun), projectile range, projectile speed, original target (who was aimed at, not where projectile is going towards) -/obj/item/projectile/proc/fire_at(atom/target, atom/F, atom/S, range = 30, speed = 1, atom/original_override) +/obj/projectile/proc/fire_at(atom/target, atom/F, atom/S, range = 30, speed = 1, atom/original_override) SHOULD_NOT_SLEEP(TRUE) original = original || original_override || target if(!loc) @@ -223,7 +223,7 @@ // Finally queue it to Subsystem for further processing SSprojectiles.queue_projectile(src) -/obj/item/projectile/proc/update_angle(turf/source_turf, turf/aim_turf) +/obj/projectile/proc/update_angle(turf/source_turf, turf/aim_turf) p_x = Clamp(p_x, -16, 16) p_y = Clamp(p_y, -16, 16) @@ -250,7 +250,7 @@ rotate.Turn(angle) apply_transform(rotate) -/obj/item/projectile/process(delta_time) +/obj/projectile/process(delta_time) . = PROC_RETURN_SLEEP // Keep going as long as we got speed and time @@ -267,7 +267,7 @@ return FALSE /// Flies the projectile forward one single turf -/obj/item/projectile/proc/fly() +/obj/projectile/proc/fly() SHOULD_NOT_SLEEP(TRUE) PRIVATE_PROC(TRUE) var/turf/current_turf = get_turf(src) @@ -332,14 +332,14 @@ pixel_x = Clamp(dx, -16, 16) pixel_y = Clamp(dy, -16, 16) -/obj/item/projectile/proc/retarget(atom/new_target, keep_angle = FALSE) +/obj/projectile/proc/retarget(atom/new_target, keep_angle = FALSE) var/turf/current_turf = get_turf(src) path = getline2(current_turf, new_target) path.Cut(1, 2) // remove the turf we're already on var/atom/source = keep_angle ? original : current_turf update_angle(source, new_target) -/obj/item/projectile/proc/scan_a_turf(turf/T, proj_dir) +/obj/projectile/proc/scan_a_turf(turf/T, proj_dir) . = TRUE // Sleep safeguard: stop the bullet //Not actually flying? Should not be hitting anything. @@ -400,7 +400,7 @@ return TRUE return FALSE -/obj/item/projectile/proc/handle_object(obj/O) +/obj/projectile/proc/handle_object(obj/O) // If we've already handled this atom, don't do it again if(O in permutated) return FALSE @@ -436,7 +436,7 @@ if(SEND_SIGNAL(src, COMSIG_BULLET_POST_HANDLE_OBJ, O, .) & COMPONENT_BULLET_PASS_THROUGH) return FALSE -/obj/item/projectile/proc/handle_mob(mob/living/L) +/obj/projectile/proc/handle_mob(mob/living/L) // If we've already handled this atom, don't do it again if(SEND_SIGNAL(src, COMSIG_BULLET_PRE_HANDLE_MOB, L, .) & COMPONENT_BULLET_PASS_THROUGH) @@ -525,7 +525,7 @@ //---------------------------------------------------------- -/obj/item/projectile/proc/get_effective_accuracy() +/obj/projectile/proc/get_effective_accuracy() #if DEBUG_HIT_CHANCE to_world(SPAN_DEBUG("Base accuracy is [accuracy]; scatter: [scatter]; distance: [distance_travelled]")) #endif @@ -553,7 +553,7 @@ return effective_accuracy //objects use get_projectile_hit_boolean unlike mobs, which use get_projectile_hit_chance -/obj/proc/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/proc/get_projectile_hit_boolean(obj/projectile/P) if(!density) return FALSE @@ -563,7 +563,7 @@ return TRUE //Used by machines and structures to calculate shooting past cover -/obj/proc/calculate_cover_hit_boolean(obj/item/projectile/P, distance = 0, cade_direction_correct = FALSE) +/obj/proc/calculate_cover_hit_boolean(obj/projectile/P, distance = 0, cade_direction_correct = FALSE) if(istype(P.shot_from, /obj/item/hardpoint)) //anything shot from a tank gets a bonus to bypassing cover distance -= 3 @@ -583,7 +583,7 @@ return prob(hitchance) -/obj/structure/machinery/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/structure/machinery/get_projectile_hit_boolean(obj/projectile/P) if(src == P.original && layer > ATMOS_DEVICE_LAYER) //clicking on the object itself hits the object var/hitchance = P.get_effective_accuracy() @@ -622,7 +622,7 @@ return calculate_cover_hit_boolean(P, distance) -/obj/structure/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/structure/get_projectile_hit_boolean(obj/projectile/P) if(src == P.original && layer > ATMOS_DEVICE_LAYER) //clicking on the object itself hits the object var/hitchance = P.get_effective_accuracy() @@ -668,7 +668,7 @@ return calculate_cover_hit_boolean(P, distance, cade_direction_correct) -/obj/item/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/item/get_projectile_hit_boolean(obj/projectile/P) if(P && src == P.original) //clicking on the object itself. Code copied from mob get_projectile_hit_chance @@ -700,7 +700,7 @@ return TRUE -/obj/vehicle/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/vehicle/get_projectile_hit_boolean(obj/projectile/P) if(src == P.original) //clicking on the object itself hits the object var/hitchance = P.get_effective_accuracy() @@ -721,30 +721,30 @@ return TRUE -/obj/structure/window/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/structure/window/get_projectile_hit_boolean(obj/projectile/P) var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags if(ammo_flags & AMMO_ENERGY) return FALSE else if(!(flags_atom & ON_BORDER) || (P.dir & dir) || (P.dir & reverse_direction(dir))) return TRUE -/obj/structure/machinery/door/poddoor/railing/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/structure/machinery/door/poddoor/railing/get_projectile_hit_boolean(obj/projectile/P) return src == P.original -/obj/effect/alien/egg/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/effect/alien/egg/get_projectile_hit_boolean(obj/projectile/P) return src == P.original -/obj/effect/alien/resin/trap/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/effect/alien/resin/trap/get_projectile_hit_boolean(obj/projectile/P) return src == P.original -/obj/item/clothing/mask/facehugger/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/item/clothing/mask/facehugger/get_projectile_hit_boolean(obj/projectile/P) return src == P.original //mobs use get_projectile_hit_chance instead of get_projectile_hit_boolean -/mob/living/proc/get_projectile_hit_chance(obj/item/projectile/P) +/mob/living/proc/get_projectile_hit_chance(obj/projectile/P) if(lying && src != P.original) return FALSE var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags @@ -761,7 +761,7 @@ if(!can_see(shooter_living,src)) . -= 15 //Can't see the target (Opaque thing between shooter and target) -/mob/living/carbon/human/get_projectile_hit_chance(obj/item/projectile/P) +/mob/living/carbon/human/get_projectile_hit_chance(obj/projectile/P) . = ..() if(.) var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags @@ -782,7 +782,7 @@ else return FALSE -/mob/living/carbon/xenomorph/get_projectile_hit_chance(obj/item/projectile/P) +/mob/living/carbon/xenomorph/get_projectile_hit_chance(obj/projectile/P) . = ..() if(.) var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags @@ -801,17 +801,17 @@ if(evasion > 0) . -= evasion -/mob/living/silicon/robot/drone/get_projectile_hit_chance(obj/item/projectile/P) +/mob/living/silicon/robot/drone/get_projectile_hit_chance(obj/projectile/P) return FALSE // just stop them getting hit by projectiles completely -/obj/item/projectile/proc/play_hit_effect(mob/hit_mob) +/obj/projectile/proc/play_hit_effect(mob/hit_mob) if(ammo.sound_hit) playsound(hit_mob, ammo.sound_hit, 50, 1) if(hit_mob.stat != DEAD && !isnull(hit_effect_color)) animation_flash_color(hit_mob, hit_effect_color) -/obj/item/projectile/proc/play_shielded_hit_effect(mob/hit_mob) +/obj/projectile/proc/play_shielded_hit_effect(mob/hit_mob) if(ammo.sound_shield_hit) playsound(hit_mob, ammo.sound_shield_hit, 50, 1) if(hit_mob.stat != DEAD && !isnull(hit_effect_color)) @@ -824,13 +824,13 @@ // \\ //---------------------------------------------------------- -/atom/proc/bullet_act(obj/item/projectile/P) +/atom/proc/bullet_act(obj/projectile/P) return FALSE -/mob/dead/bullet_act(/obj/item/projectile/P) +/mob/dead/bullet_act(/obj/projectile/P) return FALSE -/mob/living/bullet_act(obj/item/projectile/P) +/mob/living/bullet_act(obj/projectile/P) if(!P) return @@ -848,7 +848,7 @@ SEND_SIGNAL(P, COMSIG_BULLET_ACT_LIVING, src, damage, damage) -/mob/living/carbon/human/bullet_act(obj/item/projectile/P) +/mob/living/carbon/human/bullet_act(obj/projectile/P) if(!P) return @@ -961,7 +961,7 @@ SEND_SIGNAL(P, COMSIG_POST_BULLET_ACT_HUMAN, src, damage, damage_result) //Deal with xeno bullets. -/mob/living/carbon/xenomorph/bullet_act(obj/item/projectile/P) +/mob/living/carbon/xenomorph/bullet_act(obj/projectile/P) if(!P || !istype(P)) return @@ -1042,7 +1042,7 @@ return TRUE -/turf/bullet_act(obj/item/projectile/P) +/turf/bullet_act(obj/projectile/P) if(SEND_SIGNAL(src, COMSIG_TURF_BULLET_ACT, P) & COMPONENT_BULLET_ACT_OVERRIDE) return @@ -1066,7 +1066,7 @@ return // walls can get shot and damaged, but bullets (vs energy guns) do much less. -/turf/closed/wall/bullet_act(obj/item/projectile/P) +/turf/closed/wall/bullet_act(obj/projectile/P) . = ..() var/damage = P.damage if(damage < 1) @@ -1086,7 +1086,7 @@ current_bulletholes++ take_damage(damage, P.firer) -/turf/closed/wall/almayer/research/containment/bullet_act(obj/item/projectile/P) +/turf/closed/wall/almayer/research/containment/bullet_act(obj/projectile/P) if(P) var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags if(ammo_flags & AMMO_ACIDIC) @@ -1098,17 +1098,17 @@ //Hitting an object. These are too numerous so they're staying in their files. //Why are there special cases listed here? Oh well, whatever. ~N -/obj/bullet_act(obj/item/projectile/P) +/obj/bullet_act(obj/projectile/P) bullet_ping(P) return TRUE -/obj/item/bullet_act(obj/item/projectile/P) +/obj/item/bullet_act(obj/projectile/P) bullet_ping(P) if(P.ammo.damage_type == BRUTE) explosion_throw(P.damage/2, P.dir, 4) return TRUE -/obj/structure/surface/table/bullet_act(obj/item/projectile/P) +/obj/structure/surface/table/bullet_act(obj/projectile/P) bullet_ping(P) health -= round(P.damage/2) if(health < 0) @@ -1126,7 +1126,7 @@ //This is where the bullet bounces off. -/atom/proc/bullet_ping(obj/item/projectile/P, pixel_x_offset = 0, pixel_y_offset = 0) +/atom/proc/bullet_ping(obj/projectile/P, pixel_x_offset = 0, pixel_y_offset = 0) if(!P || !P.ammo.ping) return @@ -1146,7 +1146,7 @@ /// People getting shot by a large amount of bullets in a very short period of time can lag them out, with chat messages being one cause, so a 1s cooldown per hit message is introduced to assuage that /mob/var/shot_cooldown = 0 -/mob/proc/bullet_message(obj/item/projectile/P) +/mob/proc/bullet_message(obj/projectile/P) if(!P) return if(COOLDOWN_FINISHED(src, shot_cooldown)) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 11d310123089..c7b3d3e1bae2 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -367,7 +367,7 @@ return /obj/structure/machinery/disposal/deliveryChute/Collided(atom/movable/AM) //Go straight into the chute - if(istype(AM, /obj/item/projectile) || istype(AM, /obj/effect)) return + if(istype(AM, /obj/projectile) || istype(AM, /obj/effect)) return switch(dir) if(NORTH) if(AM.loc.y != src.loc.y+1) return diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm index ecf1bacf080b..12235e7ac19b 100644 --- a/code/modules/shuttles/shuttle_console.dm +++ b/code/modules/shuttles/shuttle_console.dm @@ -335,7 +335,7 @@ GLOBAL_LIST_EMPTY(shuttle_controls) ui_interact(usr) -/obj/structure/machinery/computer/shuttle_control/bullet_act(obj/item/projectile/Proj) +/obj/structure/machinery/computer/shuttle_control/bullet_act(obj/projectile/Proj) visible_message("[Proj] ricochets off [src]!") return 0 diff --git a/code/modules/teleporters/teleporter_console.dm b/code/modules/teleporters/teleporter_console.dm index bdd62f67fdad..b9a3629c881d 100644 --- a/code/modules/teleporters/teleporter_console.dm +++ b/code/modules/teleporters/teleporter_console.dm @@ -166,7 +166,7 @@ ..() -/obj/structure/machinery/computer/teleporter_console/bullet_act(obj/item/projectile/P) +/obj/structure/machinery/computer/teleporter_console/bullet_act(obj/projectile/P) visible_message("[P] doesn't even scratch [src]!") return FALSE diff --git a/code/modules/tents/blockers.dm b/code/modules/tents/blockers.dm index 24765ca2a284..3c02ca326149 100644 --- a/code/modules/tents/blockers.dm +++ b/code/modules/tents/blockers.dm @@ -34,7 +34,7 @@ PF.flags_can_pass_front = NONE PF.flags_can_pass_behind = NONE -/obj/structure/blocker/tent/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/structure/blocker/tent/get_projectile_hit_boolean(obj/projectile/P) . = ..() return FALSE // Always fly through the tent diff --git a/code/modules/tents/deployed_tents.dm b/code/modules/tents/deployed_tents.dm index d55fe6b59879..9ea06e357d9e 100644 --- a/code/modules/tents/deployed_tents.dm +++ b/code/modules/tents/deployed_tents.dm @@ -112,7 +112,7 @@ playsound(src, 'sound/items/paper_ripped.ogg', 25, 1) qdel(src) -/obj/structure/tent/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/structure/tent/get_projectile_hit_boolean(obj/projectile/P) . = ..() return FALSE // Always fly through the tent diff --git a/code/modules/tents/equipment.dm b/code/modules/tents/equipment.dm index f2f9175a240e..0d47c7e3ce62 100644 --- a/code/modules/tents/equipment.dm +++ b/code/modules/tents/equipment.dm @@ -87,7 +87,7 @@ AddComponent(/datum/component/tent_supported_object) update_icon() -/obj/structure/tent_curtain/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/structure/tent_curtain/get_projectile_hit_boolean(obj/projectile/P) return FALSE /obj/structure/tent_curtain/update_icon() diff --git a/code/modules/vehicles/hardpoints/hardpoint.dm b/code/modules/vehicles/hardpoints/hardpoint.dm index 2fc49384075b..ee49ebc0ab57 100644 --- a/code/modules/vehicles/hardpoints/hardpoint.dm +++ b/code/modules/vehicles/hardpoints/hardpoint.dm @@ -134,7 +134,7 @@ return /obj/item/hardpoint/proc/generate_bullet(mob/user, turf/origin_turf) - var/obj/item/projectile/P = new(origin_turf, create_cause_data(initial(name), user)) + var/obj/projectile/P = new(origin_turf, create_cause_data(initial(name), user)) P.generate_bullet(new ammo.default_ammo) // Apply bullet traits from gun for(var/entry in traits_to_give) @@ -552,7 +552,7 @@ var/turf/origin_turf = get_turf(src) origin_turf = locate(origin_turf.x + origins[1], origin_turf.y + origins[2], origin_turf.z) - var/obj/item/projectile/P = generate_bullet(user, origin_turf) + var/obj/projectile/P = generate_bullet(user, origin_turf) SEND_SIGNAL(P, COMSIG_BULLET_USER_EFFECTS, user) P.fire_at(A, user, src, P.ammo.max_range, P.ammo.shell_speed) diff --git a/code/modules/vehicles/hardpoints/holder/tank_turret.dm b/code/modules/vehicles/hardpoints/holder/tank_turret.dm index db67dadb132d..27ab6c95404c 100644 --- a/code/modules/vehicles/hardpoints/holder/tank_turret.dm +++ b/code/modules/vehicles/hardpoints/holder/tank_turret.dm @@ -223,7 +223,7 @@ origin_turf = locate(origin_turf.x + origins[1], origin_turf.y + origins[2], origin_turf.z) origin_turf = get_step(get_step(origin_turf, owner.dir), owner.dir) //this should get us tile in front of tank to prevent grenade being stuck under us. - var/obj/item/projectile/P = generate_bullet(user, origin_turf) + var/obj/projectile/P = generate_bullet(user, origin_turf) SEND_SIGNAL(P, COMSIG_BULLET_USER_EFFECTS, owner.seats[VEHICLE_GUNNER]) P.fire_at(A, owner.seats[VEHICLE_GUNNER], src, get_dist(origin_turf, A) + 1, P.ammo.shell_speed) ammo.current_rounds-- diff --git a/code/modules/vehicles/hardpoints/primary/flamer.dm b/code/modules/vehicles/hardpoints/primary/flamer.dm index 0b77d3671e05..929842df2307 100644 --- a/code/modules/vehicles/hardpoints/primary/flamer.dm +++ b/code/modules/vehicles/hardpoints/primary/flamer.dm @@ -51,7 +51,7 @@ var/range = get_dist(origin_turf, A) + 1 - var/obj/item/projectile/P = generate_bullet(user, origin_turf) + var/obj/projectile/P = generate_bullet(user, origin_turf) SEND_SIGNAL(P, COMSIG_BULLET_USER_EFFECTS, owner.seats[VEHICLE_GUNNER]) P.fire_at(A, owner.seats[VEHICLE_GUNNER], src, range < P.ammo.max_range ? range : P.ammo.max_range, P.ammo.shell_speed) diff --git a/code/modules/vehicles/hardpoints/secondary/grenade_launcher.dm b/code/modules/vehicles/hardpoints/secondary/grenade_launcher.dm index ee18443d7b7e..8151a1ee50c1 100644 --- a/code/modules/vehicles/hardpoints/secondary/grenade_launcher.dm +++ b/code/modules/vehicles/hardpoints/secondary/grenade_launcher.dm @@ -56,7 +56,7 @@ if(range > max_range) range = max_range - var/obj/item/projectile/P = generate_bullet(user, origin_turf) + var/obj/projectile/P = generate_bullet(user, origin_turf) SEND_SIGNAL(P, COMSIG_BULLET_USER_EFFECTS, owner.seats[VEHICLE_GUNNER]) P.fire_at(A, owner.seats[VEHICLE_GUNNER], src, P.ammo.max_range, P.ammo.shell_speed) diff --git a/code/modules/vehicles/interior/interactable/doors.dm b/code/modules/vehicles/interior/interactable/doors.dm index 04f0cf65aaae..12b54bd425e4 100644 --- a/code/modules/vehicles/interior/interactable/doors.dm +++ b/code/modules/vehicles/interior/interactable/doors.dm @@ -14,7 +14,7 @@ // Which entrance to exit through var/entrance_id = null -/obj/structure/interior_exit/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/structure/interior_exit/get_projectile_hit_boolean(obj/projectile/P) return FALSE /obj/structure/interior_exit/attack_hand(mob/M) diff --git a/code/modules/vehicles/interior/interior_hull.dm b/code/modules/vehicles/interior/interior_hull.dm index 7e049395bdc6..70b4cb8501f1 100644 --- a/code/modules/vehicles/interior/interior_hull.dm +++ b/code/modules/vehicles/interior/interior_hull.dm @@ -18,7 +18,7 @@ unslashable = TRUE indestructible = TRUE -/obj/structure/interior_wall/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/structure/interior_wall/get_projectile_hit_boolean(obj/projectile/P) return FALSE /obj/structure/interior_wall/ex_act() @@ -41,7 +41,7 @@ alpha = 80 -/obj/effect/vehicle_roof/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/effect/vehicle_roof/get_projectile_hit_boolean(obj/projectile/P) return FALSE /obj/effect/vehicle_roof/ex_act() diff --git a/code/modules/vehicles/multitile/multitile_interaction.dm b/code/modules/vehicles/multitile/multitile_interaction.dm index ca2b5922ecf0..6dd5e905f185 100644 --- a/code/modules/vehicles/multitile/multitile_interaction.dm +++ b/code/modules/vehicles/multitile/multitile_interaction.dm @@ -283,7 +283,7 @@ //Differentiates between damage types from different bullets //Applies a linear transformation to bullet damage that will generally decrease damage done -/obj/vehicle/multitile/bullet_act(obj/item/projectile/P) +/obj/vehicle/multitile/bullet_act(obj/projectile/P) var/dam_type = "bullet" var/damage = P.damage var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags diff --git a/code/modules/vehicles/van/van.dm b/code/modules/vehicles/van/van.dm index 5e9e467bf56d..14227a815b7f 100644 --- a/code/modules/vehicles/van/van.dm +++ b/code/modules/vehicles/van/van.dm @@ -218,7 +218,7 @@ /obj/vehicle/multitile/van/proc/reset_overdrive() misc_multipliers["move"] += overdrive_speed_mult -/obj/vehicle/multitile/van/get_projectile_hit_boolean(obj/item/projectile/P) +/obj/vehicle/multitile/van/get_projectile_hit_boolean(obj/projectile/P) if(src == P.original) //clicking on the van itself will hit it. var/hitchance = P.get_effective_accuracy() if(prob(hitchance)) diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 0681b7df05ac..b6a6992ac4da 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -99,7 +99,7 @@ new /obj/effect/decal/cleanable/blood/oil(src.loc) healthcheck() -/obj/vehicle/bullet_act(obj/item/projectile/P) +/obj/vehicle/bullet_act(obj/projectile/P) var/damage = P.damage health -= damage ..()