Skip to content

Commit

Permalink
Merge pull request #6 from Lhars/Prosthetics
Browse files Browse the repository at this point in the history
Ratwood Prosthetics
  • Loading branch information
TheGreatKitsune authored Sep 9, 2024
2 parents 2e083c4 + 40a5896 commit c4f13e5
Show file tree
Hide file tree
Showing 26 changed files with 331 additions and 18 deletions.
4 changes: 2 additions & 2 deletions code/datums/character_flaw/limbloss.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
var/obj/item/bodypart/r_arm/rproesthetic/L = new()
var/obj/item/bodypart/r_arm/rprosthetic/L = new()
L.attach_limb(H)

/datum/charflaw/limbloss/arm_l
Expand All @@ -35,5 +35,5 @@
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
var/obj/item/bodypart/l_arm/rproesthetic/L = new()
var/obj/item/bodypart/l_arm/rprosthetic/L = new()
L.attach_limb(H)
212 changes: 212 additions & 0 deletions code/game/objects/items/rogueitems/prosthetics.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
/obj/item/bodypart/proc/prosthetic_attachment(var/mob/living/carbon/human/H, var/mob/user)
if(!ishuman(H))
return

if(user.zone_selected != body_zone) //so we can't replace a leg with an arm, or a human arm with a monkey arm.
to_chat(user, span_warning("[src] isn't the right type for [parse_zone(user.zone_selected)]."))
return -1

var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
if(affecting)
return

if(user.temporarilyRemoveItemFromInventory(src))
attach_limb(H)
user.visible_message(span_notice("[user] attaches [src] to [H]."))
return 1

/obj/item/bodypart/l_arm/rprosthetic
name = "wooden arm (L)"
desc = "A left arm of wood."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "pr_arm"
resistance_flags = FLAMMABLE
obj_flags = CAN_BE_HIT
status = BODYPART_ROBOTIC
brute_reduction = 0
burn_reduction = 0
max_damage = 20
w_class = WEIGHT_CLASS_NORMAL
max_integrity = 300
sellprice = 20
fingers = FALSE //can't swing weapons but can pick stuff up and punch

/obj/item/bodypart/l_arm/rprosthetic/iron
name = "iron arm (L)"
desc = "A left arm of iron."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "pri_arm"
prosthetic_prefix = "pri"
brute_reduction = 5
burn_reduction = 5
sellprice = 30

/obj/item/bodypart/l_arm/rprosthetic/steel
name = "steel arm (L)"
desc = "A left arm of steel."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "prs_arm"
prosthetic_prefix = "prs"
brute_reduction = 10
burn_reduction = 10
sellprice = 40

/obj/item/bodypart/l_arm/rprosthetic/clock
name = "clockwork arm (L)"
desc = "A left arm of cogs and gold."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "prc_arm"
prosthetic_prefix = "prc"
fingers = TRUE
sellprice = 50

/obj/item/bodypart/l_arm/rprosthetic/attack(mob/living/M, mob/user)
prosthetic_attachment(M, user)

/obj/item/bodypart/r_arm/rprosthetic
name = "wooden arm (R)"
desc = "A right arm of wood."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "pr_arm"
resistance_flags = FLAMMABLE
obj_flags = CAN_BE_HIT
status = BODYPART_ROBOTIC
brute_reduction = 0
burn_reduction = 0
max_damage = 20
w_class = WEIGHT_CLASS_NORMAL
max_integrity = 300
sellprice = 20
fingers = FALSE //can't swing weapons but can pick stuff up and punch

/obj/item/bodypart/r_arm/rprosthetic/iron
name = "iron arm (R)"
desc = "A right arm of iron."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "pri_arm"
prosthetic_prefix = "pri"
brute_reduction = 5
burn_reduction = 5
sellprice = 30

/obj/item/bodypart/r_arm/rprosthetic/steel
name = "steel arm (R)"
desc = "A right arm of steel."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "prs_arm"
prosthetic_prefix = "prs"
brute_reduction = 10
burn_reduction = 10
sellprice = 40

/obj/item/bodypart/r_arm/rprosthetic/clock
name = "clockwork arm (R)"
desc = "A right arm of cogs and gold."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "prc_arm"
prosthetic_prefix = "prc"
fingers = TRUE
sellprice = 50

/obj/item/bodypart/r_arm/rprosthetic/attack(mob/living/M, mob/user)
prosthetic_attachment(M, user)

/obj/item/bodypart/l_leg/rprosthetic
name = "peg leg (L)"
desc = "A left leg of wood."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "pr_leg"
resistance_flags = FLAMMABLE
obj_flags = CAN_BE_HIT
status = BODYPART_ROBOTIC
brute_reduction = 0
burn_reduction = 0
max_damage = 20
w_class = WEIGHT_CLASS_NORMAL
max_integrity = 300
sellprice = 20
organ_slowdown = 1.3

/obj/item/bodypart/l_leg/rprosthetic/iron
name = "iron leg (L)"
desc = "A left leg of iron."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "pri_leg"
prosthetic_prefix = "pri"
organ_slowdown = 1.2
brute_reduction = 5
burn_reduction = 5
sellprice = 30

