Files
kiwistation/code/modules/surgery/limb augmentation.dm
T
phil235 81ce777ec2 - you now only see turfs when inside gas pipes.
- I renamed some vars of datum/hud to be more selfexplanatory
- Moved all datum/hud mob code into the hud folder.
- fixed alien's zone selection button not using the correct sprites.
- I removed the update_hud() proc (that needed to be removed).
- Fixed a typo in /mob/living/carbon/ContractDisease , using "internals" instead of "internal" (very different things)
- Fixed doTeleport() calling Entered() twice on the destination area.
- To reference a mob's selected zone, you now use a direct mob var ("H.zone_selected" instead of "H.zone_sel.selecting")
- mobs lose certain screen objects var ("healths", "zone_sel", "internals", etc) which are now vars of the mob's datum/hud instead.
- the Blind spell is now done via the blind mutation instead of the blind disabilities.
- Give to mobs a version of forceMove(), so the mob is always properly unbuckled, his pull stopped, his vision updated, etc.
- The "user" var of mob/camera/aiEye/remote is renamed to "eye_user" to avoid confusion.
- reset_view() is replaced by reset_perspective(). Now all changes to client.eye and client.perspective are done with this proc.
- I reworked /obj/machinery/computer/security code, changing camera is instantaneous now, as well as cancelling.
- I reworked /obj/machinery/computer/camera_advanced code as well.
- I changed /obj/item/mecha_parts/mecha_equipment/mining_scanner's meson view to be constant instead of by intermittent.
- Fixes not being able to use /obj/item/device/camera_bug while buckled.
- removed admin_forcemove() proc, admin force moving now uses forceMove() simply.
- Removed the client var "adminobs"
- Added var/vision_correction to glasses.
- Added a thermal_overload() proc for glasses, to remove copypasta in emp_act code.
- Remove the hal_crit mob var
- We no longer delete the mob's hud everytime he logs in.
- Added a stat == dead check in mob's metabolize() so we immediately stop metabolizing if one of the chem kills the mob.
- Being inside disposal bin lowers your vision, like wearing a welding helmet.
- removed the remote_view mob var.
- I changed advanced camera EYE, some fixes, removed unnecessary code when the eye moves, now the mob client eye properly follows the camera mob.
- fixes mob var "machine" not being nullified on logout.
- larva/death() was calling two "living_mob_list -= src"
- I made the Blind screen objects into a global_hud instead of giving one to each mob (like damage overlay).
- I untied tint and eye_blind, TINT_BLIND doesn't give you eye_blind=1.
- gave a visual overlay when inside locker (vimpaired)
- when inside disposal/gas pipes you get sight |= (BLIND|SEE_TURFS)
- glasses toggling updates (atmos meson toggle): DONE
- The new adjust procs serve to properly change eye_blind etc and call vision update procs when needed.
- I added an on_unset_machine() proc to handle perspective reset for camera consoles.
- I moved consequences of eye_check fail inside eye_check() procs themselves.
- I fixed vision updates being fucked by forceMove, especially pipe vision.
- I decided that damage overlay not appearing when dead.
- mob's hud_used is no longer deleted on each login()
- I refactored mob huds a bit, creating subtypes for each mob (/datum/hud/human)
- f12's hud toggling is now available to all mobs
- gave borgs a low_power_mode var so unpowered borg do not use stat= UNCONSCIOUS (which made things weird since you were unconscious but not blind)
- Fixed double Area entering when forced teleporting.
- I fixed larva pulling not being broken when cuffing them, and larva not seeing handcuff alert (and they can resist by clicking it)
- I removed pull updates from life() since it onyl checked for puller's incapacitation.
- I renamed camera/deactivate() to toggle_cam() to be more accurate.
- I fixed mmi brain being immortal (by removing the brain and putting it back)
- I simplified mmi brain emp damage.
2016-02-04 00:33:16 +01:00

139 lines
6.1 KiB
Plaintext

