Skip to content

Commit

Permalink
section 2
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyteakettle committed Jul 24, 2020
1 parent 7fb55a0 commit 8360bb1
Show file tree
Hide file tree
Showing 44 changed files with 761 additions and 100 deletions.
2 changes: 1 addition & 1 deletion code/modules/cargo/packs/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,6 @@
/obj/item/reagent_containers/hypospray/medipen/ekit,
/obj/item/reagent_containers/hypospray/medipen/blood_loss,
/obj/item/reagent_containers/hypospray/medipen/blood_loss,
/obj/item/reagent_containers/hypospray/medipen/blood_loss
/obj/item/reagent_containers/hypospray/medipen/blood_loss)

crate_name = "medipen crate"
6 changes: 6 additions & 0 deletions code/modules/hydroponics/grown/banana.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
juice_results = list(/datum/reagent/consumable/banana = 0)
distill_reagent = /datum/reagent/consumable/ethanol/bananahonk

/obj/item/reagent_containers/food/snacks/grown/banana/generate_trash(atom/location)
. = ..()
var/obj/item/grown/bananapeel/peel = .
if(istype(peel))
peel.grind_results = list(/datum/reagent/consumable/banana_peel = seed.potency * 0.2)

/obj/item/reagent_containers/food/snacks/grown/banana/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is aiming [src] at [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1, -1)
Expand Down
15 changes: 8 additions & 7 deletions code/modules/mob/living/living_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
totaldamage = block_calculate_resultant_damage(totaldamage, returnlist)
var/armor = run_armor_check(def_zone, P.flag, null, null, P.armour_penetration, null)
if(!P.nodamage)
apply_damage(totaldamage, P.damage_type, def_zone, armor, wound_bonus=P.wound_bonus, bare_wound_bonus=P.bare_wound_bonus, sharpness=P.sharpness)
apply_damage(totaldamage, P.damage_type, def_zone, armor, wound_bonus = P.wound_bonus, bare_wound_bonus = P.bare_wound_bonus, sharpness = P.sharpness)
if(P.dismemberment)
check_projectile_dismemberment(P, def_zone)
var/missing = 100 - final_percent
Expand Down Expand Up @@ -135,12 +135,13 @@
dtype = I.damtype

if(!blocked)
visible_message("<span class='danger'>[src] has been hit by [I].</span>", \
"<span class='userdanger'>You have been hit by [I].</span>")
var/armor = run_armor_check(impacting_zone, "melee", "Your armor has protected your [parse_zone(impacting_zone)].", "Your armor has softened hit to your [parse_zone(impacting_zone)].",I.armour_penetration)
apply_damage(total_damage, dtype, impacting_zone, armor, sharpness=I.sharpness)
if(I.thrownby)
log_combat(I.thrownby, src, "threw and hit", I)
if(!nosell_hit)
visible_message("<span class='danger'>[src] is hit by [I]!</span>", \
"<span class='userdanger'>You're hit by [I]!</span>")
if(!I.throwforce)
return
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].",I.armour_penetration)
apply_damage(I.throwforce, dtype, zone, armor, sharpness=I.get_sharpness(), wound_bonus=(nosell_hit * CANT_WOUND))
else
return 1
else
Expand Down
2 changes: 1 addition & 1 deletion code/modules/ninja/suit/n_suit_verbs/ninja_stars.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

/obj/item/throwing_star/ninja
name = "ninja throwing star"
throwforce = 30
throwforce = 20
embedding = list("pain_mult" = 6, "embed_chance" = 100, "fall_chance" = 0, "embed_chance_turf_mod" = 15)
1 change: 1 addition & 0 deletions code/modules/paperwork/pen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
var/degrees = 0
var/font = PEN_FONT
embedding = list()
sharpness = SHARP_POINTY

