Antimatter now innacurate without zooming. Sniper projectiles are faster / pass through weak stuff. (#22506)

* I should port the sniper rifle bot from blood blockade battlefront

* fuck that a

* Apply suggestions from code review

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* variable on bullet

---------

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
Qwertytoforty
2023-10-03 17:10:55 +01:00
committed by GitHub
co-authored by DGamerL Contrabang
parent fe90da76cf
commit 73df3fcf14
5 changed files with 30 additions and 14 deletions
+9 -8
View File
@@ -127,14 +127,15 @@
#define SAFE 16
//flags for pass_flags
#define PASSTABLE 1
#define PASSGLASS 2
#define PASSGRILLE 4
#define PASSBLOB 8
#define PASSMOB 16
#define LETPASSTHROW 32
#define PASSFENCE 64
#define PASSDOOR 128
#define PASSTABLE (1<<0)
#define PASSGLASS (1<<1)
#define PASSGRILLE (1<<2)
#define PASSBLOB (1<<3)
#define PASSMOB (1<<4)
#define LETPASSTHROW (1<<5)
#define PASSFENCE (1<<6)
#define PASSDOOR (1<<7)
#define PASSGIRDER (1<<8)
//turf-only flags
#define NOJAUNT 1
+1 -1
View File
@@ -294,7 +294,7 @@
/datum/uplink_item/ammo/sniper/antimatter
name = "Sniper - .50 Antimatter Magazine"
desc = "A 6-round magazine of antimatter ammo for use with .50 sniper rifles. \
Able to heavily damage objects, and delimb people."
Able to heavily damage objects, and delimb people. Requires zooming in for accurate aiming."
reference = "50A"
item = /obj/item/ammo_box/magazine/sniper_rounds/antimatter
cost = 30
+4 -2
View File
@@ -399,8 +399,10 @@
qdel(src)
/obj/structure/girder/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0)
return 1
if(!height)
return TRUE
if(istype(mover) && mover.checkpass(PASSGIRDER))
return TRUE
if(istype(mover) && mover.checkpass(PASSGRILLE))
return prob(girderpasschance)
else
@@ -20,6 +20,14 @@
slot_flags = SLOT_BACK
actions_types = list()
/obj/item/gun/projectile/automatic/sniper_rifle/process_fire(atom/target, mob/living/user, message = TRUE, params, zone_override, bonus_spread = 0)
if(istype(chambered.BB, /obj/item/projectile/bullet/sniper) && !zoomed)
var/obj/item/projectile/bullet/sniper/S = chambered.BB
if(S.non_zoom_spread)
to_chat(user, "<span class='warning'>[src] must be zoomed in to fire this ammunition accurately!</span>")
bonus_spread += S.non_zoom_spread
return ..()
/obj/item/gun/projectile/automatic/sniper_rifle/syndicate
name = "syndicate sniper rifle"
desc = "Syndicate flavoured sniper rifle, it packs quite a punch, a punch to your face."
@@ -59,10 +67,13 @@
weaken = 10 SECONDS
armour_penetration_flat = 70
forced_accuracy = TRUE
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE | PASSGIRDER
speed = 0.5
var/non_zoom_spread = 0
/obj/item/ammo_box/magazine/sniper_rounds/antimatter
name = "sniper rounds (Antimatter)"
desc = "Antimatter sniper rounds, for when you really don't like something."
desc = "Antimatter sniper rounds, for when you really don't like something. Requires zooming in to fire accurately."
icon_state = "antimatter"
ammo_type = /obj/item/ammo_casing/antimatter
@@ -75,6 +86,7 @@
/obj/item/projectile/bullet/sniper/antimatter
name = "antimatter bullet"
dismemberment = 50
non_zoom_spread = 60
/obj/item/projectile/bullet/sniper/antimatter/on_hit(atom/target, blocked = 0, hit_zone)
if((blocked != 100) && (!ismob(target)))
@@ -110,8 +122,6 @@
return ..()
//hemorrhage ammo
/obj/item/ammo_box/magazine/sniper_rounds/haemorrhage
name = "sniper rounds (Bleed)"
@@ -159,6 +169,8 @@
damage = 60
forcedodge = -1
weaken = 0
speed = 0.75
pass_flags = PASSTABLE //damage glass
//toy magazine
/obj/item/ammo_box/magazine/toy/sniper_rounds
@@ -552,6 +552,7 @@ Note that amputating the affected organ does in fact remove the infection from t
"<span class='danger'>\The [owner]'s [name] explodes[gore]!</span>",\
"<span class='moderate'><b>Your [name] explodes[gore]!</b></span>",\
"<span class='danger'>You hear the [gore_sound].</span>")
disembowel(limb_name)
var/mob/living/carbon/human/victim = owner //Keep a reference for post-removed().
// Let people make limbs become fun things when removed