mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-22 08:01:06 +00:00
Collection of Security changes: New heavy vest sprites, replacing the old toggle system. New helmet sprites. Heavy vests reduced to 2 pockets. Regular vests have no pockets. Holobadge sprite change and badge addition for HoS/Warden. Teargas Grenades, replace flashbangs in vendor and officer lockers, flashbangs located in armory and with warden. Detective 1911 starts with flash magazine, has one rubber magazine in locker. Rubber bullet damage halved to reduce frequency of bone breakage and IB. Flash bullet buffed to cause small halloss. Armory loadout changed to static 4 e-guns, 4 laser guns, 2 ion rifles, 2 shotguns starting loaded with beanbags, 4 Mk 58s loaded with flash rounds. Tactical armor removed, still available in cargo. Sub-Armory restored to warden access only, officer access storage rack added. Now with Changelog. Threads and Polls located here: http://baystation12.net/forums/threads/discussion-poll-security-energy-weapons-antag-projectile-weapons.932/ http://baystation12.net/forums/threads/discussion-poll-detective-weapon.865/ http://baystation12.net/forums/threads/discussion-armory.792/ http://baystation12.net/forums/threads/discussion-security-vest-and-helmet.790/ Quick Fix modified: code/datums/supplypacks.dm modified: code/game/machinery/vending.dm modified: code/game/objects/items/devices/uplink_items.dm modified: code/game/objects/items/weapons/grenades/chem_grenade.dm modified: code/game/objects/items/weapons/storage/boxes.dm modified: code/game/objects/structures/crates_lockers/closets/secure/security.dm modified: code/modules/clothing/suits/armor.dm modified: code/modules/clothing/suits/storage.dm modified: code/modules/clothing/under/accessories/badges.dm modified: code/modules/projectiles/guns/projectile/pistol.dm modified: code/modules/projectiles/projectile/bullets.dm modified: code/modules/projectiles/projectile/energy.dm modified: code/modules/random_map/drop/drop_types.dm new file: html/changelogs/Raptor1628-Dev.yml modified: icons/mob/belt.dmi modified: icons/mob/head.dmi modified: icons/mob/suit.dmi modified: icons/mob/ties.dmi modified: icons/obj/clothing/hats.dmi modified: icons/obj/clothing/suits.dmi modified: icons/obj/clothing/ties.dmi modified: maps/exodus-1.dmm modified: maps/exodus-2.dmm
240 lines
6.9 KiB
Plaintext
240 lines
6.9 KiB
Plaintext
/obj/item/projectile/bullet
|
|
name = "bullet"
|
|
icon_state = "bullet"
|
|
damage = 60
|
|
damage_type = BRUTE
|
|
nodamage = 0
|
|
check_armour = "bullet"
|
|
embed = 1
|
|
sharp = 1
|
|
var/mob_passthrough_check = 0
|
|
|
|
muzzle_type = /obj/effect/projectile/bullet/muzzle
|
|
|
|
/obj/item/projectile/bullet/on_hit(var/atom/target, var/blocked = 0)
|
|
if (..(target, blocked))
|
|
var/mob/living/L = target
|
|
shake_camera(L, 3, 2)
|
|
|
|
/obj/item/projectile/bullet/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier)
|
|
if(penetrating > 0 && damage > 20 && prob(damage))
|
|
mob_passthrough_check = 1
|
|
else
|
|
mob_passthrough_check = 0
|
|
return ..()
|
|
|
|
/obj/item/projectile/bullet/can_embed()
|
|
//prevent embedding if the projectile is passing through the mob
|
|
if(mob_passthrough_check)
|
|
return 0
|
|
return ..()
|
|
|
|
/obj/item/projectile/bullet/check_penetrate(var/atom/A)
|
|
if(!A || !A.density) return 1 //if whatever it was got destroyed when we hit it, then I guess we can just keep going
|
|
|
|
if(istype(A, /obj/mecha))
|
|
return 1 //mecha have their own penetration handling
|
|
|
|
if(ismob(A))
|
|
if(!mob_passthrough_check)
|
|
return 0
|
|
if(iscarbon(A))
|
|
damage *= 0.7 //squishy mobs absorb KE
|
|
return 1
|
|
|
|
var/chance = 0
|
|
if(istype(A, /turf/simulated/wall))
|
|
var/turf/simulated/wall/W = A
|
|
chance = round(damage/W.material.integrity*180)
|
|
else if(istype(A, /obj/machinery/door))
|
|
var/obj/machinery/door/D = A
|
|
chance = round(damage/D.maxhealth*180)
|
|
if(D.glass) chance *= 2
|
|
else if(istype(A, /obj/structure/girder))
|
|
chance = 100
|
|
else if(istype(A, /obj/machinery) || istype(A, /obj/structure))
|
|
chance = damage
|
|
|
|
if(prob(chance))
|
|
if(A.opacity)
|
|
//display a message so that people on the other side aren't so confused
|
|
A.visible_message("<span class='warning'>\The [src] pierces through \the [A]!</span>")
|
|
return 1
|
|
|
|
return 0
|
|
|
|
//For projectiles that actually represent clouds of projectiles
|
|
/obj/item/projectile/bullet/pellet
|
|
name = "shrapnel" //'shrapnel' sounds more dangerous (i.e. cooler) than 'pellet'
|
|
damage = 20
|
|
//icon_state = "bullet" //TODO: would be nice to have it's own icon state
|
|
var/pellets = 4 //number of pellets
|
|
var/range_step = 2 //projectile will lose a fragment each time it travels this distance. Can be a non-integer.
|
|
var/base_spread = 90 //lower means the pellets spread more across body parts. If zero then this is considered a shrapnel explosion instead of a shrapnel cone
|
|
var/spread_step = 10 //higher means the pellets spread more across body parts with distance
|
|
|
|
/obj/item/projectile/bullet/pellet/Bumped()
|
|
. = ..()
|
|
bumped = 0 //can hit all mobs in a tile. pellets is decremented inside attack_mob so this should be fine.
|
|
|
|
/obj/item/projectile/bullet/pellet/proc/get_pellets(var/distance)
|
|
var/pellet_loss = round((distance - 1)/range_step) //pellets lost due to distance
|
|
return max(pellets - pellet_loss, 1)
|
|
|
|
/obj/item/projectile/bullet/pellet/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier)
|
|
if (pellets < 0) return 1
|
|
|
|
var/total_pellets = get_pellets(distance)
|
|
var/spread = max(base_spread - (spread_step*distance), 0)
|
|
|
|
//shrapnel explosions miss prone mobs with a chance that increases with distance
|
|
var/prone_chance = 0
|
|
if(!base_spread)
|
|
prone_chance = max(spread_step*(distance - 2), 0)
|
|
|
|
var/hits = 0
|
|
for (var/i in 1 to total_pellets)
|
|
if(target_mob.lying && target_mob != original && prob(prone_chance))
|
|
continue
|
|
|
|
//pellet hits spread out across different zones, but 'aim at' the targeted zone with higher probability
|
|
//whether the pellet actually hits the def_zone or a different zone should still be determined by the parent using get_zone_with_miss_chance().
|
|
var/old_zone = def_zone
|
|
def_zone = ran_zone(def_zone, spread)
|
|
if (..()) hits++
|
|
def_zone = old_zone //restore the original zone the projectile was aimed at
|
|
|
|
pellets -= hits //each hit reduces the number of pellets left
|
|
if (hits >= total_pellets || pellets <= 0)
|
|
return 1
|
|
return 0
|
|
|
|
/obj/item/projectile/bullet/pellet/get_structure_damage()
|
|
var/distance = get_dist(loc, starting)
|
|
return ..() * get_pellets(distance)
|
|
|
|
/obj/item/projectile/bullet/pellet/Move()
|
|
. = ..()
|
|
|
|
//If this is a shrapnel explosion, allow mobs that are prone to get hit, too
|
|
if(. && !base_spread && isturf(loc))
|
|
for(var/mob/living/M in loc)
|
|
if(M.lying || !M.CanPass(src, loc)) //Bump if lying or if we would normally Bump.
|
|
if(Bump(M)) //Bump will make sure we don't hit a mob multiple times
|
|
return
|
|
|
|
/* short-casing projectiles, like the kind used in pistols or SMGs */
|
|
|
|
/obj/item/projectile/bullet/pistol
|
|
damage = 20
|
|
|
|
/obj/item/projectile/bullet/pistol/medium
|
|
damage = 25
|
|
|
|
/obj/item/projectile/bullet/pistol/strong //revolvers and matebas
|
|
damage = 60
|
|
|
|
/obj/item/projectile/bullet/pistol/rubber //"rubber" bullets
|
|
name = "rubber bullet"
|
|
check_armour = "melee"
|
|
damage = 5
|
|
agony = 25
|
|
embed = 0
|
|
sharp = 0
|
|
|
|
/* shotgun projectiles */
|
|
|
|
/obj/item/projectile/bullet/shotgun
|
|
name = "slug"
|
|
damage = 50
|
|
armor_penetration = 15
|
|
|
|
/obj/item/projectile/bullet/shotgun/beanbag //because beanbags are not bullets
|
|
name = "beanbag"
|
|
check_armour = "melee"
|
|
damage = 20
|
|
agony = 60
|
|
embed = 0
|
|
sharp = 0
|
|
|
|
//Should do about 80 damage at 1 tile distance (adjacent), and 50 damage at 3 tiles distance.
|
|
//Overall less damage than slugs in exchange for more damage at very close range and more embedding
|
|
/obj/item/projectile/bullet/pellet/shotgun
|
|
name = "shrapnel"
|
|
damage = 13
|
|
pellets = 6
|
|
range_step = 1
|
|
spread_step = 10
|
|
|
|
/* "Rifle" rounds */
|
|
|
|
/obj/item/projectile/bullet/rifle
|
|
armor_penetration = 20
|
|
penetrating = 1
|
|
|
|
/obj/item/projectile/bullet/rifle/a762
|
|
damage = 25
|
|
|
|
/obj/item/projectile/bullet/rifle/a556
|
|
damage = 35
|
|
|
|
/obj/item/projectile/bullet/rifle/a145
|
|
damage = 80
|
|
stun = 3
|
|
weaken = 3
|
|
penetrating = 5
|
|
armor_penetration = 80
|
|
hitscan = 1 //so the PTR isn't useless as a sniper weapon
|
|
|
|
/* Miscellaneous */
|
|
|
|
/obj/item/projectile/bullet/suffocationbullet//How does this even work?
|
|
name = "co bullet"
|
|
damage = 20
|
|
damage_type = OXY
|
|
|
|
/obj/item/projectile/bullet/cyanideround
|
|
name = "poison bullet"
|
|
damage = 40
|
|
damage_type = TOX
|
|
|
|
/obj/item/projectile/bullet/burstbullet
|
|
name = "exploding bullet"
|
|
damage = 20
|
|
embed = 0
|
|
edge = 1
|
|
|
|
/obj/item/projectile/bullet/gyro/on_hit(var/atom/target, var/blocked = 0)
|
|
if(isturf(target))
|
|
explosion(target, -1, 0, 2)
|
|
..()
|
|
|
|
/obj/item/projectile/bullet/blank
|
|
invisibility = 101
|
|
damage = 1
|
|
embed = 0
|
|
|
|
/* Practice */
|
|
|
|
/obj/item/projectile/bullet/pistol/practice
|
|
damage = 5
|
|
|
|
/obj/item/projectile/bullet/rifle/a556/practice
|
|
damage = 5
|
|
|
|
/obj/item/projectile/bullet/shotgun/practice
|
|
name = "practice"
|
|
damage = 5
|
|
|
|
/obj/item/projectile/bullet/pistol/cap
|
|
name = "cap"
|
|
damage_type = HALLOSS
|
|
damage = 0
|
|
nodamage = 1
|
|
embed = 0
|
|
sharp = 0
|
|
|
|
/obj/item/projectile/bullet/pistol/cap/process()
|
|
loc = null
|
|
qdel(src)
|