diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index de609d10d9..848a195c70 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -404,9 +404,9 @@ client message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].", 1) if(istype(M, /mob/living/carbon/human)) for(var/obj/item/weapon/card/id/ID in M.contents) - if(ID.registered == M.real_name) + if(ID.registered_name == M.real_name) ID.name = "[new_name]'s ID Card ([ID.assignment])" - ID.registered = new_name + ID.registered_name = new_name break for(var/obj/item/device/pda/PDA in M.contents) if(PDA.owner == M.real_name) diff --git a/code/datums/helper_datums/tension.dm b/code/datums/helper_datums/tension.dm index c8974a8331..58481d5838 100644 --- a/code/datums/helper_datums/tension.dm +++ b/code/datums/helper_datums/tension.dm @@ -971,6 +971,10 @@ var/global/datum/tension/tension_master //del(spawn_location) // Commenting this out for multiple commando teams. return new_syndicate_commando + + + + /proc/create_borg_death_commando(obj/spawn_location, name) var/mob/living/silicon/robot/new_borg_deathsquad = new(spawn_location.loc, 1) diff --git a/code/datums/shuttle_controller.dm b/code/datums/shuttle_controller.dm index 5e34a91d4a..25ce382022 100644 --- a/code/datums/shuttle_controller.dm +++ b/code/datums/shuttle_controller.dm @@ -75,7 +75,8 @@ datum/shuttle_controller emergency_shuttle process() - if(!online) return + if(!online) + return var/timeleft = timeleft() if(timeleft > 1e5) // midnight rollover protection timeleft = 0 diff --git a/code/defines/obj/clothing/costume.dm b/code/defines/obj/clothing/costume.dm index 27f2cfb421..26bdf42b29 100644 --- a/code/defines/obj/clothing/costume.dm +++ b/code/defines/obj/clothing/costume.dm @@ -162,6 +162,6 @@ W.name = "Fake Cyborg Card" W.access = list(access_theatre) W.assignment = "Kill all humans! Beep. Boop." - W.registered = name + W.registered_name = name del(src) */ \ No newline at end of file diff --git a/code/defines/obj/decal.dm b/code/defines/obj/decal.dm index 11d72fd9ff..3ee485fd45 100644 --- a/code/defines/obj/decal.dm +++ b/code/defines/obj/decal.dm @@ -71,6 +71,18 @@ if(B != src) del(B) + +/obj/effect/decal/cleanable/blood/drip + name = "drips of blood" + desc = "It's red." + gender = PLURAL + density = 0 + anchored = 1 + layer = 2 + icon = 'drip.dmi' + icon_state = "1" +// track_amt = 0 + /obj/effect/decal/cleanable/blood/splatter random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5") diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 23bbd97ac5..a7728a71da 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -482,8 +482,10 @@ icon_state = "id" item_state = "card-id" var/access = list() - var/registered = null + var/registered_name = null // The name registered_name on the card + var/assignment = null + var/over_jumpsuit = 1 // If set to 0, it won't display on top of the mob's jumpsuit var/dorm = 0 // determines if this ID has claimed a dorm already /obj/item/weapon/card/id/silver @@ -507,7 +509,7 @@ /obj/item/weapon/card/id/syndicate_command name = "syndicate ID card" desc = "An ID straight from the Syndicate." - registered = "Syndicate" + registered_name = "Syndicate" assignment = "Syndicate Overlord" access = list(access_syndicate) @@ -516,7 +518,7 @@ desc = "The spare ID of the High Lord himself." icon_state = "gold" item_state = "gold_id" - registered = "Captain" + registered_name = "Captain" assignment = "Captain" New() access = get_access("Captain") @@ -526,7 +528,7 @@ name = "\improper CentCom. ID" desc = "An ID straight from Cent. Com." icon_state = "centcom" - registered = "Central Command" + registered_name = "Central Command" assignment = "General" New() access = get_all_centcom_access() diff --git a/code/defines/procs/forum_activation.dm b/code/defines/procs/forum_activation.dm index 88e9705e5e..cd7008cf12 100644 --- a/code/defines/procs/forum_activation.dm +++ b/code/defines/procs/forum_activation.dm @@ -77,7 +77,7 @@ dbcon.Disconnect() return - query = dbcon.NewQuery("UPDATE [forumsqldb].phpbb_user_group SET group_id = '[forum_authenticated_group]' WHERE user_id = '[uid]' AND group_id = '[forum_activated_group]'") // Replace 'Registered Users' group with 'Activated Users' + query = dbcon.NewQuery("UPDATE [forumsqldb].phpbb_user_group SET group_id = '[forum_authenticated_group]' WHERE user_id = '[uid]' AND group_id = '[forum_activated_group]'") // Replace 'registered_name Users' group with 'Activated Users' if(!query.Execute()) src << "Unable to move account into authenticated group. This error shouldn't occur, contact an administrator for help. Authentication failed." dbcon.Disconnect() diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm index be5a226f69..8bd5dc4121 100644 --- a/code/defines/procs/helpers.dm +++ b/code/defines/procs/helpers.dm @@ -729,9 +729,9 @@ Turf and target are seperate in case you want to teleport some distance from a t pda.name = "PDA-[newname] ([pda.ownjob])" break for(var/obj/item/weapon/card/id/id in M.contents) - if(id.registered == oldname) - id.registered = newname - id.name = "[id.registered]'s ID Card ([id.assignment])" + if(id.registered_name == oldname) + id.registered_name = newname + id.name = "[id.registered_name]'s ID Card ([id.assignment])" break /proc/ionnum() diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm index c9510751de..259e21aa74 100644 --- a/code/game/atom_procs.dm +++ b/code/game/atom_procs.dm @@ -644,6 +644,25 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl if ( !animal.restrained() ) attack_animal(animal) + + + + + + + + + + + + + + + + + + + /atom/DblClick(location, control, params) //TODO: DEFERRED: REWRITE // world << "checking if this shit gets called at all" @@ -916,7 +935,18 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl // ------- YOU DO NOT HAVE AN ITEM IN YOUR HAND ------- if (istype(usr, /mob/living/carbon/human)) // ------- YOU ARE HUMAN ------- + if(usr.hand) // if he's using his right hand. + var/datum/organ/external/temp = usr:get_organ("r_hand") + if(temp.destroyed) + usr << "\blue You look at your stump." + return + else + var/datum/organ/external/temp = usr:get_organ("l_hand") + if(temp.destroyed) + usr << "\blue You look at your stump." + return src.attack_hand(usr, usr.hand) + usr:afterattack(src, usr, (t5 ? 1 : 0), params) else // ------- YOU ARE NOT HUMAN. WHAT ARE YOU - DETERMINED HERE AND PROPER ATTACK_MOBTYPE CALLED ------- if (istype(usr, /mob/living/carbon/monkey)) diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index cfab04b57b..85965decb1 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -403,6 +403,117 @@ del(usr) return + +/client/proc/changeling_greater_form() // Oh shit, it's on now. + + set category = "Changeling" + set name = "Greater Form" + set desc = "Become onto the Goddess" + + if (usr.monkeyizing) + return + for(var/obj/item/W in src) + usr.drop_from_slot(W) + usr.update_clothing() + usr.monkeyizing = 1 + usr.canmove = 0 + usr.icon = null + usr.invisibility = 101 + for(var/datum/organ/external/organ in usr:organs) + del(organ) + + var/atom/movable/overlay/animation = new /atom/movable/overlay( usr.loc ) + animation.icon_state = "blank" + animation.icon = 'mob.dmi' + animation.master = src + flick("h2monkey", animation) + sleep(48) + //animation = null + var/mob/living/carbon/human/tajaran/Emissary/O = new /mob/living/carbon/human/tajaran/Emissary( src ) + del(animation) + + O.real_name = usr.real_name + O.name = usr.name + O.dna = usr.dna + usr.dna = null + O.changeling = usr.changeling + updateappearance(O,O.dna.uni_identity) + O.loc = usr.loc + O.viruses = usr.viruses + usr.viruses = list() + for(var/datum/disease/D in O.viruses) + D.affected_mob = O + O.universal_speak = 1 //hacky fix until someone can figure out how to make them only understand humans + + if (usr.client) + usr.client.mob = O + if(usr.mind) + usr.mind.transfer_to(O) + + spawn(300) + command_alert("Extreme danger. A level four biological entity has been detected on board the station. Emergancy evacuation procedures have begun. Civilian staff, do NOT engage the creature if spotted. Renforcements are on route.") + emergency_shuttle.online = 1 + emergency_shuttle.settimeleft(10) + spawn(10) + var/list/candidates = list() + + for(var/mob/dead/observer/G in world) + candidates += G + + for(var/mob/dead/observer/G in candidates) + if(!G.client || !G.key) + candidates.Remove(G) + + for(var/obj/structure/stool/bed/chair/C in locate(/area/shuttle/escape/transit)) + + var/mob/living/carbon/human/new_commando = create_death_commando(C, 0) + + if(candidates.len) + var/mob/dead/observer/G = pick(candidates) + new_commando.mind.key = G.key//For mind stuff. + new_commando.key = G.key + new_commando.internal = new_commando.s_store + new_commando.internals.icon_state = "internal1" + candidates -= G + del(G) + else + break + + //So they don't forget their code or mission. + new_commando.mind.store_memory("Mission: \red Assist in mobilizing station crew against the hostile entity. Do not allow the hostile entity to escape. Do not leave or permit anyone to leave until the entity is contained.") + + new_commando << "\blue You are a Special Ops Commando in the service of Central Command. \nYour current mission is: \redAssist in mobilizing station crew against the hostile entity. Do not allow the hostile entity to escape. Do not leave or permit anyone to leave until the entity is contained." + spawn(100) + emergency_shuttle.online = 0 + command_alert("The emergancy shuttle will hold until the hostile entity has been terminated. During evacuation, do NOT use escape pods. To avoid the chance of a hostile entity escaping, the Thunderchild will be firing on and destorying any escape pods leaving the station") + O << "Your way out has arrived. Obtain the ID of three heads to override the holding protocol and escape. Let none stand in your way, for you are a perfect creature." + for(var/datum/objective/objective in O.mind.objectives) + O.mind.objectives.Remove(objective) + del(objective) + var/datum/objective/new_objective = null + new_objective = new /datum/objective/escape + new_objective.owner = O.mind + O.mind.objectives += new_objective + + spawn(0) + while(emergency_shuttle.online == 0) + sleep(10) + command_alert("Authorization codes recieved, confirming hostile entity terminated. The emergancy shuttle is now departing.") + spawn(900) + for(var/mob/M in locate(/area/shuttle/escape_pod1/transit)) + M.gib() + for(var/mob/M in locate(/area/shuttle/escape_pod2/transit)) + M.gib() + for(var/mob/M in locate(/area/shuttle/escape_pod3/transit)) + M.gib() + for(var/mob/M in locate(/area/shuttle/escape_pod5/transit)) + M.gib() + while(emergency_shuttle.online == 1) + sleep(10) + if((locate(/mob/living/carbon/human/tajaran/Emissary) in locate(/area/shuttle/escape/centcom)) || (locate(/mob/living/carbon/human/tajaran/Emissary) in locate(/area/centcom/evac)) || (locate(/mob/living/carbon/human/tajaran/Emissary) in locate(/area/centcom/control) ) ) + command_alert("What the fu- Shoot it! SHOOT IT! CENTRAL COMMAND TRANSMITTING DIST- *static* Nevermind previous transmission, Nanotrasen. We're all good here. Subject contained. Standing down alert status.") + + /client/proc/changeling_fakedeath() set category = "Changeling" set name = "Regenerative Stasis (20)" diff --git a/code/game/gamemodes/changeling/modularchangling.dm b/code/game/gamemodes/changeling/modularchangling.dm index f280c9f1a9..d28c651fad 100644 --- a/code/game/gamemodes/changeling/modularchangling.dm +++ b/code/game/gamemodes/changeling/modularchangling.dm @@ -47,7 +47,7 @@ var/list/obj/effect/proc_holder/power/powerinstances = list() desc = "We become the pinnicle of evolution. We will show the humans what happens when they leave their isle of ignorance." genomecost = 250 - // doesn't happen lol. Yet! + verbpath = /client/proc/changeling_greater_form /obj/effect/proc_holder/power/fakedeath name = "Fake Death" diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 436c708e64..1121413c7f 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -272,9 +272,9 @@ var/global/datum/controller/occupations/job_master else C = new /obj/item/weapon/card/id(H) if(C) - C.registered = H.real_name + C.registered_name = H.real_name C.assignment = rank - C.name = "[C.registered]'s ID Card ([C.assignment])" + C.name = "[C.registered_name]'s ID Card ([C.assignment])" C.access = get_access(C.assignment) H.equip_if_possible(C, H.slot_wear_id) if(prob(50)) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index a3d2f3ef7d..76ea7b3543 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -72,7 +72,7 @@ dat += text("Dermaline: [] units
", occupant.reagents.get_reagent_amount("dermaline")) dat += text("Bicaridine: [] units
", occupant.reagents.get_reagent_amount("bicaridine")) dat += text("Dexalin: [] units
", occupant.reagents.get_reagent_amount("dexalin")) - dat += text("
Refresh meter readings each second
Inject Inaprovaline
Inject Soporific
Inject Dermaline
Inject Bicaridine
Inject Dexalin", src, src, src, src, src, src) + dat += text("
Refresh meter readings each second
Inject Inaprovaline
Inject Soporific
Inject Dermaline
Inject Bicaridine
Inject Dexalin
Regenerate Organs", src, src, src, src, src, src,src) else dat += "The sleeper is empty." dat += text("