/obj/item/bodypart/l_leg/rprosthetic/steel
name = "steel leg (L)"
desc = "A left leg of steel."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "prs_leg"
prosthetic_prefix = "prs"
organ_slowdown = 1.1
brute_reduction = 10
burn_reduction = 10
sellprice = 40

/obj/item/bodypart/l_leg/rprosthetic/clock
name = "clockwork leg (L)"
desc = "A left leg of cogs and gold."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "prc_leg"
prosthetic_prefix = "prc"
organ_slowdown = 0
sellprice = 50

/obj/item/bodypart/l_leg/rprosthetic/attack(mob/living/M, mob/user)
prosthetic_attachment(M, user)

/obj/item/bodypart/r_leg/rprosthetic
name = "peg leg (R)"
desc = "A right leg of wood."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "pr_leg"
resistance_flags = FLAMMABLE
obj_flags = CAN_BE_HIT
status = BODYPART_ROBOTIC
brute_reduction = 0
burn_reduction = 0
max_damage = 20
w_class = WEIGHT_CLASS_NORMAL
max_integrity = 300
sellprice = 20
organ_slowdown = 1.3

/obj/item/bodypart/r_leg/rprosthetic/iron
name = "iron leg (R)"
desc = "A right leg of iron."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "pri_leg"
prosthetic_prefix = "pri"
organ_slowdown = 1.2
brute_reduction = 5
burn_reduction = 5
sellprice = 30

/obj/item/bodypart/r_leg/rprosthetic/steel
name = "steel leg (R)"
desc = "A right leg of steel."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "prs_leg"
prosthetic_prefix = "prs"
organ_slowdown = 1.1
brute_reduction = 10
burn_reduction = 10
sellprice = 40

/obj/item/bodypart/r_leg/rprosthetic/clock
name = "clockwork leg (R)"
desc = "A right leg of cogs and gold."
icon = 'icons/roguetown/items/misc.dmi'
icon_state = "prc_leg"
prosthetic_prefix = "prc"
organ_slowdown = 0
sellprice = 50

/obj/item/bodypart/r_leg/rprosthetic/attack(mob/living/M, mob/user)
prosthetic_attachment(M, user)
8 changes: 4 additions & 4 deletions code/modules/cargo/packsrogue/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@
)

/datum/supply_pack/rogue/tools/prarml
name = "Proesthetic Arm (L)"
name = "Prosthetic Arm (L)"
cost = 40
contains = list(/obj/item/bodypart/l_arm/rproesthetic)
contains = list(/obj/item/bodypart/l_arm/rprosthetic)

/datum/supply_pack/rogue/tools/prarmr
name = "Proesthetic Arm (R)"
name = "Prosthetic Arm (R)"
cost = 40
contains = list(/obj/item/bodypart/r_arm/rproesthetic)
contains = list(/obj/item/bodypart/r_arm/rprosthetic)

/datum/supply_pack/rogue/tools/waterskin
name = "Waterskin"
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/living/grabbing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@
var/mob/living/carbon/C = grabbed
var/armor_block = C.run_armor_check(limb_grabbed, "slash")
var/damage = user.get_punch_dmg()

if(limb_grabbed.status == BODYPART_ROBOTIC)
C.visible_message(span_notice("[user] twists [limb_grabbed] of [C], popping it out of the socket!"), span_notice("I pop [limb_grabbed] from [src]."))
limb_grabbed.drop_limb()
return

playsound(C.loc, "genblunt", 100, FALSE, -1)
C.next_attack_msg.Cut()
C.apply_damage(damage, BRUTE, limb_grabbed, armor_block)
Expand Down
22 changes: 18 additions & 4 deletions code/modules/roguetown/roguecrafting/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -167,22 +167,36 @@
tools = list(/obj/item/rogueweapon/hammer)
craftdiff = 3

/datum/crafting_recipe/roguetown/lproesthetic
/datum/crafting_recipe/roguetown/larmprosthetic_w
name = "wood arm (L)"
result = list(/obj/item/bodypart/l_arm/rproesthetic)
result = list(/obj/item/bodypart/l_arm/rprosthetic)
reqs = list(/obj/item/grown/log/tree/small = 1,
/obj/item/roguegear = 1)
skillcraft = /datum/skill/craft/carpentry
craftdiff = 3

/datum/crafting_recipe/roguetown/rproesthetic
/datum/crafting_recipe/roguetown/rarmprosthetic_w
name = "wood arm (R)"
result = list(/obj/item/bodypart/r_arm/rproesthetic)
result = list(/obj/item/bodypart/r_arm/rprosthetic)
reqs = list(/obj/item/grown/log/tree/small = 1,
/obj/item/roguegear = 1)
skillcraft = /datum/skill/craft/carpentry
craftdiff = 3

/datum/crafting_recipe/roguetown/rlegprosthetic_w
name = "peg leg (R)"
result = list(/obj/item/bodypart/r_leg/rprosthetic)
reqs = list(/obj/item/grown/log/tree/small = 1)
skillcraft = /datum/skill/craft/carpentry
craftdiff = 1

