diff --git a/aurora.dme b/aurora.dme
index e37f87e6..86733683 100644
--- a/aurora.dme
+++ b/aurora.dme
@@ -1240,7 +1240,6 @@
#include "code\modules\organs\organ_internal.dm"
#include "code\modules\organs\organ_objects.dm"
#include "code\modules\organs\pain.dm"
-#include "code\modules\organs\synth_skin.dm"
#include "code\modules\organs\wound.dm"
#include "code\modules\paperwork\carbonpaper.dm"
#include "code\modules\paperwork\clipboard.dm"
diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index 5536e6b4..454206da 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -1,41 +1,41 @@
-proc/valid_sprite_accessories(gender,species,test_list)
- var/list/valid = list()
- for(var/style in test_list)
- var/datum/sprite_accessory/S = test_list[style]
+proc/random_hair_style(gender, species = "Human")
+ var/h_style = "Bald"
+
+ var/list/valid_hairstyles = list()
+ for(var/hairstyle in hair_styles_list)
+ var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
+ if(gender == MALE && S.gender == FEMALE)
+ continue
+ if(gender == FEMALE && S.gender == MALE)
+ continue
if( !(species in S.species_allowed))
continue
- if (S.gender!=NEUTER)
- if (S.gender!=gender)
- continue
- valid[style] = S
- return valid
-
+ valid_hairstyles[hairstyle] = hair_styles_list[hairstyle]
-proc/get_valid_hairstyles(gender, species)
- return valid_sprite_accessories(gender,species,hair_styles_list)
-
-
-proc/get_valid_facialhairstyles(gender, species)
- return valid_sprite_accessories(gender,species,facial_hair_styles_list)
+ if(valid_hairstyles.len)
+ h_style = pick(valid_hairstyles)
-
-proc/random_hair_style(gender, species)
- var/h_style = "Bald"
- if (species)
- var/list/valid_hairstyles = get_valid_hairstyles(gender,species)
- if(valid_hairstyles.len)
- h_style = pick(valid_hairstyles)
return h_style
-
-proc/random_facial_hair_style(gender, species)
+proc/random_facial_hair_style(gender, species = "Human")
var/f_style = "Shaved"
- if (species)
- var/list/valid_facialhairstyles = get_valid_facialhairstyles(gender,species)
- if(valid_facialhairstyles.len)
- f_style = pick(valid_facialhairstyles)
- return f_style
-
+
+ var/list/valid_facialhairstyles = list()
+ for(var/facialhairstyle in facial_hair_styles_list)
+ var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
+ if(gender == MALE && S.gender == FEMALE)
+ continue
+ if(gender == FEMALE && S.gender == MALE)
+ continue
+ if( !(species in S.species_allowed))
+ continue
+
+ valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle]
+
+ if(valid_facialhairstyles.len)
+ f_style = pick(valid_facialhairstyles)
+
+ return f_style
proc/random_name(gender, species = "Human")
if(gender==FEMALE) return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm
index e13226e3..3bbd38bf 100644
--- a/code/__HELPERS/text.dm
+++ b/code/__HELPERS/text.dm
@@ -241,9 +241,6 @@ proc/checkhtml(var/t, var/whitelist = paper_tag_whitelist)
//Returns a string with the first element of the string capitalized.
/proc/capitalize(var/t as text)
return uppertext(copytext(t, 1, 2)) + copytext(t, 2)
-
-/proc/capitalized(var/t as text)
- return capitalize(lowertext(t))
//Centers text by adding spaces to either side of the string.
/proc/dd_centertext(message, length)
diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm
index d173eaea..b15a1116 100644
--- a/code/__HELPERS/type2type.dm
+++ b/code/__HELPERS/type2type.dm
@@ -81,15 +81,7 @@
while(length(hex) < placeholder)
hex = text("0[]", hex)
return hex
-
-/proc/colour_to_html(r,g,b)
- return "'#[num2hex(r)][num2hex(g)][num2hex(b)]'"
-
-
-/proc/htmlcolour_to_values(colour)
- return list(hex2num(copytext(colour, 2, 4)),hex2num(copytext(colour, 4, 6)),hex2num(copytext(colour, 6, 8)))
-
// Concatenates a list of strings into a single string. A seperator may optionally be provided.
/proc/list2text(list/ls, sep)
diff --git a/code/game/jobs/jobs.dm b/code/game/jobs/jobs.dm
index 79a43c30..221149cc 100644
--- a/code/game/jobs/jobs.dm
+++ b/code/game/jobs/jobs.dm
@@ -154,288 +154,3 @@ var/list/nonhuman_positions = list(
return titles
-
-
-// All this datum/preview/job stuff is for the preview icon when you're building your character.
-// See code\modules\mob\new_player\preferences_setup.dm for where it's used
-
-datum/preview/job
- var/job_type=null
- var/job_index=null
- var/uniform_icon='icons/mob/uniform.dmi'
- var/uniform_state="grey_s"
- var/mask_icon='icons/mob/mask.dmi'
- var/mask_state=null
- var/hat_state=null
- var/hat_icon='icons/mob/head.dmi'
- var/gloves_icon='icons/mob/hands.dmi'
- var/gloves_state=null
- var/shoes_icon='icons/mob/feet.dmi'
- var/shoes_state="black"
- var/jacket_icon='icons/mob/suit.dmi'
- var/jacket_state=null
- var/belt_icon='icons/mob/belt.dmi'
- var/belt_state=null
- var/backpack_01_icon='icons/mob/back.dmi'
- var/backpack_01_state="backpack"
- var/backpack_02_icon='icons/mob/back.dmi'
- var/backpack_02_state="satchel-norm"
- var/backpack_03_icon='icons/mob/back.dmi'
- var/backpack_03_state="satchel"
-
-datum/preview/job/proc/blend_icon(var/icon/result_icon, var/current_icon, var/current_state, var/blend_type)
- if (current_state)
- result_icon.Blend(new /icon(current_icon,current_state),blend_type)
-
-datum/preview/job/proc/create_clothes_icon(var/backpack_selection)
- var/icon/result=new /icon(uniform_icon, uniform_state)
- blend_icon(result,shoes_icon,shoes_state,ICON_UNDERLAY)
- blend_icon(result,gloves_icon,gloves_state,ICON_UNDERLAY)
- blend_icon(result,belt_icon,belt_state,ICON_OVERLAY)
- blend_icon(result,jacket_icon,jacket_state,ICON_OVERLAY)
- blend_icon(result,mask_icon,mask_state,ICON_OVERLAY)
- blend_icon(result,hat_icon,hat_state,ICON_OVERLAY)
- switch(backpack_selection)
- if(2)
- blend_icon(result,backpack_01_icon,backpack_01_state,ICON_OVERLAY)
- if(3)
- blend_icon(result,backpack_02_icon,backpack_02_state,ICON_OVERLAY)
- if(4)
- blend_icon(result,backpack_03_icon,backpack_03_state,ICON_OVERLAY)
- return result
-
-
-datum/preview/job/engsec
- job_type=ENGSEC
-
-datum/preview/job/engsec/captain
- job_index=CAPTAIN
- uniform_state="captain_s"
- shoes_state="brown"
- hat_state="captain"
- backpack_02_state="satchel-cap"
-
-datum/preview/job/engsec/security
- shoes_state="jackboots"
- gloves_state="bgloves"
- backpack_01_state="securitypack"
- backpack_02_state="satchel-sec"
-
-datum/preview/job/engsec/security/head_of_security
- job_index=HOS
- uniform_state="hosred_s"
- hat_state="hosberet"
-
-datum/preview/job/engsec/security/warden
- job_index=WARDEN
- uniform_state="warden_s"
-
-datum/preview/job/engsec/security/officer
- job_index=OFFICER
- uniform_state="secred_s"
-
-datum/preview/job/engsec/detective
- job_index=DETECTIVE
- uniform_state="wardentanclothes_s"
- gloves_state="bgloves"
-
-datum/preview/job/engsec/forensics
- job_index=FORENSICS
- uniform_state="polsuit_s"
- jacket_state="labcoat_open"
-
-datum/preview/job/engsec/chief_of_engineering
- job_index=CHIEF
- uniform_state="chief_s"
- shoes_state="brown"
- belt_state="utility"
- hat_state="hardhat0_white"
- backpack_01_state="engiepack"
- backpack_02_state="satchel-eng"
-
-datum/preview/job/engsec/engineer
- job_index=ENGINEER
- uniform_state="engine_s"
- shoes_state="orange"
- belt_state="utility"
- hat_state="hardhat0_yellow"
- backpack_01_state="engiepack"
- backpack_02_state="satchel-eng"
-
-datum/preview/job/engsec/atmospherics_tech
- job_index=ATMOSTECH
- uniform_state="atmos_s"
- shoes_state="black"
- gloves_state="bgloves"
- belt_state="utility"
-
-datum/preview/job/engsec/security/security_cadet
- job_index=INTERN_SEC
- uniform_state="redshirt2_s"
- hat_state="officerberet"
-
-datum/preview/job/engsec/security/engineering_assistant
- job_index=INTERN_ENG
- uniform_state="engine_s"
- shoes_state="orange"
- hat_state="e_beret_badge"
- backpack_01_state="engiepack"
- backpack_02_state="satchel-eng"
-
-datum/preview/job/engsec/ai
- job_index=AI
-
-datum/preview/job/engsec/cyborg
- job_index=CYBORG
-
-datum/preview/job/medsci
- job_type=MEDSCI
- shoes_state="white"
- jacket_state="labcoat_open"
-
-datum/preview/job/medsci/science
- backpack_02_state="satchel-tox"
- uniform_state="sciencewhite_s"
- jacket_state="labcoat_tox_open"
-
-datum/preview/job/medsci/science/research_director
- job_index=RD
- uniform_state="director_s"
- shoes_state="brown"
-
-datum/preview/job/medsci/science/scientist
- job_index=SCIENTIST
-
-datum/preview/job/medsci/science/xenobiologist
- job_index=XENOBIOLOGIST
-
-datum/preview/job/medsci/science/intern
- job_index=INTERN_SCI
- jacket_state=null
-
-datum/preview/job/medsci/chemist
- job_index=CHEMIST
- uniform_state="chemistrywhite_s"
- jacket_state="labcoat_chem_open"
- backpack_02_state="satchel-chem"
-
-datum/preview/job/medsci/medical
- backpack_01_state="medicalpack"
- backpack_02_state="satchel-med"
-
-datum/preview/job/medsci/medical/chief_medical_officer
- job_index=CMO
- uniform_state="cmo_s"
- shoes_state="brown"
- jacket_state="labcoat_cmo_open"
-
-datum/preview/job/medsci/medical/emt
- job_index=EMT
- uniform_state="emt_s"
- jacket_state="fr_jacket_open"
- backpack_01_state="emtpack"
- backpack_02_state="satchel-emt"
-
-datum/preview/job/medsci/medical/geneticist
- job_index=GENETICIST
- uniform_state="geneticswhite_s"
- jacket_state="labcoat_gen_open"
- backpack_01_state="backpack"
- backpack_02_state="satchel-gen"
-
-datum/preview/job/medsci/medical/virologist
- job_index=VIROLOGIST
- uniform_state="virologywhite_s"
- mask_state="sterile"
- jacket_state="labcoat_vir_open"
- backpack_02_state="satchel-vir"
-
-datum/preview/job/medsci/medical/intern
- job_index=INTERN_MED
- uniform_state="medical_s"
- jacket_state=null
-
-datum/preview/job/medsci/roboticist
- job_index=ROBOTICIST
- uniform_state="robotics_s"
- shoes_state="black"
- gloves_state="bgloves"
-
-datum/preview/job/civilian
- job_type=CIVILIAN
- shoes_state="black"
-
-datum/preview/job/civilian/head_of_personnel
- job_index=HOP
- uniform_state="hop_s"
- shoes_state="brown"
-
-datum/preview/job/civilian/bartender
- job_index=BARTENDER
- uniform_state="ba_suit_s"
-
-datum/preview/job/civilian/botanist
- job_index=BOTANIST
- uniform_state="hydroponics_s"
- gloves_state="ggloves"
- jacket_state="apron"
- backpack_02_state="satchel-hyd"
-
-datum/preview/job/civilian/chef
- job_index=CHEF
- uniform_state="chef_s"
- hat_state="chef"
-
-datum/preview/job/civilian/janitor
- job_index=JANITOR
- uniform_state="janitor_s"
-
-datum/preview/job/civilian/librarian
- job_index=LIBRARIAN
- uniform_state="red_suit_s"
-
-datum/preview/job/civilian/quartermaster
- job_index=QUARTERMASTER
- uniform_state="qm_s"
- shoes_state="brown"
- gloves_state="bgloves"
-
-datum/preview/job/civilian/cargo_tech
- job_index=CARGOTECH
- uniform_state="cargotech_s"
- gloves_state="bgloves"
- hat_state="flat_cap"
-
-datum/preview/job/civilian/miner
- job_index=MINER
- uniform_state="miner_s"
- gloves_state="bgloves"
- backpack_02_state="satchel-eng"
-
-datum/preview/job/civilian/internal_affairs
- job_index=LAWYER
- uniform_state="internalaffairs_s"
- shoes_state="brown"
-
-datum/preview/job/civilian/chaplain
- job_index=CHAPLAIN
- uniform_state="chapblack_s"
-
-var/list/job_preview_data=null
-proc/job_preview_list()
- if (!job_preview_data)
- job_preview_data=list()
- for(var/job_preview_type in typesof(/datum/preview/job)-/datum/preview/job)
- var/datum/preview/job/new_job = new job_preview_type()
- var/type_string="[new_job.job_type]"
- var/index_string="[new_job.job_index]"
- if(!(type_string in job_preview_data))
- job_preview_data[type_string]=list()
- if(new_job.job_index)
- job_preview_data[type_string][index_string]=new_job
- job_preview_data["DEFAULT"] = list(new/datum/preview/job())
- return job_preview_data
-
-proc/get_job_preview_for_index(job_type,job_index)
- var/list/preview_list=job_preview_list()
- return preview_list[job_type][job_index]
\ No newline at end of file
diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm
index 8508f849..92d137a5 100644
--- a/code/game/mecha/mech_fabricator.dm
+++ b/code/game/mecha/mech_fabricator.dm
@@ -51,7 +51,6 @@
/obj/item/robot_parts/robot_component/actuator,
/obj/item/robot_parts/robot_component/diagnosis_unit,
/obj/item/robot_parts/robot_component/camera,
- /obj/item/robot_parts/robot_component/law_computer,
/obj/item/robot_parts/robot_component/armour
),
"Ripley"=list(
@@ -119,21 +118,23 @@
// /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar
// /obj/item/mecha_parts/mecha_equipment/weapon/honker
),
+
"Robotic Upgrade Modules" = list(
/obj/item/borg/upgrade/reset,
/obj/item/borg/upgrade/rename,
/obj/item/borg/upgrade/restart,
/obj/item/borg/upgrade/vtec,
/obj/item/borg/upgrade/tasercooler,
- /obj/item/borg/upgrade/jetpack),
-
- "Synthetic Coverings" = list( /obj/item/weapon/synth_skin_spray,
- /obj/item/weapon/synth_skin_cartridge/paint,
- /obj/item/weapon/synth_skin_cartridge/skin,
- /obj/item/weapon/synth_skin_cartridge/fur,
- /obj/item/weapon/synth_skin_cartridge/scales),
-
- "Engineering Equipment"=list(/obj/item/mecha_parts/mecha_tracking))
+ /obj/item/borg/upgrade/jetpack
+ ),
+
+
+
+
+
+
+ "Engineering Equipment"=list(/obj/item/mecha_parts/mecha_tracking)
+ )
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index ea698991..a37b2f5f 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -9,17 +9,6 @@
var/list/construction_cost = list("metal"=20000,"glass"=5000)
var/list/part = null
var/sabotaged = 0 //Emagging limbs can have repercussions when installed as prosthetics.
-
-
-/obj/item/robot_parts/proc/attach_to_robot(mob/user as mob, obj/item/robot_parts/robot_suit/assembly as obj)
- user << "\red This is not used to construct robots."
-
-
-/obj/item/robot_parts/proc/move_into_robot(mob/user as mob, obj/item/robot_parts/robot_suit/assembly as obj)
- user.drop_item()
- src.loc = assembly
- assembly.updateicon()
-
/obj/item/robot_parts/l_arm
name = "robot left arm"
@@ -28,12 +17,6 @@
construction_time = 200
construction_cost = list("metal"=18000)
part = list("l_arm","l_hand")
- attach_to_robot(mob/user as mob, obj/item/robot_parts/robot_suit/assembly as obj)
- if(assembly.l_arm)
- return
- assembly.l_arm = src
- move_into_robot(user,assembly)
-
/obj/item/robot_parts/r_arm
name = "robot right arm"
@@ -42,11 +25,6 @@
construction_time = 200
construction_cost = list("metal"=18000)
part = list("r_arm","r_hand")
- attach_to_robot(mob/user as mob, obj/item/robot_parts/robot_suit/assembly as obj)
- if(assembly.r_arm)
- return
- assembly.r_arm = src
- move_into_robot(user,assembly)
/obj/item/robot_parts/l_leg
name = "robot left leg"
@@ -55,12 +33,6 @@
construction_time = 200
construction_cost = list("metal"=15000)
part = list("l_leg","l_foot")
- attach_to_robot(mob/user as mob, obj/item/robot_parts/robot_suit/assembly as obj)
- if(assembly.l_leg)
- return
- assembly.l_leg = src
- move_into_robot(user,assembly)
-
/obj/item/robot_parts/r_leg
name = "robot right leg"
@@ -69,12 +41,6 @@
construction_time = 200
construction_cost = list("metal"=15000)
part = list("r_leg","r_foot")
- attach_to_robot(mob/user as mob, obj/item/robot_parts/robot_suit/assembly as obj)
- if(assembly.r_leg)
- return
- assembly.r_leg = src
- move_into_robot(user,assembly)
-
/obj/item/robot_parts/chest
name = "robot torso"
@@ -84,18 +50,6 @@
construction_cost = list("metal"=40000)
var/wires = 0.0
var/obj/item/weapon/cell/cell = null
- attach_to_robot(mob/user as mob, obj/item/robot_parts/robot_suit/assembly as obj)
- if(assembly.chest)
- return
- if(!(src.wires && src.cell))
- if (!src.wires)
- user << "\blue You need to attach wires to it first!"
- if (!src.cell)
- user << "\blue You need to attach a cell to it first!"
- return
- assembly.chest = src
- move_into_robot(user,assembly)
-
/obj/item/robot_parts/head
name = "robot head"
@@ -103,17 +57,8 @@
icon_state = "head"
construction_time = 350
construction_cost = list("metal"=25000)
- var/obj/item/robot_parts/robot_component/camera/camera = null
- var/obj/item/robot_parts/robot_component/law_computer/law_computer = null
- attach_to_robot(mob/user as mob, obj/item/robot_parts/robot_suit/assembly as obj)
- if(assembly.head)
- return
- if(!src.camera)
- user << "\blue You need to attach a camera to it first!"
- return
- assembly.head = src
- move_into_robot(user,assembly)
-
+ var/obj/item/device/flash/flash1 = null
+ var/obj/item/device/flash/flash2 = null
/obj/item/robot_parts/robot_suit
name = "robot endoskeleton"
@@ -147,7 +92,6 @@
src.overlays += "r_leg+o"
if(src.head)
src.overlays += "head+o"
-
/obj/item/robot_parts/robot_suit/proc/check_completion()
if(src.l_arm && src.r_arm)
@@ -156,48 +100,9 @@
feedback_inc("cyborg_frames_built",1)
return 1
return 0
-
-
-/obj/item/robot_parts/robot_suit/proc/allowed_to_build(mob/user as mob, obj/item/device/mmi/brain as obj)
- if(!check_completion()) // not complete? not allowed
- return
- if(!check_allowed_to_install_brain(user,brain)) // not allowed to put the brain in there
- return
- return TRUE
-
-
-/obj/item/robot_parts/robot_suit/proc/check_allowed_to_install_brain(mob/user as mob, obj/item/device/mmi/brain as obj)
- if(!istype(loc,/turf))
- user << "\red You can't put the [brain] in, the frame has to be standing on the ground to be perfectly precise."
- return
- if(!brain.brainmob)
- user << "\red Sticking an empty [brain] into the frame would sort of defeat the purpose."
- return
- if(!brain.brainmob.key)
- var/ghost_can_reenter = 0
- if(brain.brainmob.mind)
- for(var/mob/dead/observer/G in player_list)
- if(G.can_reenter_corpse && G.mind == brain.brainmob.mind)
- ghost_can_reenter = 1
- break
- if(!ghost_can_reenter)
- user << "The [brain] is completely unresponsive; there's no point."
- return
- if(brain.brainmob.stat == DEAD)
- user << "\red Sticking a dead [brain] into the frame would sort of defeat the purpose."
- return
- if(brain.brainmob.mind in ticker.mode.head_revolutionaries)
- user << "\red The frame's firmware lets out a shrill sound, and flashes 'Abnormal Memory Engram'. It refuses to accept the [brain]."
- return
- if(jobban_isbanned(brain.brainmob, "Cyborg"))
- user << "\red This [brain] does not seem to fit."
- return
- return TRUE
-
-
+
/obj/item/robot_parts/robot_suit/attackby(obj/item/W as obj, mob/user as mob)
..()
- // HANDLE ED209 ASSEMBLY
if(istype(W, /obj/item/stack/sheet/metal) && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
B.loc = get_turf(src)
@@ -207,73 +112,132 @@
user.before_take_item(src)
user.put_in_inactive_hand(B)
del(src)
- // HANDLE RENAME
+ if(istype(W, /obj/item/robot_parts/l_leg))
+ if(src.l_leg) return
+ user.drop_item()
+ W.loc = src
+ src.l_leg = W
+ src.updateicon()
+
+ if(istype(W, /obj/item/robot_parts/r_leg))
+ if(src.r_leg) return
+ user.drop_item()
+ W.loc = src
+ src.r_leg = W
+ src.updateicon()
+
+ if(istype(W, /obj/item/robot_parts/l_arm))
+ if(src.l_arm) return
+ user.drop_item()
+ W.loc = src
+ src.l_arm = W
+ src.updateicon()
+
+ if(istype(W, /obj/item/robot_parts/r_arm))
+ if(src.r_arm) return
+ user.drop_item()
+ W.loc = src
+ src.r_arm = W
+ src.updateicon()
+
+ if(istype(W, /obj/item/robot_parts/chest))
+ if(src.chest) return
+ if(W:wires && W:cell)
+ user.drop_item()
+ W.loc = src
+ src.chest = W
+ src.updateicon()
+ else if(!W:wires)
+ user << "\blue You need to attach wires to it first!"
+ else
+ user << "\blue You need to attach a cell to it first!"
+
+ if(istype(W, /obj/item/robot_parts/head))
+ if(src.head) return
+ if(W:flash2 && W:flash1)
+ user.drop_item()
+ W.loc = src
+ src.head = W
+ src.updateicon()
+ else
+ user << "\blue You need to attach a flash to it first!"
+
+ if(istype(W, /obj/item/device/mmi))
+ var/obj/item/device/mmi/M = W
+ if(check_completion())
+ if(!istype(loc,/turf))
+ user << "\red You can't put the [W] in, the frame has to be standing on the ground to be perfectly precise."
+ return
+ if(!M.brainmob)
+ user << "\red Sticking an empty [W] into the frame would sort of defeat the purpose."
+ return
+ if(!M.brainmob.key)
+ var/ghost_can_reenter = 0
+ if(M.brainmob.mind)
+ for(var/mob/dead/observer/G in player_list)
+ if(G.can_reenter_corpse && G.mind == M.brainmob.mind)
+ ghost_can_reenter = 1
+ break
+ if(!ghost_can_reenter)
+ user << "The [W] is completely unresponsive; there's no point."
+ return
+
+ if(M.brainmob.stat == DEAD)
+ user << "\red Sticking a dead [W] into the frame would sort of defeat the purpose."
+ return
+
+ if(M.brainmob.mind in ticker.mode.head_revolutionaries)
+ user << "\red The frame's firmware lets out a shrill sound, and flashes 'Abnormal Memory Engram'. It refuses to accept the [W]."
+ return
+
+ if(jobban_isbanned(M.brainmob, "Cyborg"))
+ user << "\red This [W] does not seem to fit."
+ return
+
+ var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), unfinished = 1)
+ if(!O) return
+
+ user.drop_item()
+
+ O.mmi = W
+ O.invisibility = 0
+ O.custom_name = created_name
+ O.updatename("Default")
+
+ M.brainmob.mind.transfer_to(O)
+
+ if(O.mind && O.mind.special_role)
+ O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
+
+ O.job = "Cyborg"
+
+ O.cell = chest.cell
+ O.cell.loc = O
+ W.loc = O//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
+
+ // Since we "magically" installed a cell, we also have to update the correct component.
+ if(O.cell)
+ var/datum/robot_component/cell_component = O.components["power cell"]
+ cell_component.wrapped = O.cell
+ cell_component.installed = 1
+
+ feedback_inc("cyborg_birth",1)
+ O.Namepick()
+
+ del(src)
+ else
+ user << "\blue The MMI must go in after everything else!"
+
if (istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name, MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
return
- src.created_name = t
- // HANDLE PART ASSEMBLY
- if(istype(W,/obj/item/robot_parts))
- var/obj/item/robot_parts/part = W
- part.attach_to_robot(user,src)
- return
- // HANDLE ROBOT CREATION
- if(istype(W, /obj/item/device/mmi))
- var/obj/item/device/mmi/brain = W
- if (allowed_to_build(user,brain)) // we are allowed to build this robot
- user.drop_item() // drop this thing
- if (src.head.law_computer) // do we have a law computer? If so, we're making a standard robot
- create_robot(brain)
- else // otherwise we're making a shell
- create_shell(brain)
-
-
-/obj/item/robot_parts/robot_suit/proc/create_robot(obj/item/device/mmi/brain as obj)
- var/mob/living/silicon/robot/new_robot = new(get_turf(loc), unfinished = 1)
- if(!new_robot) // something has gone poorly
- return
- // move the brain
- new_robot.mmi = brain
- new_robot.invisibility = 0
- new_robot.custom_name = created_name
- new_robot.updatename("Default")
- brain.brainmob.mind.transfer_to(new_robot) // shove that mob in the mmi
- if(new_robot.mind && new_robot.mind.special_role)
- new_robot.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
- new_robot.job = "Cyborg"
- new_robot.cell = chest.cell
- new_robot.cell.loc = new_robot
- brain.loc = new_robot //Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
- if(new_robot.cell) // Since we "magically" installed a cell, we also have to update the correct component.
- var/datum/robot_component/cell_component = new_robot.components["power cell"]
- cell_component.wrapped = new_robot.cell
- cell_component.installed = 1
- feedback_inc("cyborg_birth",1)
- new_robot.Namepick()
- del(src)
-
-
-/obj/item/robot_parts/robot_suit/proc/create_shell(obj/item/device/mmi/brain as obj)
- var/mob/living/carbon/human/machine/new_shell = new(src.loc)
- var/key=brain.brainmob.mind.key
- brain.brainmob.mind.transfer_to(new_shell) // transfer brain
- var/datum/organ/internal/brain/robot/brain_datum=new_shell.internal_organs_by_name["brain"] // put the brain in the head
- brain_datum.machine_brain_type=brain.machine_brain_type
- new_shell.real_name=brain.brainmob.real_name
- give_option_to_rename(new_shell)
- del(brain)
- del(src)
-
-proc/give_option_to_rename(var/mob/living/carbon/human/new_shell)
- spawn(0)
- var/newname
- newname = input(new_shell,"You are a newly created humanoid robot. Enter a name.", "Name change","") as text
- if (newname != "")
- new_shell.fully_replace_character_name(new_shell.real_name,newname)
+ src.created_name = t
+
+ return
/obj/item/robot_parts/chest/attackby(obj/item/W as obj, mob/user as mob)
..()
@@ -297,47 +261,25 @@ proc/give_option_to_rename(var/mob/living/carbon/human/new_shell)
user << "\blue You insert the wire!"
return
-
-/obj/item/robot_parts/head/attack_hand(mob/user)
- var/obj/item/inactive_item = user.get_inactive_hand()
- if (src==inactive_item) // if we are clicking on this in our hand
- if(src.law_computer)
- src.law_computer.add_fingerprint(user)
- user.put_in_active_hand(src.law_computer)
- user << "You carefully remove \the [src.law_computer] from the head."
- src.law_computer = null
- return
- else if(src.camera)
- src.camera.add_fingerprint(user)
- user.put_in_active_hand(src.camera)
- user << "You carefully remove \the [src.camera] from the head."
- src.camera = null
- return
- return ..()
-
-
/obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/device/flash))
- user << "\red Why are you trying to put a weapon into a robots head? (use a camera component)" // should warn people who have done it the other way
- if(istype(W, /obj/item/robot_parts/robot_component/camera))
- if(src.camera)
- user << "\red You have already inserted the camera!"
+ if(istype(user,/mob/living/silicon/robot))
+ user << "\red How do you propose to do that?"
return
+ else if(src.flash1 && src.flash2)
+ user << "\blue You have already inserted the eyes!"
+ return
+ else if(src.flash1)
+ user.drop_item()
+ W.loc = src
+ src.flash2 = W
+ user << "\blue You insert the flash into the eye socket!"
else
user.drop_item()
W.loc = src
- src.camera = W
- user << "\blue You carefully insert the camera into the camera socket."
- else if(istype(W, /obj/item/robot_parts/robot_component/law_computer))
- if(src.law_computer)
- user << "\red You have already inserted a law computer!"
- return
- else
- user.drop_item()
- W.loc = src
- src.law_computer = W
- user << "\blue You carefully insert the law computer into the robots head. This will slave the robot to the station AI."
+ src.flash1 = W
+ user << "\blue You insert the flash into the eye socket!"
else if(istype(W, /obj/item/weapon/stock_parts/manipulator))
user << "\blue You install some manipulators and modify the head, creating a functional spider-bot!"
new /mob/living/simple_animal/spiderbot(get_turf(loc))
@@ -346,7 +288,6 @@ proc/give_option_to_rename(var/mob/living/carbon/human/new_shell)
del(src)
return
return
-
/obj/item/robot_parts/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/card/emag))
diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm
index 9cd1b0b2..fcd94603 100644
--- a/code/game/objects/items/weapons/surgery_tools.dm
+++ b/code/game/objects/items/weapons/surgery_tools.dm
@@ -21,6 +21,106 @@
w_class = 2.0
origin_tech = "materials=1;biotech=1"
+/*HAHA, SUCK IT, 2000 LINES OF SPAGHETTI CODE!
+
+NOW YOUR JOB IOS DONE BY ONLY 500 LINES OF SPAGHETTI CODE!
+
+LOOK FOR SURGERY.DM*/
+
+/*
+/obj/item/weapon/retractor/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
+ if(!istype(M))
+ return
+
+ var/mob/living/carbon/human/H = M
+ if(istype(H) && ( \
+ (H.head && H.head.flags & HEADCOVERSEYES) || \
+ (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
+ (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
+ ))
+ user << "\red You're going to need to remove that mask/helmet/glasses first."
+ return
+
+ var/mob/living/carbon/monkey/Mo = M
+ if(istype(Mo) && ( \
+ (Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
+ ))
+ user << "\red You're going to need to remove that mask/helmet/glasses first."
+ return
+
+ if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/slime))//Aliens don't have eyes./N
+ user << "\red You cannot locate any eyes on this creature!"
+ return
+
+ switch(M.eye_op_stage)
+ if(1.0)
+ if(M != user)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [M] is having his eyes retracted by [user].", 1)
+ M << "\red [user] begins to seperate your eyes with [src]!"
+ user << "\red You seperate [M]'s eyes with [src]!"
+ else
+ user.visible_message( \
+ "\red [user] begins to have his eyes retracted.", \
+ "\red You begin to pry open your eyes with [src]!" \
+ )
+ if(M == user && prob(25))
+ user << "\red You mess up!"
+ if(istype(M, /mob/living/carbon/human))
+ var/datum/organ/external/affecting = M:get_organ("head")
+ if(affecting.take_damage(15))
+ M:UpdateDamageIcon()
+ M.updatehealth()
+ else
+ M.take_organ_damage(15)
+
+ M:eye_op_stage = 2.0
+
+ else if(user.zone_sel.selecting == "chest")
+ switch(M:alien_op_stage)
+ if(3.0)
+ var/mob/living/carbon/human/H = M
+ if(!istype(H))
+ return ..()
+
+ if(H.wear_suit || H.w_uniform)
+ user << "\red You're going to need to remove that suit/jumpsuit first."
+ return
+
+ var/obj/item/alien_embryo/A = locate() in M.contents
+ if(!A)
+ return ..()
+ user.visible_message("\red [user] begins to pull something out of [M]'s chest.", "\red You begin to pull the alien organism out of [M]'s chest.")
+
+ spawn(20 + rand(0,50))
+ if(!A || A.loc != M)
+ return
+
+ if(M == user && prob(25))
+ user << "\red You mess up!"
+ if(istype(M, /mob/living/carbon/human))
+ var/datum/organ/external/affecting = M:get_organ("chest")
+ if(affecting.take_damage(30))
+ M:UpdateDamageIcon()
+ else
+ M.take_organ_damage(30)
+
+ if(A.stage > 3)
+ var/chance = 15 + max(0, A.stage - 3) * 10
+ if(prob(chance))
+ A.AttemptGrow(0)
+ M:alien_op_stage = 4.0
+
+ if(M)
+ user.visible_message("\red [user] pulls an alien organism out of [M]'s chest.", "\red You pull the alien organism out of [M]'s chest.")
+ A.loc = M.loc //alien embryo handles cleanup
+
+ else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
+ return ..()
+
+ return
+*/
+
/*
* Hemostat
*/
@@ -35,6 +135,125 @@
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "pinched")
+/*
+/obj/item/weapon/hemostat/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
+ if(!istype(M))
+ return
+
+ if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
+ return ..()
+
+ if(user.zone_sel.selecting == "groin")
+ if(istype(M, /mob/living/carbon/human))
+ switch(M:appendix_op_stage)
+ if(1.0)
+ if(M != user)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [user] is beginning to clamp bleeders in [M]'s abdomen cut open with [src].", 1)
+ M << "\red [user] begins to clamp bleeders in your abdomen with [src]!"
+ user << "\red You clamp bleeders in [M]'s abdomen with [src]!"
+ M:appendix_op_stage = 2.0
+ if(4.0)
+ if(M != user)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [user] is removing [M]'s appendix with [src].", 1)
+ M << "\red [user] begins to remove your appendix with [src]!"
+ user << "\red You remove [M]'s appendix with [src]!"
+ for(var/datum/disease/D in M.viruses)
+ if(istype(D, /datum/disease/appendicitis))
+ new /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed(get_turf(M))
+ M:appendix_op_stage = 5.0
+ return
+ new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(M))
+ M:appendix_op_stage = 5.0
+ return
+
+ if (user.zone_sel.selecting == "eyes")
+
+ var/mob/living/carbon/human/H = M
+ if(istype(H) && ( \
+ (H.head && H.head.flags & HEADCOVERSEYES) || \
+ (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
+ (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
+ ))
+ user << "\red You're going to need to remove that mask/helmet/glasses first."
+ return
+
+ var/mob/living/carbon/monkey/Mo = M
+ if(istype(Mo) && ( \
+ (Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
+ ))
+ user << "\red You're going to need to remove that mask/helmet/glasses first."
+ return
+
+ if(istype(M, /mob/living/carbon/alien))//Aliens don't have eyes./N
+ user << "\red You cannot locate any eyes on this creature!"
+ return
+
+ switch(M.eye_op_stage)
+ if(2.0)
+ if(M != user)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [M] is having his eyes mended by [user].", 1)
+ M << "\red [user] begins to mend your eyes with [src]!"
+ user << "\red You mend [M]'s eyes with [src]!"
+ else
+ user.visible_message( \
+ "\red [user] begins to have his eyes mended.", \
+ "\red You begin to mend your eyes with [src]!" \
+ )
+ if(M == user && prob(25))
+ user << "\red You mess up!"
+ if(istype(M, /mob/living/carbon/human))
+ var/datum/organ/external/affecting = M:get_organ("head")
+ if(affecting.take_damage(15))
+ M:UpdateDamageIcon()
+ M.updatehealth()
+ else
+ M.take_organ_damage(15)
+ M:eye_op_stage = 3.0
+
+ else if(user.zone_sel.selecting == "chest")
+ if(M:alien_op_stage == 2.0 || M:alien_op_stage == 3.0)
+ var/mob/living/carbon/human/H = M
+ if(!istype(H))
+ return ..()
+
+ if(H.wear_suit || H.w_uniform)
+ user << "\red You're going to need to remove that suit/jumpsuit first."
+ return
+
+ user.visible_message("\red [user] begins to dig around in [M]'s chest.", "\red You begin to dig around in [M]'s chest.")
+
+ spawn(20 + (M:alien_op_stage == 3 ? 0 : rand(0,50)))
+ if(M == user && prob(25))
+ user << "\red You mess up!"
+ if(istype(M, /mob/living/carbon/human))
+ var/datum/organ/external/affecting = M:get_organ("chest")
+ if(affecting.take_damage(30))
+ M:UpdateDamageIcon()
+ else
+ M.take_organ_damage(30)
+
+ var/obj/item/alien_embryo/A = locate() in M.contents
+ if(A)
+ var/dat = "\blue You found an unknown alien organism in [M]'s chest!"
+ if(A.stage < 4)
+ dat += " It's small and weak, barely the size of a foetus."
+ if(A.stage > 3)
+ dat += " It's grown quite large, and writhes slightly as you look at it."
+ if(prob(10))
+ A.AttemptGrow()
+ user << dat
+ M:alien_op_stage = 3.0
+ else
+ user << "\blue You find nothing of interest."
+
+ else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
+ return ..()
+
+ return
+*/
/*
* Cautery
@@ -50,6 +269,81 @@
origin_tech = "materials=1;biotech=1"
attack_verb = list("burnt")
+/*
+/obj/item/weapon/cautery/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
+ if(!istype(M))
+ return
+
+ if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
+ return ..()
+
+ if(user.zone_sel.selecting == "groin")
+ if(istype(M, /mob/living/carbon/human))
+ switch(M:appendix_op_stage)
+ if(5.0)
+ if(M != user)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [user] is beginning to cauterize the incision in [M]'s abdomen with [src].", 1)
+ M << "\red [user] begins to cauterize the incision in your abdomen with [src]!"
+ user << "\red You cauterize the incision in [M]'s abdomen with [src]!"
+ M:appendix_op_stage = 6.0
+ for(var/datum/disease/appendicitis in M.viruses)
+ appendicitis.cure()
+ return
+
+ if (user.zone_sel.selecting == "eyes")
+
+ var/mob/living/carbon/human/H = M
+ if(istype(H) && ( \
+ (H.head && H.head.flags & HEADCOVERSEYES) || \
+ (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
+ (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
+ ))
+ user << "\red You're going to need to remove that mask/helmet/glasses first."
+ return
+
+ var/mob/living/carbon/monkey/Mo = M
+ if(istype(Mo) && ( \
+ (Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
+ ))
+ user << "\red You're going to need to remove that mask/helmet/glasses first."
+ return
+
+ if(istype(M, /mob/living/carbon/alien))//Aliens don't have eyes./N
+ user << "\red You cannot locate any eyes on this creature!"
+ return
+
+ switch(M.eye_op_stage)
+ if(3.0)
+ if(M != user)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [M] is having his eyes cauterized by [user].", 1)
+ M << "\red [user] begins to cauterize your eyes!"
+ user << "\red You cauterize [M]'s eyes with [src]!"
+ else
+ user.visible_message( \
+ "\red [user] begins to have his eyes cauterized.", \
+ "\red You begin to cauterize your eyes!" \
+ )
+ if(M == user && prob(25))
+ user << "\red You mess up!"
+ if(istype(M, /mob/living/carbon/human))
+ var/datum/organ/external/affecting = M:get_organ("head")
+ if(affecting.take_damage(15))
+ M:UpdateDamageIcon()
+ M.updatehealth()
+ else
+ M.take_organ_damage(15)
+ M.sdisabilities &= ~BLIND
+ M.eye_stat = 0
+ M:eye_op_stage = 0.0
+
+ else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
+ return ..()
+
+ return
+*/
+
/*
* Surgical Drill
*/
@@ -97,6 +391,231 @@
"\red [user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.")
return (BRUTELOSS)
+/*
+/obj/item/weapon/scalpel/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
+ if(!istype(M))
+ return ..()
+
+ //if(M.mutations & HUSK) return ..()
+
+ if((CLUMSY in user.mutations) && prob(50))
+ M = user
+ return eyestab(M,user)
+
+ if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
+ return ..()
+
+ src.add_fingerprint(user)
+
+ if(user.zone_sel.selecting == "groin")
+ if(istype(M, /mob/living/carbon/human))
+ switch(M:appendix_op_stage)
+ if(0.0)
+ if(M != user)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [M] is beginning to have his abdomen cut open with [src] by [user].", 1)
+ M << "\red [user] begins to cut open your abdomen with [src]!"
+ user << "\red You cut [M]'s abdomen open with [src]!"
+ M:appendix_op_stage = 1.0
+ if(3.0)
+ if(M != user)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [M] is beginning to have his appendix seperated with [src] by [user].", 1)
+ M << "\red [user] begins to seperate your appendix with [src]!"
+ user << "\red You seperate [M]'s appendix with [src]!"
+ M:appendix_op_stage = 4.0
+ return
+
+ if(user.zone_sel.selecting == "head" || istype(M, /mob/living/carbon/slime))
+
+ var/mob/living/carbon/human/H = M
+ if(istype(H) && ( \
+ (H.head && H.head.flags & HEADCOVERSEYES) || \
+ (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
+ (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
+ ))
+ user << "\red You're going to need to remove that mask/helmet/glasses first."
+ return
+
+ var/mob/living/carbon/monkey/Mo = M
+ if(istype(Mo) && ( \
+ (Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
+ ))
+ user << "\red You're going to need to remove that mask/helmet/glasses first."
+ return
+
+ switch(M:brain_op_stage)
+ if(0.0)
+ if(istype(M, /mob/living/carbon/slime))
+ if(M.stat == 2)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [M.name] is beginning to have its flesh cut open with [src] by [user].", 1)
+ M << "\red [user] begins to cut open your flesh with [src]!"
+ user << "\red You cut [M]'s flesh open with [src]!"
+ M:brain_op_stage = 1.0
+
+ return
+
+ if(M != user)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [M] is beginning to have his head cut open with [src] by [user].", 1)
+ M << "\red [user] begins to cut open your head with [src]!"
+ user << "\red You cut [M]'s head open with [src]!"
+ else
+ user.visible_message( \
+ "\red [user] begins to cut open his skull with [src]!", \
+ "\red You begin to cut open your head with [src]!" \
+ )
+
+ if(M == user && prob(25))
+ user << "\red You mess up!"
+ if(istype(M, /mob/living/carbon/human))
+ var/datum/organ/external/affecting = M:get_organ("head")
+ if(affecting.take_damage(15))
+ M:UpdateDamageIcon()
+ else
+ M.take_organ_damage(15)
+
+ if(istype(M, /mob/living/carbon/human))
+ var/datum/organ/external/affecting = M:get_organ("head")
+ affecting.take_damage(7)
+ else
+ M.take_organ_damage(7)
+
+ M.updatehealth()
+ M:brain_op_stage = 1.0
+
+ if(1)
+ if(istype(M, /mob/living/carbon/slime))
+ if(M.stat == 2)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [M.name] is having its silky innards cut apart with [src] by [user].", 1)
+ M << "\red [user] begins to cut apart your innards with [src]!"
+ user << "\red You cut [M]'s silky innards apart with [src]!"
+ M:brain_op_stage = 2.0
+ return
+ if(2.0)
+ if(istype(M, /mob/living/carbon/slime))
+ if(M.stat == 2)
+ var/mob/living/carbon/slime/slime = M
+ if(slime.cores > 0)
+ if(istype(M, /mob/living/carbon/slime))
+ user << "\red You attempt to remove [M]'s core, but [src] is ineffective!"
+ return
+
+ if(M != user)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [M] is having his connections to the brain delicately severed with [src] by [user].", 1)
+ M << "\red [user] begins to cut open your head with [src]!"
+ user << "\red You cut [M]'s head open with [src]!"
+ else
+ user.visible_message( \
+ "\red [user] begin to delicately remove the connections to his brain with [src]!", \
+ "\red You begin to cut open your head with [src]!" \
+ )
+ if(M == user && prob(25))
+ user << "\red You nick an artery!"
+ if(istype(M, /mob/living/carbon/human))
+ var/datum/organ/external/affecting = M:get_organ("head")
+ if(affecting.take_damage(75))
+ M:UpdateDamageIcon()
+ else
+ M.take_organ_damage(75)
+
+ if(istype(M, /mob/living/carbon/human))
+ var/datum/organ/external/affecting = M:get_organ("head")
+ affecting.take_damage(7)
+ else
+ M.take_organ_damage(7)
+
+ M.updatehealth()
+ M:brain_op_stage = 3.0
+ else
+ ..()
+ return
+
+ else if(user.zone_sel.selecting == "eyes")
+ user << "\blue So far so good."
+
+ var/mob/living/carbon/human/H = M
+ if(istype(H) && ( \
+ (H.head && H.head.flags & HEADCOVERSEYES) || \
+ (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
+ (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
+ ))
+ user << "\red You're going to need to remove that mask/helmet/glasses first."
+ return
+
+ var/mob/living/carbon/monkey/Mo = M
+ if(istype(Mo) && ( \
+ (Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
+ ))
+ user << "\red You're going to need to remove that mask/helmet/glasses first."
+ return
+
+ if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/slime))//Aliens don't have eyes./N
+ user << "\red You cannot locate any eyes on this creature!"
+ return
+
+ switch(M:eye_op_stage)
+ if(0.0)
+ if(M != user)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [M] is beginning to have his eyes incised with [src] by [user].", 1)
+ M << "\red [user] begins to cut open your eyes with [src]!"
+ user << "\red You make an incision around [M]'s eyes with [src]!"
+ else
+ user.visible_message( \
+ "\red [user] begins to cut around his eyes with [src]!", \
+ "\red You begin to cut open your eyes with [src]!" \
+ )
+ if(M == user && prob(25))
+ user << "\red You mess up!"
+ if(istype(M, /mob/living/carbon/human))
+ var/datum/organ/external/affecting = M:get_organ("head")
+ if(affecting.take_damage(15))
+ M:UpdateDamageIcon()
+ else
+ M.take_organ_damage(15)
+
+ user << "\blue So far so good before."
+ M.updatehealth()
+ M:eye_op_stage = 1.0
+ user << "\blue So far so good after."
+
+ else if(user.zone_sel.selecting == "chest")
+ switch(M:alien_op_stage)
+ if(0.0)
+ var/mob/living/carbon/human/H = M
+ if(!istype(H))
+ return ..()
+
+ if(H.wear_suit || H.w_uniform)
+ user << "\red You're going to need to remove that suit/jumpsuit first."
+ return
+
+ user.visible_message("\red [user] begins to slice open [M]'s chest.", "\red You begin to slice open [M]'s chest.")
+
+ spawn(rand(20,50))
+ if(M == user && prob(25))
+ user << "\red You mess up!"
+ if(istype(M, /mob/living/carbon/human))
+ var/datum/organ/external/affecting = M:get_organ("chest")
+ if(affecting.take_damage(15))
+ M:UpdateDamageIcon()
+ else
+ M.take_organ_damage(15)
+
+ M:alien_op_stage = 1.0
+ user << "\blue So far so good."
+
+ else
+ return ..()
+/* wat
+ else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
+ return ..()*/
+ return
+*/
/*
* Researchable Scalpels
@@ -148,6 +667,157 @@
sharp = 1
edge = 1
+/*
+/obj/item/weapon/circular_saw/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
+ if(!istype(M))
+ return ..()
+
+ if((CLUMSY in user.mutations) && prob(50))
+ M = user
+ return eyestab(M,user)
+
+ if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
+ return ..()
+
+ src.add_fingerprint(user)
+
+ if(user.zone_sel.selecting == "head" || istype(M, /mob/living/carbon/slime))
+
+ var/mob/living/carbon/human/H = M
+ if(istype(H) && ( \
+ (H.head && H.head.flags & HEADCOVERSEYES) || \
+ (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
+ (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
+ ))
+ user << "\red You're going to need to remove that mask/helmet/glasses first."
+ return
+
+ var/mob/living/carbon/monkey/Mo = M
+ if(istype(Mo) && ( \
+ (Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
+ ))
+ user << "\red You're going to need to remove that mask/helmet/glasses first."
+ return
+
+ switch(M:brain_op_stage)
+ if(1.0)
+ if(istype(M, /mob/living/carbon/slime))
+ return
+ if(M != user)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [M] has his skull sawed open with [src] by [user].", 1)
+ M << "\red [user] begins to saw open your head with [src]!"
+ user << "\red You saw [M]'s head open with [src]!"
+ else
+ user.visible_message( \
+ "\red [user] saws open his skull with [src]!", \
+ "\red You begin to saw open your head with [src]!" \
+ )
+ if(M == user && prob(25))
+ user << "\red You mess up!"
+ if(istype(M, /mob/living/carbon/human))
+ var/datum/organ/external/affecting = M:get_organ("head")
+ if(affecting.take_damage(40))
+ M:UpdateDamageIcon()
+ M.updatehealth()
+ else
+ M.take_organ_damage(40)
+
+ if(istype(M, /mob/living/carbon/human))
+ var/datum/organ/external/affecting = M:get_organ("head")
+ affecting.take_damage(7)
+ else
+ M.take_organ_damage(7)
+
+ M.updatehealth()
+ M:brain_op_stage = 2.0
+
+ if(2.0)
+ if(istype(M, /mob/living/carbon/slime))
+ if(M.stat == 2)
+ var/mob/living/carbon/slime/slime = M
+ if(slime.cores > 0)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [M.name] is having one of its cores sawed out with [src] by [user].", 1)
+
+ slime.cores--
+ M << "\red [user] begins to remove one of your cores with [src]! ([slime.cores] cores remaining)"
+ user << "\red You cut one of [M]'s cores out with [src]! ([slime.cores] cores remaining)"
+
+ new slime.coretype(M.loc)
+
+ if(slime.cores <= 0)
+ M.icon_state = "[slime.colour] baby slime dead-nocore"
+
+ return
+
+ if(3.0)
+ /*if(M.mind && M.mind.changeling)
+ user << "\red The neural tissue regrows before your eyes as you cut it."
+ return*/
+
+ if(M != user)
+ for(var/mob/O in (viewers(M) - user - M))
+ O.show_message("\red [M] has his spine's connection to the brain severed with [src] by [user].", 1)
+ M << "\red [user] severs your brain's connection to the spine with [src]!"
+ user << "\red You sever [M]'s brain's connection to the spine with [src]!"
+ else
+ user.visible_message( \
+ "\red [user] severs his brain's connection to the spine with [src]!", \
+ "\red You sever your brain's connection to the spine with [src]!" \
+ )
+
+ user.attack_log += "\[[time_stamp()]\] Debrained [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])"
+ M.attack_log += "\[[time_stamp()]\] Debrained by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])"
+
+ log_attack("[user.name] ([user.ckey]) debrained [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
+
+
+ var/obj/item/brain/B = new(M.loc)
+ B.transfer_identity(M)
+
+ M:brain_op_stage = 4.0
+ M.death()//You want them to die after the brain was transferred, so not to trigger client death() twice.
+
+ else
+ ..()
+ return
+
+ else if(user.zone_sel.selecting == "chest")
+ switch(M:alien_op_stage)
+ if(1.0)
+ var/mob/living/carbon/human/H = M
+ if(!istype(H))
+ return ..()
+
+ if(H.wear_suit || H.w_uniform)
+ user << "\red You're going to need to remove that suit/jumpsuit first."
+ return
+
+ user.visible_message("\red [user] begins to slice through the bone of [M]'s chest.", "\red You begin to slice through the bone of [M]'s chest.")
+
+ spawn(20 + rand(0,50))
+ if(M == user && prob(25))
+ user << "\red You mess up!"
+ if(istype(M, /mob/living/carbon/human))
+ var/datum/organ/external/affecting = M:get_organ("chest")
+ if(affecting.take_damage(15))
+ M:UpdateDamageIcon()
+ else
+ M.take_organ_damage(15)
+
+ M:alien_op_stage = 2.0
+ user << "\blue So far so good."
+
+ else
+ return ..()
+/*
+ else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
+ return ..()
+*/
+ return
+*/
+
//misc, formerly from code/defines/weapons.dm
/obj/item/weapon/bonegel
name = "bone gel"
diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm
index 00f2df03..21071711 100644
--- a/code/game/objects/structures/mirror.dm
+++ b/code/game/objects/structures/mirror.dm
@@ -14,35 +14,43 @@
if(ishuman(user))
var/mob/living/carbon/human/H = user
+
var/userloc = H.loc
-
- var/list/hair_styles = H.valid_hairstyles_for_this_mob()
- var/list/facial_styles = H.valid_facialhairstyles_for_this_mob()
-
- if (facial_styles.len > 1) //handle facial hair (if necessary)
- var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in facial_styles
+
+ //see code/modules/mob/new_player/preferences.dm at approx line 545 for comments!
+ //this is largely copypasted from there.
+
+ //handle facial hair (if necessary)
+ if(H.gender == MALE)
+ var/list/species_facial_hair = list()
+ if(H.species)
+ for(var/i in facial_hair_styles_list)
+ var/datum/sprite_accessory/facial_hair/tmp_facial = facial_hair_styles_list[i]
+ if(H.species.name in tmp_facial.species_allowed)
+ species_facial_hair += i
+ else
+ species_facial_hair = facial_hair_styles_list
+
+ var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in species_facial_hair
if(userloc != H.loc) return //no tele-grooming
if(new_style)
H.f_style = new_style
//handle normal hair
- if (hair_styles.len)
- var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in hair_styles
- if(userloc != H.loc) return //no tele-grooming
- if(new_style)
- H.h_style = new_style
-
- //machines can change their eye colours in the mirror
- if (istype(H.species,/datum/species/machine))
- var/new_eyes = input(user, "Choose your new eye colour.", "Robotic Eyes") as color|null
- if(new_eyes)
- var/list/new_eyes_as_values = htmlcolour_to_values(new_eyes)
- H.r_eyes=new_eyes_as_values[1]
- H.g_eyes=new_eyes_as_values[2]
- H.b_eyes=new_eyes_as_values[3]
- H.update_hair() // need to do a full rebuild here
- H.update_body()
- return
+ var/list/species_hair = list()
+ if(H.species)
+ for(var/i in hair_styles_list)
+ var/datum/sprite_accessory/hair/tmp_hair = hair_styles_list[i]
+ if(H.species.name in tmp_hair.species_allowed)
+ species_hair += i
+ else
+ species_hair = hair_styles_list
+
+ var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in species_hair
+ if(userloc != H.loc) return //no tele-grooming
+ if(new_style)
+ H.h_style = new_style
+
H.update_hair()
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index a5ee273a..dd6963e3 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -78,8 +78,6 @@ datum/preferences
var/species = "Human" //Species datum to use.
var/language = "None" //Secondary language
var/list/gear //Custom/fluff item loadout.
- var/covering_type = null //synth covering type
- var/machine_brain_type = "Posibrain" //synth brain type
//Some faction information.
var/home_system = "Unset" //System of birth.
@@ -242,212 +240,226 @@ datum/preferences
/datum/preferences/proc/ShowChoices(mob/user)
if(!user || !user.client) return
update_preview_icon()
+ user << browse_rsc(preview_icon_front, "previewicon.png")
user << browse_rsc(preview_icon_side, "previewicon2.png")
- user << browse_rsc(preview_icon_front, "previewicon1.png")
- spawn(0)
- var/dat = "
"
+ var/dat = ""
- if(path)
- dat += ""
- dat += "Slot [slot_name] - "
- dat += "Load slot - "
- dat += "Save slot - "
- dat += "Reload slot"
- dat += ""
+ if(path)
+ dat += ""
+ dat += "Slot [slot_name] - "
+ dat += "Load slot - "
+ dat += "Save slot - "
+ dat += "Reload slot"
+ dat += ""
- else
- dat += "Please create an account to save your preferences."
+ else
+ dat += "Please create an account to save your preferences."
- dat += "
"
+ dat += "
"
- dat += "Name: "
- dat += "[real_name] "
- dat += "(Random Name) "
- dat += "(Always Random Name: [be_random_name ? "Yes" : "No"])"
+ dat += "Name: "
+ dat += "[real_name] "
+ dat += "(Random Name) "
+ dat += "(Always Random Name: [be_random_name ? "Yes" : "No"])"
+ dat += " "
+
+ dat += "Gender: [gender == MALE ? "Male" : "Female"] "
+ dat += "Age: [age] "
+ dat += "Spawn Point: [spawnpoint]"
+
+ dat += " "
+ dat += "UI Style: [UI_style] "
+ dat += "Custom UI(recommended for White UI): "
+ dat += "-Color: [UI_style_color] "
+ dat += "-Alpha(transparency): [UI_style_alpha] "
+ dat += "Play admin midis: [(toggles & SOUND_MIDI) ? "Yes" : "No"] "
+ dat += "Play lobby music: [(toggles & SOUND_LOBBY) ? "Yes" : "No"] "
+ dat += "Ghost ears: [(toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"] "
+ dat += "Ghost sight: [(toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"] "
+ dat += "Ghost radio: [(toggles & CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"] "
+
+ if(config.allow_Metadata)
+ dat += "OOC Notes: Edit "
+
+ dat += " Custom Loadout: "
+ var/total_cost = 0
+
+ if(isnull(gear) || !islist(gear)) gear = list()
+
+ if(gear && gear.len)
dat += " "
+ for(var/gear_name in gear)
+ if(gear_datums[gear_name])
+ var/datum/gear/G = gear_datums[gear_name]
+ total_cost += G.cost
+ dat += "[gear_name] \[remove\] "
- dat += "Gender: [gender == MALE ? "Male" : "Female"] "
- dat += "Age: [age] "
- dat += "Spawn Point: [spawnpoint]"
-
- dat += " "
- dat += "UI Style: [UI_style] "
- dat += "Custom UI(recommended for White UI): "
- dat += "-Color: [UI_style_color] "
- dat += "-Alpha(transparency): [UI_style_alpha] "
- dat += "Play admin midis: [(toggles & SOUND_MIDI) ? "Yes" : "No"] "
- dat += "Play lobby music: [(toggles & SOUND_LOBBY) ? "Yes" : "No"] "
- dat += "Ghost ears: [(toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"] "
- dat += "Ghost sight: [(toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"] "
- dat += "Ghost radio: [(toggles & CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"] "
-
- if(config.allow_Metadata)
- dat += "OOC Notes: Edit "
-
- dat += " Custom Loadout: "
- var/total_cost = 0
-
- if(isnull(gear) || !islist(gear)) gear = list()
+ dat += "Used: [total_cost] points."
+ else
+ dat += "none."
+ if(total_cost < MAX_GEAR_COST)
+ dat += " \[add\]"
if(gear && gear.len)
- dat += " "
- for(var/gear_name in gear)
- if(gear_datums[gear_name])
- var/datum/gear/G = gear_datums[gear_name]
- total_cost += G.cost
- dat += "[gear_name] \[remove\] "
+ dat += " \[remove\]"
- dat += "Used: [total_cost] points."
- else
- dat += "none."
+ dat += "
Occupation Choices "
+ dat += "\tSet Preferences "
- if(total_cost < MAX_GEAR_COST)
- dat += " \[add\]"
- if(gear && gear.len)
- dat += " \[remove\]"
+ dat += "
Body "
+ dat += "(®)"
+ dat += " "
+ dat += "Species: [species] "
+ dat += "Secondary Language: [language] "
+ dat += "Blood Type: [b_type] "
+ dat += "Skin Tone: [-s_tone + 35]/220 "
+ //dat += "Skin pattern: Adjust "
+ dat += "Needs Glasses: [disabilities == 0 ? "No" : "Yes"] "
+ dat += "Limbs: Adjust "
+ dat += "Internal Organs: Adjust "
- dat += "
Occupation Choices "
- dat += "\tSet Preferences "
-
- dat += "
Body "
- dat += "(®)"
- dat += " "
- dat += "Species: [species] "
- dat += "Secondary Language: [language] "
- dat += "Blood Type: [b_type] "
- dat += "Skin Tone: [-s_tone + 35]/220 "
- //dat += "Skin pattern: Adjust "
- dat += "Needs Glasses: [disabilities == 0 ? "No" : "Yes"] "
- if (species=="Machine") // brain and covering type for shells
- dat += "Brain Type: [machine_brain_type] "
- dat += "Exterior Coating: [isnull(covering_type) ? "None" : covering_type] "
- dat += "Limbs: Adjust "
- dat += "Internal Organs: Adjust "
-
- //display limbs below
- var/ind = 0
- var/list/organ_names = get_limb_name_to_descriptive_name()
- var/mechanical_organ_string = (species!="Machine" ? "Mechanical" : "Custom")
- for(var/name in organ_data)
- var/status = organ_data[name]
- var/organ_name = organ_names[name]
- if(status == "amputated")
- ++ind
- if(ind > 1)
- dat += ", "
- dat += "\tAmputated [organ_name]"
- else if(status == "mechanical")
- ++ind
- if(ind > 1)
- dat += ", "
- dat += "\tMechanical [organ_name]"
- else if(status == "assisted")
- ++ind
- if(ind > 1)
- dat += ", "
- switch(organ_name)
- if("heart")
- dat += "\tPacemaker-assisted [organ_name]"
- if("voicebox") //on adding voiceboxes for speaking skrell/similar replacements
- dat += "\tSurgically altered [organ_name]"
- if("eyes")
- dat += "\tRetinal overlayed [organ_name]"
- else
- dat += "\tMechanically assisted [organ_name]"
- var/list/status_as_list=status
- if (istype(status_as_list)) // we got a robot here
- ++ind
- if(ind > 1)
- dat += ", "
- dat += "\t[mechanical_organ_string] [organ_name]"
- if (status_as_list[1]!="None")
- dat += " covered in [lowertext(status_as_list[1])]"
- if(!ind)
- dat += "\[...\]
"
- else
- dat += ".
"
-
- if(gender == MALE)
- dat += "Underwear: [underwear_m[underwear]] "
- else
- dat += "Underwear: [underwear_f[underwear]] "
-
- dat += "Undershirt: [undershirt_t[undershirt]] "
-
- dat += "Backpack Type: [backbaglist[backbag]] "
-
- dat += "Nanotrasen Relation: [nanotrasen_relation] "
-
- dat += " | Preview
  | "
