Surgery, Implants and Organs rework: Phase 1

This commit is contained in:
c0
2015-07-31 22:18:31 +03:00
parent 7b94435e9c
commit 04f7b3f2de
48 changed files with 934 additions and 831 deletions
@@ -7369,7 +7369,7 @@
"cMl" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{req_access_txt = 1},/obj/machinery/door/firedoor,/obj/machinery/door/airlock/glass{name = "Departure Lounge"},/turf/simulated/floor/plasteel{dir = 1; icon_state = "neutralcorner"},/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
"cMm" = (/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/door/firedoor,/obj/machinery/door/airlock/glass{name = "Departure Lounge"},/turf/simulated/floor/plasteel,/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
"cMn" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/obj/machinery/door/firedoor,/obj/machinery/door/airlock/glass{name = "Departure Lounge"},/turf/simulated/floor/plasteel{dir = 2; icon_state = "neutralcorner"},/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
"cMo" = (/obj/structure/table/wood,/obj/item/weapon/spellbook/oneuse/smoke{name = "mysterious old book of "},/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater{name = "flask of holy water"; pixel_x = -2; pixel_y = 2},/obj/item/weapon/nullrod{pixel_x = 4},/obj/item/organ/heart,/obj/item/device/soulstone/anybody,/turf/simulated/floor/plasteel{tag = "icon-cult"; icon_state = "cult"; dir = 2},/area/chapel/office)
"cMo" = (/obj/structure/table/wood,/obj/item/weapon/spellbook/oneuse/smoke{name = "mysterious old book of "},/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater{name = "flask of holy water"; pixel_x = -2; pixel_y = 2},/obj/item/weapon/nullrod{pixel_x = 4},/obj/item/organ/internal/heart,/obj/item/device/soulstone/anybody,/turf/simulated/floor/plasteel{tag = "icon-cult"; icon_state = "cult"; dir = 2},/area/chapel/office)
"cMp" = (/obj/structure/optable{name = "Robotics Operating Table"},/obj/structure/extinguisher_cabinet{pixel_x = 0; pixel_y = -30},/obj/machinery/camera{c_tag = "Robotics - Aft"; dir = 1; network = list("SS13","RD")},/turf/simulated/floor/plasteel{dir = 1; icon_state = "whitehall"},/area/assembly/robotics)
"cMq" = (/obj/machinery/computer/operating{name = "Robotics Operating Computer"},/turf/simulated/floor/plasteel{dir = 1; icon_state = "whitehall"},/area/assembly/robotics)
"cMs" = (/obj/machinery/light{icon_state = "tube1"; dir = 8},/obj/machinery/camera{c_tag = "Departure Lounge - Port Fore"; dir = 4; network = list("SS13")},/obj/structure/flora/kirbyplants{icon_state = "plant-24"; layer = 4.1; tag = "icon-plant-24"},/turf/simulated/floor/plasteel{dir = 8; icon_state = "warning"},/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
+1 -1
View File
@@ -23,7 +23,7 @@
if(prob(5))
affected_mob.emote("cough")
if(2)
var/obj/item/organ/appendix/A = affected_mob.getorgan(/obj/item/organ/appendix)
var/obj/item/organ/internal/appendix/A = affected_mob.getorgan(/obj/item/organ/internal/appendix)
if(A)
A.inflamed = 1
A.update_icon()
+2 -2
View File
@@ -61,7 +61,7 @@ var/global/max_secret_rooms = 6
walltypes = list(/turf/simulated/wall/r_wall=2,/turf/simulated/wall=2,/turf/simulated/mineral/random/high_chance=1)
floortypes = list(/turf/simulated/floor/plasteel,/turf/simulated/floor/engine)
treasureitems = list(/obj/machinery/bot/medbot/mysterious=1, /obj/item/weapon/circular_saw=1, /obj/structure/closet/critter/cat=2)
fluffitems = list(/obj/effect/decal/cleanable/blood=5,/obj/item/organ/appendix=2,/obj/structure/closet/crate/freezer=2,
fluffitems = list(/obj/effect/decal/cleanable/blood=5,/obj/item/organ/internal/appendix=2,/obj/structure/closet/crate/freezer=2,
/obj/structure/optable=1,/obj/item/weapon/scalpel=1,/obj/item/weapon/storage/firstaid/regular=3,
/obj/item/weapon/tank/internals/anesthetic=1, /obj/item/weapon/surgical_drapes=2, /obj/item/device/mass_spectrometer/adv=1,/obj/item/clothing/glasses/hud/health=1)
@@ -72,7 +72,7 @@ var/global/max_secret_rooms = 6
treasureitems = list(/obj/item/device/soulstone=1, /obj/item/clothing/suit/space/cult=1, /obj/item/weapon/bedsheet/cult=2,
/obj/item/clothing/suit/cultrobes=2, /mob/living/simple_animal/hostile/creature=3)
fluffitems = list(/obj/effect/gateway=1,/obj/effect/gibspawner=1,/obj/structure/cult/talisman=1,/obj/item/toy/crayon/red=2,
/obj/item/organ/heart=2, /obj/effect/decal/cleanable/blood=4,/obj/structure/table/wood=2,/obj/item/weapon/ectoplasm=3,
/obj/item/organ/internal/heart=2, /obj/effect/decal/cleanable/blood=4,/obj/structure/table/wood=2,/obj/item/weapon/ectoplasm=3,
/obj/item/clothing/head/helmet/space/cult=1, /obj/item/clothing/shoes/cult=1)
if("wizden")
+1 -4
View File
@@ -257,10 +257,7 @@
scientist.equip_to_slot_or_del(G, slot_in_backpack)
var/obj/item/weapon/implant/abductor/beamplant = new /obj/item/weapon/implant/abductor(scientist)
beamplant.imp_in = scientist
beamplant.implanted = 1
beamplant.implanted(scientist)
beamplant.home = console.pad
beamplant.implant(scientist)
/datum/game_mode/abduction/check_finished()
@@ -264,6 +264,7 @@
icon = 'icons/obj/abductor.dmi'
icon_state = "implant"
activated = 1
origin_tech = "materials=2;biotech=3;magnets=4;bluespace=5"
var/obj/machinery/abductor/pad/home
var/cooldown = 30
@@ -282,6 +283,29 @@
if(cooldown == initial(cooldown))
SSobj.processing.Remove(src)
/obj/item/weapon/implant/abductor/implant(var/mob/source, var/mob/user)
if(..())
var/obj/machinery/abductor/console/console
if(ishuman(source))
var/mob/living/carbon/human/H = source
if(H.dna && istype(H.dna.species, /datum/species/abductor))
var/datum/species/abductor/S = H.dna.species
console = get_team_console(S.team)
home = console.pad
if(!home)
console = get_team_console(pick(1, 2, 3, 4))
home = console.pad
return 1
/obj/item/weapon/implant/abductor/proc/get_team_console(var/team)
var/obj/machinery/abductor/console/console
for(var/obj/machinery/abductor/console/c in machines)
if(c.team == team)
console = c
break
return console
/obj/item/device/firing_pin/alien
name = "alien firing pin"
@@ -1,17 +1,26 @@
/datum/surgery/organ_extraction
name = "experimental dissection"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin,/datum/surgery_step/incise, /datum/surgery_step/extract_organ ,/datum/surgery_step/gland_insert)
species = list(/mob/living/carbon/human)
location = "chest"
user_species_restricted = 1
user_species_ids = list("abductor")
possible_locs = list("chest")
ignore_clothes = 1
/datum/surgery/organ_extraction/can_start(mob/user, mob/living/carbon/target)
if(!ishuman(user))
return 0
var/mob/living/carbon/human/H = user
if(H.dna && istype(H.dna.species, /datum/species/abductor))
return 1
if((locate(/obj/item/weapon/implant/abductor) in H))
return 1
return 0
/datum/surgery_step/extract_organ
name = "remove heart"
accept_hand = 1
time = 32
var/obj/item/IC = null
var/list/organ_types = list(/obj/item/organ/heart)
var/obj/item/organ/internal/IC = null
var/list/organ_types = list(/obj/item/organ/internal/heart)
/datum/surgery_step/extract_organ/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
for(var/obj/item/I in target.internal_organs)
@@ -24,13 +33,14 @@
if(IC)
user.visible_message("[user] pulls [IC] out of [target]'s [target_zone]!", "<span class='notice'>You pull [IC] out of [target]'s [target_zone].</span>")
user.put_in_hands(IC)
target.internal_organs -= IC
IC.Remove(target, special = 1)
return 1
else
user << "<span class='warning'>You don't find anything in [target]'s [target_zone]!</span>"
return 0
/datum/surgery_step/gland_insert
name = "insert gland"
implements = list(/obj/item/gland = 100)
time = 32
@@ -42,6 +52,4 @@
user.drop_item()
var/obj/item/gland/gland = tool
gland.Inject(target)
return 1
return 1
+27 -27
View File
@@ -67,6 +67,7 @@
name = "gang implant"
desc = "Makes you a gangster or such."
activated = 0
origin_tech = "materials=2;biotech=4;programming=4;syndicate=4"
var/datum/gang/gang
/obj/item/weapon/implant/gang/New(loc,var/setgang)
@@ -85,39 +86,38 @@
<b>Integrity:</b> Implant's EMP function will destroy itself in the process."}
return dat
/obj/item/weapon/implant/gang/implanted(mob/target)
..()
for(var/obj/item/weapon/implant/I in target)
if(I != src)
qdel(I)
/obj/item/weapon/implant/gang/implant(mob/target)
if(..())
for(var/obj/item/weapon/implant/I in target)
if(I != src)
qdel(I)
var/success
if(target.stat != DEAD)
if(target.mind in ticker.mode.get_gangsters())
if(ticker.mode.remove_gangster(target.mind,0,1))
success = 1 //Was not a gang boss, convert as usual
else
success = 1 //Not a gangster, convert as usual
var/success
if(target.stat != DEAD)
if(target.mind in ticker.mode.get_gangsters())
if(ticker.mode.remove_gangster(target.mind,0,1))
success = 1 //Was not a gang boss, convert as usual
else
success = 1 //Not a gangster, convert as usual
if(!target.mind)
return
if(!target.mind)
return 0
if(ishuman(target))
var/mob/living/carbon/human/H = target
H.sec_hud_set_implants()
if(success && ticker.mode.add_gangster(target.mind,gang,0))
target.Paralyse(5)
else
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel the influence of your enemies try to invade your mind!</span>")
qdel(src)
if(ishuman(target))
if(success && ticker.mode.add_gangster(target.mind,gang,0))
target.Paralyse(5)
else
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel the influence of your enemies try to invade your mind!</span>")
/obj/item/weapon/implanter/gang/
name = "implanter-gang"
qdel(src)
return -1
/obj/item/weapon/implanter/gang/New(loc,var/gang)
/obj/item/weapon/implanter/gang
name = "implanter (gang)"
/obj/item/weapon/implanter/gang/New(loc, var/gang)
if(!gang)
qdel(src)
return
imp = new /obj/item/weapon/implant/gang(src,gang)
..()
update_icon()
..()
+2 -6
View File
@@ -181,13 +181,9 @@
synd_mob.equip_to_slot_or_del(U, slot_in_backpack)
var/obj/item/weapon/implant/weapons_auth/W = new/obj/item/weapon/implant/weapons_auth(synd_mob)
W.imp_in = synd_mob
W.implanted = 1
W.implanted(synd_mob)
W.implant(synd_mob)
var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(synd_mob)
E.imp_in = synd_mob
E.implanted = 1
E.implanted(synd_mob)
E.implant(synd_mob)
synd_mob.faction |= "syndicate"
synd_mob.update_icons()
return 1
+3 -1
View File
@@ -60,8 +60,10 @@
"}
if(patient.surgeries.len)
dat += "<BR><B>Initiated Procedures</B><div class='statusDisplay'>"
dat += "<BR><BR><B>Initiated Procedures</B><div class='statusDisplay'>"
for(var/datum/surgery/procedure in patient.surgeries)
dat += "[capitalize(procedure.name)]<BR>"
var/datum/surgery_step/surgery_step = procedure.get_surgery_step()
dat += "Next step: [capitalize(surgery_step.name)]<BR>"
dat += "</div>"
return dat
@@ -3,17 +3,19 @@
icon = 'icons/obj/implants.dmi'
icon_state = "generic" //Shows up as the action button icon
action_button_is_hands_free = 1
origin_tech = "materials=2;biotech=3;programming=2"
var/activated = 1 //1 for implant types that can be activated, 0 for ones that are "always on" like loyalty implants
var/implanted = null
var/mob/living/imp_in = null
item_color = "b"
var/allow_reagents = 0
var/allow_multiple = 0
var/uses = -1
/obj/item/weapon/implant/proc/trigger(emote, mob/source)
return
/obj/item/weapon/implant/proc/activate()
return
@@ -22,16 +24,53 @@
//What does the implant do upon injection?
//return 0 if the implant fails (ex. Revhead and loyalty implant.)
//return 1 if the implant succeeds (ex. Nonrevhead and loyalty implant.)
/obj/item/weapon/implant/proc/implanted(mob/source)
//return 1 if the implant injects
//return -1 if the implant fails to inject
//return 0 if there is no room for implant
/obj/item/weapon/implant/proc/implant(var/mob/source, var/mob/user)
var/obj/item/weapon/implant/imp_e = locate(src.type) in source
if(!allow_multiple && imp_e && imp_e != src)
if(imp_e.uses < initial(imp_e.uses)*2)
if(uses == -1)
imp_e.uses = -1
else
imp_e.uses = min(imp_e.uses + uses, initial(imp_e.uses)*2)
qdel(src)
return 1
else
return 0
if(activated)
action_button_name = "Activate [src.name]"
if(istype(source, /mob/living/carbon/human))
var/mob/living/carbon/human/H = source
H.sec_hud_set_implants()
src.loc = source
imp_in = source
implanted = 1
if(user)
add_logs(user, source, "implanted", object="[name]")
return 1
/obj/item/weapon/implant/proc/removed(var/mob/source)
src.loc = null
imp_in = null
implanted = 0
if(istype(source, /mob/living/carbon/human))
var/mob/living/carbon/human/H = source
H.sec_hud_set_implants()
return 1
/obj/item/weapon/implant/Destroy()
if(imp_in)
removed(imp_in)
..()
/obj/item/weapon/implant/proc/get_data()
return "No information available"
@@ -45,6 +84,7 @@
name = "tracking implant"
desc = "Track with this."
activated = 0
origin_tech = "materials=2;magnets=2;programming=2;biotech=2"
var/id = 1.0
/obj/item/weapon/implant/tracking/get_data()
@@ -68,6 +108,7 @@
name = "firearms authentication implant"
desc = "Lets you shoot your guns"
icon_state = "auth"
origin_tech = "materials=2;magnets=2;programming=2;biotech=5;syndicate=5"
activated = 0
/obj/item/weapon/implant/weapons_auth/get_data()
@@ -78,181 +119,13 @@
<b>Function:</b> Allows operation of implant-locked weaponry, preventing equipment from falling into enemy hands."}
return dat
/obj/item/weapon/implant/explosive
name = "microbomb implant"
desc = "And boom goes the weasel."
icon_state = "explosive"
var/weak = 1.6
var/medium = 0.8
var/heavy = 0.4
var/delay = 7
/obj/item/weapon/implant/explosive/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Robust Corp RX-78 Employee Management Implant<BR>
<b>Life:</b> Activates upon death.<BR>
<b>Important Notes:</b> Explodes<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death.<BR>
<b>Special Features:</b> Explodes<BR>
<b>Integrity:</b> Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
return dat
/obj/item/weapon/implant/explosive/trigger(emote, mob/source)
if(emote == "deathgasp")
activate("death")
/obj/item/weapon/implant/explosive/activate(cause)
if(!cause || !imp_in) return 0
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your microbomb implant? This will cause you to explode!", "Microbomb Implant Confirmation", "Yes", "No") != "Yes")
return 0
for(var/obj/item/weapon/implant/explosive/E in imp_in)
heavy += 0.4
medium += 0.8
weak += 1.6
delay += 7
if(E != src)
qdel(E)
heavy = round(heavy)
medium = round(medium)
weak = round(weak)
imp_in << "<span class='notice'>You activate your microbomb implant.</span>"
//If the delay is short, just blow up already jeez
if(delay <= 7)
imp_in.gib()
explosion(src,heavy,medium,weak,weak, flame_range = weak)
qdel(src)
return
timed_explosion()
/obj/item/weapon/implant/explosive/proc/timed_explosion()
imp_in.visible_message("<span class = 'warning'>[imp_in] starts beeping ominously!</span>")
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
if(imp_in.stat)
imp_in.visible_message("<span class = 'warning'>[imp_in] doubles over in pain!</span>")
imp_in.Weaken(7)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
imp_in.gib()
explosion(src,heavy,medium,weak,weak, flame_range = weak)
qdel(src)
/obj/item/weapon/implant/explosive/macro
name = "macrobomb implant"
desc = "And boom goes the weasel. And everything else nearby."
icon_state = "explosive"
weak = 16
medium = 8
heavy = 4
delay = 70
/obj/item/weapon/implant/explosive/macro/activate(cause)
if(!cause || !imp_in) return 0
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your macrobomb implant? This will cause you to explode and gib!", "Macrobomb Implant Confirmation", "Yes", "No") != "Yes")
return 0
for(var/obj/item/weapon/implant/explosive/macro/E in imp_in)
if(E != src)
qdel(E)
imp_in << "<span class='notice'>You activate your macrobomb implant.</span>"
timed_explosion()
/obj/item/weapon/implant/chem
name = "chem implant"
desc = "Injects things."
icon_state = "reagents"
allow_reagents = 1
/obj/item/weapon/implant/chem/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Robust Corp MJ-420 Prisoner Management Implant<BR>
<b>Life:</b> Deactivates upon death but remains within the body.<BR>
<b>Important Notes: Due to the system functioning off of nutrients in the implanted subject's body, the subject<BR>
will suffer from an increased appetite.</B><BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a small capsule that can contain various chemicals. Upon receiving a specially encoded signal<BR>
the implant releases the chemicals directly into the blood stream.<BR>
<b>Special Features:</b>
<i>Micro-Capsule</i>- Can be loaded with any sort of chemical agent via the common syringe and can hold 50 units.<BR>
Can only be loaded while still in its original case.<BR>
<b>Integrity:</b> Implant will last so long as the subject is alive. However, if the subject suffers from malnutrition,<BR>
the implant may become unstable and either pre-maturely inject the subject or simply break."}
return dat
/obj/item/weapon/implant/chem/New()
..()
create_reagents(50)
/obj/item/weapon/implant/chem/trigger(emote, mob/source)
if(emote == "deathgasp")
activate(reagents.total_volume)
/obj/item/weapon/implant/chem/activate(cause)
if(!cause || !imp_in) return 0
var/mob/living/carbon/R = imp_in
var/injectamount = null
if (cause == "action_button")
injectamount = reagents.total_volume
else
injectamount = cause
reagents.trans_to(R, injectamount)
R << "<span class='italics'>You hear a faint beep.</span>"
if(!reagents.total_volume)
R << "<span class='italics'>You hear a faint click from your chest.</span>"
qdel(src)
/obj/item/weapon/implant/loyalty
name = "loyalty implant"
desc = "Makes you loyal or such."
activated = 0
/obj/item/weapon/implant/loyalty/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Nanotrasen Employee Management Implant<BR>
<b>Life:</b> Ten years.<BR>
<b>Important Notes:</b> Personnel injected with this device tend to be much more loyal to the company.<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a small pod of nanobots that manipulate the host's mental functions.<BR>
<b>Special Features:</b> Will prevent and cure most forms of brainwashing.<BR>
<b>Integrity:</b> Implant will last so long as the nanobots are inside the bloodstream."}
return dat
/obj/item/weapon/implant/loyalty/implanted(mob/target)
..()
if((target.mind in (ticker.mode.head_revolutionaries | ticker.mode.get_gang_bosses())) || is_shadow_or_thrall(target))
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel the corporate tendrils of Nanotrasen try to invade your mind!</span>")
return 0
if(target.mind in ticker.mode.get_gangsters())
ticker.mode.remove_gangster(target.mind)
target.visible_message("<span class='warning'>[src] was destroyed in the process!</span>", "<span class='notice'>You feel a surge of loyalty towards Nanotrasen.</span>")
return 0
if(target.mind in ticker.mode.revolutionaries)
ticker.mode.remove_revolutionary(target.mind)
if(target.mind in ticker.mode.cult)
target << "<span class='warning'>You feel the corporate tendrils of Nanotrasen try to invade your mind!</span>"
else
target << "<span class='notice'>You feel a surge of loyalty towards Nanotrasen.</span>"
return 1
/obj/item/weapon/implant/loyalty/Destroy()
if(imp_in.stat != DEAD)
imp_in << "<span class='boldnotice'>You feel a sense of liberation as Nanotrasen's grip on your mind fades away.</span>"
..()
/obj/item/weapon/implant/adrenalin
name = "adrenal implant"
desc = "Removes all stuns and knockdowns."
icon_state = "adrenal"
var/uses = 3
origin_tech = "materials=2;biotech=4;combat=3;syndicate=4"
uses = 3
/obj/item/weapon/implant/adrenalin/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
@@ -285,8 +158,8 @@
name = "emp implant"
desc = "Triggers an EMP."
icon_state = "emp"
var/uses = 2
origin_tech = "materials=2;biotech=3;magnets=4;syndicate=4"
uses = 2
/obj/item/weapon/implant/emp/activate()
if (src.uses < 1) return 0
@@ -0,0 +1,54 @@
/obj/item/weapon/implant/chem
name = "chem implant"
desc = "Injects things."
icon_state = "reagents"
origin_tech = "materials=3;biotech=4"
flags = OPENCONTAINER
/obj/item/weapon/implant/chem/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Robust Corp MJ-420 Prisoner Management Implant<BR>
<b>Life:</b> Deactivates upon death but remains within the body.<BR>
<b>Important Notes: Due to the system functioning off of nutrients in the implanted subject's body, the subject<BR>
will suffer from an increased appetite.</B><BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a small capsule that can contain various chemicals. Upon receiving a specially encoded signal<BR>
the implant releases the chemicals directly into the blood stream.<BR>
<b>Special Features:</b>
<i>Micro-Capsule</i>- Can be loaded with any sort of chemical agent via the common syringe and can hold 50 units.<BR>
Can only be loaded while still in its original case.<BR>
<b>Integrity:</b> Implant will last so long as the subject is alive. However, if the subject suffers from malnutrition,<BR>
the implant may become unstable and either pre-maturely inject the subject or simply break."}
return dat
/obj/item/weapon/implant/chem/New()
..()
create_reagents(50)
/obj/item/weapon/implant/chem/trigger(emote, mob/source)
if(emote == "deathgasp")
activate(reagents.total_volume)
/obj/item/weapon/implant/chem/activate(cause)
if(!cause || !imp_in) return 0
var/mob/living/carbon/R = imp_in
var/injectamount = null
if (cause == "action_button")
injectamount = reagents.total_volume
else
injectamount = cause
reagents.trans_to(R, injectamount)
R << "<span class='italics'>You hear a faint beep.</span>"
if(!reagents.total_volume)
R << "<span class='italics'>You hear a faint click from your chest.</span>"
qdel(src)
/obj/item/weapon/implantcase/chem
name = "glass case - 'Remote Chemical'"
desc = "A case containing a remote chemical implant."
/obj/item/weapon/implantcase/chem/New()
imp = new /obj/item/weapon/implant/chem(src)
..()
@@ -0,0 +1,119 @@
/obj/item/weapon/implant/explosive
name = "microbomb implant"
desc = "And boom goes the weasel."
icon_state = "explosive"
origin_tech = "materials=2;combat=3;biotech=4;syndicate=4"
var/weak = 1.6
var/medium = 0.8
var/heavy = 0.4
var/delay = 7
/obj/item/weapon/implant/explosive/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Robust Corp RX-78 Employee Management Implant<BR>
<b>Life:</b> Activates upon death.<BR>
<b>Important Notes:</b> Explodes<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death.<BR>
<b>Special Features:</b> Explodes<BR>
<b>Integrity:</b> Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
return dat
/obj/item/weapon/implant/explosive/trigger(emote, mob/source)
if(emote == "deathgasp")
activate("death")
/obj/item/weapon/implant/explosive/activate(cause)
if(!cause || !imp_in) return 0
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your microbomb implant? This will cause you to explode!", "Microbomb Implant Confirmation", "Yes", "No") != "Yes")
return 0
heavy = round(heavy)
medium = round(medium)
weak = round(weak)
imp_in << "<span class='notice'>You activate your microbomb implant.</span>"
//If the delay is short, just blow up already jeez
if(delay <= 7)
imp_in.gib()
explosion(src,heavy,medium,weak,weak, flame_range = weak)
qdel(src)
return
timed_explosion()
/obj/item/weapon/implant/explosive/implant(mob/source)
var/obj/item/weapon/implant/explosive/imp_e = locate(src.type) in source
if(imp_e)
imp_e.heavy += heavy
imp_e.medium += medium
imp_e.weak += weak
imp_e.delay += delay
qdel(src)
return 1
return ..()
/obj/item/weapon/implant/explosive/proc/timed_explosion()
imp_in.visible_message("<span class = 'warning'>[imp_in] starts beeping ominously!</span>")
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
if(imp_in && imp_in.stat)
imp_in.visible_message("<span class = 'warning'>[imp_in] doubles over in pain!</span>")
imp_in.Weaken(7)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
if(imp_in)
imp_in.gib()
explosion(src,heavy,medium,weak,weak, flame_range = weak)
qdel(src)
/obj/item/weapon/implant/explosive/macro
name = "macrobomb implant"
desc = "And boom goes the weasel. And everything else nearby."
icon_state = "explosive"
origin_tech = "materials=3;combat=5;biotech=4;syndicate=5"
weak = 16
medium = 8
heavy = 4
delay = 70
/obj/item/weapon/implant/explosive/macro/activate(cause)
if(!cause || !imp_in) return 0
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your macrobomb implant? This will cause you to explode and gib!", "Macrobomb Implant Confirmation", "Yes", "No") != "Yes")
return 0
imp_in << "<span class='notice'>You activate your macrobomb implant.</span>"
timed_explosion()
/obj/item/weapon/implant/explosive/macro/implant(mob/source)
var/obj/item/weapon/implant/explosive/imp_e = locate(src.type) in source
if(imp_e)
return 0
imp_e = locate(/obj/item/weapon/implant/explosive) in source
if(imp_e)
heavy += imp_e.heavy
medium += imp_e.medium
weak += imp_e.weak
delay += imp_e.delay
qdel(imp_e)
return ..()
/obj/item/weapon/implanter/explosive
name = "implanter (explosive)"
/obj/item/weapon/implanter/explosive/New()
imp = new /obj/item/weapon/implant/explosive(src)
..()
/obj/item/weapon/implantcase/explosive
name = "glass case - 'Explosive'"
desc = "A case containing an explosive implant."
/obj/item/weapon/implantcase/explosive/New()
imp = new /obj/item/weapon/implant/explosive(src)
..()
@@ -1,37 +1,36 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/weapon/implant/freedom
name = "freedom implant"
desc = "Use this to escape from those evil Red Shirts."
icon_state = "freedom"
item_color = "r"
var/uses = 4.0
/obj/item/weapon/implant/freedom/activate()
if (src.uses < 1) return 0
src.uses--
imp_in << "You feel a faint click."
if(iscarbon(imp_in))
var/mob/living/carbon/C_imp_in = imp_in
C_imp_in.uncuff()
/obj/item/weapon/implant/freedom/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Freedom Beacon<BR>
<b>Life:</b> optimum 5 uses<BR>
<b>Important Notes:</b> <font color='red'>Illegal</font><BR>
<HR>
<b>Implant Details:</b> <BR>
<b>Function:</b> Transmits a specialized cluster of signals to override handcuff locking
mechanisms<BR>
<b>Special Features:</b><BR>
<i>Neuro-Scan</i>- Analyzes certain shadow signals in the nervous system<BR>
<b>Integrity:</b> The battery is extremely weak and commonly after injection its
life can drive down to only 1 use.<HR>
No Implant Specifics"}
return dat
/obj/item/weapon/implant/freedom
name = "freedom implant"
desc = "Use this to escape from those evil Red Shirts."
icon_state = "freedom"
item_color = "r"
origin_tech = "materials=2;magnets=3;biotech=3;syndicate=4"
uses = 4
/obj/item/weapon/implant/freedom/activate()
if(uses == 0) return 0
if(uses != -1) uses--
imp_in << "You feel a faint click."
if(iscarbon(imp_in))
var/mob/living/carbon/C_imp_in = imp_in
C_imp_in.uncuff()
/obj/item/weapon/implant/freedom/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Freedom Beacon<BR>
<b>Life:</b> optimum 5 uses<BR>
<b>Important Notes:</b> <font color='red'>Illegal</font><BR>
<HR>
<b>Implant Details:</b> <BR>
<b>Function:</b> Transmits a specialized cluster of signals to override handcuff locking
mechanisms<BR>
<b>Special Features:</b><BR>
<i>Neuro-Scan</i>- Analyzes certain shadow signals in the nervous system<BR>
<b>Integrity:</b> The battery is extremely weak and commonly after injection its
life can drive down to only 1 use.<HR>
No Implant Specifics"}
return dat
@@ -0,0 +1,65 @@
/obj/item/weapon/implant/loyalty
name = "loyalty implant"
desc = "Makes you loyal or such."
origin_tech = "materials=2;biotech=4;programming=4"
activated = 0
/obj/item/weapon/implant/loyalty/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Nanotrasen Employee Management Implant<BR>
<b>Life:</b> Ten years.<BR>
<b>Important Notes:</b> Personnel injected with this device tend to be much more loyal to the company.<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a small pod of nanobots that manipulate the host's mental functions.<BR>
<b>Special Features:</b> Will prevent and cure most forms of brainwashing.<BR>
<b>Integrity:</b> Implant will last so long as the nanobots are inside the bloodstream."}
return dat
/obj/item/weapon/implant/loyalty/implant(mob/target)
if(..())
if((target.mind in (ticker.mode.head_revolutionaries | ticker.mode.get_gang_bosses())) || is_shadow_or_thrall(target))
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel the corporate tendrils of Nanotrasen try to invade your mind!</span>")
imp_in = null
qdel(src)
return -1
if(target.mind in ticker.mode.get_gangsters())
ticker.mode.remove_gangster(target.mind)
target.visible_message("<span class='warning'>[src] was destroyed in the process!</span>", "<span class='notice'>You feel a surge of loyalty towards Nanotrasen.</span>")
imp_in = null
qdel(src)
return -1
if(target.mind in ticker.mode.revolutionaries)
ticker.mode.remove_revolutionary(target.mind)
if(target.mind in ticker.mode.cult)
target << "<span class='warning'>You feel the corporate tendrils of Nanotrasen try to invade your mind!</span>"
else
target << "<span class='notice'>You feel a surge of loyalty towards Nanotrasen.</span>"
return 1
return 0
/obj/item/weapon/implant/loyalty/removed(mob/target)
if(..())
if(target.stat != DEAD)
target << "<span class='boldnotice'>You feel a sense of liberation as Nanotrasen's grip on your mind fades away.</span>"
return 1
return 0
/obj/item/weapon/implanter/loyalty
name = "implanter (loyalty)"
/obj/item/weapon/implanter/loyalty/New()
imp = new /obj/item/weapon/implant/loyalty(src)
..()
update_icon()
/obj/item/weapon/implantcase/loyalty
name = "glass case - 'Loyalty'"
desc = "A case containing a loyalty implant."
/obj/item/weapon/implantcase/loyalty/New()
imp = new /obj/item/weapon/implant/loyalty(src)
..()
@@ -1,19 +1,28 @@
/obj/item/weapon/implantcase
name = "glass case"
desc = "A case containing an implant."
name = "implant case"
desc = "A glass case containing an implant."
icon = 'icons/obj/items.dmi'
icon_state = "implantcase-0"
item_state = "implantcase"
throw_speed = 2
throw_range = 5
w_class = 1.0
origin_tech = "materials=1;biotech=2"
materials = list(MAT_GLASS=500)
var/obj/item/weapon/implant/imp = null
/obj/item/weapon/implantcase/update_icon()
if(imp)
icon_state = "implantcase-[imp.item_color]"
origin_tech = imp.origin_tech
flags = imp.flags
reagents = imp.reagents
else
icon_state = "implantcase-0"
origin_tech = initial(origin_tech)
flags = initial(flags)
reagents = null
/obj/item/weapon/implantcase/attackby(obj/item/weapon/W, mob/user, params)
@@ -25,21 +34,13 @@
if(!in_range(src, user) && loc != user)
return
if(t)
name = "glass case- '[t]'"
name = "implant case - '[t]'"
else
name = "glass case"
else if(istype(W, /obj/item/weapon/reagent_containers/syringe))
if(!imp) return
if(!imp.allow_reagents) return
if(imp.reagents.total_volume >= imp.reagents.maximum_volume)
user << "<span class='notice'>[src] is full.</span>"
else
W.reagents.trans_to(imp, 5)
user << "<span class='notice'>You inject 5 units of the solution. The syringe now contains [W.reagents.total_volume] units.</span>"
name = "implant case"
else if(istype(W, /obj/item/weapon/implanter))
var/obj/item/weapon/implanter/I = W
if(I.imp)
if((imp || I.imp.implanted))
if(imp || I.imp.implanted)
return
I.imp.loc = src
imp = I.imp
@@ -56,55 +57,28 @@
update_icon()
I.update_icon()
/*else if(istype(W, /obj/item/ammo_casing/shotgun/implanter))
var/obj/item/ammo_casing/shotgun/implanter/I = W
if(I.implanter)
src.attackby(I.implanter, user, params) */ // COMING SOON -- c0
/obj/item/weapon/implantcase/New()
..()
update_icon()
/obj/item/weapon/implantcase/tracking
name = "glass case- 'Tracking'"
name = "glass case - 'Tracking'"
desc = "A case containing a tracking implant."
icon = 'icons/obj/items.dmi'
icon_state = "implantcase-b"
/obj/item/weapon/implantcase/tracking/New()
imp = new /obj/item/weapon/implant/tracking(src)
..()
/obj/item/weapon/implantcase/explosive
name = "glass case- 'Explosive'"
desc = "A case containing an explosive implant."
icon = 'icons/obj/items.dmi'
icon_state = "implantcase-r"
/obj/item/weapon/implantcase/explosive/New()
imp = new /obj/item/weapon/implant/explosive(src)
..()
/obj/item/weapon/implantcase/chem
name = "glass case- 'Chem'"
desc = "A case containing a chemical implant."
icon = 'icons/obj/items.dmi'
icon_state = "implantcase-b"
/obj/item/weapon/implantcase/chem/New()
imp = new /obj/item/weapon/implant/chem(src)
..()
/obj/item/weapon/implantcase/loyalty
name = "glass case- 'Loyalty'"
desc = "A case containing a loyalty implant."
icon = 'icons/obj/items.dmi'
icon_state = "implantcase-r"
/obj/item/weapon/implantcase/loyalty/New()
imp = new /obj/item/weapon/implant/loyalty(src)
..()
/obj/item/weapon/implantcase/weapons_auth
name = "glass case- 'Firearms Authentication'"
name = "glass case - 'Firearms Authentication'"
desc = "A case containing a firearms authentication implant."
icon = 'icons/obj/items.dmi'
icon_state = "implantcase-r"
/obj/item/weapon/implantcase/weapons_auth/New()
imp = new /obj/item/weapon/implant/weapons_auth(src)
@@ -132,11 +132,8 @@
if(istype(imp, /obj/item/weapon/implant/loyalty))
M.visible_message("<span class='warning'>[M] has been implanted by the [src.name].</span>")
if(imp.implanted(M))
imp.loc = M
imp.imp_in = M
imp.implanted = 1
implant_list -= imp
if(imp.implant(M))
implant_list -= imp
break
return
@@ -1,82 +1,74 @@
/obj/item/weapon/implanter
name = "implanter"
desc = "A sterile automatic implant injector."
icon = 'icons/obj/items.dmi'
icon_state = "implanter0"
item_state = "syringe_0"
throw_speed = 3
throw_range = 5
w_class = 2.0
origin_tech = "materials=1;biotech=3;programming=2"
materials = list(MAT_METAL=600, MAT_GLASS=200)
var/obj/item/weapon/implant/imp = null
/obj/item/weapon/implanter/update_icon()
if(imp)
icon_state = "implanter1"
origin_tech = imp.origin_tech
else
icon_state = "implanter0"
origin_tech = initial(origin_tech)
/obj/item/weapon/implanter/attack(mob/living/carbon/M, mob/user)
if(!iscarbon(M))
return
if(user && imp)
if(M.head && (M.head.flags & THICKMATERIAL))
user << "<span class='warning'>[M]'s [M.head.name] is in the way! Take it off first!</span>"
return
M.visible_message("<span class='warning'>[user] is attemping to implant [M].</span>")
if(M != user)
M.visible_message("<span class='warning'>[user] is attemping to implant [M].</span>")
var/turf/T = get_turf(M)
if(T && (M == user || do_after(user, 50, target = M)))
if(T && (M == user || do_after(user, 50)))
if(user && M && (get_turf(M) == T) && src && imp)
if(M.head && (M.head.flags & THICKMATERIAL))
return
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you with the implant.</span>")
add_logs(user, M, "implanted", src)
user << "<span class='notice'>You implant the implant into [M].</span>"
if(imp.implanted(M))
imp.loc = M
imp.imp_in = M
imp.implanted = 1
if(imp.implant(M, user))
user << "<span class='notice'>You implant the implant into [M].</span>"
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you with the implant.</span>")
imp = null
update_icon()
imp = null
update_icon()
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
H.sec_hud_set_implants()
/obj/item/weapon/implanter/loyalty
name = "implanter-loyalty"
/obj/item/weapon/implanter/loyalty/New()
imp = new /obj/item/weapon/implant/loyalty(src)
/obj/item/weapon/implanter/attackby(obj/item/weapon/W, mob/user, params)
..()
update_icon()
if(istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "What would you like the label to be?", name, null)
if(user.get_active_hand() != W)
return
if(!in_range(src, user) && loc != user)
return
if(t)
name = "implanter ([t])"
else
name = "implanter"
/obj/item/weapon/implanter/explosive
name = "implanter-explosive"
/obj/item/weapon/implanter/explosive/New()
imp = new /obj/item/weapon/implant/explosive(src)
/obj/item/weapon/implanter/New()
..()
update_icon()
spawn(1)
update_icon()
/obj/item/weapon/implanter/adrenalin
name = "implanter-adrenalin"
name = "implanter (adrenalin)"
/obj/item/weapon/implanter/adrenalin/New()
imp = new /obj/item/weapon/implant/adrenalin(src)
..()
update_icon()
/obj/item/weapon/implanter/emp
name = "implanter-EMP"
name = "implanter (EMP)"
/obj/item/weapon/implanter/emp/New()
imp = new /obj/item/weapon/implant/emp(src)
..()
update_icon()
@@ -3,18 +3,33 @@
desc = "Summon things."
icon = 'icons/obj/radio.dmi'
icon_state = "radio"
origin_tech = "materials=2;magnets=4;programming=4;biotech=4;syndicate=8;bluespace=5"
/obj/item/weapon/implant/uplink/New()
hidden_uplink = new(src)
hidden_uplink.uses = 10
..()
/obj/item/weapon/implant/uplink/implanted(mob/source)
..()
hidden_uplink.uplink_owner="[source.key]"
return 1
/obj/item/weapon/implant/uplink/implant(mob/source)
var/obj/item/weapon/implant/imp_e = locate(src.type) in source
if(imp_e)
imp_e.hidden_uplink.uses += hidden_uplink.uses
qdel(src)
return 1
if(..())
hidden_uplink.uplink_owner="[source.key]"
return 1
return 0
/obj/item/weapon/implant/uplink/activate()
if(hidden_uplink)
hidden_uplink.check_trigger(imp_in)
hidden_uplink.check_trigger(imp_in)
/obj/item/weapon/implanter/uplink
name = "implanter (uplink)"
/obj/item/weapon/implanter/uplink/New()
imp = new /obj/item/weapon/implant/uplink(src)
..()
+9 -12
View File
@@ -1,18 +1,10 @@
//Exile implants will allow you to use the station gate, but not return home.
//This will allow security to exile badguys/for badguys to exile their kill targets
/obj/item/weapon/implanter/exile
name = "implanter-exile"
/obj/item/weapon/implanter/exile/New()
imp = new /obj/item/weapon/implant/exile( src )
..()
update_icon()
/obj/item/weapon/implant/exile
name = "exile implant"
desc = "Prevents you from returning from away missions"
origin_tech = "materials=2;biotech=3;magnets=2;bluespace=3"
activated = 0
/obj/item/weapon/implant/exile/get_data()
@@ -22,11 +14,16 @@
return dat
/obj/item/weapon/implanter/exile
name = "implanter (exile)"
/obj/item/weapon/implanter/exile/New()
imp = new /obj/item/weapon/implant/exile( src )
..()
/obj/item/weapon/implantcase/exile
name = "glass case- 'Exile'"
name = "glass case - 'Exile'"
desc = "A case containing an exile implant."
icon = 'icons/obj/items.dmi'
icon_state = "implantcase-r"
/obj/item/weapon/implantcase/exile/New()
imp = new /obj/item/weapon/implant/exile(src)
@@ -36,7 +36,7 @@
/datum/table_recipe/appendixburger
name = "Appendix burger"
reqs = list(
/obj/item/organ/appendix = 1,
/obj/item/organ/internal/appendix = 1,
/obj/item/weapon/reagent_containers/food/snacks/bun = 1
)
result = /obj/item/weapon/reagent_containers/food/snacks/burger/appendix
+1 -1
View File
@@ -114,7 +114,7 @@
if(89)
new /obj/item/organ/brain/alien(src)
if(90)
new /obj/item/organ/heart(src)
new /obj/item/organ/internal/heart(src)
if(91)
new /obj/item/device/soulstone/anybody(src)
if(92)
@@ -22,8 +22,8 @@
/obj/item/organ/limb/r_arm, /obj/item/organ/limb/r_leg, /obj/item/organ/limb/l_leg)
for(var/obj/item/organ/limb/O in organs)
O.owner = src
internal_organs += new /obj/item/organ/appendix
internal_organs += new /obj/item/organ/heart
internal_organs += new /obj/item/organ/internal/appendix
internal_organs += new /obj/item/organ/internal/heart
internal_organs += new /obj/item/organ/brain
// for spawned humans; overwritten by other code
@@ -16,8 +16,8 @@
verbs += /mob/living/proc/mob_sleep
verbs += /mob/living/proc/lay_down
internal_organs += new /obj/item/organ/appendix
internal_organs += new /obj/item/organ/heart
internal_organs += new /obj/item/organ/internal/appendix
internal_organs += new /obj/item/organ/internal/heart
internal_organs += new /obj/item/organ/brain
if(name == "monkey")
+1 -3
View File
@@ -213,7 +213,5 @@ Contents:
equip_to_slot_or_del(new /obj/item/weapon/tank/jetpack/carbondioxide(src), slot_back)
var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(src)
E.imp_in = src
E.implanted = 1
E.implanted(src)
E.implant(src)
return 1
@@ -199,4 +199,4 @@
build_type = PROTOLATHE | MECHFAB
materials = list(MAT_METAL = 200, MAT_GLASS = 200, MAT_GOLD = 500, MAT_URANIUM = 1000, MAT_DIAMOND = 2000)
build_path = /obj/item/cybernetic_implant/chest/reviver
category = list("Medical Designs")
category = list("Medical Designs")
+4 -6
View File
@@ -2,15 +2,15 @@
name = "appendectomy"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/incise, /datum/surgery_step/extract_appendix, /datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
location = "groin"
requires_organic_chest = 1
possible_locs = list("groin")
//extract appendix
/datum/surgery_step/extract_appendix
name = "extract appendix"
accept_hand = 1
time = 64
var/obj/item/organ/appendix/A = null
var/obj/item/organ/internal/appendix/A = null
/datum/surgery_step/extract_appendix/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
A = locate() in target.internal_organs
@@ -23,9 +23,7 @@
if(A)
user.visible_message("[user] successfully removes [target]'s appendix!", "<span class='notice'>You successfully removes [target]'s appendix.</span>")
A.loc = get_turf(target)
target.internal_organs -= A
for(var/datum/disease/appendicitis in target.viruses)
appendicitis.cure()
A.Remove(target)
else
user << "<span class='warning'>You can't find an appendix in [target]!</span>"
return 1
+3 -1
View File
@@ -2,11 +2,13 @@
name = "brain removal"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/saw, /datum/surgery_step/extract_brain)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
location = "head"
possible_locs = list("head")
requires_organic_bodypart = 0
//extract brain
/datum/surgery_step/extract_brain
name = "extract brain"
implements = list(/obj/item/weapon/hemostat = 100, /obj/item/weapon/crowbar = 55)
time = 64
var/obj/item/organ/brain/B = null
+3 -3
View File
@@ -2,12 +2,12 @@
name = "cavity implant"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/incise, /datum/surgery_step/handle_cavity, /datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
location = "chest"
requires_organic_chest = 1
possible_locs = list("chest")
//handle cavity
/datum/surgery_step/handle_cavity
name = "implant item"
accept_hand = 1
accept_any_item = 1
time = 32
@@ -25,7 +25,7 @@
/datum/surgery_step/handle_cavity/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(tool)
if(IC || tool.w_class > 3 || (tool.flags & NODROP) || tool.GetTypeInAllContents(/obj/item/weapon/disk/nuclear) || istype(tool, /obj/item/weapon/disk/nuclear) || istype(tool, /obj/item/organ))
if(IC || tool.w_class > 3 || NODROP in tool.flags || tool.GetTypeInAllContents(/obj/item/weapon/disk/nuclear) || istype(tool, /obj/item/weapon/disk/nuclear) || istype(tool, /obj/item/organ))
user << "<span class='warning'>You can't seem to fit [tool] in [target]'s [target_zone]!</span>"
return 0
else
+1
View File
@@ -7,6 +7,7 @@
//extract brain
/datum/surgery_step/extract_core
name = "extract core"
implements = list(/obj/item/weapon/hemostat = 100, /obj/item/weapon/crowbar = 100)
time = 16
+12 -8
View File
@@ -5,12 +5,13 @@
user.visible_message("[user] begins to implant [target] with [implant].", "<span class='notice'>You begin to implant [target] with [implant]...</span>")
//[[[[EYES]]]]
/datum/surgery/eye_cybernetic_implant/eyes
/datum/surgery/cybernetic_implant/eyes
name = "eye cybernetic implant"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/cybernetic_implant/eyes, /datum/surgery_step/fix_eyes, /datum/surgery_step/close)
location = "eyes"
possible_locs = list("eyes")
/datum/surgery_step/cybernetic_implant/eyes
name = "insert eye cybernetic implant"
implements = list(/obj/item/cybernetic_implant/eyes = 100)
time = 32
@@ -23,12 +24,14 @@
return 1
//[[[[BRAIN]]]]
/datum/surgery/eye_cybernetic_implant/brain
/datum/surgery/cybernetic_implant/brain
name = "brain cybernetic implant"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/saw, /datum/surgery_step/cybernetic_implant/brain, /datum/surgery_step/close)
location = "head"
possible_locs = list("head")
requires_organic_bodypart = 0
/datum/surgery_step/cybernetic_implant/brain
name = "insert brain cybernetic implant"
implements = list(/obj/item/cybernetic_implant/brain = 100)
time = 32
@@ -45,12 +48,14 @@
return 1
//[[[[CHEST]]]]
/datum/surgery/eye_cybernetic_implant/chest
/datum/surgery/cybernetic_implant/chest
name = "torso cybernetic implant"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/saw, /datum/surgery_step/cybernetic_implant/chest, /datum/surgery_step/close)
location = "chest"
possible_locs = list("chest")
requires_organic_bodypart = 0
/datum/surgery_step/cybernetic_implant/chest
name = "insert torso cybernetic implant"
implements = list(/obj/item/cybernetic_implant/chest = 100)
time = 32
@@ -70,10 +75,9 @@
if(full)
user << "<span class='warning'>You can't seem to implant anything else into the [target]'s [target_zone]!</span>"
else
if(!user.drop_item())
return
user.visible_message("[user] inserts [implant] into the [target]'s [target_zone == "head" ? "brain" : target_zone]!", "<span class='notice'>You insert [implant] into the [target]'s [target_zone == "head" ? "brain" : target_zone].</span>")
implant.owner = target
implant.function()
user.drop_item()
target.internal_organs |= implant
implant.loc = target
+3 -2
View File
@@ -2,11 +2,12 @@
name = "eye surgery"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/fix_eyes, /datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
location = "eyes"
possible_locs = list("eyes")
requires_organic_bodypart = 0
//fix eyes
/datum/surgery_step/fix_eyes
name = "fix eyes"
implements = list(/obj/item/weapon/hemostat = 100, /obj/item/weapon/screwdriver = 45, /obj/item/weapon/pen = 25)
time = 64
+2 -2
View File
@@ -2,12 +2,12 @@
name = "gender reassignment"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/reshape_genitals, /datum/surgery_step/close)
species = list(/mob/living/carbon/human)
location = "groin"
requires_organic_chest = 1
possible_locs = list("groin")
//reshape_genitals
/datum/surgery_step/reshape_genitals
name = "reshape genitals"
implements = list(/obj/item/weapon/scalpel = 100, /obj/item/weapon/hatchet = 50, /obj/item/weapon/wirecutters = 35)
time = 64
+17 -2
View File
@@ -1,6 +1,7 @@
//make incision
/datum/surgery_step/incise
name = "make incision"
implements = list(/obj/item/weapon/scalpel = 100, /obj/item/weapon/kitchen/knife = 65, /obj/item/weapon/shard = 45)
time = 24
@@ -11,6 +12,7 @@
//clamp bleeders
/datum/surgery_step/clamp_bleeders
name = "clamp bleeders"
implements = list(/obj/item/weapon/hemostat = 100, /obj/item/weapon/wirecutters = 60, /obj/item/stack/cable_coil = 15)
time = 48
@@ -20,6 +22,7 @@
//retract skin
/datum/surgery_step/retract_skin
name = "retract skin"
implements = list(/obj/item/weapon/retractor = 100, /obj/item/weapon/screwdriver = 45, /obj/item/weapon/wirecutters = 35)
time = 32
@@ -30,6 +33,7 @@
//close incision
/datum/surgery_step/close
name = "mend incision"
implements = list(/obj/item/weapon/cautery = 100, /obj/item/weapon/weldingtool = 70, /obj/item/weapon/lighter = 45, /obj/item/weapon/match = 20)
time = 32
@@ -55,14 +59,25 @@
return 0
/datum/surgery_step/close/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(locate(/datum/surgery_step/saw) in surgery.steps)
target.heal_organ_damage(45,0)
return ..()
//saw bone
/datum/surgery_step/saw
name = "saw bone"
implements = list(/obj/item/weapon/circular_saw = 100, /obj/item/weapon/melee/arm_blade = 75, /obj/item/weapon/hatchet = 35, /obj/item/weapon/kitchen/knife/butcher = 25)
time = 64
/datum/surgery_step/saw/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to saw through the bone in [target]'s [parse_zone(target_zone)].", "<span class='notice'>You begin to saw through the bone in [target]'s [parse_zone(target_zone)]...</span>")
/datum/surgery_step/saw/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(ishuman(target))
var/mob/living/carbon/human/H = target
H.apply_damage(50,"brute","[target_zone]")
user.visible_message("[user] saws [target]'s [parse_zone(target_zone)] open!", "<span class='notice'>You saw [target]'s [parse_zone(target_zone)] open.</span>")
return 1
+28 -29
View File
@@ -1,54 +1,53 @@
/proc/attempt_initiate_surgery(obj/item/I, mob/living/M, mob/user)
if(istype(M))
var/mob/living/carbon/human/H
var/obj/item/organ/limb/affecting
if(istype(M, /mob/living/carbon/human))
H = M
affecting = H.get_organ(check_zone(user.zone_sel.selecting))
if(M.lying || isslime(M)) //if they're prone or a slime
var/list/all_surgeries = surgeries_list.Copy()
var/list/available_surgeries = list()
for(var/i in all_surgeries)
var/datum/surgery/S = all_surgeries[i]
if(!S.possible_locs.Find(user.zone_sel.selecting))
continue
if(locate(S.type) in M.surgeries)
continue
if(S.user_species_restricted)
if(!istype(user, /mob/living/carbon/human))
continue
var/mob/living/carbon/human/doc = user
if(!(doc.dna.species.id in S.user_species_ids))
continue
if(S.target_must_be_dead && M.stat != DEAD)
if(affecting && S.requires_organic_bodypart && affecting.status == ORGAN_ROBOTIC)
continue
if(S.target_must_be_fat && !(M.disabilities & FAT))
if(!S.can_start(user, M))
continue
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M //So we can use get_organ and not some terriblly long Switch or something worse - RR
if(S.requires_organic_chest && H.getlimb(/obj/item/organ/limb/robot/chest)) //This a seperate case to below, see "***" in surgery.dm - RR
continue
var/obj/item/organ/limb/affecting = H.get_organ(check_zone(user.zone_sel.selecting))
if(affecting.status == ORGAN_ROBOTIC && affecting.body_part != HEAD) //Cannot operate on Robotic organs except for the head. - RR
continue
for(var/path in S.species)
if(istype(M, path))
available_surgeries[S.name] = S
break
for(var/datum/surgery/S in M.surgeries)
if(S.status == 1 && !S.step_in_progress)
available_surgeries["cancel " + S.name] = S
var/P = input("Begin which procedure?", "Surgery", null, null) as null|anything in available_surgeries
if(P)
var/datum/surgery/S = available_surgeries[P]
if(S in M.surgeries)
M.surgeries -= S
qdel(S)
return 1
var/datum/surgery/procedure = new S.type
if(procedure)
if(get_location_accessible(M, procedure.location) || procedure.ignore_clothes)
if(procedure.location == "anywhere") // if location == "anywhere" change location to the surgeon's target, otherwise leave location as is.
procedure.location = user.zone_sel.selecting
procedure.location = user.zone_sel.selecting
if(procedure.ignore_clothes || get_location_accessible(M, procedure.location))
M.surgeries += procedure
user.visible_message("[user] drapes [I] over [M]'s [parse_zone(procedure.location)] to prepare for \an [procedure.name].", "<span class='notice'>You drape [I] over [M]'s [parse_zone(procedure.location)] to prepare for \an [procedure.name].</span>")
if(affecting)
procedure.organ = affecting
user.visible_message("[user] drapes [I] over [M]'s [parse_zone(procedure.location)] to prepare for \an [procedure.name].", \
"<span class='notice'>You drape [I] over [M]'s [parse_zone(procedure.location)] to prepare for \an [procedure.name].</span>")
add_logs(user, M, "operated", addition="Operation type: [procedure.name]")
feedback_add_details("surgery_initiated","[procedure.name]")
return 1
else
user << "<span class='warning'>You need to expose [M]'s [procedure.location] first!</span>"
@@ -59,7 +58,7 @@
/proc/get_location_modifier(mob/M)
proc/get_location_modifier(mob/M)
var/turf/T = get_turf(M)
if(locate(/obj/structure/optable, T))
return 1
@@ -80,13 +79,13 @@
for(var/obj/item/clothing/I in list(C.back, C.wear_mask, C.head))
covered_locations |= I.body_parts_covered
face_covered |= I.flags_inv
eyesmouth_covered |= I.flags_cover
eyesmouth_covered |= I.flags
if(ishuman(C))
var/mob/living/carbon/human/H = C
for(var/obj/item/I in list(H.wear_suit, H.w_uniform, H.shoes, H.belt, H.gloves, H.glasses, H.ears))
covered_locations |= I.body_parts_covered
face_covered |= I.flags_inv
eyesmouth_covered |= I.flags_cover
eyesmouth_covered |= I.flags
switch(location)
if("head")
+23 -12
View File
@@ -2,22 +2,18 @@
name = "implant removal"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/extract_implant, /datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
location = "chest"
requires_organic_chest = 1
possible_locs = list("chest")
//extract implant
/datum/surgery_step/extract_implant
name = "extract implant"
implements = list(/obj/item/weapon/hemostat = 100, /obj/item/weapon/crowbar = 65)
time = 64
var/obj/item/weapon/implant/I = null
/datum/surgery_step/extract_implant/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
for(var/obj/item/weapon/implant/W in target)
if(W.imp_in == target) //Checking that it's actually implanted, not just in his pocket
I = W
break
I = locate(/obj/item/weapon/implant) in target
if(I)
user.visible_message("[user] begins to extract [I] from [target]'s [target_zone].", "<span class='notice'>You begin to extract [I] from [target]'s [target_zone]...</span>")
else
@@ -26,10 +22,25 @@
/datum/surgery_step/extract_implant/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(I)
user.visible_message("[user] successfully removes [I] from [target]'s [target_zone]!", "<span class='notice'>You successfully remove [I] from [target]'s [target_zone].</span>")
qdel(I)
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/H = target
H.sec_hud_set_implants()
I.removed(target)
var/obj/item/weapon/implantcase/case
if(istype(user.get_item_by_slot(slot_l_hand), /obj/item/weapon/implantcase))
case = user.get_item_by_slot(slot_l_hand)
else if(istype(user.get_item_by_slot(slot_r_hand), /obj/item/weapon/implantcase))
case = user.get_item_by_slot(slot_r_hand)
else
case = locate(/obj/item/weapon/implantcase) in get_turf(target)
if(case && !case.imp)
case.imp = I
I.loc = case
case.update_icon()
user.visible_message("[user] places [I] into [case]!", "<span class='notice'>You place [I] into [case].</span>")
else
qdel(I)
else
user << "<span class='warning'>You can't find anything in [target]'s [target_zone]!</span>"
return 1
return 1
+5 -32
View File
@@ -5,6 +5,7 @@
//SURGERY STEPS
/datum/surgery_step/replace
name = "sever muscules"
implements = list(/obj/item/weapon/scalpel = 100, /obj/item/weapon/wirecutters = 55)
time = 32
@@ -14,15 +15,15 @@
/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"
allowed_organs = list("r_arm","l_arm","r_leg","l_leg","chest","head")
/datum/surgery_step/add_limb/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
L = new_organ
L = surgery.organ
if(L)
user.visible_message("[user] begins to augment [target]'s [parse_zone(user.zone_sel.selecting)].", "<span class ='notice'>You begin to augment [target]'s [parse_zone(user.zone_sel.selecting)]...</span>")
else
@@ -36,8 +37,7 @@
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)
location = "anywhere" //Check attempt_initate_surgery() (in code/modules/surgery/helpers) to see what this does if you can't tell
has_multi_loc = 1 //Multi location stuff, See multiple_location_example.dm
possible_locs = list("r_arm","l_arm","r_leg","l_leg","chest","head")
//SURGERY STEP SUCCESSES
@@ -45,34 +45,6 @@
/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))
switch(L.body_part)
if(CHEST)
if(!istype(tool,/obj/item/robot_parts/chest))
user << "<span class='warning'>That is the wrong robotic limb for this body part.</span>"
return 0
if(HEAD)
if(!istype(tool,/obj/item/robot_parts/head))
user << "<span class='warning'>That is the wrong robotic limb for this body part.</span>"
return 0
if(ARM_LEFT)
if(!istype(tool,/obj/item/robot_parts/l_arm))
user << "<span class='warning'>That is the wrong robotic limb for this body part.</span>"
return 0
if(ARM_RIGHT)
if(!istype(tool,/obj/item/robot_parts/r_arm))
user << "<span class='warning'>That is the wrong robotic limb for this body part.</span>"
return 0
if(LEG_LEFT)
if(!istype(tool,/obj/item/robot_parts/l_leg))
user << "<span class='warning'>That is the wrong robotic limb for this body part.</span>"
return 0
if(LEG_RIGHT)
if(!istype(tool,/obj/item/robot_parts/r_leg))
user << "<span class='warning'>That is the wrong robotic limb for this body part.</span>"
return 0
if(!user.drop_item())
return 0
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)
@@ -94,6 +66,7 @@
H.organs += new /obj/item/organ/limb/robot/chest(src)
for(var/datum/disease/appendicitis/A in H.viruses) //If they already have Appendicitis, Remove it
A.cure(1)
user.drop_item()
qdel(tool)
H.update_damage_overlays(0)
H.update_augments() //Gives them the Cyber limb overlay
+8 -4
View File
@@ -1,14 +1,17 @@
/datum/surgery/lipoplasty
name = "lipoplasty"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/cut_fat, /datum/surgery_step/remove_fat, /datum/surgery_step/close)
species = list(/mob/living/carbon/human)
target_must_be_fat = 1
location = "chest"
requires_organic_chest = 1
possible_locs = list("chest")
/datum/surgery/lipoplasty/can_start(mob/user, mob/living/carbon/target)
if(target.disabilities & FAT)
return 1
return 0
//cut fat
/datum/surgery_step/cut_fat
name = "cut excess fat"
implements = list(/obj/item/weapon/circular_saw = 100, /obj/item/weapon/hatchet = 35, /obj/item/weapon/kitchen/knife/butcher = 25)
time = 64
@@ -21,6 +24,7 @@
//remove fat
/datum/surgery_step/remove_fat
name = "remove loose fat"
implements = list(/obj/item/weapon/retractor = 100, /obj/item/weapon/screwdriver = 45, /obj/item/weapon/wirecutters = 35)
time = 32
@@ -1,51 +1,51 @@
/////AUGMENTATION\\\\\
//See code/modules/surgery/organs/organ.dm for the parent "limb"
/obj/item/organ/limb/robot
name = "cyberlimb"
desc = "You should never be seeing this!"
status = ORGAN_ROBOTIC
/obj/item/organ/limb/robot/chest
name = "chest"
desc = "A Robotic chest"
icon_state = "chest"
max_damage = 200
body_part = CHEST
/obj/item/organ/limb/robot/head
name = "head"
desc = "A Robotic head"
icon_state = "head"
max_damage = 200
body_part = HEAD
/obj/item/organ/limb/robot/l_arm
name = "l_arm"
desc = "A Robotic arm"
icon_state = "l_arm"
max_damage = 75
body_part = ARM_LEFT
/obj/item/organ/limb/robot/l_leg
name = "l_leg"
desc = "A Robotic leg"
icon_state = "l_leg"
max_damage = 75
body_part = LEG_LEFT
/obj/item/organ/limb/robot/r_arm
name = "r_arm"
desc = "A Robotic arm"
icon_state = "r_arm"
max_damage = 75
body_part = ARM_RIGHT
/obj/item/organ/limb/robot/r_leg
name = "r_leg"
desc = "A Robotic leg"
icon_state = "r_leg"
max_damage = 75
body_part = LEG_RIGHT
/////AUGMENTATION\\\\\
//See code/modules/surgery/organs/organ.dm for the parent "limb"
/obj/item/organ/limb/robot
name = "cyberlimb"
desc = "You should never be seeing this!"
status = ORGAN_ROBOTIC
/obj/item/organ/limb/robot/chest
name = "chest"
desc = "A Robotic chest"
icon_state = "chest"
max_damage = 200
body_part = CHEST
/obj/item/organ/limb/robot/head
name = "head"
desc = "A Robotic head"
icon_state = "head"
max_damage = 200
body_part = HEAD
/obj/item/organ/limb/robot/l_arm
name = "l_arm"
desc = "A Robotic arm"
icon_state = "l_arm"
max_damage = 75
body_part = ARM_LEFT
/obj/item/organ/limb/robot/l_leg
name = "l_leg"
desc = "A Robotic leg"
icon_state = "l_leg"
max_damage = 75
body_part = LEG_LEFT
/obj/item/organ/limb/robot/r_arm
name = "r_arm"
desc = "A Robotic arm"
icon_state = "r_arm"
max_damage = 75
body_part = ARM_RIGHT
/obj/item/organ/limb/robot/r_leg
name = "r_leg"
desc = "A Robotic leg"
icon_state = "r_leg"
max_damage = 75
body_part = LEG_RIGHT
+17 -8
View File
@@ -1,13 +1,22 @@
/mob/proc/getorgan()
mob/proc/getorgan()
return
/mob/living/carbon/getorgan(typepath)
mob/proc/getorgansloc()
return
mob/living/carbon/getorgan(typepath)
return (locate(typepath) in internal_organs)
/mob/proc/getlimb()
mob/living/carbon/getorgansloc(zone)
var/list/returnorg = list()
for(var/obj/item/organ/internal/O in internal_organs)
if(zone == O.zone)
returnorg += O
return returnorg
mob/proc/getlimb()
return
/mob/living/carbon/human/getlimb(typepath)
return (locate(typepath) in organs)
mob/living/carbon/human/getlimb(typepath)
return (locate(typepath) in organs)
@@ -1,199 +1,171 @@
/obj/item/organ
name = "organ"
icon = 'icons/obj/surgery.dmi'
/obj/item/organ/heart
name = "heart"
icon_state = "heart-on"
var/beating = 1
/obj/item/organ/heart/update_icon()
if(beating)
icon_state = "heart-on"
else
icon_state = "heart-off"
/obj/item/organ/appendix
name = "appendix"
icon_state = "appendix"
var/inflamed = 1
/obj/item/organ/appendix/update_icon()
if(inflamed)
icon_state = "appendixinflamed"
else
icon_state = "appendix"
//Looking for brains?
//Try code/modules/mob/living/carbon/brain/brain_item.dm
//Old Datum Limbs:
// code/modules/unused/limbs.dm
/obj/item/organ/limb
name = "limb"
var/mob/owner = null
var/body_part = null
var/brutestate = 0
var/burnstate = 0
var/brute_dam = 0
var/burn_dam = 0
var/max_damage = 0
var/status = ORGAN_ORGANIC
var/list/embedded_objects = list()
/obj/item/organ/limb/chest
name = "chest"
desc = "why is it detached..."
icon_state = "chest"
max_damage = 200
body_part = CHEST
/obj/item/organ/limb/head
name = "head"
desc = "what a way to get a head in life..."
icon_state = "head"
max_damage = 200
body_part = HEAD
/obj/item/organ/limb/l_arm
name = "l_arm"
desc = "why is it detached..."
icon_state = "l_arm"
max_damage = 75
body_part = ARM_LEFT
/obj/item/organ/limb/l_leg
name = "l_leg"
desc = "why is it detached..."
icon_state = "l_leg"
max_damage = 75
body_part = LEG_LEFT
/obj/item/organ/limb/r_arm
name = "r_arm"
desc = "why is it detached..."
icon_state = "r_arm"
max_damage = 75
body_part = ARM_RIGHT
/obj/item/organ/limb/r_leg
name = "r_leg"
desc = "why is it detached..."
icon_state = "r_leg"
max_damage = 75
body_part = LEG_RIGHT
//Applies brute and burn damage to the organ. Returns 1 if the damage-icon states changed at all.
//Damage will not exceed max_damage using this proc
//Cannot apply negative damage
/obj/item/organ/limb/proc/take_damage(brute, burn)
if(owner && (owner.status_flags & GODMODE)) return 0 //godmode
brute = max(brute,0)
burn = max(burn,0)
if(status == ORGAN_ROBOTIC) //This makes robolimbs not damageable by chems and makes it stronger
brute = max(0, brute - 5)
burn = max(0, burn - 4)
var/can_inflict = max_damage - (brute_dam + burn_dam)
if(!can_inflict) return 0
if((brute + burn) < can_inflict)
brute_dam += brute
burn_dam += burn
else
if(brute > 0)
if(burn > 0)
brute = round( (brute/(brute+burn)) * can_inflict, 1 )
burn = can_inflict - brute //gets whatever damage is left over
brute_dam += brute
burn_dam += burn
else
brute_dam += can_inflict
else
if(burn > 0)
burn_dam += can_inflict
else
return 0
return update_organ_icon()
//Heals brute and burn damage for the organ. Returns 1 if the damage-icon states changed at all.
//Damage cannot go below zero.
//Cannot remove negative damage (i.e. apply damage)
/obj/item/organ/limb/proc/heal_damage(brute, burn, robotic)
if(robotic && status != ORGAN_ROBOTIC) // This makes organic limbs not heal when the proc is in Robotic mode.
brute = max(0, brute - 3)
burn = max(0, burn - 3)
if(!robotic && status == ORGAN_ROBOTIC) // This makes robolimbs not healable by chems.
brute = max(0, brute - 3)
burn = max(0, burn - 3)
brute_dam = max(brute_dam - brute, 0)
burn_dam = max(burn_dam - burn, 0)
return update_organ_icon()
//Returns total damage...kinda pointless really
/obj/item/organ/limb/proc/get_damage()
return brute_dam + burn_dam
//Updates an organ's brute/burn states for use by update_damage_overlays()
//Returns 1 if we need to update overlays. 0 otherwise.
/obj/item/organ/limb/proc/update_organ_icon()
if(status == ORGAN_ORGANIC) //Robotic limbs show no damage - RR
var/tbrute = round( (brute_dam/max_damage)*3, 1 )
var/tburn = round( (burn_dam/max_damage)*3, 1 )
if((tbrute != brutestate) || (tburn != burnstate))
brutestate = tbrute
burnstate = tburn
return 1
return 0
//Returns a display name for the organ
/obj/item/organ/limb/proc/getDisplayName() //Added "Chest" and "Head" just in case, this may not be needed
switch(name)
if("l_leg") return "left leg"
if("r_leg") return "right leg"
if("l_arm") return "left arm"
if("r_arm") return "right arm"
if("chest") return "chest"
if("head") return "head"
else return name
//Remove all embedded objects from all limbs on the human mob
/mob/living/carbon/human/proc/remove_all_embedded_objects()
var/turf/T = get_turf(src)
for(var/obj/item/organ/limb/L in organs)
for(var/obj/item/I in L.embedded_objects)
L.embedded_objects -= I
I.loc = T
clear_alert("embeddedobject")
/mob/living/carbon/human/proc/has_embedded_objects()
. = 0
for(var/obj/item/organ/limb/L in organs)
for(var/obj/item/I in L.embedded_objects)
/obj/item/organ
name = "organ"
icon = 'icons/obj/surgery.dmi'
var/mob/living/carbon/owner = null
var/status = ORGAN_ORGANIC
//Old Datum Limbs:
// code/modules/unused/limbs.dm
/obj/item/organ/limb
name = "limb"
var/body_part = null
var/brutestate = 0
var/burnstate = 0
var/brute_dam = 0
var/burn_dam = 0
var/max_damage = 0
var/list/embedded_objects = list()
/obj/item/organ/limb/chest
name = "chest"
desc = "why is it detached..."
icon_state = "chest"
max_damage = 200
body_part = CHEST
/obj/item/organ/limb/head
name = "head"
desc = "what a way to get a head in life..."
icon_state = "head"
max_damage = 200
body_part = HEAD
/obj/item/organ/limb/l_arm
name = "l_arm"
desc = "why is it detached..."
icon_state = "l_arm"
max_damage = 75
body_part = ARM_LEFT
/obj/item/organ/limb/l_leg
name = "l_leg"
desc = "why is it detached..."
icon_state = "l_leg"
max_damage = 75
body_part = LEG_LEFT
/obj/item/organ/limb/r_arm
name = "r_arm"
desc = "why is it detached..."
icon_state = "r_arm"
max_damage = 75
body_part = ARM_RIGHT
/obj/item/organ/limb/r_leg
name = "r_leg"
desc = "why is it detached..."
icon_state = "r_leg"
max_damage = 75
body_part = LEG_RIGHT
//Applies brute and burn damage to the organ. Returns 1 if the damage-icon states changed at all.
//Damage will not exceed max_damage using this proc
//Cannot apply negative damage
/obj/item/organ/limb/proc/take_damage(brute, burn)
if(owner && (owner.status_flags & GODMODE)) return 0 //godmode
brute = max(brute,0)
burn = max(burn,0)
if(status == ORGAN_ROBOTIC) //This makes robolimbs not damageable by chems and makes it stronger
brute = max(0, brute - 5)
burn = max(0, burn - 4)
var/can_inflict = max_damage - (brute_dam + burn_dam)
if(!can_inflict) return 0
if((brute + burn) < can_inflict)
brute_dam += brute
burn_dam += burn
else
if(brute > 0)
if(burn > 0)
brute = round( (brute/(brute+burn)) * can_inflict, 1 )
burn = can_inflict - brute //gets whatever damage is left over
brute_dam += brute
burn_dam += burn
else
brute_dam += can_inflict
else
if(burn > 0)
burn_dam += can_inflict
else
return 0
return update_organ_icon()
//Heals brute and burn damage for the organ. Returns 1 if the damage-icon states changed at all.
//Damage cannot go below zero.
//Cannot remove negative damage (i.e. apply damage)
/obj/item/organ/limb/proc/heal_damage(brute, burn, robotic)
if(robotic && status != ORGAN_ROBOTIC) // This makes organic limbs not heal when the proc is in Robotic mode.
brute = max(0, brute - 3)
burn = max(0, burn - 3)
if(!robotic && status == ORGAN_ROBOTIC) // This makes robolimbs not healable by chems.
brute = max(0, brute - 3)
burn = max(0, burn - 3)
brute_dam = max(brute_dam - brute, 0)
burn_dam = max(burn_dam - burn, 0)
return update_organ_icon()
//Returns total damage...kinda pointless really
/obj/item/organ/limb/proc/get_damage()
return brute_dam + burn_dam
//Updates an organ's brute/burn states for use by update_damage_overlays()
//Returns 1 if we need to update overlays. 0 otherwise.
/obj/item/organ/limb/proc/update_organ_icon()
if(status == ORGAN_ORGANIC) //Robotic limbs show no damage - RR
var/tbrute = round( (brute_dam/max_damage)*3, 1 )
var/tburn = round( (burn_dam/max_damage)*3, 1 )
if((tbrute != brutestate) || (tburn != burnstate))
brutestate = tbrute
burnstate = tburn
return 1
return 0
//Returns a display name for the organ
/obj/item/organ/limb/proc/getDisplayName() //Added "Chest" and "Head" just in case, this may not be needed
switch(name)
if("l_leg") return "left leg"
if("r_leg") return "right leg"
if("l_arm") return "left arm"
if("r_arm") return "right arm"
if("chest") return "chest"
if("head") return "head"
else return name
//Remove all embedded objects from all limbs on the human mob
/mob/living/carbon/human/proc/remove_all_embedded_objects()
var/turf/T = get_turf(src)
for(var/obj/item/organ/limb/L in organs)
for(var/obj/item/I in L.embedded_objects)
L.embedded_objects -= I
I.loc = T
clear_alert("embeddedobject")
/mob/living/carbon/human/proc/has_embedded_objects()
. = 0
for(var/obj/item/organ/limb/L in organs)
for(var/obj/item/I in L.embedded_objects)
return 1
@@ -0,0 +1,59 @@
/obj/item/organ/internal
var/zone = "chest"
var/slot
var/vital = 0
/obj/item/organ/internal/proc/Insert(var/mob/living/carbon/M)
owner = M
M.internal_organs += src
loc = null
/obj/item/organ/internal/proc/Remove(var/mob/living/carbon/M, var/special = 0)
owner = null
M.internal_organs -= src
if(vital && !special)
M.death()
//Looking for brains?
//Try code/modules/mob/living/carbon/brain/brain_item.dm
/obj/item/organ/internal/heart
name = "heart"
icon_state = "heart-on"
zone = "chest"
slot = "heart"
vital = 1
var/beating = 1
/obj/item/organ/internal/heart/update_icon()
if(beating)
icon_state = "heart-on"
else
icon_state = "heart-off"
/obj/item/organ/internal/appendix
name = "appendix"
icon_state = "appendix"
zone = "groin"
slot = "appendix"
var/inflamed = 0
/obj/item/organ/internal/appendix/update_icon()
if(inflamed)
icon_state = "appendixinflamed"
else
icon_state = "appendix"
/obj/item/organ/internal/appendix/Remove(var/mob/living/carbon/M)
for(var/datum/disease/appendicitis in M.viruses)
appendicitis.cure()
..()
/obj/item/organ/internal/appendix/Insert(var/mob/living/carbon/M)
..()
if(inflamed)
M.AddDisease(new /datum/disease/appendicitis)
+2 -2
View File
@@ -1,11 +1,11 @@
/datum/surgery/plastic_surgery
name = "plastic surgery"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/reshape_face, /datum/surgery_step/close)
species = list(/mob/living/carbon/human)
location = "head"
possible_locs = list("head")
//reshape_face
/datum/surgery_step/reshape_face
name = "reshape face"
implements = list(/obj/item/weapon/scalpel = 100, /obj/item/weapon/kitchen/knife = 50, /obj/item/weapon/wirecutters = 35)
time = 64
+3 -10
View File
@@ -1,22 +1,18 @@
/datum/surgery/embedded_removal
name = "removal of embedded objects"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/remove_object)
species = list(/mob/living/carbon/human)
location = "anywhere"
has_multi_loc = 1
possible_locs = list("r_arm","l_arm","r_leg","l_leg","chest","head")
/datum/surgery_step/remove_object
name = "remove embedded objects"
time = 32
allowed_organs = list("r_arm","l_arm","r_leg","l_leg","chest","head")
accept_hand = 1
var/obj/item/organ/limb/L = null
/datum/surgery_step/remove_object/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
L = new_organ
L = surgery.organ
if(L)
user.visible_message("[user] looks for objects embedded in [target]'s [parse_zone(user.zone_sel.selecting)].", "<span class='notice'>You look for objects embedded in [target]'s [parse_zone(user.zone_sel.selecting)]...</span>")
else
@@ -33,9 +29,6 @@
I.loc = get_turf(H)
L.embedded_objects -= I
if(!H.has_embedded_objects())
H.clear_alert("embeddedobject")
if(objects > 0)
user.visible_message("[user] sucessfully removes [objects] objects from [H]'s [L.getDisplayName()]!", "<span class='notice'>You sucessfully remove [objects] objects from [H]'s [L.getDisplayName()].</span>")
else
+12 -10
View File
@@ -1,5 +1,5 @@
/datum/surgery
var/name = null
var/name = "surgery"
var/status = 1
var/list/steps = list() //Steps in a surgery
var/step_in_progress = 0 //Actively performing a Surgery
@@ -7,11 +7,17 @@
var/location = "chest" //Surgery location
var/target_must_be_dead = 0 //Needs to be dead
var/target_must_be_fat = 0 //Needs to be fat
var/requires_organic_chest = 0 //Prevents you from performing an operation on Robotic chests***
var/has_multi_loc = 0 //Multiple locations - RR
var/user_species_restricted = 0 //Surgery only performable BY species
var/list/user_species_ids
var/requires_organic_bodypart = 1 //Prevents you from performing an operation on robotic limbs
var/list/possible_locs = list() //Multiple locations -- c0
var/ignore_clothes = 0 //This surgery ignores clothes
var/obj/item/organ/organ //Operable body part
/datum/surgery/proc/can_start(mob/user, mob/living/carbon/target)
// if 0 surgery wont show up in list
// put special restrictions here
return 1
/datum/surgery/proc/next_step(mob/user, mob/living/carbon/target)
if(step_in_progress) return
@@ -54,8 +60,4 @@
//RESOLVED ISSUES //"Todo" jobs that have been completed
//combine hands/feet into the arms - Hands/feet were removed - RR
//surgeries (not steps) that can be initiated on any body part (corresponding with damage locations) - Call this one done, see multiple_location_example.dm - RR
//*** This may seem entirely redundant because of Organic organs only having operations but you CAN circumvent that due to
//all surgeries (except augmentation) not checking where the surgeon aims so this is just a double check, it IS needed - RR
//surgeries (not steps) that can be initiated on any body part (corresponding with damage locations) - Call this one done, see multiple_location_example.dm - RR
+3 -57
View File
@@ -4,8 +4,7 @@
var/accept_hand = 0 //does the surgery step require an open hand? If true, ignores implements. Compatible with accept_any_item.
var/accept_any_item = 0 //does the surgery step accept any item? If true, ignores implements. Compatible with require_hand.
var/time = 10 //how long does the step take?
var/new_organ = null //Used for multilocation operations
var/list/allowed_organs = list()//Allowed organs, see Handle_Multi_Loc below - RR
var/name
/datum/surgery_step/proc/try_op(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -39,11 +38,8 @@
/datum/surgery_step/proc/initiate(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
surgery.step_in_progress = 1
if(surgery.has_multi_loc) //if it is multi-location, handle that
Handle_Multi_Loc(user, target)
preop(user, target, target_zone, tool)
if(do_after(user, time, target = target))
preop(user, target, target_zone, tool, surgery)
if(do_after(user, time))
var/advance = 0
var/prob_chance = 100
@@ -73,61 +69,11 @@
/datum/surgery_step/proc/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] succeeds!", "<span class='notice'>You succeed.</span>")
feedback_add_details("surgery_step_success","[src.type]")
return 1
/datum/surgery_step/saw/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(ishuman(target) || ismonkey(target) || isalienadult(target))
var/mob/living/carbon/M = target
M.apply_damage(75,"brute","[target_zone]")
user.visible_message("[user] saws [target]'s [parse_zone(target_zone)] open!", "<span class='notice'>You saw [target]'s [parse_zone(target_zone)] open.</span>")
feedback_add_details("surgery_step_success","[src.type]")
return 1
/datum/surgery_step/proc/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("<span class='warning'>[user] screws up!</span>", "<span class='warning'>You screw up!</span>")
feedback_add_details("surgery_step_failed","[src.type]")
return 0
/datum/surgery_step/close/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(locate(/datum/surgery_step/saw) in surgery.steps)
target.heal_organ_damage(45,0)
return ..()
/datum/surgery_step/proc/tool_check(mob/user, obj/item/tool)
return 1
/datum/surgery_step/proc/Handle_Multi_Loc(mob/user, mob/living/carbon/target) //this is here so MultiLoc Surgeries don't need to rewrite it each time - RR
if(user.zone_sel.selecting in allowed_organs)
switch(user.zone_sel.selecting) //Switch, for Aran - RR
if("r_arm")
new_organ = target.getlimb(/obj/item/organ/limb/r_arm)
if("l_arm")
new_organ = target.getlimb(/obj/item/organ/limb/l_arm)
if("r_leg")
new_organ = target.getlimb(/obj/item/organ/limb/r_leg)
if("l_leg")
new_organ = target.getlimb(/obj/item/organ/limb/l_leg)
if("chest")
new_organ = target.getlimb(/obj/item/organ/limb/chest)
if("groin")
new_organ = target.getlimb(/obj/item/organ/limb/chest)
if("head")
new_organ = target.getlimb(/obj/item/organ/limb/head)
if("eyes")
new_organ = target.getlimb(/obj/item/organ/limb/head)
if("mouth")
new_organ = target.getlimb(/obj/item/organ/limb/head)
else
user << "<span class='warning'>You cannot perform this operation on this body part!</span>" //Explain to the surgeon what went wrong - RR
return 0
return new_organ
else
return 0
+2 -2
View File
@@ -2,13 +2,13 @@
name = "xenomorph removal"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/saw, /datum/surgery_step/xenomorph_removal, /datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
location = "chest"
requires_organic_chest = 1
possible_locs = list("chest")
//remove xeno from premises
/datum/surgery_step/xenomorph_removal
name = "remove foregin body"
implements = list(/obj/item/weapon/hemostat = 100, /obj/item/weapon/shovel/spade = 65, /obj/item/weapon/cultivator = 50, /obj/item/weapon/crowbar = 35)
time = 64
+8 -4
View File
@@ -677,10 +677,13 @@
#include "code\game\objects\items\weapons\grenades\spawnergrenade.dm"
#include "code\game\objects\items\weapons\grenades\syndieminibomb.dm"
#include "code\game\objects\items\weapons\implants\implant.dm"
#include "code\game\objects\items\weapons\implants\implant_chem.dm"
#include "code\game\objects\items\weapons\implants\implant_explosive.dm"
#include "code\game\objects\items\weapons\implants\implant_freedom.dm"
#include "code\game\objects\items\weapons\implants\implant_loyality.dm"
#include "code\game\objects\items\weapons\implants\implantcase.dm"
#include "code\game\objects\items\weapons\implants\implantchair.dm"
#include "code\game\objects\items\weapons\implants\implanter.dm"
#include "code\game\objects\items\weapons\implants\implantfreedom.dm"
#include "code\game\objects\items\weapons\implants\implantpad.dm"
#include "code\game\objects\items\weapons\implants\implantuplink.dm"
#include "code\game\objects\items\weapons\melee\energy.dm"
@@ -1502,10 +1505,11 @@
#include "code\modules\surgery\surgery_step.dm"
#include "code\modules\surgery\tools.dm"
#include "code\modules\surgery\xenomorph_removal.dm"
#include "code\modules\surgery\organs\augments.dm"
#include "code\modules\surgery\organs\cybernetic_implants.dm"
#include "code\modules\surgery\organs\augments_external.dm"
#include "code\modules\surgery\organs\augments_internal.dm"
#include "code\modules\surgery\organs\helpers.dm"
#include "code\modules\surgery\organs\organ.dm"
#include "code\modules\surgery\organs\organ_external.dm"
#include "code\modules\surgery\organs\organ_internal.dm"
#include "code\modules\telesci\bscrystal.dm"
#include "code\modules\telesci\gps.dm"
#include "code\modules\telesci\telepad.dm"