Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IDBIGNORE] Cherrypickening4 species stuff! [IDB IGNORE] #145

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

//SLOT GROUP HELPERS
#define ITEM_SLOT_POCKETS (ITEM_SLOT_LPOCKET|ITEM_SLOT_RPOCKET)
//All the item slots that are allowed to be held in Kepori beaks (their mask slot)
#define ITEM_SLOT_KEPORI_BEAK (ITEM_SLOT_MASK|ITEM_SLOT_ID|ITEM_SLOT_POCKETS|ITEM_SLOT_DEX_STORAGE|ITEM_SLOT_SUITSTORE)

//Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses.
//Make sure to update check_obscured_slots() if you add more.
Expand Down
11 changes: 11 additions & 0 deletions code/datums/components/crafting/recipes/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,17 @@
result = /obj/item/stack/medical/splint/ghetto
category = CAT_MISC


/datum/crafting_recipe/replacement_structure
name = "Structure Repair Kit"
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER) //hole punching and scissors
reqs = list(
/obj/item/stack/rods = 3,
/obj/item/stack/sheet/mineral/titanium = 1,
/obj/item/stack/cable_coil = 2)
result = /obj/item/stack/medical/structure
category = CAT_MISC

/datum/crafting_recipe/portableseedextractor
name = "Portable seed extractor"
reqs = list(
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/scanners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ GENE SCANNER
// Body part damage report
if(iscarbon(M) && mode == SCANNER_VERBOSE)
var/mob/living/carbon/C = M
var/list/damaged = C.get_damaged_bodyparts(1,1)
var/list/damaged = C.get_damaged_bodyparts(1,1,ignore_integrity=TRUE)
if(length(damaged)>0 || oxy_loss>0 || tox_loss>0 || fire_loss>0)
var/dmgreport = "<span class='info ml-1'>General status:</span>\
<table class='ml-2'><tr><font face='Verdana'>\
Expand Down
73 changes: 59 additions & 14 deletions code/game/objects/items/stacks/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
max_integrity = 40
novariants = FALSE
item_flags = NOBLUDGEON
var/splint_fracture = FALSE //WS Edit- Splints
var/failure_chance //WS Edit - Failure chance
var/heals_organic = TRUE
var/heals_inorganic = FALSE
var/splint_fracture = FALSE
var/restore_integrity = 0
var/failure_chance
var/self_delay = 50
var/other_delay = 0
var/repeating = FALSE
Expand Down Expand Up @@ -55,23 +58,26 @@
/obj/item/stack/medical/proc/heal(mob/living/target, mob/user)
return

/obj/item/stack/medical/proc/heal_carbon(mob/living/carbon/C, mob/user, brute, burn)
/obj/item/stack/medical/proc/heal_carbon(mob/living/carbon/C, mob/user, brute, burn, integrity = 0)
var/obj/item/bodypart/affecting = C.get_bodypart(check_zone(user.zone_selected))
if(!affecting) //Missing limb?
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
return
if(!IS_ORGANIC_LIMB(affecting)) //Limb must be organic to be healed - RR
if(!heals_inorganic && !IS_ORGANIC_LIMB(affecting))
to_chat(user, "<span class='warning'>\The [src] won't work on a robotic limb!</span>")
return
if(!heals_organic && IS_ORGANIC_LIMB(affecting))
to_chat(user, "<span class='warning'>\The [src] won't work on an organic limb!</span>")
return

//WS begin - failure chance
if(prob(failure_chance))
user.visible_message("<span class='warning'>[user] tries to apply \the [src] on [C]'s [affecting.name], but fails!</span>", "<span class='warning'>You try to apply \the [src] on on [C]'s [affecting.name], but fail!")
return
//WS end
var/successful_heal = FALSE //Has this item healed anywhere it could?

if(affecting.brute_dam && brute || affecting.burn_dam && burn)
user.visible_message("<span class='green'>[user] applies \the [src] on [C]'s [affecting.name].</span>", "<span class='green'>You apply \the [src] on [C]'s [affecting.name].</span>")
var/brute2heal = brute
var/burn2heal = burn
var/skill_mod = user?.mind?.get_skill_modifier(/datum/skill/healing, SKILL_SPEED_MODIFIER)
Expand All @@ -80,27 +86,41 @@
burn2heal *= (2-skill_mod)
if(affecting.heal_damage(brute2heal, burn2heal))
C.update_damage_overlays()
return TRUE
successful_heal = TRUE


//WS Begin - Splints
if(splint_fracture) //Check if it's a splint and the bone is broken
if(affecting.body_part in list(CHEST, HEAD)) // Check if it isn't the head or chest
to_chat(user, "<span class='warning'>You can't splint that bodypart!</span>")
return
else if(affecting.bone_status == BONE_FLAG_SPLINTED) // Check if it isn't already splinted
to_chat(user, "<span class='warning'>[C]'s [affecting.name] is already splinted!</span>")
return
else if(!(affecting.bone_status == BONE_FLAG_BROKEN)) // Check if it's actually broken
to_chat(user, "<span class='warning'>[C]'s [affecting.name] isn't broken!</span>")
return
affecting.bone_status = BONE_FLAG_SPLINTED
// C.update_inv_splints() something breaks
user.visible_message("<span class='green'>[user] applies [src] on [C].</span>", "<span class='green'>You apply [src] on [C]'s [affecting.name].</span>")
return TRUE
else
affecting.bone_status = BONE_FLAG_SPLINTED
// C.update_inv_splints() something breaks
successful_heal = TRUE
//WS End


if (restore_integrity)
if(affecting.integrity_loss == 0)
to_chat(user, "<span class='warning'>[C]'s [affecting.name] has no integrity damage!</span>")
else
var/integ_healed = min(integrity, affecting.integrity_loss)
//check how much limb health we've lost to integrity_loss
var/integ_damage_removed = max(integ_healed, affecting.integrity_loss-affecting.integrity_ignored)
var/brute_heal = min(affecting.brute_dam,integ_damage_removed)
var/burn_heal = max(0,integ_damage_removed-brute_heal)
affecting.integrity_loss -= integ_healed
affecting.heal_damage(brute_heal,burn_heal,0,null,BODYTYPE_ROBOTIC)
// C.update_inv_splints() something breaks
successful_heal = TRUE


if (successful_heal)
user.visible_message("<span class='green'>[user] applies \the [src] on [C]'s [affecting.name].</span>", "<span class='green'>You apply \the [src] on [C]'s [affecting.name].</span>")
return TRUE
to_chat(user, "<span class='warning'>[C]'s [affecting.name] can not be healed with \the [src]!</span>")


Expand Down Expand Up @@ -401,3 +421,28 @@
icon_state = "hointment"
desc = "Herb slurry meant to treat burns."
heal_burn = 15


/obj/item/stack/medical/structure
name = "replacement structural rods"
desc = "Steel rods and cable with adjustable titanium fasteners, for quickly repairing structural damage to robotic limbs."
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "ipc_splint"
amount = 2
max_amount = 3
novariants = FALSE
self_delay = 50
other_delay = 20
heals_inorganic = TRUE
heals_organic = FALSE
restore_integrity = TRUE


/obj/item/stack/medical/structure/heal(mob/living/target, mob/user)
. = ..()
if(iscarbon(target))
return heal_carbon(target, user, integrity = 150)
to_chat(user, "<span class='warning'>You can't repair [target]'s limb' with the \the [src]!</span>")


4 changes: 3 additions & 1 deletion code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
icon_state = "medicwebbing"
item_state = "medicwebbing"
custom_premium_price = 900
supports_variations = KEPORI_VARIATION | VOX_VARIATION

/obj/item/storage/belt/medical/ComponentInitialize()
. = ..()
Expand Down Expand Up @@ -452,6 +453,7 @@
icon_state = "militarywebbing"
item_state = "militarywebbing"
resistance_flags = FIRE_PROOF
supports_variations = KEPORI_VARIATION | VOX_VARIATION

unique_reskin = list(
"None" = "militarywebbing",
Expand Down Expand Up @@ -929,7 +931,7 @@
desc = "A set of tactical webbing for operators of the IRMG, can hold security gear."
icon_state = "inteq_webbing"
item_state = "inteq_webbing"
supports_variations = VOX_VARIATION
supports_variations = VOX_VARIATION | KEPORI_VARIATION

/obj/item/storage/belt/security/webbing/inteq/skm/PopulateContents()
. = ..()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/tools/weldingtool.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"<span class='notice'>You start fixing some of the dents on [target == user ? "your" : "[target]'s"] [parse_zone(attackedLimb.body_zone)].</span>")
if(!use_tool(target, user, delay = (target == user ? 5 SECONDS : 0.5 SECONDS), amount = 1, volume = 25))
return TRUE
item_heal_robotic(target, user, brute_heal = 15, burn_heal = 0)
item_heal_robotic(target, user, brute_heal = 15, burn_heal = 0, integrity_loss = 5)
return TRUE

/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity)
Expand Down
9 changes: 9 additions & 0 deletions code/modules/clothing/factions/clip.dm
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,15 @@

supports_variations = SNOUTED_VARIATION

/obj/item/clothing/mask/balaclava/combat
name = "combat balaclava"
desc = "A surprisingly advanced balaclava. While it doesn't muffle your voice, it has a mouthpiece for internals. Comfy to boot!"
icon_state = "combat_balaclava"
item_state = "combat_balaclava"
alternate_worn_layer = BODY_LAYER
flags_inv = HIDEFACIALHAIR|HIDEFACE|HIDEEARS|HIDEHAIR
supports_variations = KEPORI_VARIATION

//gloves

/obj/item/clothing/gloves/color/latex/nitrile/clip
Expand Down
7 changes: 7 additions & 0 deletions code/modules/clothing/factions/hardliners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,10 @@
item_state = "hl_webbing"
icon = 'icons/obj/clothing/faction/hardliners/belt.dmi'
mob_overlay_icon = 'icons/mob/clothing/faction/hardliners/belt.dmi'
supports_variations = KEPORI_VARIATION

/obj/item/storage/belt/security/webbing/hardliners/sidewinder/PopulateContents()
. = ..()
new /obj/item/ammo_box/magazine/m57_39_sidewinder(src)
new /obj/item/ammo_box/magazine/m57_39_sidewinder(src)
new /obj/item/ammo_box/magazine/m57_39_sidewinder(src)
Loading
Loading