-
- dat += " | "
-
- if(jobban_isbanned(user, "Records"))
- dat += "You are banned from using character records. "
- else
- dat += "Character Records "
-
- dat += "Set Antag Options "
-
- dat += "\tSet Skills ([GetSkillClass(used_skillpoints)][used_skillpoints > 0 ? " [used_skillpoints]" : "0"]) "
-
- dat += "Set Flavor Text "
-
- dat += "pAI Configuration "
- dat += " "
-
- dat += "Character's Signature "
- dat += "Edit Font Help "
- dat += "[signature] "
-
-
- dat += " Hair "
- dat += "Change Color "
- dat += " Style: [h_style] "
-
- dat += " Facial "
- dat += "Change Color "
- dat += " Style: [f_style] "
-
- dat += " Eyes "
- dat += "Change Color "
-
- dat += " Body Color "
- dat += "Change Color "
-
- dat += "
Background Information "
- dat += "Home system: [home_system] "
- dat += "Citizenship: [citizenship] "
- dat += "Faction: [faction] "
- dat += "Religion: [religion] "
+ //display limbs below
+ var/ind = 0
+ for(var/name in organ_data)
+ //world << "[ind] \ [organ_data.len]"
+ var/status = organ_data[name]
+ var/organ_name = null
+ switch(name)
+ if("l_arm")
+ organ_name = "left arm"
+ if("r_arm")
+ organ_name = "right arm"
+ if("l_leg")
+ organ_name = "left leg"
+ if("r_leg")
+ organ_name = "right leg"
+ if("l_foot")
+ organ_name = "left foot"
+ if("r_foot")
+ organ_name = "right foot"
+ if("l_hand")
+ organ_name = "left hand"
+ if("r_hand")
+ organ_name = "right hand"
+ if("heart")
+ organ_name = "heart"
+ if("eyes")
+ organ_name = "eyes"
+ if(status == "cyborg")
+ ++ind
+ if(ind > 1)
+ dat += ", "
+ dat += "\tMechanical [organ_name] prothesis"
+ else if(status == "amputated")
+ ++ind
+ if(ind > 1)
+ dat += ", "
+ dat += "\tAmputated [organ_name]"
+ else if(status == "mechanical")
+ ++ind
+ if(ind > 1)
+ dat += ", "
+ dat += "\tMechanical [organ_name]"
+ else if(status == "assisted")
+ ++ind
+ if(ind > 1)
+ dat += ", "
+ switch(organ_name)
+ if("heart")
+ dat += "\tPacemaker-assisted [organ_name]"
+ if("voicebox") //on adding voiceboxes for speaking skrell/similar replacements
+ dat += "\tSurgically altered [organ_name]"
+ if("eyes")
+ dat += "\tRetinal overlayed [organ_name]"
+ else
+ dat += "\tMechanically assisted [organ_name]"
+ if(!ind)
+ dat += "\[...\]
"
+ else
dat += "
"
- if(jobban_isbanned(user, "Syndicate"))
- dat += "You are banned from antagonist roles."
- src.be_special = 0
- else
- var/n = 0
- for (var/i in special_roles)
- if(special_roles[i]) //if mode is available on the server
- if(jobban_isbanned(user, i))
+ if(gender == MALE)
+ dat += "Underwear: [underwear_m[underwear]] "
+ else
+ dat += "Underwear: [underwear_f[underwear]] "
+
+ dat += "Undershirt: [undershirt_t[undershirt]] "
+
+ dat += "Backpack Type: [backbaglist[backbag]] "
+
+ dat += "Nanotrasen Relation: [nanotrasen_relation] "
+
+ dat += " | Preview
  | "