/datum/crafting_recipe/roguetown/llegprosthetic_w
name = "peg_leg (L)"
result = list(/obj/item/bodypart/l_leg/rprosthetic)
reqs = list(/obj/item/grown/log/tree/small = 1)
skillcraft = /datum/skill/craft/carpentry
craftdiff = 1

/obj/item/rogueweapon/mace/woodclub/crafted
sellprice = 8

Expand Down
74 changes: 74 additions & 0 deletions code/modules/roguetown/roguejobs/blacksmith/anvil_recipes/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,30 @@
req_bar = /obj/item/ingot/iron
created_item = /obj/item/reagent_containers/glass/bucket/pot

/datum/anvil_recipe/tools/iron_arm_left
name = "Iron arm (L) (+1 Cog)"
req_bar = /obj/item/ingot/iron
created_item = /obj/item/bodypart/l_arm/rprosthetic/iron
additional_items = list(/obj/item/roguegear)
i_type = "General"
/datum/anvil_recipe/tools/iron_arm_right
name = "Iron arm (R) (+1 Cog)"
req_bar = /obj/item/ingot/iron
created_item = /obj/item/bodypart/r_arm/rprosthetic/iron
additional_items = list(/obj/item/roguegear)
i_type = "General"
/datum/anvil_recipe/tools/iron_leg_left
name = "Iron leg (L) (+1 Cog)"
req_bar = /obj/item/ingot/iron
created_item = /obj/item/bodypart/l_leg/rprosthetic/iron
additional_items = list(/obj/item/roguegear)
i_type = "General"
/datum/anvil_recipe/tools/iron_leg_right
name = "Iron leg (R) (+1 Cog)"
req_bar = /obj/item/ingot/iron
created_item = /obj/item/bodypart/r_leg/rprosthetic/iron
additional_items = list(/obj/item/roguegear)
i_type = "General"
// --------- Steel -----------

/datum/anvil_recipe/tools/steelpick
Expand Down Expand Up @@ -182,6 +206,31 @@
created_item = list(/obj/item/roguegear, /obj/item/roguegear, /obj/item/roguegear)
i_type = "General"

/datum/anvil_recipe/tools/steel_arm_left
name = "Steel arm (L) (+1 Cog)"
req_bar = /obj/item/ingot/steel
created_item = /obj/item/bodypart/l_arm/rprosthetic/steel
additional_items = list(/obj/item/roguegear)

/datum/anvil_recipe/tools/steel_arm_right
name = "Steel arm (R) (+1 Cog)"
req_bar = /obj/item/ingot/steel
created_item = /obj/item/bodypart/r_arm/rprosthetic/steel
additional_items = list(/obj/item/roguegear)
i_type = "General"

/datum/anvil_recipe/tools/steel_leg_left
name = "Steel leg (L) (+1 Cog)"
req_bar = /obj/item/ingot/steel
created_item = /obj/item/bodypart/l_leg/rprosthetic/steel
additional_items = list(/obj/item/roguegear)
i_type = "General"
/datum/anvil_recipe/tools/steel_leg_right
name = "Steel leg (R) (+1 Cog)"
req_bar = /obj/item/ingot/steel
created_item = /obj/item/bodypart/r_leg/rprosthetic/steel
additional_items = list(/obj/item/roguegear)
i_type = "General"
// --------- SILVER -----------

/datum/anvil_recipe/tools/cupssil
Expand All @@ -197,3 +246,28 @@
req_bar = /obj/item/ingot/gold
created_item = list(/obj/item/reagent_containers/glass/cup/golden, /obj/item/reagent_containers/glass/cup/golden, /obj/item/reagent_containers/glass/cup/golden)
i_type = "General"

/datum/anvil_recipe/tools/clock_arm_left
name = "Clockwork arm (L) (+2 Cogs)"
req_bar = /obj/item/ingot/gold
created_item = /obj/item/bodypart/l_arm/rprosthetic/clock
additional_items = list(/obj/item/roguegear,/obj/item/roguegear,/obj/item/roguegear)
i_type = "General"
/datum/anvil_recipe/tools/clock_arm_right
name = "Clockwork arm (R) (+2 Cogs)"
req_bar = /obj/item/ingot/gold
created_item = /obj/item/bodypart/r_arm/rprosthetic/clock
additional_items = list(/obj/item/roguegear,/obj/item/roguegear,/obj/item/roguegear)
i_type = "General"
/datum/anvil_recipe/tools/clock_leg_left
name = "Clockwork leg (L) (+2 Cogs)"
req_bar = /obj/item/ingot/gold
created_item = /obj/item/bodypart/l_leg/rprosthetic/clock
additional_items = list(/obj/item/roguegear,/obj/item/roguegear,/obj/item/roguegear)
i_type = "General"
/datum/anvil_recipe/tools/clock_leg_right
name = "Clockwork leg (R) (+2 Cogs)"
req_bar = /obj/item/ingot/gold
created_item = /obj/item/bodypart/r_leg/rprosthetic/clock
additional_items = list(/obj/item/roguegear,/obj/item/roguegear,/obj/item/roguegear)
i_type = "General"
Loading

0 comments on commit c4f13e5

Please sign in to comment.