/obj/item/pen/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is scribbling numbers all over [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit sudoku...</span>")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/boxes_magazines/ammo_boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

/obj/item/ammo_box/c38/dumdum
name = "speed loader (.38 DumDum)"
desc = "Designed to quickly reload revolvers. DumDum bullets shatter on impact and shred the target's innards, likely getting caught inside."
desc = "Designed to quickly reload revolvers. These rounds expand on impact, allowing them to shred the target and cause massive bleeding. Very weak against armor and distant targets."
ammo_type = /obj/item/ammo_casing/c38/dumdum

/obj/item/ammo_box/c38/match
Expand Down
3 changes: 2 additions & 1 deletion code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@
return
if(iscarbon(target))
var/mob/living/carbon/C = target
for(var/datum/wound/W in C.all_wounds)
for(var/i in C.all_wounds)
var/datum/wound/W = i
if(W.try_treating(src, user))
return // another coward cured!

Expand Down
36 changes: 35 additions & 1 deletion code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,26 +149,40 @@

var/temporary_unstoppable_movement = FALSE

///If defined, on hit we create an item of this type then call hitby() on the hit target with this
///If defined, on hit we create an item of this type then call hitby() on the hit target with this, mainly used for embedding items (bullets) in targets
var/shrapnel_type
///If TRUE, hit mobs even if they're on the floor and not our target
var/hit_stunned_targets = FALSE

wound_bonus = CANT_WOUND
///How much we want to drop both wound_bonus and bare_wound_bonus (to a minimum of 0 for the latter) per tile, for falloff purposes
var/wound_falloff_tile
///How much we want to drop the embed_chance value, if we can embed, per tile, for falloff purposes
var/embed_falloff_tile
/// For telling whether we want to roll for bone breaking or lacerations if we're bothering with wounds
sharpness = SHARP_NONE

///If we have a shrapnel_type defined, these embedding stats will be passed to the spawned shrapnel type, which will roll for embedding on the target
var/list/embedding

/obj/item/projectile/Initialize()
. = ..()
permutated = list()
decayedRange = range
if(embedding)
updateEmbedding()

/**
* Artificially modified to be called at around every world.icon_size pixels of movement.
* WARNING: Range() can only be called once per pixel_increment_amount pixels.
*/
/obj/item/projectile/proc/Range()
range--
if(wound_bonus != CANT_WOUND)
wound_bonus += wound_falloff_tile
bare_wound_bonus = max(0, bare_wound_bonus + wound_falloff_tile)
if(embedding)
embedding["embed_chance"] += embed_falloff_tile
if(range <= 0 && loc)
on_range()

Expand Down Expand Up @@ -815,6 +829,26 @@
/obj/item/projectile/experience_pressure_difference()
return

///Like [/obj/item/proc/updateEmbedding] but for projectiles instead, call this when you want to add embedding or update the stats on the embedding element
/obj/projectile/proc/updateEmbedding()
if(!shrapnel_type || !LAZYLEN(embedding))
return

AddElement(/datum/element/embed,\
embed_chance = (!isnull(embedding["embed_chance"]) ? embedding["embed_chance"] : EMBED_CHANCE),\
fall_chance = (!isnull(embedding["fall_chance"]) ? embedding["fall_chance"] : EMBEDDED_ITEM_FALLOUT),\
pain_chance = (!isnull(embedding["pain_chance"]) ? embedding["pain_chance"] : EMBEDDED_PAIN_CHANCE),\
pain_mult = (!isnull(embedding["pain_mult"]) ? embedding["pain_mult"] : EMBEDDED_PAIN_MULTIPLIER),\
remove_pain_mult = (!isnull(embedding["remove_pain_mult"]) ? embedding["remove_pain_mult"] : EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER),\
rip_time = (!isnull(embedding["rip_time"]) ? embedding["rip_time"] : EMBEDDED_UNSAFE_REMOVAL_TIME),\
ignore_throwspeed_threshold = (!isnull(embedding["ignore_throwspeed_threshold"]) ? embedding["ignore_throwspeed_threshold"] : FALSE),\
impact_pain_mult = (!isnull(embedding["impact_pain_mult"]) ? embedding["impact_pain_mult"] : EMBEDDED_IMPACT_PAIN_MULTIPLIER),\
jostle_chance = (!isnull(embedding["jostle_chance"]) ? embedding["jostle_chance"] : EMBEDDED_JOSTLE_CHANCE),\
jostle_pain_mult = (!isnull(embedding["jostle_pain_mult"]) ? embedding["jostle_pain_mult"] : EMBEDDED_JOSTLE_PAIN_MULTIPLIER),\
pain_stam_pct = (!isnull(embedding["pain_stam_pct"]) ? embedding["pain_stam_pct"] : EMBEDDED_PAIN_STAM_PCT),\
projectile_payload = shrapnel_type)
return TRUE

/////// MISC HELPERS ////////
/// Is this atom reflectable with ""standardized"" reflection methods like you know eshields and deswords and similar
/proc/is_energy_reflectable_projectile(atom/A)
Expand Down
10 changes: 9 additions & 1 deletion code/modules/projectiles/projectile/bullets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,12 @@
flag = "bullet"
hitsound_wall = "ricochet"
impact_effect_type = /obj/effect/temp_visual/impact_effect
sharpness = SHARP_EDGED
sharpness = SHARP_POINTY
shrapnel_type = /obj/item/shrapnel/bullet
embedding = list(embed_chance=15, fall_chance=2, jostle_chance=0, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.5, pain_mult=3, rip_time=10)
wound_falloff_tile = -5
embed_falloff_tile = -5

/obj/projectile/bullet/smite
name = "divine retribution"
damage = 10
10 changes: 8 additions & 2 deletions code/modules/projectiles/projectile/bullets/lmg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@

/obj/item/projectile/bullet/mm195x129
name = "1.95x129mm bullet"
damage = 45
damage = 40
armour_penetration = 5
wound_bonus = -50
wound_falloff_tile = 0

/obj/item/projectile/bullet/mm195x129_ap
name = "1.95x129mm armor-piercing bullet"
Expand All @@ -35,8 +37,12 @@

/obj/item/projectile/bullet/mm195x129_hp
name = "1.95x129mm hollow-point bullet"
damage = 60
damage = 50
armour_penetration = -60
sharpness = SHARP_EDGED
wound_bonus = -40
bare_wound_bonus = 30
wound_falloff_tile = -8

/obj/item/projectile/bullet/incendiary/mm195x129
name = "1.95x129mm incendiary bullet"
Expand Down
2 changes: 2 additions & 0 deletions code/modules/projectiles/projectile/bullets/pistol.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
/obj/item/projectile/bullet/c9mm
name = "9mm bullet"
damage = 20
embedding = list(embed_chance=15, fall_chance=3, jostle_chance=4, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.4, pain_mult=5, jostle_pain_mult=6, rip_time=10)

/obj/item/projectile/bullet/c9mm_ap
name = "9mm armor-piercing bullet"
damage = 15
armour_penetration = 40
embedding = null

/obj/item/projectile/bullet/incendiary/c9mm
name = "9mm incendiary bullet"
Expand Down
16 changes: 13 additions & 3 deletions code/modules/projectiles/projectile/bullets/revolver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
ricochet_chance = 50
ricochet_auto_aim_angle = 10
ricochet_auto_aim_range = 3
wound_bonus = -35
sharpness = SHARP_EDGED
wound_bonus = -20
bare_wound_bonus = 10
embedding = list(embed_chance=15, fall_chance=2, jostle_chance=2, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.4, pain_mult=3, jostle_pain_mult=5, rip_time=10)

/obj/item/projectile/bullet/c38/match
name = ".38 Match bullet"
Expand All @@ -43,13 +44,21 @@
ricochet_chance = 130
ricochet_decay_damage = 0.8
shrapnel_type = NONE
sharpness = SHARP_NONE
embedding = null

// premium .38 ammo from cargo, weak against armor, lower base damage, but excellent at embedding and causing slice wounds at close range
/obj/item/projectile/bullet/c38/dumdum
name = ".38 DumDum bullet"
damage = 15
armour_penetration = -30
ricochets_max = 0
shrapnel_type = /obj/item/shrapnel/bullet/c38/dumdum
sharpness = SHARP_EDGED
wound_bonus = 20
bare_wound_bonus = 20
embedding = list(embed_chance=75, fall_chance=3, jostle_chance=4, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.4, pain_mult=5, jostle_pain_mult=6, rip_time=10)
wound_falloff_tile = -5
embed_falloff_tile = -15

/obj/item/projectile/bullet/c38/rubber
name = ".38 rubber bullet"
Expand Down Expand Up @@ -102,6 +111,7 @@
/obj/item/projectile/bullet/a357
name = ".357 bullet"
damage = 60
wound_bonus = -70

/obj/item/projectile/bullet/a357/ap
name = ".357 armor-piercing bullet"
Expand Down
3 changes: 3 additions & 0 deletions code/modules/projectiles/projectile/bullets/rifle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
/obj/item/projectile/bullet/a556
name = "5.56mm bullet"
damage = 35
wound_bonus = -40

// 7.62 (Nagant Rifle)

/obj/item/projectile/bullet/a762
name = "7.62 bullet"
damage = 60
wound_bonus = -35
wound_falloff_tile = 0

/obj/item/projectile/bullet/a762_enchanted
name = "enchanted 7.62 bullet"
Expand Down
23 changes: 16 additions & 7 deletions code/modules/projectiles/projectile/bullets/shotgun.dm
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
/obj/item/projectile/bullet/shotgun_slug
name = "12g shotgun slug"
damage = 60
damage = 50
sharpness = SHARP_POINTY
wound_bonus = 0

/obj/item/projectile/bullet/shotgun_slug/executioner
name = "executioner slug" // admin only, can dismember limbs
sharpness = SHARP_EDGED
wound_bonus = 0
wound_bonus = 80

/obj/item/projectile/bullet/shotgun_slug/pulverizer
name = "pulverizer slug" // admin only, can crush bones
sharpness = SHARP_NONE
wound_bonus = 0
wound_bonus = 80

/obj/item/projectile/bullet/shotgun_beanbag
name = "beanbag slug"
damage = 10
stamina = 70
wound_bonus = 20
sharpness = SHARP_NONE
embedding = null

/obj/item/projectile/bullet/incendiary/shotgun
name = "incendiary slug"
Expand Down Expand Up @@ -83,18 +86,22 @@
return BULLET_ACT_HIT

/obj/item/projectile/bullet/pellet
var/tile_dropoff = 0.75
var/tile_dropoff = 0.45
var/tile_dropoff_s = 1.25

/obj/item/projectile/bullet/pellet/shotgun_buckshot
name = "buckshot pellet"
damage = 12.5
wound_bonus = -10
damage = 7.5
wound_bonus = 5
bare_wound_bonus = 5
wound_falloff_tile = -2.5 // low damage + additional dropoff will already curb wounding potential anything past point blank

/obj/item/projectile/bullet/pellet/shotgun_rubbershot
name = "rubbershot pellet"
damage = 2
stamina = 15
sharpness = SHARP_NONE
embedding = null

/obj/item/projectile/bullet/pellet/Range()
..()
Expand All @@ -106,8 +113,10 @@
qdel(src)

/obj/item/projectile/bullet/pellet/shotgun_improvised
tile_dropoff = 0.55 //Come on it does 6 damage don't be like that.
tile_dropoff = 0.35 //Come on it does 6 damage don't be like that.
damage = 6
wound_bonus = 0
bare_wound_bonus = 7.5

/obj/item/projectile/bullet/pellet/shotgun_improvised/Initialize()
. = ..()
Expand Down
6 changes: 6 additions & 0 deletions code/modules/projectiles/projectile/bullets/smg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
/obj/item/projectile/bullet/c45
name = ".45 bullet"
damage = 30
wound_bonus = -10
wound_falloff_tile = -10

/obj/item/projectile/bullet/c45_cleaning
name = ".45 bullet"
Expand Down Expand Up @@ -51,11 +53,15 @@
/obj/item/projectile/bullet/c46x30mm
name = "4.6x30mm bullet"
damage = 15
wound_bonus = -5
bare_wound_bonus = 5
embed_falloff_tile = -4

/obj/item/projectile/bullet/c46x30mm_ap
name = "4.6x30mm armor-piercing bullet"
damage = 12.5
armour_penetration = 40
embedding = null

/obj/item/projectile/bullet/incendiary/c46x30mm
name = "4.6x30mm incendiary bullet"
Expand Down
21 changes: 20 additions & 1 deletion code/modules/reagents/chemistry/reagents/drink_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1016,4 +1016,23 @@
if(M.getToxLoss() && prob(30))
M.adjustToxLoss(-1, 0)
..()
. = TRUE
. = TRUE

// i googled "natural coagulant" and a couple of results came up for banana peels, so after precisely 30 more seconds of research, i now dub grinding banana peels good for your blood
/datum/reagent/consumable/banana_peel
name = "Pulped Banana Peel"
description = "Okay, so you put a banana peel in a grinder... Why, exactly?"
color = "#863333" // rgb: 175, 175, 0
reagent_state = SOLID
taste_description = "stringy, bitter pulp"
glass_name = "glass of banana peel pulp"
glass_desc = "Okay, so you put a banana peel in a grinder... Why, exactly?"

/datum/reagent/consumable/baked_banana_peel
name = "Baked Banana Peel Powder"
description = "You took a banana peel... pulped it... baked it... Where are you going with this?"
color = "#863333" // rgb: 175, 175, 0
reagent_state = SOLID
taste_description = "bitter powder"
glass_name = "glass of banana peel powder"
description = "You took a banana peel... pulped it... baked it... Where are you going with this?"
Loading

0 comments on commit 8360bb1

Please sign in to comment.