code folder. 221 files changed wew

This commit is contained in:
deathride58
2018-02-12 21:03:40 -05:00
parent e3ad2643b2
commit 72ff7be9bd
221 changed files with 2797 additions and 2172 deletions
@@ -126,7 +126,7 @@
to_chat(user, "<span class='notice'>You insert the flash into the eye socket.</span>")
else if(istype(W, /obj/item/crowbar))
if(flash1 || flash2)
playsound(src.loc, W.usesound, 50, 1)
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the flash from [src].</span>")
if(flash1)
flash1.forceMove(user.loc)
+1 -1
View File
@@ -14,7 +14,7 @@
/datum/surgery_step/fix_brain
name = "fix brain"
implements = list(/obj/item/hemostat = 85, /obj/item/screwdriver = 35, /obj/item/pen = 15) //don't worry, pouring some alcohol on their open brain will get that chance to 100
implements = list(/obj/item/hemostat = 85, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15) //don't worry, pouring some alcohol on their open brain will get that chance to 100
time = 120 //long and complicated
/datum/surgery/brain_surgery/can_start(mob/user, mob/living/carbon/target)
+1 -1
View File
@@ -12,7 +12,7 @@
//extract brain
/datum/surgery_step/extract_core
name = "extract core"
implements = list(/obj/item/hemostat = 100, /obj/item/crowbar = 100)
implements = list(/obj/item/hemostat = 100, TOOL_CROWBAR = 100)
time = 16
/datum/surgery_step/extract_core/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+1 -1
View File
@@ -8,7 +8,7 @@
//fix eyes
/datum/surgery_step/fix_eyes
name = "fix eyes"
implements = list(/obj/item/hemostat = 100, /obj/item/screwdriver = 45, /obj/item/pen = 25)
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 45, /obj/item/pen = 25)
time = 64
/datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target)
+1 -1
View File
@@ -8,7 +8,7 @@
//extract implant
/datum/surgery_step/extract_implant
name = "extract implant"
implements = list(/obj/item/hemostat = 100, /obj/item/crowbar = 65)
implements = list(/obj/item/hemostat = 100, TOOL_CROWBAR = 65)
time = 64
var/obj/item/implant/I = null
+1 -1
View File
@@ -6,7 +6,7 @@
/datum/surgery_step/replace
name = "sever muscles"
implements = list(/obj/item/scalpel = 100, /obj/item/wirecutters = 55)
implements = list(/obj/item/scalpel = 100, TOOL_WIRECUTTER = 55)
time = 32
+1 -1
View File
@@ -25,7 +25,7 @@
//remove fat
/datum/surgery_step/remove_fat
name = "remove loose fat"
implements = list(/obj/item/retractor = 100, /obj/item/screwdriver = 45, /obj/item/wirecutters = 35)
implements = list(/obj/item/retractor = 100, TOOL_SCREWDRIVER = 45, TOOL_WIRECUTTER = 35)
time = 32
/datum/surgery_step/remove_fat/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+5 -5
View File
@@ -2,7 +2,7 @@
/datum/surgery_step/mechanic_open
name = "unscrew shell"
implements = list(
/obj/item/screwdriver = 100,
TOOL_SCREWDRIVER = 100,
/obj/item/scalpel = 75, // med borgs could try to unskrew shell with scalpel
/obj/item/kitchen/knife = 50,
/obj/item = 10) // 10% success with any sharp item.
@@ -22,7 +22,7 @@
/datum/surgery_step/mechanic_close
name = "screw shell"
implements = list(
/obj/item/screwdriver = 100,
TOOL_SCREWDRIVER = 100,
/obj/item/scalpel = 75,
/obj/item/kitchen/knife = 50,
/obj/item = 10) // 10% success with any sharp item.
@@ -42,7 +42,7 @@
/datum/surgery_step/prepare_electronics
name = "prepare electronics"
implements = list(
/obj/item/device/multitool = 100,
TOOL_MULTITOOL = 100,
/obj/item/hemostat = 10) // try to reboot internal controllers via short circuit with some conductor
time = 24
@@ -54,7 +54,7 @@
/datum/surgery_step/mechanic_unwrench
name = "unwrench bolts"
implements = list(
/obj/item/wrench = 100,
TOOL_WRENCH = 100,
/obj/item/retractor = 10)
time = 24
@@ -66,7 +66,7 @@
/datum/surgery_step/mechanic_wrench
name = "wrench bolts"
implements = list(
/obj/item/wrench = 100,
TOOL_WRENCH = 100,
/obj/item/retractor = 10)
time = 24
+1 -34
View File
@@ -67,7 +67,7 @@
name = "manipulate organs"
repeatable = 1
implements = list(/obj/item/organ = 100, /obj/item/reagent_containers/food/snacks/organ = 0, /obj/item/organ_storage = 100)
var/implements_extract = list(/obj/item/hemostat = 100, /obj/item/crowbar = 55)
var/implements_extract = list(/obj/item/hemostat = 100, TOOL_CROWBAR = 55)
var/current_type
var/obj/item/organ/I = null
@@ -75,25 +75,6 @@
..()
implements = implements + implements_extract
/datum/surgery_step/manipulate_organs/tool_check(mob/user, obj/item/tool)
if(istype(tool, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = tool
if(!WT.isOn())
return 0
else if(istype(tool, /obj/item/lighter))
var/obj/item/lighter/L = tool
if(!L.lit)
return 0
else if(istype(tool, /obj/item/match))
var/obj/item/match/M = tool
if(!M.lit)
return 0
return 1
/datum/surgery_step/manipulate_organs/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
I = null
if(istype(tool, /obj/item/organ_storage))
@@ -118,13 +99,6 @@
else if(implement_type in implements_extract)
current_type = "extract"
var/list/organs = target.getorganszone(target_zone)
/* var/mob/living/simple_animal/borer/B = target.has_brain_worms()
if(target.has_brain_worms())
user.visible_message("[user] begins to extract [B] from [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to extract [B] from [target]'s [parse_zone(target_zone)]...</span>")
return TRUE*/
if(!organs.len)
to_chat(user, "<span class='notice'>There are no removable organs in [target]'s [parse_zone(target_zone)]!</span>")
return -1
@@ -164,13 +138,6 @@
"<span class='notice'>You insert [tool] into [target]'s [parse_zone(target_zone)].</span>")
else if(current_type == "extract")
/* var/mob/living/simple_animal/borer/B = target.has_brain_worms()
if(B && B.victim == target)
user.visible_message("[user] successfully extracts [B] from [target]'s [parse_zone(target_zone)]!",
"<span class='notice'>You successfully extract [B] from [target]'s [parse_zone(target_zone)].</span>")
add_logs(user, target, "surgically removed [B] from", addition="INTENT: [uppertext(user.a_intent)]")
B.leave_victim()
return FALSE */
if(I && I.owner == target)
user.visible_message("[user] successfully extracts [I] from [target]'s [parse_zone(target_zone)]!",
"<span class='notice'>You successfully extract [I] from [target]'s [parse_zone(target_zone)].</span>")
+8 -24
View File
@@ -19,7 +19,7 @@
//clamp bleeders
/datum/surgery_step/clamp_bleeders
name = "clamp bleeders"
implements = list(/obj/item/hemostat = 100, /obj/item/wirecutters = 60, /obj/item/stack/packageWrap = 35, /obj/item/stack/cable_coil = 15)
implements = list(/obj/item/hemostat = 100, TOOL_WIRECUTTER = 60, /obj/item/stack/packageWrap = 35, /obj/item/stack/cable_coil = 15)
time = 24
/datum/surgery_step/clamp_bleeders/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -35,7 +35,7 @@
//retract skin
/datum/surgery_step/retract_skin
name = "retract skin"
implements = list(/obj/item/retractor = 100, /obj/item/screwdriver = 45, /obj/item/wirecutters = 35)
implements = list(/obj/item/retractor = 100, TOOL_SCREWDRIVER = 45, TOOL_WIRECUTTER = 35)
time = 24
/datum/surgery_step/retract_skin/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -47,35 +47,19 @@
//close incision
/datum/surgery_step/close
name = "mend incision"
implements = list(/obj/item/cautery = 100, /obj/item/gun/energy/laser = 90, /obj/item/weldingtool = 70,
/obj/item/lighter = 45, /obj/item/match = 20)
implements = list(/obj/item/cautery = 100, /obj/item/gun/energy/laser = 90, TOOL_WELDER = 70,
/obj/item = 30) // 30% success with any hot item.
time = 24
/datum/surgery_step/close/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to mend the incision in [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to mend the incision in [target]'s [parse_zone(target_zone)]...</span>")
/datum/surgery_step/close/tool_check(mob/user, obj/item/tool)
if(istype(tool, /obj/item/cautery))
return 1
if(implement_type == TOOL_WELDER || implement_type == /obj/item)
return tool.is_hot()
if(istype(tool, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = tool
if(WT.isOn())
return 1
else if(istype(tool, /obj/item/lighter))
var/obj/item/lighter/L = tool
if(L.lit)
return 1
else if(istype(tool, /obj/item/match))
var/obj/item/match/M = tool
if(M.lit)
return 1
return 0
return TRUE
/datum/surgery_step/close/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(locate(/datum/surgery_step/saw) in surgery.steps)
@@ -105,7 +89,7 @@
//drill bone
/datum/surgery_step/drill
name = "drill bone"
implements = list(/obj/item/surgicaldrill = 100, /obj/item/pickaxe/drill = 60, /obj/item/mecha_parts/mecha_equipment/drill = 60, /obj/item/screwdriver = 20)
implements = list(/obj/item/surgicaldrill = 100, /obj/item/pickaxe/drill = 60, /obj/item/mecha_parts/mecha_equipment/drill = 60, TOOL_SCREWDRIVER = 20)
time = 30
/datum/surgery_step/drill/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -51,16 +51,11 @@
SetSlotFromZone()
to_chat(user, "<span class='notice'>You modify [src] to be installed on the [zone == "r_arm" ? "right" : "left"] arm.</span>")
update_icon()
else if(istype(W, /obj/item/card/emag))
emag_act()
/obj/item/organ/cyberimp/arm/Remove(mob/living/carbon/M, special = 0)
Retract()
..()
/obj/item/organ/cyberimp/arm/emag_act()
return 0
/obj/item/organ/cyberimp/arm/emp_act(severity)
if(prob(15/severity) && owner)
to_chat(owner, "<span class='warning'>[src] is hit by EMP!</span>")
@@ -126,10 +121,6 @@
to_chat(owner, "<span class='warning'>The implant doesn't respond. It seems to be broken...</span>")
return
// You can emag the arm-mounted implant by activating it while holding emag in it's hand.
if(istype(owner.get_active_held_item(), /obj/item/card/emag) && emag_act())
return
if(!holder || (holder in src))
holder = null
if(contents.len == 1)
@@ -176,7 +167,6 @@
/obj/item/organ/cyberimp/arm/gun/taser/l
zone = "l_arm"
/obj/item/organ/cyberimp/arm/toolset
name = "integrated toolset implant"
desc = "A stripped-down version of the engineering cyborg toolset, designed to be installed on subject's arm. Contains all necessary tools."
+1 -1
View File
@@ -60,7 +60,7 @@
var/turf/open/floorloc = get_turf(user)
floorloc.contents += contents
to_chat(user, "<span class='notice'>You remove the [storedorgan] from [src].</span>")
playsound(get_turf(user), I.usesound, 50, 1)
I.play_tool_sound(src)
storedorgan = null
if(uses != INFINITE)
uses--
+1 -1
View File
@@ -6,7 +6,7 @@
//reshape_face
/datum/surgery_step/reshape_face
name = "reshape face"
implements = list(/obj/item/scalpel = 100, /obj/item/kitchen/knife = 50, /obj/item/wirecutters = 35)
implements = list(/obj/item/scalpel = 100, /obj/item/kitchen/knife = 50, TOOL_WIRECUTTER = 35)
time = 64
/datum/surgery_step/reshape_face/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+17 -8
View File
@@ -9,19 +9,28 @@
/datum/surgery_step/proc/try_op(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/success = 0
var/success = FALSE
if(accept_hand)
if(!tool)
success = 1
success = TRUE
if(accept_any_item)
if(tool && tool_check(user, tool))
success = 1
else
for(var/path in implements)
if(istype(tool, path))
implement_type = path
success = TRUE
else if(tool)
for(var/key in implements)
var/match = FALSE
if(ispath(key) && istype(tool, key))
match = TRUE
else if(tool.tool_behaviour == key)
match = TRUE
if(match)
implement_type = key
if(tool_check(user, tool))
success = 1
success = TRUE
break
if(success)