/obj/item/projectile --> /obj/projectile (#30411)

* yers

* vars

* map changes

* some comments (clearly not stolen from items)

* fix component

* summary
This commit is contained in:
kyunkyunkyun
2025-11-12 10:23:20 +00:00
committed by GitHub
parent e92a45369a
commit f96b26b75a
169 changed files with 858 additions and 851 deletions
@@ -20,12 +20,12 @@
/obj/item/gun/projectile/c_foam_launcher/update_icon_state()
icon_state = "c_foam_launcher[magazine ? "_loaded" : ""]"
/obj/item/projectile/c_foam
/obj/projectile/c_foam
name = "blob of foam"
icon_state = "foam_blob"
damage = 0
/obj/item/projectile/c_foam/on_hit(atom/target, blocked, hit_zone)
/obj/projectile/c_foam/on_hit(atom/target, blocked, hit_zone)
. = ..()
if(isairlock(target))
var/obj/machinery/door/airlock = target
@@ -117,7 +117,7 @@
TED.pass_mind(M)
/obj/item/projectile/energy/chrono_beam
/obj/projectile/energy/chrono_beam
name = "eradication beam"
icon_state = "chronobolt"
range = CHRONO_BEAM_RANGE
@@ -125,21 +125,21 @@
nodamage = 1
var/obj/item/gun/energy/chrono_gun/gun = null
/obj/item/projectile/energy/chrono_beam/fire()
/obj/projectile/energy/chrono_beam/fire()
gun = firer.get_active_hand()
if(istype(gun))
return ..()
else
return 0
/obj/item/projectile/energy/chrono_beam/on_hit(atom/target)
/obj/projectile/energy/chrono_beam/on_hit(atom/target)
if(target && gun && isliving(target))
var/obj/structure/chrono_field/F = new(target.loc, target, gun)
gun.field_connect(F)
/obj/item/ammo_casing/energy/chrono_beam
name = "eradication beam"
projectile_type = /obj/item/projectile/energy/chrono_beam
projectile_type = /obj/projectile/energy/chrono_beam
muzzle_flash_color = null
icon = 'icons/obj/projectiles.dmi'
icon_state = "chronobolt"
@@ -228,9 +228,9 @@
qdel(src)
/obj/structure/chrono_field/bullet_act(obj/item/projectile/P)
if(istype(P, /obj/item/projectile/energy/chrono_beam))
var/obj/item/projectile/energy/chrono_beam/beam = P
/obj/structure/chrono_field/bullet_act(obj/projectile/P)
if(istype(P, /obj/projectile/energy/chrono_beam))
var/obj/projectile/energy/chrono_beam/beam = P
var/obj/item/gun/energy/chrono_gun/Pgun = beam.gun
if(Pgun && istype(Pgun))
Pgun.field_connect(src)
@@ -292,7 +292,7 @@
create_with_tank = TRUE
/obj/item/flamethrower/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
var/obj/item/projectile/P = hitby
var/obj/projectile/P = hitby
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
owner.visible_message("<span class='danger'>[attack_text] hits the fueltank on [owner]'s [src], rupturing it! What a shot!</span>")
var/turf/target_turf = get_turf(owner)
@@ -115,7 +115,7 @@
prime()
/obj/item/grenade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
var/obj/item/projectile/P = hitby
var/obj/projectile/P = hitby
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
owner.visible_message("<span class='userdanger'>[hitby] hits [owner]'s [name], setting it off! What a shot!</span>")
var/turf/T = get_turf(src)
@@ -8,7 +8,7 @@
/// How much shrapnel the grenade will launch.
var/shrapnel_contained = 20
/// The type of projectile that will fired.
var/embedded_type = /obj/item/projectile/bullet/shrapnel
var/embedded_type = /obj/projectile/bullet/shrapnel
/obj/item/grenade/frag/prime()
update_mob()
@@ -22,7 +22,7 @@
icon_state = "stinger"
modifiable_timer = FALSE
shrapnel_contained = 50
embedded_type = /obj/item/projectile/bullet/pellet/rubber/stinger
embedded_type = /obj/projectile/bullet/pellet/rubber/stinger
/obj/item/grenade/frag/stinger/prime()
update_mob()
@@ -33,7 +33,7 @@
/**
* Shrapnel that flies through the air and hits you
*/
/obj/item/projectile/bullet/shrapnel
/obj/projectile/bullet/shrapnel
name = "shrapnel"
icon_state = "magspear"
gender = PLURAL
@@ -42,7 +42,7 @@
var/embed_prob = 100 //reduced by armor
var/embedded_type = /obj/item/shrapnel
/obj/item/projectile/bullet/shrapnel/on_hit(atom/target, blocked)
/obj/projectile/bullet/shrapnel/on_hit(atom/target, blocked)
. = ..()
var/obj/item/new_possible_embed = new embedded_type(get_turf(src)) // drop it on the floor if we hit somethig non-living
if(!.)
@@ -56,7 +56,7 @@
return
human.try_embed_object(new_possible_embed)
/obj/item/projectile/bullet/shrapnel/on_range()
/obj/projectile/bullet/shrapnel/on_range()
var/obj/item/we_missed = new embedded_type(get_turf(src)) // we missed, lets toss the shrapnel
var/range = gaussian(4, 2)
if(range > 0)
@@ -311,7 +311,7 @@
if(!.) // they did not block the attack
return
if(isprojectile(hitby))
var/obj/item/projectile/P = hitby
var/obj/projectile/P = hitby
if(P.reflectability == REFLECTABILITY_ENERGY)
owner.visible_message("<span class='danger'>[owner] parries [attack_text] with [src]!</span>")
add_attack_logs(P.firer, src, "hit by [P.type] but got parried by [src]")
+1 -1
View File
@@ -94,7 +94,7 @@
/obj/item/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(isprojectile(hitby))
var/obj/item/projectile/P = hitby
var/obj/projectile/P = hitby
if(P.shield_buster && active)
toggle(owner, TRUE)
to_chat(owner, "<span class='warning'>[hitby] overloaded your [src]!</span>")