Close", user) @@ -98,11 +98,40 @@ src.connected.inject_bicaridine(usr) if (href_list["dex"]) src.connected.inject_dexalin(usr) + if (href_list["organ"]) + if(istype(src.connected.occupant,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = src.connected.occupant + for(var/datum/organ/external/e in H.organs) + if(e.destroyed) + usr << "Please wait, regenerating limb. Administring nanite-bath. Do not eject occupant until told to." + sleep(100) + if(!src.connected.occupant) + return + e.destroyed = 0 + // e.brute_dam = 0.0 + // e.burn_dam = 0.0 + e.bandaged = 0.0 + e.max_damage = initial(e.max_damage) + e.bleeding = 0 + e.open = 0 + e.broken = 0 + e.destroyed = 0 + e.perma_injury = 0 + + if(e.wounds) + for(var/datum/organ/wound/W in e.wounds) + del(W) + e.update_icon() + H.update_body() + H.update_face() + H.UpdateDamageIcon() + usr << "Run complete. Limbs regenerated. Additional healing may be required." else if(src.connected.occupant.health > -100) if (href_list["inap"]) src.connected.inject_inap(usr) - if (href_list["stox"] || href_list["derm"] || href_list["bic"] || href_list["dex"]) + else + //if (href_list["stox"] || href_list["derm"] || href_list["bic"] || href_list["dex"]) usr << "\red \b this person is not in good enough condition for sleepers to be effective! Use another means of treatment, such as cryogenics!" else usr << "\red \b This person has no life for to preserve anymore. Take them to a department capable of reanimating them." diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm index 7b49b6a904..f7c44e1176 100644 --- a/code/game/machinery/bots/ed209bot.dm +++ b/code/game/machinery/bots/ed209bot.dm @@ -649,7 +649,7 @@ Auto Patrol: []"}, var/obj/item/device/pda/pda = perp:wear_id id = pda.id if (id) - perpname = id.registered + perpname = id.registered_name else var/obj/item/device/pda/pda = perp:wear_id perpname = pda.owner diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm index cc520c2544..037cc1e68c 100644 --- a/code/game/machinery/bots/secbot.dm +++ b/code/game/machinery/bots/secbot.dm @@ -626,7 +626,7 @@ Auto Patrol: []"}, var/obj/item/device/pda/pda = perp:wear_id id = pda.id if(id) - perpname = id.registered + perpname = id.registered_name else var/obj/item/device/pda/pda = perp:wear_id perpname = pda.owner diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 1cfa528cac..e404f9537c 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -64,8 +64,8 @@ target_name = modify.name else target_name = "--------" - if(modify && modify.registered) - target_owner = modify.registered + if(modify && modify.registered_name) + target_owner = modify.registered_name else target_owner = "--------" if(modify && modify.assignment) @@ -121,7 +121,7 @@ carddesc += "
" carddesc += "" carddesc += "" - carddesc += "Registered: " + carddesc += "registered_name: " carddesc += "" carddesc += "
" carddesc += "Assignment: " @@ -170,8 +170,8 @@ switch(href_list["choice"]) if ("modify") if (modify) - data_core.manifest_modify(modify.registered, modify.assignment) - modify.name = text("[modify.registered]'s ID Card ([modify.assignment])") + data_core.manifest_modify(modify.registered_name, modify.assignment) + modify.name = text("[modify.registered_name]'s ID Card ([modify.assignment])") if(ishuman(usr)) modify.loc = usr.loc if(!usr.get_active_hand()) @@ -236,7 +236,7 @@ var/t2 = modify //var/t1 = input(usr, "What name?", "ID computer", null) as text if ((authenticated && modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf))) - modify.registered = href_list["reg"] + modify.registered_name = href_list["reg"] if ("mode") mode = text2num(href_list["mode_target"]) if ("print") @@ -251,7 +251,7 @@ P.name = "paper- 'Crew Manifest'" printing = null if (modify) - modify.name = text("[modify.registered]'s ID Card ([modify.assignment])") + modify.name = text("[modify.registered_name]'s ID Card ([modify.assignment])") updateUsrDialog() return diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 10ff15914f..212030a384 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -138,7 +138,7 @@ src.active1 = null src.active2 = null if (src.check_access(src.scan)) - src.authenticated = src.scan.registered + src.authenticated = src.scan.registered_name src.rank = src.scan.assignment src.screen = 1 if (src.authenticated) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 0d77ef48dc..1f6dab284f 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -221,7 +221,7 @@ What a mess.*/ active1 = null active2 = null if(check_access(scan)) - authenticated = scan.registered + authenticated = scan.registered_name rank = scan.assignment screen = 1 //RECORD FUNCTIONS diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm index b278ab2f7b..6d96451042 100644 --- a/code/game/machinery/computer/shuttle.dm +++ b/code/game/machinery/computer/shuttle.dm @@ -14,23 +14,23 @@ var/obj/item/device/pda/pda = W W = pda.id if (!W:access) //no access - user << "The access level of [W:registered]\'s card is not high enough. " + user << "The access level of [W:registered_name]\'s card is not high enough. " return var/list/cardaccess = W:access if(!istype(cardaccess, /list) || !cardaccess.len) //no access - user << "The access level of [W:registered]\'s card is not high enough. " + user << "The access level of [W:registered_name]\'s card is not high enough. " return if(!(access_heads in W:access)) //doesn't have this access - user << "The access level of [W:registered]\'s card is not high enough. " + user << "The access level of [W:registered_name]\'s card is not high enough. " return 0 var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort") switch(choice) if("Authorize") - src.authorized -= W:registered - src.authorized += W:registered + src.authorized -= W:registered_name + src.authorized += W:registered_name if (src.auth_need - src.authorized.len > 0) message_admins("[key_name_admin(user)] has authorized early shuttle launch") log_game("[user.ckey] has authorized early shuttle launch") @@ -39,13 +39,14 @@ message_admins("[key_name_admin(user)] has launched the shuttle") log_game("[user.ckey] has launched the shuttle early") world << "\blue Alert: Shuttle launch time shortened to 10 seconds!" + emergency_shuttle.online = 1 emergency_shuttle.settimeleft(10) //src.authorized = null del(src.authorized) src.authorized = list( ) if("Repeal") - src.authorized -= W:registered + src.authorized -= W:registered_name world << text("\blue Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len) if("Abort") diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index 11a65dc47d..c56cbc2b79 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -69,7 +69,7 @@ I = pda.id if (I && src.check_access(I)) src.locked = 0 - src.last_configurator = I:registered + src.last_configurator = I:registered_name if (locked) return diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 2b7b4d3227..33f610605c 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -615,11 +615,11 @@ var/list/obj/machinery/newscaster/allCasters = list() //list that will contain r if( istype(I, /obj/item/device/pda) ) var/obj/item/device/pda/P = I if(P.id) - src.scanned_user = "[P.id.registered] ([P.id.assignment])" + src.scanned_user = "[P.id.registered_name] ([P.id.assignment])" src.screen=2 else var/obj/item/weapon/card/id/T = I - src.scanned_user = text("[T.registered] ([T.assignment])") + src.scanned_user = text("[T.registered_name] ([T.assignment])") src.screen=2*/ //Obsolete after autorecognition if (src.isbroken) @@ -806,12 +806,12 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(human_user.wear_id, /obj/item/device/pda) ) //autorecognition, woo! var/obj/item/device/pda/P = human_user.wear_id if(P.id) - src.scanned_user = "[P.id.registered] ([P.id.assignment])" + src.scanned_user = "[P.id.registered_name] ([P.id.assignment])" else src.scanned_user = "Unknown" else if(istype(human_user.wear_id, /obj/item/weapon/card/id) ) var/obj/item/weapon/card/id/ID = human_user.wear_id - src.scanned_user ="[ID.registered] ([ID.assignment])" + src.scanned_user ="[ID.registered_name] ([ID.assignment])" else src.scanned_user ="Unknown" else diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 256c702dc0..c8da66c663 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -433,7 +433,7 @@ Neutralize All Unidentified Life Signs: []
"}, var/obj/item/device/pda/pda = perp:wear_id id = pda.id if (id) - perpname = id.registered + perpname = id.registered_name else var/obj/item/device/pda/pda = perp:wear_id perpname = pda.owner diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 5f53a42e44..9c9d6c675a 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -308,7 +308,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() if (istype(O, /obj/item/weapon/card/id)) if(src.screen == 9) var/obj/item/weapon/card/id/T = O - src.msgVerified = text("Verified by [T.registered] ([T.assignment])") + src.msgVerified = text("Verified by [T.registered_name] ([T.assignment])") src.updateUsrDialog() if(src.screen == 10) var/obj/item/weapon/card/id/ID = O diff --git a/code/game/objects/closets/secure/personal.dm b/code/game/objects/closets/secure/personal.dm index b56ad33f2a..ba6efaa9e4 100644 --- a/code/game/objects/closets/secure/personal.dm +++ b/code/game/objects/closets/secure/personal.dm @@ -1,4 +1,4 @@ -/obj/structure/closet/secure_closet/personal/var/registered = null +/obj/structure/closet/secure_closet/personal/var/registered_name = null /obj/structure/closet/secure_closet/personal/req_access = list(access_all_personal_lockers) /obj/structure/closet/secure_closet/personal/New() @@ -36,16 +36,16 @@ user << "\red It appears to be broken." return var/obj/item/weapon/card/id/I = W - if(!I || !I.registered) return - if(src.allowed(user) || !src.registered || (istype(I) && (src.registered == I.registered))) + if(!I || !I.registered_name) return + if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name))) //they can open all lockers, or nobody owns this, or they own this locker src.locked = !( src.locked ) if(src.locked) src.icon_state = src.icon_locked else src.icon_state = src.icon_closed - if(!src.registered) - src.registered = I.registered - src.desc = "Owned by [I.registered]." + if(!src.registered_name) + src.registered_name = I.registered_name + src.desc = "Owned by [I.registered_name]." else user << "\red Access Denied" else if( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken) diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm index f8d4342bfe..2413afa955 100644 --- a/code/game/objects/devices/PDA/PDA.dm +++ b/code/game/objects/devices/PDA/PDA.dm @@ -197,7 +197,7 @@ if (0) dat += "

PERSONAL DATA ASSISTANT v.1.2

" dat += "Owner: [owner], [ownjob]
" - dat += text("ID: [id ? "[id.registered], [id.assignment]" : "----------"]") + dat += text("ID: [id ? "[id.registered_name], [id.assignment]" : "----------"]") dat += text("[id ? "Update PDA Info" : ""]
") dat += "Station Time: [round(world.time / 36000)+12]:[(world.time / 600 % 60) < 10 ? add_zero(world.time / 600 % 60, 1) : world.time / 600 % 60]"//:[world.time / 100 % 6][world.time / 100 % 10]" @@ -725,7 +725,7 @@ id = I else var/obj/item/weapon/card/I = user.equipped() - if (istype(I, /obj/item/weapon/card/id) && I:registered) + if (istype(I, /obj/item/weapon/card/id) && I:registered_name) if(id)//Get id and replace it. user.drop_item() I.loc = src @@ -748,9 +748,9 @@ if (C:radio) C:radio.hostpda = src - else if (istype(C, /obj/item/weapon/card/id) && C:registered) + else if (istype(C, /obj/item/weapon/card/id) && C:registered_name) if(!owner) - owner = C:registered + owner = C:registered_name ownjob = C:assignment name = "PDA-[owner] ([ownjob])" user << "\blue Card scanned." diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index f0fc48238e..bb2a3aae35 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -453,7 +453,7 @@ if (is_sharp(W)) burst() -/proc/is_sharp(obj/item/W as obj) +/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT? return ( \ istype(W, /obj/item/weapon/screwdriver) || \ istype(W, /obj/item/weapon/pen) || \ @@ -472,5 +472,6 @@ istype(W, /obj/item/weapon/kitchen/utensil/knife) || \ istype(W, /obj/item/weapon/shard) || \ istype(W, /obj/item/weapon/reagent_containers/syringe) || \ - istype(W, /obj/item/weapon/kitchen/utensil/fork) && W.icon_state != "forkloaded" \ + istype(W, /obj/item/weapon/kitchen/utensil/fork) && W.icon_state != "forkloaded" || \ + istype(W, /obj/item/weapon/twohanded/fireaxe) \ ) diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm index d0e9c34b57..b20cc063e5 100644 --- a/code/game/objects/items/item.dm +++ b/code/game/objects/items/item.dm @@ -93,6 +93,18 @@ /obj/item/attack_hand(mob/user as mob) if (!user) return + if (user.hand) + if(ishuman(user)) + var/datum/organ/external/temp = user:get_organ("l_hand") + if(temp.destroyed) + user << "\blue You look at your stump." + return + else + if(ishuman(user)) + var/datum/organ/external/temp = user:get_organ("r_hand") + if(temp.destroyed) + user << "\blue You look at your stump." + if (istype(src.loc, /obj/item/weapon/storage)) for(var/mob/M in range(1, src.loc)) if (M.s_active == src.loc) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 4e861c9367..d0df06652d 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -53,10 +53,10 @@ FINGERPRINT CARD return /obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob) - if(!src.registered) - src.registered = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name) + if(!src.registered_name) + src.registered_name = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name) src.assignment = input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant") - src.name = "[src.registered]'s ID Card ([src.assignment])" + src.name = "[src.registered_name]'s ID Card ([src.assignment])" user << "\blue You successfully forge the ID card." else ..() diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 82b7689a72..a297b507a7 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -343,8 +343,8 @@ This method wont take into account storage items developed in the future and doe reqform.info += "

[station_name] Supply Requisition Form