/////AUGMENTATION SURGERIES//////
//SURGERY STEPS
/datum/surgery_step/replace
name = "sever muscles"
implements = list(/obj/item/weapon/scalpel = 100, /obj/item/weapon/wirecutters = 55)
time = 32
/datum/surgery_step/replace/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to sever the muscles on [target]'s [parse_zone(user.zone_selected)].", "<span class ='notice'>You begin to sever the muscles on [target]'s [parse_zone(user.zone_selected)]...</span>")
/datum/surgery_step/add_limb
name = "replace limb"
implements = list(/obj/item/robot_parts = 100)
time = 32
var/obj/item/organ/limb/L = null // L because "limb"
/datum/surgery_step/add_limb/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
L = surgery.organ
if(L)
user.visible_message("[user] begins to augment [target]'s [parse_zone(user.zone_selected)].", "<span class ='notice'>You begin to augment [target]'s [parse_zone(user.zone_selected)]...</span>")
else
user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "<span class ='notice'>You look for [target]'s [parse_zone(user.zone_selected)]...</span>")
//ACTUAL SURGERIES
/datum/surgery/augmentation
name = "augmentation"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/replace, /datum/surgery_step/saw, /datum/surgery_step/add_limb)
species = list(/mob/living/carbon/human)
possible_locs = list("r_arm","l_arm","r_leg","l_leg","chest","head")
//SURGERY STEP SUCCESSES
/datum/surgery_step/add_limb/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(L)
if(ishuman(target))
var/mob/living/carbon/human/H = target
user.visible_message("[user] successfully augments [target]'s [parse_zone(target_zone)]!", "<span class='notice'>You successfully augment [target]'s [parse_zone(target_zone)].</span>")
L.loc = get_turf(target)
H.organs -= L
switch(target_zone)
if("r_leg")
H.organs += new /obj/item/organ/limb/robot/r_leg(src)
if("l_leg")
H.organs += new /obj/item/organ/limb/robot/l_leg(src)
if("r_arm")
H.organs += new /obj/item/organ/limb/robot/r_arm(src)
if("l_arm")
H.organs += new /obj/item/organ/limb/robot/l_arm(src)
if("head")
H.organs += new /obj/item/organ/limb/robot/head(src)
if("chest")
for(var/obj/item/organ/internal/I in target.getorganszone(target_zone, 1))
if(I.status == ORGAN_ORGANIC) // FLESH IS WEAK
I.Remove(target, special = 1)
qdel(I)
H.organs += new /obj/item/organ/limb/robot/chest(src)
user.drop_item()
qdel(tool)
H.update_damage_overlays(0)
H.update_augments() //Gives them the Cyber limb overlay
add_logs(user, target, "augmented", addition="by giving him new [parse_zone(target_zone)] INTENT: [uppertext(user.a_intent)]")
else
user << "<span class='warning'>[target] has no organic [parse_zone(target_zone)] there!</span>"
return 1
/datum/surgery/chainsaw
name = "chainsaw augmentation"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/saw, /datum/surgery_step/clamp_bleeders,
/datum/surgery_step/incise, /datum/surgery_step/chainsaw)
species = list(/mob/living/carbon/human)
possible_locs = list("r_arm", "l_arm")
requires_organic_bodypart = 0
/datum/surgery_step/chainsaw
time = 64
name = "insert chainsaw"
implements = list(/obj/item/weapon/twohanded/required/chainsaw = 100)
/datum/surgery_step/chainsaw/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to install the chainsaw onto [target].", "<span class='notice'>You begin to install the chainsaw onto [target]...</span>")
/datum/surgery_step/chainsaw/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(target.l_hand && target.r_hand)
user << "<span class='warning'>You can't fit the chainsaw in while [target]'s hands are full!</span>"
return 0
else
user.visible_message("[user] finishes installing the chainsaw!", "<span class='notice'>You install the chainsaw.</span>")
user.unEquip(tool)
qdel(tool)
var/obj/item/weapon/mounted_chainsaw/sawarms = new(target)
target.put_in_hands(sawarms)
return 1
/datum/surgery/chainsaw_removal
name = "chainsaw removal"
steps = list(/datum/surgery_step/chainsaw_removal)
species = list(/mob/living/carbon/human)
possible_locs = list("r_arm", "l_arm")
requires_organic_bodypart = 0
/datum/surgery/chainsaw_removal/can_start(mob/user, mob/living/carbon/target)
var/list/hands = get_both_hands(target)
var/M = locate(/obj/item/weapon/mounted_chainsaw) in hands
if(M)
return 1//can continue surgery
else
return 0//surgery will never be available
/datum/surgery_step/chainsaw_removal
time = 128
name = "saw off chainsaw"
implements = list(/obj/item/weapon/circular_saw = 100, /obj/item/weapon/melee/energy/sword/cyborg/saw = 100, /obj/item/weapon/melee/arm_blade = 75, /obj/item/weapon/mounted_chainsaw = 65, /obj/item/weapon/twohanded/fireaxe = 50, /obj/item/weapon/twohanded/required/chainsaw = 50, /obj/item/weapon/hatchet = 35, /obj/item/weapon/kitchen/knife/butcher = 25)
/datum/surgery_step/chainsaw_removal/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins sawing the chainsaw off of [target]'s arms.", "<span class='notice'>You begin removing [target]'s chainsaw...</span>")
/datum/surgery_step/chainsaw_removal/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/list/hands = get_both_hands(target)
for(var/obj/item/weapon/mounted_chainsaw/V in hands)
qdel(V)
new /obj/item/weapon/twohanded/required/chainsaw(get_turf(target))
user.visible_message("[user] carefully saws [target]'s arm free of the chainsaw.", "<span class='notice'>You remove the chainsaw.</span>")
return 1