+
+ dat += " | "
+
+ if(jobban_isbanned(user, "Records"))
+ dat += "You are banned from using character records. "
+ else
+ dat += "Character Records "
+
+ dat += "Set Antag Options "
+
+ dat += "\tSet Skills ([GetSkillClass(used_skillpoints)][used_skillpoints > 0 ? " [used_skillpoints]" : "0"]) "
+
+ dat += "Set Flavor Text "
+
+ dat += "pAI Configuration "
+ dat += " "
+
+ dat += "Character's Signature "
+ dat += "Edit Font Help "
+ dat += "[signature] "
+
+
+ dat += " Hair "
+ dat += "Change Color "
+ dat += " Style: [h_style] "
+
+ dat += " Facial "
+ dat += "Change Color "
+ dat += " Style: [f_style] "
+
+ dat += " Eyes "
+ dat += "Change Color "
+
+ dat += " Body Color "
+ dat += "Change Color "
+
+ dat += "
Background Information "
+ dat += "Home system: [home_system] "
+ dat += "Citizenship: [citizenship] "
+ dat += "Faction: [faction] "
+ dat += "Religion: [religion] "
+
+ dat += "
"
+
+ if(jobban_isbanned(user, "Syndicate"))
+ dat += "You are banned from antagonist roles."
+ src.be_special = 0
+ else
+ var/n = 0
+ for (var/i in special_roles)
+ if(special_roles[i]) //if mode is available on the server
+ if(jobban_isbanned(user, i))
+ dat += "Be [i]: \[BANNED] "
+ else if(i == "pai candidate")
+ if(jobban_isbanned(user, "pAI"))
dat += "Be [i]: \[BANNED] "
- else if(i == "pai candidate")
- if(jobban_isbanned(user, "pAI"))
- dat += "Be [i]: \[BANNED] "
- else
- dat += "Be [i]: [src.be_special&(1< "
- n++
- dat += " |
"
+ else
+ dat += "Be [i]: [src.be_special&(1< "
+ n++
+ dat += " |
"
- if(!IsGuestKey(user.key))
- dat += "Undo - "
- dat += "Save Setup - "
+ if(!IsGuestKey(user.key))
+ dat += "Undo - "
+ dat += "Save Setup - "
- dat += "Reset Setup"
- dat += ""
+ dat += "Reset Setup"
+ dat += ""
- user << browse(dat, "window=preferences;size=560x736")
+ user << browse(dat, "window=preferences;size=560x736")
/datum/preferences/proc/SetChoices(mob/user, limit = 16, list/splitJobs = list("Chief Medical Officer"), width = 550, height = 660)
if(!job_master)
@@ -1100,7 +1112,6 @@ datum/preferences
if(new_age)
age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN)
if("species")
- config.usealienwhitelist=0 // REMOVE ME
var/list/new_species = list("Human")
var/prev_species = species
@@ -1120,8 +1131,41 @@ datum/preferences
if(prev_species != species)
//grab one of the valid hair styles for the newly chosen species
- h_style = random_hair_style(gender,get_hair_species())
- f_style = random_facial_hair_style(gender,get_hair_species())
+ var/list/valid_hairstyles = list()
+ for(var/hairstyle in hair_styles_list)
+ var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
+ if(gender == MALE && S.gender == FEMALE)
+ continue
+ if(gender == FEMALE && S.gender == MALE)
+ continue
+ if( !(species in S.species_allowed))
+ continue
+ valid_hairstyles[hairstyle] = hair_styles_list[hairstyle]
+
+ if(valid_hairstyles.len)
+ h_style = pick(valid_hairstyles)
+ else
+ //this shouldn't happen
+ h_style = hair_styles_list["Bald"]
+
+ //grab one of the valid facial hair styles for the newly chosen species
+ var/list/valid_facialhairstyles = list()
+ for(var/facialhairstyle in facial_hair_styles_list)
+ var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
+ if(gender == MALE && S.gender == FEMALE)
+ continue
+ if(gender == FEMALE && S.gender == MALE)
+ continue
+ if( !(species in S.species_allowed))
+ continue
+
+ valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle]
+
+ if(valid_facialhairstyles.len)
+ f_style = pick(valid_facialhairstyles)
+ else
+ //this shouldn't happen
+ f_style = facial_hair_styles_list["Shaved"]
//reset hair colour and skin colour
r_hair = 0//hex2num(copytext(new_hair, 2, 4))
@@ -1164,14 +1208,24 @@ datum/preferences
b_type = new_b_type
if("hair")
- var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as color|null
- if(new_hair)
- r_hair = hex2num(copytext(new_hair, 2, 4))
- g_hair = hex2num(copytext(new_hair, 4, 6))
- b_hair = hex2num(copytext(new_hair, 6, 8))
+ if(species == "Human" || species == "Unathi" || species == "Tajaran" || species == "Skrell")
+ var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as color|null
+ if(new_hair)
+ r_hair = hex2num(copytext(new_hair, 2, 4))
+ g_hair = hex2num(copytext(new_hair, 4, 6))
+ b_hair = hex2num(copytext(new_hair, 6, 8))
+ else if (species == "Machine")
+ alert("Please select the Body Color instead.")
if("h_style")
- var/list/valid_hairstyles = get_valid_hairstyles(gender,get_hair_species())
+ var/list/valid_hairstyles = list()
+ for(var/hairstyle in hair_styles_list)
+ var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
+ if( !(species in S.species_allowed))
+ continue
+
+ valid_hairstyles[hairstyle] = hair_styles_list[hairstyle]
+
var/new_h_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in valid_hairstyles
if(new_h_style)
h_style = new_h_style
@@ -1184,7 +1238,18 @@ datum/preferences
b_facial = hex2num(copytext(new_facial, 6, 8))
if("f_style")
- var/list/valid_facialhairstyles = get_valid_facialhairstyles(gender,get_hair_species())
+ var/list/valid_facialhairstyles = list()
+ for(var/facialhairstyle in facial_hair_styles_list)
+ var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
+ if(gender == MALE && S.gender == FEMALE)
+ continue
+ if(gender == FEMALE && S.gender == MALE)
+ continue
+ if( !(species in S.species_allowed))
+ continue
+
+ valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle]
+
var/new_f_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in valid_facialhairstyles
if(new_f_style)
f_style = new_f_style
@@ -1231,6 +1296,10 @@ datum/preferences
r_skin = hex2num(copytext(new_skin, 2, 4))
g_skin = hex2num(copytext(new_skin, 4, 6))
b_skin = hex2num(copytext(new_skin, 6, 8))
+ if(species == "Machine")
+ r_hair = r_skin
+ g_hair = g_skin
+ b_hair = b_skin
if("ooccolor")
var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference") as color|null
@@ -1256,19 +1325,57 @@ datum/preferences
else
user << browse(null, "window=disabil")
- if("set_machine_brain") // shell customization junk
- var/new_brain = input(user, "Choose your brain.", "Character Preference") as null|anything in list("MMI", "Posibrain") // not differentiating brain species at the moment
- if(new_brain)
- machine_brain_type=new_brain
-
- if("set_machine_covering")
- var/new_coating = input(user, "Choose your exterior coating.", "Character Preference") as null|anything in get_limb_covering_names()
- if(new_coating)
- covering_type=(new_coating!="None" ? new_coating : null)
-
if("limbs")
- customize_limbs(user,species!="Machine")
+ var/limb_name = input(user, "Which limb do you want to change?") as null|anything in list("Left Leg","Right Leg","Left Arm","Right Arm","Left Foot","Right Foot","Left Hand","Right Hand")
+ if(!limb_name) return
+ var/limb = null
+ var/second_limb = null // if you try to change the arm, the hand should also change
+ var/third_limb = null // if you try to unchange the hand, the arm should also change
+ switch(limb_name)
+ if("Left Leg")
+ limb = "l_leg"
+ second_limb = "l_foot"
+ if("Right Leg")
+ limb = "r_leg"
+ second_limb = "r_foot"
+ if("Left Arm")
+ limb = "l_arm"
+ second_limb = "l_hand"
+ if("Right Arm")
+ limb = "r_arm"
+ second_limb = "r_hand"
+ if("Left Foot")
+ limb = "l_foot"
+ third_limb = "l_leg"
+ if("Right Foot")
+ limb = "r_foot"
+ third_limb = "r_leg"
+ if("Left Hand")
+ limb = "l_hand"
+ third_limb = "l_arm"
+ if("Right Hand")
+ limb = "r_hand"
+ third_limb = "r_arm"
+
+ var/new_state = input(user, "What state do you wish the limb to be in?") as null|anything in list("Normal","Amputated","Prothesis")
+ if(!new_state) return
+
+ switch(new_state)
+ if("Normal")
+ organ_data[limb] = null
+ if(third_limb)
+ organ_data[third_limb] = null
+ if("Amputated")
+ organ_data[limb] = "amputated"
+ if(second_limb)
+ organ_data[second_limb] = "amputated"
+ if("Prothesis")
+ organ_data[limb] = "cyborg"
+ if(second_limb)
+ organ_data[second_limb] = "cyborg"
+ if(third_limb && organ_data[third_limb] == "amputated")
+ organ_data[third_limb] = null
if("organs")
var/organ_name = input(user, "Which internal function do you want to change?") as null|anything in list("Heart", "Eyes")
if(!organ_name) return
@@ -1487,43 +1594,29 @@ datum/preferences
character.h_style = h_style
character.f_style = f_style
+
character.skills = skills
character.used_skillpoints = used_skillpoints
- var/list/covering_name_to_type = get_limb_covering_list()
+ // Destroy/cyborgize organs
- if (species=="Machine")
- var/datum/organ/internal/brain/robot/brain_datum = character.get_organ("brain")
- if (brain_datum) // sanity check
- brain_datum.machine_brain_type=machine_brain_type // set the brain type
- for (var/datum/organ/external/organ in character.organs) // provide default covering for shells
- if (organ) // gotta make sure we're getting an actual organ here
- if (covering_type)
- var/covering_path = covering_name_to_type[covering_type]
- organ.covering = new covering_path(organ,rgb(r_skin,g_skin,b_skin))
- organ.covering.limb_datum=organ
-
- // Destroy or cyborgize organs
for(var/name in organ_data)
var/datum/organ/external/O = character.organs_by_name[name]
var/datum/organ/internal/I = character.internal_organs_by_name[name]
var/status = organ_data[name]
+
if(status == "amputated")
O.amputated = 1
O.status |= ORGAN_DESTROYED
O.destspawn = 1
+ if(status == "cyborg")
+ O.status |= ORGAN_ROBOT
if(status == "assisted")
I.mechassist()
- if(status == "mechanical")
+ else if(status == "mechanical")
I.mechanize()
- var/list/status_as_list=status
- if (istype(status_as_list)) // we got a robot here
- O.status |= ORGAN_ROBOT
- O.covering = null // wipe any old covering we might have
- if (status_as_list[1]!="None")
- var/covering_path = covering_name_to_type[status_as_list[1]]
- O.covering = new covering_path(O,status_as_list[2])
- O.covering.limb_datum=O
+
+ else continue
if(underwear > underwear_m.len || underwear < 1)
underwear = 0 //I'm sure this is 100% unnecessary, but I'm paranoid... sue me. //HAH NOW NO MORE MAGIC CLONING UNDIES
@@ -1564,104 +1657,5 @@ datum/preferences
dat += ""
user << browse(dat, "window=saves;size=300x390")
-
/datum/preferences/proc/close_load_dialog(mob/user)
user << browse(null, "window=saves")
-
-
-/datum/preferences/proc/get_hair_species()
- // this is incredibly snowflakey but I don't see an alternative
- if (species!="Machine")
- return species
- var/head_coat=covering_type // we get the base coating
- if (organ_data["Head"]) // if we're customizing the head we should get their coating
- head_coat=organ_data["Head"][0]
- if (!head_coat) // no coating?
- return
- var/list/refs=get_limb_covering_references()
- for(var/skin_type in refs)
- var/datum/synthetic_limb_cover/temp=refs[skin_type]
- if (temp.icon_key_type==head_coat)
- return temp.hair_species
-
-
-/datum/preferences/proc/custom_robot_limb(mob/user,)
- var/covering_name = input(user, "What kind of covering do you want?") as null|anything in get_limb_covering_names()
- if (!covering_name)
- return
- if (covering_name=="None") // don't want no colour
- return list(covering_name,rgb(128,128,128))
- var/new_colour = input(user, "Pick the colour for your limb:", "Character Preference") as color|null
- if(!new_colour)
- return
- return list(covering_name,new_colour)
-
-
-var/list/limb_name_to_descriptive_names
-/datum/preferences/proc/get_limb_name_to_descriptive_name()
- if (isnull(limb_name_to_descriptive_names))
- limb_name_to_descriptive_names=list()
- for(var/organ_type in typesof(/datum/organ/external)-/datum/organ/external)
- var/datum/organ/external/temp = new organ_type()
- limb_name_to_descriptive_names[temp.name]=temp.display_name
- del(temp)
- return limb_name_to_descriptive_names
-
-
-var/list/limb_connection_data
-/datum/preferences/proc/get_limb_connection_data()
- if (isnull(limb_connection_data))
- limb_connection_data = list()
- limb_connection_data["Left Leg"]=list("l_leg","l_foot",null)
- limb_connection_data["Right Leg"]=list("r_leg","r_foot",null)
- limb_connection_data["Left Arm"]=list("l_arm","l_hand",null)
- limb_connection_data["Right Arm"]=list("r_arm","r_hand",null)
- limb_connection_data["Left Foot"]=list("l_foot",null,"l_leg")
- limb_connection_data["Right Foot"]=list("r_foot",null,"r_leg")
- limb_connection_data["Left Hand"]=list("l_hand",null,"l_arm")
- limb_connection_data["Right Hand"]=list("r_hand",null,"r_arm")
- limb_connection_data["Chest"]=list("chest",null,null)
- limb_connection_data["Groin"]=list("groin",null,null)
- limb_connection_data["Head"]=list("head",null,null)
- return limb_connection_data
-
-
-/datum/preferences/proc/pick_organ_to_customize(mob/user,var/is_organic_species)
- var/list/valid_targets = list("Left Leg","Right Leg","Left Arm","Right Arm","Left Foot","Right Foot","Left Hand","Right Hand")
- if (!is_organic_species)
- valid_targets.Add(list("Head","Chest","Groin"))
- var/limb_name = input(user, "Which limb do you want to change?") as null|anything in valid_targets
- if(!limb_name) // you have picked nothing
- return
- var/list/limb_info=get_limb_connection_data()
- return limb_info[limb_name]
-
-
-/datum/preferences/proc/customize_limbs(mob/user,var/is_organic_species)
- var/list/limb_info = pick_organ_to_customize(user,is_organic_species)
- if (!limb_info)
- return
- var/limb=limb_info[1]
- var/limb_child=limb_info[2]
- var/limb_parent=limb_info[3]
- var/new_state = input(user, "What state do you wish the limb to be in?") as null|anything in (is_organic_species ? list("Normal","Amputated","Prosthesis") : list("Normal","Custom"))
- if(!new_state)
- return // cancel
- switch(new_state)
- if("Normal")
- organ_data-= limb
- if(!isnull(limb_parent))
- organ_data-=limb_parent
- if("Amputated")
- organ_data[limb] = "amputated"
- if(!isnull(limb_child))
- organ_data[limb_child] = "amputated"
- if("Prosthesis")
- var/list/custom = custom_robot_limb(user)
- organ_data[limb] = custom
- if(!isnull(limb_child))
- organ_data[limb_child] = custom
- if(!isnull(limb_parent) && organ_data[limb_parent] == "amputated")
- organ_data-=limb_parent
- if("Custom")
- organ_data[limb] = custom_robot_limb(user) // robots have no dependencies
\ No newline at end of file
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index 0a12ea94..b8237e1e 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -1,5 +1,5 @@
#define SAVEFILE_VERSION_MIN 8
-#define SAVEFILE_VERSION_MAX 12
+#define SAVEFILE_VERSION_MAX 11
//handles converting savefiles to new formats
//MAKE SURE YOU KEEP THIS UP TO DATE!
@@ -19,13 +19,7 @@
fdel(delpath)
break
return 0
- if(savefile_version < 12)
- if (species=="Machine") // give IPC's posibrains and paint by default
- machine_brain_type="Posibrain"
- covering_type="Paint"
- for(var/name in organ_data)
- if (organ_data[name]=="Cyborg")
- organ_data[name]=list("None",rgb(128,128,128)) // standard robo limbs
+
if(savefile_version == SAVEFILE_VERSION_MAX) //update successful.
save_preferences()
save_character()
@@ -179,10 +173,6 @@
S["citizenship"] >> citizenship
S["faction"] >> faction
S["religion"] >> religion
-
- //Robot
- S["machine_brain_type"] >> machine_brain_type
- S["covering_type"] >> covering_type
S["nanotrasen_relation"] >> nanotrasen_relation
//S["skin_style"] >> skin_style
@@ -288,8 +278,6 @@
S["backbag"] << backbag
S["b_type"] << b_type
S["spawnpoint"] << spawnpoint
- S["machine_brain_type"] << machine_brain_type
- S["covering_type"] << covering_type
//Jobs
S["alternate_option"] << alternate_option
@@ -315,26 +303,26 @@
S["flavor_texts_feet"] << flavor_texts["feet"]
//Miscellaneous
- S["med_record"] << med_record
- S["sec_record"] << sec_record
- S["gen_record"] << gen_record
+ S["med_record"] << med_record
+ S["sec_record"] << sec_record
+ S["gen_record"] << gen_record
S["player_alt_titles"] << player_alt_titles
- S["be_special"] << be_special
- S["disabilities"] << disabilities
- S["used_skillpoints"] << used_skillpoints
- S["skills"] << skills
- S["skill_specialization"] << skill_specialization
- S["organ_data"] << organ_data
- S["gear"] << gear
- S["home_system"] << home_system
- S["citizenship"] << citizenship
- S["faction"] << faction
- S["religion"] << religion
+ S["be_special"] << be_special
+ S["disabilities"] << disabilities
+ S["used_skillpoints"] << used_skillpoints
+ S["skills"] << skills
+ S["skill_specialization"] << skill_specialization
+ S["organ_data"] << organ_data
+ S["gear"] << gear
+ S["home_system"] << home_system
+ S["citizenship"] << citizenship
+ S["faction"] << faction
+ S["religion"] << religion
- S["nanotrasen_relation"] << nanotrasen_relation
+ S["nanotrasen_relation"] << nanotrasen_relation
//S["skin_style"] << skin_style
- S["uplinklocation"] << uplinklocation
+ S["uplinklocation"] << uplinklocation
S["UI_style_color"] << UI_style_color
S["UI_style_alpha"] << UI_style_alpha
diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm
index 654f58cf..649ffaff 100644
--- a/code/modules/mob/living/carbon/brain/MMI.dm
+++ b/code/modules/mob/living/carbon/brain/MMI.dm
@@ -20,8 +20,6 @@
var/mob/living/carbon/brain/brainmob = null//The current occupant.
var/mob/living/silicon/robot = null//Appears unused.
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
-
- var/machine_brain_type="MMI"
attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O,/obj/item/organ/brain) && !brainmob) //Time to stick a brain in it --NEO
diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm
index 5a39c132..97ffc345 100644
--- a/code/modules/mob/living/carbon/brain/brain_item.dm
+++ b/code/modules/mob/living/carbon/brain/brain_item.dm
@@ -39,6 +39,7 @@
brainmob.timeofhostdeath = H.timeofdeath
if(H.mind)
H.mind.transfer_to(brainmob)
+
brainmob << "\blue You feel slightly disoriented. That's normal when you're just a brain."
callHook("debrain", list(brainmob))
@@ -52,24 +53,20 @@
usr << "You can feel the small spark of life still left in this one."
else
usr << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.."
-
-
+
/obj/item/organ/brain/removed(var/mob/living/target,var/mob/living/user)
+
..()
+
var/mob/living/simple_animal/borer/borer = target.has_brain_worms()
+
if(borer)
borer.detatch() //Should remove borer if the brain is removed - RR
+
var/mob/living/carbon/human/H = target
var/obj/item/organ/brain/B = src
if(istype(B) && istype(H))
B.transfer_identity(target)
-
-/obj/item/organ/brain/exposed_to_the_world()
- var/datum/organ/internal/brain/robot/robotic_brain=organ_data
- if (istype(robotic_brain))
- var/new_mmi=robotic_brain.create_robot_brain_replacement(brainmob,src.loc)
- del(src)
- return new_mmi
/obj/item/organ/brain/replaced(var/mob/living/target)
diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm
index 921aa630..59f83deb 100644
--- a/code/modules/mob/living/carbon/brain/posibrain.dm
+++ b/code/modules/mob/living/carbon/brain/posibrain.dm
@@ -5,7 +5,6 @@
icon_state = "posibrain"
w_class = 3
origin_tech = "engineering=4;materials=4;bluespace=2;programming=4"
- machine_brain_type="Posibrain"
construction_cost = list("metal"=500,"glass"=500,"silver"=200,"gold"=200,"plasma"=100,"diamond"=10)
construction_time = 75
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 79dc0096..decf0bf3 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -1659,82 +1659,3 @@
if(eyes && istype(eyes) && !eyes.status & ORGAN_CUT_AWAY)
return 1
return 0
-
-/mob/living/carbon/human/proc/hair_species_name()
- var/datum/organ/external/head/head_organ = get_organ("head")
- if (head_organ.covering)
- return head_organ.covering.hair_species
- return species.name
-
-
-/mob/living/carbon/human/proc/valid_hairstyles_for_this_mob()
- return get_valid_hairstyles(gender, hair_species_name())
-
-
-/mob/living/carbon/human/proc/valid_facialhairstyles_for_this_mob()
- return get_valid_facialhairstyles(gender, hair_species_name())
-
-
-/mob/living/carbon/human/proc/should_we_show_hair()
- var/datum/organ/external/head/head_organ = get_organ("head")
- if(!head_organ || (head_organ.status & ORGAN_DESTROYED))
- return
- if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)))
- return
- return TRUE
-
-/mob/living/carbon/human/proc/validate_hair()
- var/list/hair=valid_hairstyles_for_this_mob()
- if (!(h_style in hair))
- h_style=null
- var/list/face=valid_facialhairstyles_for_this_mob()
- if (!(f_style in face))
- f_style=null
-
-
-/mob/living/carbon/human/proc/hair_icon()
- if (h_style)
- var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
- var/icon/hair = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
- if(hair_style.do_colouration)
- hair.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
- return hair
-
-
-/mob/living/carbon/human/proc/facial_hair_icon()
- if (f_style)
- var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
- var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
- if(facial_hair_style.do_colouration)
- facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
- return facial_s
-
-
-/mob/living/carbon/human/proc/get_eye_icon_state()
- var/datum/organ/external/head/head_organ = get_organ("head")
- if (head_organ.covering)
- return head_organ.covering.eyes_state
- return species.eyes
-
-
-/mob/living/carbon/human/proc/eye_icon()
- var/icon/result_icon = new/icon('icons/mob/human_face.dmi', get_eye_icon_state())
- result_icon.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
- return result_icon
-
-
-/mob/living/carbon/human/proc/tail_icon_state()
- var/datum/organ/external/groin/groin_organ = get_organ("groin")
- if (groin_organ.covering)
- return list(groin_organ.covering.tail,groin_organ.covering.colour)
- if (species.tail)
- return list(species.tail,rgb(r_skin, g_skin, b_skin))
-
-
-/mob/living/carbon/human/proc/tail_icon()
- var/list/tail_info = tail_icon_state()
- if(!isnull(tail_info))
- if(!wear_suit || !(wear_suit.flags_inv & HIDETAIL) && !istype(wear_suit, /obj/item/clothing/suit/space))
- var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[tail_info[1]]_s")
- tail_s.Blend(tail_info[2], ICON_ADD)
- return tail_s
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/human/human_species.dm b/code/modules/mob/living/carbon/human/human_species.dm
index ea550240..c313c601 100644
--- a/code/modules/mob/living/carbon/human/human_species.dm
+++ b/code/modules/mob/living/carbon/human/human_species.dm
@@ -30,5 +30,5 @@
..(new_loc, "Diona")
/mob/living/carbon/human/machine/New(var/new_loc)
- h_style = "Bald"
+ h_style = "blue IPC screen"
..(new_loc, "Machine")
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index 2840900b..1f4b301e 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -201,131 +201,10 @@
// Grabs the window recieved when you click-drag someone onto you.
/datum/species/proc/get_inventory_dialogue(var/mob/living/carbon/human/H)
return
-
//Used by xenos understanding larvae and dionaea understanding nymphs.
/datum/species/proc/can_understand(var/mob/other)
return
-
-
-/datum/species/proc/blend_preview_icon(var/icon/main_icon,var/datum/preferences/preferences,var/paint_colour)
- if(paint_colour)
- main_icon.Blend(paint_colour, ICON_ADD)
- return
- if(flags & HAS_SKIN_COLOR)
- main_icon.Blend(rgb(preferences.r_skin, preferences.g_skin, preferences.b_skin), ICON_ADD)
- return
- if(flags & HAS_SKIN_TONE) // Skin tone
- if (preferences.s_tone >= 0)
- main_icon.Blend(rgb(preferences.s_tone, preferences.s_tone, preferences.s_tone), ICON_ADD)
- else
- main_icon.Blend(rgb(-preferences.s_tone, -preferences.s_tone, -preferences.s_tone), ICON_SUBTRACT)
-
-
-/datum/species/proc/get_organ_preview_icon(var/name, var/robot, var/gendered, var/gender_string, var/datum/preferences/preferences, var/datum/synthetic_limb_cover/covering, var/paint_colour)
- var/icon_name = icobase
- if (robot)
- icon_name = (istype(covering)) ? covering.main_icon : 'icons/mob/human_races/robotic.dmi'
- var/state_name = name
- if (gendered)
- state_name+="_[gender_string]"
- var/icon/result = new /icon(icon_name,state_name)
- blend_preview_icon(result,preferences,paint_colour)
- return result
-
-
-/datum/species/proc/get_is_preview_organ_robotic(var/name,var/datum/preferences/preferences)
- if (flags & IS_SYNTHETIC)
- return TRUE
- if (name in preferences.organ_data)
- var/list/organ_robotic_info=preferences.organ_data[name]
- if (istype(organ_robotic_info))
- return TRUE
-
-/datum/species/proc/get_preview_organ_covering(var/name,var/datum/preferences/preferences)
- if (name in preferences.organ_data)
- var/list/organ_robotic_info=preferences.organ_data[name]
- if (istype(organ_robotic_info))
- return organ_robotic_info
- if (preferences.species=="Machine")
- if (preferences.covering_type)
- return list(preferences.covering_type,rgb(preferences.r_skin,preferences.g_skin,preferences.b_skin))
-
-
-/datum/species/proc/get_tail_preview_icon(var/list/preview_coverings,var/datum/preferences/preferences)
- var/tail_state=null
- if (!(isnull(preview_coverings["groin"])))
- var/datum/synthetic_limb_cover/covering=preview_coverings["groin"]
- tail_state=covering.tail
- if(tail)
- tail_state="[tail]_s"
- if(tail_state)
- var/icon/result = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = tail_state)
- result.Blend(rgb(preferences.r_hair,preferences.g_hair,preferences.b_hair),ICON_ADD)
- return result
-
-/datum/species/proc/get_eyes_preview_icon(var/list/preview_coverings,var/datum/preferences/preferences)
- var/eye_state=null
- if (!(isnull(preview_coverings["head"])))
- var/datum/synthetic_limb_cover/covering=preview_coverings["head"]
- eye_state=covering.eyes_state
- else
- eye_state=eyes
- var/icon/result = new/icon('icons/mob/human_face.dmi',eye_state)
- result.Blend(rgb(preferences.r_eyes,preferences.g_eyes,preferences.b_eyes),ICON_ADD)
- return result
-
-/* This function takes a preferences object and generates a complete body and hair icon for that set of preferences. It's needlessly complicated
-and duplicates a lot of what's going on in update_icons. The two systems should be combined somehow, possibly by using a 'visual identity' object
-that could be created from either a living human or a preferences object and then passing that to a single render function, but I'll leave that
-exercise for another day.
-
-See code\modules\mob\new_player\preferences_setup.dm for where it's used.
- - jack_fractal*/
-/datum/species/proc/create_body_preview_icon(var/datum/preferences/preferences)
- var/gender_string = (preferences.gender==FEMALE) ? "f" : "m"
- var/icon/preview_icon = new/icon('icons/mob/human_face.dmi', "blank_eyes") // this is just an empty icon
- var/list/external_organs = list("torso","groin","head","r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","l_arm","l_hand")
- var/list/coverings=list()
- var/list/gendered_organs = list("torso","groin","head")
- var/list/limb_coverings = get_limb_covering_references()
- var/list/limb_coverings_names = get_limb_covering_list()
- for (var/name in external_organs)
- if(preferences.organ_data[name] == "amputated") // amputated organs don't show up
- continue
- var/robotic = get_is_preview_organ_robotic(name,preferences)
- var/datum/synthetic_limb_cover/covering = null
- var/paint_colour=null
- if (robotic)
- var/list/covering_as_list=get_preview_organ_covering(name, preferences)
- if (istype(covering_as_list))
- covering=limb_coverings[limb_coverings_names[covering_as_list[1]]]
- paint_colour=covering_as_list[2]
- coverings[name]=covering
- var/icon/organ_icon = get_organ_preview_icon(name, robotic, (name in gendered_organs), gender_string, preferences, covering, paint_colour)
- preview_icon.Blend(organ_icon, ICON_OVERLAY)
- del(organ_icon)
- var/icon/tail_icon = get_tail_preview_icon(coverings,preferences) // Tail
- if(tail_icon)
- preview_icon.Blend(tail_icon, ICON_OVERLAY)
- del(tail_icon)
- var/icon/eye_icon = get_eyes_preview_icon(coverings,preferences)
- if(eye_icon)
- preview_icon.Blend(eye_icon, ICON_OVERLAY)
- del(eye_icon)
- var/datum/sprite_accessory/hair_style = hair_styles_list[preferences.h_style]
- if(hair_style)
- var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
- hair_s.Blend(rgb(preferences.r_hair, preferences.g_hair, preferences.b_hair), ICON_ADD)
- preview_icon.Blend(hair_s, ICON_OVERLAY)
- del(hair_s)
- var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[preferences.f_style]
- if(facial_hair_style)
- var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
- facial_s.Blend(rgb(preferences.r_facial, preferences.g_facial, preferences.b_facial), ICON_ADD)
- preview_icon.Blend(facial_s, ICON_OVERLAY)
- del(facial_s)
- return preview_icon
/datum/species/human
name = "Human"
@@ -595,16 +474,9 @@ See code\modules\mob\new_player\preferences_setup.dm for where it's used.
has_organ = list(
"heart" = /datum/organ/internal/heart,
- "brain" = /datum/organ/internal/brain/robot,
+ "brain" = /datum/organ/internal/brain,
)
-/datum/species/machine/create_organs(var/mob/living/carbon/human/H)
- ..()
- var/datum/organ/internal/brain/robot/brain_datum = H.internal_organs_by_name["brain"] // handle weird robot brains
- if (istype(brain_datum))
- if (isnull(brain_datum.machine_brain_type))
- brain_datum.machine_brain_type="Posibrain"
-
-
+
/datum/species/bug
name = "Vaurca"
name_plural = "varucae"
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index 54ff6a66..8c52146b 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -234,58 +234,21 @@ proc/get_damage_icon_part(damage_state, body_part)
overlays_standing[DAMAGE_LAYER] = standing_image
if(update_icons) update_icons()
-
-
-/mob/living/carbon/human/proc/get_skin_tone_key()
- if (species.flags & HAS_SKIN_COLOR)
- return "[r_skin],[g_skin],[b_skin]"
- if(species.flags & HAS_SKIN_TONE)
- return "[s_tone]"
- return ""
-
-
-/mob/living/carbon/human/proc/get_icon_key(var/list/mutations=list())
- if (!mutations)
- mutations=get_visible_mutations()
- var/icon_key = "[species.race_key][(gender == FEMALE ? "f" : "m")][get_skin_tone_key()]"
- for(var/datum/organ/external/part in organs) // get the part icon keys
- icon_key = "[icon_key][part.get_icon_key()]"
- return "[icon_key][mutations["husk"]][mutations["fat"]][mutations["hulk"]][mutations["skeleton"]]"
-
-
-/mob/living/carbon/human/proc/get_visible_mutations()
- return list("husk"=(HUSK in src.mutations),
- "hulk"=(HULK in src.mutations),
- "skeleton"=(SKELETON in src.mutations),
- "fat"=(FAT in src.mutations))
-
-
-/mob/living/carbon/human/proc/skin_colour_info(var/list/mutations=list())
- if (!mutations)
- mutations=get_visible_mutations()
- var/icon_blend=ICON_ADD
- var/colour=rgb(127,127,127)
- var/good=FALSE
- if (species.flags & HAS_SKIN_COLOR)
- colour=rgb(r_skin,g_skin,b_skin)
- good=TRUE
- if(!mutations["husk"] && !mutations["hulk"]) // if we have regular skin
- if(species.flags & HAS_SKIN_TONE)
- icon_blend=(s_tone >= 0 ? ICON_ADD : ICON_SUBTRACT)
- var/res=(s_tone >= 0 ? s_tone : -s_tone)
- colour=rgb(res,res,res)
- good=TRUE
- return list("rgb"=colour,"mode"=icon_blend,"blend"=good)
-
//BASE MOB SPRITE
/mob/living/carbon/human/proc/update_body(var/update_icons=1)
+
var/husk_color_mod = rgb(96,88,80)
var/hulk_color_mod = rgb(48,224,40)
var/necrosis_color_mod = rgb(10,50,0)
- var/list/mutations = get_visible_mutations()
+ var/husk = (HUSK in src.mutations)
+ var/fat = (FAT in src.mutations)
+ var/hulk = (HULK in src.mutations)
+ var/skeleton = (SKELETON in src.mutations)
+
var/g = (gender == FEMALE ? "f" : "m")
+ var/has_head = 0
//CACHING: Generate an index key from visible bodyparts.
//0 = destroyed, 1 = normal, 2 = robotic, 3 = necrotic.
@@ -296,9 +259,22 @@ proc/get_damage_icon_part(damage_state, body_part)
stand_icon = new(species.icon_template ? species.icon_template : 'icons/mob/human.dmi',"blank")
+ var/icon_key = "[species.race_key][g][s_tone]"
+ for(var/datum/organ/external/part in organs)
- // GENERATE THE ICON KEY
- var/icon_key = get_icon_key(mutations)
+ if(istype(part,/datum/organ/external/head) && !(part.status & ORGAN_DESTROYED))
+ has_head = 1
+
+ if(part.status & ORGAN_DESTROYED)
+ icon_key = "[icon_key]0"
+ else if(part.status & ORGAN_ROBOT)
+ icon_key = "[icon_key]2"
+ else if(part.status & ORGAN_DEAD)
+ icon_key = "[icon_key]3"
+ else
+ icon_key = "[icon_key]1"
+
+ icon_key = "[icon_key][husk ? 1 : 0][fat ? 1 : 0][hulk ? 1 : 0][skeleton ? 1 : 0][s_tone]"
var/icon/base_icon
if(human_icon_cache[icon_key])
@@ -311,18 +287,14 @@ proc/get_damage_icon_part(damage_state, body_part)
//BEGIN CACHED ICON GENERATION.
- // Why don't we just make mutations["skeleton"]s/shadows/golems a species? ~Z
- var/race_icon = (mutations["skeleton"] ? 'icons/mob/human_races/r_skeleton.dmi' : species.icobase)
- var/deform_icon = (mutations["skeleton"] ? 'icons/mob/human_races/r_skeleton.dmi' : species.icobase)
+ // Why don't we just make skeletons/shadows/golems a species? ~Z
+ var/race_icon = (skeleton ? 'icons/mob/human_races/r_skeleton.dmi' : species.icobase)
+ var/deform_icon = (skeleton ? 'icons/mob/human_races/r_skeleton.dmi' : species.icobase)
- var/list/skin_info = skin_colour_info(mutations) // get the skin tone info
-
//Robotic limbs are handled in get_icon() so all we worry about are missing or dead limbs.
//No icon stored, so we need to start with a basic one.
var/datum/organ/external/chest = get_organ("chest")
- base_icon = chest.get_icon(race_icon,deform_icon,skin_info)
-
-
+ base_icon = chest.get_icon(race_icon,deform_icon,g)
if(chest.status & ORGAN_DEAD)
base_icon.ColorTone(necrosis_color_mod)
@@ -335,7 +307,10 @@ proc/get_damage_icon_part(damage_state, body_part)
if(part.status & ORGAN_DESTROYED)
continue
- temp = part.get_icon(race_icon,deform_icon,skin_info) // synthetics are handled here
+ if (istype(part, /datum/organ/external/groin) || istype(part, /datum/organ/external/head))
+ temp = part.get_icon(race_icon,deform_icon,g)
+ else
+ temp = part.get_icon(race_icon,deform_icon)
if(part.status & ORGAN_DEAD)
temp.ColorTone(necrosis_color_mod)
@@ -370,33 +345,48 @@ proc/get_damage_icon_part(damage_state, body_part)
base_icon.Blend(temp, ICON_OVERLAY)
- if(!mutations["skeleton"])
- if(mutations["husk"])
+ if(!skeleton)
+ if(husk)
base_icon.ColorTone(husk_color_mod)
- else if(mutations["hulk"])
+ else if(hulk)
var/list/tone = ReadRGB(hulk_color_mod)
base_icon.MapColors(rgb(tone[1],0,0),rgb(0,tone[2],0),rgb(0,0,tone[3]))
- //Handle mutations["husk"] overlay.
- if(mutations["husk"])
+ //Handle husk overlay.
+ if(husk)
var/icon/mask = new(base_icon)
var/icon/husk_over = new(race_icon,"overlay_husk")
mask.MapColors(0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,0)
husk_over.Blend(mask, ICON_ADD)
base_icon.Blend(husk_over, ICON_OVERLAY)
+
+ //Skin tone.
+ if(!husk && !hulk)
+ if(species.flags & HAS_SKIN_TONE)
+ if(s_tone >= 0)
+ base_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
+ else
+ base_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
+
human_icon_cache[icon_key] = base_icon
//log_debug("Generated new cached mob icon ([icon_key] \icon[human_icon_cache[icon_key]]) for [src]. [human_icon_cache.len] cached mob icons.")
//END CACHED ICON GENERATION.
+
stand_icon.Blend(base_icon,ICON_OVERLAY)
- var/datum/organ/external/head = get_organ("head") // check if we have a head
- if(head ? (head.status & ORGAN_DESTROYED ? 0 : 1) : 0) // we need a head and that head needs to not be destroyed
+ //Skin colour. Not in cache because highly variable (and relatively benign).
+ if (species.flags & HAS_SKIN_COLOR)
+ stand_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
+
+ if(has_head)
//Eyes
- if(!mutations["skeleton"])
- stand_icon.Blend(eye_icon(), ICON_OVERLAY)
+ if(!skeleton)
+ var/icon/eyes = new/icon('icons/mob/human_face.dmi', species.eyes)
+ eyes.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
+ stand_icon.Blend(eyes, ICON_OVERLAY)
//Mouth (lipstick!)
if(lip_style && (species && species.flags & HAS_LIPS)) //skeletons are allowed to wear lipstick no matter what you think, agouri.
@@ -404,7 +394,7 @@ proc/get_damage_icon_part(damage_state, body_part)
//Underwear
if(underwear >0 && underwear < 12 && species.flags & HAS_UNDERWEAR)
- if(!mutations["fat"] && !mutations["skeleton"])
+ if(!fat && !skeleton)
stand_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
if(undershirt>0 && undershirt <= undershirt_t.len && species.flags & HAS_UNDERWEAR)
@@ -417,27 +407,47 @@ proc/get_damage_icon_part(damage_state, body_part)
update_tail_showing(0)
-/mob/living/carbon/human/proc/create_hair_icon()
- if(!should_we_show_hair()) // if we're missing our head or we're wearing a mask, no hair
- return
- validate_hair() // make sure our hair is valid
- var/icon/face_standing = new /icon('icons/mob/human_face.dmi',"bald_s") //base icons
- var/icon/facial_s = facial_hair_icon()
- if (facial_s)
- face_standing.Blend(facial_s, ICON_OVERLAY)
- var/icon/hair_s = hair_icon()
- if (hair_s)
- face_standing.Blend(hair_s, ICON_OVERLAY)
- overlays_standing[HAIR_LAYER] = image(face_standing)
//HAIR OVERLAY
/mob/living/carbon/human/proc/update_hair(var/update_icons=1)
- overlays_standing[HAIR_LAYER] = null //Reset our hair
- create_hair_icon() // do the hair blending
- if(update_icons)
- update_icons()
-
+ //Reset our hair
+ overlays_standing[HAIR_LAYER] = null
+
+ var/datum/organ/external/head/head_organ = get_organ("head")
+ if( !head_organ || (head_organ.status & ORGAN_DESTROYED) )
+ if(update_icons) update_icons()
+ return
+
+ //masks and helmets can obscure our hair.
+ if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)))
+ if(update_icons) update_icons()
+ return
+
+ //base icons
+ var/icon/face_standing = new /icon('icons/mob/human_face.dmi',"bald_s")
+
+ if(f_style)
+ var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
+ if(facial_hair_style && facial_hair_style.species_allowed && src.species.name in facial_hair_style.species_allowed)
+ var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
+ if(facial_hair_style.do_colouration)
+ facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
+
+ face_standing.Blend(facial_s, ICON_OVERLAY)
+
+ if(h_style && !(head && (head.flags & BLOCKHEADHAIR)))
+ var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
+ if(hair_style && src.species.name in hair_style.species_allowed)
+ var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
+ if(hair_style.do_colouration)
+ hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
+
+ face_standing.Blend(hair_s, ICON_OVERLAY)
+
+ overlays_standing[HAIR_LAYER] = image(face_standing)
+
+ if(update_icons) update_icons()
/mob/living/carbon/human/update_mutations(var/update_icons=1)
var/fat
@@ -978,12 +988,16 @@ proc/get_damage_icon_part(damage_state, body_part)
overlays_standing[L_HAND_LAYER] = null
if(update_icons) update_icons()
-
/mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1)
overlays_standing[TAIL_LAYER] = null
- var/icon/tail_s = tail_icon()
- if (tail_s)
- overlays_standing[TAIL_LAYER] = image(tail_s)
+
+ if(species.tail)
+ if(!wear_suit || !(wear_suit.flags_inv & HIDETAIL) && !istype(wear_suit, /obj/item/clothing/suit/space))
+ var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_s")
+ tail_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
+
+ overlays_standing[TAIL_LAYER] = image(tail_s)
+
if(update_icons)
update_icons()
diff --git a/code/modules/mob/living/carbon/species.dm b/code/modules/mob/living/carbon/species.dm
index b5043fd2..8837307a 100644
--- a/code/modules/mob/living/carbon/species.dm
+++ b/code/modules/mob/living/carbon/species.dm
@@ -105,11 +105,6 @@
//H.jitteriness = 0
H.update_hair()
return
-
-
-/datum/species/proc/get_eye_icon()
- return eyes
-
/datum/species/human
name = "Human"
@@ -333,9 +328,6 @@
blood_color = "#1F181F"
flesh_color = "#575757"
-
- var/brain_type = 'posibrain' // default is robots
-
//Species unarmed attacks
diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm
index bb03edb4..6927f837 100644
--- a/code/modules/mob/living/silicon/robot/component.dm
+++ b/code/modules/mob/living/silicon/robot/component.dm
@@ -168,11 +168,6 @@
name = "camera"
icon_state = "camera"
icon_state_broken = "camera_broken"
-
-/obj/item/robot_parts/robot_component/law_computer
- name = "law computer"
- icon_state = "radio"
- icon_state_broken = "radio_broken"
/obj/item/robot_parts/robot_component/diagnosis_unit
name = "diagnosis unit"
diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm
index 5db2878a..f704f6c2 100644
--- a/code/modules/mob/new_player/preferences_setup.dm
+++ b/code/modules/mob/new_player/preferences_setup.dm
@@ -177,42 +177,590 @@ datum/preferences
g_skin = green
b_skin = blue
- proc/job_type_info()
- var/job_type=null
- var/job_index=null
- if (job_civilian_high)
- job_type="[CIVILIAN]"
- job_index="[job_civilian_high]"
- if (job_engsec_high)
- job_type="[ENGSEC]"
- job_index="[job_engsec_high]"
- if (job_medsci_high)
- job_type="[MEDSCI]"
- job_index="[job_medsci_high]"
- if (!job_type)
- job_type="DEFAULT"
- job_index=1
- return list(job_type,job_index)
-
- proc/update_preview_icon() //this is a little better - jf
+
+ proc/update_preview_icon() //seriously. This is horrendous.
del(preview_icon_front)
del(preview_icon_side)
del(preview_icon)
+
+ var/g = "m"
+ if(gender == FEMALE) g = "f"
+
+ var/icon/icobase
var/datum/species/current_species = all_species[species]
- if(!current_species) // no species? no preview for you
- return
- preview_icon = new/icon("icons/turf/floors.dmi","floor")
- preview_icon.Blend(current_species.create_body_preview_icon(src),ICON_OVERLAY) // create the body icon
+
+ if(current_species)
+ icobase = current_species.icobase
+ else
+ icobase = 'icons/mob/human_races/r_human.dmi'
+
+ preview_icon = new /icon(icobase, "torso_[g]")
+ preview_icon.Blend(new /icon(icobase, "groin_[g]"), ICON_OVERLAY)
+ preview_icon.Blend(new /icon(icobase, "head_[g]"), ICON_OVERLAY)
+
+ for(var/name in list("r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","l_arm","l_hand"))
+ if(organ_data[name] == "amputated") continue
+
+ var/icon/temp = new /icon(icobase, "[name]")
+ if(organ_data[name] == "cyborg")
+ temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
+
+ preview_icon.Blend(temp, ICON_OVERLAY)
+
+ //Tail
+ if(current_species && (current_species.tail))
+ var/icon/temp = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[current_species.tail]_s")
+ preview_icon.Blend(temp, ICON_OVERLAY)
+
+ // Skin color
+ if(current_species && (current_species.flags & HAS_SKIN_COLOR))
+ preview_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
+
+ // Skin tone
+ if(current_species && (current_species.flags & HAS_SKIN_TONE))
+ if (s_tone >= 0)
+ preview_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
+ else
+ preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
+
+ var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = current_species ? current_species.eyes : "eyes_s")
+ eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
+
+ var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
+ if(hair_style)
+ var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
+ hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
+ eyes_s.Blend(hair_s, ICON_OVERLAY)
+
+ var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
+ if(facial_hair_style)
+ var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
+ facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
+ eyes_s.Blend(facial_s, ICON_OVERLAY)
+
+ var/icon/underwear_s = null
+ if(underwear > 0 && underwear < 7 && (current_species && (current_species.flags & HAS_UNDERWEAR)))
+ underwear_s = new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = "underwear[underwear]_[g]_s")
+
+ var/icon/undershirt_s = null
+ if(undershirt > 0 && undershirt < 16 && (current_species && (current_species.flags & HAS_UNDERWEAR)))
+ undershirt_s = new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = "undershirt[undershirt]_s")
+
+ var/icon/clothes_s = null
+ if(job_civilian_low & ASSISTANT)//This gives the preview icon clothes depending on which job(if any) is set to 'high'
+ clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ if(backbag == 2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ else if(backbag == 3 || backbag == 4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+
+ else if(job_civilian_high)//I hate how this looks, but there's no reason to go through this switch if it's empty
+ switch(job_civilian_high)
+ if(HOP)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "hop_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "ianshirt"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(BARTENDER)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "ba_suit_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "tophat"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(BOTANIST)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "hydroponics_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "ggloves"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "apron"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "nymph"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-hyd"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CHEF)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "chef_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "chef"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "apronchef"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(JANITOR)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "janitor_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "bio_janitor"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(LIBRARIAN)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "red_suit_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "hairflower"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(QUARTERMASTER)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "qm_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "poncho"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CARGOTECH)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "cargotech_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "flat_cap"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(MINER)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "miner_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "bearpelt"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(LAWYER)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "internalaffairs_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "briefcase"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suitjacket_blue"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CHAPLAIN)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "chapblack_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "imperium_monk"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CLOWN)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "clown_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "clown"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/mask.dmi', "clown"), ICON_OVERLAY)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "clownpack"), ICON_OVERLAY)
+ if(MIME)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "mime_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "lgloves"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/mask.dmi', "mime"), ICON_OVERLAY)
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "beret"), ICON_OVERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suspenders"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+/* if(INTERN)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "white_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ if(backbag == 2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ else if(backbag == 3 || backbag == 4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)*/
+
+ else if(job_medsci_high)
+ switch(job_medsci_high)
+ if(RD)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "director_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "petehat"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(SCIENTIST)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "sciencewhite_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "metroid"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(XENOBIOLOGIST)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "sciencewhite_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "metroid"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CHEMIST)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "chemistrywhite_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labgreen"), ICON_OVERLAY)
+ else
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_chem_open"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-chem"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CMO)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "cmo_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "bio_cmo"), ICON_OVERLAY)
+ else
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_cmo_open"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(DOCTOR)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "surgeon"), ICON_OVERLAY)
+ else
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(EMT)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "emt_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "fr_jacket_open"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "emtpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-emt"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(GENETICIST)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "geneticswhite_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "monkeysuit"), ICON_OVERLAY)
+ else
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_gen_open"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-gen"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(VIROLOGIST)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "virologywhite_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/mask.dmi', "sterile"), ICON_OVERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "plaguedoctor"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-vir"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(ROBOTICIST)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "robotics_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(INTERN_MED)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "medicalpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-med"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(INTERN_SCI)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "sciencewhite_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-tox"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+
+ else if(job_engsec_high)
+ switch(job_engsec_high)
+ if(CAPTAIN)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "captain_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "centcomcaptain"), ICON_OVERLAY)
+ else
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "captain"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-cap"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(HOS)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "hosred_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "hosberet"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(WARDEN)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "warden_s")
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "slippers_worn"), ICON_OVERLAY)
+ else
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(DETECTIVE)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "wardentanclothes_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/mask.dmi', "cigaron"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+
+ if(FORENSICS)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "polsuit_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+
+ if(OFFICER)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "secred_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "officerberet"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CHIEF)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "chief_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "blueprints"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(ENGINEER)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "engine_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_yellow"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "hazard"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(ATMOSTECH)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "atmos_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
+ if(prob(1))
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "firesuit"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(INTERN_SEC)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "redshirt2_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "officerberet"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "securitypack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-sec"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(INTERN_ENG)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "engine_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "e_beret_badge"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel-eng"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+
+ if(AI)//Gives AI and borgs assistant-wear, so they can still customize their character
+ clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "straight_jacket"), ICON_OVERLAY)
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "cardborg_h"), ICON_OVERLAY)
+ if(backbag == 2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ else if(backbag == 3 || backbag == 4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+ if(CYBORG)
+ clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
+ clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/suit.dmi', "cardborg"), ICON_OVERLAY)
+ clothes_s.Blend(new /icon('icons/mob/head.dmi', "cardborg_h"), ICON_OVERLAY)
+ if(backbag == 2)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
+ else if(backbag == 3 || backbag == 4)
+ clothes_s.Blend(new /icon('icons/mob/back.dmi', "satchel"), ICON_OVERLAY)
+
if(disabilities & NEARSIGHTED)
preview_icon.Blend(new /icon('icons/mob/eyes.dmi', "glasses"), ICON_OVERLAY)
- if (current_species.flags & HAS_UNDERWEAR) // do we even need to handle underwear?
- if(underwear > 0 && underwear < 7)
- preview_icon.Blend(new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = "underwear[underwear]_[(gender==FEMALE) ? "f" : "m"]_s"),ICON_OVERLAY)
- if(undershirt > 0 && undershirt < 16)
- preview_icon.Blend(new/icon("icon" = 'icons/mob/human.dmi', "icon_state" = "undershirt[undershirt]_s"),ICON_OVERLAY)
- var/list/job_types=job_type_info()
- var/datum/preview/job/current_job=get_job_preview_for_index(job_types[1],job_types[2])
- if(istype(current_job))
- preview_icon.Blend(current_job.create_clothes_icon(backbag), ICON_OVERLAY)
+
+ preview_icon.Blend(eyes_s, ICON_OVERLAY)
+ if(underwear_s)
+ preview_icon.Blend(underwear_s, ICON_OVERLAY)
+ if(undershirt_s)
+ preview_icon.Blend(undershirt_s, ICON_OVERLAY)
+ if(clothes_s)
+ preview_icon.Blend(clothes_s, ICON_OVERLAY)
preview_icon_front = new(preview_icon, dir = SOUTH)
- preview_icon_side = new(preview_icon, dir = WEST)
\ No newline at end of file
+ preview_icon_side = new(preview_icon, dir = WEST)
+
+ del(eyes_s)
+ del(underwear_s)
+ del(undershirt_s)
+ del(clothes_s)
diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm
index 70f2d187..fe20acd3 100644
--- a/code/modules/organs/organ_external.dm
+++ b/code/modules/organs/organ_external.dm
@@ -43,10 +43,6 @@
// how often wounds should be updated, a higher number means less often
var/wound_update_accuracy = 1
-
- var/datum/synthetic_limb_cover/covering = null // paint or synth skin
-
- var/gendered = FALSE
/datum/organ/external/New(var/datum/organ/external/P)
@@ -517,36 +513,17 @@ Note that amputating the affected organ does in fact remove the infection from t
if (open && !clamped && (H && !(H.species.flags & NO_BLOOD))) //things tend to bleed if they are CUT OPEN
status |= ORGAN_BLEEDING
-
-
-/datum/organ/external/proc/can_take_covering() // is this organ functional enough to take a covering
- if (status&(ORGAN_DESTROYED|ORGAN_BROKEN|ORGAN_DEAD))
- return
- return (burn_dam + brute_dam) <= (max_damage * 0.1) // you get hurt you're going to lose your covering
-
-
+
+
// new damage icon system
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
/datum/organ/external/proc/update_icon()
var/n_is = damage_state_text()
if (n_is != damage_state)
damage_state = n_is
- return TRUE
- if (covering) // check to see if we lose the covering
- if (covering.coverage==SYNTHETIC_COVERING_WORKING)
- if (!can_take_covering()) // if your limbs get badly damaged you lose the covering
- covering.coverage = SYNTHETIC_COVERING_DAMAGED
- owner.update_body(TRUE)
- return TRUE
- return FALSE
-
-/datum/organ/external/head/update_icon()
- var/result = ..()
- if (result)
- owner.update_hair()
- return result
-
-
+ return 1
+ return 0
+
// new damage icon system
// returns just the brute/burn damage code
/datum/organ/external/proc/damage_state_text()
@@ -573,8 +550,6 @@ Note that amputating the affected organ does in fact remove the infection from t
tbrute = 2
else
tbrute = 3
-
-
return "[tbrute][tburn]"
/****************************************************
@@ -829,52 +804,14 @@ Note that amputating the affected organ does in fact remove the infection from t
return 1
return 0
-
-/datum/organ/external/proc/get_icon_key()
- if (status & ORGAN_DESTROYED)
- return "L" // l for lost
- if (status & ORGAN_DEAD)
- return "D" // d for dead
- if (status & ORGAN_ROBOT)
- return get_synthetic_icon_key()
- return "G" // regular old limb
+/datum/organ/external/get_icon(var/icon/race_icon, var/icon/deform_icon,gender="")
+ if (status & ORGAN_ROBOT && !(owner.species && owner.species.flags & IS_SYNTHETIC))
+ return new /icon('icons/mob/human_races/robotic.dmi', "[icon_name][gender ? "_[gender]" : ""]")
+ if (status & ORGAN_MUTATED)
+ return new /icon(deform_icon, "[icon_name][gender ? "_[gender]" : ""]")
-/datum/organ/external/proc/valid_covering()
- if (status & ORGAN_ROBOT)
- if (covering)
- return (covering.coverage) // is our covering working?
- return FALSE // if we have no covering at all
- return TRUE // squishies always have skin
-
-
-/datum/organ/external/proc/get_synthetic_icon_key()
- if (!covering) // no covering at all, this should not happen
- return "R" // regular old robot
- return covering.get_icon_key()
-
-
-/datum/organ/external/proc/get_synthetic_icon()
- if (!covering) // no covering at all, this should not happen
- return new /icon('icons/mob/human_races/robotic.dmi', "[icon_name][get_gender_string()]")
- return covering.get_icon()
-
-
-/datum/organ/external/proc/get_gender_string()
- if (!gendered) // most organs aren't gender specific
- return ""
- if (owner) // if we're a gender specific organ with an owner
- return (owner.gender == FEMALE ? "_f" : "_m")
- return "_f"
-
-
-/datum/organ/external/get_icon(var/icon/race_icon, var/icon/deform_icon, var/list/skin_info)
- if (status & ORGAN_ROBOT)
- return get_synthetic_icon()
- var/icon/result = new /icon((status & ORGAN_MUTATED) ? deform_icon : race_icon, "[icon_name][get_gender_string()]")
- if (skin_info["blend"])
- result.Blend(skin_info["rgb"],skin_info["mode"])
- return result
+ return new /icon(race_icon, "[icon_name][gender ? "_[gender]" : ""]")
/datum/organ/external/proc/is_usable()
@@ -930,7 +867,6 @@ Note that amputating the affected organ does in fact remove the infection from t
body_part = UPPER_TORSO
vital = 1
encased = "ribcage"
- gendered = TRUE
/datum/organ/external/groin
name = "groin"
@@ -940,7 +876,6 @@ Note that amputating the affected organ does in fact remove the infection from t
min_broken_damage = 30
body_part = LOWER_TORSO
vital = 1
- gendered = TRUE
/datum/organ/external/l_arm
name = "l_arm"
@@ -1036,8 +971,16 @@ Note that amputating the affected organ does in fact remove the infection from t
var/disfigured = 0
vital = 1
encased = "skull"
- gendered = TRUE
-
+
+/datum/organ/external/head/get_icon(var/icon/race_icon, var/icon/deform_icon)
+ if (!owner)
+ return ..()
+ var/g = "m"
+ if(owner.gender == FEMALE) g = "f"
+ if (status & ORGAN_MUTATED)
+ . = new /icon(deform_icon, "[icon_name]_[g]")
+ else
+ . = new /icon(race_icon, "[icon_name]_[g]")
/datum/organ/external/head/take_damage(brute, burn, sharp, edge, used_weapon = null, list/forbidden_limbs = list())
..(brute, burn, sharp, edge, used_weapon, forbidden_limbs)
@@ -1069,7 +1012,6 @@ 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)
@@ -1084,12 +1026,12 @@ obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
for(var/datum/organ/internal/I in H.internal_organs)
if(I.parent_organ != name)
continue
- var/obj/item/organ/new_organ_object = I.remove()
- if(new_organ_object && istype(new_organ_object))
- new_organ_object.removed(H)
- if(new_organ_object.organ_data)
- organs_internal |= new_organ_object.organ_data
- new_organ_object.loc = src // put the organ inside the severed external organ
+ 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
+
// Forming icon for the limb
// Setting base icon for this mob's race
var/icon/base
@@ -1097,13 +1039,24 @@ obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
base = icon(H.species.icobase)
else
base = icon('icons/mob/human_races/r_human.dmi')
- if(base) // handle skin colours
- var/list/skin_info = H.skin_colour_info() // get the skin tone info
- base.Blend(skin_info["rgb"],skin_info["mode"])
+
+ if(base)
+ //Changing limb's skin tone to match owner
+ if(!H.species || H.species.flags & HAS_SKIN_TONE)
+ if (H.s_tone >= 0)
+ base.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD)
+ else
+ base.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
+
+ if(base)
+ //Changing limb's skin color to match owner
+ if(!H.species || H.species.flags & HAS_SKIN_COLOR)
+ base.Blend(rgb(H.r_skin, H.g_skin, H.b_skin), ICON_ADD)
+
icon = base
set_dir(SOUTH)
src.transform = turn(src.transform, rand(70,130))
-
+
/****************************************************
EXTERNAL ORGAN ITEMS DEFINES
@@ -1137,7 +1090,8 @@ obj/item/weapon/organ/head
name = "head"
icon_state = "head_m"
var/mob/living/carbon/brain/brainmob
-
+ var/brain_op_stage = 0
+
/obj/item/weapon/organ/head/posi
name = "robotic head"
@@ -1182,15 +1136,13 @@ obj/item/weapon/organ/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(2)
if(istype(W,/obj/item/weapon/hemostat))
if(contents.len)
- var/obj/item/organ/removing = pick(contents)
- var/exposed_result
+ var/obj/item/removing = pick(contents)
removing.loc = get_turf(user.loc)
- if(istype(removing))
+ 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
- exposed_result = removing.exposed_to_the_world()
- if(!(user.l_hand && user.r_hand))
- user.put_in_hands((isnull(exposed_result)) ? removing : exposed_result)
user.visible_message("[user] extracts [removing] from [src] with [W]!")
else
user.visible_message("[user] fishes around fruitlessly in [src] with [W].")
diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm
index 3ee262b7..6b9595d9 100644
--- a/code/modules/organs/organ_internal.dm
+++ b/code/modules/organs/organ_internal.dm
@@ -249,25 +249,6 @@
parent_organ = "head"
removed_type = /obj/item/organ/brain
vital = 1
-
-
-/datum/organ/internal/brain/robot // brains for shells
- var/machine_brain_type=null
-
-
-/datum/organ/internal/brain/robot/proc/create_robot_brain_replacement(var/target,var/new_location)
- var/obj/item/device/mmi/new_mmi
- if (machine_brain_type=="Posibrain")
- new_mmi = new/obj/item/device/mmi/posibrain()
- new_mmi.name = "positronic brain ([owner])"
- new_mmi.brainmob.name = owner.real_name
- new_mmi.brainmob.real_name = owner.real_name
- else
- new_mmi = new/obj/item/device/mmi()
- new_mmi.transfer_identity(target)
- new_mmi.loc = new_location
- return new_mmi
-
/datum/organ/internal/brain/xeno
removed_type = /obj/item/organ/brain/xeno
diff --git a/code/modules/organs/organ_objects.dm b/code/modules/organs/organ_objects.dm
index c375cbb4..a97f1f28 100644
--- a/code/modules/organs/organ_objects.dm
+++ b/code/modules/organs/organ_objects.dm
@@ -180,11 +180,6 @@
msg_admin_attack("[user.name] ([user.ckey]) removed a vital organ ([src]) from [target.name] ([target.ckey]) (INTENT: [uppertext(user.a_intent)]) (JMP)")
target.death()
-
-/obj/item/organ/proc/exposed_to_the_world() // this is only useful for organs that change when actually removed from the body
- return
-
-
/obj/item/organ/appendix/removed(var/mob/living/target,var/mob/living/user)
..()
diff --git a/code/modules/organs/synth_skin.dm b/code/modules/organs/synth_skin.dm
deleted file mode 100644
index 27a55411..00000000
--- a/code/modules/organs/synth_skin.dm
+++ /dev/null
@@ -1,362 +0,0 @@
-/*
-
-We need to mix blending into limb object code, this will slow shit down a lot.
-
-*/
-
-var/SYNTHETIC_COVERING_WORKING=1
-var/SYNTHETIC_COVERING_DAMAGED=0
-
-datum/synthetic_limb_cover
- var/coverage //
- var/colour=null//
- var/datum/organ/external/limb_datum // the limb in question
- var/obj/item/robot_parts/limb_item // also the limb in question (if dismembered)
- var/main_icon = 'icons/mob/human_races/robotic.dmi'
- var/damage_icon = 'icons/mob/human_races/robotic.dmi'
- var/icon_key_type="BAD"
- var/hair_species=null
- var/eyes_state = "blank_eyes"
- var/tail = null
-
-
-datum/synthetic_limb_cover/New( var/datum/organ/external/datum_target=null,var/input_colour=null)
- limb_datum=datum_target
- coverage=SYNTHETIC_COVERING_WORKING // start working
- colour= (input_colour) ? input_colour : rgb(128,128,128)
-
-
-datum/synthetic_limb_cover/proc/get_icon() // default mechanical limbs return robo versions
- var/icon/temp = new /icon((coverage ? main_icon : damage_icon), "[limb_datum.icon_name][limb_datum.get_gender_string()]") // only add a gender if it's necessary
- var/icon/result = icon(temp)
- result.Blend(colour, ICON_ADD)
- return result
-
-
-datum/synthetic_limb_cover/proc/repair()
- coverage = SYNTHETIC_COVERING_WORKING
- update_icon()
-
-
-datum/synthetic_limb_cover/proc/damage()
- coverage = SYNTHETIC_COVERING_DAMAGED
- update_icon()
-
-
-datum/synthetic_limb_cover/proc/set_colour(input_colour)
- colour=input_colour
-
-
-datum/synthetic_limb_cover/proc/update_icon()
- if (limb_datum)
- if (limb_datum.owner)
- limb_datum.owner.update_body()
-
-
-datum/synthetic_limb_cover/proc/get_icon_key() // this is going to wreck the icon cache but to do custom colour per limb this is necessary
- return "SYNTH:[icon_key_type]:[colour]:[coverage]"
-
-
-datum/synthetic_limb_cover/paint
- main_icon = 'icons/mob/human_races/r_machine.dmi'
- icon_key_type = "Paint"
- hair_species = "Machine"
-
-
-datum/synthetic_limb_cover/skin
- main_icon = 'icons/mob/human_races/r_human_grey.dmi'
- icon_key_type = "Skin"
- hair_species = "Human"
- eyes_state="eyes_s"
-
-
-datum/synthetic_limb_cover/fur
- main_icon = 'icons/mob/human_races/r_tajaran.dmi'
- icon_key_type = "Fur"
- hair_species = "Tajaran"
- eyes_state="eyes_s"
- tail = "tajtail"
-
-
-datum/synthetic_limb_cover/scales
- main_icon = 'icons/mob/human_races/r_lizard.dmi'
- icon_key_type = "Scales"
- hair_species = "Unathi"
- eyes_state="eyes_s"
- tail = "sogtail"
-
-
-var/list/limb_covering_references
-/proc/get_limb_covering_references()
- if (isnull(limb_covering_references))
- limb_covering_references = list()
- for(var/skin_type in typesof(/datum/synthetic_limb_cover)-/datum/synthetic_limb_cover)
- var/datum/synthetic_limb_cover/temp_cover = new skin_type()
- limb_covering_references[skin_type]=temp_cover
- return limb_covering_references
-
-
-var/list/limb_covering_names
-/proc/get_limb_covering_names()
- if (isnull(limb_covering_names))
- limb_covering_names=list("None")
- var/list/refs=get_limb_covering_references()
- for(var/skin_type in refs)
- var/datum/synthetic_limb_cover/temp=refs[skin_type]
- limb_covering_names.Add(temp.icon_key_type)
- return limb_covering_names
-
-
-var/list/limb_covering_list
-/proc/get_limb_covering_list()
- if(isnull(limb_covering_list))
- limb_covering_list=list("None"=null)
- var/list/refs=get_limb_covering_references()
- for(var/skin_type in refs)
- var/datum/synthetic_limb_cover/temp=refs[skin_type]
- limb_covering_list[temp.icon_key_type]=skin_type
- return limb_covering_list
-
-
-/obj/item/weapon/synth_skin_spray
- name = "robot paint gun"
- desc = "A compact hand-held spray gun for painting synthetics."
- icon = 'icons/obj/synthskin.dmi'
- icon_state = "spray_can_icon"
- force = 5.0
- throwforce = 7.0
- w_class = 2.0
- flags = FPRINT | TABLEPASS
- slot_flags = SLOT_BELT
- origin_tech = "materials=1;engineering=1"
- attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
- var/icon/spray_can_icon = null
- var/obj/item/weapon/synth_skin_cartridge/cartridge = null
- var/construction_time = 20
- var/list/construction_cost = list("metal"=400,"glass"=100)
- New()
- update_icon()
-
-
-proc/create_tinted_icon(icon_name, icon_state_name, target_colour)
- var/icon/result = new /icon(icon_name,icon_state_name)
- result.Blend(target_colour, ICON_ADD) // if we have charges left, show the colour, otherwise grey
- return result
-
-
-/obj/item/weapon/synth_skin_spray/proc/paint_icon()
- return create_tinted_icon(icon,"installed_paint_skin",cartridge.paint_colour)
-
-/obj/item/weapon/synth_skin_spray/proc/hair_icon()
- return create_tinted_icon(icon,"installed_paint_hair",cartridge.hair_colour)
-
-/obj/item/weapon/synth_skin_spray/proc/cartridge_icon()
- return new/icon(icon,"[cartridge.installed_icon]")
-
-/obj/item/weapon/synth_skin_spray/proc/charges_icon()
- return new/icon(icon,"charges_[cartridge.current_charges]")
-
-
-/obj/item/weapon/synth_skin_spray/update_icon()
- underlays.Cut()
- overlays.Cut()
- if (cartridge)
- underlays += cartridge_icon()
- underlays += paint_icon()
- underlays += hair_icon()
- overlays += charges_icon()
-
-
-/obj/item/weapon/synth_skin_spray/attack(mob/M, mob/user)
- switch (user.a_intent)
- if ("hurt")
- ..(M,user)
- playsound(loc, "swing_hit", 50, 1, -1)
- if("help")
- return try_to_paint(M,user)
-
-
-/obj/item/weapon/synth_skin_spray/proc/allowed_to_paint(mob/living/carbon/human/human_target, mob/user, target)
- if (!cartridge)
- user << "You cannot paint anything with an empty spray gun."
- if (human_target!=user)
- human_target << "[user] waves the spray gun vaguely toward you but the gun is empty."
- return
- if (!cartridge.current_charges)
- user << "You click the [src] but your [cartridge] is empty."
- if (human_target!=user)
- human_target << "[user] clicks the [src] at you but their [cartridge] is empty."
- return
- if(!istype(human_target,/mob/living/carbon/human))
- user << "You can't figure out a way you could apply paint to [human_target]."
- if (human_target!=user)
- human_target << "[user] stares at you and appears to decide that they're unable to paint you."
- return
- var/datum/organ/external/datum_target=human_target.get_organ(target)
- if(!datum_target || (!datum_target.can_take_covering()))
- user << "You cannot paint [human_target]'s [target] because it's too badly damaged."
- if (human_target!=user)
- human_target << "[user] goes to paint your [target] but it's too badly damaged."
- return
- if (!(datum_target.status && ORGAN_ROBOT))
- if (human_target!=user)
- user << "You go to paint [human_target]'s [target] but realize that it isn't robotic.."
- human_target << "[user] looks like they are about to try to paint your [target] before realizing that it isn't robotic."
- else
- user << "Your [target] isn't robotic, so you decide not to try to paint it."
- return
- return TRUE
-
-
-/obj/item/weapon/synth_skin_spray/proc/try_to_paint(mob/living/carbon/human/human_target, mob/user)
- var/target=user.zone_sel.selecting
- if (target in list("mouth","eyes")) // we don't paint these individually
- target="head"
- if (allowed_to_paint(human_target,user,target))
- paint_organ(human_target, user, human_target.get_organ(target))
-
-
-/obj/item/weapon/synth_skin_spray/proc/paint_organ(mob/M, mob/user, datum/organ/external/datum_target)
- if (datum_target.covering) // if we've already got a covering, remove it
- del(datum_target.covering)
- datum_target.covering = new cartridge.covering_path(datum_target,cartridge.paint_colour)
- var/mob/living/carbon/human/human_target = M
- if (istype(datum_target,/datum/organ/external/head))
- var/list/hair_colour_as_list = htmlcolour_to_values(cartridge.hair_colour)
- human_target.r_hair = hair_colour_as_list[1] // byond starts at 1! WHYYYYYYY?!!!! -jf
- human_target.g_hair = hair_colour_as_list[2]
- human_target.b_hair = hair_colour_as_list[3]
- human_target.r_facial = hair_colour_as_list[1]
- human_target.g_facial = hair_colour_as_list[2]
- human_target.b_facial = hair_colour_as_list[3]
- human_target.h_style=random_hair_style(human_target.gender,human_target.species)
- human_target.update_hair()
-
-
- if (istype(datum_target,/datum/organ/external/groin)) // this is a bit reductive, but whatever
- var/gender_string = input(user,"What sex do you want this shell to appear as?") in list("Male","Female")
- human_target.gender = (gender_string=="Male") ? MALE : FEMALE
- human_target.update_body(TRUE)
- cartridge.current_charges--
- user.visible_message("[user] has covered [M]'s [datum_target.display_name] with [cartridge.covering_description].")
- update_icon()
-
-
-/obj/item/weapon/synth_skin_spray/attackby(obj/item/weapon/W, mob/user)
- if(istype(W, /obj/item/weapon/synth_skin_cartridge))
- if (!cartridge)
- user.drop_item()
- W.loc = src
- cartridge=W
- user << "You insert \the [W] into [src]."
- update_icon()
- else
- user << "You will have to remove the other cartridge first."
-
-
-/obj/item/weapon/synth_skin_spray/attack_hand(mob/user)
- var/obj/item/inactive_item = user.get_inactive_hand()
- if (src==inactive_item) // if we are clicking on this with our off hand
- if(src.cartridge)
- src.cartridge.add_fingerprint(user)
- user.put_in_active_hand(src.cartridge)
- user << "You remove \the [src.cartridge] from the [src]."
- src.cartridge.update_icon()
- src.cartridge = null
- update_icon()
- return
- return ..()
-
-
-/obj/item/weapon/synth_skin_cartridge
- name = "ERROR"
- desc = "You should not be reading this."
- icon = 'icons/obj/synthskin.dmi'
- icon_state = "bottle_paint"
- var/installed_icon = "installed_paint"
- flags = FPRINT | TABLEPASS
- var/max_charges = 9
- var/current_charges = 9
- var/construction_time = 20
- var/paint_colour = null
- var/hair_colour = null
- var/covering_description = "paint"
- var/list/construction_cost = list("metal"=200,"glass"=50)
- var/covering_path = "/datum/synthetic_limb_cover/paint"
- origin_tech = "materials=1;engineering=1"
- New()
- paint_colour = rgb(128,128,128) // starts on red
- hair_colour = rgb(128,128,128) // starts black
- update_icon()
-
-
-/obj/item/weapon/synth_skin_cartridge/proc/get_charges_string()
- return " It looks like there are [current_charges] charges left."
-
-
-/obj/item/weapon/synth_skin_cartridge/examine(mob/user)
- user << src.desc + get_charges_string()
-
-
-/obj/item/weapon/synth_skin_cartridge/attack_self(mob/user)
- pick_colours(user)
-
-
-/obj/item/weapon/synth_skin_cartridge/proc/pick_colours(mob/user)
- var/new_paint = input(user, "Choose the primary colour you want to paint.", "Synthetic Painting") as color|null
- if(new_paint)
- paint_colour = new_paint
- var/new_hair = input(user, "Choose the hair colour you want to paint.", "Synthetic Painting") as color|null
- if(new_hair)
- hair_colour = new_hair
- update_icon()
-
-
-/obj/item/weapon/synth_skin_cartridge/proc/paint_icon()
- return create_tinted_icon(icon,"bottle_paint_skin",paint_colour)
-
-
-/obj/item/weapon/synth_skin_cartridge/proc/hair_icon()
- return create_tinted_icon(icon,"bottle_paint_hair",hair_colour)
-
-
-/obj/item/weapon/synth_skin_cartridge/update_icon()
- overlays.Cut()
- if (current_charges > 0)
- overlays += paint_icon()
- overlays += hair_icon()
-
-
-/obj/item/weapon/synth_skin_cartridge/paint
- name = "synthetic paint cartridge"
- desc = "A small cartridge for robotic paint."
-
-
-/obj/item/weapon/synth_skin_cartridge/skin
- name = "synthetic skin cartridge"
- desc = "A small cartridge filled with pressurized synthetic skin. It's covered in thin grease."
- icon_state = "bottle_skin"
- installed_icon = "installed_skin"
- covering_path = "/datum/synthetic_limb_cover/skin"
- origin_tech = "materials=1;engineering=1;biotech=2"
- covering_description = "synthetic skin"
-
-
-/obj/item/weapon/synth_skin_cartridge/fur
- name = "synthetic fur cartridge"
- desc = "A small cartridge filled with pressurized synthetic fur. Dozens of fine hairs are stuck to it with static."
- icon_state = "bottle_fur"
- installed_icon = "installed_fur"
- covering_path = "/datum/synthetic_limb_cover/fur"
- origin_tech = "materials=1;engineering=1;biotech=3"
- covering_description = "synthetic fur"
-
-
-/obj/item/weapon/synth_skin_cartridge/scales
- name = "synthetic scales cartridge"
- desc = "A small cartridge filled with pressurized synthetic scales. It makes a dry crunching noise when you shake it."
- icon_state = "bottle_scales"
- installed_icon = "installed_scales"
- covering_path = "/datum/synthetic_limb_cover/scales"
- origin_tech = "materials=1;engineering=1;biotech=3"
- covering_description = "synthetic scales"
\ No newline at end of file
diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm
index 3ea958bb..19f64c5d 100644
--- a/code/modules/surgery/organs_internal.dm
+++ b/code/modules/surgery/organs_internal.dm
@@ -305,11 +305,11 @@
// Extract the organ!
if(target.op_stage.current_organ)
var/datum/organ/internal/I = target.internal_organs_by_name[target.op_stage.current_organ]
+ var/obj/item/organ/O
if(I && istype(I))
- var/obj/item/organ/new_organ_object = I.remove(user)
- if(new_organ_object && istype(new_organ_object))
- new_organ_object.removed(target,user)
- new_organ_object.exposed_to_the_world() // useless except for replacements
+ O = I.remove(user)
+ if(O && istype(O))
+ 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)
diff --git a/icons/mob/human_face.dmi b/icons/mob/human_face.dmi
index 1f65c43f..0f28d76a 100644
Binary files a/icons/mob/human_face.dmi and b/icons/mob/human_face.dmi differ
diff --git a/icons/mob/human_races/r_human_grey.dmi b/icons/mob/human_races/r_human_grey.dmi
deleted file mode 100644
index 0404ad8f..00000000
Binary files a/icons/mob/human_races/r_human_grey.dmi and /dev/null differ
diff --git a/icons/obj/synthskin.dmi b/icons/obj/synthskin.dmi
deleted file mode 100644
index 3c45809b..00000000
Binary files a/icons/obj/synthskin.dmi and /dev/null differ