Tweaks to previous commits.

More tweaks to IPC fixes.
Merge resolution/compile fixes.

Further work on properly integrating, updating and fixing prosthetic options.

Repathed internal organs to organ/internal.

More work on full synthetics, changelings, overheating.

Working on getting organs to qdel properly and spawn properly when robotized.

Finalized some overheating values, added remaining prosthetic icons.

Finalizing the testing version of the full prosthetic bodies branch.

Added suit cyclers to the autolathe and map.

Fixing runtime errors.

Fixing errors.

Changelog.

Replacing limb and organ strings with constants.

Prevented brainless species from becoming full cyborgs.

Fixed issues with brain/MMIs renaming themselves inappropriately.

Various fixes and oversights.
This commit is contained in:
Zuhayr
2015-12-04 16:49:21 +10:30
parent 87afd2feb2
commit f93ea6a78f
161 changed files with 1384 additions and 1352 deletions
+2 -2
View File
@@ -104,7 +104,7 @@
// Aliens can get straight through these.
if(istype(usr,/mob/living/carbon))
var/mob/living/carbon/M = usr
if(locate(/obj/item/organ/xenos/hivenode) in M.internal_organs)
if(locate(/obj/item/organ/internal/xenos/hivenode) in M.internal_organs)
for(var/mob/O in oviewers(src))
O.show_message("<span class='warning'>[usr] strokes the [name] and it melts away!</span>", 1)
health = 0
@@ -349,7 +349,7 @@ Alien plants should do something if theres a lot of poison
/obj/effect/alien/egg/attack_hand(user as mob)
var/mob/living/carbon/M = user
if(!istype(M) || !(locate(/obj/item/organ/xenos/hivenode) in M.internal_organs))
if(!istype(M) || !(locate(/obj/item/organ/internal/xenos/hivenode) in M.internal_organs))
return attack_hand(user)
switch(status)
@@ -64,6 +64,12 @@ var/global/list/image/splatter_cache=list()
/obj/effect/decal/cleanable/blood/update_icon()
if(basecolor == "rainbow") basecolor = "#[get_random_colour(1)]"
color = basecolor
if(basecolor == SYNTH_BLOOD_COLOUR)
name = "oil"
desc = "It's black and greasy."
else
name = initial(name)
desc = initial(desc)
/obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp)
if (!istype(perp))
@@ -3,7 +3,7 @@
desc = "It's a useless heap of junk... <i>or is it?</i>"
icon = 'icons/mob/robots.dmi'
icon_state = "gib1"
basecolor="#030303"
basecolor = SYNTH_BLOOD_COLOUR
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7")
/obj/effect/decal/cleanable/blood/gibs/robot/update_icon()
@@ -38,9 +38,7 @@
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibdown1","gibdown1") //2:7 is close enough to 1:4
/obj/effect/decal/cleanable/blood/oil
name = "motor oil"
desc = "It's black and greasy. Looks like Beepsky made another mess."
basecolor="#030303"
basecolor = SYNTH_BLOOD_COLOUR
/obj/effect/decal/cleanable/blood/oil/dry()
return
+2 -2
View File
@@ -220,9 +220,9 @@
src.loc = O.owner ? O.owner.loc : O.loc
src.visible_message("<span class='warning'>\A [src] makes its way out of [O.owner ? "[O.owner]'s [O.name]" : "\the [O]"]!</span>")
if(O.owner)
O.owner.apply_damage(1, BRUTE, O.limb_name)
O.owner.apply_damage(1, BRUTE, O.organ_tag)
else if(prob(1))
O.owner.apply_damage(1, TOX, O.limb_name)
O.owner.apply_damage(1, TOX, O.organ_tag)
if(world.time > last_itch + 30 SECONDS)
last_itch = world.time
O.owner << "<span class='notice'>Your [O.name] itches...</span>"
+2 -2
View File
@@ -449,7 +449,7 @@ var/list/global/slot_flags_enumeration = list(
if(istype(H))
var/obj/item/organ/eyes/eyes = H.internal_organs_by_name["eyes"]
var/obj/item/organ/internal/eyes/eyes = H.internal_organs_by_name[O_EYES]
if(H != user)
for(var/mob/O in (viewers(M) - user - M))
@@ -477,7 +477,7 @@ var/list/global/slot_flags_enumeration = list(
if (eyes.damage >= eyes.min_broken_damage)
if(M.stat != 2)
M << "<span class='warning'>You go blind!</span>"
var/obj/item/organ/external/affecting = H.get_organ("head")
var/obj/item/organ/external/affecting = H.get_organ(BP_HEAD)
if(affecting.take_damage(7))
M:UpdateDamageIcon()
else
@@ -38,7 +38,7 @@
/obj/item/device/flashlight/attack(mob/living/M as mob, mob/living/user as mob)
add_fingerprint(user)
if(on && user.zone_sel.selecting == "eyes")
if(on && user.zone_sel.selecting == O_EYES)
if(((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly
return ..() //just hit them in the head
+16 -13
View File
@@ -12,21 +12,25 @@
throwforce = 10.0
throw_speed = 1
throw_range = 4
action_button_name = "Toggle Heatsink"
matter = list("steel" = 15000, "glass" = 3500)
origin_tech = list(TECH_MAGNET = 2, TECH_MATERIAL = 2)
var/on = 0 //is it turned on?
var/cover_open = 0 //is the cover open?
var/obj/item/weapon/cell/cell
var/max_cooling = 12 //in degrees per second - probably don't need to mess with heat capacity here
var/charge_consumption = 16.6 //charge per second at max_cooling
var/max_cooling = 12 // in degrees per second - probably don't need to mess with heat capacity here
var/charge_consumption = 3 // charge per second at max_cooling
var/thermostat = T20C
//TODO: make it heat up the surroundings when not in space
/obj/item/device/suit_cooling_unit/ui_action_click()
toggle(usr)
/obj/item/device/suit_cooling_unit/New()
processing_objects |= src
cell = new/obj/item/weapon/cell() //comes with the crappy default power cell - high-capacity ones shouldn't be hard to find
cell.loc = src
@@ -56,7 +60,7 @@
cell.use(charge_usage)
if(cell.charge <= 0)
turn_off()
turn_off(1)
/obj/item/device/suit_cooling_unit/proc/get_environment_temperature()
if (ishuman(loc))
@@ -97,14 +101,12 @@
on = 1
updateicon()
/obj/item/device/suit_cooling_unit/proc/turn_off()
if (ismob(src.loc))
var/mob/M = src.loc
M.show_message("\The [src] clicks and whines as it powers down.", 2) //let them know in case it's run out of power.
/obj/item/device/suit_cooling_unit/proc/turn_off(var/failed)
if(failed) visible_message("\The [src] clicks and whines as it powers down.")
on = 0
updateicon()
/obj/item/device/suit_cooling_unit/attack_self(mob/user as mob)
/obj/item/device/suit_cooling_unit/attack_self(var/mob/user)
if(cover_open && cell)
if(ishuman(user))
user.put_in_hands(cell)
@@ -114,18 +116,19 @@
cell.add_fingerprint(user)
cell.update_icon()
user << "You remove the [src.cell]."
user << "You remove \the [src.cell]."
src.cell = null
updateicon()
return
//TODO use a UI like the air tanks
toggle(user)
/obj/item/device/suit_cooling_unit/proc/toggle(var/mob/user)
if(on)
turn_off()
else
turn_on()
if (on)
user << "You switch on the [src]."
user << "<span class='notice'>You switch \the [src] [on ? "on" : "off"].</span>"
/obj/item/device/suit_cooling_unit/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/screwdriver))
+7 -7
View File
@@ -30,35 +30,35 @@
name = "left arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_arm"
part = list("l_arm","l_hand")
part = list(BP_L_ARM, BP_L_HAND)
model_info = 1
/obj/item/robot_parts/r_arm
name = "right arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_arm"
part = list("r_arm","r_hand")
part = list(BP_R_ARM, BP_R_HAND)
model_info = 1
/obj/item/robot_parts/l_leg
name = "left leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_leg"
part = list("l_leg","l_foot")
part = list(BP_L_LEG, BP_L_FOOT)
model_info = 1
/obj/item/robot_parts/r_leg
name = "right leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_leg"
part = list("r_leg","r_foot")
part = list(BP_R_LEG, BP_R_FOOT)
model_info = 1
/obj/item/robot_parts/chest
name = "torso"
name = "chest"
desc = "A heavily reinforced case containing cyborg logic boards, with space for a standard power cell."
icon_state = "chest"
part = list("groin","chest")
part = list(BP_GROIN,BP_TORSO)
var/wires = 0.0
var/obj/item/weapon/cell/cell = null
@@ -66,7 +66,7 @@
name = "head"
desc = "A standard reinforced braincase, with spine-plugged neural socket and sensor gimbals."
icon_state = "head"
part = list("head")
part = list(BP_HEAD)
var/obj/item/device/flash/flash1 = null
var/obj/item/device/flash/flash2 = null
+3 -3
View File
@@ -24,7 +24,7 @@
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.name == "head")
if(affecting.organ_tag == BP_HEAD)
if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space))
user << "<span class='warning'>You can't apply [src] through [H.head]!</span>"
return 1
@@ -217,7 +217,7 @@
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
var/limb = affecting.name
if(!(affecting.limb_name in list("l_arm","r_arm","l_leg","r_leg")))
if(!(affecting.organ_tag in list("l_arm","r_arm","l_leg","r_leg")))
user << "<span class='danger'>You can't apply a splint there!</span>"
return
if(affecting.status & ORGAN_SPLINTED)
@@ -226,7 +226,7 @@
if (M != user)
user.visible_message("<span class='danger'>[user] starts to apply \the [src] to [M]'s [limb].</span>", "<span class='danger'>You start to apply \the [src] to [M]'s [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
else
if((!user.hand && affecting.limb_name == "r_arm") || (user.hand && affecting.limb_name == "l_arm"))
if((!user.hand && affecting.organ_tag == "r_arm") || (user.hand && affecting.organ_tag == "l_arm"))
user << "<span class='danger'>You can't apply a splint to the arm you're using!</span>"
return
user.visible_message("<span class='danger'>[user] starts to apply \the [src] to their [limb].</span>", "<span class='danger'>You start to apply \the [src] to your [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
@@ -478,7 +478,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
return
M.IgniteMob()
if(istype(M.wear_mask, /obj/item/clothing/mask/smokable/cigarette) && user.zone_sel.selecting == "mouth" && lit)
if(istype(M.wear_mask, /obj/item/clothing/mask/smokable/cigarette) && user.zone_sel.selecting == O_MOUTH && lit)
var/obj/item/clothing/mask/smokable/cigarette/cig = M.wear_mask
if(M == user)
cig.attackby(src, user)
@@ -39,7 +39,7 @@
return
/obj/item/weapon/soap/attack(mob/target as mob, mob/user as mob)
if(target && user && ishuman(target) && ishuman(user) && !target.stat && !user.stat && user.zone_sel &&user.zone_sel.selecting == "mouth" )
if(target && user && ishuman(target) && ishuman(user) && !target.stat && !user.stat && user.zone_sel &&user.zone_sel.selecting == O_MOUTH)
user.visible_message("<span class='danger'>\The [user] washes \the [target]'s mouth out with soap!</span>")
return
..()
@@ -84,7 +84,7 @@
//This really should be in mob not every check
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES]
if (E && E.damage >= E.min_bruised_damage)
M << "<span class='danger'>Your eyes start to burn badly!</span>"
if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang)))
+2 -2
View File
@@ -94,11 +94,11 @@ var/last_chew = 0
var/mob/living/carbon/human/H = A
if (!H.handcuffed) return
if (H.a_intent != I_HURT) return
if (H.zone_sel.selecting != "mouth") return
if (H.zone_sel.selecting != O_MOUTH) return
if (H.wear_mask) return
if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket)) return
var/obj/item/organ/external/O = H.organs_by_name[H.hand?"l_hand":"r_hand"]
var/obj/item/organ/external/O = H.organs_by_name[(H.hand ? BP_L_HAND : BP_R_HAND)]
if (!O) return
var/s = "<span class='warning'>[H.name] chews on \his [O.name]!</span>"
@@ -27,7 +27,7 @@
return ..()
if(user.a_intent != I_HELP)
if(user.zone_sel.selecting == "head" || user.zone_sel.selecting == "eyes")
if(user.zone_sel.selecting == BP_HEAD || user.zone_sel.selecting == O_EYES)
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
@@ -159,7 +159,7 @@
if(!istype(M, /mob))
return
if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask)
if(M == user && user.zone_sel.selecting == O_MOUTH && contents.len > 0 && !user.wear_mask)
var/obj/item/clothing/mask/smokable/cigarette/W = new /obj/item/clothing/mask/smokable/cigarette(user)
reagents.trans_to_obj(W, (reagents.total_volume/contents.len))
user.equip_to_slot_if_possible(W, slot_wear_mask)
@@ -252,7 +252,7 @@
if(!istype(M, /mob))
return
if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask)
if(M == user && user.zone_sel.selecting == O_MOUTH && contents.len > 0 && !user.wear_mask)
var/obj/item/clothing/mask/smokable/cigarette/cigar/W = new /obj/item/clothing/mask/smokable/cigarette/cigar(user)
reagents.trans_to_obj(W, (reagents.total_volume/contents.len))
user.equip_to_slot_if_possible(W, slot_wear_mask)
@@ -30,7 +30,7 @@
user.Weaken(3 * force)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, "head")
H.apply_damage(2*force, BRUTE, BP_HEAD)
else
user.take_organ_damage(2*force)
return
@@ -123,7 +123,7 @@
user.Weaken(3 * force)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, "head")
H.apply_damage(2*force, BRUTE, BP_HEAD)
else
user.take_organ_damage(2*force)
return
+6 -6
View File
@@ -7,9 +7,9 @@
/obj/item/weapon/tape_roll/attack(var/mob/living/carbon/human/H, var/mob/user)
if(istype(H))
if(user.zone_sel.selecting == "eyes")
if(user.zone_sel.selecting == O_EYES)
if(!H.organs_by_name["head"])
if(!H.organs_by_name[BP_HEAD])
user << "<span class='warning'>\The [H] doesn't have a head.</span>"
return
if(!H.has_eyes())
@@ -27,14 +27,14 @@
return
// Repeat failure checks.
if(!H || !src || !H.organs_by_name["head"] || !H.has_eyes() || H.glasses || (H.head && (H.head.body_parts_covered & FACE)))
if(!H || !src || !H.organs_by_name[BP_HEAD] || !H.has_eyes() || H.glasses || (H.head && (H.head.body_parts_covered & FACE)))
return
user.visible_message("<span class='danger'>\The [user] has taped up \the [H]'s eyes!</span>")
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/blindfold/tape(H), slot_glasses)
else if(user.zone_sel.selecting == "mouth" || user.zone_sel.selecting == "head")
if(!H.organs_by_name["head"])
else if(user.zone_sel.selecting == O_MOUTH || user.zone_sel.selecting == BP_HEAD)
if(!H.organs_by_name[BP_HEAD])
user << "<span class='warning'>\The [H] doesn't have a head.</span>"
return
if(!H.check_has_mouth())
@@ -52,7 +52,7 @@
return
// Repeat failure checks.
if(!H || !src || !H.organs_by_name["head"] || !H.check_has_mouth() || H.wear_mask || (H.head && (H.head.body_parts_covered & FACE)))
if(!H || !src || !H.organs_by_name[BP_HEAD] || !H.check_has_mouth() || H.wear_mask || (H.head && (H.head.body_parts_covered & FACE)))
return
user.visible_message("<span class='danger'>\The [user] has taped up \the [H]'s mouth!</span>")
+2 -2
View File
@@ -83,7 +83,7 @@
/obj/item/weapon/screwdriver/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M) || user.a_intent == "help")
return ..()
if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head")
if(user.zone_sel.selecting != O_EYES && user.zone_sel.selecting != BP_HEAD)
return ..()
if((CLUMSY in user.mutations) && prob(50))
M = user
@@ -333,7 +333,7 @@
var/safety = user:eyecheck()
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES]
if(!E)
return
switch(safety)
+2 -2
View File
@@ -45,7 +45,7 @@
var/mob/living/carbon/human/H = M ///////////////////////////////////// /Let's have this ready for later.
if(!(user.zone_sel.selecting == ("eyes" || "head"))) //////////////hitting anything else other than the eyes
if(!(user.zone_sel.selecting == (O_EYES || BP_HEAD))) //////////////hitting anything else other than the eyes
if(prob(33))
src.add_blood(H)
var/turf/location = H.loc
@@ -79,7 +79,7 @@
if(istype(protection) && (protection.body_parts_covered & FACE))
protected = 1
break
if(protected)
M << "<span class='warning'>You get slammed in the face with the tray, against your mask!</span>"
if(prob(33))
+5 -5
View File
@@ -140,15 +140,15 @@
switch(pick(list("ankle","wrist","head","knee","elbow")))
if("ankle")
affecting = H.get_organ(pick("l_foot", "r_foot"))
affecting = H.get_organ(pick(BP_L_FOOT, BP_R_FOOT))
if("knee")
affecting = H.get_organ(pick("l_leg", "r_leg"))
affecting = H.get_organ(pick(BP_L_LEG, BP_R_LEG))
if("wrist")
affecting = H.get_organ(pick("l_hand", "r_hand"))
affecting = H.get_organ(pick(BP_L_HAND, BP_R_HAND))
if("elbow")
affecting = H.get_organ(pick("l_arm", "r_arm"))
affecting = H.get_organ(pick(BP_L_ARM, BP_R_ARM))
if("head")
affecting = H.get_organ("head")
affecting = H.get_organ(BP_HEAD)
if(affecting)
M << "<span class='danger'>You land heavily on your [affecting.name]!</span>"
@@ -48,10 +48,10 @@
var/mob/living/carbon/xenos = user
var/mob/living/carbon/victim = M
if(istype(victim) && locate(/obj/item/organ/xenos/hivenode) in victim.internal_organs)
if(istype(victim) && locate(/obj/item/organ/internal/xenos/hivenode) in victim.internal_organs)
return
if(istype(xenos) && !(locate(/obj/item/organ/xenos/hivenode) in xenos.internal_organs))
if(istype(xenos) && !(locate(/obj/item/organ/internal/xenos/hivenode) in xenos.internal_organs))
return
if(M == usr)