mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Adds proper peglimb item, rewrote code to accomodate
This commit is contained in:
@@ -223,6 +223,7 @@ var/list/datum/stack_recipe/wood_recipes = list (
|
|||||||
new/datum/stack_recipe("buckler", /obj/item/weapon/shield/riot/buckler, 5, 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("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.status |= ORGAN_PEG
|
||||||
src.species = null
|
src.species = null
|
||||||
src.wounds.len = 0
|
src.wounds.len = 0
|
||||||
src.destspawn = 0
|
|
||||||
for (var/datum/organ/external/T in children)
|
for (var/datum/organ/external/T in children)
|
||||||
if(T)
|
if(T)
|
||||||
if(body_part == ARM_LEFT || body_part == ARM_RIGHT || body_part == LEG_RIGHT || body_part == LEG_LEFT)
|
if(body_part == ARM_LEFT || body_part == ARM_RIGHT || body_part == LEG_RIGHT || body_part == LEG_LEFT)
|
||||||
T.peggify()
|
T.peggify()
|
||||||
|
src.destspawn = 0
|
||||||
else
|
else
|
||||||
T.droplimb(1, 1)
|
T.droplimb(1, 1)
|
||||||
T.status &= ~ORGAN_BROKEN
|
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_DESTROYED
|
||||||
T.status &= ~ORGAN_ROBOT
|
T.status &= ~ORGAN_ROBOT
|
||||||
T.wounds.len = 0
|
T.wounds.len = 0
|
||||||
T.destspawn = 0
|
|
||||||
|
|
||||||
/datum/organ/external/proc/fleshify()
|
/datum/organ/external/proc/fleshify()
|
||||||
src.status &= ~ORGAN_BROKEN
|
src.status &= ~ORGAN_BROKEN
|
||||||
@@ -970,9 +971,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
|
|
||||||
OE.attach(attached)
|
OE.attach(attached)
|
||||||
|
|
||||||
else if(istype(I, /obj/item/stack/sheet/wood)) //Attaching a plank
|
else if(istype(I, /obj/item/weapon/peglimb)) //Attaching a peg limb
|
||||||
var/obj/item/stack/sheet/wood/peg = I
|
|
||||||
if(peg.use(1))
|
|
||||||
src.peggify()
|
src.peggify()
|
||||||
|
|
||||||
else if(istype(I, /obj/item/robot_parts)) //Robotic limb
|
else if(istype(I, /obj/item/robot_parts)) //Robotic limb
|
||||||
@@ -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)
|
/datum/organ/external/l_leg/generate_dropped_organ(current_organ)
|
||||||
if(is_peg())
|
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(!current_organ)
|
||||||
if(is_robotic())
|
if(is_robotic())
|
||||||
current_organ = new /obj/item/robot_parts/l_leg(owner.loc)
|
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)
|
/datum/organ/external/r_leg/generate_dropped_organ(current_organ)
|
||||||
if(is_peg())
|
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(!current_organ)
|
||||||
if(is_robotic())
|
if(is_robotic())
|
||||||
current_organ = new /obj/item/robot_parts/r_leg(owner.loc)
|
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)
|
/datum/organ/external/l_arm/generate_dropped_organ(current_organ)
|
||||||
if(status & ORGAN_PEG)
|
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(!current_organ)
|
||||||
if(status & ORGAN_ROBOT)
|
if(status & ORGAN_ROBOT)
|
||||||
current_organ= new /obj/item/robot_parts/l_arm(owner.loc)
|
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)
|
/datum/organ/external/r_arm/generate_dropped_organ(current_organ)
|
||||||
if(is_peg())
|
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(!current_organ)
|
||||||
if(is_robotic())
|
if(is_robotic())
|
||||||
current_organ = new /obj/item/robot_parts/r_arm(owner.loc)
|
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)
|
/datum/organ/external/l_foot/generate_dropped_organ(current_organ)
|
||||||
if(is_peg())
|
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(!current_organ)
|
||||||
if(!is_robotic())
|
if(!is_robotic())
|
||||||
current_organ = new /obj/item/organ/external/l_foot(owner.loc, owner)
|
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)
|
/datum/organ/external/r_foot/generate_dropped_organ(current_organ)
|
||||||
if(is_peg())
|
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(!current_organ)
|
||||||
if(!is_robotic())
|
if(!is_robotic())
|
||||||
current_organ = new /obj/item/organ/external/r_foot(owner.loc, owner)
|
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)
|
/datum/organ/external/r_hand/generate_dropped_organ(current_organ)
|
||||||
if(is_peg())
|
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(!current_organ)
|
||||||
if(!is_robotic())
|
if(!is_robotic())
|
||||||
current_organ = new /obj/item/organ/external/r_hand(owner.loc, owner)
|
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)
|
/datum/organ/external/l_hand/generate_dropped_organ(current_organ)
|
||||||
if(is_peg())
|
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(!current_organ)
|
||||||
if(!is_robotic())
|
if(!is_robotic())
|
||||||
current_organ = new /obj/item/organ/external/l_hand(owner.loc, owner)
|
current_organ = new /obj/item/organ/external/l_hand(owner.loc, owner)
|
||||||
|
|||||||
@@ -190,7 +190,7 @@
|
|||||||
///////ATTACH PLANK///////
|
///////ATTACH PLANK///////
|
||||||
/datum/surgery_step/limb/attach_plank
|
/datum/surgery_step/limb/attach_plank
|
||||||
allowed_tools = list(
|
allowed_tools = list(
|
||||||
/obj/item/stack/sheet/wood=100,
|
/obj/item/weapon/peglimb=100,
|
||||||
)
|
)
|
||||||
|
|
||||||
can_infect = 0
|
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