mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-08-27 06:36:22 +01:00
Merge branch 'development' of https://github.com/Aurorastation/Aurora into development
This commit is contained in:
@@ -1290,6 +1290,8 @@ var/global/floorIsLava = 0
|
||||
if(2)
|
||||
var/ref_mob = "\ref[M]"
|
||||
return "<b>[key_name(C, link, name)](<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>)</b>"
|
||||
if(3)
|
||||
return "<b>[key_name(C, link, name)](<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</A>) (<A HREF='?_src_=holder;admindibs=\ref[M]'>DIBS</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[M]'>JMP</A>)</b>"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1527,6 +1527,9 @@
|
||||
|
||||
var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
|
||||
|
||||
//so that we alert people with certain cartidges with a PDA message.
|
||||
alertFaxes()
|
||||
|
||||
for(var/obj/machinery/faxmachine/F in machines)
|
||||
if(! (F.stat & (BROKEN|NOPOWER) ) )
|
||||
|
||||
@@ -2816,4 +2819,21 @@
|
||||
var/playerckey = href_list["warnsearchckey"]
|
||||
|
||||
warning_panel(adminckey, playerckey)
|
||||
return
|
||||
|
||||
else if(href_list["admindibs"])
|
||||
if(!check_rights(R_ADMIN|R_MOD)) return
|
||||
var/mob/M = locate(href_list["admindibs"])
|
||||
|
||||
if(M.client.adminhelped == 2)
|
||||
log_admin("[key_name(usr)] called dibs on [key_name(M)]'s adminhelp!")
|
||||
message_admins("[key_name_admin(usr)] has called dibs on [key_name_admin(M)]'s adminhelp!")
|
||||
message_mods("[key_name_admin(usr)] has called dibs on [key_name_admin(M)]'s adminhelp!")
|
||||
usr << "<font color=blue><b>You have taken over [key_name_admin(M)]'s adminhelp.</b></font>"
|
||||
usr << "[get_options_bar(M, 2, 1, 1)]"
|
||||
|
||||
M << "<font color=red><b>Your adminhelp will be tended to [usr.client.holder.fakekey ? "shortly" : "by [key_name(usr, 0, 0)]"]. Please allow the staff member a minute or two to type up a response.</b></font>"
|
||||
M.client.adminhelped = 1
|
||||
else
|
||||
usr << "<font color=red><b>The adminhelp has already been claimed.</b></font>"
|
||||
return
|
||||
@@ -18,7 +18,13 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
|
||||
return
|
||||
|
||||
adminhelped = 1 //Determines if they get the message to reply by clicking the name.
|
||||
adminhelped = 2 //Determines if they get the message to reply by clicking the name.
|
||||
|
||||
/*A wee bit of an update here: we're using the following table for adminhelped values:
|
||||
2 - Adminhelp has not been claimed by anyone.
|
||||
1 - Adminhelp has been claimed, initial message has not been sent.
|
||||
0 - Adminhelp has been claimed, initial message has been sent.
|
||||
*/
|
||||
|
||||
/**src.verbs -= /client/verb/adminhelp
|
||||
|
||||
@@ -91,7 +97,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
if(!mob) return //this doesn't happen
|
||||
|
||||
var/ref_mob = "\ref[mob]"
|
||||
msg = "\blue <b><font color=red>HELP: </font>[get_options_bar(mob, 2, 1, 1)][ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]"
|
||||
msg = "\blue <b><font color=red>HELP: </font>[get_options_bar(mob, 3, 1, 1)][ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]"
|
||||
|
||||
//send this msg to all admins
|
||||
var/admin_number_present = 0
|
||||
|
||||
@@ -411,7 +411,7 @@ proc/populate_gear_list()
|
||||
cost = 3
|
||||
|
||||
/datum/gear/uniform_captain
|
||||
display_name = "captain's dress uniform"
|
||||
display_name = "captain dress uniform"
|
||||
path = /obj/item/clothing/under/dress/dress_cap
|
||||
// slot = slot_w_uniform
|
||||
cost = 3
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
icon_state = "policehelm"
|
||||
flags_inv = 0
|
||||
|
||||
/obj/item/clothing/head/helmet/warden/commissar
|
||||
name = "commissar's cap"
|
||||
desc = "A security commissar's cap."
|
||||
icon_state = "commissarcap"
|
||||
flags_inv = 0
|
||||
|
||||
/obj/item/clothing/head/helmet/secfcap
|
||||
name = "officer's cap"
|
||||
desc = "A security officer's cap."
|
||||
|
||||
@@ -38,6 +38,12 @@
|
||||
icon_state = "formal_warden"
|
||||
item_state = "formal_warden"
|
||||
|
||||
/obj/item/clothing/suit/armor/vest/warden/commissar
|
||||
name = "Commissar's jacket"
|
||||
desc = "An tasteful dark blue jacket with silver and white highlights. Has hard-plate inserts for armor."
|
||||
icon_state = "commissar_warden"
|
||||
item_state = "commissar_warden"
|
||||
|
||||
/obj/item/clothing/suit/armor/riot
|
||||
name = "Riot Suit"
|
||||
desc = "A suit of armor with heavy padding to protect against melee attacks. Looks like it might impair movement."
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
/mob/living/proc/get_scooped(var/mob/living/carbon/grabber)
|
||||
if(!holder_type)
|
||||
return
|
||||
if(buckled)
|
||||
grabber << "Perhaps you should unbuckle [src] first?"
|
||||
return
|
||||
var/obj/item/weapon/holder/H = new holder_type(loc)
|
||||
src.loc = H
|
||||
H.name = loc.name
|
||||
|
||||
@@ -282,6 +282,12 @@
|
||||
if(src.throw_icon)
|
||||
src.throw_icon.icon_state = "act_throw_on"
|
||||
|
||||
/mob/living/carbon/key_pressed_q()
|
||||
if(!get_active_hand())
|
||||
usr << "\red You have nothing to drop in your hand."
|
||||
return
|
||||
return drop_item()
|
||||
|
||||
/mob/proc/throw_item(atom/target)
|
||||
return
|
||||
|
||||
|
||||
@@ -502,13 +502,15 @@
|
||||
return istype(H.glasses, /obj/item/clothing/glasses/hud/health)
|
||||
else
|
||||
return 0
|
||||
else if(istype(M, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
else if(istype(M, /mob/living/silicon))
|
||||
var/mob/living/silicon/R = M
|
||||
switch(hudtype)
|
||||
if("security")
|
||||
return istype(R.module_state_1, /obj/item/borg/sight/hud/sec) || istype(R.module_state_2, /obj/item/borg/sight/hud/sec) || istype(R.module_state_3, /obj/item/borg/sight/hud/sec)
|
||||
if(R.sensor_mode == 1)
|
||||
return 1
|
||||
if("medical")
|
||||
return istype(R.module_state_1, /obj/item/borg/sight/hud/med) || istype(R.module_state_2, /obj/item/borg/sight/hud/med) || istype(R.module_state_3, /obj/item/borg/sight/hud/med)
|
||||
if(R.sensor_mode == 2)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
else
|
||||
|
||||
@@ -484,50 +484,59 @@
|
||||
|
||||
// Get rank from ID, ID inside PDA, PDA, ID in wallet, etc.
|
||||
/mob/living/carbon/human/proc/get_authentification_rank(var/if_no_id = "No id", var/if_no_job = "No job")
|
||||
var/obj/item/device/pda/pda = wear_id
|
||||
if (istype(pda))
|
||||
if (pda.id)
|
||||
return pda.id.rank
|
||||
else
|
||||
return pda.ownrank
|
||||
else
|
||||
var/obj/item/weapon/card/id/id = get_idcard()
|
||||
if(id)
|
||||
return id.rank ? id.rank : if_no_job
|
||||
else
|
||||
if(wear_id)
|
||||
var/obj/item/weapon/card/id/ID
|
||||
if(istype(wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/PDA = wear_id
|
||||
ID = PDA.GetID()
|
||||
if(istype(wear_id, /obj/item/weapon/storage/wallet))
|
||||
var/obj/item/weapon/storage/wallet/Wallet = wear_id
|
||||
ID = Wallet.GetID()
|
||||
if(istype(wear_id, /obj/item/weapon/card/id))
|
||||
ID = wear_id
|
||||
if(!ID)
|
||||
return if_no_id
|
||||
return ID.rank ? ID.rank : if_no_job
|
||||
else
|
||||
return if_no_id
|
||||
|
||||
//gets assignment from ID or ID inside PDA or PDA itself
|
||||
//Useful when player do something with computers
|
||||
/mob/living/carbon/human/proc/get_assignment(var/if_no_id = "No id", var/if_no_job = "No job")
|
||||
var/obj/item/device/pda/pda = wear_id
|
||||
if (istype(pda))
|
||||
if (pda.id)
|
||||
return pda.id.assignment
|
||||
else
|
||||
return pda.ownjob
|
||||
else
|
||||
var/obj/item/weapon/card/id/id = get_idcard()
|
||||
if(id)
|
||||
return id.assignment ? id.assignment : if_no_job
|
||||
else
|
||||
if(wear_id)
|
||||
var/obj/item/weapon/card/id/ID
|
||||
if(istype(wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/PDA = wear_id
|
||||
ID = PDA.GetID()
|
||||
if(istype(wear_id, /obj/item/weapon/storage/wallet))
|
||||
var/obj/item/weapon/storage/wallet/Wallet = wear_id
|
||||
ID = Wallet.GetID()
|
||||
if(istype(wear_id, /obj/item/weapon/card/id))
|
||||
ID = wear_id
|
||||
if(!ID)
|
||||
return if_no_id
|
||||
return ID.assignment ? ID.assignment : if_no_job
|
||||
else
|
||||
return if_no_id
|
||||
|
||||
//gets name from ID or ID inside PDA or PDA itself
|
||||
//Useful when player do something with computers
|
||||
/mob/living/carbon/human/proc/get_authentification_name(var/if_no_id = "Unknown")
|
||||
var/obj/item/device/pda/pda = wear_id
|
||||
if (istype(pda))
|
||||
if (pda.id)
|
||||
return pda.id.registered_name
|
||||
else
|
||||
return pda.owner
|
||||
else
|
||||
var/obj/item/weapon/card/id/id = get_idcard()
|
||||
if(id)
|
||||
return id.registered_name
|
||||
else
|
||||
if(wear_id)
|
||||
var/obj/item/weapon/card/id/ID
|
||||
if(istype(wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/PDA = wear_id
|
||||
ID = PDA.GetID()
|
||||
if(istype(wear_id, /obj/item/weapon/storage/wallet))
|
||||
var/obj/item/weapon/storage/wallet/Wallet = wear_id
|
||||
ID = Wallet.GetID()
|
||||
if(istype(wear_id, /obj/item/weapon/card/id))
|
||||
ID = wear_id
|
||||
if(!ID)
|
||||
return if_no_id
|
||||
return ID.registered_name
|
||||
else
|
||||
return if_no_id
|
||||
|
||||
//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere
|
||||
/mob/living/carbon/human/proc/get_visible_name()
|
||||
@@ -1649,4 +1658,4 @@
|
||||
var/datum/organ/internal/eyes = internal_organs_by_name["eyes"]
|
||||
if(eyes && istype(eyes) && !eyes.status & ORGAN_CUT_AWAY)
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -56,7 +56,10 @@
|
||||
|
||||
if(species && species.has_organ["brain"])
|
||||
var/datum/organ/internal/brain/sponge = internal_organs_by_name["brain"]
|
||||
brainloss = min(sponge.damage,maxHealth*2)
|
||||
if(sponge)
|
||||
brainloss = min(sponge.damage,maxHealth*2)
|
||||
else
|
||||
brainloss = 200
|
||||
else
|
||||
brainloss = 0
|
||||
return brainloss
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
if (bodytemperature < 283.222)
|
||||
tally += (283.222 - bodytemperature) / 10 * 1.75
|
||||
|
||||
tally += max(2 * stance_damage, 0)
|
||||
|
||||
if(mRun in mutations)
|
||||
tally = -1
|
||||
|
||||
|
||||
@@ -108,28 +108,29 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
#define MUTANTRACE_LAYER 1
|
||||
#define MUTATIONS_LAYER 2
|
||||
#define DAMAGE_LAYER 3
|
||||
#define UNIFORM_LAYER 4
|
||||
#define TAIL_LAYER 5 //bs12 specific. this hack is probably gonna come back to haunt me
|
||||
#define ID_LAYER 6
|
||||
#define SHOES_LAYER 7
|
||||
#define GLOVES_LAYER 8
|
||||
#define SUIT_LAYER 9
|
||||
#define GLASSES_LAYER 10
|
||||
#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt?
|
||||
#define SUIT_STORE_LAYER 12
|
||||
#define BACK_LAYER 13
|
||||
#define HAIR_LAYER 14 //TODO: make part of head layer?
|
||||
#define EARS_LAYER 15
|
||||
#define FACEMASK_LAYER 16
|
||||
#define HEAD_LAYER 17
|
||||
#define COLLAR_LAYER 18
|
||||
#define HANDCUFF_LAYER 19
|
||||
#define LEGCUFF_LAYER 20
|
||||
#define L_HAND_LAYER 21
|
||||
#define R_HAND_LAYER 22
|
||||
#define TARGETED_LAYER 23 //BS12: Layer for the target overlay from weapon targeting system
|
||||
#define FIRE_LAYER 24 //If you're on fire
|
||||
#define TOTAL_LAYERS 24
|
||||
#define SURGERY_LEVEL 4
|
||||
#define UNIFORM_LAYER 5
|
||||
#define TAIL_LAYER 6 //bs12 specific. this hack is probably gonna come back to haunt me
|
||||
#define ID_LAYER 7
|
||||
#define SHOES_LAYER 8
|
||||
#define GLOVES_LAYER 9
|
||||
#define SUIT_LAYER 10
|
||||
#define GLASSES_LAYER 11
|
||||
#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt?
|
||||
#define SUIT_STORE_LAYER 13
|
||||
#define BACK_LAYER 14
|
||||
#define HAIR_LAYER 15 //TODO: make part of head layer?
|
||||
#define EARS_LAYER 16
|
||||
#define FACEMASK_LAYER 17
|
||||
#define HEAD_LAYER 18
|
||||
#define COLLAR_LAYER 19
|
||||
#define HANDCUFF_LAYER 20
|
||||
#define LEGCUFF_LAYER 21
|
||||
#define L_HAND_LAYER 22
|
||||
#define R_HAND_LAYER 23
|
||||
#define TARGETED_LAYER 24 //BS12: Layer for the target overlay from weapon targeting system
|
||||
#define FIRE_LAYER 25 //If you're on fire
|
||||
#define TOTAL_LAYERS 25
|
||||
//////////////////////////////////
|
||||
|
||||
/mob/living/carbon/human
|
||||
@@ -1051,10 +1052,21 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
var/image/face_lying_image = new /image(icon = face_lying)
|
||||
return face_lying_image
|
||||
|
||||
/mob/living/carbon/human/proc/update_surgery(var/update_icons=1)
|
||||
overlays_standing[SURGERY_LEVEL] = null
|
||||
var/image/total = new
|
||||
for(var/datum/organ/external/E in organs)
|
||||
if(E.open)
|
||||
var/image/I = image("icon"='icons/mob/surgery.dmi', "icon_state"="[E.name][round(E.open)]", "layer"=-SURGERY_LEVEL)
|
||||
total.overlays += I
|
||||
overlays_standing[SURGERY_LEVEL] = total
|
||||
if(update_icons) update_icons()
|
||||
|
||||
//Human Overlays Indexes/////////
|
||||
#undef MUTANTRACE_LAYER
|
||||
#undef MUTATIONS_LAYER
|
||||
#undef DAMAGE_LAYER
|
||||
#undef SURGERY_LEVEL
|
||||
#undef UNIFORM_LAYER
|
||||
#undef TAIL_LAYER
|
||||
#undef ID_LAYER
|
||||
|
||||
@@ -532,3 +532,9 @@
|
||||
message = capitalize(trim_left(message))
|
||||
|
||||
..(message, speaking, verb, alt_name, italics, message_range, used_radios)
|
||||
|
||||
/mob/living/carbon/monkey/can_use_vents()
|
||||
if(mind.changeling)
|
||||
return
|
||||
else
|
||||
return "You can't fit into that vent."
|
||||
@@ -442,9 +442,9 @@
|
||||
set name = "Resist"
|
||||
set category = "IC"
|
||||
|
||||
if(!isliving(usr) || usr.next_move > world.time)
|
||||
if(!isliving(usr) || !usr.AllowedToMoveAgain())
|
||||
return
|
||||
usr.next_move = world.time + 20
|
||||
usr.AllowedToClickAgainAfter(CLICK_CD_RESIST)
|
||||
|
||||
var/mob/living/L = usr
|
||||
|
||||
@@ -527,7 +527,7 @@
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
if( C.handcuffed )
|
||||
C.next_move = world.time + 100
|
||||
C.AllowedToClickAgainAfter(CLICK_CD_BREAKOUT)
|
||||
C.last_special = world.time + 100
|
||||
C << "\red You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)"
|
||||
for(var/mob/O in viewers(L))
|
||||
@@ -561,7 +561,7 @@
|
||||
// breakout_time++ //Harder to get out of welded lockers than locked lockers
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
usr.next_move = world.time + 100
|
||||
usr.AllowedToClickAgainAfter(CLICK_CD_BREAKOUT)
|
||||
L.last_special = world.time + 100
|
||||
L << "\red You lean on the back of \the [C] and start pushing the door open. (this will take about [breakout_time] minutes)"
|
||||
for(var/mob/O in viewers(usr.loc))
|
||||
@@ -626,7 +626,7 @@
|
||||
ExtinguishMob()
|
||||
return
|
||||
if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
|
||||
CM.next_move = world.time + 100
|
||||
CM.AllowedToClickAgainAfter(CLICK_CD_BREAKOUT)
|
||||
CM.last_special = world.time + 100
|
||||
|
||||
var/can_break_cuffs
|
||||
@@ -672,7 +672,7 @@
|
||||
CM.drop_from_inventory(CM.handcuffed)
|
||||
|
||||
else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time))
|
||||
CM.next_move = world.time + 100
|
||||
CM.AllowedToClickAgainAfter(CLICK_CD_BREAKOUT)
|
||||
CM.last_special = world.time + 100
|
||||
|
||||
var/can_break_cuffs
|
||||
|
||||
@@ -724,7 +724,11 @@ var/list/ai_verbs_default = list(
|
||||
else
|
||||
lightNearbyCamera()
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/sensor_mode()
|
||||
set name = "Set Sensor Augmentation"
|
||||
set desc = "Augment visual feed with internal sensor overlays."
|
||||
set category = "AI Commands"
|
||||
toggle_sensor_mode()
|
||||
|
||||
// Handled camera lighting, when toggled.
|
||||
// It will get the nearest camera from the eyeobj, lighting it.
|
||||
|
||||
@@ -172,6 +172,12 @@
|
||||
src.show_laws()
|
||||
sleep(50)
|
||||
theAPC = null
|
||||
regular_hud_updates()
|
||||
switch(src.sensor_mode)
|
||||
if (SEC_HUD)
|
||||
process_sec_hud(src,1,src.eyeobj)
|
||||
if (MED_HUD)
|
||||
process_med_hud(src,1,src.eyeobj)
|
||||
|
||||
/mob/living/silicon/ai/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
var/obj/nano_module/crew_monitor/crew_monitor
|
||||
|
||||
/mob/living/silicon/ai/proc/init_subsystems()
|
||||
crew_monitor = new(src)
|
||||
|
||||
/mob/living/silicon/ai/proc/nano_crew_monitor()
|
||||
set category = "AI Commands"
|
||||
set name = "Crew Monitor"
|
||||
if (!crew_monitor)
|
||||
init_subsystems()
|
||||
crew_monitor.ui_interact(usr)
|
||||
@@ -7,6 +7,10 @@
|
||||
return
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>[custom_name ? ", [modtype] [braintype]" : ""]!\n"
|
||||
|
||||
msg += "\n"
|
||||
msg += describe_all_modules() // describe modules
|
||||
msg += "\n"
|
||||
msg += "<span class='warning'>"
|
||||
if (src.getBruteLoss())
|
||||
if (src.getBruteLoss() < 75)
|
||||
|
||||
@@ -5,67 +5,110 @@
|
||||
/mob/living/silicon/robot/get_active_hand()
|
||||
return module_active
|
||||
|
||||
|
||||
|
||||
/*-------TODOOOOOOOOOO--------*/
|
||||
/mob/living/silicon/robot/proc/uneq_active()
|
||||
if(isnull(module_active))
|
||||
return
|
||||
if(module_state_1 == module_active)
|
||||
if(istype(module_state_1,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_1:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_1
|
||||
contents -= module_state_1
|
||||
/mob/living/silicon/robot/proc/uneq_module(obj/item/O,var/display_tool_transfer=TRUE)
|
||||
if(!O)
|
||||
return 0
|
||||
|
||||
if(istype(O,/obj/item/borg/sight))
|
||||
var/obj/item/borg/sight/S = O
|
||||
sight_mode &= ~S.sight_mode
|
||||
else if(istype(O, /obj/item/device/flashlight))
|
||||
var/obj/item/device/flashlight/F = O
|
||||
if(F.on)
|
||||
F.on = 0
|
||||
F.update_brightness(src)
|
||||
if(client)
|
||||
client.screen -= O
|
||||
contents -= O
|
||||
if(module)
|
||||
O.loc = module //Return item to module so it appears in its contents, so it can be taken out again.
|
||||
|
||||
if (!display_tool_transfer)
|
||||
for(var/mob/M in viewers(src, null)) // show when cyborgs change their modules
|
||||
if (M == src)
|
||||
usr << "<span class='notice'>You retract \icon[O] [O] into your internal tool storage.</span>"
|
||||
else if (M in range(1)) //If someone is standing close enough, they can tell what it is...
|
||||
M.show_message("<span class='notice'>[src] retracts \icon[O] [O] into their internal tool storage.</span>")
|
||||
else //Otherwise they can only see that you've put something back.
|
||||
M.show_message("<span class='notice'>[src] retracts a tool into their internal tool storage.</span>")
|
||||
|
||||
if(module_active == O)
|
||||
module_active = null
|
||||
module_state_1 = null
|
||||
if(module_state_1 == O)
|
||||
inv1.icon_state = "inv1"
|
||||
else if(module_state_2 == module_active)
|
||||
if(istype(module_state_2,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_2:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_2
|
||||
contents -= module_state_2
|
||||
module_active = null
|
||||
module_state_2 = null
|
||||
module_state_1 = null
|
||||
else if(module_state_2 == O)
|
||||
inv2.icon_state = "inv2"
|
||||
else if(module_state_3 == module_active)
|
||||
if(istype(module_state_3,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_3:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_3
|
||||
contents -= module_state_3
|
||||
module_active = null
|
||||
module_state_2 = null
|
||||
else if(module_state_3 == O)
|
||||
module_state_3 = null
|
||||
inv3.icon_state = "inv3"
|
||||
updateicon()
|
||||
|
||||
hud_used.update_robot_modules_display() // update the display
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/activate_module(var/obj/item/O)
|
||||
if(!(locate(O) in src.module.modules) && O != src.module.emag)
|
||||
return
|
||||
if(activated(O))
|
||||
src << "Already activated"
|
||||
return
|
||||
var/selected=get_selected_module() // this makes you swap your selected module if you've got one selected
|
||||
if (selected)
|
||||
for(var/mob/M in viewers(src, null)) // show when cyborgs change their modules
|
||||
if (M == src)
|
||||
usr << "<span class='notice'>You swap \icon[module_active] [module_active] for \icon[O] [O].</span>"
|
||||
else if (M in range(1)) //If someone is standing close enough, they can tell what it is...
|
||||
M.show_message("<span class='notice'>[src] swaps \icon[module_active] [module_active] for \icon[O] [O].</span>")
|
||||
else //Otherwise they can only see that you've swapped something.
|
||||
M.show_message("<span class='notice'>[src] swaps some of their tools.</span>")
|
||||
uneq_active(TRUE)
|
||||
|
||||
var/target=(selected) ? selected : first_free_module() // find where we're putting this
|
||||
if (!target) // if there's nowhere to put it just warn them and kick out
|
||||
src << "You need to disable a module first!"
|
||||
return
|
||||
|
||||
switch (target)
|
||||
if(1)
|
||||
module_state_1=O
|
||||
O.screen_loc = inv1.screen_loc
|
||||
if(2)
|
||||
module_state_2=O
|
||||
O.screen_loc = inv2.screen_loc
|
||||
if(3)
|
||||
module_state_3=O
|
||||
O.screen_loc = inv3.screen_loc
|
||||
|
||||
O.layer = 20 // this bit moves the target object into the robot, and moves it's location on screen
|
||||
contents += O
|
||||
if(istype(O,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_1:sight_mode
|
||||
|
||||
if (selected) // replaces your selection if you're swapping
|
||||
select_module(selected)
|
||||
else // only do this if we activated a module but weren't swapping
|
||||
for(var/mob/M in viewers(src, null)) // show when cyborgs change their modules
|
||||
if (M == src)
|
||||
usr << "<span class='notice'>You retrieve \icon[O] [O] from your internal tool storage.</span>"
|
||||
else if (M in range(1)) //If someone is standing close enough, they can tell what it is...
|
||||
M.show_message("<span class='notice'>[src] extends \icon[O] [O] from their internal tool storage.</span>")
|
||||
else //Otherwise they can only see that you've swapped something.
|
||||
M.show_message("<span class='notice'>[src] extends a tool.</span>")
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_active(var/display_tool_transfer=FALSE)
|
||||
uneq_module(module_active,display_tool_transfer)
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_all()
|
||||
module_active = null
|
||||
|
||||
if(module_state_1)
|
||||
if(istype(module_state_1,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_1:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_1
|
||||
contents -= module_state_1
|
||||
module_state_1 = null
|
||||
inv1.icon_state = "inv1"
|
||||
if(module_state_2)
|
||||
if(istype(module_state_2,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_2:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_2
|
||||
contents -= module_state_2
|
||||
module_state_2 = null
|
||||
inv2.icon_state = "inv2"
|
||||
if(module_state_3)
|
||||
if(istype(module_state_3,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_3:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_3
|
||||
contents -= module_state_3
|
||||
module_state_3 = null
|
||||
inv3.icon_state = "inv3"
|
||||
updateicon()
|
||||
uneq_module(module_state_1)
|
||||
uneq_module(module_state_2)
|
||||
uneq_module(module_state_3)
|
||||
|
||||
/mob/living/silicon/robot/proc/activated(obj/item/O)
|
||||
if(module_state_1 == O)
|
||||
@@ -164,6 +207,11 @@
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/deselect_current_module() //deselect current module
|
||||
deselect_module(get_selected_module())
|
||||
|
||||
|
||||
//toggle_module(module) - Toggles the selection of the module slot specified by "module".
|
||||
/mob/living/silicon/robot/proc/toggle_module(var/module) //Module is 1-3
|
||||
if(module < 1 || module > 3) return
|
||||
@@ -177,23 +225,75 @@
|
||||
deselect_module(get_selected_module()) //If we can't do select anything, at least deselect the current module.
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/proc/first_active_module()
|
||||
for (var/slot=0,slot<=3,slot++)
|
||||
if (module_active(slot))
|
||||
return slot
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/proc/first_free_module()
|
||||
for (var/slot=1,slot<=3,slot++)
|
||||
if (!module_active(slot))
|
||||
return slot
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/proc/next_slot(var/slot)
|
||||
if (slot >= 3)
|
||||
return 1
|
||||
return slot+1
|
||||
|
||||
//cycle_modules() - Cycles through the list of selected modules.
|
||||
/mob/living/silicon/robot/proc/cycle_modules()
|
||||
var/slot_start = get_selected_module()
|
||||
if(slot_start) deselect_module(slot_start) //Only deselect if we have a selected slot.
|
||||
|
||||
var/slot_num
|
||||
if(slot_start == 0)
|
||||
slot_num = 1
|
||||
slot_start = 2
|
||||
if(slot_start)
|
||||
deselect_module(slot_start) //Only deselect if we have a selected slot.
|
||||
if(!slot_start) // we did not find a module
|
||||
select_module(first_active_module()) // try to select the first active module
|
||||
else
|
||||
slot_num = slot_start + 1
|
||||
|
||||
while(slot_start != slot_num) //If we wrap around without finding any free slots, just give up.
|
||||
if(module_active(slot_num))
|
||||
select_module(slot_num)
|
||||
return
|
||||
slot_num++
|
||||
if(slot_num > 3) slot_num = 1 //Wrap around.
|
||||
|
||||
var/slot_num = next_slot(slot_start)
|
||||
while(slot_start != slot_num) //If we wrap around without finding any free slots, just give up.
|
||||
if(module_active(slot_num))
|
||||
select_module(slot_num)
|
||||
return
|
||||
slot_num=next_slot(slot_num)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/robot/key_pressed_v()
|
||||
uneq_active()
|
||||
|
||||
/mob/living/silicon/robot/key_pressed_c()
|
||||
deselect_current_module()
|
||||
|
||||
/mob/living/silicon/robot/key_pressed_q()
|
||||
hud_used.toggle_show_robot_modules()
|
||||
|
||||
/mob/living/silicon/robot/key_pressed_1()
|
||||
return select_module(1)
|
||||
|
||||
/mob/living/silicon/robot/key_pressed_2()
|
||||
return select_module(2)
|
||||
|
||||
/mob/living/silicon/robot/key_pressed_3()
|
||||
return select_module(3)
|
||||
|
||||
/mob/living/silicon/robot/key_pressed_4()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/describe_module(var/slot)
|
||||
var/list/index_module=list(module_state_1,module_state_2,module_state_3)
|
||||
var/result = " Hardpoint [slot] holds "
|
||||
result += (index_module[slot]) ? "\icon[index_module[slot]] [index_module[slot]]." : "nothing."
|
||||
result += "\n"
|
||||
return result
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/describe_all_modules()
|
||||
var/result="It has three tool hardpoints.\n"
|
||||
for (var/x = 1; x <=3; x++)
|
||||
result+=describe_module(x)
|
||||
var/selected=get_selected_module()
|
||||
if (selected)
|
||||
result+="\nThe activity light on hardpoint [selected] is on.\n"
|
||||
return result
|
||||
|
||||
@@ -167,8 +167,11 @@
|
||||
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
|
||||
client.images.Remove(hud)
|
||||
|
||||
var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
|
||||
if(hud && hud.hud) hud.hud.process_hud(src)
|
||||
switch(src.sensor_mode)
|
||||
if (SEC_HUD)
|
||||
process_sec_hud(src,1)
|
||||
if (MED_HUD)
|
||||
process_med_hud(src,1)
|
||||
|
||||
if (src.healths)
|
||||
if (src.stat != 2)
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
var/obj/screen/inv1 = null
|
||||
var/obj/screen/inv2 = null
|
||||
var/obj/screen/inv3 = null
|
||||
|
||||
var/shown_robot_modules = 0 //Used to determine whether they have the module menu shown or not
|
||||
var/obj/screen/robot_modules_background
|
||||
|
||||
//3 Modules can be activated at any one time.
|
||||
var/obj/item/weapon/robot_module/module = null
|
||||
@@ -73,6 +76,10 @@
|
||||
|
||||
add_language("Robot Talk", 1)
|
||||
|
||||
robot_modules_background = new()
|
||||
robot_modules_background.icon_state = "block"
|
||||
robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
|
||||
|
||||
ident = rand(1, 999)
|
||||
updatename("Default")
|
||||
updateicon()
|
||||
@@ -168,103 +175,44 @@
|
||||
modules+="Combat"
|
||||
modtype = input("Please, select a module!", "Robot", null, null) in modules
|
||||
|
||||
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
|
||||
|
||||
if(module)
|
||||
return
|
||||
|
||||
switch(modtype)
|
||||
if("Standard")
|
||||
module = new /obj/item/weapon/robot_module/standard(src)
|
||||
module_sprites["Basic"] = "robot_old"
|
||||
module_sprites["Android"] = "droid"
|
||||
module_sprites["Default"] = "robot"
|
||||
|
||||
if("Service")
|
||||
module = new /obj/item/weapon/robot_module/butler(src)
|
||||
module_sprites["Waitress"] = "Service"
|
||||
module_sprites["Kent"] = "toiletbot"
|
||||
module_sprites["Bro"] = "Brobot"
|
||||
module_sprites["Rich"] = "maximillion"
|
||||
module_sprites["Default"] = "Service2"
|
||||
|
||||
if("Clerical")
|
||||
module = new /obj/item/weapon/robot_module/clerical(src)
|
||||
module_sprites["Waitress"] = "Service"
|
||||
module_sprites["Kent"] = "toiletbot"
|
||||
module_sprites["Bro"] = "Brobot"
|
||||
module_sprites["Rich"] = "maximillion"
|
||||
module_sprites["Default"] = "Service2"
|
||||
|
||||
if("Miner")
|
||||
module = new /obj/item/weapon/robot_module/miner(src)
|
||||
module.channels = list("Supply" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("MINE")
|
||||
module_sprites["Basic"] = "Miner_old"
|
||||
module_sprites["Advanced Droid"] = "droid-miner"
|
||||
module_sprites["Treadhead"] = "Miner"
|
||||
|
||||
if("Crisis")
|
||||
module = new /obj/item/weapon/robot_module/crisis(src)
|
||||
module.channels = list("Medical" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Medical")
|
||||
module_sprites["Basic"] = "Medbot"
|
||||
module_sprites["Standard"] = "surgeon"
|
||||
module_sprites["Advanced Droid"] = "droid-medical"
|
||||
module_sprites["Needles"] = "medicalrobot"
|
||||
|
||||
if("Surgeon")
|
||||
module = new /obj/item/weapon/robot_module/surgeon(src)
|
||||
module.channels = list("Medical" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Medical")
|
||||
|
||||
module_sprites["Basic"] = "Medbot"
|
||||
module_sprites["Standard"] = "surgeon"
|
||||
module_sprites["Advanced Droid"] = "droid-medical"
|
||||
module_sprites["Needles"] = "medicalrobot"
|
||||
|
||||
if("Security")
|
||||
module = new /obj/item/weapon/robot_module/security(src)
|
||||
module.channels = list("Security" = 1)
|
||||
module_sprites["Basic"] = "secborg"
|
||||
module_sprites["Red Knight"] = "Security"
|
||||
module_sprites["Black Knight"] = "securityrobot"
|
||||
module_sprites["Bloodhound"] = "bloodhound"
|
||||
|
||||
if("Engineering")
|
||||
module = new /obj/item/weapon/robot_module/engineering(src)
|
||||
module.channels = list("Engineering" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Engineering")
|
||||
module_sprites["Basic"] = "Engineering"
|
||||
module_sprites["Antique"] = "engineerrobot"
|
||||
module_sprites["Landmate"] = "landmate"
|
||||
|
||||
if("Construction")
|
||||
module = new /obj/item/weapon/robot_module/construction(src)
|
||||
module.channels = list("Engineering" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Engineering")
|
||||
module_sprites["Basic"] = "Engineering"
|
||||
module_sprites["Antique"] = "engineerrobot"
|
||||
module_sprites["Landmate"] = "landmate"
|
||||
|
||||
if("Janitor")
|
||||
module = new /obj/item/weapon/robot_module/janitor(src)
|
||||
module_sprites["Basic"] = "JanBot2"
|
||||
module_sprites["Mopbot"] = "janitorrobot"
|
||||
module_sprites["Mop Gear Rex"] = "mopgearrex"
|
||||
|
||||
if("Combat")
|
||||
module = new /obj/item/weapon/robot_module/combat(src)
|
||||
module_sprites["Combat Android"] = "droid-combat"
|
||||
module.channels = list("Security" = 1)
|
||||
|
||||
//languages
|
||||
// languages
|
||||
module.add_languages(src)
|
||||
|
||||
// cameras
|
||||
module.add_to_camera_network(src)
|
||||
|
||||
// sensors
|
||||
module.add_sensor_modification(src)
|
||||
|
||||
// create sprite list
|
||||
var/list/module_sprites = module.sprites.Copy()
|
||||
|
||||
//Custom_sprite check and entry
|
||||
if (custom_sprite == 1)
|
||||
@@ -425,6 +373,12 @@
|
||||
updatehealth()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/proc/sensor_mode()
|
||||
set name = "Set Sensor Augmentation"
|
||||
set desc = "Augment visual feed with internal sensor overlays."
|
||||
set category = "Robot Commands"
|
||||
toggle_sensor_mode()
|
||||
|
||||
// this function shows information about the malf_ai gameplay type in the status screen
|
||||
/mob/living/silicon/robot/show_malf_ai()
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
item_state = "electronic"
|
||||
flags = FPRINT|TABLEPASS | CONDUCT
|
||||
var/channels = list()
|
||||
var/camera_network = null
|
||||
var/sensor_mode = 0
|
||||
var/list/sprites = list("Basic"="robot_old")
|
||||
var/list/modules = list()
|
||||
var/obj/item/emag = null
|
||||
var/obj/item/borg/upgrade/jetpack = null
|
||||
@@ -26,11 +29,9 @@
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.emag = new /obj/item/toy/sword(src)
|
||||
src.emag.name = "Placeholder Emag Item"
|
||||
// src.jetpack = new /obj/item/toy/sword(src)
|
||||
// src.jetpack.name = "Placeholder Upgrade Item"
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/proc/respawn_consumable(var/mob/living/silicon/robot/R)
|
||||
|
||||
if(!stacktypes || !stacktypes.len) return
|
||||
@@ -66,9 +67,19 @@
|
||||
R.add_language("Rootspeak", 0)
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/proc/add_to_camera_network(var/mob/living/silicon/robot/R)
|
||||
if (camera_network)
|
||||
if(R.camera && "Robots" in R.camera.network)
|
||||
R.camera.network.Add(camera_network)
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/proc/add_sensor_modification(var/mob/living/silicon/robot/R)
|
||||
R.sensor_mode=sensor_mode
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/standard
|
||||
name = "standard robot module"
|
||||
|
||||
sprites=list("Basic" = "robot_old","Android" = "droid", "Default" = "robot")
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
@@ -82,6 +93,13 @@
|
||||
|
||||
/obj/item/weapon/robot_module/surgeon
|
||||
name = "surgeon robot module"
|
||||
sensor_mode=MED_HUD
|
||||
channels=list("Medical" = 1)
|
||||
camera_network="Medical"
|
||||
sprites=list( "Basic" = "Medbot",
|
||||
"Standard "= "surgeon",
|
||||
"Advanced Droid" = "droid-medical",
|
||||
"Needles" = "medicalrobot")
|
||||
stacktypes = list(
|
||||
/obj/item/stack/medical/advanced/bruise_pack = 5,
|
||||
/obj/item/stack/nanopaste = 5
|
||||
@@ -119,6 +137,13 @@
|
||||
|
||||
/obj/item/weapon/robot_module/crisis
|
||||
name = "crisis robot module"
|
||||
sensor_mode=MED_HUD
|
||||
channels=list("Medical" = 1)
|
||||
camera_network="Medical"
|
||||
sprites=list( "Basic" = "Medbot",
|
||||
"Standard "= "surgeon",
|
||||
"Advanced Droid" = "droid-medical",
|
||||
"Needles" = "medicalrobot")
|
||||
stacktypes = list(
|
||||
/obj/item/stack/medical/ointment = 5,
|
||||
/obj/item/stack/medical/bruise_pack = 5,
|
||||
@@ -128,7 +153,6 @@
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/borg/sight/hud/med(src)
|
||||
src.modules += new /obj/item/device/healthanalyzer(src)
|
||||
src.modules += new /obj/item/device/reagent_scanner/adv(src)
|
||||
src.modules += new /obj/item/roller_holder(src)
|
||||
@@ -164,7 +188,11 @@
|
||||
|
||||
/obj/item/weapon/robot_module/construction
|
||||
name = "construction robot module"
|
||||
|
||||
channels = list("Engineering" = 1)
|
||||
camera_network="Engineering"
|
||||
sprites=list( "Basic" = "Engineering",
|
||||
"Antique" = "engineerrobot",
|
||||
"Landmate" = "landmate")
|
||||
stacktypes = list(
|
||||
/obj/item/stack/sheet/metal = 50,
|
||||
/obj/item/stack/sheet/plasteel = 10,
|
||||
@@ -185,7 +213,11 @@
|
||||
|
||||
/obj/item/weapon/robot_module/engineering
|
||||
name = "engineering robot module"
|
||||
|
||||
channels = list("Engineering" = 1)
|
||||
camera_network="Engineering"
|
||||
sprites=list( "Basic" = "Engineering",
|
||||
"Antique" = "engineerrobot",
|
||||
"Landmate" = "landmate")
|
||||
stacktypes = list(
|
||||
/obj/item/stack/sheet/metal = 50,
|
||||
/obj/item/stack/sheet/glass = 50,
|
||||
@@ -233,11 +265,15 @@
|
||||
|
||||
/obj/item/weapon/robot_module/security
|
||||
name = "security robot module"
|
||||
|
||||
sensor_mode=SEC_HUD
|
||||
channels=list("Security" = 1)
|
||||
sprites = list( "Basic" = "secborg",
|
||||
"Red Knight" = "Security",
|
||||
"Black Knight" = "securityrobot",
|
||||
"Bloodhound" = "bloodhound")
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/borg/sight/hud/sec(src)
|
||||
src.modules += new /obj/item/weapon/handcuffs/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/melee/baton/loaded(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/taser/cyborg(src)
|
||||
@@ -262,7 +298,9 @@
|
||||
|
||||
/obj/item/weapon/robot_module/janitor
|
||||
name = "janitorial robot module"
|
||||
|
||||
sprites=list( "Basic" = "JanBot2",
|
||||
"Mopbot" = "janitorrobot",
|
||||
"Mop Gear Rex" = "mopgearrex" )
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
@@ -285,7 +323,11 @@
|
||||
|
||||
/obj/item/weapon/robot_module/butler
|
||||
name = "service robot module"
|
||||
|
||||
sprites = list( "Waitress" = "Service",
|
||||
"Kent" = "toiletbot",
|
||||
"Bro" = "Brobot",
|
||||
"Rich" = "maximillion",
|
||||
"Default" = "Service2")
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
@@ -326,7 +368,11 @@
|
||||
|
||||
/obj/item/weapon/robot_module/clerical
|
||||
name = "clerical robot module"
|
||||
|
||||
sprites = list( "Waitress" = "Service",
|
||||
"Kent" = "toiletbot",
|
||||
"Bro" = "Brobot",
|
||||
"Rich" = "maximillion",
|
||||
"Default" = "Service2")
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
@@ -354,7 +400,10 @@
|
||||
|
||||
/obj/item/weapon/robot_module/miner
|
||||
name = "miner robot module"
|
||||
|
||||
channels=list("Supply" = 1)
|
||||
sprites = list( "Basic" = "Miner_old",
|
||||
"Advanced Droid" = "droid-miner",
|
||||
"Treadhead" = "Miner")
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
@@ -380,7 +429,8 @@
|
||||
|
||||
/obj/item/weapon/robot_module/combat
|
||||
name = "combat robot module"
|
||||
|
||||
channels=list("Security" = 1)
|
||||
sprites = list("Combat Android" = "droid-combat")
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#define SEC_HUD 1 //Security HUD mode
|
||||
#define MED_HUD 2 //Medical HUD mode
|
||||
|
||||
/mob/living/silicon
|
||||
gender = NEUTER
|
||||
voice_name = "synthesized voice"
|
||||
@@ -11,6 +14,7 @@
|
||||
var/speak_statement = "states"
|
||||
var/speak_exclamation = "declares"
|
||||
var/speak_query = "queries"
|
||||
var/sensor_mode = 0 //Determines the current HUD.
|
||||
var/pose //Yes, now AIs can pose too.
|
||||
var/obj/item/device/camera/siliconcam/aiCamera = null //photography
|
||||
var/local_transmit //If set, can only speak to others of the same type within a short range.
|
||||
@@ -204,4 +208,17 @@
|
||||
flavor_text = copytext(sanitize(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text), 1)
|
||||
|
||||
/mob/living/silicon/binarycheck()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/proc/toggle_sensor_mode()
|
||||
var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security", "Medical","Disable")
|
||||
switch(sensor_type)
|
||||
if ("Security")
|
||||
sensor_mode = SEC_HUD
|
||||
src << "<span class='notice'>Security records overlay enabled.</span>"
|
||||
if ("Medical")
|
||||
sensor_mode = MED_HUD
|
||||
src << "<span class='notice'>Life signs monitor overlay enabled.</span>"
|
||||
if ("Disable")
|
||||
sensor_mode = 0
|
||||
src << "Sensor augmentations disabled."
|
||||
|
||||
@@ -259,8 +259,9 @@ var/list/slot_equipment_priority = list( \
|
||||
if (W)
|
||||
W.attack_self(src)
|
||||
update_inv_r_hand()
|
||||
if(next_move < world.time)
|
||||
next_move = world.time + 2
|
||||
|
||||
AllowedToClickAgainAfter(CLICK_CD_ACTIVATE_OBJECT) // this is probably imperceptible
|
||||
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -970,9 +971,9 @@ mob/proc/yank_out_object()
|
||||
set desc = "Remove an embedded item at the cost of bleeding and pain."
|
||||
set src in view(1)
|
||||
|
||||
if(!isliving(usr) || usr.next_move > world.time)
|
||||
if(!isliving(usr) || !usr.AllowedToMoveAgain())
|
||||
return
|
||||
usr.next_move = world.time + 20
|
||||
usr.AllowedToClickAgainAfter(CLICK_CD_RESIST)
|
||||
|
||||
if(usr.stat == 1)
|
||||
usr << "You are unconcious and cannot do that!"
|
||||
|
||||
@@ -222,3 +222,5 @@
|
||||
var/list/active_genes=list()
|
||||
|
||||
var/floating = 0 //living
|
||||
|
||||
var/stance_damage = 0
|
||||
@@ -108,7 +108,7 @@
|
||||
return
|
||||
if(state == GRAB_UPGRADING)
|
||||
return
|
||||
if(assailant.next_move > world.time)
|
||||
if(!assailant.AllowedToMoveAgain())
|
||||
return
|
||||
if(world.time < (last_upgrade + UPGRADE_COOLDOWN))
|
||||
return
|
||||
@@ -160,7 +160,7 @@
|
||||
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>"
|
||||
msg_admin_attack("[key_name_admin(assailant)] strangled (kill intent) [key_name_admin(affecting)] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[affecting.x];Y=[affecting.y];Z=[affecting.z]'>JMP</a>")
|
||||
|
||||
assailant.next_move = world.time + 10
|
||||
assailant.AllowedToClickAgainAfter(CLICK_CD_STRANGLE)
|
||||
affecting.losebreath += 1
|
||||
else
|
||||
assailant.visible_message("<span class='warning'>[assailant] was unable to tighten \his grip on [affecting]'s neck!</span>")
|
||||
|
||||
@@ -394,6 +394,65 @@ var/list/intents = list("help","disarm","grab","hurt")
|
||||
if(2) return "grab"
|
||||
else return "hurt"
|
||||
|
||||
/mob/proc/key_pressed_c()
|
||||
return
|
||||
/mob/proc/key_pressed_q()
|
||||
return
|
||||
/mob/proc/key_pressed_v()
|
||||
return
|
||||
|
||||
/client/verb/key_pressed_c()
|
||||
set hidden = 1
|
||||
set name = "key-pressed-c"
|
||||
if (mob)
|
||||
mob:key_pressed_c()
|
||||
|
||||
/client/verb/key_pressed_q()
|
||||
set hidden = 1
|
||||
set name = "key-pressed-q"
|
||||
if (mob)
|
||||
mob:key_pressed_q()
|
||||
|
||||
/client/verb/key_pressed_v()
|
||||
set hidden = 1
|
||||
set name = "key-pressed-v"
|
||||
if (mob)
|
||||
mob:key_pressed_v()
|
||||
|
||||
/mob/proc/key_pressed_1()
|
||||
return a_intent_change("help")
|
||||
/mob/proc/key_pressed_2()
|
||||
return a_intent_change("disarm")
|
||||
/mob/proc/key_pressed_3()
|
||||
return a_intent_change("grab")
|
||||
/mob/proc/key_pressed_4()
|
||||
return a_intent_change("hurt")
|
||||
|
||||
/client/verb/key_pressed_1()
|
||||
set hidden = 1
|
||||
set name = "key-pressed-1"
|
||||
if (mob)
|
||||
mob:key_pressed_1()
|
||||
|
||||
/client/verb/key_pressed_2()
|
||||
set hidden = 1
|
||||
set name = "key-pressed-2"
|
||||
if (mob)
|
||||
mob:key_pressed_2()
|
||||
|
||||
/client/verb/key_pressed_3()
|
||||
set hidden = 1
|
||||
set name = "key-pressed-3"
|
||||
if (mob)
|
||||
mob:key_pressed_3()
|
||||
|
||||
/client/verb/key_pressed_4()
|
||||
set hidden = 1
|
||||
set name = "key-pressed-4"
|
||||
if (mob)
|
||||
mob:key_pressed_4()
|
||||
|
||||
|
||||
//change a mob's act-intent. Input the intent as a string such as "help" or use "right"/"left
|
||||
/mob/verb/a_intent_change(input as text)
|
||||
set name = "a-intent"
|
||||
|
||||
@@ -330,12 +330,8 @@ proc/blood_splatter(var/target,var/datum/reagent/blood/source,var/large)
|
||||
else
|
||||
B.blood_DNA[source.data["blood_DNA"]] = "O+"
|
||||
|
||||
// Update virus information. //Looks like this is out of date.
|
||||
//for(var/datum/disease/D in source.data["viruses"])
|
||||
// var/datum/disease/new_virus = D.Copy(1)
|
||||
// source.viruses += new_virus
|
||||
// new_virus.holder = B
|
||||
// Update virus information.
|
||||
if(source.data["virus2"])
|
||||
B.virus2 = virus_copylist(source.data["virus2"])
|
||||
|
||||
return B
|
||||
return B
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
|
||||
// Takes care of organ related updates, such as broken and missing limbs
|
||||
/mob/living/carbon/human/proc/handle_organs()
|
||||
|
||||
number_wounds = 0
|
||||
var/leg_tally = 2
|
||||
var/force_process = 0
|
||||
var/damage_this_tick = getBruteLoss() + getFireLoss() + getToxLoss()
|
||||
if(damage_this_tick > last_dam)
|
||||
@@ -74,6 +74,9 @@
|
||||
for(var/datum/organ/internal/I in internal_organs)
|
||||
I.process()
|
||||
|
||||
//losing a limb stops it from processing, so this has to be done separately
|
||||
handle_stance()
|
||||
|
||||
if(!force_process && !bad_external_organs.len)
|
||||
return
|
||||
|
||||
@@ -100,23 +103,37 @@
|
||||
if (W.infection_check())
|
||||
W.germ_level += 1
|
||||
|
||||
if(E.name in list("l_leg","l_foot","r_leg","r_foot") && !lying)
|
||||
if (!E.is_usable() || E.is_malfunctioning() || (E.is_broken() && !(E.status & ORGAN_SPLINTED)))
|
||||
leg_tally-- // let it fail even if just foot&leg
|
||||
/mob/living/carbon/human/proc/handle_stance()
|
||||
// Don't need to process any of this if they aren't standing anyways
|
||||
// unless their stance is damaged, and we want to check if they should stay down
|
||||
if (!stance_damage && (lying || resting) && (life_tick % 4) == 0)
|
||||
return
|
||||
|
||||
stance_damage = 0
|
||||
|
||||
// Buckled to a bed/chair. Stance damage is forced to 0 since they're sitting on something solid
|
||||
if (istype(buckled, /obj/structure/stool/bed))
|
||||
return
|
||||
|
||||
for (var/organ in list("l_leg","l_foot","r_leg","r_foot"))
|
||||
var/datum/organ/external/E = organs_by_name[organ]
|
||||
if (E.status & ORGAN_DESTROYED)
|
||||
stance_damage += 2 // let it fail even if just foot&leg
|
||||
else if (E.is_malfunctioning() || (E.is_broken() && !(E.status & ORGAN_SPLINTED)) || !E.is_usable())
|
||||
stance_damage += 1
|
||||
|
||||
// Canes and crutches help you stand (if the latter is ever added)
|
||||
// One cane mitigates a broken leg+foot, or a missing foot.
|
||||
// Two canes are needed for a lost leg. If you are missing both legs, canes aren't gonna help you.
|
||||
if (istype(l_hand, /obj/item/weapon/cane))
|
||||
stance_damage -= 2
|
||||
if (istype(l_hand, /obj/item/weapon/cane))
|
||||
stance_damage -= 2
|
||||
|
||||
// standing is poor
|
||||
if(leg_tally <= 0 && !paralysis && !(lying || resting) && prob(5))
|
||||
if(species && species.flags & NO_PAIN)
|
||||
emote("scream")
|
||||
emote("collapse")
|
||||
paralysis = 10
|
||||
|
||||
//Check arms and legs for existence
|
||||
can_stand = 2 //can stand on both legs
|
||||
var/datum/organ/external/E = organs_by_name["l_foot"]
|
||||
if(E.status & ORGAN_DESTROYED)
|
||||
can_stand--
|
||||
|
||||
E = organs_by_name["r_foot"]
|
||||
if(E.status & ORGAN_DESTROYED)
|
||||
can_stand--
|
||||
if(stance_damage >= 4 || (stance_damage >= 2 && prob(5)))
|
||||
if(!(lying || resting))
|
||||
if(species && !(species.flags & NO_PAIN))
|
||||
emote("scream")
|
||||
custom_emote(1, "collapses!")
|
||||
Weaken(5) //can't emote while weakened, apparently.
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
/obj/item/organ/diona/removed(var/mob/living/target,var/mob/living/user)
|
||||
|
||||
..()
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(!istype(target))
|
||||
del(src)
|
||||
@@ -51,10 +52,10 @@
|
||||
if(!diona)
|
||||
del(src)
|
||||
|
||||
var/mob/living/carbon/alien/diona/D = new(get_turf(src))
|
||||
diona.request_player(D)
|
||||
|
||||
del(src)
|
||||
spawn(1) // So it has time to be thrown about by the gib() proc.
|
||||
var/mob/living/carbon/alien/diona/D = new(get_turf(src))
|
||||
diona.request_player(D)
|
||||
del(src)
|
||||
|
||||
// These are different to the standard diona organs as they have a purpose in other
|
||||
// species (absorbing radiation and light respectively)
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
var/damage_msg = "\red You feel an intense pain"
|
||||
var/broken_description
|
||||
|
||||
// var/vital //Lose a vital limb, die immediately.
|
||||
// var/status = 0
|
||||
var/open = 0
|
||||
var/stage = 0
|
||||
var/cavity = 0
|
||||
@@ -100,7 +98,8 @@
|
||||
brute -= brute / 2
|
||||
|
||||
if(status & ORGAN_BROKEN && prob(40) && brute)
|
||||
owner.emote("scream") //getting hit on broken hand hurts
|
||||
if (!(owner.species && (owner.species.flags & NO_PAIN)))
|
||||
owner.emote("scream") //getting hit on broken hand hurts
|
||||
if(used_weapon)
|
||||
add_autopsy_data("[used_weapon]", brute + burn)
|
||||
|
||||
@@ -138,9 +137,9 @@
|
||||
burn = max(0, burn - can_inflict)
|
||||
//If there are still hurties to dispense
|
||||
if (burn || brute)
|
||||
// if (status & ORGAN_ROBOT)
|
||||
// droplimb(1) //Robot limbs just kinda fail at full damage. //this is breaking things okay
|
||||
if (burn || brute)//else this was formerly an else. double iffing because nobody wants to fix that much spacing
|
||||
if (status & ORGAN_ROBOT)
|
||||
droplimb(1) //Robot limbs just kinda fail at full damage.
|
||||
else
|
||||
//List organs we can pass it to
|
||||
var/list/datum/organ/external/possible_points = list()
|
||||
if(parent)
|
||||
@@ -160,7 +159,7 @@
|
||||
//If limb took enough damage, try to cut or tear it off
|
||||
if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you.
|
||||
if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier)
|
||||
if( (edge && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) )
|
||||
if( (edge && prob(5 * brute)) || (brute > 20 && prob(brute)) )
|
||||
droplimb(1)
|
||||
return
|
||||
|
||||
@@ -498,10 +497,11 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
H = owner
|
||||
|
||||
for(var/datum/wound/W in wounds)
|
||||
if(W.damage_type == CUT || W.damage_type == BRUISE)
|
||||
brute_dam += W.damage
|
||||
else if(W.damage_type == BURN)
|
||||
burn_dam += W.damage
|
||||
if(!W.internal) //so IB doesn't count towards crit/paincrit
|
||||
if(W.damage_type == CUT || W.damage_type == BRUISE)
|
||||
brute_dam += W.damage
|
||||
else if(W.damage_type == BURN)
|
||||
burn_dam += W.damage
|
||||
|
||||
if(!(status & ORGAN_ROBOT) && W.bleeding() && (H && !(H.species.flags & NO_BLOOD)))
|
||||
W.bleed_timer--
|
||||
@@ -563,7 +563,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
O.setAmputatedTree()
|
||||
|
||||
//Handles dismemberment
|
||||
/datum/organ/external/proc/droplimb(var/override = 0,var/no_explode = 0)
|
||||
/datum/organ/external/proc/droplimb(var/override = 0,var/no_explode = 0,var/amputation=0)
|
||||
if(destspawn) return
|
||||
if(override)
|
||||
status |= ORGAN_DESTROYED
|
||||
@@ -580,9 +580,13 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
germ_level = 0
|
||||
|
||||
// If any organs are attached to this, destroy them
|
||||
for(var/datum/organ/external/O in children)
|
||||
O.droplimb(1, no_explode, amputation)
|
||||
|
||||
//Replace all wounds on that arm with one wound on parent organ.
|
||||
wounds.Cut()
|
||||
if (parent)
|
||||
if (parent && !amputation)
|
||||
var/datum/wound/W
|
||||
if(max_damage < 50)
|
||||
W = new/datum/wound/lost_limb/small(max_damage)
|
||||
@@ -592,22 +596,12 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
parent.update_damages()
|
||||
update_damages()
|
||||
|
||||
// If any organs are attached to this, destroy them
|
||||
for(var/datum/organ/external/O in children)
|
||||
O.droplimb(1)
|
||||
|
||||
var/obj/organ //Dropped limb object
|
||||
var/list/dropped_items
|
||||
switch(body_part)
|
||||
if(HEAD)
|
||||
if(owner.species.flags & IS_SYNTHETIC)
|
||||
organ= new /obj/item/weapon/organ/head/posi(owner.loc, owner)
|
||||
else
|
||||
organ= new /obj/item/weapon/organ/head(owner.loc, owner)
|
||||
owner.u_equip(owner.glasses)
|
||||
owner.u_equip(owner.head)
|
||||
owner.u_equip(owner.l_ear)
|
||||
owner.u_equip(owner.r_ear)
|
||||
owner.u_equip(owner.wear_mask)
|
||||
organ = new /obj/item/weapon/organ/head(owner.loc, owner)
|
||||
dropped_items = list(owner.glasses, owner.head, owner.l_ear, owner.r_ear, owner.wear_mask)
|
||||
if(ARM_RIGHT)
|
||||
if(status & ORGAN_ROBOT)
|
||||
organ = new /obj/item/robot_parts/r_arm(owner.loc)
|
||||
@@ -631,26 +625,29 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(HAND_RIGHT)
|
||||
if(!(status & ORGAN_ROBOT))
|
||||
organ= new /obj/item/weapon/organ/r_hand(owner.loc, owner)
|
||||
owner.u_equip(owner.gloves)
|
||||
dropped_items = list(owner.gloves) //should probably make it so that you can still wear gloves if you have one hand
|
||||
if(HAND_LEFT)
|
||||
if(!(status & ORGAN_ROBOT))
|
||||
organ= new /obj/item/weapon/organ/l_hand(owner.loc, owner)
|
||||
owner.u_equip(owner.gloves)
|
||||
dropped_items = list(owner.gloves)
|
||||
if(FOOT_RIGHT)
|
||||
if(!(status & ORGAN_ROBOT))
|
||||
organ= new /obj/item/weapon/organ/r_foot/(owner.loc, owner)
|
||||
owner.u_equip(owner.shoes)
|
||||
dropped_items = list(owner.shoes)
|
||||
if(FOOT_LEFT)
|
||||
if(!(status & ORGAN_ROBOT))
|
||||
organ = new /obj/item/weapon/organ/l_foot(owner.loc, owner)
|
||||
owner.u_equip(owner.shoes)
|
||||
dropped_items = list(owner.shoes)
|
||||
if(dropped_items)
|
||||
for(var/obj/O in dropped_items)
|
||||
owner.remove_from_mob(O)
|
||||
|
||||
destspawn = 1
|
||||
//Robotic limbs explode if sabotaged.
|
||||
if(status & ORGAN_ROBOT && !no_explode && sabotaged)
|
||||
owner.visible_message("\red \The [owner]'s [display_name] explodes violently!",\
|
||||
"\red <b>Your [display_name] explodes!</b>",\
|
||||
"You hear an explosion followed by a scream!")
|
||||
"You hear an explosion!")
|
||||
explosion(get_turf(owner),-1,-1,2,3)
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, owner)
|
||||
@@ -663,10 +660,9 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
"<span class='moderate'><b>Your [display_name] goes flying off!</b></span>",\
|
||||
"You hear a terrible sound of ripping tendons and flesh.")
|
||||
|
||||
if(organ)
|
||||
//Throw organs around
|
||||
var/lol = pick(cardinal)
|
||||
step(organ,lol)
|
||||
//Throw organs around
|
||||
if(istype(owner.loc,/turf) && organ)
|
||||
step(organ,pick(cardinal))
|
||||
|
||||
owner.update_body(1)
|
||||
|
||||
@@ -769,6 +765,15 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
suit.supporting_limbs |= src
|
||||
return
|
||||
|
||||
/datum/organ/external/proc/mend_fracture()
|
||||
if(status & ORGAN_ROBOT)
|
||||
return 0 //ORGAN_BROKEN doesn't have the same meaning for robot limbs
|
||||
if(brute_dam > min_broken_damage * config.organ_health_multiplier)
|
||||
return 0 //will just immediately fracture again
|
||||
|
||||
status &= ~ORGAN_BROKEN
|
||||
return 1
|
||||
|
||||
/datum/organ/external/proc/robotize()
|
||||
src.status &= ~ORGAN_BROKEN
|
||||
src.status &= ~ORGAN_BLEEDING
|
||||
@@ -816,7 +821,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
return ((status & ORGAN_BROKEN) && !(status & ORGAN_SPLINTED))
|
||||
|
||||
/datum/organ/external/proc/is_malfunctioning()
|
||||
return ((status & ORGAN_ROBOT) && prob(brute_dam + burn_dam - 11))
|
||||
return ((status & ORGAN_ROBOT) && prob(brute_dam + burn_dam))
|
||||
|
||||
//for arms and hands
|
||||
/datum/organ/external/proc/process_grasp(var/obj/item/c_hand, var/hand_name)
|
||||
@@ -825,8 +830,8 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
if(is_broken())
|
||||
owner.u_equip(c_hand)
|
||||
var/emote_scream = pick("screams in pain and", "lets out a sharp cry and", "cries out and")
|
||||
owner.emote("me", 1, "[(owner.species && owner.species.flags & NO_PAIN) ? "" : emote_scream ] drops what they were holding in their [hand_name]!")
|
||||
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
|
||||
owner.emote("me", 1, "[(owner.species && owner.species.flags & NO_PAIN) ? "" : emote_scream ]drops what they were holding in their [hand_name]!")
|
||||
if(is_malfunctioning())
|
||||
owner.u_equip(c_hand)
|
||||
owner.emote("me", 1, "drops what they were holding, their [hand_name] malfunctioning!")
|
||||
@@ -1005,6 +1010,8 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
obj/item/weapon/organ
|
||||
icon = 'icons/mob/human_races/r_human.dmi'
|
||||
var/op_stage = 0
|
||||
var/list/organs_internal = list()
|
||||
|
||||
obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
|
||||
..(loc)
|
||||
@@ -1015,9 +1022,18 @@ obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
|
||||
blood_DNA = list()
|
||||
blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
|
||||
|
||||
//Forming icon for the limb
|
||||
// Transferring over organs from the host.
|
||||
for(var/datum/organ/internal/I in H.internal_organs)
|
||||
if(I.parent_organ != name)
|
||||
continue
|
||||
var/obj/item/organ/current_organ = I.remove()
|
||||
current_organ.removed(H)
|
||||
current_organ.loc = src
|
||||
if(current_organ.organ_data)
|
||||
organs_internal |= current_organ.organ_data
|
||||
|
||||
//Setting base icon for this mob's race
|
||||
// Forming icon for the limb
|
||||
// Setting base icon for this mob's race
|
||||
var/icon/base
|
||||
if(H.species && H.species.icobase)
|
||||
base = icon(H.species.icobase)
|
||||
@@ -1038,7 +1054,7 @@ obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
|
||||
base.Blend(rgb(H.r_skin, H.g_skin, H.b_skin), ICON_ADD)
|
||||
|
||||
icon = base
|
||||
dir = SOUTH
|
||||
set_dir(SOUTH)
|
||||
src.transform = turn(src.transform, rand(70,130))
|
||||
|
||||
|
||||
@@ -1101,81 +1117,34 @@ obj/item/weapon/organ/head/New(loc, mob/living/carbon/human/H)
|
||||
hair.Blend(rgb(H.r_hair, H.g_hair, H.b_hair), ICON_ADD)
|
||||
|
||||
overlays.Add(hair) //icon.Blend(hair, ICON_OVERLAY)
|
||||
spawn(5)
|
||||
if(brainmob && brainmob.client)
|
||||
brainmob.client.screen.len = null //clear the hud
|
||||
|
||||
//if(ishuman(H))
|
||||
// if(H.gender == FEMALE)
|
||||
// H.icon_state = "head_f"
|
||||
// H.overlays += H.generate_head_icon()
|
||||
transfer_identity(H)
|
||||
|
||||
name = "[H.real_name]'s head"
|
||||
|
||||
H.regenerate_icons()
|
||||
|
||||
brainmob.stat = 2
|
||||
brainmob.death()
|
||||
|
||||
obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head
|
||||
brainmob = new(src)
|
||||
brainmob.name = H.real_name
|
||||
brainmob.real_name = H.real_name
|
||||
brainmob.dna = H.dna.Clone()
|
||||
if(H.mind)
|
||||
H.mind.transfer_to(brainmob)
|
||||
brainmob.container = src
|
||||
|
||||
obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/scalpel))
|
||||
switch(brain_op_stage)
|
||||
if(0)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] is beginning to have \his head cut open with [W] by [user].", 1)
|
||||
brainmob << "\red [user] begins to cut open your head with [W]!"
|
||||
user << "\red You cut [brainmob]'s head open with [W]!"
|
||||
|
||||
brain_op_stage = 1
|
||||
|
||||
if(2)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] is having \his connections to the brain delicately severed with [W] by [user].", 1)
|
||||
brainmob << "\red [user] begins to cut open your head with [W]!"
|
||||
user << "\red You cut [brainmob]'s head open with [W]!"
|
||||
|
||||
brain_op_stage = 3.0
|
||||
else
|
||||
..()
|
||||
else if(istype(W,/obj/item/weapon/circular_saw))
|
||||
switch(brain_op_stage)
|
||||
if(1)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] has \his head sawed open with [W] by [user].", 1)
|
||||
brainmob << "\red [user] begins to saw open your head with [W]!"
|
||||
user << "\red You saw [brainmob]'s head open with [W]!"
|
||||
|
||||
brain_op_stage = 2
|
||||
if(3)
|
||||
for(var/mob/O in (oviewers(brainmob) - user))
|
||||
O.show_message("\red [brainmob] has \his spine's connection to the brain severed with [W] by [user].", 1)
|
||||
brainmob << "\red [user] severs your brain's connection to the spine with [W]!"
|
||||
user << "\red You sever [brainmob]'s brain's connection to the spine with [W]!"
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [brainmob.name] ([brainmob.ckey]) with [W.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
brainmob.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [W.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
msg_admin_attack("[key_name_admin(user)] debrained [key_name_admin(brainmob)] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
//TODO: ORGAN REMOVAL UPDATE.
|
||||
if(istype(src,/obj/item/weapon/organ/head/posi))
|
||||
var/obj/item/device/mmi/posibrain/B = new(loc)
|
||||
B.transfer_identity(brainmob)
|
||||
obj/item/weapon/organ/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
switch(op_stage)
|
||||
if(0)
|
||||
if(istype(W,/obj/item/weapon/scalpel))
|
||||
user.visible_message("<span class='danger'><b>[user]</b> cuts [src] open with [W]!")
|
||||
op_stage++
|
||||
return
|
||||
if(1)
|
||||
if(istype(W,/obj/item/weapon/retractor))
|
||||
user.visible_message("<span class='danger'><b>[user]</b> cracks [src] open like an egg with [W]!")
|
||||
op_stage++
|
||||
return
|
||||
if(2)
|
||||
if(istype(W,/obj/item/weapon/hemostat))
|
||||
if(contents.len)
|
||||
var/obj/item/removing = pick(contents)
|
||||
removing.loc = get_turf(user.loc)
|
||||
if(!(user.l_hand && user.r_hand))
|
||||
user.put_in_hands(removing)
|
||||
if(istype(removing,/obj/item/organ))
|
||||
var/obj/item/organ/removed_organ = removing
|
||||
organs_internal -= removed_organ.organ_data
|
||||
user.visible_message("<span class='danger'><b>[user]</b> extracts [removing] from [src] with [W]!")
|
||||
else
|
||||
var/obj/item/organ/brain/B = new(loc)
|
||||
B.transfer_identity(brainmob)
|
||||
|
||||
brain_op_stage = 4.0
|
||||
else
|
||||
..()
|
||||
else
|
||||
..()
|
||||
user.visible_message("<span class='danger'><b>[user]</b> fishes around fruitlessly in [src] with [W].")
|
||||
return
|
||||
..()
|
||||
@@ -16,6 +16,7 @@
|
||||
var/rejecting // Is this organ already being rejected?
|
||||
var/obj/item/organ/organ_holder // If not in a body, held in this item.
|
||||
var/list/transplant_data
|
||||
|
||||
/datum/organ/internal/proc/rejuvenate()
|
||||
damage=0
|
||||
|
||||
@@ -40,8 +41,8 @@
|
||||
E.internal_organs |= src
|
||||
|
||||
/datum/organ/internal/process()
|
||||
//Process infections
|
||||
|
||||
//Process infections
|
||||
if (robotic >= 2 || (owner.species && owner.species.flags & IS_PLANT)) //TODO make robotic internal and external organs separate types of organ instead of a flag
|
||||
germ_level = 0
|
||||
return
|
||||
@@ -149,8 +150,6 @@
|
||||
name = "lungs"
|
||||
parent_organ = "chest"
|
||||
removed_type = /obj/item/organ/lungs
|
||||
min_bruised_damage = 15
|
||||
min_broken_damage = 20
|
||||
|
||||
process()
|
||||
..()
|
||||
@@ -164,7 +163,9 @@
|
||||
owner.drip(10)
|
||||
if(prob(4))
|
||||
spawn owner.emote("me", 1, "gasps for air!")
|
||||
owner.losebreath += 15
|
||||
owner.losebreath += 6
|
||||
if(is_broken())
|
||||
owner.losebreath +=5
|
||||
|
||||
/datum/organ/internal/liver
|
||||
name = "liver"
|
||||
@@ -172,7 +173,9 @@
|
||||
removed_type = /obj/item/organ/liver
|
||||
|
||||
process()
|
||||
|
||||
..()
|
||||
|
||||
if (germ_level > INFECTION_LEVEL_ONE)
|
||||
if(prob(1))
|
||||
owner << "\red Your skin itches."
|
||||
@@ -271,7 +274,13 @@
|
||||
|
||||
if(!removed_type) return 0
|
||||
|
||||
var/obj/item/organ/removed_organ = new removed_type(get_turf(user))
|
||||
var/turf/target_loc
|
||||
if(user)
|
||||
target_loc = get_turf(user)
|
||||
else
|
||||
target_loc = get_turf(owner)
|
||||
|
||||
var/obj/item/organ/removed_organ = new removed_type(target_loc)
|
||||
|
||||
if(istype(removed_organ))
|
||||
removed_organ.organ_data = src
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
/obj/item/organ/proc/update()
|
||||
|
||||
if(!organ_data)
|
||||
organ_data = new /datum/organ/internal()
|
||||
organ_data = new organ_type()
|
||||
|
||||
if(robotic)
|
||||
organ_data.robotic = robotic
|
||||
@@ -93,6 +93,7 @@
|
||||
organ_tag = "heart"
|
||||
fresh = 6 // Juicy.
|
||||
dead_icon = "heart-off"
|
||||
organ_type = /datum/organ/internal/heart
|
||||
|
||||
/obj/item/organ/lungs
|
||||
name = "lungs"
|
||||
@@ -101,6 +102,7 @@
|
||||
prosthetic_name = "gas exchange system"
|
||||
prosthetic_icon = "lungs-prosthetic"
|
||||
organ_tag = "lungs"
|
||||
organ_type = /datum/organ/internal/lungs
|
||||
|
||||
/obj/item/organ/kidneys
|
||||
name = "kidneys"
|
||||
@@ -109,6 +111,7 @@
|
||||
prosthetic_name = "prosthetic kidneys"
|
||||
prosthetic_icon = "kidneys-prosthetic"
|
||||
organ_tag = "kidneys"
|
||||
organ_type = /datum/organ/internal/kidney
|
||||
|
||||
/obj/item/organ/eyes
|
||||
name = "eyeballs"
|
||||
@@ -117,7 +120,7 @@
|
||||
prosthetic_name = "visual prosthesis"
|
||||
prosthetic_icon = "eyes-prosthetic"
|
||||
organ_tag = "eyes"
|
||||
|
||||
organ_type = /datum/organ/internal/eyes
|
||||
var/eye_colour
|
||||
|
||||
/obj/item/organ/liver
|
||||
@@ -126,11 +129,13 @@
|
||||
prosthetic_name = "toxin filter"
|
||||
prosthetic_icon = "liver-prosthetic"
|
||||
organ_tag = "liver"
|
||||
organ_type = /datum/organ/internal/liver
|
||||
|
||||
/obj/item/organ/appendix
|
||||
name = "appendix"
|
||||
icon_state = "appendix"
|
||||
organ_tag = "appendix"
|
||||
organ_type = /datum/organ/internal/appendix
|
||||
|
||||
//These are here so they can be printed out via the fabricator.
|
||||
/obj/item/organ/heart/prosthetic
|
||||
@@ -151,15 +156,28 @@
|
||||
/obj/item/organ/appendix
|
||||
name = "appendix"
|
||||
|
||||
/obj/item/organ/proc/removed(var/mob/living/target,var/mob/living/user)
|
||||
/obj/item/organ/proc/removed(var/mob/living/carbon/human/target,var/mob/living/user)
|
||||
|
||||
if(!target || !user)
|
||||
if(!istype(target) || !organ_data)
|
||||
return
|
||||
|
||||
if(organ_data.vital)
|
||||
target.internal_organs_by_name[organ_tag] = null
|
||||
target.internal_organs_by_name -= organ_tag
|
||||
target.internal_organs -= organ_data
|
||||
|
||||
var/datum/organ/external/affected = target.get_organ(organ_data.parent_organ)
|
||||
affected.internal_organs -= organ_data
|
||||
|
||||
loc = target.loc
|
||||
organ_data.rejecting = null
|
||||
var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list
|
||||
if(!organ_blood || !organ_blood.data["blood_DNA"])
|
||||
target.vessel.trans_to(src, 5, 1, 1)
|
||||
|
||||
if(target && user && organ_data.vital)
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> removed a vital organ ([src]) from [target.name] ([target.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
target.attack_log += "\[[time_stamp()]\]<font color='orange'> had a vital organ ([src]) removed by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
msg_admin_attack("[key_name_admin(user)] removed a vital organ ([src]) from [key_name_admin(target)] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) removed a vital organ ([src]) from [target.name] ([target.ckey]) (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
target.death()
|
||||
|
||||
/obj/item/organ/appendix/removed(var/mob/living/target,var/mob/living/user)
|
||||
@@ -196,18 +214,40 @@
|
||||
H.b_eyes = 0
|
||||
H.update_body()
|
||||
|
||||
/obj/item/organ/proc/replaced(var/mob/living/target)
|
||||
return
|
||||
/obj/item/organ/proc/replaced(var/mob/living/carbon/human/target,var/datum/organ/external/affected)
|
||||
|
||||
/obj/item/organ/eyes/replaced(var/mob/living/target)
|
||||
if(!istype(target)) return
|
||||
|
||||
var/datum/reagent/blood/transplant_blood = locate(/datum/reagent/blood) in reagents.reagent_list
|
||||
if(!transplant_blood)
|
||||
organ_data.transplant_data = list()
|
||||
organ_data.transplant_data["species"] = target.species.name
|
||||
organ_data.transplant_data["blood_type"] = target.dna.b_type
|
||||
organ_data.transplant_data["blood_DNA"] = target.dna.unique_enzymes
|
||||
else
|
||||
organ_data.transplant_data = list()
|
||||
organ_data.transplant_data["species"] = transplant_blood.data["species"]
|
||||
organ_data.transplant_data["blood_type"] = transplant_blood.data["blood_type"]
|
||||
organ_data.transplant_data["blood_DNA"] = transplant_blood.data["blood_DNA"]
|
||||
|
||||
organ_data.organ_holder = null
|
||||
organ_data.owner = target
|
||||
target.internal_organs |= organ_data
|
||||
affected.internal_organs |= organ_data
|
||||
target.internal_organs_by_name[organ_tag] = organ_data
|
||||
organ_data.status |= ORGAN_CUT_AWAY
|
||||
|
||||
del(src)
|
||||
|
||||
/obj/item/organ/eyes/replaced(var/mob/living/carbon/human/target)
|
||||
|
||||
// Apply our eye colour to the target.
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(istype(H) && eye_colour)
|
||||
H.r_eyes = eye_colour[1]
|
||||
H.g_eyes = eye_colour[2]
|
||||
H.b_eyes = eye_colour[3]
|
||||
H.update_body()
|
||||
if(istype(target) && eye_colour)
|
||||
target.r_eyes = eye_colour[1]
|
||||
target.g_eyes = eye_colour[2]
|
||||
target.b_eyes = eye_colour[3]
|
||||
target.update_body()
|
||||
..()
|
||||
|
||||
/obj/item/organ/proc/bitten(mob/user)
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
idle_power_usage = 0
|
||||
active_power_usage = 0
|
||||
|
||||
interact_offline = 1
|
||||
|
||||
/obj/machinery/power/Del()
|
||||
disconnect_from_network()
|
||||
..()
|
||||
@@ -72,16 +74,17 @@
|
||||
/obj/machinery/proc/power_change(var/area/master_area = null) // called whenever the power settings of the containing area change
|
||||
// by default, check equipment channel & set flag
|
||||
// can override if needed
|
||||
var/has_power
|
||||
if (master_area)
|
||||
has_power = master_area.powered(power_channel)
|
||||
else
|
||||
has_power = powered(power_channel)
|
||||
|
||||
if(has_power)
|
||||
// var/has_power
|
||||
// if (master_area)
|
||||
// has_power = master_area.powered(power_channel)
|
||||
// else
|
||||
// has_power = powered(power_channel)
|
||||
//
|
||||
if(powered(power_channel))
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
stat |= NOPOWER
|
||||
return
|
||||
|
||||
// the powernet datum
|
||||
// each contiguous network of cables & nodes
|
||||
@@ -270,8 +273,8 @@
|
||||
//No animations will be performed by this proc.
|
||||
/proc/electrocute_mob(mob/living/carbon/M as mob, var/power_source, var/obj/source, var/siemens_coeff = 1.0)
|
||||
if(istype(M.loc,/obj/mecha)) return 0 //feckin mechs are dumb
|
||||
|
||||
//This is for performance optimization only.
|
||||
|
||||
//This is for performance optimization only.
|
||||
//DO NOT modify siemens_coeff here. That is checked in human/electrocute_act()
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
@@ -167,11 +167,13 @@
|
||||
in_chamber.loc = get_turf(user)
|
||||
in_chamber.starting = get_turf(user)
|
||||
in_chamber.shot_from = src
|
||||
user.next_move = world.time + 4
|
||||
in_chamber.silenced = silenced
|
||||
in_chamber.current = curloc
|
||||
in_chamber.yo = targloc.y - curloc.y
|
||||
in_chamber.xo = targloc.x - curloc.x
|
||||
|
||||
user.AllowedToClickAgainAfter(CLICK_CD_RANGE) //
|
||||
|
||||
if(istype(user, /mob/living/carbon))
|
||||
var/mob/living/carbon/mob = user
|
||||
if(mob.shock_stage > 120)
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
..()
|
||||
reagents.add_reagent("tea", 30)
|
||||
src.pixel_x = rand(-10.0, 10)
|
||||
src.pixel_y = rand(-10.0, 10)
|
||||
src.pixel_y = rand(0, 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/ice
|
||||
name = "Ice Cup"
|
||||
|
||||
@@ -769,11 +769,13 @@
|
||||
if(T.intact && istype(T,/turf/simulated/floor)) //intact floor, pop the tile
|
||||
var/turf/simulated/floor/F = T
|
||||
//F.health = 100
|
||||
F.burnt = 1
|
||||
F.intact = 0
|
||||
F.levelupdate()
|
||||
new /obj/item/stack/tile(H) // add to holder so it will be thrown with other stuff
|
||||
F.icon_state = "Floor[F.burnt ? "1" : ""]"
|
||||
if(F.floor_tile)
|
||||
F.burnt = 1
|
||||
F.intact = 0
|
||||
F.levelupdate()
|
||||
new F.floor_tile.type(H) // add to holder so it will be thrown with other stuff
|
||||
F.make_plating()
|
||||
F.icon_state = "Floor[F.burnt ? "1" : ""]"
|
||||
|
||||
if(direction) // direction is specified
|
||||
if(istype(T, /turf/space)) // if ended in space, then range is unlimited
|
||||
|
||||
+14
-1
@@ -11,7 +11,12 @@
|
||||
for (var/obj/item/weapon/cell/D in R.contents)
|
||||
D.charge += rand() * 100 + 50
|
||||
R << "\blue SYSTEM ALERT: Large energy boost detected!"
|
||||
return 1
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H.nutrition += rand() * 100 + 50
|
||||
H << "\blue Your batteries gain a quick boost of energy!"
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/cellcharge/DoEffectAura()
|
||||
if(holder)
|
||||
@@ -24,6 +29,10 @@
|
||||
for (var/obj/item/weapon/cell/D in M.contents)
|
||||
D.charge += 25
|
||||
M << "\blue SYSTEM ALERT: Energy boost detected!"
|
||||
for (var/mob/living/carbon/human/H in range(effectrange,holder))
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H.nutrition += 25
|
||||
H << "\blue Your batteries gain a quick boost of energy!"
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/cellcharge/DoEffectPulse()
|
||||
@@ -37,4 +46,8 @@
|
||||
for (var/obj/item/weapon/cell/D in M.contents)
|
||||
D.charge += rand() * 100
|
||||
M << "\blue SYSTEM ALERT: Energy boost detected!"
|
||||
for (var/mob/living/carbon/human/H in range(effectrange,holder))
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H.nutrition += rand() * 100
|
||||
H << "\blue Your batteries gain a quick boost of energy!"
|
||||
return 1
|
||||
|
||||
@@ -11,8 +11,11 @@
|
||||
for (var/obj/item/weapon/cell/D in R.contents)
|
||||
D.charge = max(D.charge - rand() * 100, 0)
|
||||
R << "\blue SYSTEM ALERT: Energy drain detected!"
|
||||
return 1
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H.nutrition += rand() * 100 + 50
|
||||
H << "\red You feel your batteries draining."
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/celldrain/DoEffectAura()
|
||||
@@ -26,6 +29,10 @@
|
||||
for (var/obj/item/weapon/cell/D in M.contents)
|
||||
D.charge = max(D.charge - 50,0)
|
||||
M << "\red SYSTEM ALERT: Energy drain detected!"
|
||||
for (var/mob/living/carbon/human/H in range(effectrange,holder))
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H.nutrition -= 25
|
||||
H << "\red You feel your batteries draining."
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/celldrain/DoEffectPulse()
|
||||
@@ -39,4 +46,8 @@
|
||||
for (var/obj/item/weapon/cell/D in M.contents)
|
||||
D.charge = max(D.charge - rand() * 150,0)
|
||||
M << "\red SYSTEM ALERT: Energy drain detected!"
|
||||
for (var/mob/living/carbon/human/H in range(effectrange,holder))
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H.nutrition -= rand() * 100
|
||||
H << "\red You feel your batteries draining."
|
||||
return 1
|
||||
|
||||
@@ -15,7 +15,10 @@
|
||||
/datum/artifact_effect/dnaswitch/DoEffectTouch(var/mob/toucher)
|
||||
var/weakness = GetAnomalySusceptibility(toucher)
|
||||
if(ishuman(toucher) && prob(weakness * 100))
|
||||
toucher << pick("\green You feel a little different.",\
|
||||
var/mob/living/carbon/human/H = toucher
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
return 1
|
||||
H << pick("\green You feel a little different.",\
|
||||
"\green You feel very strange.",\
|
||||
"\green Your stomach churns.",\
|
||||
"\green Your skin feels loose.",\
|
||||
@@ -23,15 +26,17 @@
|
||||
"\green You feel a tingling sensation in your chest.",\
|
||||
"\green Your entire body vibrates.")
|
||||
if(prob(75))
|
||||
scramble(1, toucher, weakness * severity)
|
||||
scramble(1, H, weakness * severity)
|
||||
else
|
||||
scramble(0, toucher, weakness * severity)
|
||||
scramble(0, H, weakness * severity)
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/dnaswitch/DoEffectAura()
|
||||
if(holder)
|
||||
for(var/mob/living/carbon/human/H in range(src.effectrange,holder))
|
||||
var/weakness = GetAnomalySusceptibility(H)
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
return 1
|
||||
if(prob(weakness * 100))
|
||||
if(prob(30))
|
||||
H << pick("\green You feel a little different.",\
|
||||
@@ -50,6 +55,8 @@
|
||||
if(holder)
|
||||
for(var/mob/living/carbon/human/H in range(200, holder))
|
||||
var/weakness = GetAnomalySusceptibility(H)
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
return 1
|
||||
if(prob(weakness * 100))
|
||||
if(prob(75))
|
||||
H << pick("\green You feel a little different.",\
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
if(ishuman(toucher))
|
||||
var/mob/living/carbon/human/H = toucher
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
return 1
|
||||
for(var/datum/organ/external/affecting in H.organs)
|
||||
if(affecting && istype(affecting))
|
||||
affecting.heal_damage(25 * weakness, 25 * weakness)
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
var/weakness = GetAnomalySusceptibility(toucher)
|
||||
if(iscarbon(toucher) && prob(weakness * 100))
|
||||
var/mob/living/carbon/C = toucher
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
return 1
|
||||
C << "\red A painful discharge of energy strikes you!"
|
||||
C.adjustOxyLoss(rand(5,25) * weakness)
|
||||
C.adjustToxLoss(rand(5,25) * weakness)
|
||||
@@ -24,6 +28,10 @@
|
||||
for (var/mob/living/carbon/C in range(src.effectrange,holder))
|
||||
var/weakness = GetAnomalySusceptibility(C)
|
||||
if(prob(weakness * 100))
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
return 1
|
||||
if(prob(10))
|
||||
C << "\red You feel a painful force radiating from something nearby."
|
||||
C.adjustBruteLoss(1 * weakness)
|
||||
@@ -38,6 +46,10 @@
|
||||
for (var/mob/living/carbon/C in range(effectrange, holder))
|
||||
var/weakness = GetAnomalySusceptibility(C)
|
||||
if(prob(weakness * 100))
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
return 1
|
||||
C << "\red A wave of painful energy strikes you!"
|
||||
C.adjustBruteLoss(3 * weakness)
|
||||
C.adjustFireLoss(3 * weakness)
|
||||
|
||||
@@ -14,6 +14,13 @@
|
||||
R.adjustBruteLoss(rand(-10,-30))
|
||||
R.adjustFireLoss(rand(-10,-30))
|
||||
return 1
|
||||
if (ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << "\blue The damage to your body appears to be mending itself."
|
||||
H.adjustBruteLoss(rand(-10,-30))
|
||||
H.adjustFireLoss(rand(-10,-30))
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/roboheal/DoEffectAura()
|
||||
if(holder)
|
||||
@@ -23,6 +30,12 @@
|
||||
M.adjustBruteLoss(-1)
|
||||
M.adjustFireLoss(-1)
|
||||
M.updatehealth()
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,holder))
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << "\blue The damage to your body appears to be mending itself."
|
||||
H.adjustBruteLoss(-1)
|
||||
H.adjustFireLoss(-1)
|
||||
H.updatehealth()
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/roboheal/DoEffectPulse()
|
||||
@@ -32,4 +45,10 @@
|
||||
M.adjustBruteLoss(-10)
|
||||
M.adjustFireLoss(-10)
|
||||
M.updatehealth()
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,holder))
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << "\blue The damage to your body appears to be mending itself."
|
||||
H.adjustBruteLoss(-10)
|
||||
H.adjustFireLoss(-10)
|
||||
H.updatehealth()
|
||||
return 1
|
||||
|
||||
@@ -14,6 +14,13 @@
|
||||
R.adjustBruteLoss(rand(10,50))
|
||||
R.adjustFireLoss(rand(10,50))
|
||||
return 1
|
||||
if (ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << "\red The metal chassis of your body starts to crumple and heat up!"
|
||||
H.adjustBruteLoss(rand(10,50))
|
||||
H.adjustFireLoss(rand(10, 50))
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/robohurt/DoEffectAura()
|
||||
if(holder)
|
||||
@@ -22,6 +29,12 @@
|
||||
M.adjustBruteLoss(1)
|
||||
M.adjustFireLoss(1)
|
||||
M.updatehealth()
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,holder))
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
if(prob(10)) H << "\red Your screen flickers and your servos buzz."
|
||||
H.adjustBruteLoss(1)
|
||||
H.adjustFireLoss(1)
|
||||
H.updatehealth()
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/robohurt/DoEffectPulse()
|
||||
@@ -31,4 +44,10 @@
|
||||
M.adjustBruteLoss(10)
|
||||
M.adjustFireLoss(10)
|
||||
M.updatehealth()
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,holder))
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << "\red Your screen flickers and your servos buzz."
|
||||
H.adjustBruteLoss(10)
|
||||
H.adjustFireLoss(10)
|
||||
H.updatehealth()
|
||||
return 1
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
var/weakness = GetAnomalySusceptibility(toucher)
|
||||
if(ishuman(toucher) && prob(weakness * 100))
|
||||
var/mob/living/carbon/human/H = toucher
|
||||
H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << pick("\blue Your core processor begins to slow down.","\blue Your sensory input begins to slow down.")
|
||||
else
|
||||
H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
|
||||
H.drowsyness = min(H.drowsyness + rand(5,25) * weakness, 50 * weakness)
|
||||
H.eye_blurry = min(H.eye_blurry + rand(1,3) * weakness, 50 * weakness)
|
||||
return 1
|
||||
@@ -26,7 +29,10 @@
|
||||
var/weakness = GetAnomalySusceptibility(H)
|
||||
if(prob(weakness * 100))
|
||||
if(prob(10))
|
||||
H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << pick("\blue Your core processor begins to slow down.","\blue Your sensory input begins to slow down.")
|
||||
else
|
||||
H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
|
||||
H.drowsyness = min(H.drowsyness + 1 * weakness, 25 * weakness)
|
||||
H.eye_blurry = min(H.eye_blurry + 1 * weakness, 25 * weakness)
|
||||
for (var/mob/living/silicon/robot/R in range(src.effectrange,holder))
|
||||
@@ -36,9 +42,13 @@
|
||||
/datum/artifact_effect/sleepy/DoEffectPulse()
|
||||
if(holder)
|
||||
for(var/mob/living/carbon/human/H in range(src.effectrange, holder))
|
||||
|
||||
var/weakness = GetAnomalySusceptibility(H)
|
||||
if(prob(weakness * 100))
|
||||
H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << pick("\blue Your core processor begins to slow down.","\blue Your sensory input begins to slow down.")
|
||||
else
|
||||
H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
|
||||
H.drowsyness = min(H.drowsyness + rand(5,15) * weakness, 50 * weakness)
|
||||
H.eye_blurry = min(H.eye_blurry + rand(5,15) * weakness, 50 * weakness)
|
||||
for (var/mob/living/silicon/robot/R in range(src.effectrange,holder))
|
||||
|
||||
@@ -70,6 +70,11 @@
|
||||
S.sample_item(src, user)
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/weapon/hand_labeler/))
|
||||
var/obj/item/weapon/hand_labeler/HL = W
|
||||
HL.afterattack(src, user)
|
||||
return
|
||||
|
||||
..()
|
||||
if(prob(33))
|
||||
src.visible_message("<span class='warning'>[src] crumbles away, leaving some dust and gravel behind.</span>")
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
//Procedures in this file: Appendectomy
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// APPENDECTOMY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/appendectomy/
|
||||
priority = 2
|
||||
can_infect = 1
|
||||
blood_level = 1
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
if (target_zone != "groin")
|
||||
return 0
|
||||
var/datum/organ/external/groin = target.get_organ("groin")
|
||||
if (!groin)
|
||||
return 0
|
||||
if (groin.open < 2)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/surgery_step/appendectomy/cut_appendix
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/scalpel = 100, \
|
||||
/obj/item/weapon/kitchenknife = 75, \
|
||||
/obj/item/weapon/shard = 50, \
|
||||
)
|
||||
|
||||
min_duration = 70
|
||||
max_duration = 90
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.appendix == 0
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts to separate [target]'s appendix from the abdominal wall with \the [tool].", \
|
||||
"You start to separate [target]'s appendix from the abdominal wall with \the [tool]." )
|
||||
target.custom_pain("The pain in your abdomen is living hell!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has separated [target]'s appendix with \the [tool]." , \
|
||||
"\blue You have separated [target]'s appendix with \the [tool].")
|
||||
target.op_stage.appendix = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/groin = target.get_organ("groin")
|
||||
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!", \
|
||||
"\red Your hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!")
|
||||
groin.createwound(CUT, 50, 1)
|
||||
|
||||
/datum/surgery_step/appendectomy/remove_appendix
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/weapon/wirecutters = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
|
||||
min_duration = 60
|
||||
max_duration = 80
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.appendix == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts removing [target]'s appendix with \the [tool].", \
|
||||
"You start removing [target]'s appendix with \the [tool].")
|
||||
target.custom_pain("Someone's ripping out your bowels!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has removed [target]'s appendix with \the [tool].", \
|
||||
"\blue You have removed [target]'s appendix with \the [tool].")
|
||||
var/app = 0
|
||||
for(var/datum/disease/appendicitis/appendicitis in target.viruses)
|
||||
app = 1
|
||||
appendicitis.cure()
|
||||
target.resistances += appendicitis
|
||||
if (app)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed(get_turf(target))
|
||||
else
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(target))
|
||||
target.op_stage.appendix = 2
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, nicking internal organs in [target]'s abdomen with \the [tool]!", \
|
||||
"\red Your hand slips, nicking internal organs in [target]'s abdomen with \the [tool]!")
|
||||
affected.createwound(BRUISE, 20)
|
||||
@@ -1,279 +0,0 @@
|
||||
//Procedures in this file: Brain extraction. Brain fixing. Slime Core extraction.
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// BRAIN SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/brain/
|
||||
priority = 2
|
||||
blood_level = 1
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return target_zone == "head" && hasorgans(target)
|
||||
|
||||
/datum/surgery_step/brain/saw_skull
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/circular_saw = 100, \
|
||||
/obj/item/weapon/hatchet = 75
|
||||
)
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target_zone == "head" && target.brain_op_stage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] begins to cut through [target]'s skull with \the [tool].", \
|
||||
"You begin to cut through [target]'s skull with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has cut [target]'s skull open with \the [tool].", \
|
||||
"\blue You have cut [target]'s skull open with \the [tool].")
|
||||
target.brain_op_stage = 2
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, cracking [target]'s skull with \the [tool]!" , \
|
||||
"\red Your hand slips, cracking [target]'s skull with \the [tool]!" )
|
||||
target.apply_damage(max(10, tool.force), BRUTE, "head")
|
||||
|
||||
/datum/surgery_step/brain/cut_brain
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/scalpel = 100, \
|
||||
/obj/item/weapon/kitchenknife = 75, \
|
||||
/obj/item/weapon/shard = 50, \
|
||||
)
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts separating connections to [target]'s brain with \the [tool].", \
|
||||
"You start separating connections to [target]'s brain with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] separates connections to [target]'s brain with \the [tool].", \
|
||||
"\blue You separate connections to [target]'s brain with \the [tool].")
|
||||
target.brain_op_stage = 3
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
|
||||
"\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
|
||||
target.apply_damage(50, BRUTE, "head", 1, sharp=1)
|
||||
|
||||
/datum/surgery_step/brain/saw_spine
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/circular_saw = 100, \
|
||||
/obj/item/weapon/hatchet = 75
|
||||
)
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 3
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts separating [target]'s brain from \his spine with \the [tool].", \
|
||||
"You start separating [target]'s brain from spine with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] separates [target]'s brain from \his spine with \the [tool].", \
|
||||
"\blue You separate [target]'s brain from spine with \the [tool].")
|
||||
|
||||
var/mob/living/simple_animal/borer/borer = target.has_brain_worms()
|
||||
|
||||
if(borer)
|
||||
borer.detatch() //Should remove borer if the brain is removed - RR
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
target.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
msg_admin_attack("[key_name_admin(user)] debrained [key_name_admin(target)] with [tool.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
var/mob/living/carbon/human/H
|
||||
if(istype(target,/mob/living/carbon/human))
|
||||
H = target
|
||||
|
||||
var/obj/item/brain/B
|
||||
if(H && H.species && H.species.flags & IS_SYNTHETIC)
|
||||
var/obj/item/device/mmi/posibrain/P = new(target.loc)
|
||||
P.transfer_identity(target)
|
||||
else
|
||||
B = new(target.loc)
|
||||
B.transfer_identity(target)
|
||||
|
||||
target.internal_organs -= B
|
||||
target.internal_organs_by_name -= "brain"
|
||||
|
||||
target:brain_op_stage = 4.0
|
||||
target.death()//You want them to die after the brain was transferred, so not to trigger client death() twice.
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \
|
||||
"\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!")
|
||||
target.apply_damage(30, BRUTE, "head", 1, sharp=1)
|
||||
if (ishuman(user))
|
||||
user:bloody_body(target)
|
||||
user:bloody_hands(target, 0)
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// BRAIN DAMAGE FIXING //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/brain/bone_chips
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/weapon/wirecutters = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts taking bone chips out of [target]'s brain with \the [tool].", \
|
||||
"You start taking bone chips out of [target]'s brain with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] takes out all the bone chips in [target]'s brain with \the [tool].", \
|
||||
"\blue You take out all the bone chips in [target]'s brain with \the [tool].")
|
||||
target.brain_op_stage = 3
|
||||
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, jabbing \the [tool] in [target]'s brain!", \
|
||||
"\red Your hand slips, jabbing \the [tool] in [target]'s brain!")
|
||||
target.apply_damage(30, BRUTE, "head", 1, sharp=1)
|
||||
|
||||
/datum/surgery_step/brain/hematoma
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/FixOVein = 100, \
|
||||
/obj/item/weapon/cable_coil = 75
|
||||
)
|
||||
|
||||
min_duration = 90
|
||||
max_duration = 110
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 3
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts mending hematoma in [target]'s brain with \the [tool].", \
|
||||
"You start mending hematoma in [target]'s brain with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] mends hematoma in [target]'s brain with \the [tool].", \
|
||||
"\blue You mend hematoma in [target]'s brain with \the [tool].")
|
||||
var/datum/organ/internal/brain/sponge = target.internal_organs_by_name["brain"]
|
||||
if (sponge)
|
||||
sponge.damage = 0
|
||||
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, bruising [target]'s brain with \the [tool]!", \
|
||||
"\red Your hand slips, bruising [target]'s brain with \the [tool]!")
|
||||
target.apply_damage(20, BRUTE, "head", 1, sharp=1)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// SLIME CORE EXTRACTION //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/surgery_step/slime
|
||||
is_valid_target(mob/living/carbon/slime/target)
|
||||
return istype(target, /mob/living/carbon/slime/)
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
return target.stat == 2
|
||||
|
||||
/datum/surgery_step/slime/cut_flesh
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/scalpel = 100, \
|
||||
/obj/item/weapon/kitchenknife = 75, \
|
||||
/obj/item/weapon/shard = 50, \
|
||||
)
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 50
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 0
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts cutting through [target]'s flesh with \the [tool].", \
|
||||
"You start cutting through [target]'s flesh with \the [tool].")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] cuts through [target]'s flesh with \the [tool].", \
|
||||
"\blue You cut through [target]'s flesh with \the [tool], revealing its silky innards.")
|
||||
target.brain_op_stage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, tearing [target]'s flesh with \the [tool]!", \
|
||||
"\red Your hand slips, tearing [target]'s flesh with \the [tool]!")
|
||||
|
||||
/datum/surgery_step/slime/cut_innards
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/scalpel = 100, \
|
||||
/obj/item/weapon/kitchenknife = 75, \
|
||||
/obj/item/weapon/shard = 50, \
|
||||
)
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 50
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts cutting [target]'s silky innards apart with \the [tool].", \
|
||||
"You start cutting [target]'s silky innards apart with \the [tool].")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] cuts [target]'s innards apart with \the [tool], exposing the cores.", \
|
||||
"\blue You cut [target]'s innards apart with \the [tool], exposing the cores.")
|
||||
target.brain_op_stage = 2
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, tearing [target]'s innards with \the [tool]!", \
|
||||
"\red Your hand slips, tearing [target]'s innards with \the [tool]!")
|
||||
|
||||
/datum/surgery_step/slime/saw_core
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/circular_saw = 100, \
|
||||
/obj/item/weapon/hatchet = 75
|
||||
)
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
return ..() && target.brain_op_stage == 2 && target.cores > 0
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts cutting out one of [target]'s cores with \the [tool].", \
|
||||
"You start cutting out one of [target]'s cores with \the [tool].")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
target.cores--
|
||||
user.visible_message("\blue [user] cuts out one of [target]'s cores with \the [tool].",, \
|
||||
"\blue You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.")
|
||||
|
||||
if(target.cores >= 0)
|
||||
new target.coretype(target.loc)
|
||||
if(target.cores <= 0)
|
||||
target.icon_state = "[target.colour] baby slime dead-nocore"
|
||||
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, causing \him to miss the core!", \
|
||||
"\red Your hand slips, causing you to miss the core!")
|
||||
@@ -59,8 +59,6 @@
|
||||
affected.createwound(CUT, 1)
|
||||
affected.clamp()
|
||||
spread_germs_to_organ(affected, user)
|
||||
// if (target_zone == "head")
|
||||
// target.brain_op_stage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -101,8 +99,6 @@
|
||||
affected.createwound(CUT, 1)
|
||||
affected.clamp()
|
||||
affected.open = 2
|
||||
// if (target_zone == "head")
|
||||
// target.brain_op_stage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -143,8 +139,6 @@
|
||||
affected.status |= ORGAN_BLEEDING
|
||||
|
||||
affected.createwound(CUT, 1)
|
||||
// if (target_zone == "head")
|
||||
// target.brain_op_stage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -311,7 +305,7 @@
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] cuts off [target]'s [affected.display_name] with \the [tool].", \
|
||||
"\blue You cut off [target]'s [affected.display_name] with \the [tool].")
|
||||
affected.droplimb(1,0)
|
||||
affected.droplimb(1,1,1)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
@@ -181,11 +181,11 @@
|
||||
target.update_body()
|
||||
target.updatehealth()
|
||||
target.UpdateDamageIcon()
|
||||
var/obj/item/weapon/organ/head/B = tool
|
||||
if (B.brainmob.mind)
|
||||
B.brainmob.mind.transfer_to(target)
|
||||
del(B)
|
||||
|
||||
for(var/obj/item/organ/replacing_organ in tool)
|
||||
replacing_organ.loc = get_turf(tool)
|
||||
replacing_organ.replaced(target,affected)
|
||||
del(replacing_organ) //Just in case.
|
||||
del(tool)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return !affected.hidden && affected.cavity && tool.w_class <= get_max_wclass(affected)
|
||||
return !istype(user,/mob/living/silicon/robot) && !affected.hidden && affected.cavity && tool.w_class <= get_max_wclass(affected)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -198,12 +198,13 @@
|
||||
if(worm.controlling)
|
||||
target.release_control()
|
||||
worm.detatch()
|
||||
|
||||
obj.loc = get_turf(target)
|
||||
if(istype(obj,/obj/item/weapon/implant))
|
||||
var/obj/item/weapon/implant/imp = obj
|
||||
imp.imp_in = null
|
||||
imp.implanted = 0
|
||||
worm.leave_host()
|
||||
else
|
||||
obj.loc = get_turf(target)
|
||||
if(istype(obj,/obj/item/weapon/implant))
|
||||
var/obj/item/weapon/implant/imp = obj
|
||||
imp.imp_in = null
|
||||
imp.implanted = 0
|
||||
else
|
||||
user.visible_message("\blue [user] removes \the [tool] from [target]'s [affected.display_name].", \
|
||||
"\blue There's something inside [target]'s [affected.display_name], but you just missed it this time." )
|
||||
|
||||
@@ -58,8 +58,7 @@
|
||||
/datum/surgery_step/internal/fix_organ
|
||||
allowed_tools = list(
|
||||
/obj/item/stack/medical/advanced/bruise_pack= 100, \
|
||||
/obj/item/stack/medical/bruise_pack = 20, \
|
||||
/obj/item/stack/medical/bruise_pack/tajaran = 70, \
|
||||
/obj/item/stack/medical/bruise_pack = 20
|
||||
)
|
||||
|
||||
min_duration = 70
|
||||
@@ -82,11 +81,8 @@
|
||||
var/tool_name = "\the [tool]"
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
tool_name = "regenerative membrane"
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
|
||||
tool_name = "the poultice"
|
||||
else
|
||||
tool_name = "the bandaid"
|
||||
else if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
tool_name = "the bandaid"
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
@@ -106,10 +102,7 @@
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
tool_name = "regenerative membrane"
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
|
||||
tool_name = "the poultice"
|
||||
else
|
||||
tool_name = "the bandaid"
|
||||
tool_name = "the bandaid"
|
||||
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
@@ -136,12 +129,9 @@
|
||||
target.adjustToxLoss(5)
|
||||
|
||||
else if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
|
||||
target.adjustToxLoss(7)
|
||||
else
|
||||
dam_amt = 5
|
||||
target.adjustToxLoss(10)
|
||||
affected.createwound(CUT, 5)
|
||||
dam_amt = 5
|
||||
target.adjustToxLoss(10)
|
||||
affected.createwound(CUT, 5)
|
||||
|
||||
for(var/datum/organ/internal/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
@@ -314,30 +304,12 @@
|
||||
|
||||
// Extract the organ!
|
||||
if(target.op_stage.current_organ)
|
||||
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
var/datum/organ/internal/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
|
||||
var/obj/item/organ/O
|
||||
if(I && istype(I))
|
||||
O = I.remove(user)
|
||||
if(O && istype(O))
|
||||
|
||||
// Stop the organ from continuing to reject.
|
||||
O.organ_data.rejecting = null
|
||||
|
||||
// Transfer over some blood data, if the organ doesn't have data.
|
||||
var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in O.reagents.reagent_list
|
||||
if(!organ_blood || !organ_blood.data["blood_DNA"])
|
||||
target.vessel.trans_to(O, 5, 1, 1)
|
||||
|
||||
// Kinda redundant, but I'm getting some buggy behavior.
|
||||
target.internal_organs_by_name[target.op_stage.current_organ] = null
|
||||
target.internal_organs_by_name -= target.op_stage.current_organ
|
||||
target.internal_organs -= O.organ_data
|
||||
affected.internal_organs -= O.organ_data
|
||||
O.removed(target,user)
|
||||
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -409,30 +381,8 @@
|
||||
"\blue You have transplanted \the [tool] into [target]'s [affected.display_name].")
|
||||
user.drop_item(tool)
|
||||
var/obj/item/organ/O = tool
|
||||
|
||||
if(istype(O))
|
||||
|
||||
var/datum/reagent/blood/transplant_blood = locate(/datum/reagent/blood) in O.reagents.reagent_list
|
||||
if(!transplant_blood)
|
||||
O.organ_data.transplant_data = list()
|
||||
O.organ_data.transplant_data["species"] = target.species.name
|
||||
O.organ_data.transplant_data["blood_type"] = target.dna.b_type
|
||||
O.organ_data.transplant_data["blood_DNA"] = target.dna.unique_enzymes
|
||||
else
|
||||
O.organ_data.transplant_data = list()
|
||||
O.organ_data.transplant_data["species"] = transplant_blood.data["species"]
|
||||
O.organ_data.transplant_data["blood_type"] = transplant_blood.data["blood_type"]
|
||||
O.organ_data.transplant_data["blood_DNA"] = transplant_blood.data["blood_DNA"]
|
||||
|
||||
O.organ_data.organ_holder = null
|
||||
O.organ_data.owner = target
|
||||
target.internal_organs |= O.organ_data
|
||||
affected.internal_organs |= O.organ_data
|
||||
target.internal_organs_by_name[O.organ_tag] = O.organ_data
|
||||
O.organ_data.status |= ORGAN_CUT_AWAY
|
||||
O.replaced(target)
|
||||
|
||||
del(O)
|
||||
O.replaced(target,affected)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, damaging \the [tool]!", \
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
/obj/item/weapon/kitchenknife = 75, \
|
||||
/obj/item/weapon/shard = 50, \
|
||||
)
|
||||
|
||||
|
||||
can_infect = 1
|
||||
blood_level = 1
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
if (target_zone == "mouth" || target_zone == "eyes")
|
||||
return 0
|
||||
|
||||
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
return affected.open >= 2 && (affected.status & ORGAN_DEAD)
|
||||
@@ -105,7 +105,7 @@
|
||||
/obj/item/weapon/reagent_containers/spray = 50,
|
||||
/obj/item/weapon/reagent_containers/glass/bucket = 50,
|
||||
)
|
||||
|
||||
|
||||
can_infect = 0
|
||||
blood_level = 0
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!istype(tool, /obj/item/weapon/reagent_containers))
|
||||
return 0
|
||||
|
||||
|
||||
var/obj/item/weapon/reagent_containers/container = tool
|
||||
if(!container.reagents.has_reagent("peridaxon"))
|
||||
return 0
|
||||
@@ -125,7 +125,7 @@
|
||||
|
||||
if (target_zone == "mouth" || target_zone == "eyes")
|
||||
return 0
|
||||
|
||||
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.open == 3 && (affected.status & ORGAN_DEAD)
|
||||
|
||||
@@ -138,34 +138,34 @@
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
|
||||
if (!istype(tool, /obj/item/weapon/reagent_containers))
|
||||
return
|
||||
|
||||
|
||||
var/obj/item/weapon/reagent_containers/container = tool
|
||||
|
||||
|
||||
var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this)
|
||||
if (trans > 0)
|
||||
container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue
|
||||
|
||||
|
||||
if(container.reagents.has_reagent("peridaxon"))
|
||||
affected.status &= ~ORGAN_DEAD
|
||||
|
||||
|
||||
user.visible_message("\blue [user] applies [trans] units of the solution to affected tissue in [target]'s [affected.display_name]", \
|
||||
"\blue You apply [trans] units of the solution to affected tissue in [target]'s [affected.display_name] with \the [tool].")
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
|
||||
if (!istype(tool, /obj/item/weapon/reagent_containers))
|
||||
return
|
||||
|
||||
|
||||
var/obj/item/weapon/reagent_containers/container = tool
|
||||
|
||||
|
||||
var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this)
|
||||
container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue
|
||||
|
||||
|
||||
user.visible_message("\red [user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!" , \
|
||||
"\red Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!")
|
||||
|
||||
|
||||
//no damage or anything, just wastes medicine
|
||||
|
||||
@@ -1,335 +0,0 @@
|
||||
//Procedures in this file: Generic ribcage opening steps, Removing alien embryo, Fixing internal organs.
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// GENERIC RIBCAGE SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
/datum/surgery_step/ribcage
|
||||
priority = 2
|
||||
can_infect = 1
|
||||
blood_level = 1
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return target_zone == "chest"
|
||||
|
||||
/datum/surgery_step/ribcage/saw_ribcage
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/circular_saw = 100, \
|
||||
/obj/item/weapon/hatchet = 75
|
||||
)
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 70
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!hasorgans(target))
|
||||
return
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && target.op_stage.ribcage == 0 && affected.open >= 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] begins to cut through [target]'s ribcage with \the [tool].", \
|
||||
"You begin to cut through [target]'s ribcage with \the [tool].")
|
||||
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has cut [target]'s ribcage open with \the [tool].", \
|
||||
"\blue You have cut [target]'s ribcage open with \the [tool].")
|
||||
target.op_stage.ribcage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user]'s hand slips, cracking [target]'s ribcage with \the [tool]!" , \
|
||||
"\red Your hand slips, cracking [target]'s ribcage with \the [tool]!" )
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
affected.createwound(CUT, 20)
|
||||
affected.fracture()
|
||||
|
||||
|
||||
/datum/surgery_step/ribcage/retract_ribcage
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/retractor = 100, \
|
||||
/obj/item/weapon/crowbar = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
|
||||
min_duration = 30
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.ribcage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "[user] starts to force open the ribcage in [target]'s torso with \the [tool]."
|
||||
var/self_msg = "You start to force open the ribcage in [target]'s torso with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "\blue [user] forces open [target]'s ribcage with \the [tool]."
|
||||
var/self_msg = "\blue You force open [target]'s ribcage with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
target.op_stage.ribcage = 2
|
||||
|
||||
// Whoops!
|
||||
if(prob(10))
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
affected.fracture()
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "\red [user]'s hand slips, breaking [target]'s ribcage!"
|
||||
var/self_msg = "\red Your hand slips, breaking [target]'s ribcage!"
|
||||
user.visible_message(msg, self_msg)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
affected.createwound(BRUISE, 20)
|
||||
affected.fracture()
|
||||
|
||||
/datum/surgery_step/ribcage/close_ribcage
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/retractor = 100, \
|
||||
/obj/item/weapon/crowbar = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
|
||||
|
||||
min_duration = 20
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.ribcage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "[user] starts bending [target]'s ribcage back into place with \the [tool]."
|
||||
var/self_msg = "You start bending [target]'s ribcage back into place with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "\blue [user] bends [target]'s ribcage back into place with \the [tool]."
|
||||
var/self_msg = "\blue You bend [target]'s ribcage back into place with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
target.op_stage.ribcage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "\red [user]'s hand slips, bending [target]'s ribs the wrong way!"
|
||||
var/self_msg = "\red Your hand slips, bending [target]'s ribs the wrong way!"
|
||||
user.visible_message(msg, self_msg)
|
||||
var/datum/organ/external/chest/affected = target.get_organ("chest")
|
||||
affected.createwound(BRUISE, 20)
|
||||
affected.fracture()
|
||||
if (prob(40))
|
||||
user.visible_message("\red A rib pierces the lung!")
|
||||
target.rupture_lung()
|
||||
|
||||
/datum/surgery_step/ribcage/mend_ribcage
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/bonegel = 100, \
|
||||
/obj/item/weapon/screwdriver = 75
|
||||
)
|
||||
|
||||
min_duration = 20
|
||||
max_duration = 40
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target.op_stage.ribcage == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "[user] starts applying \the [tool] to [target]'s ribcage."
|
||||
var/self_msg = "You start applying \the [tool] to [target]'s ribcage."
|
||||
user.visible_message(msg, self_msg)
|
||||
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "\blue [user] applied \the [tool] to [target]'s ribcage."
|
||||
var/self_msg = "\blue You applied \the [tool] to [target]'s ribcage."
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
target.op_stage.ribcage = 0
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// ALIEN EMBRYO SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
/datum/surgery_step/ribcage/remove_embryo
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/hemostat = 100, \
|
||||
/obj/item/weapon/wirecutters = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
)
|
||||
blood_level = 2
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/embryo = 0
|
||||
for(var/obj/item/alien_embryo/A in target)
|
||||
embryo = 1
|
||||
break
|
||||
return ..() && embryo && target.op_stage.ribcage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/msg = "[user] starts to pull something out from [target]'s ribcage with \the [tool]."
|
||||
var/self_msg = "You start to pull something out from [target]'s ribcage with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
target.custom_pain("Something hurts horribly in your chest!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\red [user] rips the larva out of [target]'s ribcage!",
|
||||
"You rip the larva out of [target]'s ribcage!")
|
||||
|
||||
for(var/obj/item/alien_embryo/A in target)
|
||||
A.loc = A.loc.loc
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// CHEST INTERNAL ORGAN SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
/datum/surgery_step/ribcage/fix_chest_internal
|
||||
allowed_tools = list(
|
||||
/obj/item/stack/medical/advanced/bruise_pack= 100, \
|
||||
/obj/item/stack/medical/bruise_pack = 20, \
|
||||
/obj/item/stack/medical/bruise_pack/tajaran = 70, \
|
||||
)
|
||||
|
||||
min_duration = 70
|
||||
max_duration = 90
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!hasorgans(target))
|
||||
return 0
|
||||
|
||||
var/is_chest_organ_damaged = 0
|
||||
var/datum/organ/external/chest/chest = target.get_organ("chest")
|
||||
for(var/datum/organ/internal/I in chest.internal_organs)
|
||||
if(I.damage > 0)
|
||||
is_chest_organ_damaged = 1
|
||||
break
|
||||
return ..() && is_chest_organ_damaged && target.op_stage.ribcage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/tool_name = "\the [tool]"
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
tool_name = "regenerative membrane"
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
|
||||
tool_name = "the poultice"
|
||||
else
|
||||
tool_name = "the bandaid"
|
||||
var/datum/organ/external/chest/chest = target.get_organ("chest")
|
||||
for(var/datum/organ/internal/I in chest.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic < 2)
|
||||
user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \
|
||||
"You start treating damage to [target]'s [I.name] with [tool_name]." )
|
||||
else
|
||||
user.visible_message("[user] attempts to repair [target]'s mechanical [I.name] with [tool_name]...", \
|
||||
"\blue You attempt to repair [target]'s mechanical [I.name] with [tool_name]...")
|
||||
|
||||
target.custom_pain("The pain in your chest is living hell!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/tool_name = "\the [tool]"
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
tool_name = "regenerative membrane"
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
|
||||
tool_name = "the poultice"
|
||||
else
|
||||
tool_name = "the bandaid"
|
||||
var/datum/organ/external/chest/chest = target.get_organ("chest")
|
||||
for(var/datum/organ/internal/I in chest.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic < 2)
|
||||
user.visible_message("\blue [user] treats damage to [target]'s [I.name] with [tool_name].", \
|
||||
"\blue You treat damage to [target]'s [I.name] with [tool_name]." )
|
||||
else
|
||||
user.visible_message("\blue [user] pokes [target]'s mechanical [I.name] with [tool_name]...", \
|
||||
"\blue You poke [target]'s mechanical [I.name] with [tool_name]... \red For no effect, since it's robotic.")
|
||||
I.damage = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/chest/affected = target.get_organ("chest")
|
||||
user.visible_message("\red [user]'s hand slips, getting mess and tearing the inside of [target]'s chest with \the [tool]!", \
|
||||
"\red Your hand slips, getting mess and tearing the inside of [target]'s chest with \the [tool]!")
|
||||
var/dam_amt = 2
|
||||
|
||||
if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
target.adjustToxLoss(5)
|
||||
|
||||
else if (istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
if (istype(tool, /obj/item/stack/medical/bruise_pack/tajaran))
|
||||
target.adjustToxLoss(7)
|
||||
else
|
||||
dam_amt = 5
|
||||
target.adjustToxLoss(10)
|
||||
affected.createwound(CUT, 5)
|
||||
|
||||
for(var/datum/organ/internal/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
I.take_damage(dam_amt,0)
|
||||
|
||||
/datum/surgery_step/ribcage/fix_chest_internal_robot //For artificial organs
|
||||
allowed_tools = list(
|
||||
/obj/item/stack/nanopaste = 100, \
|
||||
/obj/item/weapon/bonegel = 30, \
|
||||
/obj/item/weapon/screwdriver = 70, \
|
||||
)
|
||||
|
||||
min_duration = 70
|
||||
max_duration = 90
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!hasorgans(target))
|
||||
return 0
|
||||
|
||||
var/is_chest_organ_damaged = 0
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
|
||||
var/datum/organ/external/chest/chest = target.get_organ("chest")
|
||||
for(var/datum/organ/internal/I in chest.internal_organs) if(I.damage > 0)
|
||||
is_chest_organ_damaged = 1
|
||||
break
|
||||
return ..() && is_chest_organ_damaged && heart.robotic == 2 && target.op_stage.ribcage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
|
||||
|
||||
if(heart.damage > 0)
|
||||
user.visible_message("[user] starts mending the mechanisms on [target]'s heart with \the [tool].", \
|
||||
"You start mending the mechanisms on [target]'s heart with \the [tool]." )
|
||||
target.custom_pain("The pain in your chest is living hell!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
|
||||
if(heart.damage > 0)
|
||||
user.visible_message("\blue [user] repairs [target]'s heart with \the [tool].", \
|
||||
"\blue You repair [target]'s heart with \the [tool]." )
|
||||
heart.damage = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
|
||||
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s heart, gumming it up!!" , \
|
||||
"\red Your hand slips, smearing [tool] in the incision in [target]'s heart, gumming it up!")
|
||||
heart.take_damage(5, 0)
|
||||
target.adjustToxLoss(5)
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// HEART SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// To be finished after some tests.
|
||||
// /datum/surgery_step/ribcage/heart/cut
|
||||
// allowed_tools = list(
|
||||
// /obj/item/weapon/scalpel = 100, \
|
||||
// /obj/item/weapon/kitchenknife = 75, \
|
||||
// /obj/item/weapon/shard = 50, \
|
||||
// )
|
||||
|
||||
// min_duration = 30
|
||||
// max_duration = 40
|
||||
|
||||
// can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
// return ..() && target.op_stage.ribcage == 2
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// type path referencing tools that can be used for this step, and how well are they suited for it
|
||||
var/list/allowed_tools = null
|
||||
// type paths referencing mutantraces that this step applies to.
|
||||
// type paths referencing races that this step applies to.
|
||||
var/list/allowed_species = null
|
||||
var/list/disallowed_species = null
|
||||
|
||||
@@ -82,27 +82,30 @@ proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool)
|
||||
return 0
|
||||
if (user.a_intent == "harm") //check for Hippocratic Oath
|
||||
return 0
|
||||
if(M.op_stage.in_progress) //Can't operate on someone repeatedly.
|
||||
user << "\red You can't operate on the patient while surgery is already in progress."
|
||||
var/zone = user.zone_sel.selecting
|
||||
if(zone in M.op_stage.in_progress) //Can't operate on someone repeatedly.
|
||||
user << "\red You can't operate on this area while surgery is already in progress."
|
||||
return 1
|
||||
|
||||
for(var/datum/surgery_step/S in surgery_steps)
|
||||
//check if tool is right or close enough and if this step is possible
|
||||
if(S.tool_quality(tool))
|
||||
var/step_is_valid = S.can_use(user, M, user.zone_sel.selecting, tool)
|
||||
var/step_is_valid = S.can_use(user, M, zone, tool)
|
||||
if(step_is_valid && S.is_valid_target(M))
|
||||
if(step_is_valid == 2) // This is a failure that already has a message for failing.
|
||||
return 1
|
||||
M.op_stage.in_progress = 1
|
||||
S.begin_step(user, M, user.zone_sel.selecting, tool) //start on it
|
||||
M.op_stage.in_progress += zone
|
||||
S.begin_step(user, M, zone, tool) //start on it
|
||||
//We had proper tools! (or RNG smiled.) and user did not move or change hands.
|
||||
if(prob(S.tool_quality(tool)) && do_mob(user, M, rand(S.min_duration, S.max_duration)))
|
||||
S.end_step(user, M, user.zone_sel.selecting, tool) //finish successfully
|
||||
else if (tool in user.contents && user.Adjacent(M)) //or
|
||||
S.fail_step(user, M, user.zone_sel.selecting, tool) //malpractice~
|
||||
S.end_step(user, M, zone, tool) //finish successfully
|
||||
else if ((tool in user.contents) && user.Adjacent(M)) //or
|
||||
S.fail_step(user, M, zone, tool) //malpractice~
|
||||
else // This failing silently was a pain.
|
||||
user << "\red You must remain close to your patient to conduct surgery."
|
||||
M.op_stage.in_progress = 0 // Clear the in-progress flag.
|
||||
M.op_stage.in_progress -= zone // Clear the in-progress flag.
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.update_surgery()
|
||||
return 1 //don't want to do weapony things after surgery
|
||||
|
||||
if (user.a_intent == "help")
|
||||
@@ -129,8 +132,6 @@ proc/sort_surgeries()
|
||||
/datum/surgery_status/
|
||||
var/eyes = 0
|
||||
var/face = 0
|
||||
// var/appendix = 0
|
||||
// var/ribcage = 0
|
||||
var/head_reattach = 0
|
||||
var/current_organ = "organ"
|
||||
var/in_progress = 0
|
||||
var/list/in_progress = list()
|
||||
Reference in New Issue
Block a user