" if (istype(usr:wear_id, /obj/item/weapon/card/id)) - if(usr:wear_id.registered) - idname = usr:wear_id.registered + if(usr:wear_id.registered_name) + idname = usr:wear_id.registered_name if(usr:wear_id.assignment) idrank = usr:wear_id.assignment if (istype(usr:wear_id, /obj/item/device/pda)) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 07fb857452..402b042cfd 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -189,6 +189,9 @@ verbs += /client/proc/toggleadminhelpsound verbs += /proc/possess verbs += /proc/release + verbs += /client/proc/make_tajaran + + else return //Badmin @@ -417,6 +420,7 @@ verbs -= /client/proc/togglebuildmodeself verbs -= /client/proc/kill_airgroup verbs -= /client/proc/debug_master_controller + verbs -= /client/proc/make_tajaran return diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 7e7e3c8fbc..262272738b 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -359,9 +359,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that var/obj/item/weapon/card/id/id = new/obj/item/weapon/card/id(M); id.icon_state = "gold" id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access() - id.registered = H.real_name + id.registered_name = H.real_name id.assignment = "Captain" - id.name = "[id.registered]'s ID Card ([id.assignment])" + id.name = "[id.registered_name]'s ID Card ([id.assignment])" H.equip_if_possible(id, H.slot_wear_id) H.update_clothing() else @@ -557,7 +557,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that W.name = "[M.real_name]'s ID Card" W.access = get_all_accesses() W.assignment = "Tunnel Clown!" - W.registered = M.real_name + W.registered_name = M.real_name M.equip_if_possible(W, M.slot_wear_id) var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M) @@ -614,7 +614,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that W.name = "[M.real_name]'s ID Card" W.access = get_all_accesses() W.assignment = "Reaper" - W.registered = M.real_name + W.registered_name = M.real_name M.equip_if_possible(W, M.slot_wear_id) if("death commando")//Was looking to add this for a while. @@ -647,7 +647,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that W.access = get_all_accesses() W.access += list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer") W.assignment = "CentCom Review Official" - W.registered = M.real_name + W.registered_name = M.real_name M.equip_if_possible(W, M.slot_wear_id) if("centcom commander") @@ -669,7 +669,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that W.access = get_all_accesses() W.access += get_all_centcom_access() W.assignment = "CentCom Commanding Officer" - W.registered = M.real_name + W.registered_name = M.real_name M.equip_if_possible(W, M.slot_wear_id) if("special ops officer") @@ -691,7 +691,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that W.access = get_all_accesses() W.access += get_all_centcom_access() W.assignment = "Special Operations Officer" - W.registered = M.real_name + W.registered_name = M.real_name M.equip_if_possible(W, M.slot_wear_id) if("blue wizard") @@ -745,7 +745,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that W.access = get_all_accesses() W.access += get_all_centcom_access() W.assignment = "Admiral" - W.registered = M.real_name + W.registered_name = M.real_name M.equip_if_possible(W, M.slot_wear_id) M.update_clothing() diff --git a/code/modules/admin/verbs/onlyone.dm b/code/modules/admin/verbs/onlyone.dm index ecb0da28ee..256d0c1145 100644 --- a/code/modules/admin/verbs/onlyone.dm +++ b/code/modules/admin/verbs/onlyone.dm @@ -49,7 +49,7 @@ W.access = get_all_accesses() W.access += get_all_centcom_access() W.assignment = "Highlander" - W.registered = H.real_name + W.registered_name = H.real_name H.equip_if_possible(W, H.slot_wear_id) message_admins("\blue [key_name_admin(usr)] used THERE CAN BE ONLY ONE!", 1) diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index 4e2d7a6b4a..4e1e554e69 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -135,7 +135,7 @@ var/global/sent_strike_team = 0 if(!(new_commando.mind in ticker.mode.traitors))//If they weren't already an extra traitor. ticker.mode.traitors += new_commando.mind//Adds them to current traitor list. Which is really the extra antagonist list. new_commando.equip_death_commando(leader_selected) - del(spawn_location) +// del(spawn_location) return new_commando /mob/living/carbon/human/proc/equip_death_commando(leader_selected = 0) @@ -190,7 +190,7 @@ var/global/sent_strike_team = 0 W.access = get_all_accesses()//They get full station access. W.access += list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage)//Let's add their alloted CentCom access. W.assignment = "Death Commando" - W.registered = real_name + W.registered_name = real_name equip_if_possible(W, slot_wear_id) resistances += "alien_embryo" diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index c9ea3296fa..779243eb7c 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -186,7 +186,7 @@ var/global/sent_syndicate_strike_team = 0 W.access = get_all_accesses()//They get full station access because obviously the syndicate has HAAAX, and can make special IDs for their most elite members. W.access += list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage, access_syndicate)//Let's add their forged CentCom access and syndicate access. W.assignment = "Syndicate Commando" - W.registered = real_name + W.registered_name = real_name equip_if_possible(W, slot_wear_id) resistances += "alien_embryo" diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index e19f7b5f3c..14937530ac 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -653,27 +653,30 @@ datum del (M:wear_mask) M << "\red Your mask melts away but protects you from the acid!" return + if(!M.unacidable) + if(prob(15) && istype(M, /mob/living/carbon/human) && volume >= 30) - if(prob(15) && istype(M, /mob/living/carbon/human) && volume >= 30) - var/datum/organ/external/affecting = M:get_organ("head") - if(affecting) - affecting.take_damage(25, 0) - M:UpdateDamageIcon() - M:emote("scream") - M << "\red Your face has become disfigured!" - M.real_name = "Unknown" - else - M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl + var/datum/organ/external/affecting = M:get_organ("head") + if(affecting) + affecting.take_damage(25, 0) + M:UpdateDamageIcon() + M:emote("scream") + M << "\red Your face has become disfigured!" + M.real_name = "Unknown" + else + M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl else - M.take_organ_damage(min(15, volume * 2)) + if(!M.unacidable) + M.take_organ_damage(min(15, volume * 2)) reaction_obj(var/obj/O, var/volume) if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(10)) - var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc) - I.desc = "Looks like this was \an [O] some time ago." - for(var/mob/M in viewers(5, O)) - M << "\red \the [O] melts." - del(O) + if(!O.unacidable) + var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc) + I.desc = "Looks like this was \an [O] some time ago." + for(var/mob/M in viewers(5, O)) + M << "\red \the [O] melts." + del(O) pacid name = "Polytrinic acid" @@ -704,38 +707,45 @@ datum else M << "\red Your helmet protects you from the acid!" return - var/datum/organ/external/affecting = M:get_organ("head") - affecting.take_damage(15, 0) - M:UpdateDamageIcon() - M:emote("scream") - if(prob(15)) - M << "\red Your face has become disfigured!" - M.real_name = "Unknown" + + if(!M.unacidable) + var/datum/organ/external/affecting = M:get_organ("head") + affecting.take_damage(15, 0) + M:UpdateDamageIcon() + M:emote("scream") + if(prob(15)) + M << "\red Your face has become disfigured!" + M.real_name = "Unknown" else if(istype(M, /mob/living/carbon/monkey) && M:wear_mask) del (M:wear_mask) M << "\red Your mask melts away but protects you from the acid!" return - M.take_organ_damage(min(15, volume * 4)) // same deal as sulphuric acid + + + if(!M.unacidable) + M.take_organ_damage(min(15, volume * 4)) // same deal as sulphuric acid else - if(istype(M, /mob/living/carbon/human)) - var/datum/organ/external/affecting = M:get_organ("head") - affecting.take_damage(15, 0) - M:UpdateDamageIcon() - M:emote("scream") - if(prob(15)) - M << "\red Your face has become disfigured!" - M.real_name = "Unknown" - else - M.take_organ_damage(min(15, volume * 4)) + if(!M.unacidable) + if(istype(M, /mob/living/carbon/human)) + var/datum/organ/external/affecting = M:get_organ("head") + affecting.take_damage(15, 0) + M:UpdateDamageIcon() + M:emote("scream") + if(prob(15)) + M << "\red Your face has become disfigured!" + M.real_name = "Unknown" + else + M.take_organ_damage(min(15, volume * 4)) reaction_obj(var/obj/O, var/volume) if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom))) - var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc) - I.desc = "Looks like this was \an [O] some time ago." - for(var/mob/M in viewers(5, O)) - M << "\red \the [O] melts." - del(O) + if(!O.unacidable) + var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc) + I.desc = "Looks like this was \an [O] some time ago." + for(var/mob/M in viewers(5, O)) + M << "\red \the [O] melts." + del(O) glycerol name = "Glycerol" diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 603d8a495e..3bbdc60fa6 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -81,7 +81,7 @@ if(perp.wear_id) C.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]") if(istype(perp.wear_id,/obj/item/weapon/card/id)) - perpname = perp.wear_id:registered + perpname = perp.wear_id:registered_name else if(istype(perp.wear_id,/obj/item/device/pda)) var/obj/item/device/pda/tempPda = perp.wear_id perpname = tempPda.owner diff --git a/code/modules/critters/critter_defenses.dm b/code/modules/critters/critter_defenses.dm index f370053ca7..766a9d63b5 100644 --- a/code/modules/critters/critter_defenses.dm +++ b/code/modules/critters/critter_defenses.dm @@ -22,7 +22,12 @@ Contains the procs that control attacking critters if (user.a_intent == "hurt") TakeDamage(rand(1,2) * brutevuln) - if(istype(user, /mob/living/carbon/human)) + if(istajaran(user)) + for(var/mob/O in viewers(src, null)) + O.show_message("\red [user] has slashed at [src]!", 1) + playsound(src.loc, 'slice.ogg', 25, 1, -1) + + else if(istype(user, /mob/living/carbon/human)) for(var/mob/O in viewers(src, null)) O.show_message("\red [user] has punched [src]!", 1) playsound(src.loc, pick('punch1.ogg','punch2.ogg','punch3.ogg','punch4.ogg'), 100, 1) @@ -32,6 +37,8 @@ Contains the procs that control attacking critters O.show_message("\red [user] has slashed at [src]!", 1) playsound(src.loc, 'slice.ogg', 25, 1, -1) + + else for(var/mob/O in viewers(src, null)) O.show_message("\red [user] has bit [src]!", 1) diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index 140e40742d..fc7e81cf2a 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -1,6 +1,6 @@ /mob/living/carbon/brain var - obj/item/device/mmi/container = null + obj/item/container = null timeofhostdeath = 0 New() @@ -29,4 +29,16 @@ return 1 if (istype(other, /mob/living/carbon/metroid)) return 1 - return ..() \ No newline at end of file + return ..() + + +/mob/living/carbon/brain/Login() + ..() + + if (!isturf(src.loc)) + src.client.eye = src.loc + src.client.perspective = EYE_PERSPECTIVE + if (!container || !istype(container, /obj/item/device/mmi)) + src.verbs += /mob/proc/ghost + + return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/brain/death.dm b/code/modules/mob/living/carbon/brain/death.dm index 24e868aaf7..021ef285d9 100644 --- a/code/modules/mob/living/carbon/brain/death.dm +++ b/code/modules/mob/living/carbon/brain/death.dm @@ -1,5 +1,5 @@ /mob/living/carbon/brain/death(gibbed) - if(!gibbed && container)//If not gibbed but in a container. + if(!gibbed && container && istype(container, /obj/item/device/mmi))//If not gibbed but in a container. for(var/mob/O in viewers(container, null)) O.show_message(text("\red []'s MMI flatlines!", src), 1, "\red You hear something flatline.", 2) container.icon_state = "mmi_dead" diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 1169c8e617..aeef8b0fe7 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -40,6 +40,8 @@ clamp_values() + + proc clamp_values() @@ -311,4 +313,5 @@ if(bodytemperature > 409) for(var/datum/disease/D in viruses) D.cure() - return \ No newline at end of file + return + diff --git a/code/modules/mob/living/carbon/brain/say.dm b/code/modules/mob/living/carbon/brain/say.dm index ae306dc6ca..0650033917 100644 --- a/code/modules/mob/living/carbon/brain/say.dm +++ b/code/modules/mob/living/carbon/brain/say.dm @@ -1,3 +1,4 @@ /mob/living/carbon/brain/say(var/message) - if(!container) return //No container, can't speak, bucko./N + if(!(container && istype(container, /obj/item/device/mmi))) + return //No MMI, can't speak, bucko./N else ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 62d8c39239..0a9b872d6c 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -167,7 +167,6 @@ var/status = "" var/brutedamage = org.brute_dam var/burndamage = org.burn_dam - if(halloss > 0) if(prob(30)) brutedamage += halloss @@ -214,4 +213,5 @@ ) /mob/living/carbon/proc/eyecheck() - return 0 \ No newline at end of file + return 0 + diff --git a/code/modules/mob/living/carbon/human/Tajara/examine.dm b/code/modules/mob/living/carbon/human/Tajara/examine.dm new file mode 100644 index 0000000000..c3ecc02f04 --- /dev/null +++ b/code/modules/mob/living/carbon/human/Tajara/examine.dm @@ -0,0 +1,213 @@ +/mob/living/carbon/human/tajaran/examine() + set src in view() + + + + + + + + + + + + +/* BS12 Examine. Not sure why this is here, it seems to be mostly a copy and paste of the parent. +/mob/living/carbon/human/tajaran/examine() + set src in view() + + usr << "\blue *---------*" + + usr << "\blue This is \icon[src.icon] [src.name]! One of the cat-like Tajarans." + + // crappy hack because you can't do \his[src] etc + var/t_his = "its" + var/t_him = "it" + if (src.gender == MALE) + t_his = "his" + t_him = "him" + else if (src.gender == FEMALE) + t_his = "her" + t_him = "her" + + if (src.w_uniform) + if (src.w_uniform.blood_DNA) + usr << "\red [src.name] is wearing a[src.w_uniform.blood_DNA ? " bloody " : " "] \icon[src.w_uniform] [src.w_uniform.name]!" + else + usr << "\blue [src.name] is wearing a \icon[src.w_uniform] [src.w_uniform.name]." + + if (src.handcuffed) + usr << "\blue [src.name] is \icon[src.handcuffed] handcuffed!" + + if (src.wear_suit) + if (src.wear_suit.blood_DNA) + usr << "\red [src.name] has a[src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name] on!" + else + usr << "\blue [src.name] has a \icon[src.wear_suit] [src.wear_suit.name] on." + + if (src.l_ear) + usr << "\blue [src.name] has a \icon[src.l_ear] [src.l_ear.name] on [t_his] left ear." + + if (src.r_ear) + usr << "\blue [src.name] has a \icon[src.r_ear] [src.r_ear.name] on [t_his] right ear." + + if (src.wear_mask) + if (src.wear_mask.blood_DNA) + usr << "\red [src.name] has a[src.wear_mask.blood_DNA ? " bloody " : " "] \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face!" + else + usr << "\blue [src.name] has a \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face." + + if (src.l_hand) + if (src.l_hand.blood_DNA) + usr << "\red [src.name] has a[src.l_hand.blood_DNA ? " bloody " : " "] \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand!" + else + usr << "\blue [src.name] has a \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand." + + if (src.r_hand) + if (src.r_hand.blood_DNA) + usr << "\red [src.name] has a[src.r_hand.blood_DNA ? " bloody " : " "] \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand!" + else + usr << "\blue [src.name] has a \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand." + + if (src.belt) + if (src.belt.blood_DNA) + usr << "\red [src.name] has a[src.belt.blood_DNA ? " bloody " : " "] \icon[src.belt] [src.belt.name] on [t_his] belt!" + else + usr << "\blue [src.name] has a \icon[src.belt] [src.belt.name] on [t_his] belt." + if(src.s_store) + if(src.s_store.blood_DNA) + usr << "\red [src.name] has a[src.s_store.blood_DNA ? " bloody " : " "] \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]!" + else + usr << "\blue [src.name] has a \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]." + if (src.shoes) + usr << "[src.shoes.blood_DNA ? "\red" : "\blue"][src.name] has a[src.shoes.blood_DNA ? " bloody " : " "] \icon[src.shoes] [src.shoes.name] on [t_his] feet." + + + if (src.gloves) + if (src.gloves.blood_DNA) + usr << "\red [src.name] has bloody \icon[src.gloves] [src.gloves.name] on [t_his] hands!" + else + usr << "\blue [src.name] has \icon[src.gloves] [src.gloves.name] on [t_his] hands." + else if (src.blood_DNA) + usr << "\red [src.name] has bloody hands!" + + if (src.back) + usr << "\blue [src.name] has a \icon[src.back] [src.back.name] on [t_his] back." + + if (src.wear_id) + var/id + var/photo = 0 + if(istype(src:wear_id, /obj/item/device/pda)) + var/obj/item/device/pda/pda = src:wear_id + id = pda.owner + else + id = src.wear_id.registered_name_name + if (src.wear_id.PHOTO) + photo = 1 + if (id != src.real_name && in_range(src, usr) && prob(10)) + if (photo) + usr << "\red [src.name] is wearing \icon[src.wear_id] [src.wear_id.name] with a photo yet doesn't seem to be that person!!!" + else + usr << "\red [src.name] is wearing \icon[src.wear_id] [src.wear_id.name] yet doesn't seem to be that person!!!" + else + if (photo) + usr << "\blue [src.name] is wearing \icon[src.wear_id] [src.wear_id.name] with a photo." + else + usr << "\blue [src.name] is wearing \icon[src.wear_id] [src.wear_id.name]." + + + if (src.is_jittery) + switch(src.jitteriness) + if(300 to INFINITY) + usr << "\red [src] is violently convulsing." + if(200 to 300) + usr << "\red [src] looks extremely jittery." + if(100 to 200) + usr << "\red [src] is twitching ever so slightly." + + if (src.suiciding) + switch(src.suiciding) + if(1) + usr << "\red [src.name] appears to have bitten [t_his] tongue off!" + + var/distance = get_dist(usr,src) + if(istype(usr, /mob/dead/observer) || usr.stat == 2) // ghosts can see anything + distance = 1 + + if (src.stat == 1 || stat == 2) + usr << "\red [name] doesn't seem to be responding to anything around [t_him], [t_his] eyes closed as though asleep." + if(health < 0 && distance <= 3) + usr << "\red [name] does not appear to be breathing." + if(ishuman(src) && usr.stat == 0 && src.stat == 1 && distance <= 1) + for(var/mob/O in viewers(usr.loc, null)) + O.show_message("[usr] checks [src]'s pulse.", 1) + sleep(15) + usr << "\blue [name] has a pulse!" + + if (src.stat == 2 || (changeling && changeling.changeling_fakedeath == 1)) + if(distance <= 1) + if(ishuman(usr) && usr.stat == 0) + for(var/mob/O in viewers(usr.loc, null) ) + O.show_message("[usr] checks [src]'s pulse.", 1) + sleep(15) + usr << "\red [name] has no pulse!" + else + if (src.getBruteLoss()) + if (src.getBruteLoss() < 30) + usr << "\red [src.name] looks slightly injured!" + else + usr << "\red [src.name] looks severely injured!" + + if (src.cloneloss) + if (src.cloneloss < 30) + usr << "\red [src.name] looks slightly... unfinished?" + else + usr << "\red [src.name] looks very... unfinished?" + + if (src.getFireLoss()) + if (src.getFireLoss() < 30) + usr << "\red [src.name] looks slightly burned!" + else + usr << "\red [src.name] looks severely burned!" + + if (src.nutrition < 100) + usr << "\red [src.name] looks like flesh and bones." + else if (src.nutrition >= 500) + if (usr.nutrition < 100) + usr << "\red [src.name] looks very round and delicious. Like a little piggy. A tasty piggy." + else + usr << "\blue [src.name] looks quite chubby." + + else if (src.brainloss >= 60) + usr << "\red [src.name] has a stupid expression on [t_his] face." + if (!src.client) + usr << "\red [src.name] doesn't seem as though they want to talk." + + for(var/named in organs) + var/datum/organ/external/temp = organs[named] + if(temp.destroyed) + usr << "\red [src.name] is missing [t_his] [temp.display_name]." + if(temp.wounds) + for(var/datum/organ/external/wound/w in temp.wounds) + var/size = w.wound_size + var/sizetext + switch(size) + if(1) + sizetext = "cut" + if(2) + sizetext = "deep cut" + if(3) + sizetext = "flesh wound" + if(4) + sizetext = "gaping wound" + if(5) + sizetext = "big gaping wound" + if(6) + sizetext = "massive wound" + if(w.bleeding) + usr << "\red [src.name] is bleeding from a [sizetext] on [t_his] [temp.display_name]." + continue + + + usr << "\blue *---------*" +*/ \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/Tajara/say.dm b/code/modules/mob/living/carbon/human/Tajara/say.dm new file mode 100644 index 0000000000..9fe3e0614e --- /dev/null +++ b/code/modules/mob/living/carbon/human/Tajara/say.dm @@ -0,0 +1,546 @@ +//their language needs to hook into radios as well + +/mob/living/carbon/human/tajaran/say_quote(var/text,var/is_speaking_taj) + //work out if the listener can understand or not + + var/ending = copytext(text, length(text)) + if (src.stuttering) + return "stammers, \"[text]\""; + if (src.slurring) + return "slurrs, \"[text]\""; + if (src.brainloss >= 60) + return "gibbers, \"[text]\""; + + if(is_speaking_taj) + return "mrowls, \"[text]\""//pick("yowls, \"[text]\"", "growls, \"[text]\"","mewls, \"[text]\"", "mrowls, \"[text]\"", "meows, \"[text]\"", "purrs, \"[text]\""); + + if (ending == "?") + return "asks, \"[text]\""; + else if (ending == "!") + return "exclaims, \"[text]\""; + + return "says, \"[text]\""; + +//convert message to an indecipherable series of sounds for anyone who isnt tajaran +/mob/living/carbon/human/tajaran/proc/tajspeak(var/message) + //return stars(message) + var/te = html_decode(message) + var/t = "" + var/n = length(message) + var/p = 1 + while(p <= n) + if (copytext(te, p, p + 1) != " ") + t = text("[][]", t, pick(tajspeak_letters)) + p++ + return html_encode(t) + /*if (pr == null) + pr = 25 + if (pr <= 0) + return null + else + if (pr >= 100) + return n + var/te = html_decode(n) + var/t = "" + n = length(n) + var/p = null + p = 1 + while(p <= n) + if ((copytext(te, p, p + 1) == " " || prob(pr))) + t = text("[][]", t, copytext(te, p, p + 1)) + else + t = text("[]*", t) + p++ + return html_encode(t)*/ + +/mob/living/carbon/human/tajaran/say(var/message) + var/message_old = message + message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) + + if (!message) + return + + log_say("[name]/[key] : [message]") + + if (length(message) >= 1) + if (miming && copytext(message, 1, 2) != "*") + return + + if (stat == 2) + return say_dead(message) + + if (silent) + return + + if (src.client && (client.muted || src.client.muted_complete)) + src << "You are muted." + return + + // wtf? + if (stat) + return + + // Mute disability + if (disabilities & 64) + return + + if (istype(wear_mask, /obj/item/clothing/mask/muzzle)) + return + + // emotes + if (copytext(message, 1, 2) == "*" && !stat) + return emote(copytext(message, 2)) + + var/alt_name = "" + if (istype(src, /mob/living/carbon/human) && name != real_name) + var/mob/living/carbon/human/H = src + alt_name = " (as [H.get_visible_name()])" + var/italics = 0 + var/message_range = null + var/message_mode = null + + if (brainloss >= 60 && prob(50)) + if (ishuman(src)) + message_mode = "headset" + // Special message handling + else if (copytext(message, 1, 2) == ";") + if (ishuman(src)) + message_mode = "headset" + else if(istype(src, /mob/living/silicon/pai) || istype(src, /mob/living/silicon/robot)) + message_mode = "pAI" + message = copytext(message, 2) + + else if (length(message) >= 2) + var/channel_prefix = copytext(message, 1, 3) + + var/list/keys = list( + ":r" = "right ear", + ":l" = "left ear", + ":i" = "intercom", + ":h" = "department", + ":c" = "Command", + ":n" = "Science", + ":m" = "Medical", + ":e" = "Engineering", + ":s" = "Security", + ":w" = "whisper", + ":b" = "binary", + ":a" = "alientalk", + ":t" = "Syndicate", + ":d" = "Mining", + ":q" = "Cargo", + ":g" = "changeling", + + ":R" = "right hand", + ":L" = "left hand", + ":I" = "intercom", + ":H" = "department", + ":C" = "Command", + ":N" = "Science", + ":M" = "Medical", + ":E" = "Engineering", + ":S" = "Security", + ":W" = "whisper", + ":B" = "binary", + ":A" = "alientalk", + ":T" = "Syndicate", + ":D" = "Mining", + ":Q" = "Cargo", + ":G" = "changeling", + + //kinda localization -- rastaf0 + //same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding. + ":ê" = "right hand", + ":ä" = "left hand", + ":ø" = "intercom", + ":ð" = "department", + ":ñ" = "Command", + ":ò" = "Science", + ":ü" = "Medical", + ":ó" = "Engineering", + ":û" = "Security", + ":ö" = "whisper", + ":è" = "binary", + ":ô" = "alientalk", + ":å" = "Syndicate", + ":â" = "Mining", + ":é" = "Cargo", + ":ï" = "changeling", + ) + + message_mode = keys[channel_prefix] + //world << "channel_prefix=[channel_prefix]; message_mode=[message_mode]" + if (message_mode) + message = trim(copytext(message, 3)) + if (!ishuman(src) && (message_mode=="department" || (message_mode in radiochannels))) + message_mode = null //only humans can use headsets + + if (!message) + return + + //work out if we're speaking tajaran or not + var/is_speaking_taj = 0 + if(copytext(message, 1, 3) == ":j" || copytext(message, 1, 3) == ":J") + message = copytext(message, 3) + if(taj_talk_understand) + is_speaking_taj = 1 + + if( !message_mode && (disease_symptoms & DISEASE_WHISPER)) + message_mode = "whisper" + + if(src.stunned > 0 || (traumatic_shock > 61 && prob(50))) + message_mode = "" //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it + + + message = capitalize(message) //capitalize the first letter of what they actually say + + // :downs: + if (brainloss >= 60) + message = dd_replacetext(message, " am ", " ") + message = dd_replacetext(message, " is ", " ") + message = dd_replacetext(message, " are ", " ") + message = dd_replacetext(message, "you", "u") + message = dd_replacetext(message, "help", "halp") + message = dd_replacetext(message, "grief", "grife") + message = dd_replacetext(message, "space", "spess") + message = dd_replacetext(message, "carp", "crap") + message = dd_replacetext(message, "reason", "raisin") + if(prob(50)) + message = uppertext(message) + message += "[stutter(pick("!", "!!", "!!!"))]" + if(!stuttering && prob(15)) + message = stutter(message) + + if (stuttering) + message = stutter(message) + if (slurring) + message = slur(message) + +/* //qw do not have beesease atm. + if(virus) + if(virus.name=="beesease" && virus.stage>=2) + if(prob(virus.stage*10)) + var/bzz = length(message) + message = "B" + for(var/i=0,i[gender=="male"?"Mr.":"Mrs."] [changeling.changelingID]: [message]" + return +////SPECIAL HEADSETS START + else + //world << "SPECIAL HEADSETS" + if (message_mode in radiochannels) + if (src:l_ear && istype(src:l_ear,/obj/item/device/radio)) + src:l_ear.talk_into(src, message, message_mode) + used_radios += src:l_ear + else if (src:r_ear) + src:r_ear.talk_into(src, message, message_mode) + used_radios += src:r_ear + message_range = 1 + italics = 1 +/////SPECIAL HEADSETS END + + var/list/listening +/* + if(istype(loc, /obj/item/device/aicard)) // -- TLE + var/obj/O = loc + if(istype(O.loc, /mob)) + var/mob/M = O.loc + listening = hearers(message_range, M) + else + listening = hearers(message_range, O) + else + listening = hearers(message_range, src) + + for (var/obj/O in view(message_range, src)) + for (var/mob/M in O) + listening += M // maybe need to check if M can hear src + spawn (0) + if (O) + O.hear_talk(src, message) + + if (!(src in listening)) + listening += src + +*/ + var/turf/T = get_turf(src) + listening = hearers(message_range, T) + var/list/V = view(message_range, T) + var/list/W = V + //find mobs in lockers, cryo, intellicards, brains, MMIs, and so on. + for (var/mob/M in world) + if (!M.client) + continue //skip monkeys and leavers + if (istype(M, /mob/new_player)) + continue + if (M.stat <2) //is alive + if (isturf(M.loc)) + continue //if M can hear us it was already found by hearers() + if (get_turf(M) in V) //this is slow, but I don't think we'd have a lot of wardrobewhores every round --rastaf0 + listening+=M + else + if (M.client && M.client.ghost_ears) + listening|=M + + var/list/eavesdroppers = get_mobs_in_view(7, src) + for(var/mob/M in listening) + eavesdroppers.Remove(M) + for(var/mob/M in eavesdroppers) + if(M.stat) + eavesdroppers.Remove(M) + + for (var/obj/O in ((W | contents)-used_radios)) + W |= O + + for (var/mob/M in W) + W |= M.contents + if(ishuman(M)) + var/mob/living/carbon/human/G = M + for(var/name in G.organs) + var/datum/organ/external/F = G.organs[name] + W |= F.implant + + for (var/obj/item/device/pda/M in W) + W |= M.contents + + for (var/obj/O in W) //radio in pocket could work, radio in backpack wouldn't --rastaf0 + spawn (0) + if(O && !istype(O.loc, /obj/item/weapon/storage)) + O.hear_talk(src, message) + + if(isbrain(src))//For brains to properly talk if they are in an MMI..or in a brain. Could be extended to other mobs I guess. + for(var/obj/O in loc)//Kinda ugly but whatever. + if(O) + spawn(0) + O.hear_talk(src, message) + + var/list/heard_a = list() // understood us + var/list/heard_b = list() // didn't understand us + + for (var/mob/M in listening) + //if speaking in tajaran, only let other tajs understand + if ( M.say_understands(src) && (M.taj_talk_understand || !is_speaking_taj) ) + heard_a += M + else + heard_b += M + + var/speech_bubble_test = say_test(message) + var/image/speech_bubble = image('talk.dmi',src,"h[speech_bubble_test]") + + var/rendered = null + if (length(heard_a)) + var/message_a = say_quote(message,is_speaking_taj) + if (italics) + message_a = "[message_a]" + if (!istype(src, /mob/living/carbon/human)) + rendered = "[name] [message_a]" + else if(istype(wear_mask, /obj/item/clothing/mask/gas/voice)) + if(wear_mask:vchange) + rendered = "[wear_mask:voice] [message_a]" + else + rendered = "[name] [message_a]" + else + rendered = "[real_name][alt_name] [message_a]" + + +/* + // Create speech bubble + var/obj/effect/speech_bubble/B = new/obj/effect/speech_bubble + B.icon = 'speechbubble.dmi' + B.parent = src + B.mouse_opacity = 0 + B.invisibility = invisibility + B.layer = 10 + + // Determine if the speech bubble's going to have a special look + var/presay = "" + if(istype(src, /mob/living/silicon)) + presay = "bot" + if(istype(src, /mob/living/carbon/alien)) + presay = "xeno" + if(istype(src, /mob/living/carbon/metroid)) + presay = "metroid" +*/ + for (var/mob/M in heard_a) + + M.show_message(rendered, 2) + M << speech_bubble + spawn(30) del(speech_bubble) + //spawn(30) del(speech_bubble) + /* + if(M.client) + + // If this client has bubbles disabled, obscure the bubble + if(!M.client.bubbles || M == src) + var/image/I = image('speechbubble.dmi', B, "override") + I.override = 1 + M << I + */ + + /* + // find the suffix, if bot, human or monkey + var/punctuation = "" + if(presay == "bot" || presay == "") + var/ending = copytext(text, length(text)) + if (ending == "?") + punctuation = "question" + else if (ending == "!") + punctuation = "exclamation" + else + punctuation = "" + + // flick the bubble + flick("[presay]say[punctuation]", B) + + if(istype(loc, /turf)) + B.loc = loc + else + B.loc = loc.loc + + spawn() + sleep(11) + del(B) + */ + + if (length(heard_b)) + var/message_b = tajspeak(message) + message_b = say_quote(message_b,1) + + if (italics) + message_b = "[message_b]" + + rendered = "[voice_name] [message_b]" + + + /* + // Create speech bubble + var/obj/effect/speech_bubble/B = new/obj/effect/speech_bubble + B.icon = 'speechbubble.dmi' + B.parent = src + B.mouse_opacity = 0 + B.invisibility = invisibility + B.layer = 10 + + // Determine if the speech bubble's going to have a special look + var/presay = "" + if(istype(src, /mob/living/silicon)) + presay = "bot" + if(istype(src, /mob/living/carbon/alien)) + presay = "xeno" + if(istype(src, /mob/living/carbon/metroid)) + presay = "metroid" + */ + + for (var/mob/M in heard_b) + M.show_message(rendered, 2) + M << speech_bubble + spawn(30) del(speech_bubble) + + /* + if(M.client) + + if(!M.client.bubbles || M == src) + var/image/I = image('speechbubble.dmi', B, "override") + I.override = 1 + M << I + + + flick("[presay]say", B) + + if(istype(loc, /turf)) + B.loc = loc + else + B.loc = loc.loc + + spawn() + sleep(11) + del(B) + */ + + if (length(eavesdroppers)) + + for (var/mob/M in eavesdroppers) + M << "\blue [src] speaks into their radio..." + M << speech_bubble + spawn(30) del(speech_bubble) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/Tajara/tajara_transformation.dm b/code/modules/mob/living/carbon/human/Tajara/tajara_transformation.dm new file mode 100644 index 0000000000..2ffca9de13 --- /dev/null +++ b/code/modules/mob/living/carbon/human/Tajara/tajara_transformation.dm @@ -0,0 +1,56 @@ +/mob/living/carbon/human/proc/Tajaraize() + if (monkeyizing) + return + for(var/obj/item/W in src) + drop_from_slot(W) + update_clothing() + monkeyizing = 1 + canmove = 0 + icon = null + invisibility = 101 + for(var/datum/organ/external/organ in organs) + del(organ) + + + var/atom/movable/overlay/animation = new /atom/movable/overlay( loc ) + animation.icon_state = "blank" + animation.icon = 'mob.dmi' + animation.master = src + flick("h2monkey", animation) + sleep(48) + //animation = null + var/mob/living/carbon/human/tajaran/O = new /mob/living/carbon/human/tajaran( loc ) + del(animation) + + O.real_name = real_name + O.name = name + O.dna = dna + updateappearance(O,O.dna.uni_identity) + O.loc = loc + O.viruses = viruses + viruses = list() + for(var/datum/disease/D in O.viruses) + D.affected_mob = O + O.universal_speak = 1 //hacky fix until someone can figure out how to make them only understand humans + + if (client) + client.mob = O + if(mind) + mind.transfer_to(O) + + O << "You are now a Tajara." + spawn(0)//To prevent the proc from returning null. + del(src) + return + +/client/proc/make_tajaran(mob/living/carbon/human/H as mob) + set category = "Fun" + set name = "Make Tajaran" + set desc = "Make (mob) into a tajaran." + + if (!holder) + src << "Only administrators may use this command." + return + + if(istype(H)) + H:Tajaraize() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/Tajara/tajaran.dm b/code/modules/mob/living/carbon/human/Tajara/tajaran.dm new file mode 100644 index 0000000000..827aacc153 --- /dev/null +++ b/code/modules/mob/living/carbon/human/Tajara/tajaran.dm @@ -0,0 +1,703 @@ +/mob/living/carbon/human/tajaran + name = "tajaran" + real_name = "tajaran" + voice_name = "tajaran" + icon = 'tajaran.dmi' + icon_state = "m-none" + var/list/tajspeak_letters + // + universal_speak = 1 //hacky fix until someone can figure out how to make them only understand humans + taj_talk_understand = 1 + voice_message = "mrowls" + +/mob/living/carbon/human/tajaran/New() + + ..() + + tajspeak_letters = new/list("~","*","-") + + var/g = "m" + if (gender == FEMALE) + g = "f" + + spawn(1) + stand_icon = new /icon('tajaran.dmi', "body_[g]_s") + lying_icon = new /icon('tajaran.dmi', "body_[g]_l") + icon = stand_icon + update_clothing() + + src << "\blue Your Tajaran icons have been generated!" + + + + +/mob/living/carbon/human/tajaran/update_clothing() +// ..() + + if (monkeyizing) + return + + overlays = null + + // lol + var/fat = "" + /*if (mutations & FAT) + fat = "fat"*/ +/* + if (mutations & HULK) + overlays += image("icon" = 'genetics.dmi', "icon_state" = "hulk[fat][!lying ? "_s" : "_l"]") +*/ + if (mutations & COLD_RESISTANCE) + overlays += image("icon" = 'genetics.dmi', "icon_state" = "fire[fat][!lying ? "_s" : "_l"]") + + if (mutations & TK) + overlays += image("icon" = 'genetics.dmi', "icon_state" = "telekinesishead[fat][!lying ? "_s" : "_l"]") + + if (mutations & LASER) + overlays += image("icon" = 'genetics.dmi', "icon_state" = "lasereyes[!lying ? "_s" : "_l"]") + + if (mutantrace) + switch(mutantrace) + if("golem","metroid") + overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat][!lying ? "_s" : "_l"]") + if(face_standing) + del(face_standing) + if(face_lying) + del(face_lying) + if(stand_icon) + del(stand_icon) + if(lying_icon) + del(lying_icon) + if("lizard") + overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat]_[gender][!lying ? "_s" : "_l"]") + if(face_standing) + del(face_standing) + if(face_lying) + del(face_lying) + if(stand_icon) + del(stand_icon) + if(lying_icon) + del(lying_icon) + if("plant") + if(stat != 2) //if not dead, that is + overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace][fat]_[gender][!lying ? "_s" : "_l"]") + else + overlays += image("icon" = 'genetics.dmi', "icon_state" = "[mutantrace]_d") + if(face_standing) + del(face_standing) + if(face_lying) + del(face_lying) + if(stand_icon) + del(stand_icon) + if(lying_icon) + del(lying_icon) + else + if(!face_standing || !face_lying) + update_face() + if(!stand_icon || !lying_icon) + update_body() + + if(buckled) + if(istype(buckled, /obj/structure/stool/bed)) + lying = 1 + else + lying = 0 + + // Automatically drop anything in store / id / belt if you're not wearing a uniform. + if (!w_uniform) + for (var/obj/item/thing in list(r_store, l_store, wear_id, belt)) + if (thing) + u_equip(thing) + if (client) + client.screen -= thing + + if (thing) + thing.loc = loc + thing.dropped(src) + thing.layer = initial(thing.layer) + + + //if (zone_sel) + // zone_sel.overlays = null + // zone_sel.overlays += body_standing + // zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", zone_sel.selecting)) + + if (lying) + icon = lying_icon + + overlays += body_lying + + if (face_lying) + overlays += face_lying + else + icon = stand_icon + + overlays += body_standing + + if (face_standing) + overlays += face_standing + + // Uniform + if(w_uniform) + /*if (mutations & FAT && !(w_uniform.flags & ONESIZEFITSALL)) + src << "\red You burst out of the [w_uniform.name]!" + var/obj/item/clothing/c = w_uniform + u_equip(c) + if(client) + client.screen -= c + if(c) + c:loc = loc + c:dropped(src) + c:layer = initial(c:layer)*/ + if(w_uniform)//I should really not need these + w_uniform.screen_loc = ui_iclothing + if(istype(w_uniform, /obj/item/clothing/under)) + var/t1 = w_uniform.color + if (!t1) + t1 = icon_state + /*if (mutations & FAT) + overlays += image("icon" = 'uniform_fat.dmi', "icon_state" = "[t1][!lying ? "_s" : "_l"]", "layer" = MOB_LAYER) + else*/ + overlays += image("icon" = 'uniform.dmi', "icon_state" = text("[][]",t1, (!(lying) ? "_s" : "_l")), "layer" = MOB_LAYER) + if (w_uniform.blood_DNA) + var/icon/stain_icon = icon('blood.dmi', "uniformblood[!lying ? "" : "2"]") + overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + + if (wear_id) + if(wear_id.over_jumpsuit) + overlays += image("icon" = 'mob.dmi', "icon_state" = "id[!lying ? null : "2"]", "layer" = MOB_LAYER) + + if (client) + client.screen -= hud_used.intents + client.screen -= hud_used.mov_int + + + //Screenlocs for these slots are handled by the huds other_update() + //because theyre located on the 'other' inventory bar. + + // Gloves + var/datum/organ/external/lo = get_organ("l_hand") + var/datum/organ/external/ro = get_organ("r_hand") + if (!lo.destroyed || !ro.destroyed) + if (gloves) + var/t1 = gloves.item_state + if (!t1) + t1 = gloves.icon_state + var/icon/gloves_icon = new /icon("icon" = 'hands.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2"))) + if(lo.destroyed) + gloves_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) + else if(ro.destroyed) + gloves_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) + overlays += image(gloves_icon, "layer" = MOB_LAYER) + if (gloves.blood_DNA) + var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]") + if(lo.destroyed) + stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) + else if(ro.destroyed) + stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) + overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + else if (blood_DNA) + var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]") + if(lo.destroyed) + stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) + else if(ro.destroyed) + stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) + overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + // Glasses + if (glasses) + var/t1 = glasses.icon_state + overlays += image("icon" = 'eyes.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + // Ears + /* + if (l_ear) + var/t1 = l_ear.icon_state + overlays += image("icon" = 'ears.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + if (r_ear) + var/t1 = r_ear.icon_state + overlays += image("icon" = 'ears.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + + */ + // Shoes + lo = get_organ("l_foot") + ro = get_organ("r_foot") + if ((!lo.destroyed || !ro.destroyed) && shoes) + var/t1 = shoes.icon_state + var/icon/shoes_icon = new /icon("icon" = 'feet.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2"))) + if(lo.destroyed && !lying) + shoes_icon.Blend(new /icon('limb_mask.dmi', "right[lying?"_l":""]"), ICON_MULTIPLY) + else if(ro.destroyed && !lying) + shoes_icon.Blend(new /icon('limb_mask.dmi', "left[lying?"_l":""]"), ICON_MULTIPLY) + overlays += image(shoes_icon, "layer" = MOB_LAYER) + if (shoes.blood_DNA) + var/icon/stain_icon = icon('blood.dmi', "shoesblood[!lying ? "" : "2"]") + if(lo.destroyed) + stain_icon.Blend(new /icon('limb_mask.dmi', "right_[lying?"l":"s"]"), ICON_MULTIPLY) + else if(ro.destroyed) + stain_icon.Blend(new /icon('limb_mask.dmi', "left_[lying?"l":"s"]"), ICON_MULTIPLY) + overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) // Radio +/* if (w_radio) + overlays += image("icon" = 'ears.dmi', "icon_state" = "headset[!lying ? "" : "2"]", "layer" = MOB_LAYER) */ + + if (s_store) + var/t1 = s_store.item_state + if (!t1) + t1 = s_store.icon_state + s_store.screen_loc = ui_sstore1 + + if (h_store) + h_store.screen_loc = ui_hstore1 + + if(client) hud_used.other_update() //Update the screenloc of the items on the 'other' inventory bar + //to hide / show them. + if (client) + if (i_select) + if (intent) + client.screen += hud_used.intents + + var/list/L = dd_text2list(intent, ",") + L[1] += ":-11" + i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT + else + i_select.screen_loc = null + if (m_select) + if (m_int) + client.screen += hud_used.mov_int + + var/list/L = dd_text2list(m_int, ",") + L[1] += ":-11" + m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT + else + m_select.screen_loc = null + + var/tail_shown = 1 + if (wear_suit) + /*if (mutations & FAT && !(wear_suit.flags & ONESIZEFITSALL)) + src << "\red You burst out of the [wear_suit.name]!" + var/obj/item/clothing/c = wear_suit + u_equip(c) + if(client) + client.screen -= c + if(c) + c:loc = loc + c:dropped(src) + c:layer = initial(c:layer)*/ + if (istype(wear_suit, /obj/item/clothing/suit)) + var/t1 = wear_suit.icon_state + overlays += image("icon" = 'suit.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + if (wear_suit) + if (wear_suit.blood_DNA) + var/icon/stain_icon = null + if (istype(wear_suit, /obj/item/clothing/suit/armor/vest)) + stain_icon = icon('blood.dmi', "armorblood[!lying ? "" : "2"]") + + else + stain_icon = icon('blood.dmi', "suitblood[!lying ? "" : "2"]") + overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + wear_suit.screen_loc = ui_oclothing + if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket)) + if (handcuffed) + handcuffed.loc = loc + handcuffed.layer = initial(handcuffed.layer) + handcuffed = null + if ((l_hand || r_hand)) + var/h = hand + hand = 1 + drop_item() + hand = 0 + drop_item() + hand = h + //if wearing some suits, hide the tail + if ( istype(wear_suit, /obj/item/clothing/suit/bio_suit) || istype(wear_suit, /obj/item/clothing/suit/bomb_suit) || istype(wear_suit, /obj/item/clothing/suit/space) ) + tail_shown = 0 + if(tail_shown) + overlays += image("icon" = icon('tajaran.dmi', "tail_[gender==FEMALE ? "f" : "m"]_[lying ? "l" : "s"]"), "layer" = MOB_LAYER) + + if (lying) + if (face_lying) + overlays += face_lying + else + if (face_standing) + overlays += face_standing + + if (wear_mask) + if (istype(wear_mask, /obj/item/clothing/mask)) + var/t1 = wear_mask.icon_state + overlays += image("icon" = 'mask.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + if (!istype(wear_mask, /obj/item/clothing/mask/cigarette)) + if (wear_mask.blood_DNA) + var/icon/stain_icon = icon('blood.dmi', "maskblood[!lying ? "" : "2"]") + overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + wear_mask.screen_loc = ui_mask + + // Head + if (head) + var/t1 = head.icon_state + var/icon/head_icon = icon('head.dmi', text("[][]", t1, (!( lying ) ? null : "2"))) + if(istype(head,/obj/item/clothing/head/kitty)) + head_icon = (( lying ) ? head:mob2 : head:mob) + overlays += image("icon" = head_icon, "layer" = MOB_LAYER) + if (head.blood_DNA) + var/icon/stain_icon = icon('blood.dmi', "helmetblood[!lying ? "" : "2"]") + overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + head.screen_loc = ui_head + else + var/datum/organ/external/head = get_organ("head") + if(!head.destroyed) + //if not wearing anything on the head, show the ears + overlays += image("icon" = icon('tajaran.dmi', "ears_[gender==FEMALE ? "f" : "m"]_[lying ? "l" : "s"]"), "layer" = MOB_LAYER) + + // Belt + if (belt) + var/t1 = belt.item_state + if (!t1) + t1 = belt.icon_state + overlays += image("icon" = 'belt.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + belt.screen_loc = ui_belt + + if ((wear_mask && !(wear_mask.see_face)) || (head && !(head.see_face))) // can't see the face + if (wear_id) + if (istype(wear_id, /obj/item/weapon/card/id)) + var/obj/item/weapon/card/id/id = wear_id + if (id.registered_name) + name = id.registered_name + else + name = "Unknown" + else if (istype(wear_id, /obj/item/device/pda)) + var/obj/item/device/pda/pda = wear_id + if (pda.owner) + name = pda.owner + else + name = "Unknown" + else + name = "Unknown" + else + if (wear_id) + if (istype(wear_id, /obj/item/weapon/card/id)) + var/obj/item/weapon/card/id/id = wear_id + if (id.registered_name != real_name) + name = "[real_name] (as [id.registered_name])" + + + else if (istype(wear_id, /obj/item/device/pda)) + var/obj/item/device/pda/pda = wear_id + if (pda.owner) + if (pda.owner != real_name) + name = "[real_name] (as [pda.owner])" + else + name = real_name + + if (wear_id) + wear_id.screen_loc = ui_id + + if (l_store) + l_store.screen_loc = ui_storage1 + + if (r_store) + r_store.screen_loc = ui_storage2 + + if (back) + var/t1 = back.icon_state + overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + back.screen_loc = ui_back + + if (handcuffed) + pulling = null + if (!lying) + overlays += image("icon" = 'mob.dmi', "icon_state" = "handcuff1", "layer" = MOB_LAYER) + else + overlays += image("icon" = 'mob.dmi', "icon_state" = "handcuff2", "layer" = MOB_LAYER) + + if (client) + client.screen -= contents + client.screen += contents + + if (r_hand) + overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = MOB_LAYER+1) + + r_hand.screen_loc = ui_rhand + + if (l_hand) + overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = MOB_LAYER+1) + + l_hand.screen_loc = ui_lhand + + var/shielded = 0 + for (var/obj/item/weapon/cloaking_device/S in src) + if (S.active) + shielded = 2 + break + + if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_active) + shielded = 3 + + switch(shielded) + if(1) + overlays += image("icon" = 'effects.dmi', "icon_state" = "shield", "layer" = MOB_LAYER+1) + if(2) + invisibility = 2 + //New stealth. Hopefully doesn't lag too much. /N + if(istype(loc, /turf))//If they are standing on a turf. + AddCamoOverlay(loc)//Overlay camo. + if(3) + if(istype(loc, /turf)) + //Ninjas may flick into view once in a while if they are stealthed. + if(prob(90)) + NinjaStealthActive(loc) + else + NinjaStealthMalf() + else + invisibility = 0 + + if (shielded == 2) + invisibility = 2 + else + invisibility = 0 +/* + for (var/mob/M in viewers(1, src))//For the love of god DO NOT REFRESH EVERY SECOND - Mport + if ((M.client && M.machine == src)) + spawn (0) + show_inv(M) + return +*/ + last_b_state = stat + +/mob/living/carbon/human/tajaran/update_body() + if(stand_icon) + del(stand_icon) + if(lying_icon) + del(lying_icon) + + if (mutantrace) + return + + var/g = "m" + if (gender == MALE) + g = "m" + else if (gender == FEMALE) + g = "f" + + stand_icon = new /icon('tajaran.dmi', "torso_[g]_s") + lying_icon = new /icon('tajaran.dmi', "torso_[g]_l") + + + + var/husk = (mutations & HUSK) + //var/obese = (mutations & FAT) + + stand_icon.Blend(new /icon('tajaran.dmi', "chest_[g]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('tajaran.dmi', "chest_[g]_l"), ICON_OVERLAY) + + var/datum/organ/external/head = get_organ("head") + if(!head.destroyed) + stand_icon.Blend(new /icon('tajaran.dmi', "head_[g]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('tajaran.dmi', "head_[g]_l"), ICON_OVERLAY) + + for(var/datum/organ/external/part in organs) + if(!istype(part, /datum/organ/external/groin) \ + && !istype(part, /datum/organ/external/chest) \ + && !istype(part, /datum/organ/external/head) \ + && !part.destroyed) + var/icon/temp = new /icon('tajaran.dmi', "[part.icon_name]_s") + if(part.robot) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) + stand_icon.Blend(temp, ICON_OVERLAY) + temp = new /icon('tajaran.dmi', "[part.icon_name]_l") + if(part.robot) temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) + lying_icon.Blend(temp , ICON_OVERLAY) + + stand_icon.Blend(new /icon('tajaran.dmi', "groin_[g]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('tajaran.dmi', "groin_[g]_l"), ICON_OVERLAY) + + if (husk) + var/icon/husk_s = new /icon('tajaran.dmi', "husk_s") + var/icon/husk_l = new /icon('tajaran.dmi', "husk_l") + + for(var/datum/organ/external/part in organs) + if(!istype(part, /datum/organ/external/groin) \ + && !istype(part, /datum/organ/external/chest) \ + && !istype(part, /datum/organ/external/head) \ + && part.destroyed) + husk_s.Blend(new /icon('dam_mask.dmi', "[part.icon_name]"), ICON_SUBTRACT) + husk_l.Blend(new /icon('dam_mask.dmi', "[part.icon_name]2"), ICON_SUBTRACT) + + stand_icon.Blend(husk_s, ICON_OVERLAY) + lying_icon.Blend(husk_l, ICON_OVERLAY) + /*else if(obese) + stand_icon.Blend(new /icon('human.dmi', "fatbody_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('human.dmi', "fatbody_l"), ICON_OVERLAY)*/ + + // Skin tone + if (s_tone >= 0) + stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) + lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) + else + stand_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) + lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) + + if (underwear > 0) + //if(!obese) + stand_icon.Blend(new /icon('tajaran.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('tajaran.dmi', "underwear[underwear]_[g]_l"), ICON_OVERLAY) + + +/mob/living/carbon/human/tajaran/update_face() + if(organs) + var/datum/organ/external/head = get_organ("head") + if(head) + if(head.destroyed) + del(face_standing) + del(face_lying) + return + + //if(!facial_hair_style || !hair_style) return//Seems people like to lose their icons, this should stop the runtimes for now + del(face_standing) + del(face_lying) + + if (mutantrace) + return + + var/g = "m" + if (gender == MALE) + g = "m" + else if (gender == FEMALE) + g = "f" + + var/icon/eyes_s = new/icon("icon" = 'tajaran_face.dmi', "icon_state" = "eyes_s") + var/icon/eyes_l = new/icon("icon" = 'tajaran_face.dmi', "icon_state" = "eyes_l") + eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD) + eyes_l.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD) + + //var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s") + //var/icon/hair_l = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l") + //hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD) + //hair_l.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD) + + //var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s") + //var/icon/facial_l = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_l") + //facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD) + //facial_l.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD) + + var/icon/mouth_s = new/icon("icon" = 'tajaran_face.dmi', "icon_state" = "mouth_[g]_s") + var/icon/mouth_l = new/icon("icon" = 'tajaran_face.dmi', "icon_state" = "mouth_[g]_l") + + // if the head or mask has the flag BLOCKHAIR (equal to 5), then do not apply hair + //if((!(head && (head.flags & BLOCKHAIR))) && !(wear_mask && (wear_mask.flags & BLOCKHAIR))) + //eyes_s.Blend(hair_s, ICON_OVERLAY) + //eyes_l.Blend(hair_l, ICON_OVERLAY) + + eyes_s.Blend(mouth_s, ICON_OVERLAY) + eyes_l.Blend(mouth_l, ICON_OVERLAY) + + // if BLOCKHAIR, do not apply facial hair + //if((!(head && (head.flags & BLOCKHAIR))) && !(wear_mask && (wear_mask.flags & BLOCKHAIR))) + //eyes_s.Blend(facial_s, ICON_OVERLAY) + //eyes_l.Blend(facial_l, ICON_OVERLAY) + + + face_standing = new /image() + face_lying = new /image() + face_standing.icon = eyes_s + face_standing.layer = MOB_LAYER + face_lying.icon = eyes_l + face_lying.layer = MOB_LAYER + + del(mouth_l) + del(mouth_s) + //del(facial_l) + //del(facial_s) + //del(hair_l) + //del(hair_s) + del(eyes_l) + del(eyes_s) + +/mob/living/carbon/human/tajaran/co2overloadtime = null +/mob/living/carbon/human/tajaran/temperature_resistance = T0C+70 + + + +/mob/living/carbon/human/tajaran/Emissary/ + unacidable = 1 + var/aegis = 1 + +/mob/living/carbon/human/tajaran/Emissary/New() + + ..() + + reagents.add_reagent("hyperzine", 5000) //From the dark, to the light, it's a supersonic flight! + // Gotta keep it going! + if (!(mutations & HULK)) + mutations |= HULK + + if (!(mutations & LASER)) + mutations |= LASER + + if (!(mutations & XRAY)) + mutations |= XRAY + sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) + see_in_dark = 8 + see_invisible = 2 + + if (!(mutations & COLD_RESISTANCE)) + mutations |= COLD_RESISTANCE + + if (!(mutations & TK)) + mutations |= TK + + if(!(mutations & HEAL)) + mutations |= HEAL + + spawn(0) + while(src) + adjustBruteLoss(-10) + adjustToxLoss(-10) + adjustOxyLoss(-10) + adjustFireLoss(-10) + sleep(10) + + +/mob/living/carbon/human/tajaran/Emissary/ex_act() + return + +/mob/living/carbon/human/tajaran/Emissary/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params) + if(istype(target , /obj/machinery/door/airlock)) + if(target:locked) + target:locked = 0 + if(!target:density) + return 1 + if(target:operating > 0) + return + if(!ticker) + return 0 + if(!target:operating) + target:operating = 1 + + target:animate("opening") + target:sd_SetOpacity(0) + sleep(10) + target:layer = 2.7 + target:density = 0 + target:update_icon() + target:sd_SetOpacity(0) + target:update_nearby_tiles() + + target:operating = -1 + + user << "You force the door open, shearing the bolts and burning out the motor." + + if(target:operating) + target:operating = -1 + else if(istype(target , /obj/machinery/door/firedoor)) + target:open() + +/mob/living/carbon/human/tajaran/Emissary/Life() + + ..() + + if (!(mutations & HULK)) + mutations |= HULK + + + if((stat == 2) && aegis) + src.show_message("\red [src]'s eyes open suddenlly.", 3, "\red \"I gave a solemn vow to never die for long.\"", 2) + src.heal_overall_damage(9001,9001) + src.stat = 0 + aegis = 0 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/Tajara/whisper.dm b/code/modules/mob/living/carbon/human/Tajara/whisper.dm new file mode 100644 index 0000000000..b415f3792d --- /dev/null +++ b/code/modules/mob/living/carbon/human/Tajara/whisper.dm @@ -0,0 +1,167 @@ +/mob/living/carbon/human/tajaran/whisper(message as text) + //Figured it out. If you use say :w (message) it HTML encodes it, THEN passes it to the whisper code, which does so again. Jeez. --SkyMarshal + message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) + + if (!message) + return + + log_whisper("[src.name]/[src.key] : [message]") + + if (src.client && (src.client.muted || src.client.muted_complete)) + src << "You are muted." + return + + if (src.stat == 2) + return src.say_dead(message) + + if (src.stat) + return + + var/alt_name = "" + if (istype(src, /mob/living/carbon/human) && src.name != src.real_name) + var/mob/living/carbon/human/H = src + alt_name = " (as [H.get_visible_name()])" + // Mute disability + if (src.disabilities & 64) + return + + if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle)) + return + + var/italics = 1 + var/message_range = 1 + + //work out if we're speaking tajaran or not + var/is_speaking_taj = 0 + if(copytext(message, 1, 4) == ":j ") + message = copytext(message, 4) + if(taj_talk_understand) + is_speaking_taj = 1 + + if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown") + if(copytext(message, 1, 2) != "*") + var/list/temp_message = dd_text2list(message, " ") + var/list/pick_list = list() + for(var/i = 1, i <= temp_message.len, i++) + pick_list += i + for(var/i=1, i <= abs(temp_message.len/3), i++) + var/H = pick(pick_list) + if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue + temp_message[H] = ninjaspeak(temp_message[H]) + pick_list -= H + message = dd_list2text(temp_message, " ") + message = dd_replaceText(message, "o", "¤") + message = dd_replaceText(message, "p", "þ") + message = dd_replaceText(message, "l", "£") + message = dd_replaceText(message, "s", "§") + message = dd_replaceText(message, "u", "µ") + message = dd_replaceText(message, "b", "ß") + + message = capitalize(message) + + if (src.stuttering) + message = stutter(message) + if (src.slurring) + message = slur(message) + + for (var/obj/O in view(message_range, src)) + spawn (0) + if (O) + O.hear_talk(src, message) + + var/list/listening = hearers(message_range, src) + listening -= src + listening += src + var/list/eavesdropping = hearers(2, src) + eavesdropping -= src + eavesdropping -= listening + var/list/watching = hearers(5, src) + watching -= src + watching -= listening + watching -= eavesdropping + + var/list/heard_a = list() // understood us + var/list/heard_b = list() // didn't understand us + + for (var/mob/M in listening) + if ( M.say_understands(src) && (M.taj_talk_understand || !is_speaking_taj) ) + heard_a += M + else + heard_b += M + + var/rendered = null + + for (var/mob/M in watching) + if ( (M.say_understands(src) && !is_speaking_taj) || istype(M,/mob/living/carbon/human/tajaran) ) + rendered = "[src.name] [is_speaking_taj ? "quietly mrowls" : "whispers"] something." + else + rendered = "[src.voice_name] [is_speaking_taj ? "quietly mrowls" : "whispers"] something." + M.show_message(rendered, 2) + + if (length(heard_a)) + var/message_a = message + + if (italics) + message_a = "[message_a]" + //This appears copied from carbon/living say.dm so the istype check for mob is probably not needed. Appending for src is also not needed as the game will check that automatically. + if (!istype(src, /mob/living/carbon/human)) + rendered = "[name] [is_speaking_taj ? "mrowls quietly" : "whispers"], \"[message_a]\"" + else if (istype(wear_mask, /obj/item/clothing/mask/gas/voice)) + if (wear_mask:vchange) + rendered = "[wear_mask:voice] [is_speaking_taj ? "mrowls quietly" : "whispers"], \"[message_a]\"" + else + rendered = "[name] [is_speaking_taj ? "mrowls quietly" : "whispers"], \"[message_a]\"" + else + rendered = "[real_name][alt_name] [is_speaking_taj ? "mrowls quietly" : "whispers"], \"[message_a]\"" + + for (var/mob/M in heard_a) + M.show_message(rendered, 2) + + if (length(heard_b)) + var/message_b + + message_b = tajspeak(message) + + if (italics) + message_b = "[message_b]" + + rendered = "[src.voice_name] mrows quietly, \"[message_b]\"" + + for (var/mob/M in heard_b) + M.show_message(rendered, 2) + + for (var/mob/M in eavesdropping) + if (M.say_understands(src)) + var/message_c = tajspeak(message) + if (!istype(src, /mob/living/carbon/human)) + rendered = "[name] mrowls quietly, \"[message_c]\"" + else if(istype(wear_mask, /obj/item/clothing/mask/gas/voice)) + if(wear_mask:vchange) + rendered = "[wear_mask:voice] mrowls quietly, \"[message_c]\"" + else + rendered = "[name] mrowls quietly, \"[message_c]\"" + else + rendered = "[real_name][alt_name] mrowls quietly, \"[message_c]\"" + M.show_message(rendered, 2) + else + rendered = "[src.voice_name] quietly mrowls something." + M.show_message(rendered, 2) + + if (italics) + message = "[message]" + + if (!istype(src, /mob/living/carbon/human)) + rendered = "[name] [is_speaking_taj ? "mrowls quietly" : "whispers"], \"[message]\"" + else if (istype(src.wear_mask, /obj/item/clothing/mask/gas/voice)) + if(wear_mask:vchange) + rendered = "[wear_mask:voice] [is_speaking_taj ? "mrowls quietly" : "whispers"], \"[message]\"" + else + rendered = "[name] [is_speaking_taj ? "mrowls quietly" : "whispers"], \"[message]\"" + else + rendered = "[real_name][alt_name] [is_speaking_taj ? "mrowls quietly" : "whispers"], \"[message]\"" + + for (var/mob/M in world) + if (istype(M, /mob/new_player)) + continue + if (M.stat > 1 && !(M in heard_a)) + M.show_message(rendered, 2) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 0c999617e9..528f719d81 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -158,7 +158,7 @@ id = pda.owner else if(istype(src.wear_id, /obj/item/weapon/card/id)) //just in case something other than a PDA/ID card somehow gets in the ID slot :[ var/obj/item/weapon/card/id/idcard = src.wear_id - id = idcard.registered + id = idcard.registered_name if (id && (id != src.real_name) && (get_dist(src, usr) <= 1) && prob(10)) msg += "[t_He] [t_is] wearing \icon[src.wear_id] \a [src.wear_id] yet something doesn't seem right...\n" else @@ -244,7 +244,7 @@ if(wear_id) if(istype(wear_id,/obj/item/weapon/card/id)) - perpname = wear_id:registered + perpname = wear_id:registered_name else if(istype(wear_id,/obj/item/device/pda)) var/obj/item/device/pda/tempPda = wear_id perpname = tempPda.owner diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a4607f5299..85a5b1fa61 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -54,6 +54,10 @@ var/mutantrace = null var/list/organs = list() + var/bloodloss = 0 + var/datum/reagents/vessel + var/pale = 0 + /mob/living/carbon/human/dummy real_name = "Test Dummy" @@ -62,30 +66,19 @@ /mob/living/carbon/human/New() + + ..() + + + var/datum/reagents/R = new/datum/reagents(1000) reagents = R R.my_atom = src - if(!dna) dna = new /datum/dna(null) + if(!dna) + dna = new /datum/dna(null) - var/datum/organ/external/chest/chest = new /datum/organ/external/chest(src) - var/datum/organ/external/head/head = new /datum/organ/external/head(src) - var/datum/organ/external/l_arm/l_arm = new /datum/organ/external/l_arm(src) - var/datum/organ/external/r_arm/r_arm = new /datum/organ/external/r_arm(src) - var/datum/organ/external/r_leg/r_leg = new /datum/organ/external/r_leg(src) - var/datum/organ/external/l_leg/l_leg = new /datum/organ/external/l_leg(src) - chest.owner = src - head.owner = src - r_arm.owner = src - l_arm.owner = src - r_leg.owner = src - l_leg.owner = src - organs += chest - organs += head - organs += r_arm - organs += l_arm - organs += r_leg - organs += l_leg + make_human_organs() var/g = "m" if (gender == MALE) @@ -96,16 +89,56 @@ gender = MALE g = "m" - spawn (1) - if(!stand_icon) - stand_icon = new /icon('human.dmi', "body_[g]_s") - if(!lying_icon) - lying_icon = new /icon('human.dmi', "body_[g]_l") + spawn(1) + stand_icon = new /icon('human.dmi', "body_[g]_s") + lying_icon = new /icon('human.dmi', "body_[g]_l") icon = stand_icon update_clothing() + src << "\blue Your icons have been generated!" - ..() + vessel = new/datum/reagents(600) + vessel.my_atom = src + vessel.add_reagent("blood",560) + spawn(1) + fixblood() + + +/mob/living/carbon/human/proc/fixblood() + for(var/datum/reagent/blood/B in vessel.reagent_list) + if(B.id == "blood") + B.data = list("donor"=src,"viruses"=null,"blood_DNA"=dna.unique_enzymes,"blood_type"=dna.b_type,"resistances"=null,"trace_chem"=null) + +/mob/living/carbon/human/proc/drip(var/amt as num) + if(!amt) + return + + var/amm = 0.1 * amt + var/turf/T = get_turf(src) + var/list/obj/effect/decal/cleanable/blood/drip/nums = list() + var/list/iconL = list("1","2","3","4","5") + + vessel.remove_reagent("blood",amm) + + for(var/obj/effect/decal/cleanable/blood/drip/G in T) + nums += G + iconL.Remove(G.icon_state) + if(nums.len >= 3) + var/obj/effect/decal/cleanable/blood/drip/D = pick(nums) + D.blood_DNA.len++ + D.blood_DNA[D.blood_DNA.len] = list(dna.unique_enzymes,dna.b_type) +// if(virus2) +// D.virus2 = virus2.getcopy() + return + + var/obj/effect/decal/cleanable/blood/drip/this = new(T) + this.icon_state = pick(iconL) + this.blood_DNA = list(list(dna.unique_enzymes,dna.b_type)) +// this.blood_owner = src + +// if(virus2) +// this.virus2 = virus2.getcopy() + // organStructure = new /obj/effect/organstructure/human(src) @@ -197,6 +230,14 @@ var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80 if (hungry >= 70) tally += hungry/50 + + for(var/organ in list("l_leg","l_foot","r_leg","r_foot")) + var/datum/organ/external/o = get_organ(organ) + if(o.broken) + tally += 6 + if(o.destroyed) + tally += 12 + if(wear_suit) tally += wear_suit.slowdown @@ -1019,8 +1060,8 @@ if (wear_id) if (istype(wear_id, /obj/item/weapon/card/id)) var/obj/item/weapon/card/id/id = wear_id - if (id.registered) - name = id.registered + if (id.registered_name) + name = id.registered_name else name = "Unknown" else if (istype(wear_id, /obj/item/device/pda)) @@ -1035,8 +1076,8 @@ if (wear_id) if (istype(wear_id, /obj/item/weapon/card/id)) var/obj/item/weapon/card/id/id = wear_id - if (id.registered != real_name) - name = "[real_name] (as [id.registered])" + if (id.registered_name != real_name) + name = "[real_name] (as [id.registered_name])" else if (istype(wear_id, /obj/item/device/pda)) @@ -1219,58 +1260,152 @@ return 1 return 0 +#define BS12TEST 1 /mob/living/carbon/human/proc/update_body() - if(stand_icon) - del(stand_icon) - if(lying_icon) - del(lying_icon) - if (mutantrace) - return + if(!BS12TEST) - var/g = "m" - if (gender == MALE) - g = "m" - else if (gender == FEMALE) - g = "f" + if(stand_icon) + del(stand_icon) + if(lying_icon) + del(lying_icon) - stand_icon = new /icon('human.dmi', "blank") - lying_icon = new /icon('human.dmi', "blank") + if (mutantrace) + return - var/husk = (mutations & HUSK) - var/obese = (mutations & FAT) + var/g = "m" + if (gender == MALE) + g = "m" + else if (gender == FEMALE) + g = "f" + + stand_icon = new /icon('human.dmi', "blank") + lying_icon = new /icon('human.dmi', "blank") + + var/husk = (mutations & HUSK) + var/obese = (mutations & FAT) + + if (husk) + stand_icon.Blend(new /icon('human.dmi', "husk_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('human.dmi', "husk_l"), ICON_OVERLAY) + else if(obese) + stand_icon.Blend(new /icon('human.dmi', "fatbody_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('human.dmi', "fatbody_l"), ICON_OVERLAY) + else + stand_icon.Blend(new /icon('human.dmi', "chest_[g]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('human.dmi', "chest_[g]_l"), ICON_OVERLAY) + + for (var/part in list("head", "arm_left", "arm_right", "hand_left", "hand_right", "leg_left", "leg_right", "foot_left", "foot_right")) + stand_icon.Blend(new /icon('human.dmi', "[part]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('human.dmi', "[part]_l"), ICON_OVERLAY) + + stand_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('human.dmi', "groin_[g]_l"), ICON_OVERLAY) + + // Skin tone + if (s_tone >= 0) + stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) + lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) + else + stand_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) + lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) + + if (underwear < 6 && underwear > 0) + if(!obese) + stand_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_l"), ICON_OVERLAY) - if (husk) - stand_icon.Blend(new /icon('human.dmi', "husk_s"), ICON_OVERLAY) - lying_icon.Blend(new /icon('human.dmi', "husk_l"), ICON_OVERLAY) - else if(obese) - stand_icon.Blend(new /icon('human.dmi', "fatbody_s"), ICON_OVERLAY) - lying_icon.Blend(new /icon('human.dmi', "fatbody_l"), ICON_OVERLAY) else + if(stand_icon) + del(stand_icon) + if(lying_icon) + del(lying_icon) + + if (mutantrace) + return + + var/g = "m" + if (gender == MALE) + g = "m" + else if (gender == FEMALE) + g = "f" + + stand_icon = new /icon('human.dmi', "torso_[g]_s") + lying_icon = new /icon('human.dmi', "torso_[g]_l") + + var/husk = (mutations & HUSK) + var/obese = (mutations & FAT) + stand_icon.Blend(new /icon('human.dmi', "chest_[g]_s"), ICON_OVERLAY) lying_icon.Blend(new /icon('human.dmi', "chest_[g]_l"), ICON_OVERLAY) - for (var/part in list("head", "arm_left", "arm_right", "hand_left", "hand_right", "leg_left", "leg_right", "foot_left", "foot_right")) - stand_icon.Blend(new /icon('human.dmi', "[part]_s"), ICON_OVERLAY) - lying_icon.Blend(new /icon('human.dmi', "[part]_l"), ICON_OVERLAY) + var/datum/organ/external/head = get_organ("head") + if(!head.destroyed) + stand_icon.Blend(new /icon('human.dmi', "head_[g]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('human.dmi', "head_[g]_l"), ICON_OVERLAY) + + for(var/datum/organ/external/part in organs) + if(!istype(part, /datum/organ/external/groin) \ + && !istype(part, /datum/organ/external/chest) \ + && !istype(part, /datum/organ/external/head) \ + && !part.destroyed) + var/icon/temp = new /icon('human.dmi', "[part.icon_name]_s") + if(part.robot) + temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) + stand_icon.Blend(temp, ICON_OVERLAY) + temp = new /icon('human.dmi', "[part.icon_name]_l") + if(part.robot) + temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) + lying_icon.Blend(temp , ICON_OVERLAY) stand_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY) lying_icon.Blend(new /icon('human.dmi', "groin_[g]_l"), ICON_OVERLAY) - // Skin tone - if (s_tone >= 0) - stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) - lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) - else - stand_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) - lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) + if (husk) + var/icon/husk_s = new /icon('human.dmi', "husk_s") + var/icon/husk_l = new /icon('human.dmi', "husk_l") + + for(var/datum/organ/external/part in organs) + if(!istype(part, /datum/organ/external/groin) \ + && !istype(part, /datum/organ/external/chest) \ + && !istype(part, /datum/organ/external/head) \ + && part.destroyed) + husk_s.Blend(new /icon('dam_mask.dmi', "[part.icon_name]"), ICON_SUBTRACT) + husk_l.Blend(new /icon('dam_mask.dmi', "[part.icon_name]2"), ICON_SUBTRACT) + + stand_icon.Blend(husk_s, ICON_OVERLAY) + lying_icon.Blend(husk_l, ICON_OVERLAY) + else if(obese) + stand_icon.Blend(new /icon('human.dmi', "fatbody_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('human.dmi', "fatbody_l"), ICON_OVERLAY) + + // Skin tone + if (s_tone >= 0) + stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) + lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD) + else + stand_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) + lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) +// if(pale) +// stand_icon.Blend(rgb(100,100,100)) +// lying_icon.Blend(rgb(100,100,100)) + + if (underwear < 6 && underwear > 0) + if(!obese) + stand_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY) + lying_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_l"), ICON_OVERLAY) + + - if (underwear < 6 && underwear > 0) - if(!obese) - stand_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY) - lying_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_l"), ICON_OVERLAY) /mob/living/carbon/human/proc/update_face() + if(organs) + var/datum/organ/external/head = get_organ("head") + if(head) + if(head.destroyed) + del(face_standing) + del(face_lying) + return if(!facial_hair_style || !hair_style) return//Seems people like to lose their icons, this should stop the runtimes for now del(face_standing) del(face_lying) @@ -2059,11 +2194,11 @@ It can still be worn/put on as normal. var/obj/item/weapon/card/id/id = wear_id if (istype(pda)) if (pda.id) - . = pda.id.registered + . = pda.id.registered_name else . = pda.owner else if (istype(id)) - . = id.registered + . = id.registered_name else return if_no_id return @@ -2076,7 +2211,7 @@ It can still be worn/put on as normal. if (istype(pda)) . = pda.owner else if (istype(id)) - . = id.registered + . = id.registered_name else return if_no_id return @@ -2203,7 +2338,7 @@ It can still be worn/put on as normal. if(wear_id) if(istype(wear_id,/obj/item/weapon/card/id)) - perpname = wear_id:registered + perpname = wear_id:registered_name else if(istype(wear_id,/obj/item/device/pda)) var/obj/item/device/pda/tempPda = wear_id perpname = tempPda.owner diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 7027e4e60a..23bdbf3499 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -101,24 +101,45 @@ if("hurt") M.attack_log += text("\[[time_stamp()]\] Punched [src.name] ([src.ckey])") src.attack_log += text("\[[time_stamp()]\] Has been punched by [M.name] ([M.ckey])") - log_attack("[M.name] ([M.ckey]) punched [src.name] ([src.ckey])") + var/attack_verb + switch(M.mutantrace) + if("lizard") + attack_verb = "scratch" + if("plant") + attack_verb = "slash" + else + attack_verb = "punch" + if(istajaran(M)) + attack_verb = "slash" var/damage = rand(0, 9) if(!damage) - playsound(loc, 'punchmiss.ogg', 25, 1, -1) - visible_message("\red [M] has attempted to punch [src]!") + switch(attack_verb) + if("slash") + playsound(loc, 'slashmiss.ogg', 25, 1, -1) + else + playsound(loc, 'punchmiss.ogg', 25, 1, -1) + + visible_message("\red [M] has attempted to [attack_verb] [src]!") return 0 + + var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) var/armor_block = run_armor_check(affecting, "melee") if(M.mutations & HULK) damage += 5 - playsound(loc, "punch", 25, 1, -1) - visible_message("\red [M] has punched [src]!") + switch(attack_verb) + if("slash") + playsound(loc, 'slice.ogg', 25, 1, -1) + else + playsound(loc, "punch", 25, 1, -1) + + visible_message("\red [M] has [attack_verb]ed [src]!") apply_damage(damage, BRUTE, affecting, armor_block) if(damage >= 9) @@ -126,7 +147,6 @@ apply_effect(4, WEAKEN, armor_block) UpdateDamageIcon() - if("disarm") M.attack_log += text("\[[time_stamp()]\] Disarmed [src.name] ([src.ckey])") src.attack_log += text("\[[time_stamp()]\] Has been disarmed by [M.name] ([M.ckey])") @@ -180,4 +200,7 @@ playsound(loc, 'punchmiss.ogg', 25, 1, -1) visible_message("\red [M] attempted to disarm [src]!") + return + +/mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params) return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 0cc56c0070..e9bd556fdb 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -27,33 +27,37 @@ /mob/living/carbon/human/proc/get_organ(var/zone) - if(!zone) zone = "chest" + if(!zone) + zone = "chest" for(var/datum/organ/external/O in organs) if(O.name == zone) return O return null -/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0) +/mob/living/carbon/human/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0 , var/weapon = null) if((damagetype != BRUTE) && (damagetype != BURN)) ..(damage, damagetype, def_zone, blocked) return 1 - if(blocked >= 2) return 0 + if(blocked >= 2) + return 0 var/datum/organ/external/organ = null if(isorgan(def_zone)) organ = def_zone else - if(!def_zone) def_zone = ran_zone(def_zone) + if(!def_zone) + def_zone = ran_zone(def_zone) organ = get_organ(check_zone(def_zone)) - if(!organ) return 0 + if(!organ) + return 0 if(blocked) damage = (damage/(blocked+1)) switch(damagetype) if(BRUTE) - organ.take_damage(damage, 0) + organ.take_damage(damage, 0, is_sharp(weapon), weapon) if(BURN) organ.take_damage(0, damage) UpdateDamageIcon() diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 2a2d149fb5..a5b6d4aee5 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -111,6 +111,7 @@ emp_act if(!I || !user) return 0 var/datum/organ/external/affecting = get_organ(ran_zone(user.zone_sel.selecting)) + var/hit_area = parse_zone(affecting.name) if((user != src) && check_shields(I.force, "the [I.name]")) @@ -121,7 +122,8 @@ emp_act var/armor = run_armor_check(affecting, "melee", "Your armor has protected you from a hit to the [hit_area].", "Your armor has softened hit to your [hit_area].") if(armor >= 2) return 0 if(!I.force) return 0 - apply_damage(I.force, I.damtype, affecting, armor) + + apply_damage(I.force, I.damtype, affecting, armor , I) var/bloody = 0 if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (I.force * 2))) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index b0374ba7bc..568ca5f718 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -719,6 +719,52 @@ // health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss()) + var/leg_tally = 2 + for(var/datum/organ/external/E in organs) + E.process() + if(E.robot && prob(E.brute_dam + E.burn_dam)) + if(E.name == "l_hand" || E.name == "l_arm") + if(hand && equipped()) + drop_item() + emote("custom v drops what they were holding, their limb malfunctioning!") + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, src) + spark_system.attach(src) + spark_system.start() + spawn(10) + del(spark_system) + else if(E.name == "r_hand" || E.name == "r_arm") + if(!hand && equipped()) + drop_item() + emote("custom v drops what they were holding, their limb malfunctioning!") + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, src) + spark_system.attach(src) + spark_system.start() + spawn(10) + del(spark_system) + else if(E.name == "l_leg" || E.name == "l_foot" \ + || E.name == "r_leg" || E.name == "r_foot" && !lying) + leg_tally-- // let it fail even if just foot&leg + if(E.broken || E.destroyed) + if(E.name == "l_hand" || E.name == "l_arm") + if(hand && equipped()) + drop_item() + emote("scream") + else if(E.name == "r_hand" || E.name == "r_arm") + if(!hand && equipped()) + drop_item() + emote("scream") + else if(E.name == "l_leg" || E.name == "l_foot" \ + || E.name == "r_leg" || E.name == "r_foot" && !lying) + leg_tally-- // let it fail even if just foot&leg + + // can't stand + if(leg_tally == 0 && !paralysis && !(lying || resting)) + emote("scream") + emote("collapse") + paralysis = 10 + if(getOxyLoss() > 50) Paralyse(3) if(health < config.health_threshold_dead || brain_op_stage == 4.0) @@ -733,6 +779,38 @@ Paralyse(5) if (stat != 2) //Alive. + + var/blood_volume = round(vessel.get_reagent_amount("blood")) + if(bloodloss) + drip(bloodloss) + if(!blood_volume) + bloodloss = 0 + else if(blood_volume > 448) + if(pale) + pale = 0 + update_body() + else if(blood_volume <= 448 && blood_volume > 336) + adjustToxLoss(1) + if(!pale) + pale = 1 + update_body() + var/word = pick("dizzy","woosey","faint") + src << "\red You feel [word]" + if(prob(1)) + var/word = pick("dizzy","woosey","faint") + src << "\red You feel [word]" + else if(blood_volume <= 336 && blood_volume > 244) + adjustToxLoss(5) + if(!pale) + pale = 1 + update_body() + eye_blurry += 6 + if(prob(15)) + paralysis += rand(1,3) + else if(blood_volume <= 244 && blood_volume > 122) + if(toxloss <= 101) + toxloss = 101 + if (silent) silent-- @@ -784,6 +862,32 @@ if (stuttering) stuttering-- + var/datum/organ/external/head/head = get_organ("head") + if(head && !head.disfigured) + if(head.brute_dam >= 45 || head.burn_dam >= 45) + head.disfigured = 1 + emote("scream") + real_name = "Unknown" + src << "\red Your face has become disfigured." +// face_op_stage = 0.0 + var/blood_max = 0 + for(var/datum/organ/external/temp in organs) + if(!temp.bleeding || temp.robot) //THAT WAS DUMB. + continue + // else + // if(prob(35)) + // bloodloss += rand(1,10) + if(temp.wounds) + for(var/datum/organ/wound/W in temp.wounds) + if(W.wound_size && W.bleeding) + blood_max += W.wound_size + if(temp.destroyed && !temp.gauzed) + blood_max += 50 //Yer missing a fucking limb. + bloodloss = min(bloodloss+1,(blood_max)) + + + + if (eye_blind) eye_blind-- blinded = 1 @@ -882,22 +986,41 @@ if (mutantrace == "lizard" || mutantrace == "metroid") see_in_dark = 3 see_invisible = 1 + + else if (istajaran(src)) + see_in_dark = 8 + else if (druggy) // If drugged~ see_in_dark = 2 //see_invisible regulated by drugs themselves. else see_in_dark = 2 - var/seer = 0 - for(var/obj/effect/rune/R in world) - if(loc==R.loc && R.word1==wordsee && R.word2==wordhell && R.word3==wordjoin) - seer = 1 - if(!seer) - see_invisible = 0 - else if(istype(head, /obj/item/clothing/head/helmet/welding)) + var/seer = 0 + for(var/obj/effect/rune/R in world) + if(loc==R.loc && R.word1==wordsee && R.word2==wordhell && R.word3==wordjoin) + seer = 1 + if(!seer) + see_invisible = 0 + + + + + + + + else if(istype(head, /obj/item/clothing/head/helmet/welding)) // wat. This is never fucking called. if(!head:up && tinted_weldhelh) see_in_dark = 1 + + + + + + + + /* HUD shit goes here, as long as it doesn't modify src.sight flags */ // The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl if(istype(glasses, /obj/item/clothing/glasses/hud/health)) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 3255689111..9c0e135a51 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -88,4 +88,6 @@ return 1 if (istype(other, /mob/living/carbon/metroid)) return 1 + if (istype(other, /mob/living/carbon/human/tajaran)) + return 1 return ..() \ No newline at end of file diff --git a/code/modules/mob/living/silicon/pai/hud.dm b/code/modules/mob/living/silicon/pai/hud.dm index 4f664e0b4a..974c041116 100644 --- a/code/modules/mob/living/silicon/pai/hud.dm +++ b/code/modules/mob/living/silicon/pai/hud.dm @@ -13,7 +13,7 @@ client.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]") var/perpname = "wot" if(istype(perp.wear_id,/obj/item/weapon/card/id)) - perpname = perp.wear_id:registered + perpname = perp.wear_id:registered_name else if(istype(perp.wear_id,/obj/item/device/pda)) var/obj/item/device/pda/tempPda = perp.wear_id perpname = tempPda.owner diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 445b18ae84..56483ed58e 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -103,6 +103,7 @@ var/canmove = 1.0 var/eye_stat = null//Living, potentially Carbon var/lastpuke = 0 + var/unacidable = 0 var/name_archive //For admin things like possession @@ -242,7 +243,7 @@ var/robot_talk_understand = 0 var/alien_talk_understand = 0 - + var/taj_talk_understand = 0 //You can guess what these are for. --SkyMarshal var/list/atom/hallucinations = list() @@ -273,4 +274,6 @@ the mob is also allowed to move without any sort of restriction. For instance, i var/datum/preferences/storedpreferences = null - var/geaslist = list() \ No newline at end of file + var/geaslist = list() + + diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 3560c5791f..5d64de746b 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -60,6 +60,11 @@ return 1 return 0 +/proc/istajaran(A) + if(istype(A, /mob/living/carbon/human/tajaran)) + return 1 + return 0 + /*proc/ishivebot(A) if(A && istype(A, /mob/living/silicon/hivebot)) return 1 @@ -105,12 +110,21 @@ proc/isorgan(A) return 1 return 0 +proc/hasorgans(A) + if(ishuman(A) || ismonkey(A)) + return 1 + return 0 + + + + /proc/hsl2rgb(h, s, l) return /proc/check_zone(zone) - if(!zone) return "chest" + if(!zone) + return "chest" switch(zone) if("eyes") zone = "head" diff --git a/code/modules/mob/organ/organ.dm b/code/modules/mob/organ/organ.dm index 1f89d9738f..e47c5b1279 100644 --- a/code/modules/mob/organ/organ.dm +++ b/code/modules/mob/organ/organ.dm @@ -1,17 +1,83 @@ /datum/organ + + +/datum/organ/var + name = "organ" + mob/living/carbon/human/owner = null + + list/datum/autopsy_data/autopsy_data = list() + list/trace_chemicals = list() // traces of chemicals in the organ, + // links chemical IDs to number of ticks for which they'll stay in the blood + + +/datum/organ/proc/process() + return 0 + +/datum/organ/proc/receive_chem(chemical as obj) + return 0 + + + +/mob/living/carbon/human/proc/make_human_organs() + + new /datum/organ/external/chest(src) + new /datum/organ/external/groin(src) + new /datum/organ/external/head(src) + new /datum/organ/external/l_arm(src) + new /datum/organ/external/r_arm(src) + new /datum/organ/external/r_leg(src) + new /datum/organ/external/l_leg(src) + new /datum/organ/external/l_hand(src) + new /datum/organ/external/l_foot(src) + new /datum/organ/external/r_hand(src) + new /datum/organ/external/r_foot(src) + + var/datum/organ/external/part = get_organ("chest") + part.children = list(get_organ("r_leg"),get_organ("l_leg"),get_organ("r_arm"),get_organ("l_arm"),get_organ("groin"),get_organ("head")) + part = get_organ("head") + part.parent = get_organ("chest") + part = get_organ("groin") + part.parent = get_organ("chest") + part = get_organ("r_leg") + part.children = list(get_organ("r_foot")) + part.parent = get_organ("chest") + part = get_organ("l_leg") + part.children = list(get_organ("l_foot")) + part.parent = get_organ("chest") + part = get_organ("r_arm") + part.children = list(get_organ("r_hand")) + part.parent = get_organ("chest") + part = get_organ("l_arm") + part.children = list(get_organ("l_hand")) + part.parent = get_organ("chest") + part = get_organ("r_foot") + part.parent = get_organ("r_leg") + part = get_organ("l_foot") + part.parent = get_organ("l_leg") + part = get_organ("r_hand") + part.parent = get_organ("r_arm") + part = get_organ("l_hand") + part.parent = get_organ("l_arm") + + + + +/datum/autopsy_data var - name = "organ" - owner = null - - - proc/process() - return 0 - - - proc/receive_chem(chemical as obj) - return 0 - + weapon = null + pretend_weapon = null + damage = 0 + hits = 0 + time_inflicted = 0 + proc/copy() + var/datum/autopsy_data/W = new() + W.weapon = weapon + W.pretend_weapon = pretend_weapon + W.damage = damage + W.hits = hits + W.time_inflicted = time_inflicted + return W /**************************************************** EXTERNAL ORGANS @@ -27,47 +93,230 @@ burn_dam = 0 bandaged = 0 max_damage = 0 - wound_size = 0 max_size = 0 + tmp/list/obj/item/weapon/implant/implant = list() + display_name + tmp/list/wounds = list() + tmp/bleeding = 0 + tmp/perma_injury = 0 + tmp/perma_dmg = 0 + tmp/broken = 0 + tmp/destroyed = 0 + tmp/destspawn = 0 //Has it spawned the broken limb? + tmp/gauzed = 0 //Has the missing limb been patched? + tmp/robot = 0 //ROBOT ARM MAN! + tmp/cutaway = 0 //First part of limb reattachment. + tmp/attachable = 0 //Can limb be attached? + min_broken_damage = 30 + datum/organ/external/parent + list/datum/organ/external/children + damage_msg = "\red You feel a intense pain" - proc/take_damage(brute, burn) - if((brute <= 0) && (burn <= 0)) return 0 - if((src.brute_dam + src.burn_dam + brute + burn) < src.max_damage) - src.brute_dam += brute - src.burn_dam += burn + var/open = 0 + var/stage = 0 + var/wound = 0 + + New(mob/living/carbon/H) + ..(H) + if(!display_name) + display_name = name + if(istype(H)) + owner = H + H:organs.Add(src) + + Del() + for(var/datum/organ/wound/W in wounds) + del(W) + ..() + + proc/take_damage(brute, burn, sharp, used_weapon = null, spread=0) + if((brute <= 0) && (burn <= 0)) + return 0 + if(destroyed) + return 0 + if(robot) + brute *= 0.66 //~2/3 damage for ROBOLIMBS + burn *= 0.66 //~2/3 damage for ROBOLIMBS + + if(owner && !robot) + owner.pain(display_name, (brute+burn)*3, 1) + if(sharp) + var/nux = brute * rand(10,15) + if(brute_dam >= max_damage) + if(prob(5 * brute)) +// for(var/mob/M in viewers(owner)) +// M.show_message("\red [owner.name]'s [display_name] flies off.") + destroyed = 1 + droplimb() + return + else if(prob(nux)) + createwound(max(1,min(6,round(brute/10) + rand(0,1))),0,brute) + if(!robot) owner << "You feel something wet on your [display_name]" + + if((brute_dam + burn_dam + brute + burn) < max_damage) + if(brute) + brute_dam += brute + if(prob(brute*2) && !sharp) + createwound(rand(4,6),0,brute) + else if(!sharp) + createwound(max(1,min(6,round(brute/10) + rand(1,2))),1,brute) + if(burn) + burn_dam += burn + createwound(max(1,min(6,round(burn/10) + rand(0,1))),2,burn) else - var/can_inflict = src.max_damage - (src.brute_dam + src.burn_dam) + var/can_inflict = max_damage - (brute_dam + burn_dam) if(can_inflict) if (brute > 0 && burn > 0) brute = can_inflict/2 burn = can_inflict/2 var/ratio = brute / (brute + burn) - src.brute_dam += ratio * can_inflict - src.burn_dam += (1 - ratio) * can_inflict + brute_dam += ratio * can_inflict + burn_dam += (1 - ratio) * can_inflict else if (brute > 0) brute = can_inflict - src.brute_dam += brute + brute_dam += brute + if(!sharp && !prob(brute*3)) createwound(max(1,min(6,round(brute/10) + rand(0,1))),1,brute) + else createwound(max(1,min(6,round(brute/10) + rand(1,2))),1,brute) else burn = can_inflict - src.burn_dam += burn + burn_dam += burn + createwound(max(1,min(6,round(burn/10) + rand(0,1))),2,burn) + else if(!robot) + var/passed_dam = (brute + burn) - can_inflict //Getting how much overdamage we have. + var/list/datum/organ/external/possible_points = list() + if(parent) + possible_points += parent + if(children) + possible_points += children + if(!possible_points.len) + message_admins("Oh god WHAT! [owner]'s [src] was unable to find an organ to pass overdamage too!") + else + if(!spread) + var/datum/organ/external/target = pick(possible_points) + if(brute) + target.take_damage(passed_dam, 0, sharp, used_weapon,1) + else + target.take_damage(0, passed_dam, sharp, used_weapon,1) else - return 0 + droplimb(1) //Robot limbs just kinda fail at full damage. - var/result = src.update_icon() + + if(broken) + owner.emote("scream") + + if(used_weapon) add_wound(used_weapon, brute + burn) + + var/result = update_icon() return result - proc/heal_damage(brute, burn) - src.brute_dam = max(0, src.brute_dam - brute) - src.burn_dam = max(0, src.burn_dam - burn) + proc/heal_damage(brute, burn, internal = 0, robo_repair = 0) + if(robot && !robo_repair) + return + var/brute_to_heal = 0 + var/brute_wounds = list() + var/burn_to_heal = 0 + var/burn_wounds = list() + for(var/datum/organ/wound/W in wounds) + if(W.wound_type > 1 && W.damage) + burn_to_heal += W.damage + burn_wounds += W + else if(W.damage) + brute_to_heal += W.damage + brute_wounds += W + if(brute && brute <= brute_to_heal) + for(var/datum/organ/wound/W in brute_wounds) + if(brute >= W.damage) + brute_dam -= W.damage + brute -= W.damage + W.damage = 0 + W.initial_dmg = 0 + W.stopbleeding(1) + else + W.damage -= brute + W.initial_dmg -= brute + W.stopbleeding() + else if(brute) + for(var/datum/organ/wound/W in brute_wounds) + W.damage = 0 + W.initial_dmg = 0 + W.stopbleeding(1) + brute_dam = 0 + if(burn && burn <= burn_to_heal) + for(var/datum/organ/wound/W in burn_wounds) + if(burn >= W.damage) + burn_dam -= W.damage + burn -= W.damage + W.damage = 0 + W.initial_dmg = 0 + W.stopbleeding() + else + W.damage -= burn + W.initial_dmg -= burn + W.stopbleeding() + else if(burn) + for(var/datum/organ/wound/W in burn_wounds) + W.damage = 0 + W.initial_dmg = 0 + W.stopbleeding() + burn_dam = 0 + if(internal) + broken = 0 + perma_injury = 0 + // if all damage is healed, replace the wounds with scars + if(brute_dam + burn_dam == 0) + for(var/V in autopsy_data) + var/datum/autopsy_data/W = autopsy_data[V] + del W + autopsy_data = list() return update_icon() + proc/add_wound(var/used_weapon, var/damage) + var/datum/autopsy_data/W = autopsy_data[used_weapon] + if(!W) + W = new() + W.weapon = used_weapon + autopsy_data[used_weapon] = W + + W.hits += 1 + W.damage += damage + W.time_inflicted = world.time + + proc/get_damage() //returns total damage - return src.brute_dam + src.burn_dam //could use src.health? + return max(brute_dam + burn_dam - perma_injury,perma_injury) //could use health? + proc/get_damage_brute() + return max(brute_dam+perma_injury,perma_injury) + + proc/get_damage_fire() + return burn_dam + + process() + if(destroyed) + if(!destspawn) + droplimb() + return + if(broken == 0) + perma_dmg = 0 + if(parent) + if(parent.destroyed) + destroyed = 1 + owner:update_body() + return + if(brute_dam > min_broken_damage && !robot) + if(broken == 0) + //owner.unlock_medal("Broke Yarrr Bones!", 0, "Break a bone.", "easy") + owner.visible_message("\red You hear a loud cracking sound coming from [owner.name].","\red Something feels like it shattered in your [display_name]!","You hear a sickening crack.") + owner.emote("scream") + broken = 1 + wound = pick("broken","fracture","hairline fracture") //Randomise in future. Edit: Randomized. --SkyMarshal + perma_injury = brute_dam + return + return // new damage icon system // returns just the brute/burn damage code @@ -77,18 +326,18 @@ if(burn_dam ==0) tburn =0 - else if (src.burn_dam < (src.max_damage * 0.25 / 2)) + else if (burn_dam < (max_damage * 0.25 / 2)) tburn = 1 - else if (src.burn_dam < (src.max_damage * 0.75 / 2)) + else if (burn_dam < (max_damage * 0.75 / 2)) tburn = 2 else tburn = 3 - if (src.brute_dam == 0) + if (brute_dam == 0) tbrute = 0 - else if (src.brute_dam < (src.max_damage * 0.25 / 2)) + else if (brute_dam < (max_damage * 0.25 / 2)) tbrute = 1 - else if (src.brute_dam < (src.max_damage * 0.75 / 2)) + else if (brute_dam < (max_damage * 0.75 / 2)) tbrute = 2 else tbrute = 3 @@ -98,13 +347,148 @@ // new damage icon system // adjusted to set damage_state to brute/burn code only (without r_name0 as before) proc/update_icon() - var/n_is = src.damage_state_text() - if (n_is != src.damage_state) - src.damage_state = n_is + var/n_is = damage_state_text() + if (n_is != damage_state) + damage_state = n_is return 1 return 0 - - + + proc/droplimb(var/override = 0,var/no_explode = 0) + if(override) + destroyed = 1 + if(destroyed) + if(implant) + for(var/implants in implant) + del(implants) + //owner.unlock_medal("Lost something?", 0, "Lose a limb.", "easy") + + for(var/datum/organ/external/I in children) + if(I && !I.destroyed) + I.droplimb(1,1) + var/obj/item/weapon/organ/H + switch(body_part) + if(UPPER_TORSO) + owner.gib() + if(LOWER_TORSO) + owner << "\red You are now sterile." + if(HEAD) + H = new /obj/item/weapon/organ/head(owner.loc, owner) + if(ishuman(owner)) + if(owner.gender == FEMALE) + H.icon_state = "head_f_l" + H.overlays += owner.face_lying + if(ismonkey(owner)) + H.icon_state = "head_l" + //H.overlays += owner.face_lying + H:transfer_identity(owner) + H.pixel_x = -10 + H.pixel_y = 6 + if(!owner.original_name) + owner.original_name = owner.real_name + H.name = "[owner.original_name]'s head" + + owner.update_face() + owner.update_body() + owner.death() + if(ARM_RIGHT) + H = new /obj/item/weapon/organ/r_arm(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "r_arm_l" + if(ARM_LEFT) + H = new /obj/item/weapon/organ/l_arm(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "l_arm_l" + if(LEG_RIGHT) + H = new /obj/item/weapon/organ/r_leg(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "r_leg_l" + if(LEG_LEFT) + H = new /obj/item/weapon/organ/l_leg(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "l_leg_l" + if(HAND_RIGHT) + H = new /obj/item/weapon/organ/r_hand(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "r_hand_l" + if(HAND_LEFT) + H = new /obj/item/weapon/organ/l_hand(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "l_hand_l" + if(FOOT_RIGHT) + H = new /obj/item/weapon/organ/r_foot/(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "r_foot_l" + if(FOOT_LEFT) + H = new /obj/item/weapon/organ/l_foot(owner.loc, owner) + if(ismonkey(owner)) + H.icon_state = "l_foot_l" + if(ismonkey(owner)) + H.icon = 'monkey.dmi' + if(istajaran(owner)) + H.icon = 'tajaran.dmi' + var/lol = pick(cardinal) + step(H,lol) + destspawn = 1 + if(!robot) + owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\ + "\red Your [display_name] goes flying off!",\ + "You hear a terrible sound of ripping tendons and flesh.") + else + owner.visible_message("\red [owner.name]'s [display_name] explodes violently!",\ + "\red Your [display_name] explodes!",\ + "You hear an explosion followed by a scream!") + if(!no_explode) + explosion(get_turf(owner),-1,-1,2,3) + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, src) + spark_system.attach(src) + spark_system.start() + spawn(10) + del(spark_system) + for(var/datum/organ/wound/W in wounds) + W.update_health() + del(W) + owner.update_body() + owner.update_clothing() + + proc/createwound(var/size = 1, var/type = 0, var/damage) + var/list/datum/organ/wound/possible_wounds = list() + for(var/datum/organ/wound/W in wounds) + if(W.wound_type == type && W.wound_size <= 3 && size <= 3 && ((!W.is_healing && type == 1) || (!W.healing_state && type != 1))) + possible_wounds += W + if(hasorgans(owner)) + if(!possible_wounds.len || prob(20)) + var/datum/organ/wound/W = new(src) + bleeding = max(!type,bleeding) //Sharp objects cause bleeding. + W.bleeding = !type + // owner:bloodloss += 10 * size + W.damage = damage + W.initial_dmg = damage + W.wound_type = type + W.wound_size = size + W.owner = owner + W.parent = src + if(type == 1) + spawn W.become_scar() + else + spawn W.start_close() //Let small cuts close themselves. + wounds += W + else + var/datum/organ/wound/W = pick(possible_wounds) + bleeding = max(!type,bleeding) //Sharp objects cause bleeding. + W.bleeding = max(!type,W.bleeding) + // owner:bloodloss += 10 * size + W.damage += damage + W.initial_dmg += damage + W.wound_size = max(1,min(6,round(W.damage/10) + rand(0,1))) + + proc/emp_act(severity) + if(!robot) return + if(prob(30*severity)) + take_damage(4(4-severity), 0, 1, used_weapon = "EMP") + else + droplimb(1) + proc/getDisplayName() switch(src.name) if("l_leg") @@ -115,9 +499,141 @@ return "left arm" if("r_arm") return "right arm" + if("l_foot") + return "left foot" + if("r_foot") + return "right foot" + if("l_hand") + return "left hand" + if("r_hand") + return "right hand" else return src.name +/datum/organ/wound + name = "wound" + var/wound_type = 0 //0 = cut, 1 = bruise, 2 = burn + var/damage = 0 //How much damage it caused. + var/initial_dmg = 0 + var/wound_size = 1 + var/datum/organ/external/parent + var/bleeding = 0 //You got wounded, of course it's bleeding. -- Scratch that. Rewrote it. + var/healing_state = 0 + var/is_healing = 0 + var/slowheal = 3 + + proc/start_close() + if(parent.robot) + return + sleep(rand(1800,3000)) //3-5 minutes + if(prob(50) && wound_size == 1) + parent.wounds.Remove(src) + update_health(1) + del(src) + else if(prob(33) && wound_size < 3) + stopbleeding() + return + sleep(rand(1800,3000)) + if(wound_size == 1) //Small cuts heal in 6-10 minutes. + parent.wounds.Remove(src) + update_health(1) + del(src) + else if(prob(50) && wound_size < 5 && bleeding) + stopbleeding() + return + if(wound_size < 5 && bleeding) //Give it a chance to stop bleeding on it's own. + spawn while(1) + sleep(1200) + if(prob(50)) + stopbleeding() + return + return + + proc/stopbleeding(var/bleed = 0) + if(is_healing) + return 0 +// owner:bloodloss -= 10 * src.wound_size + parent.bleeding = min(bleed,bleeding) + for(var/datum/organ/wound/W in parent) + if(W.bleeding && W != src) + parent.bleeding = 1 + break + bleeding = min(bleed,bleeding) + is_healing = 1 + slowheal = 1 + if(!healing_state) + spawn become_scar() //spawn off the process of becoming a scar. + return 1 + + proc/become_scar() + if(parent.robot) + return + healing_state = 1 //Patched + spawn(200*slowheal) //~20-60 seconds + update_health(5) //Heals some. + + sleep(rand(1800,3000)*slowheal) //3-5 minutes + + if(!parent || !parent.owner || parent.owner.stat == 2) + if(!parent || !parent.owner) + del(parent) + del(src) + return + if(prob(80) && wound_size < 2) //Small cuts heal. + update_health(1) + parent.wounds.Remove(src) + del(src) + + healing_state = 2 //Noticibly healing. + update_health(2) //Heals more. + + sleep(rand(1800,3000)*slowheal) //3-5 minutes + if(!parent || !parent.owner || parent.owner.stat == 2) + if(!parent || !parent.owner) + del(parent) + del(src) + return + if(prob(60) && wound_size < 3) //Cuts heal up + parent.wounds.Remove(src) + del(src) + healing_state = 3 //Angry red scar + update_health(1) //Heals the rest of the way. + + + sleep(rand(6000,9000)*slowheal) //10-15 minutes + if(!parent || !parent.owner || parent.owner.stat == 2) + if(!parent || !parent.owner) + del(parent) + del(src) + return + if(prob(80) && wound_size < 4) //Minor wounds heal up fully. + parent.wounds.Remove(src) + del(src) + healing_state = 4 //Scar + sleep(rand(6000,9000)*slowheal) //10-15 minutes + if(!parent || !parent.owner || parent.owner.stat == 2) + if(!parent || !parent.owner) + del(parent) + del(src) + return + if(prob(30) || wound_size < 4 || wound_type == 1) //Small chance for the scar to disappear, any small remaining wounds deleted. + parent.wounds.Remove(src) + del(src) + healing_state = 5 //Faded scar + return + + proc/update_health(var/percent = 1) + if(!owner || owner.stat == 2) + return + damage = max(damage - damage/percent,0) //Remove that amount of the damage + if(wound_type > 1) + parent.burn_dam = max(parent.burn_dam - (initial_dmg - damage),0) + else + parent.brute_dam = max(parent.brute_dam - (initial_dmg - damage),0) + initial_dmg = damage //reset it for further updates. + parent.owner.updatehealth() + + /**************************************************** diff --git a/code/modules/mob/organ/organ_external.dm b/code/modules/mob/organ/organ_external.dm index 029d28aa72..881e3623a6 100644 --- a/code/modules/mob/organ/organ_external.dm +++ b/code/modules/mob/organ/organ_external.dm @@ -2,61 +2,207 @@ name = "chest" icon_name = "chest" max_damage = 150 + min_broken_damage = 75 body_part = UPPER_TORSO -/*/datum/organ/external/groin +/datum/organ/external/groin name = "groin" - icon_name = "groin" + icon_name = "diaper" + max_damage = 115 + min_broken_damage = 70 body_part = LOWER_TORSO -*/ + /datum/organ/external/head name = "head" icon_name = "head" - max_damage = 125 + max_damage = 75 + min_broken_damage = 40 body_part = HEAD + var/disfigured = 0 /datum/organ/external/l_arm name = "l_arm" + display_name = "left arm" icon_name = "l_arm" max_damage = 75 + min_broken_damage = 30 body_part = ARM_LEFT /datum/organ/external/l_leg name = "l_leg" + display_name = "left leg" icon_name = "l_leg" max_damage = 75 + min_broken_damage = 30 body_part = LEG_LEFT /datum/organ/external/r_arm name = "r_arm" + display_name = "right arm" icon_name = "r_arm" max_damage = 75 + min_broken_damage = 30 body_part = ARM_RIGHT /datum/organ/external/r_leg name = "r_leg" + display_name = "right leg" icon_name = "r_leg" max_damage = 75 + min_broken_damage = 30 body_part = LEG_RIGHT -/*Leaving these here in case we want to use them later /datum/organ/external/l_foot - name = "l foot" + name = "l_foot" + display_name = "left foot" icon_name = "l_foot" + max_damage = 40 + min_broken_damage = 15 body_part = FOOT_LEFT /datum/organ/external/r_foot - name = "r foot" + name = "r_foot" + display_name = "right foot" icon_name = "r_foot" + max_damage = 40 + min_broken_damage = 15 body_part = FOOT_RIGHT /datum/organ/external/r_hand - name = "r hand" + name = "r_hand" + display_name = "right hand" icon_name = "r_hand" + max_damage = 40 + min_broken_damage = 15 body_part = HAND_RIGHT /datum/organ/external/l_hand - name = "l hand" + name = "l_hand" + display_name = "left hand" icon_name = "l_hand" + max_damage = 40 + min_broken_damage = 15 body_part = HAND_LEFT -*/ \ No newline at end of file + + + +obj/item/weapon/organ + icon = 'human.dmi' + +obj/item/weapon/organ/New(loc, mob/living/carbon/human/H) + ..(loc) + if(!istype(H)) + return + if(H.dna) + if(blood_DNA && blood_DNA.len) + blood_DNA.len++ + blood_DNA[blood_DNA.len] = list(H.dna.unique_enzymes, H.dna.b_type) + else + blood_DNA = list(list(H.dna.unique_enzymes, H.dna.b_type)) + + var/icon/I = new /icon(icon, icon_state) + + if (H.s_tone >= 0) + I.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD) + else + I.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT) + icon = I + +obj/item/weapon/organ/head + name = "head" + icon_state = "head_m_l" + var/mob/living/carbon/brain/brainmob + var/brain_op_stage = 0 + +obj/item/weapon/organ/head/New() + ..() + spawn(5) + if(brainmob && brainmob.client) + brainmob.client.screen.len = null //clear the hud + +obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head + brainmob = new(src) + brainmob.name = H.real_name + brainmob.real_name = H.real_name + brainmob.dna = H.dna + if(H.mind) + H.mind.transfer_to(brainmob) + brainmob.container = src + if (brainmob.client) + spawn(10) + if(brainmob.client) + verbs += /mob/proc/ghost + +obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W,/obj/item/weapon/scalpel)) + switch(brain_op_stage) + if(0) + for(var/mob/O in (oviewers(brainmob) - user)) + O.show_message("\red [brainmob] is beginning to have \his head cut open with [src] by [user].", 1) + brainmob << "\red [user] begins to cut open your head with [src]!" + user << "\red You cut [brainmob]'s head open with [src]!" + + brain_op_stage = 1 + + if(2) + for(var/mob/O in (oviewers(brainmob) - user)) + O.show_message("\red [brainmob] is having \his connections to the brain delicately severed with [src] by [user].", 1) + brainmob << "\red [user] begins to cut open your head with [src]!" + user << "\red You cut [brainmob]'s head open with [src]!" + + brain_op_stage = 3.0 + else + ..() + else if(istype(W,/obj/item/weapon/circular_saw)) + switch(brain_op_stage) + if(1) + for(var/mob/O in (oviewers(brainmob) - user)) + O.show_message("\red [brainmob] has \his skull sawed open with [src] by [user].", 1) + brainmob << "\red [user] begins to saw open your head with [src]!" + user << "\red You saw [brainmob]'s head open with [src]!" + + brain_op_stage = 2 + if(3) + for(var/mob/O in (oviewers(brainmob) - user)) + O.show_message("\red [brainmob] has \his spine's connection to the brain severed with [src] by [user].", 1) + brainmob << "\red [user] severs your brain's connection to the spine with [src]!" + user << "\red You sever [brainmob]'s brain's connection to the spine with [src]!" + + user.attack_log += "\[[time_stamp()]\] Debrained [brainmob.name] ([brainmob.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" + brainmob.attack_log += "\[[time_stamp()]\] Debrained by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" + log_admin("ATTACK: [brainmob] ([brainmob.ckey]) debrained [user] ([user.ckey]).") + message_admins("ATTACK: [brainmob] ([brainmob.ckey]) debrained [user] ([user.ckey]).") + + var/obj/item/brain/B = new(loc) + B.transfer_identity(brainmob) + + brain_op_stage = 4.0 + else + ..() + else + ..() + +obj/item/weapon/organ/l_arm + name = "left arm" + icon_state = "l_arm_l" +obj/item/weapon/organ/l_foot + name = "left foot" + icon_state = "l_foot_l" +obj/item/weapon/organ/l_hand + name = "left hand" + icon_state = "l_hand_l" +obj/item/weapon/organ/l_leg + name = "left leg" + icon_state = "l_leg_l" +obj/item/weapon/organ/r_arm + name = "right arm" + icon_state = "r_arm_l" +obj/item/weapon/organ/r_foot + name = "right foot" + icon_state = "r_foot_l" +obj/item/weapon/organ/r_hand + name = "right hand" + icon_state = "r_hand_l" +obj/item/weapon/organ/r_leg + name = "right leg" + icon_state = "r_leg_l" diff --git a/code/modules/mob/organ/pain.dm b/code/modules/mob/organ/pain.dm new file mode 100644 index 0000000000..eedf05aa60 --- /dev/null +++ b/code/modules/mob/organ/pain.dm @@ -0,0 +1,56 @@ +mob/proc/flash_pain() +// flick("pain",pain) + return + +mob/var/list/pain_stored = list() +mob/var/last_pain_message = "" +mob/var/next_pain_time = 0 + +// partname is the name of a body part +// amount is a num from 1 to 100 +mob/proc/pain(var/partname, var/amount, var/force) + if(stat >= 2) return + if(world.time < next_pain_time && !force) + return + if(amount > 10 && istype(src,/mob/living/carbon/human)) + if(src:paralysis) + src:paralysis = max(0, src:paralysis-round(amount/10)) + if(amount > 50 && prob(amount / 5)) + src:drop_item() + /* + switch(amount) + if(1 to 10) + msg = "Your [partname] hurts a bit." + if(11 to 90) +// flash_weak_pain() + msg = "Ouch! Your [partname] hurts." + if(91 to 10000) + flash_pain() + msg = "OH GOD! Your [partname] is hurting terribly!" + + if(msg && (msg != last_pain_message || prob(10))) + last_pain_message = msg + src << msg + +*/ + next_pain_time = world.time + (100 - amount) + +mob/living/carbon/human/proc/handle_pain() + // not when sleeping + if(stat >= 2) return + if(reagents.has_reagent("tramadol")) + return + if(reagents.has_reagent("oxycodone")) + return + var/maxdam = 0 + var/datum/organ/external/damaged_organ = null + for(var/name in organs) + var/datum/organ/external/E = organs[name] + var/dam = E.get_damage() + // make the choice of the organ depend on damage, + // but also sometimes use one of the less damaged ones + if(dam > maxdam && (maxdam == 0 || prob(70)) ) + damaged_organ = E + maxdam = dam + if(damaged_organ) + pain(damaged_organ.display_name, maxdam, 0) diff --git a/code/unused/computer2/med_rec.dm b/code/unused/computer2/med_rec.dm index 8cb06a40c2..d365cd6b8d 100644 --- a/code/unused/computer2/med_rec.dm +++ b/code/unused/computer2/med_rec.dm @@ -119,7 +119,7 @@ src.active1 = null src.active2 = null if (src.check_access(src.master.authid)) - src.authenticated = src.master.authid.registered + src.authenticated = src.master.authid.registered_name src.rank = src.master.authid.assignment src.screen = 1 if (src.authenticated) diff --git a/code/unused/gamemodes/ctf.dm b/code/unused/gamemodes/ctf.dm index 8a957b9a32..5a464c0ce2 100644 --- a/code/unused/gamemodes/ctf.dm +++ b/code/unused/gamemodes/ctf.dm @@ -58,7 +58,7 @@ W.name = "[M.real_name]'s ID card (Red Team)" W.access = access_red W.assignment = "Red Team" - W.registered = M.real_name + W.registered_name = M.real_name M.wear_id = W M.wear_id.layer = 20 if(R) @@ -98,7 +98,7 @@ W.name = "[M.real_name]'s ID card (Green Team)" W.access = access_green W.assignment = "Green Team" - W.registered = M.real_name + W.registered_name = M.real_name M.wear_id = W M.wear_id.layer = 20 if(G) diff --git a/code/unused/gamemodes/deathmatch.dm b/code/unused/gamemodes/deathmatch.dm index 662a96a58b..6e7736ac68 100644 --- a/code/unused/gamemodes/deathmatch.dm +++ b/code/unused/gamemodes/deathmatch.dm @@ -58,7 +58,7 @@ W.access = get_all_accesses() W.name = "[newname]'s ID card (Death Commando)" W.assignment = "Death Commando" - W.registered = newname + W.registered_name = newname M.equip_if_possible(W, M.slot_wear_id) ..() diff --git a/code/unused/pda2/pda2.dm b/code/unused/pda2/pda2.dm index f77136d1bf..29d3556292 100644 --- a/code/unused/pda2/pda2.dm +++ b/code/unused/pda2/pda2.dm @@ -159,8 +159,8 @@ src.cartridge = C src.updateSelfDialog() - else if (istype(C, /obj/item/weapon/card/id) && !src.owner && C:registered) - src.owner = C:registered + else if (istype(C, /obj/item/weapon/card/id) && !src.owner && C:registered_name) + src.owner = C:registered_name src.name = "PDA-[src.owner]" user << "\blue Card scanned." src.updateSelfDialog() diff --git a/icons/effects/drip.dmi b/icons/effects/drip.dmi new file mode 100644 index 0000000000..c78843e586 Binary files /dev/null and b/icons/effects/drip.dmi differ diff --git a/icons/mob/human.dmi b/icons/mob/human.dmi index a0162e6028..492f253711 100644 Binary files a/icons/mob/human.dmi and b/icons/mob/human.dmi differ diff --git a/icons/mob/limb_mask.dmi b/icons/mob/limb_mask.dmi new file mode 100644 index 0000000000..ba4d0e3456 Binary files /dev/null and b/icons/mob/limb_mask.dmi differ diff --git a/icons/mob/tajaran.dmi b/icons/mob/tajaran.dmi new file mode 100644 index 0000000000..5cb5c4b5c0 Binary files /dev/null and b/icons/mob/tajaran.dmi differ diff --git a/icons/mob/tajaran_face.dmi b/icons/mob/tajaran_face.dmi new file mode 100644 index 0000000000..9e06687450 Binary files /dev/null and b/icons/mob/tajaran_face.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 90fb2ae7d8..c815c1ebd1 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -109,6 +109,7 @@ #define FILE_DIR "code/modules/mob/living/carbon/alien/larva" #define FILE_DIR "code/modules/mob/living/carbon/brain" #define FILE_DIR "code/modules/mob/living/carbon/human" +#define FILE_DIR "code/modules/mob/living/carbon/human/Tajara" #define FILE_DIR "code/modules/mob/living/carbon/metroid" #define FILE_DIR "code/modules/mob/living/carbon/monkey" #define FILE_DIR "code/modules/mob/living/silicon" @@ -890,6 +891,8 @@ #include "code\modules\mob\living\carbon\human\login.dm" #include "code\modules\mob\living\carbon\human\say.dm" #include "code\modules\mob\living\carbon\human\whisper.dm" +#include "code\modules\mob\living\carbon\human\Tajara\tajara_transformation.dm" +#include "code\modules\mob\living\carbon\human\Tajara\tajaran.dm" #include "code\modules\mob\living\carbon\metroid\death.dm" #include "code\modules\mob\living\carbon\metroid\emote.dm" #include "code\modules\mob\living\carbon\metroid\examine.dm" @@ -956,6 +959,7 @@ #include "code\modules\mob\organ\organ.dm" #include "code\modules\mob\organ\organ_external.dm" #include "code\modules\mob\organ\organ_internal.dm" +#include "code\modules\mob\organ\pain.dm" #include "code\modules\mob\simple_animal\cat.dm" #include "code\modules\mob\simple_animal\constructs.dm" #include "code\modules\mob\simple_animal\corgi.dm"