mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Adds proper peglimb item, rewrote code to accomodate
This commit is contained in:
@@ -201,7 +201,7 @@ var/list/datum/stack_recipe/plasteel_recipes = list (
|
||||
WOOD RECIPES
|
||||
==================================================================== */
|
||||
var/list/datum/stack_recipe/wood_recipes = list (
|
||||
new/datum/stack_recipe("clipboard", /obj/item/weapon/storage/bag/clipboard, 1 ),
|
||||
new/datum/stack_recipe("clipboard", /obj/item/weapon/storage/bag/clipboard, 1 ),
|
||||
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal ),
|
||||
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1,4,20 ),
|
||||
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2 ),
|
||||
@@ -222,7 +222,8 @@ var/list/datum/stack_recipe/wood_recipes = list (
|
||||
new/datum/stack_recipe("boomerang", /obj/item/weapon/boomerang, 6, time = 50),
|
||||
new/datum/stack_recipe("buckler", /obj/item/weapon/shield/riot/buckler, 5, time = 50),
|
||||
new/datum/stack_recipe("wooden paddle", /obj/item/weapon/macuahuitl, 1, time = 50),
|
||||
new/datum/stack_recipe("crossbow frame", /obj/item/crossbowframe, 5, time = 50),
|
||||
new/datum/stack_recipe("crossbow frame", /obj/item/crossbowframe, 5, time = 50),
|
||||
new/datum/stack_recipe("peg limb", /obj/item/weapon/peglimb, 2, time = 50)
|
||||
)
|
||||
|
||||
/* =========================================================================
|
||||
|
||||
9
code/game/objects/items/weapons/peglimb.dm
Normal file
9
code/game/objects/items/weapons/peglimb.dm
Normal file
@@ -0,0 +1,9 @@
|
||||
/obj/item/weapon/peglimb
|
||||
name = "peg limb"
|
||||
desc = "A wooden stake crudely shaped like a limb. It's not pretty, but it works."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "peg_limb"
|
||||
throwforce = 0
|
||||
throw_speed = 0
|
||||
throw_range = 0
|
||||
w_class = W_CLASS_LARGE
|
||||
@@ -919,11 +919,12 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
src.status |= ORGAN_PEG
|
||||
src.species = null
|
||||
src.wounds.len = 0
|
||||
src.destspawn = 0
|
||||
|
||||
for (var/datum/organ/external/T in children)
|
||||
if(T)
|
||||
if(body_part == ARM_LEFT || body_part == ARM_RIGHT || body_part == LEG_RIGHT || body_part == LEG_LEFT)
|
||||
T.peggify()
|
||||
src.destspawn = 0
|
||||
else
|
||||
T.droplimb(1, 1)
|
||||
T.status &= ~ORGAN_BROKEN
|
||||
@@ -934,7 +935,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
T.status &= ~ORGAN_DESTROYED
|
||||
T.status &= ~ORGAN_ROBOT
|
||||
T.wounds.len = 0
|
||||
T.destspawn = 0
|
||||
|
||||
|
||||
/datum/organ/external/proc/fleshify()
|
||||
src.status &= ~ORGAN_BROKEN
|
||||
@@ -970,10 +971,8 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
OE.attach(attached)
|
||||
|
||||
else if(istype(I, /obj/item/stack/sheet/wood)) //Attaching a plank
|
||||
var/obj/item/stack/sheet/wood/peg = I
|
||||
if(peg.use(1))
|
||||
src.peggify()
|
||||
else if(istype(I, /obj/item/weapon/peglimb)) //Attaching a peg limb
|
||||
src.peggify()
|
||||
|
||||
else if(istype(I, /obj/item/robot_parts)) //Robotic limb
|
||||
var/obj/item/robot_parts/R = I
|
||||
@@ -1167,7 +1166,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
/datum/organ/external/l_leg/generate_dropped_organ(current_organ)
|
||||
if(is_peg())
|
||||
current_organ = new /obj/item/stack/sheet/wood(owner.loc)
|
||||
current_organ = new /obj/item/weapon/peglimb(owner.loc)
|
||||
if(!current_organ)
|
||||
if(is_robotic())
|
||||
current_organ = new /obj/item/robot_parts/l_leg(owner.loc)
|
||||
@@ -1205,7 +1204,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
/datum/organ/external/r_leg/generate_dropped_organ(current_organ)
|
||||
if(is_peg())
|
||||
current_organ = new /obj/item/stack/sheet/wood(owner.loc)
|
||||
current_organ = new /obj/item/weapon/peglimb(owner.loc)
|
||||
if(!current_organ)
|
||||
if(is_robotic())
|
||||
current_organ = new /obj/item/robot_parts/r_leg(owner.loc)
|
||||
@@ -1228,7 +1227,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
/datum/organ/external/l_arm/generate_dropped_organ(current_organ)
|
||||
if(status & ORGAN_PEG)
|
||||
current_organ = new /obj/item/stack/sheet/wood(owner.loc)
|
||||
current_organ = new /obj/item/weapon/peglimb(owner.loc)
|
||||
if(!current_organ)
|
||||
if(status & ORGAN_ROBOT)
|
||||
current_organ= new /obj/item/robot_parts/l_arm(owner.loc)
|
||||
@@ -1248,7 +1247,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
/datum/organ/external/r_arm/generate_dropped_organ(current_organ)
|
||||
if(is_peg())
|
||||
current_organ = new /obj/item/stack/sheet/wood(owner.loc)
|
||||
current_organ = new /obj/item/weapon/peglimb(owner.loc)
|
||||
if(!current_organ)
|
||||
if(is_robotic())
|
||||
current_organ = new /obj/item/robot_parts/r_arm(owner.loc)
|
||||
@@ -1270,7 +1269,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
/datum/organ/external/l_foot/generate_dropped_organ(current_organ)
|
||||
if(is_peg())
|
||||
current_organ = new /obj/item/stack/sheet/wood(owner.loc)
|
||||
current_organ = new /obj/item/weapon/peglimb(owner.loc)
|
||||
if(!current_organ)
|
||||
if(!is_robotic())
|
||||
current_organ = new /obj/item/organ/external/l_foot(owner.loc, owner)
|
||||
@@ -1290,7 +1289,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
/datum/organ/external/r_foot/generate_dropped_organ(current_organ)
|
||||
if(is_peg())
|
||||
current_organ = new /obj/item/stack/sheet/wood(owner.loc)
|
||||
current_organ = new /obj/item/weapon/peglimb(owner.loc)
|
||||
if(!current_organ)
|
||||
if(!is_robotic())
|
||||
current_organ = new /obj/item/organ/external/r_foot(owner.loc, owner)
|
||||
@@ -1311,7 +1310,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
/datum/organ/external/r_hand/generate_dropped_organ(current_organ)
|
||||
if(is_peg())
|
||||
current_organ = new /obj/item/stack/sheet/wood(owner.loc)
|
||||
current_organ = new /obj/item/weapon/peglimb(owner.loc)
|
||||
if(!current_organ)
|
||||
if(!is_robotic())
|
||||
current_organ = new /obj/item/organ/external/r_hand(owner.loc, owner)
|
||||
@@ -1332,7 +1331,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
/datum/organ/external/l_hand/generate_dropped_organ(current_organ)
|
||||
if(is_peg())
|
||||
current_organ = new /obj/item/stack/sheet/wood(owner.loc)
|
||||
current_organ = new /obj/item/weapon/peglimb(owner.loc)
|
||||
if(!current_organ)
|
||||
if(!is_robotic())
|
||||
current_organ = new /obj/item/organ/external/l_hand(owner.loc, owner)
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
///////ATTACH PLANK///////
|
||||
/datum/surgery_step/limb/attach_plank
|
||||
allowed_tools = list(
|
||||
/obj/item/stack/sheet/wood=100,
|
||||
/obj/item/weapon/peglimb=100,
|
||||
)
|
||||
|
||||
can_infect = 0
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 53 KiB |
Reference in New Issue
Block a user