diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 98686aee07d..ba253b3073e 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -21,7 +21,7 @@ reporting bugs in the code. Refer to ISSUE_TEMPLATE for the exact format that yo should be in. #### Guidelines: - - Issue reports should be as detailed as possible, and if applicable, should include + * Issue reports should be as detailed as possible, and if applicable, should include instructions on how to reproduce the bug. ## Pull requests @@ -31,119 +31,491 @@ strongly recommended you get approval/traction for it from our forums before sta actual development. #### Guidelines: - - Pull requests should be atomic; Make one commit for each distinct change, so if a part + * Pull requests should be atomic; Make one commit for each distinct change, so if a part of a pull request needs to be removed/changed, you may simply modify that single commit. Due to limitations of the engine, this may not always be possible; but do try your best. - - Document and explain your pull requests thoroughly. Detail what each commit changes, + * Document and explain your pull requests thoroughly. Detail what each commit changes, and why it changes it. We do not want to have to read all of you commit names to figure out what your pull request is about. - - Any pull request that is not solely composed of fixes or non gameplay-affecting + * Any pull request that is not solely composed of fixes or non gameplay-affecting refactors must have a changelog. Inline changelogs are supported through the format described [here](https://github.com/ParadiseSS13/Paradise/pull/3291#issuecomment-172950466) and should be used rather than manually edited .yml file changelogs. - - Pull requests should not have any merge commits except in the case of fixing merge + * Pull requests should not have any merge commits except in the case of fixing merge conflicts for an existing pull request. New pull requests should not have any merge commits. Use `git rebase` or `git reset` to update your branches, not `git pull`. -#### BYOND Specific Guidelines: - - Any `type` or `proc` paths **must** use absolute pathing unless the file you are - working in primarily utilizes relative pathing. - - Paths must begin with `/`. It should be `/obj/machinery/fancy_robot`, - not `obj/machinery/fancy_robot`. - - New bases of datum must begin with `/datum/`. `/datum/arbitrary_datum`, - not `/arbitrary_datum`. - - Don't use strings in combination with `text2path()` unless the paths are being - dynamically created. Variables can contain normal paths just fine. - - Don't duplicate code. If you have identical code in two places, it should probably - be a new proc that they both can use. - - No magic numbers/strings. If you have a number or text that is important and used in - your code, make a `#DEFINE` statement with a name that clearly indicates it's use. - - `if(condition)` must be used over `if (condition)` or any other variation. - - The same applies for `while` and `for` loops, they must have no space between the - keyword and condition brackets. `while(condition)`, `for(condition)` - - If you want to output a message to a player's chat - (this includes text sent to `world`), use `to_chat(mob/client/world, "message")`. - Do not use `mob/client/world << "message"`. - - Do not use one-line control statements (if, else, for, while, etc). The space saved - is not worth the decreased readability. - - Control statements comparing a variable to a constant should be formatted `variable`, - `operator`, `constant`. This means `if(count <= 10)` is preferred over - `if(10 >= count)`. - - **Never** use a colon `:` operator to bypass type safety checks, unless you are doing - something where the tiny performance increase is incredibly noticeable (eg, a loop for - a huge list). You should properly typecast everything and use the period `.` - operator. - - Use early returns, and avoid far-indented if blocks. This means that you should not - do this: +#### Using Changelog + * Tags used in changelog include add/rscadd, del/rscdel, fix/fixes, typo/spellcheck. + * Without specifying a name it will default to using your GitHub name. + Some examples +``` +:cl: +add: The ability to change the color of wires +del: Deleted depreciated wire merging now handled in parent +fix: Moving wires now follows the user input instead of moving the stack +/:cl: +``` +``` +:cl: N3X15 +typo: Fixes some misspelled words under Using Changelog +/:cl: +``` + + +## Specifications + +As mentioned before, you are expected to follow these specifications in order to make everyone's lives easier. It'll save both your time and ours, by making +sure you don't have to make any changes and we don't have to ask you to. Thank you for reading this section! + +### Object Oriented Code +As BYOND's Dream Maker (henceforth "DM") is an object-oriented language, code must be object-oriented when possible in order to be more flexible when adding +content to it. If you don't know what "object-oriented" means, we highly recommend you do some light research to grasp the basics. + +### All BYOND paths must contain the full path +(i.e. absolute pathing) + +DM will allow you nest almost any type keyword into a block, such as: + +```DM +datum + datum1 + var + varname1 = 1 + varname2 + static + varname3 + varname4 + proc + proc1() + code + proc2() + code + + datum2 + varname1 = 0 + proc + proc3() + code + proc2() + ..() + code +``` + +The use of this is not allowed in this project *unless the majority of the file is already relatively pathed* as it makes finding definitions via full text +searching next to impossible. The only exception is the variables of an object may be nested to the object, but must not nest further. + +The previous code made compliant: + +```DM +/datum/datum1 + var/varname1 + var/varname2 + var/static/varname3 + var/static/varname4 + +/datum/datum1/proc/proc1() + code +/datum/datum1/proc/proc2() + code +/datum/datum1/datum2 + varname1 = 0 +/datum/datum1/datum2/proc/proc3() + code +/datum/datum1/datum2/proc2() + ..() + code +``` + +### No overriding type safety checks +The use of the : operator to override type safety checks is not allowed. You must cast the variable to the proper type. + +### Type paths must begin with a / +eg: `/datum/thing`, not `datum/thing` + +### Datum type paths must began with "datum" +In DM, this is optional, but omitting it makes finding definitions harder. To be specific, you can declare the path `/arbitrary`, but it +will still be, in actuality, `/datum/arbitrary`. Write your code to reflect this. + +### Do not use text/string based type paths +It is rarely allowed to put type paths in a text format, as there are no compile errors if the type path no longer exists. Here is an example: + +```DM +//Good +var/path_type = /obj/item/baseball_bat + +//Bad +var/path_type = "/obj/item/baseball_bat" +``` + +### Do not use `\The`. +The `\The` macro doesn't actually do anything when used in the format `\The [atom reference]`. Directly referencing an atom in an embedded string +will automatically prefix `The` or `the` to it as appropriate. As an extension, when referencing an atom, don't use `[atom.name]`, use `[atom]`. +The only exception to this rule is when dealing with items "belonging" to a mob, in which case you should use `[mob]'s [atom.name]` to avoid `The` +ever forming. + +```DM +//Good +var/atom/A +"[A]" + +//Bad +"\The [A]" +``` + +### Use the pronoun library instead of `\his` macros. +We have a system in code/\_\_HELPERS/pronouns.dm for addressing all forms of pronouns. This is useful in a number of ways; + * BYOND's \his macro can be unpredictable on what object it references. + Take this example: `"[user] waves \his [user.weapon] around, hitting \his opponents!"`. + This will end up referencing the user's gender in the first occurence, but what about the second? + It'll actually print the gender set on the weapon he's carrying, which is unintended - and there's no way around this. + * It always prints the real `gender` variable of the atom it's referencing. This can lead to exposing a mob's gender even when their face is covered, + which would normally prevent it's gender from being printed. + +The way to avoid these problems is to use the pronoun system. Instead of `"[user] waves \his arms."`, you can do `"[user] waves [user.p_their()] arms."` + +``` +//Good +"[H] waves [H.p_their()] hands!" +"[user] waves [H.p_their()] [user.weapon] around, hitting [H.p_their()] opponents!"` + +//Bad +"[H] waves \his hands!" +"[user] waves \his [user.weapon] around, hitting \his opponents!" +``` + +### Use `[A.UID()]` over `\ref[A]` +BYOND has a system to pass "soft references" to datums, using the format `"\ref[datum]"` inside a string. This allows you to find the object just based +off of a text string, which is especially useful when dealing with the bridge between BYOND code and HTML/JS in UIs. It's resolved back into an object +reference by using `locate("\ref[datum]")` when the code comes back to BYOND. The issue with this is that locate() can return a unexpected datum +if the original datum has been deleted - BYOND recycles the references. + +UID's are actually unique; they work off of a global counter and are not recycled. Each datum has one assigned to it when it's created, which can be +accessed by `[datum.UID()]`. You can use this as a snap-in replacement for `\ref` by changing any `locate(ref)` calls in your code to `locateUID(ref)`. +Usage of this system is mandatory for any /Topic( calls, and will produce errors in Dream Daemon if it's not used. ``, not `Remove|Implanted
" else - text = "Mindshield Implant:No Implant|Implant him!
" + text = "Mindshield Implant:No Implant|Implant [H.p_them()]!
" sections["implant"] = text /** REVOLUTION ***/ text = "revolution" @@ -483,9 +483,11 @@ var/new_memo = copytext(input("Write new memory", "Memory", memory) as null|message,1,MAX_MESSAGE_LEN) if(isnull(new_memo)) return - memory = new_memo - log_admin("[key_name(usr)] has edited [key_name(current)]'s memory") - message_admins("[key_name_admin(usr)] has edited [key_name_admin(current)]'s memory") + var/confirmed = alert(usr, "Are you sure?", "Edit Memory", "Yes", "No") + if(confirmed == "Yes") // Because it is too easy to accidentally wipe someone's memory + memory = new_memo + log_admin("[key_name(usr)] has edited [key_name(current)]'s memory") + message_admins("[key_name_admin(usr)] has edited [key_name_admin(current)]'s memory") else if(href_list["obj_edit"] || href_list["obj_add"]) var/datum/objective/objective @@ -630,7 +632,7 @@ new_objective = new /datum/objective/escape/escape_with_identity new_objective.owner = src new_objective.target = new_target - new_objective.explanation_text = "Escape on the shuttle or an escape pod with the identity of [targ.current.real_name], the [targ.assigned_role] while wearing their identification card." + new_objective.explanation_text = "Escape on the shuttle or an escape pod with the identity of [targ.current.real_name], the [targ.assigned_role] while wearing [targ.current.p_their()] identification card." if("custom") var/expl = sanitize(copytext(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null,1,MAX_MESSAGE_LEN)) if(!expl) @@ -742,7 +744,7 @@ if(src in ticker.mode.revolutionaries) ticker.mode.revolutionaries -= src ticker.mode.update_rev_icons_removed(src) - to_chat(current, "\red You have proven your devotion to revolution! You are a head revolutionary now!") + to_chat(current, "You have proven your devotion to revolution! You are a head revolutionary now!") else if(!(src in ticker.mode.head_revolutionaries)) to_chat(current, "You are a member of the revolutionaries' leadership now!") else @@ -1217,12 +1219,8 @@ message_admins("[key_name_admin(usr)] has given [key_name_admin(current)] an uplink") else if(href_list["obj_announce"]) - var/obj_count = 1 - to_chat(current, "
Your current objectives:") - for(var/datum/objective/objective in objectives) - to_chat(current, "Objective #[obj_count]: [objective.explanation_text]") - obj_count++ - current << 'sound/ambience/alarm4.ogg' + announce_objectives() + SEND_SOUND(current, sound('sound/ambience/alarm4.ogg')) log_admin("[key_name(usr)] has announced [key_name(current)]'s objectives") message_admins("[key_name_admin(usr)] has announced [key_name_admin(current)]'s objectives") @@ -1282,6 +1280,14 @@ else if(A.type == datum_type) return A +/datum/mind/proc/announce_objectives() + var/obj_count = 1 + to_chat(current, "Your current objectives:") + for(var/objective in objectives) + var/datum/objective/O = objective + to_chat(current, "Objective #[obj_count]: [O.explanation_text]") + obj_count++ + /datum/mind/proc/find_syndicate_uplink() var/list/L = current.get_contents() for(var/obj/item/I in L) @@ -1294,7 +1300,7 @@ if(H) qdel(H) -/datum/mind/proc/make_Tratior() +/datum/mind/proc/make_Traitor() if(!(src in ticker.mode.traitors)) ticker.mode.traitors += src special_role = SPECIAL_ROLE_TRAITOR @@ -1334,7 +1340,16 @@ ticker.mode.equip_syndicate(current) -/datum/mind/proc/make_Changling() +/datum/mind/proc/make_Vampire() + if(!(src in ticker.mode.vampires)) + ticker.mode.vampires += src + ticker.mode.grant_vampire_powers(current) + special_role = SPECIAL_ROLE_VAMPIRE + ticker.mode.forge_vampire_objectives(src) + ticker.mode.greet_vampire(src) + ticker.mode.update_change_icons_added(src) + +/datum/mind/proc/make_Changeling() if(!(src in ticker.mode.changelings)) ticker.mode.changelings += src ticker.mode.grant_changeling_powers(current) @@ -1363,42 +1378,6 @@ ticker.mode.greet_wizard(src) ticker.mode.update_wiz_icons_added(src) - -/datum/mind/proc/make_Cultist() - if(!(src in ticker.mode.cult)) - ticker.mode.cult += src - ticker.mode.update_cult_icons_added(src) - special_role = SPECIAL_ROLE_CULTIST - to_chat(current, "You catch a glimpse of the Realm of [ticker.cultdat.entity_name], [ticker.cultdat.entity_title2]. You now see how flimsy the world is, you see that it should be open to the knowledge of [ticker.cultdat.entity_name].") - to_chat(current, "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.") - var/datum/game_mode/cult/cult = ticker.mode - if(GAMEMODE_IS_CULT) - cult.memorize_cult_objectives(src) - else - var/explanation = "Summon [ticker.cultdat.entity_name] via the use of the appropriate rune. It will only work if nine cultists stand on and around it." - to_chat(current, "Objective #1: [explanation]") - current.memory += "Objective #1: [explanation]
" - - - var/mob/living/carbon/human/H = current - if(istype(H)) - var/obj/item/tome/T = new(H) - - var/list/slots = list ( - "backpack" = slot_in_backpack, - "left pocket" = slot_l_store, - "right pocket" = slot_r_store, - "left hand" = slot_l_hand, - "right hand" = slot_r_hand, - ) - var/where = H.equip_in_one_of_slots(T, slots) - if(!where) - else - to_chat(H, "A tome, a message from your new master, appears in your [where].") - - if(!ticker.mode.equip_cultist(current)) - to_chat(H, "Summoning an amulet from your Master failed.") - /datum/mind/proc/make_Rev() if(ticker.mode.head_revolutionaries.len>0) // copy targets @@ -1549,7 +1528,7 @@ ticker.mode.implanter[ref] = implanters ticker.mode.traitors += src special_role = "traitor" - to_chat(current, "You're now a loyal zealot of [missionary.name]! You now must lay down your life to protect them and assist in their goals at any cost.") + to_chat(current, "You're now a loyal zealot of [missionary.name]! You now must lay down your life to protect [missionary.p_them()] and assist in [missionary.p_their()] goals at any cost.") var/datum/objective/protect/mindslave/MS = new MS.owner = src MS.target = missionary.mind diff --git a/code/datums/outfits/outfit_admin.dm b/code/datums/outfits/outfit_admin.dm index 9e4bba0515c..b31084aee9f 100644 --- a/code/datums/outfits/outfit_admin.dm +++ b/code/datums/outfits/outfit_admin.dm @@ -1063,6 +1063,7 @@ /datum/outfit/admin/wizard + name = "Blue Wizard" uniform = /obj/item/clothing/under/color/lightpurple suit = /obj/item/clothing/suit/wizrobe back = /obj/item/storage/backpack @@ -1086,10 +1087,6 @@ if(istype(I)) apply_to_card(I, H, get_all_accesses(), "Wizard") -/datum/outfit/admin/wizard/blue - name = "Blue Wizard" - // the default wizard clothes are blue - /datum/outfit/admin/wizard/red name = "Red Wizard" diff --git a/code/datums/spell.dm b/code/datums/spell.dm index cc3b85bf94e..f251fed2951 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -115,7 +115,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin caster.reset_perspective(0) return 0 - if(is_admin_level(user.z) && (!centcom_cancast || ticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel + if(is_admin_level(user.z) && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel return 0 if(!skipcharge) @@ -171,10 +171,13 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin /obj/effect/proc_holder/spell/proc/invocation(mob/user = usr) //spelling the spell out and setting it on recharge/reducing charges amount switch(invocation_type) if("shout") - if(prob(50))//Auto-mute? Fuck that noise - user.say(invocation) + if(!user.IsVocal()) + user.emote("makes frantic gestures!") else - user.say(replacetext(invocation," ","`")) + if(prob(50))//Auto-mute? Fuck that noise + user.say(invocation) + else + user.say(replacetext(invocation," ","`")) if("whisper") if(prob(50)) user.whisper(invocation) @@ -418,7 +421,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.mob_spell_list)) return 0 - if(is_admin_level(user.z) && (!centcom_cancast || ticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel + if(is_admin_level(user.z) && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel return 0 switch(charge_type) diff --git a/code/datums/spells/emplosion.dm b/code/datums/spells/emplosion.dm index 1ba430ad27e..b2f0a228282 100644 --- a/code/datums/spells/emplosion.dm +++ b/code/datums/spells/emplosion.dm @@ -10,6 +10,6 @@ /obj/effect/proc_holder/spell/targeted/emplosion/cast(list/targets, mob/user = usr) for(var/mob/living/target in targets) - empulse(target.loc, emp_heavy, emp_light) + empulse(target.loc, emp_heavy, emp_light, 1) - return \ No newline at end of file + return diff --git a/code/datums/spells/mime.dm b/code/datums/spells/mime.dm index 296521405a0..19b30674bf6 100644 --- a/code/datums/spells/mime.dm +++ b/code/datums/spells/mime.dm @@ -21,7 +21,7 @@ if(!usr.mind.miming) to_chat(usr, "You must dedicate yourself to silence first.") return - invocation = "[usr.real_name] looks as if a wall is in front of them." + invocation = "[usr.real_name] looks as if a wall is in front of [usr.p_them()]." else invocation_type ="none" ..() diff --git a/code/datums/spells/mind_transfer.dm b/code/datums/spells/mind_transfer.dm index 2a8408dfe4a..d6a48d25c68 100644 --- a/code/datums/spells/mind_transfer.dm +++ b/code/datums/spells/mind_transfer.dm @@ -32,7 +32,7 @@ Also, you never added distance checking after target is selected. I've went ahea return if(!target.key || !target.mind) - to_chat(user, "They appear to be catatonic. Not even magic can affect their vacant mind.") + to_chat(user, "[target.p_they(TRUE)] appear[target.p_s()] to be catatonic. Not even magic can affect [target.p_their()] vacant mind.") return if(user.suiciding) diff --git a/code/datums/status_effects/neutral.dm b/code/datums/status_effects/neutral.dm index b82fc629eef..eaa14c4d0b0 100644 --- a/code/datums/status_effects/neutral.dm +++ b/code/datums/status_effects/neutral.dm @@ -2,8 +2,8 @@ /datum/status_effect/high_five id = "high_five" - duration = 25 + duration = 40 alert_type = null /datum/status_effect/high_five/on_timeout() - owner.visible_message("[owner] was left hanging....") \ No newline at end of file + owner.visible_message("[owner] was left hanging....") diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 750f7bfd70c..50f24eac58f 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -97,6 +97,7 @@ var/list/uplink_items = list() if(I) if(ishuman(user)) var/mob/living/carbon/human/A = user + log_game("[key_name(user)] purchased [I.name]") A.put_in_any_hand_if_possible(I) if(istype(I,/obj/item/storage/box/) && I.contents.len>0) @@ -128,6 +129,14 @@ var/list/uplink_items = list() cost = 5 job = list("Clown") +/datum/uplink_item/jobspecific/clownmagboots + name = "Clown Magboots" + desc = "A pair of modified clown shoes fitted with an advanced magnetic traction system. Look and sound exactly like regular clown shoes unless closely inspected." + reference = "CM" + item = /obj/item/clothing/shoes/magboots/clown + cost = 3 + job = list("Clown") + //mime /datum/uplink_item/jobspecific/caneshotgun name = "Cane Shotgun + Assassination Darts" @@ -394,6 +403,13 @@ var/list/uplink_items = list() gamemodes = list(/datum/game_mode/nuclear) surplus = 0 +/datum/uplink_item/dangerous/rapid + name = "Gloves of the North Star" + desc = "These gloves let the user punch people very fast. Does not improve weapon attack speed." + reference = "RPGD" + item = /obj/item/clothing/gloves/fingerless/rapid + cost = 8 + /datum/uplink_item/dangerous/sniper name = "Sniper Rifle" desc = "Ranged fury, Syndicate style. guaranteed to cause shock and awe or your TC back!" @@ -1336,13 +1352,6 @@ var/list/uplink_items = list() item = /obj/item/storage/fancy/cigarettes/cigpack_syndicate cost = 2 -/datum/uplink_item/badass/rapid - name = "Gloves of the North Star" - desc = "These gloves let the user punch people very fast. Does not improve weapon attack speed." - reference = "RPGD" - item = /obj/item/clothing/gloves/fingerless/rapid - cost = 8 - /datum/uplink_item/badass/bundle name = "Syndicate Bundle" desc = "Syndicate Bundles are specialised groups of items that arrive in a plain box. These items are collectively worth more than 20 telecrystals, but you do not know which specialisation you will receive." @@ -1425,6 +1434,7 @@ var/list/uplink_items = list() for(var/category in temp_uplink_list) buyable_items += temp_uplink_list[category] var/list/bought_items = list() + var/list/itemlog = list() U.uses -= cost U.used_TC = 20 var/remaining_TC = 50 @@ -1440,8 +1450,10 @@ var/list/uplink_items = list() continue bought_items += I.item remaining_TC -= I.cost + itemlog += I.name // To make the name more readable for the log compared to just i.item U.purchase_log += "[bicon(C)]" for(var/item in bought_items) new item(C) U.purchase_log += "[bicon(item)]" + log_game("[key_name(usr)] purchased a surplus crate with [jointext(itemlog, ", ")]") diff --git a/code/datums/weather/weather.dm b/code/datums/weather/weather.dm index 320cc137806..7ee152648c2 100644 --- a/code/datums/weather/weather.dm +++ b/code/datums/weather/weather.dm @@ -1,10 +1,5 @@ //The effects of weather occur across an entire z-level. For instance, lavaland has periodic ash storms that scorch most unprotected creatures. -#define STARTUP_STAGE 1 -#define MAIN_STAGE 2 -#define WIND_DOWN_STAGE 3 -#define END_STAGE 4 - /datum/weather var/name = "space wind" var/desc = "Heavy gusts of wind blanket the area, periodically knocking down anyone caught in the open." @@ -29,24 +24,25 @@ var/area_type = /area/space //Types of area to affect var/list/impacted_areas = list() //Areas to be affected by the weather, calculated when the weather begins - var/target_z = MAIN_STATION //The z-level to affect var/list/protected_areas = list()//Areas that are protected and excluded from the affected areas. + var/impacted_z_levels // The list of z-levels that this weather is actively affecting - var/overlay_layer = 10 //Since it's above everything else, this is the layer used by default. 2 is below mobs and walls if you need to use that. + var/overlay_layer = AREA_LAYER //Since it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that. var/aesthetic = FALSE //If the weather has no purpose other than looks var/immunity_type = "storm" //Used by mobs to prevent them from being affected by the weather var/stage = END_STAGE //The stage of the weather, from 1-4 - var/probability = FALSE //Percent chance to happen if there are other possible weathers on the z-level + // These are read by the weather subsystem and used to determine when and where to run the weather. + var/probability = 0 // Weight amongst other eligible weather. If zero, will never happen randomly. + var/target_trait = STATION_LEVEL // The z-level trait to affect when run randomly or when not overridden. -/datum/weather/New() + var/barometer_predictable = FALSE + var/next_hit_time = 0 //For barometers to know when the next storm will hit + +/datum/weather/New(z_levels) ..() - weather_master.existing_weather |= src - -/datum/weather/Destroy() - weather_master.existing_weather -= src - return ..() + impacted_z_levels = z_levels /datum/weather/proc/telegraph() if(stage == STARTUP_STAGE) @@ -59,17 +55,18 @@ affectareas -= get_areas(V) for(var/V in affectareas) var/area/A = V - if(is_on_level_name(A,target_z)) + if(A.z in impacted_z_levels) impacted_areas |= A weather_duration = rand(weather_duration_lower, weather_duration_upper) + START_PROCESSING(SSweather, src) update_areas() - for(var/V in player_list) - var/mob/M = V - if(is_on_level_name(M,target_z)) + for(var/M in player_list) + var/turf/mob_turf = get_turf(M) + if(mob_turf && (mob_turf.z in impacted_z_levels)) if(telegraph_message) to_chat(M, telegraph_message) if(telegraph_sound) - M << sound(telegraph_sound) + SEND_SOUND(M, sound(telegraph_sound)) addtimer(CALLBACK(src, .proc/start), telegraph_duration) /datum/weather/proc/start() @@ -77,14 +74,13 @@ return stage = MAIN_STAGE update_areas() - for(var/V in player_list) - var/mob/M = V - if(is_on_level_name(M,target_z)) + for(var/M in player_list) + var/turf/mob_turf = get_turf(M) + if(mob_turf && (mob_turf.z in impacted_z_levels)) if(weather_message) to_chat(M, weather_message) if(weather_sound) - M << sound(weather_sound) - weather_master.processing_weather |= src + SEND_SOUND(M, sound(weather_sound)) addtimer(CALLBACK(src, .proc/wind_down), weather_duration) /datum/weather/proc/wind_down() @@ -92,24 +88,25 @@ return stage = WIND_DOWN_STAGE update_areas() - for(var/V in player_list) - var/mob/M = V - if(is_on_level_name(M,target_z)) + for(var/M in player_list) + var/turf/mob_turf = get_turf(M) + if(mob_turf && (mob_turf.z in impacted_z_levels)) if(end_message) to_chat(M, end_message) if(end_sound) - M << sound(end_sound) - weather_master.processing_weather -= src + SEND_SOUND(M, sound(end_sound)) addtimer(CALLBACK(src, .proc/end), end_duration) /datum/weather/proc/end() if(stage == END_STAGE) - return + return 1 stage = END_STAGE + STOP_PROCESSING(SSweather, src) update_areas() -/datum/weather/proc/can_impact(mob/living/L) //Can this weather impact a mob? - if(!is_on_level_name(L,target_z)) +/datum/weather/proc/can_weather_act(mob/living/L) //Can this weather impact a mob? + var/turf/mob_turf = get_turf(L) + if(mob_turf && !(mob_turf.z in impacted_z_levels)) return if(immunity_type in L.weather_immunities) return @@ -117,7 +114,7 @@ return return 1 -/datum/weather/proc/impact(mob/living/L) //What effect does this weather have on the hapless mob? +/datum/weather/proc/weather_act(mob/living/L) //What effect does this weather have on the hapless mob? return /datum/weather/proc/update_areas() @@ -136,8 +133,8 @@ N.icon_state = end_overlay if(END_STAGE) N.color = null - N.icon_state = initial(N.icon_state) + N.icon_state = "" N.icon = 'icons/turf/areas.dmi' - N.layer = 10 //Just default back to normal area stuff since I assume setting a var is faster than initial + N.layer = AREA_LAYER //Just default back to normal area stuff since I assume setting a var is faster than initial N.invisibility = INVISIBILITY_MAXIMUM - N.opacity = 0 + N.set_opacity(FALSE) diff --git a/code/datums/weather/weather_types.dm b/code/datums/weather/weather_types.dm deleted file mode 100644 index 1581938bd96..00000000000 --- a/code/datums/weather/weather_types.dm +++ /dev/null @@ -1,118 +0,0 @@ -//Different types of weather. - -/datum/weather/floor_is_lava //The Floor is Lava: Makes all turfs damage anyone on them unless they're standing on a solid object. - name = "the floor is lava" - desc = "The ground turns into surprisingly cool lava, lightly damaging anything on the floor." - - telegraph_message = "Waves of heat emanate from the ground..." - telegraph_duration = 150 - - weather_message = "The floor is lava! Get on top of something!" - weather_duration_lower = 300 - weather_duration_upper = 600 - weather_overlay = "lava" - - end_message = "The ground cools and returns to its usual form." - end_duration = 0 - - area_type = /area - target_z = MAIN_STATION - - overlay_layer = 2 //Covers floors only - immunity_type = "lava" - -/datum/weather/floor_is_lava/impact(mob/living/L) - for(var/obj/structure/O in L.loc) - if(O.density) - return - if(L.loc.density) - return - if(!L.client) //Only sentient people are going along with it! - return - L.adjustFireLoss(3) - -/datum/weather/floor_is_lava/fake - name = "fake lava" - aesthetic = TRUE - -/datum/weather/advanced_darkness //Advanced Darkness: Restricts the vision of all affected mobs to a single tile in the cardinal directions. - name = "advanced darkness" - desc = "Everything in the area is effectively blinded, unable to see more than a foot or so around itself." - - telegraph_message = "The lights begin to dim... is the power going out?" - telegraph_duration = 150 - - weather_message = "This isn't your everyday darkness... this is advanced darkness!" - weather_duration_lower = 300 - weather_duration_upper = 300 - - end_message = "At last, the darkness recedes." - end_duration = 0 - - area_type = /area - target_z = MAIN_STATION - -/datum/weather/advanced_darkness/update_areas() - for(var/V in impacted_areas) - var/area/A = V - if(stage == MAIN_STAGE) - A.invisibility = 0 - A.opacity = 1 - A.layer = overlay_layer - A.icon = 'icons/effects/weather_effects.dmi' - A.icon_state = "darkness" - else - A.invisibility = INVISIBILITY_MAXIMUM - A.opacity = 0 - - -/datum/weather/ash_storm //Ash Storms: Common happenings on lavaland. Heavily obscures vision and deals heavy fire damage to anyone caught outside. - name = "ash storm" - desc = "An intense atmospheric storm lifts ash off of the planet's surface and billows it down across the area, dealing intense fire damage to the unprotected." - - telegraph_message = "An eerie moan rises on the wind. Sheets of burning ash blacken the horizon. Seek shelter." - telegraph_duration = 300 - telegraph_sound = 'sound/lavaland/ash_storm_windup.ogg' - telegraph_overlay = "light_ash" - - weather_message = "Smoldering clouds of scorching ash billow down around you! Get inside!" - weather_duration_lower = 600 - weather_duration_upper = 1500 - weather_sound = 'sound/lavaland/ash_storm_start.ogg' - weather_overlay = "ash_storm" - - end_message = "The shrieking wind whips away the last of the ash falls to its usual murmur. It should be safe to go outside now." - end_duration = 300 - end_sound = 'sound/lavaland/ash_storm_end.ogg' - end_overlay = "light_ash" - - area_type = /area/mine/dangerous - target_z = MINING - - immunity_type = "ash" - - probability = 90 - -/datum/weather/ash_storm/impact(mob/living/L) - if(istype(L.loc, /obj/mecha)) - return - if(ishuman(L)) - var/mob/living/carbon/human/H = L - var/thermal_protection = H.get_thermal_protection() - if(thermal_protection >= FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT) - return - L.adjustFireLoss(4) - -/datum/weather/ash_storm/emberfall //Emberfall: An ash storm passes by, resulting in harmless embers falling like snow. 10% to happen in place of an ash storm. - name = "emberfall" - desc = "A passing ash storm blankets the area in harmless embers." - - weather_message = "Gentle embers waft down around you like grotesque snow. The storm seems to have passed you by..." - weather_sound = 'sound/lavaland/ash_storm_windup.ogg' - weather_overlay = "light_ash" - - end_message = "The emberfall slows, stops. Another layer of hardened soot to the basalt beneath your feet." - - aesthetic = TRUE - - probability = 10 diff --git a/code/datums/weather/weather_types/ash_storm.dm b/code/datums/weather/weather_types/ash_storm.dm new file mode 100644 index 00000000000..3f4c57c4196 --- /dev/null +++ b/code/datums/weather/weather_types/ash_storm.dm @@ -0,0 +1,108 @@ +//Ash storms happen frequently on lavaland. They heavily obscure vision, and cause high fire damage to anyone caught outside. +/datum/weather/ash_storm + name = "ash storm" + desc = "An intense atmospheric storm lifts ash off of the planet's surface and billows it down across the area, dealing intense fire damage to the unprotected." + + telegraph_message = "An eerie moan rises on the wind. Sheets of burning ash blacken the horizon. Seek shelter." + telegraph_duration = 300 + telegraph_overlay = "light_ash" + + weather_message = "Smoldering clouds of scorching ash billow down around you! Get inside!" + weather_duration_lower = 600 + weather_duration_upper = 1200 + weather_overlay = "ash_storm" + + end_message = "The shrieking wind whips away the last of the ash and falls to its usual murmur. It should be safe to go outside now." + end_duration = 300 + end_overlay = "light_ash" + + area_type = /area/mine/dangerous // /area/lavaland/surface/outdoors + target_trait = ORE_LEVEL + + immunity_type = "ash" + +// probability = 90 + + barometer_predictable = TRUE + + var/datum/looping_sound/active_outside_ashstorm/sound_ao = new(list(), FALSE, TRUE) + var/datum/looping_sound/active_inside_ashstorm/sound_ai = new(list(), FALSE, TRUE) + var/datum/looping_sound/weak_outside_ashstorm/sound_wo = new(list(), FALSE, TRUE) + var/datum/looping_sound/weak_inside_ashstorm/sound_wi = new(list(), FALSE, TRUE) + +/datum/weather/ash_storm/telegraph() + . = ..() + var/list/inside_areas = list() + var/list/outside_areas = list() + var/list/eligible_areas = list() + for(var/z in impacted_z_levels) + eligible_areas += space_manager.areas_in_z["[z]"] + for(var/i in 1 to eligible_areas.len) + var/area/place = eligible_areas[i] + if(place.outdoors) + outside_areas += place + else + inside_areas += place + CHECK_TICK + + sound_ao.output_atoms = outside_areas + sound_ai.output_atoms = inside_areas + sound_wo.output_atoms = outside_areas + sound_wi.output_atoms = inside_areas + + sound_wo.start() + sound_wi.start() + +/datum/weather/ash_storm/start() + . = ..() + sound_wo.stop() + sound_wi.stop() + + sound_ao.start() + sound_ai.start() + +/datum/weather/ash_storm/wind_down() + . = ..() + sound_ao.stop() + sound_ai.stop() + + sound_wo.start() + sound_wi.start() + +/datum/weather/ash_storm/end() + . = ..() + sound_wo.stop() + sound_wi.stop() + +/datum/weather/ash_storm/proc/is_ash_immune(atom/L) + while(L && !isturf(L)) + if(ismecha(L)) //Mechs are immune + return TRUE + if(ishuman(L)) //Are you immune? + var/mob/living/carbon/human/H = L + var/thermal_protection = H.get_thermal_protection() + if(thermal_protection >= FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT) + return TRUE + L = L.loc //Matryoshka check + return FALSE //RIP you + +/datum/weather/ash_storm/weather_act(mob/living/L) + if(is_ash_immune(L)) + return + L.adjustFireLoss(4) + + +//Emberfalls are the result of an ash storm passing by close to the playable area of lavaland. They have a 10% chance to trigger in place of an ash storm. +/datum/weather/ash_storm/emberfall + name = "emberfall" + desc = "A passing ash storm blankets the area in harmless embers." + + weather_message = "Gentle embers waft down around you like grotesque snow. The storm seems to have passed you by..." + weather_overlay = "light_ash" + + end_message = "The emberfall slows, stops. Another layer of hardened soot to the basalt beneath your feet." + end_sound = null + + aesthetic = TRUE + +// probability = 10 \ No newline at end of file diff --git a/code/datums/weather/weather_types/floor_is_lava.dm b/code/datums/weather/weather_types/floor_is_lava.dm new file mode 100644 index 00000000000..fe7391ec9f0 --- /dev/null +++ b/code/datums/weather/weather_types/floor_is_lava.dm @@ -0,0 +1,39 @@ +//Causes fire damage to anyone not standing on a dense object. +/datum/weather/floor_is_lava + name = "the floor is lava" + desc = "The ground turns into surprisingly cool lava, lightly damaging anything on the floor." + + telegraph_message = "You feel the ground beneath you getting hot. Waves of heat distort the air." + telegraph_duration = 150 + + weather_message = "The floor is lava! Get on top of something!" + weather_duration_lower = 300 + weather_duration_upper = 600 + weather_overlay = "lava" + + end_message = "The ground cools and returns to its usual form." + end_duration = 0 + + area_type = /area + protected_areas = list(/area/space) + target_trait = STATION_LEVEL + + overlay_layer = ABOVE_OPEN_TURF_LAYER //Covers floors only + immunity_type = "lava" + + +/datum/weather/floor_is_lava/weather_act(mob/living/L) + if(issilicon(L)) + return + for(var/obj/structure/O in L.loc) + if(O.density || O.buckled_mob && istype(O, /obj/structure/stool/bed)) + return + if(L.loc.density) + return + if(!L.client) //Only sentient people are going along with it! + return + L.adjustFireLoss(3) + +/datum/weather/floor_is_lava/fake + name = "the floor is lava (fake)" + aesthetic = TRUE \ No newline at end of file diff --git a/code/datums/weather/weather_types/radiation_storm.dm b/code/datums/weather/weather_types/radiation_storm.dm new file mode 100644 index 00000000000..acd155e7560 --- /dev/null +++ b/code/datums/weather/weather_types/radiation_storm.dm @@ -0,0 +1,61 @@ +//Radiation storms occur when the station passes through an irradiated area, and irradiate anyone not standing in protected areas (maintenance, emergency storage, etc.) +/datum/weather/rad_storm + name = "radiation storm" + desc = "A cloud of intense radiation passes through the area dealing rad damage to those who are unprotected." + + telegraph_duration = 400 + telegraph_message = "The air begins to grow warm." + + weather_message = "You feel waves of heat wash over you! Find shelter!" + weather_overlay = "ash_storm" + weather_duration_lower = 600 + weather_duration_upper = 1500 + weather_color = "green" + weather_sound = 'sound/misc/bloblarm.ogg' + + end_duration = 100 + end_message = "The air seems to be cooling off again." + + area_type = /area + protected_areas = list(/area/maintenance, /area/turret_protected/ai_upload, /area/turret_protected/ai_upload_foyer, + /area/turret_protected/ai, /area/storage/emergency, /area/storage/emergency2, /area/crew_quarters/sleep, /area/security/brig, /area/shuttle) + target_trait = STATION_LEVEL + + immunity_type = "rad" + +/datum/weather/rad_storm/telegraph() + ..() + status_alarm(TRUE) + make_maint_all_access() + + +/datum/weather/rad_storm/weather_act(mob/living/L) + var/resist = L.getarmor(null, "rad") + if(prob(40)) + if(ishuman(L)) + var/mob/living/carbon/human/H = L + if(!(RADIMMUNE in H.species.species_traits)) + if(prob(max(0, 100 - resist))) + randmuti(H) // Applies bad mutation + if(prob(50)) + if(prob(90)) + randmutb(H) + else + randmutg(H) + domutcheck(H, null, 1) + + L.apply_effect(20, IRRADIATE, resist) + +/datum/weather/rad_storm/end() + if(..()) + return + priority_announcement.Announce("The radiation threat has passed. Please return to your workplaces.", "Anomaly Alert") + status_alarm(FALSE) + revoke_maint_all_access() + +/datum/weather/rad_storm/proc/status_alarm(active) //Makes the status displays show the radiation warning for those who missed the announcement. + if(active) + post_status("alert", "radiation") + else + post_status("blank") + post_status("shuttle") \ No newline at end of file diff --git a/code/datums/weather/weather_types/snow_storm.dm b/code/datums/weather/weather_types/snow_storm.dm new file mode 100644 index 00000000000..4e4d5aab59d --- /dev/null +++ b/code/datums/weather/weather_types/snow_storm.dm @@ -0,0 +1,28 @@ +/datum/weather/snow_storm + name = "snow storm" + desc = "Harsh snowstorms roam the topside of this arctic planet, burying any area unfortunate enough to be in its path." +// probability = 90 + + telegraph_message = "Drifting particles of snow begin to dust the surrounding area.." + telegraph_duration = 300 + telegraph_overlay = "light_snow" + + weather_message = "Harsh winds pick up as dense snow begins to fall from the sky! Seek shelter!" + weather_overlay = "snow_storm" + weather_duration_lower = 600 + weather_duration_upper = 1500 + + end_duration = 100 + end_message = "The snowfall dies down, it should be safe to go outside again." + +// area_type = /area/awaymission/snowdin/outside + target_trait = AWAY_LEVEL + + immunity_type = "snow" + + barometer_predictable = TRUE + + +/datum/weather/snow_storm/weather_act(mob/living/L) + L.adjust_bodytemperature(-rand(5, 15)) + diff --git a/code/datums/wires/vending.dm b/code/datums/wires/vending.dm index 286ac454efc..054a7e4f669 100644 --- a/code/datums/wires/vending.dm +++ b/code/datums/wires/vending.dm @@ -1,5 +1,3 @@ -#define CAT_HIDDEN 2 // Also in code/game/machinery/vending.dm - /datum/wires/vending holder_type = /obj/machinery/vending wire_count = 4 diff --git a/code/defines/procs/admin.dm b/code/defines/procs/admin.dm index 0f2a2bd4393..cdf25ce9651 100644 --- a/code/defines/procs/admin.dm +++ b/code/defines/procs/admin.dm @@ -76,6 +76,10 @@ var/message = "[key_name(whom, 1)] [isLivingSSD(whom) ? "(SSD!)" : ""] ([admin_jump_link(whom)])" return message +/proc/key_name_log(whom) + // Key_name_admin, but does not include (?) or jump link - For logging purpose to reduce clutter while figuring out who is SSD and/or antag when being attacked. Also remove formatting since it is not displayed + var/message = "[key_name(whom, 0)][isAntag(whom) ? "(ANTAG)" : ""][isLivingSSD(whom) ? "(SSD!)": ""]" + return message /proc/log_and_message_admins(var/message as text) log_admin("[key_name(usr)] " + message) diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 90b45a19170..e331376a0dc 100644 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -20,13 +20,12 @@ NOTE: there are two lists of areas in the end of this file: centcom and station var/atmosalm = ATMOS_ALARM_NONE var/poweralm = 1 var/party = null - var/radalert = 0 var/report_alerts = 1 // Should atmos alerts notify the AI/computers level = null name = "Space" icon = 'icons/turf/areas.dmi' icon_state = "unknown" - layer = 10 + layer = AREA_LAYER luminosity = 0 mouse_opacity = 0 invisibility = INVISIBILITY_LIGHTING @@ -141,9 +140,6 @@ var/list/ghostteleportlocs = list() /area/space/readyalert() return -/area/space/radiation_alert() - return - /area/space/partyalert() return diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 8a9a108c7b3..44a9ae7e522 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -22,7 +22,7 @@ ..() icon_state = "" - layer = 10 + layer = AREA_LAYER uid = ++global_uid all_areas += src map_name = name // Save the initial (the name set in the map) name of the area. @@ -45,7 +45,24 @@ blend_mode = BLEND_MULTIPLY // Putting this in the constructor so that it stops the icons being screwed up in the map editor. /area/Initialize() - ..() + . = ..() + + if(contents.len) + var/list/areas_in_z = space_manager.areas_in_z + var/z + for(var/i in 1 to contents.len) + var/atom/thing = contents[i] + if(!thing) + continue + z = thing.z + break + if(!z) + WARNING("No z found for [src]") + return + if(!areas_in_z["[z]"]) + areas_in_z["[z]"] = list() + areas_in_z["[z]"] += src + return INITIALIZE_HINT_LATELOAD /area/LateInitialize() @@ -160,16 +177,6 @@ eject = 0 updateicon() -/area/proc/radiation_alert() - if(!radalert) - radalert = 1 - updateicon() - -/area/proc/reset_radiation_alert() - if(radalert) - radalert = 0 - updateicon() - /area/proc/partyalert() if(!party) party = 1 @@ -183,11 +190,8 @@ updateicon() /area/proc/updateicon() - if(radalert) // always show the radiation alert, regardless of power - icon_state = "radiation" - invisibility = INVISIBILITY_LIGHTING - else if((fire || eject || party) && (!requires_power||power_environ))//If it doesn't require power, can still activate this proc. - if(fire && !radalert && !eject && !party) + if((fire || eject || party) && (!requires_power||power_environ))//If it doesn't require power, can still activate this proc. + if(fire && !eject && !party) icon_state = "red" else if(!fire && eject && !party) icon_state = "red" @@ -197,9 +201,15 @@ icon_state = "blue-red" invisibility = INVISIBILITY_LIGHTING else - // new lighting behaviour with obj lights - icon_state = null - invisibility = INVISIBILITY_MAXIMUM + var/weather_icon + for(var/V in SSweather.processing) + var/datum/weather/W = V + if(W.stage != END_STAGE && (src in W.impacted_areas)) + W.update_areas() + weather_icon = TRUE + if(!weather_icon) + icon_state = null + invisibility = INVISIBILITY_MAXIMUM /area/space/updateicon() icon_state = null @@ -384,4 +394,4 @@ for(var/obj/machinery/door/airlock/temp_airlock in src) temp_airlock.prison_open() for(var/obj/machinery/door/window/temp_windoor in src) - temp_windoor.open() + temp_windoor.open() \ No newline at end of file diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 19af319aa20..136c8950028 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -143,6 +143,12 @@ /atom/proc/setDir(newdir) dir = newdir +/atom/proc/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) + if(does_attack_animation) + user.changeNext_move(CLICK_CD_MELEE) + add_attack_logs(user, src, "Punched with hulk powers") + user.do_attack_animation(src, ATTACK_EFFECT_SMASH) + /atom/proc/CheckParts(list/parts_list) for(var/A in parts_list) if(istype(A, /datum/reagent)) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 99355320491..93d9977b5e8 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -192,7 +192,7 @@ return for(var/mob/living/carbon/slime/M in range(1,L)) if(M.Victim == L) - to_chat(usr, "[L.name] will not fit into the [src] because they have a slime latched onto their head.") + to_chat(usr, "[L.name] will not fit into the [src] because [L.p_they()] [L.p_have()] a slime latched onto [L.p_their()] head.") return if(L == user) visible_message("[user] climbs into the [src].") diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index 6fbc30883ca..37292beb8fe 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -179,8 +179,7 @@ C.ExtinguishMob() C.visible_message("[user] sprays a cloud of fine ice crystals, engulfing [C]!") - log_attack(user, C, "Used cryokinesis on a victim without internals or a suit") - msg_admin_attack("[key_name_admin(user)] has cast cryokinesis on [key_name_admin(C)] (NO SUIT)") + add_attack_logs(user, C, "Cryokinesis- NO SUIT/INTERNALS") //playsound(user.loc, 'bamf.ogg', 50, 0) @@ -318,14 +317,6 @@ var/atom/movable/the_item = targets[1] if(ishuman(the_item)) - //My gender - var/m_his = "his" - if(user.gender == FEMALE) - m_his = "her" - // Their gender - var/t_his = "his" - if(the_item.gender == FEMALE) - t_his = "her" var/mob/living/carbon/human/H = the_item var/obj/item/organ/external/limb = H.get_organ(user.zone_sel.selecting) if(!istype(limb)) @@ -334,15 +325,15 @@ return 0 if(istype(limb,/obj/item/organ/external/head)) // Bullshit, but prevents being unable to clone someone. - to_chat(user, "You try to put \the [limb] in your mouth, but [t_his] ears tickle your throat!") + to_chat(user, "You try to put \the [limb] in your mouth, but [the_item.p_their()] ears tickle your throat!") revert_cast() return 0 if(istype(limb,/obj/item/organ/external/chest)) // Bullshit, but prevents being able to instagib someone. - to_chat(user, "You try to put their [limb] in your mouth, but it's too big to fit!") + to_chat(user, "You try to put [the_item.p_their()] [limb] in your mouth, but it's too big to fit!") revert_cast() return 0 - user.visible_message("[user] begins stuffing [the_item]'s [limb.name] into [m_his] gaping maw!") + user.visible_message("[user] begins stuffing [the_item]'s [limb.name] into [user.p_their()] gaping maw!") var/oldloc = H.loc if(!do_mob(user,H,EAT_MOB_DELAY)) to_chat(user, "You were interrupted before you could eat [the_item]!") @@ -434,7 +425,7 @@ user.flying = prevFlying if(FAT in user.mutations && prob(66)) - user.visible_message("[user.name] crashes due to their heavy weight!") + user.visible_message("[user.name] crashes due to [user.p_their()] heavy weight!") //playsound(user.loc, 'zhit.wav', 50, 1) user.AdjustWeakened(10) user.AdjustStunned(5) @@ -559,10 +550,10 @@ return if(M.stat == 2) - to_chat(user, "[M.name] is dead and cannot have their mind read.") + to_chat(user, "[M.name] is dead and cannot have [M.p_their()] mind read.") return if(M.health < 0) - to_chat(user, "[M.name] is dying, and their thoughts are too scrambled to read.") + to_chat(user, "[M.name] is dying, and [M.p_their()] thoughts are too scrambled to read.") return to_chat(user, "Mind Reading of [M.name]:") @@ -570,8 +561,8 @@ var/pain_condition = M.health / M.maxHealth // lower health means more pain var/list/randomthoughts = list("what to have for lunch","the future","the past","money", - "their hair","what to do next","their job","space","amusing things","sad things", - "annoying things","happy things","something incoherent","something they did wrong") + "[M.p_their()] hair","what to do next","[M.p_their()] job","space","amusing things","sad things", + "annoying things","happy things","something incoherent","something [M.p_they()] did wrong") var/thoughts = "thinking about [pick(randomthoughts)]" if(M.fire_stacks) @@ -592,7 +583,7 @@ to_chat(user, "Condition: [M.name] is suffering severe pain.") else to_chat(user, "Condition: [M.name] is suffering excruciating pain.") - thoughts = "haunted by their own mortality" + thoughts = "haunted by [M.p_their()] own mortality" switch(M.a_intent) if(INTENT_HELP) @@ -655,7 +646,7 @@ action_icon_state = "superfart" /obj/effect/proc_holder/spell/aoe_turf/superfart/invocation(mob/user = usr) - invocation = "[user] hunches down and grits their teeth!" + invocation = "[user] hunches down and grits [user.p_their()] teeth!" invocation_emote_self = "You hunch down and grit your teeth!" ..(user) diff --git a/code/game/dna/genes/vg_powers.dm b/code/game/dna/genes/vg_powers.dm index bfd75f486e0..3e709560a45 100644 --- a/code/game/dna/genes/vg_powers.dm +++ b/code/game/dna/genes/vg_powers.dm @@ -173,7 +173,7 @@ M.update_dna() - M.visible_message("[src] morphs and changes [M.get_visible_gender() == MALE ? "his" : M.get_visible_gender() == FEMALE ? "her" : "their"] appearance!", "You change your appearance!", "Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!") + M.visible_message("[src] morphs and changes [p_their()] appearance!", "You change your appearance!", "Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!") /datum/dna/gene/basic/grant_spell/remotetalk name="Telepathy" diff --git a/code/game/gamemodes/autotraitor/autotraitor.dm b/code/game/gamemodes/autotraitor/autotraitor.dm index 93fe05ffa10..eb32bed006d 100644 --- a/code/game/gamemodes/autotraitor/autotraitor.dm +++ b/code/game/gamemodes/autotraitor/autotraitor.dm @@ -191,7 +191,7 @@ //message_admins("The probability of a new traitor is [traitor_prob]%") if(prob(traitor_prob)) message_admins("New traitor roll passed. Making a new Traitor.") - character.mind.make_Tratior() //TEMP: Add proper checks for loyalty here. uc_guy + character.mind.make_Traitor() //TEMP: Add proper checks for loyalty here. uc_guy //else //message_admins("New traitor roll failed. No new traitor.") //else diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index 0bcd942b7a0..80bba117a20 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -119,7 +119,7 @@ var/list/blob_nodes = list() if(!is_station_level(location.z) || istype(location, /turf/space)) if(!warned) to_chat(C, "You feel ready to burst, but this isn't an appropriate place! You must return to the station!") - message_admins("[key_name_admin(C)] was in space when the blobs burst, and will die if he doesn't return to the station.") + message_admins("[key_name_admin(C)] was in space when the blobs burst, and will die if [C.p_they()] [C.p_do()] not return to the station.") spawn(300) burst_blob(blob, 1) else diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index e53a74c8daa..15a3b2e222f 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -147,6 +147,9 @@ ..() take_damage(power/400, BURN) +/obj/structure/blob/hulk_damage() + return 15 + /obj/structure/blob/attackby(var/obj/item/W, var/mob/living/user, params) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index a9c5882094d..329408bffce 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -113,7 +113,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" identity_theft.target_real_name = kill_objective.target.current.real_name //Whoops, forgot this. var/mob/living/carbon/human/H = identity_theft.target.current if(can_absorb_species(H.species)) // For species that can't be absorbed - should default to an escape objective - identity_theft.explanation_text = "Escape on the shuttle or an escape pod with the identity of [identity_theft.target_real_name], the [identity_theft.target.assigned_role] while wearing their identification card." + identity_theft.explanation_text = "Escape on the shuttle or an escape pod with the identity of [identity_theft.target_real_name], the [identity_theft.target.assigned_role] while wearing [identity_theft.target.p_their()] identification card." changeling.objectives += identity_theft else qdel(identity_theft) diff --git a/code/game/gamemodes/changeling/evolution_menu.dm b/code/game/gamemodes/changeling/evolution_menu.dm index d690f095236..a7af2b94482 100644 --- a/code/game/gamemodes/changeling/evolution_menu.dm +++ b/code/game/gamemodes/changeling/evolution_menu.dm @@ -20,7 +20,7 @@ var/list/sting_paths /obj/effect/proc_holder/changeling/evolution_menu/proc/create_menu(var/datum/changeling/changeling) var/dat - dat +="Changling Evolution Menu" + dat +="Changeling Evolution Menu" //javascript, the part that does most of the work~ dat += {" diff --git a/code/game/gamemodes/changeling/powers/absorb.dm b/code/game/gamemodes/changeling/powers/absorb.dm index e9ae34d2cfa..b60cfee4718 100644 --- a/code/game/gamemodes/changeling/powers/absorb.dm +++ b/code/game/gamemodes/changeling/powers/absorb.dm @@ -73,8 +73,8 @@ recent_speech = target.say_log.Copy() if(recent_speech.len) - user.mind.store_memory("Some of [target]'s speech patterns, we should study these to better impersonate them!") - to_chat(user, "Some of [target]'s speech patterns, we should study these to better impersonate them!") + user.mind.store_memory("Some of [target]'s speech patterns. We should study these to better impersonate [target.p_them()]!") + to_chat(user, "Some of [target]'s speech patterns. We should study these to better impersonate [target.p_them()]!") for(var/spoken_memory in recent_speech) user.mind.store_memory("\"[spoken_memory]\"") to_chat(user, "\"[spoken_memory]\"") diff --git a/code/game/gamemodes/changeling/powers/biodegrade.dm b/code/game/gamemodes/changeling/powers/biodegrade.dm index 3103416b9e4..5142734183b 100644 --- a/code/game/gamemodes/changeling/powers/biodegrade.dm +++ b/code/game/gamemodes/changeling/powers/biodegrade.dm @@ -16,7 +16,7 @@ var/obj/O = user.get_item_by_slot(slot_handcuffed) if(!istype(O)) return FALSE - user.visible_message("[user] vomits a glob of acid on \his [O]!", \ + user.visible_message("[user] vomits a glob of acid on [user.p_their()] [O.name]!", \ "We vomit acidic ooze onto our restraints!") addtimer(CALLBACK(src, .proc/dissolve_handcuffs, user, O), 30) used = TRUE @@ -25,7 +25,7 @@ var/obj/item/clothing/suit/S = user.get_item_by_slot(slot_wear_suit) if(!istype(S)) return FALSE - user.visible_message("[user] vomits a glob of acid across the front of \his [S]!", \ + user.visible_message("[user] vomits a glob of acid across the front of [user.p_their()] [S.name]!", \ "We vomit acidic ooze onto our straight jacket!") addtimer(CALLBACK(src, .proc/dissolve_straightjacket, user, S), 30) used = TRUE diff --git a/code/game/gamemodes/changeling/powers/linglink.dm b/code/game/gamemodes/changeling/powers/linglink.dm index 4b59c255128..52de921d7ec 100644 --- a/code/game/gamemodes/changeling/powers/linglink.dm +++ b/code/game/gamemodes/changeling/powers/linglink.dm @@ -47,7 +47,7 @@ to_chat(user, "We stealthily stab [target] with a minor proboscis...") to_chat(target, "You experience a stabbing sensation and your ears begin to ring...") if(3) - to_chat(user, "You mold the [target]'s mind like clay, they can now speak in the hivemind!") + to_chat(user, "You mold the [target]'s mind like clay, [target.p_they()] can now speak in the hivemind!") to_chat(target, "A migraine throbs behind your eyes, you hear yourself screaming - but your mouth has not opened!") for(var/mob/M in mob_list) if(all_languages["Changeling"] in M.languages) diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm index 8f0aa4d210f..4cf998cf043 100644 --- a/code/game/gamemodes/changeling/powers/mutations.dm +++ b/code/game/gamemodes/changeling/powers/mutations.dm @@ -25,13 +25,13 @@ if(istype(user.l_hand, weapon_type)) //Not the nicest way to do it, but eh qdel(user.l_hand) if(!silent) - user.visible_message("With a sickening crunch, [user] reforms his [weapon_name_simple] into an arm!", "We assimilate the [weapon_name_simple] back into our body.", "With a sickening crunch, [user] reforms [user.p_their()] [weapon_name_simple] into an arm!", "We assimilate the [weapon_name_simple] back into our body.", "With a sickening crunch, [user] reforms his [weapon_name_simple] into an arm!", "We assimilate the [weapon_name_simple] back into our body.", "With a sickening crunch, [user] reforms [user.p_their()] [weapon_name_simple] into an arm!", "We assimilate the [weapon_name_simple] back into our body.", "[H] casts off their [suit_name_simple]!", "We cast off our [suit_name_simple][genetic_damage > 0 ? ", temporarily weakening our genomes." : "."]", "You hear the organic matter ripping and tearing!") + H.visible_message("[H] casts off [H.p_their()] [suit_name_simple]!", "We cast off our [suit_name_simple][genetic_damage > 0 ? ", temporarily weakening our genomes." : "."]", "You hear the organic matter ripping and tearing!") qdel(H.wear_suit) qdel(H.head) H.update_inv_wear_suit() @@ -138,7 +138,7 @@ loc.visible_message("A grotesque blade forms around [loc.name]\'s arm!", "Our arm twists and mutates, transforming it into a deadly blade.", "You hear organic matter ripping and tearing!") /obj/item/melee/arm_blade/dropped(mob/user) - user.visible_message("With a sickening crunch, [user] reforms his blade into an arm!", "We assimilate the blade back into our body.", "With a sickening crunch, [user] reforms [user.p_their()] blade into an arm!", "We assimilate the blade back into our body.", "[user] forces the airlock to open with \his [src]!", "We force the airlock to open.", "You hear a metal screeching sound.") + user.visible_message("[user] forces the airlock to open with [user.p_their()] [name]!", "We force the airlock to open.", "You hear a metal screeching sound.") A.open(2) /***************************************\ @@ -219,7 +219,7 @@ to_chat(user, "The [name] is not ready yet.") /obj/item/gun/magic/tentacle/suicide_act(mob/user) - user.visible_message("[user] coils [src] tightly around \his neck! It looks like \he's trying to commit suicide.") + user.visible_message("[user] coils [src] tightly around [user.p_their()] neck! It looks like [user.p_theyre()] trying to commit suicide.") return (OXYLOSS) /obj/item/ammo_casing/magic/tentacle @@ -386,7 +386,7 @@ if(remaining_uses < 1) if(ishuman(loc)) var/mob/living/carbon/human/H = loc - H.visible_message("With a sickening crunch, [H] reforms his shield into an arm!", "We assimilate our shield into our body", "With a sickening crunch, [H] reforms [H.p_their()] shield into an arm!", "We assimilate our shield into our body", "[loc.name]\'s flesh rapidly inflates, forming a bloated mass around their body!", "We inflate our flesh, creating a spaceproof suit!", "You hear organic matter ripping and tearing!") + loc.visible_message("[loc.name]\'s flesh rapidly inflates, forming a bloated mass around [loc.p_their()] body!", "We inflate our flesh, creating a spaceproof suit!", "You hear organic matter ripping and tearing!") processing_objects += src /obj/item/clothing/suit/space/changeling/process() @@ -485,4 +485,4 @@ icon_state = "lingarmorhelmet" flags = BLOCKHAIR | NODROP | DROPDEL armor = list(melee = 30, bullet = 30, laser = 40, energy = 20, bomb = 10, bio = 4, rad = 0) - flags_inv = HIDEEARS \ No newline at end of file + flags_inv = HIDEEARS diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm index 23efc38b403..b3881ee54fb 100644 --- a/code/game/gamemodes/changeling/powers/revive.dm +++ b/code/game/gamemodes/changeling/powers/revive.dm @@ -24,13 +24,13 @@ user.CureNearsighted() user.reagents.clear_reagents() user.germ_level = 0 - user.next_pain_time = 0 user.timeofdeath = 0 if(ishuman(user)) var/mob/living/carbon/human/H = user H.restore_blood() H.traumatic_shock = 0 H.shock_stage = 0 + H.next_pain_time = 0 H.species.create_organs(H) // Now that recreating all organs is necessary, the rest of this organ stuff probably // isn't, but I don't want to remove it, just in case. diff --git a/code/game/gamemodes/changeling/powers/swap_form.dm b/code/game/gamemodes/changeling/powers/swap_form.dm index 99eb634a2ff..9015677c70e 100644 --- a/code/game/gamemodes/changeling/powers/swap_form.dm +++ b/code/game/gamemodes/changeling/powers/swap_form.dm @@ -36,7 +36,7 @@ to_chat(user, "The body swap has been interrupted!") return - to_chat(target, "[user] tightens their grip as a painful sensation invades your body.") + to_chat(target, "[user] tightens [user.p_their()] grip as a painful sensation invades your body.") changeling.absorbed_dna -= changeling.find_dna(user.dna) changeling.protected_dna -= changeling.find_dna(user.dna) diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index b12a50bce13..f2e8db26b40 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -203,7 +203,7 @@ var/global/list/all_cults = list() update_cult_icons_removed(cult_mind) if(show_message) for(var/mob/M in viewers(cult_mind.current)) - to_chat(M, "[cult_mind.current] looks like they just reverted to their old faith!") + to_chat(M, "[cult_mind.current] looks like [cult_mind.current.p_they()] just reverted to [cult_mind.current.p_their()] old faith!") /datum/game_mode/proc/update_cult_icons_added(datum/mind/cult_mind) diff --git a/code/game/gamemodes/cult/cult_objectives.dm b/code/game/gamemodes/cult/cult_objectives.dm index 5ddc8ccdf98..34955ed42d4 100644 --- a/code/game/gamemodes/cult/cult_objectives.dm +++ b/code/game/gamemodes/cult/cult_objectives.dm @@ -24,7 +24,7 @@ spilltarget = 100 + rand(0,player_list.len * 3) explanation = "We must prepare this place for [ticker.cultdat.entity_title1]'s coming. Spill blood and gibs over [spilltarget] floor tiles." if("sacrifice") - explanation = "We need to sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role], for their blood is the key that will lead our master to this realm. You will need 3 cultists around a Sacrifice rune to perform the ritual." + explanation = "We need to sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role], for [sacrifice_target.p_their()] blood is the key that will lead our master to this realm. You will need 3 cultists around a Sacrifice rune to perform the ritual." for(var/datum/mind/cult_mind in cult) to_chat(cult_mind.current, "Objective #[current_objective]: [explanation]") @@ -81,7 +81,7 @@ spilltarget = 100 + rand(0,player_list.len * 3) explanation = "We must prepare this place for [ticker.cultdat.entity_title1]'s coming. Spread blood and gibs over [spilltarget] of the Station's floor tiles." if("sacrifice") - explanation = "We need to sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role], for their blood is the key that will lead our master to this realm. You will need 3 cultists around a Sacrifice rune to perform the ritual." + explanation = "We need to sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role], for [sacrifice_target.p_their()] blood is the key that will lead our master to this realm. You will need 3 cultists around a Sacrifice rune to perform the ritual." for(var/datum/mind/cult_mind in cult) if(cult_mind) diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index d8d7d03b6c4..84941f4d7a7 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -161,7 +161,7 @@ var/obj/item/organ/external/head/head = C.get_organ("head") if(head) C.apply_damage(30, BURN, "head") //30 fire damage because it's FUCKING LAVA - head.disfigure("burn") //Your face is unrecognizable because it's FUCKING LAVA + head.disfigure() //Your face is unrecognizable because it's FUCKING LAVA return 1 else ..() diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 19f9f57e9e7..a16cf76d9f1 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -294,7 +294,7 @@ var/mob/living/carbon/human/H = user var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot") var/obj/item/organ/external/affecting = H.get_organ(ran_zone(dam_zone)) - user.visible_message("[user] cuts open their [affecting] and begins writing in their own blood!", "You slice open your [affecting] and begin drawing a sigil of [ticker.cultdat.entity_title3].") + user.visible_message("[user] cuts open [user.p_their()] [affecting] and begins writing in [user.p_their()] own blood!", "You slice open your [affecting] and begin drawing a sigil of [ticker.cultdat.entity_title3].") user.apply_damage(initial(rune_to_scribe.scribe_damage), BRUTE , affecting) if(!do_after(user, initial(rune_to_scribe.scribe_delay)-scribereduct, target = get_turf(user))) for(var/V in shields) @@ -305,7 +305,7 @@ if(locate(/obj/effect/rune) in runeturf) to_chat(user, "There is already a rune here.") return - user.visible_message("[user] creates a strange circle in their own blood.", \ + user.visible_message("[user] creates a strange circle in [user.p_their()] own blood.", \ "You finish drawing the arcane markings of [ticker.cultdat.entity_title3].") for(var/V in shields) var/obj/machinery/shield/S = V diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 2bf4933e108..087bfbb4008 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -1,4 +1,4 @@ -/var/list/sacrificed = list() +var/list/sacrificed = list() var/list/non_revealed_runes = (subtypesof(/obj/effect/rune) - /obj/effect/rune/malformed) /* @@ -153,7 +153,10 @@ structure_check() searches for nearby cultist structures required for the invoca for(var/M in invokers) var/mob/living/L = M if(invocation) - L.say(invocation) + if(!L.IsVocal()) + L.emote("gestures ominously.") + else + L.say(invocation) L.changeNext_move(CLICK_CD_MELEE)//THIS IS WHY WE CAN'T HAVE NICE THINGS if(invoke_damage) L.apply_damage(invoke_damage, BRUTE) @@ -473,7 +476,6 @@ var/list/teleport_runes = list() rune_in_use = 0 - //Ritual of Dimensional Rending: Calls forth the avatar of Nar-Sie upon the station. /obj/effect/rune/narsie cultist_name = "Tear Reality (God)" @@ -700,7 +702,7 @@ var/list/teleport_runes = list() return mob_to_revive.revive() //This does remove disabilities and such, but the rune might actually see some use because of it! to_chat(mob_to_revive, "\"PASNAR SAVRAE YAM'TOTH. Arise.\"") - mob_to_revive.visible_message("[mob_to_revive] draws in a huge breath, red light shining from their eyes.", \ + mob_to_revive.visible_message("[mob_to_revive] draws in a huge breath, red light shining from [mob_to_revive.p_their()] eyes.", \ "You awaken suddenly from the void. You're alive!") rune_in_use = 0 @@ -740,7 +742,7 @@ var/list/teleport_runes = list() to_chat(L, "You chant in unison and a colossal burst of energy knocks you backward!") L.Weaken(2) qdel(src) //delete before pulsing because it's a delay reee - empulse(E, 9*invokers.len, 12*invokers.len) // Scales now, from a single room to most of the station depending on # of chanters + empulse(E, 9*invokers.len, 12*invokers.len, 1) // Scales now, from a single room to most of the station depending on # of chanters //Rite of Astral Communion: Separates one's spirit from their body. They will take damage while it is active. /obj/effect/rune/astral @@ -787,11 +789,11 @@ var/list/teleport_runes = list() return affecting.apply_damage(1, BRUTE) if(!(user in T.contents)) - user.visible_message("A spectral tendril wraps around [user] and pulls them back to the rune!") + user.visible_message("A spectral tendril wraps around [user] and pulls [user.p_them()] back to the rune!") Beam(user,icon_state="drainbeam",time=2) user.forceMove(get_turf(src)) //NO ESCAPE :^) if(user.key) - user.visible_message("[user] slowly relaxes, the glow around them dimming.", \ + user.visible_message("[user] slowly relaxes, the glow around [user.p_them()] dimming.", \ "You are re-united with your physical form. [src] releases its hold over you.") user.color = initial(user.color) user.Weaken(3) @@ -833,7 +835,7 @@ var/list/teleport_runes = list() var/mob/living/user = invokers[1] ..() density = !density - user.visible_message("[user] places their hands on [src], and [density ? "the air above it begins to shimmer" : "the shimmer above it fades"].", \ + user.visible_message("[user] places [user.p_their()] hands on [src], and [density ? "the air above it begins to shimmer" : "the shimmer above it fades"].", \ "You channel your life energy into [src], [density ? "preventing" : "allowing"] passage above it.") if(iscarbon(user)) var/mob/living/carbon/C = user @@ -875,7 +877,7 @@ var/list/teleport_runes = list() fail_invoke() log_game("Summon Cultist rune failed - target in away mission") return - if((cultist_to_summon.reagents.has_reagent("holywater") || cultist_to_summon.restrained()) && invokers < 3) + if((cultist_to_summon.reagents.has_reagent("holywater") || cultist_to_summon.restrained()) && invokers.len < 3) to_chat(user, "The summoning of [cultist_to_summon] is being blocked somehow! You need 3 chanters to counter it!") fail_invoke() new /obj/effect/temp_visual/cult/sparks(get_turf(cultist_to_summon)) //observer warning diff --git a/code/game/gamemodes/cult/talisman.dm b/code/game/gamemodes/cult/talisman.dm index e909a33410f..8d858c6fade 100644 --- a/code/game/gamemodes/cult/talisman.dm +++ b/code/game/gamemodes/cult/talisman.dm @@ -151,7 +151,7 @@ if(!src || QDELETED(src) || !user || user.l_hand != src && user.r_hand != src || user.incapacitated() || !actual_selected_rune) return ..(user, 0) - user.visible_message("Dust flows from [user]'s hand, and they disappear in a flash of red light!", \ + user.visible_message("Dust flows from [user]'s hand, and [user.p_they()] disappear[user.p_s()] in a flash of red light!", \ "You speak the words of the talisman and find yourself somewhere else!") user.forceMove(get_turf(actual_selected_rune)) return ..() @@ -220,7 +220,7 @@ . = ..() user.visible_message("[user]'s hand flashes a bright blue!", \ "You speak the words of the talisman, emitting an EMP blast.") - empulse(src, 4, 8) + empulse(src, 4, 8, 1) //Rite of Disorientation: Stuns and inhibit speech on a single target for quite some time @@ -419,4 +419,4 @@ /obj/item/restraints/handcuffs/energy/cult/used/dropped(mob/user) user.visible_message("[user]'s shackles shatter in a discharge of dark magic!", \ "Your [src] shatters in a discharge of dark magic!") - . = ..() \ No newline at end of file + . = ..() diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 702b59853dc..760868e8435 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -490,7 +490,7 @@ proc/display_roundstart_logout_report() M.ghostize() M.key = theghost.key else - message_admins("[M] ([M.key] has been converted into [role_type] with an active antagonist jobban for said role since no ghost has volunteered to take their place.") + message_admins("[M] ([M.key] has been converted into [role_type] with an active antagonist jobban for said role since no ghost has volunteered to take [M.p_their()] place.") to_chat(M, "You have been converted into [role_type] with an active jobban. Any further violations of the rules on your part are likely to result in a permanent ban.") /proc/printplayer(datum/mind/ply, fleecheck) @@ -510,7 +510,7 @@ proc/display_roundstart_logout_report() if(ply.current.real_name != ply.name) text += " as [ply.current.real_name]" else - text += " had their body destroyed" + text += " had [ply.p_their()] body destroyed" return text /proc/printobjectives(datum/mind/ply) diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 0b1962b1717..9a43df56926 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -176,7 +176,7 @@ if(ishuman(target)) if(console!=null) console.AddSnapshot(target) - to_chat(user, "You scan [target] and add them to the database.") + to_chat(user, "You scan [target] and add [target.p_them()] to the database.") /obj/item/abductor/gizmo/proc/mark(atom/target, mob/living/user) if(marked == target) diff --git a/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm b/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm index 2d3bed1e0cf..d07381b7cce 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm @@ -11,7 +11,7 @@ var/obj/item/organ/external/affected = H.get_organ(target_zone) if(!affected) return FALSE - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return FALSE var/mob/living/carbon/human/H = user // You must either: Be of the abductor species, or contain an abductor implant @@ -89,7 +89,7 @@ var/obj/item/organ/external/affected = H.get_organ(target_zone) if(!affected) return FALSE - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return FALSE var/mob/living/carbon/human/H = user // You must either: Be of the abductor species, or contain an abductor implant diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm index a5660f86883..8e7219e401a 100644 --- a/code/game/gamemodes/miniantags/abduction/gland.dm +++ b/code/game/gamemodes/miniantags/abduction/gland.dm @@ -13,7 +13,6 @@ var/human_only = 0 var/active = 0 tough = TRUE //not easily broken by combat damage - sterile = TRUE //not very germy /obj/item/organ/internal/heart/gland/proc/ownerCheck() if(ishuman(owner)) diff --git a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm index 588900bb3e8..8682b50fc05 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm @@ -29,7 +29,7 @@ return for(var/mob/living/carbon/slime/M in range(1, target)) if(M.Victim == target) - to_chat(user, "[target] has a slime attached to them, deal with that first.") + to_chat(user, "[target] has a slime attached to [target.p_them()], deal with that first.") return visible_message("[user] puts [target] into the [src].") diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index 00bf335c576..9593ee6b792 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -308,7 +308,7 @@ var/list/choices = list() for(var/mob/living/carbon/human/H in view(1,src)) var/obj/item/organ/external/head/head = H.get_organ("head") - if(head.status & ORGAN_ROBOT) + if(head.is_robotic()) continue if(H.stat != DEAD && Adjacent(H) && !H.has_brain_worms()) choices += H @@ -325,7 +325,7 @@ to_chat(src, "You cannot infest someone who is already infested!") return - to_chat(src, "You slither up [M] and begin probing at their ear canal...") + to_chat(src, "You slither up [M] and begin probing at [M.p_their()] ear canal...") if(!do_after(src, 50, target = M)) to_chat(src, "As [M] moves away, you are dislodged and fall to the ground.") @@ -500,7 +500,7 @@ to_chat(src, "You cannot dominate someone who is already infested!") return - to_chat(src, "You focus your psychic lance on [M] and freeze their limbs with a wave of terrible dread.") + to_chat(src, "You focus your psychic lance on [M] and freeze [M.p_their()] limbs with a wave of terrible dread.") to_chat(M, "You feel a creeping, horrible sense of dread come over you, freezing your limbs and setting your heart racing.") M.Weaken(3) @@ -531,7 +531,7 @@ to_chat(src, "You decide against leaving your host.") return - to_chat(src, "You begin disconnecting from [host]'s synapses and prodding at their internal ear canal.") + to_chat(src, "You begin disconnecting from [host]'s synapses and prodding at [host.p_their()] internal ear canal.") leaving = TRUE @@ -623,7 +623,7 @@ to_chat(src,"You are feeling far too docile to do that.") return else - to_chat(src, "You plunge your probosci deep into the cortex of the host brain, interfacing directly with their nervous system.") + to_chat(src, "You plunge your probosci deep into the cortex of the host brain, interfacing directly with [host.p_their()] nervous system.") to_chat(host, "You feel a strange shifting sensation behind your eyes as an alien consciousness displaces yours.") var/borer_key = src.key add_attack_logs(src, host, "Assumed control of (borer)") diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index f76830910b1..68e8c16c5da 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -448,6 +448,14 @@ Support:Has two modes. Combat: Medium power attacks and damage resist. Healer: Attacks heal damage, but low damage resist and slow movemen. Can deploy a bluespace beacon and warp targets to it (including you) in either mode.

Explosive: High damage resist and medium power attack. Can turn any object into a bomb, dealing explosive damage to the next person to touch it. The object will return to normal after the trap is triggered.
+
+ Assassin: Medium damage with no damage resistance, can enter stealth which massively increases the damage of the next attack causing it to ignore armour. +
+ Charger: Medium damage and defense, very fast and has a special charge attack which damages a target and knocks items out of their hands. +
+ Lightning: Applies lightning chains to any targets on attack with a link to your summoner, lightning chains will shock anyone nearby. +
+ Protector: You will become leashed to your holoparasite instead of them to you. Has two modes, a medium attack/defense mode and a protection mode which greatly reduces incoming damage to the holoparasite. "} /obj/item/paper/guardian/update_icon() diff --git a/code/game/gamemodes/miniantags/guardian/types/charger.dm b/code/game/gamemodes/miniantags/guardian/types/charger.dm index abdc349f175..17ed569f256 100644 --- a/code/game/gamemodes/miniantags/guardian/types/charger.dm +++ b/code/game/gamemodes/miniantags/guardian/types/charger.dm @@ -6,7 +6,7 @@ ranged_cooldown_time = 40 speed = -1 damage_transfer = 0.6 - playstyle_string = "As a Charger type you do medium damage, have medium damage resistance, move very fast, and can charge at a location, damaging any target hit and forcing them to drop any items they are holding." + playstyle_string = "As a Charger type you do medium damage, have medium damage resistance, move very fast, and can charge at a location, damaging any target hit and forcing them to drop any items they are holding. (Click a tile to use your charge ability)" magic_fluff_string = "..And draw the Hunter, an alien master of rapid assault." tech_fluff_string = "Boot sequence complete. Charge modules loaded. Holoparasite swarm online." bio_fluff_string = "Your scarab swarm finishes mutating and stirs to life, ready to deal damage." diff --git a/code/game/gamemodes/miniantags/guardian/types/protector.dm b/code/game/gamemodes/miniantags/guardian/types/protector.dm index fe8b4897c42..9206b0d1b0b 100644 --- a/code/game/gamemodes/miniantags/guardian/types/protector.dm +++ b/code/game/gamemodes/miniantags/guardian/types/protector.dm @@ -51,7 +51,7 @@ Recall(TRUE) else to_chat(summoner, "You moved out of range, and were pulled back! You can only move [range] meters from [src]!") - summoner.visible_message("[summoner] jumps back to their protector.") + summoner.visible_message("[summoner] jumps back to [summoner.p_their()] protector.") new /obj/effect/temp_visual/guardian/phase/out(get_turf(summoner)) summoner.forceMove(get_turf(src)) new /obj/effect/temp_visual/guardian/phase(get_turf(summoner))//Protector \ No newline at end of file diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm index 32d51b579c4..5a7825c0cfe 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm @@ -73,7 +73,7 @@ icon_state = "revenant_draining" reveal(27) stun(27) - target.visible_message("[target] suddenly rises slightly into the air, their skin turning an ashy gray.") + target.visible_message("[target] suddenly rises slightly into the air, [target.p_their()] skin turning an ashy gray.") target.Beam(src,icon_state="drain_life",icon='icons/effects/effects.dmi',time=26) if(do_after(src, 30, 0, target)) //As one cannot prove the existance of ghosts, ghosts cannot prove the existance of the target they were draining. change_essence_amount(essence_drained, 0, target) @@ -263,8 +263,8 @@ new/obj/effect/temp_visual/revenant(T) T.ChangeTurf(/turf/simulated/wall/r_wall/rust) for(var/obj/structure/window/window in T.contents) - window.hit(rand(30,80)) - if(window && window.is_fulltile()) + window.take_damage(rand(30,80)) + if(window && window.fulltile) new/obj/effect/temp_visual/revenant/cracks(window.loc) for(var/obj/structure/closet/closet in T.contents) closet.open() diff --git a/code/game/gamemodes/miniantags/slaughter/slaughter.dm b/code/game/gamemodes/miniantags/slaughter/slaughter.dm index aeb26f58822..6b5705cfa7f 100644 --- a/code/game/gamemodes/miniantags/slaughter/slaughter.dm +++ b/code/game/gamemodes/miniantags/slaughter/slaughter.dm @@ -149,7 +149,7 @@ if(!A) to_chat(usr, "You could not locate any sapient heretics for the Slaughter.") return 0 - to_chat(usr, "You sense a terrified soul at [A]. Show them the error of their ways.") + to_chat(usr, "You sense a terrified soul at [A]. Show [A.p_them()] the error of [A.p_their()] ways.") /mob/living/simple_animal/slaughter/cult/New() ..() @@ -241,7 +241,7 @@ return // Just so people don't accidentally waste it /obj/item/organ/internal/heart/demon/attack_self(mob/living/user) - user.visible_message("[user] raises [src] to their mouth and tears into it with their teeth!", \ + user.visible_message("[user] raises [src] to [user.p_their()] mouth and tears into it with [user.p_their()] teeth!", \ "An unnatural hunger consumes you. You raise [src] to your mouth and devour it!") playsound(user, 'sound/misc/Demon_consume.ogg', 50, 1) for(var/obj/effect/proc_holder/spell/knownspell in user.mind.spell_list) diff --git a/code/game/gamemodes/nuclear/nuclear_challenge.dm b/code/game/gamemodes/nuclear/nuclear_challenge.dm index 6bb181b4136..7e75f579bf5 100644 --- a/code/game/gamemodes/nuclear/nuclear_challenge.dm +++ b/code/game/gamemodes/nuclear/nuclear_challenge.dm @@ -3,7 +3,7 @@ #define CHALLENGE_SCALE_PLAYER 1 // How many player per scaling bonus #define CHALLENGE_SCALE_BONUS 2 // How many TC per scaling bonus #define CHALLENGE_MIN_PLAYERS 50 -#define CHALLENGE_SHUTTLE_DELAY 15000 //25 minutes, so the ops have at least 5 minutes before the shuttle is callable. +#define CHALLENGE_SHUTTLE_DELAY 18000 //30 minutes, so the ops have at least 10 minutes before the shuttle is callable. Gives the nuke ops at least 15 minutes before shuttle arrive. /obj/item/nuclear_challenge name = "Declaration of War (Challenge Mode)" @@ -20,7 +20,7 @@ return declaring_war = TRUE - var/are_you_sure = alert(user, "Consult your team carefully before you declare war on [station_name()]]. Are you sure you want to alert the enemy crew? You have [-round((world.time-round_start_time - CHALLENGE_TIME_LIMIT)/10)] seconds to decide.", "Declare war?", "Yes", "No") + var/are_you_sure = alert(user, "Consult your team carefully before you declare war on [station_name()]. Are you sure you want to alert the enemy crew? You have [-round((world.time-round_start_time - CHALLENGE_TIME_LIMIT)/10)] seconds to decide.", "Declare war?", "Yes", "No") declaring_war = FALSE if(!check_allowed(user)) @@ -30,7 +30,7 @@ to_chat(user, "On second thought, the element of surprise isn't so bad after all.") return - var/war_declaration = "[user.real_name] has declared his intent to utterly destroy [station_name()] with a nuclear device, and dares the crew to try and stop them." + var/war_declaration = "[user.real_name] has declared [user.p_their()] intent to utterly destroy [station_name()] with a nuclear device, and dares the crew to try and stop them." declaring_war = TRUE var/custom_threat = alert(user, "Do you want to customize your declaration?", "Customize?", "Yes", "No") @@ -71,7 +71,7 @@ if(!is_admin_level(user.z)) to_chat(user, "You have to be at your base to use this.") return FALSE - if(world.time > CHALLENGE_TIME_LIMIT) + if((world.time - round_start_time) > CHALLENGE_TIME_LIMIT) // Only count after the round started to_chat(user, "It's too late to declare hostilities. Your benefactors are already busy with other schemes. You'll have to make do with what you have on hand.") return FALSE for(var/obj/machinery/computer/shuttle/syndicate/S in machines) diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 6a38b36b3df..e9bea1d8b1d 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -341,7 +341,7 @@ if(active) active = FALSE icon_state = icon_off - user.visible_message("[user] deactivates their pinpointer.", "You deactivate your pinpointer.") + user.visible_message("[user] deactivates [user.p_their()] pinpointer.", "You deactivate your pinpointer.") return var/list/name_counts = list() @@ -373,7 +373,7 @@ var/target = names[A] active = TRUE - user.visible_message("[user] activates their pinpointer.", "You activate your pinpointer.") + user.visible_message("[user] activates [user.p_their()] pinpointer.", "You activate your pinpointer.") point_at(target) /obj/item/pinpointer/crew/point_at(atom/target, spawnself = 1) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 151f7606351..07395aa0578 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -287,7 +287,7 @@ var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) - /datu target = pick(possible_targets) if(target && target.current) target_real_name = target.current.real_name - explanation_text = "Escape on the shuttle or an escape pod with the identity of [target_real_name], the [target.assigned_role] while wearing their identification card." + explanation_text = "Escape on the shuttle or an escape pod with the identity of [target_real_name], the [target.assigned_role] while wearing [target.p_their()] identification card." else explanation_text = "Free Objective" @@ -528,7 +528,7 @@ var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) - /datu target = pick(possible_targets) if(target && target.current) - explanation_text = "The Shoal has a need for [target.current.real_name], the [target.assigned_role]. Take them alive." + explanation_text = "The Shoal has a need for [target.current.real_name], the [target.assigned_role]. Take [target.current.p_them()] alive." else explanation_text = "Free Objective" return target diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 4f500825065..089cad71a3a 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -279,7 +279,7 @@ to_chat(M, "The frame beeps contentedly, purging the hostile memory engram from the MMI before initalizing it.") else - to_chat(M, "[rev_mind.current] looks like they just remembered their real allegiance!") + to_chat(M, "[rev_mind.current] looks like [rev_mind.current.p_they()] just remembered [rev_mind.current.p_their()] real allegiance!") ///////////////////////////////////// //Adds the rev hud to a new convert// diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index ed8603360fe..1d0bb3adf03 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -188,7 +188,7 @@ Made by Xhuis M.audible_message("[M] lets out a short blip.", \ "You have been turned into a robot! You are no longer a thrall! Though you try, you cannot remember anything about your servitude...") else - M.visible_message("[M] looks like their mind is their own again!", \ + M.visible_message("[M] looks like [M.p_their()] mind is [M.p_their()] own again!", \ "A piercing white light floods your eyes. Your mind is your own again! Though you try, you cannot remember anything about the shadowlings or your time \ under their command...") return 1 diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 06f7bc9440c..89aee290422 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -40,9 +40,9 @@ return var/mob/living/carbon/human/M = target user.visible_message("[user]'s eyes flash a blinding red!") - target.visible_message("[target] freezes in place, their eyes glazing over...") + target.visible_message("[target] freezes in place, [target.p_their()] eyes glazing over...") if(in_range(target, user)) - to_chat(target, "Your gaze is forcibly drawn into [user]'s eyes, and you are mesmerized by their heavenly beauty...") + to_chat(target, "Your gaze is forcibly drawn into [user]'s eyes, and you are mesmerized by [user.p_their()] heavenly beauty...") else //Only alludes to the shadowling if the target is close by to_chat(target, "Red lights suddenly dance in your vision, and you are mesmerized by the heavenly lights...") target.Stun(10) @@ -306,7 +306,7 @@ switch(progress) if(1) to_chat(user, "You place your hands to [target]'s head...") - user.visible_message("[user] places their hands onto the sides of [target]'s head!") + user.visible_message("[user] places [user.p_their()] hands onto the sides of [target]'s head!") if(2) to_chat(user, "You begin preparing [target]'s mind as a blank slate...") user.visible_message("[user]'s palms flare a bright red against [target]'s temples!") @@ -315,7 +315,7 @@ sleep(20) if(ismindshielded(target)) to_chat(user, "They have a mindshield implant. You begin to deactivate it - this will take some time.") - user.visible_message("[user] pauses, then dips their head in concentration!") + user.visible_message("[user] pauses, then dips [user.p_their()] head in concentration!") to_chat(target, "Your mindshield implant becomes hot as it comes under attack!") sleep(100) //10 seconds - not spawn() so the enthralling takes longer to_chat(user, "The nanobots composing the mindshield implant have been rendered inert. Now to continue.") @@ -361,7 +361,7 @@ if(!istype(target) || !ishuman(target)) return var/mob/living/carbon/human/H = target - H.visible_message("[H]'s skin suddenly bubbles and shifts around their body!", \ + H.visible_message("[H]'s skin suddenly bubbles and shifts around [H.p_their()] body!", \ "You regenerate your protective armor and cleanse your form of defects.") H.adjustCloneLoss(-target.getCloneLoss()) H.equip_to_slot_or_del(new /obj/item/clothing/under/shadowling(H), slot_w_uniform) @@ -493,7 +493,7 @@ to_chat(M, "You breathe in the black smoke, and your eyes burn horribly!") M.EyeBlind(5) if(prob(25)) - M.visible_message("[M] claws at their eyes!") + M.visible_message("[M] claws at [M.p_their()] eyes!") M.Stun(3) else to_chat(M, "You breathe in the black smoke, and you feel revitalized!") @@ -540,9 +540,7 @@ sp.start() S.Weaken(6) for(var/obj/structure/window/W in T.contents) - W.hit(rand(80, 100)) - - + W.take_damage(rand(80, 100)) /obj/effect/proc_holder/spell/aoe_turf/drainLife name = "Drain Life" @@ -627,9 +625,9 @@ to_chat(user, "You cannot spare this much energy. There are too many empowered thralls.") charge_counter = charge_max return - user.visible_message("[user] places their hands over [thrallToRevive]'s face, red light shining from beneath.", \ + user.visible_message("[user] places [user.p_their()] hands over [thrallToRevive]'s face, red light shining from beneath.", \ "You place your hands on [thrallToRevive]'s face and begin gathering energy...") - to_chat(thrallToRevive, "[user] places their hands over your face. You feel energy gathering. Stand still...") + to_chat(thrallToRevive, "[user] places [user.p_their()] hands over your face. You feel energy gathering. Stand still...") if(!do_mob(user, thrallToRevive, 80)) to_chat(user, "Your concentration snaps. The flow of energy ebbs.") charge_counter = charge_max @@ -640,7 +638,7 @@ playsound(thrallToRevive, 'sound/machines/defib_zap.ogg', 50, 1) user.Beam(thrallToRevive,icon_state="red_lightning",icon='icons/effects/effects.dmi',time=1) thrallToRevive.Weaken(5) - thrallToRevive.visible_message("[thrallToRevive] collapses, their skin and face distorting!", \ + thrallToRevive.visible_message("[thrallToRevive] collapses, [thrallToRevive.p_their()] skin and face distorting!", \ "AAAAAAAAAAAAAAAAAAAGH-") sleep(20) thrallToRevive.visible_message("[thrallToRevive] slowly rises, no longer recognizable as human.", \ @@ -659,7 +657,7 @@ to_chat(user, "[thrallToRevive] is not dead.") charge_counter = charge_max return - user.visible_message("[user] kneels over [thrallToRevive], placing their hands on \his chest.", \ + user.visible_message("[user] kneels over [thrallToRevive], placing [user.p_their()] hands on [thrallToRevive.p_their()] chest.", \ "You crouch over the body of your thrall and begin gathering energy...") thrallToRevive.notify_ghost_cloning("Your masters are resuscitating you! Re-enter your corpse if you wish to be brought to life.", source = thrallToRevive) if(!do_mob(user, thrallToRevive, 30)) @@ -673,7 +671,7 @@ user.Beam(thrallToRevive,icon_state="red_lightning",icon='icons/effects/effects.dmi',time=1) sleep(10) if(thrallToRevive.revive()) - thrallToRevive.visible_message("[thrallToRevive] heaves in breath, dim red light shining in their eyes.", \ + thrallToRevive.visible_message("[thrallToRevive] heaves in breath, dim red light shining in [thrallToRevive.p_their()] eyes.", \ "You have returned. One of your masters has brought you from the darkness beyond.") thrallToRevive.Weaken(4) thrallToRevive.emote("gasp") @@ -710,7 +708,7 @@ var/mob/living/carbon/human/M = target user.visible_message("[user]'s eyes flash a bright red!", \ "You begin to draw [M]'s life force.") - M.visible_message("[M]'s face falls slack, their jaw slightly distending.", \ + M.visible_message("[M]'s face falls slack, [M.p_their()] jaw slightly distending.", \ "You are suddenly transported... far, far away...") if(!do_after(user, 50, target = M)) to_chat(M, "You are snapped back to reality, your haze dissipating!") @@ -754,7 +752,7 @@ to_chat(user, "Making an ally explode seems unwise.") charge_counter = charge_max return - user.visible_message("[user]'s markings flare as they gesture at [boom]!", \ + user.visible_message("[user]'s markings flare as [user.p_they()] gesture[user.p_s()] at [boom]!", \ "You direct a lance of telekinetic energy at [boom].") sleep(4) if(iscarbon(boom)) @@ -798,7 +796,7 @@ charge_counter = charge_max return - to_chat(user, "You instantly rearrange [target]'s memories, hyptonitizing them into a thrall.") + to_chat(user, "You instantly rearrange [target]'s memories, hyptonitizing [target.p_them()] into a thrall.") to_chat(target, "An agonizing spike of pain drives into your mind, and--") ticker.mode.add_thrall(target.mind) target.mind.special_role = SPECIAL_ROLE_SHADOWLING_THRALL diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm index 5c05a028df0..4239b5db327 100644 --- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm @@ -43,7 +43,7 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N var/temp_flags = H.status_flags H.status_flags |= GODMODE //Can't die while hatching - H.visible_message("A chrysalis forms around [H], sealing them inside.", \ + H.visible_message("A chrysalis forms around [H], sealing [H.p_them()] inside.", \ "You create your chrysalis and begin to contort within.") sleep(100) @@ -51,7 +51,7 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N "Spines pierce your back. Your claws break apart your fingers. You feel excruciating pain as your true form begins its exit.") sleep(90) - H.visible_message("[H], skin shifting, begins tearing at the walls around them.", \ + H.visible_message("[H], skin shifting, begins tearing at the walls around [H.p_them()].", \ "Your false skin slips away. You begin tearing at the fragile membrane protecting you.") sleep(80) diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index ec8a1643c27..9234043976c 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -346,7 +346,7 @@ // Tell them about people they might want to contact. var/mob/living/carbon/human/M = get_nt_opposed() if(M && M != traitor_mob) - to_chat(traitor_mob, "We have received credible reports that [M.real_name] might be willing to help our cause. If you need assistance, consider contacting them.") + to_chat(traitor_mob, "We have received credible reports that [M.real_name] might be willing to help our cause. If you need assistance, consider contacting [M.p_them()].") traitor_mob.mind.store_memory("Potential Collaborator: [M.real_name]") //let's also inform their contact that they might be called upon, but leave it vague. inform_collab(M) diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm index c2431f17318..14ba6fb9dd0 100644 --- a/code/game/gamemodes/vampire/vampire.dm +++ b/code/game/gamemodes/vampire/vampire.dm @@ -279,8 +279,8 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha to_chat(owner, "[owner.wear_mask] prevents you from biting [H]!") draining = null return - add_attack_logs(owner, H, "vampirebit & is draining their blood.", FALSE) - owner.visible_message("[owner] grabs [H]'s neck harshly and sinks in their fangs!", "You sink your fangs into [H] and begin to drain their blood.", "You hear a soft puncture and a wet sucking noise.") + add_attack_logs(owner, H, "vampirebit & is draining their blood.", ATKLOG_ALMOSTALL) + owner.visible_message("[owner] grabs [H]'s neck harshly and sinks in [owner.p_their()] fangs!", "You sink your fangs into [H] and begin to drain [owner.p_their()] blood.", "You hear a soft puncture and a wet sucking noise.") if(!iscarbon(owner)) H.LAssailant = null else diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index e9a249d8412..c9dad5c510d 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -175,7 +175,7 @@ /obj/effect/proc_holder/spell/vampire/targetted/hypnotise/cast(list/targets, mob/user = usr) for(var/mob/living/target in targets) - user.visible_message("[user]'s eyes flash briefly as he stares into [target]'s eyes") + user.visible_message("[user]'s eyes flash briefly as [user.p_they()] stare[user.p_s()] into [target]'s eyes") if(do_mob(user, target, 50)) if(!affects(target)) to_chat(user, "Your piercing gaze fails to knock out [target].") @@ -270,7 +270,7 @@ C.Stun(4) C.Jitter(150) for(var/obj/structure/window/W in view(4)) - W.destroy() + W.deconstruct(FALSE) playsound(user.loc, 'sound/effects/creepyshriek.ogg', 100, 1) @@ -345,8 +345,8 @@ ticker.mode.vampire_enthralled.Add(H.mind) ticker.mode.vampire_enthralled[H.mind] = user.mind H.mind.special_role = SPECIAL_ROLE_VAMPIRE_THRALL - to_chat(H, "You have been Enthralled by [user]. Follow their every command.") - to_chat(user, "You have successfully Enthralled [H]. If they refuse to do as you say just adminhelp.") + to_chat(H, "You have been Enthralled by [user]. Follow [user.p_their()] every command.") + to_chat(user, "You have successfully Enthralled [H]. If [H.p_they()] refuse[H.p_s()] to do as you say just adminhelp.") add_attack_logs(user, H, "Vampire-thralled") diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 2e99f0238c5..7c1a3526002 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -56,7 +56,7 @@ new /obj/effect/particle_effect/smoke(H.loc) var/mob/living/carbon/human/M = new/mob/living/carbon/human(H.loc) M.key = C.key - to_chat(M, "You are the [H.real_name]'s apprentice! You are bound by magic contract to follow their orders and help them in accomplishing their goals.") + to_chat(M, "You are the [H.real_name]'s apprentice! You are bound by magic contract to follow [H.p_their()] orders and help [H.p_them()] in accomplishing their goals.") switch(href_list["school"]) if("destruction") M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile(null)) @@ -213,7 +213,7 @@ /obj/item/scrying/attack_self(mob/user as mob) to_chat(user, " You can see...everything!") - visible_message("[user] stares into [src], their eyes glazing over.") + visible_message("[user] stares into [src], [user.p_their()] eyes glazing over.") user.ghostize(1) /////////////////////Multiverse Blade//////////////////// @@ -277,7 +277,7 @@ var/global/list/multiverse = list() var/datum/objective/hijackclone/hijack_objective = new /datum/objective/hijackclone hijack_objective.owner = usr.mind usr.mind.objectives += hijack_objective - hijack_objective.explanation_text = "Ensure only [usr.real_name] and their copies are on the shuttle!" + hijack_objective.explanation_text = "Ensure only [usr.real_name] and [usr.p_their()] copies are on the shuttle!" to_chat(usr, "Objective #[1]: [hijack_objective.explanation_text]") ticker.mode.traitors += usr.mind usr.mind.special_role = "[usr.real_name] Prime" @@ -318,7 +318,7 @@ var/global/list/multiverse = list() C.prefs.copy_to(M) M.key = C.key M.mind.name = user.real_name - to_chat(M, "You are an alternate version of [user.real_name] from another universe! Help them accomplish their goals at all costs.") + to_chat(M, "You are an alternate version of [user.real_name] from another universe! Help [user.p_them()] accomplish [user.p_their()] goals at all costs.") M.faction = list("[user.real_name]") if(duplicate_self) M.set_species(user.get_species()) //duplicate the sword user's species. @@ -342,7 +342,7 @@ var/global/list/multiverse = list() var/datum/objective/hijackclone/hijack_objective = new /datum/objective/hijackclone hijack_objective.owner = M.mind M.mind.objectives += hijack_objective - hijack_objective.explanation_text = "Ensure only [usr.real_name] and their copies are on the shuttle!" + hijack_objective.explanation_text = "Ensure only [usr.real_name] and [usr.p_their()] copies are on the shuttle!" to_chat(M, "Objective #[1]: [hijack_objective.explanation_text]") M.mind.special_role = SPECIAL_ROLE_MULTIVERSE log_game("[M.key] was made a multiverse traveller with the objective to help [usr.real_name] hijack.") @@ -350,7 +350,7 @@ var/global/list/multiverse = list() var/datum/objective/protect/new_objective = new /datum/objective/protect new_objective.owner = M.mind new_objective.target = usr.mind - new_objective.explanation_text = "Protect [usr.real_name], your copy, and help them defend the innocent from the mobs of multiverse clones." + new_objective.explanation_text = "Protect [usr.real_name], your copy, and help [usr.p_them()] defend the innocent from the mobs of multiverse clones." M.mind.objectives += new_objective to_chat(M, "Objective #[1]: [new_objective.explanation_text]") M.mind.special_role = SPECIAL_ROLE_MULTIVERSE @@ -652,7 +652,7 @@ var/global/list/multiverse = list() equip_skeleton(M) spooky_scaries |= M to_chat(M, "You have been revived by [user.real_name]!") - to_chat(M, "They are your master now, assist them even if it costs you your new life!") + to_chat(M, "[user.p_theyre(TRUE)] your master now, assist them even if it costs you your new life!") desc = "A shard capable of resurrecting humans as skeleton thralls[unlimited ? "." : ", [spooky_scaries.len]/3 active thralls."]" /obj/item/necromantic_stone/proc/check_spooky() diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index cb303a90932..4bd7f3004d8 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -167,9 +167,9 @@ icon_state = "soulstone" name = initial(name) if(iswizard(usr) || usability) - to_chat(A, "You have been released from your prison, but you are still bound to [usr.real_name]'s will. Help them succeed in their goals at all costs.") + to_chat(A, "You have been released from your prison, but you are still bound to [usr.real_name]'s will. Help [usr.p_them()] succeed in [usr.p_their()] goals at all costs.") else if(iscultist(usr)) - to_chat(A, "You have been released from your prison, but you are still bound to the cult's will. Help them succeed in their goals at all costs.") + to_chat(A, "You have been released from your prison, but you are still bound to the cult's will. Help [usr.p_them()] succeed in [usr.p_their()] goals at all costs.") was_used() attack_self(U) @@ -280,7 +280,7 @@ ticker.mode.update_cult_icons_added(Z.mind) qdel(T) to_chat(Z, "You are a Juggernaut. Though slow, your shell can withstand extreme punishment, create shield walls and even deflect energy weapons, and rip apart enemies and walls alike.") - to_chat(Z, "You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.") + to_chat(Z, "You are still bound to serve your creator, follow [U.p_their()] orders and help [U.p_them()] complete [U.p_their()] goals at all costs.") Z.cancel_camera() qdel(C) @@ -296,7 +296,7 @@ ticker.mode.update_cult_icons_added(Z.mind) qdel(T) to_chat(Z, "You are a Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls.") - to_chat(Z, "You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.") + to_chat(Z, "You are still bound to serve your creator, follow [U.p_their()] orders and help [U.p_them()] complete [U.p_their()] goals at all costs.") Z.cancel_camera() qdel(C) @@ -312,7 +312,7 @@ ticker.mode.update_cult_icons_added(Z.mind) qdel(T) to_chat(Z, "You are an Artificer. You are incredibly weak and fragile, but you are able to construct fortifications, use magic missile, repair allied constructs (by clicking on them), and most important of all create new constructs (Use your Artificer spell to summon a new construct shell and Summon Soulstone to create a new soulstone).") - to_chat(Z, "You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.") + to_chat(Z, "You are still bound to serve your creator, follow [U.p_their()] orders and help [U.p_them()] complete [U.p_their()] goals at all costs.") Z.cancel_camera() qdel(C) else @@ -332,11 +332,11 @@ ticker.mode.cult+=newstruct.mind ticker.mode.update_cult_icons_added(newstruct.mind) if(stoner && iswizard(stoner)) - to_chat(newstruct, "You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.") + to_chat(newstruct, "You are still bound to serve your creator, follow [stoner.p_their()] orders and help [stoner.p_them()] complete [stoner.p_their()] goals at all costs.") else if(stoner && iscultist(stoner)) - to_chat(newstruct, "You are still bound to serve the cult, follow their orders and help them complete their goals at all costs.") + to_chat(newstruct, "You are still bound to serve the cult, follow [stoner.p_their()] orders and help [stoner.p_them()] complete [stoner.p_their()] goals at all costs.") else - to_chat(newstruct, "You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.") + to_chat(newstruct, "You are still bound to serve your creator, follow [stoner.p_their()] orders and help [stoner.p_them()] complete [stoner.p_their()] goals at all costs.") newstruct.cancel_camera() /obj/item/soulstone/proc/init_shade(mob/living/carbon/human/T, mob/U, vic = 0) @@ -362,11 +362,11 @@ name = "soulstone: Shade of [T.real_name]" icon_state = "soulstone2" if(U && iswizard(U)) - to_chat(S, "Your soul has been captured! You are now bound to [U.real_name]'s will. Help them succeed in their goals at all costs.") + to_chat(S, "Your soul has been captured! You are now bound to [U.real_name]'s will. Help [U.p_them()] succeed in their goals at all costs.") else if(U && iscultist(U)) - to_chat(S, "Your soul has been captured! You are now bound to the cult's will. Help them succeed in their goals at all costs.") + to_chat(S, "Your soul has been captured! You are now bound to the cult's will. Help [U.p_them()] succeed in their goals at all costs.") if(vic && U) - to_chat(U, "Capture successful!: [T.real_name]'s soul has been ripped from their body and stored within the soul stone.") + to_chat(U, "Capture successful!: [T.real_name]'s soul has been ripped from [U.p_their()] body and stored within the soul stone.") /obj/item/soulstone/proc/getCultGhost(mob/living/carbon/human/T, mob/U) var/mob/dead/observer/chosen_ghost diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 40c303ea36f..b5e798b95c7 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -141,15 +141,10 @@ wizard_mob.equip_to_slot_or_del(new /obj/item/radio/headset(wizard_mob), slot_l_ear) wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(wizard_mob), slot_w_uniform) wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(wizard_mob), slot_shoes) - if(!wizard_mob.get_species() == "Plasmaman")//handled in the species file for plasmen on the afterjob equip proc for now + if(wizard_mob.get_species() != "Plasmaman") //handled in the species file for plasmen on the afterjob equip proc for now wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(wizard_mob), slot_wear_suit) wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(wizard_mob), slot_head) - if(wizard_mob.backbag == 2) - wizard_mob.equip_to_slot_or_del(new /obj/item/storage/backpack(wizard_mob), slot_back) - if(wizard_mob.backbag == 3) - wizard_mob.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel_norm(wizard_mob), slot_back) - if(wizard_mob.backbag == 4) - wizard_mob.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel(wizard_mob), slot_back) + wizard_mob.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel(wizard_mob), slot_back) wizard_mob.equip_to_slot_or_del(new /obj/item/storage/box/survival(wizard_mob), slot_in_backpack) wizard_mob.equip_to_slot_or_del(new /obj/item/teleportation_scroll(wizard_mob), slot_r_store) var/obj/item/spellbook/spellbook = new /obj/item/spellbook(wizard_mob) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 61c14efc2e5..0e315e03b2c 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -1,10 +1,6 @@ var/global/datum/controller/occupations/job_master -#define GET_RANDOM_JOB 0 -#define BE_ASSISTANT 1 -#define RETURN_TO_LOBBY 2 - /datum/controller/occupations //List of all jobs var/list/occupations = list() diff --git a/code/game/jobs/job_objective.dm b/code/game/jobs/job_objective.dm index 036d289a848..90bac6d8383 100644 --- a/code/game/jobs/job_objective.dm +++ b/code/game/jobs/job_objective.dm @@ -68,7 +68,7 @@ count++ if(tasks_completed >= 1) - text += "
 [employee.name] did their fucking job!" + text += "
 [employee.name] did [employee.p_their()] fucking job!" feedback_add_details("employee_success","SUCCESS") else feedback_add_details("employee_success","FAIL") diff --git a/code/game/jobs/job_scaling.dm b/code/game/jobs/job_scaling.dm new file mode 100644 index 00000000000..7d8804783f1 --- /dev/null +++ b/code/game/jobs/job_scaling.dm @@ -0,0 +1,11 @@ +/hook/roundstart/proc/jobscaling() + sleep(10 SECONDS) // give everyone time to finish spawning, and the lag to die down + var/playercount = length(clients) + var/highpop_trigger = 80 + + if(playercount >= highpop_trigger) + log_debug("Playercount: [playercount] versus trigger: [highpop_trigger] - loading highpop job config"); + job_master.LoadJobs("config/jobs_highpop.txt") + else + log_debug("Playercount: [playercount] versus trigger: [highpop_trigger] - keeping standard job config"); + return 1 \ No newline at end of file diff --git a/code/game/machinery/Freezer.dm b/code/game/machinery/Freezer.dm index b065c87b8ab..4876c904de7 100644 --- a/code/game/machinery/Freezer.dm +++ b/code/game/machinery/Freezer.dm @@ -57,9 +57,10 @@ if(exchange_parts(user, I)) return - default_deconstruction_crowbar(I) + if(default_deconstruction_crowbar(I)) + return - if(istype(I, /obj/item/wrench)) + if(iswrench(I)) if(!panel_open) to_chat(user, "Open the maintenance panel first.") return @@ -75,6 +76,8 @@ break build_network() update_icon() + else + return ..() /obj/machinery/atmospherics/unary/cold_sink/freezer/update_icon() if(panel_open) @@ -216,9 +219,10 @@ if(exchange_parts(user, I)) return - default_deconstruction_crowbar(I) + if(default_deconstruction_crowbar(I)) + return - if(istype(I, /obj/item/wrench)) + if(iswrench(I)) if(!panel_open) to_chat(user, "Open the maintenance panel first.") return @@ -234,6 +238,8 @@ break build_network() update_icon() + else + return ..() /obj/machinery/atmospherics/unary/heat_reservoir/heater/update_icon() if(panel_open) diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 3c9c27f1590..360d5cc5aff 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -54,13 +54,12 @@ if(prob(75)) qdel(src) -/obj/machinery/optable/attack_hand(mob/user as mob) - if(HULK in usr.mutations) - to_chat(usr, text("You destroy the table.")) - visible_message("[usr] destroys the operating table!") - src.density = 0 +/obj/machinery/optable/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) + if(user.a_intent == INTENT_HARM) + ..(user, TRUE) + visible_message("[user] destroys the operating table!") qdel(src) - return + return TRUE /obj/machinery/optable/CanPass(atom/movable/mover, turf/target, height=0) if(height==0) return 1 @@ -143,19 +142,20 @@ take_victim(usr,usr) -/obj/machinery/optable/attackby(obj/item/W as obj, mob/living/carbon/user as mob, params) - if(istype(W, /obj/item/grab)) - if(iscarbon(W:affecting)) - take_victim(W:affecting,usr) - qdel(W) - return - if(istype(W, /obj/item/wrench)) - playsound(src.loc, W.usesound, 50, 1) - if(do_after(user, 20 * W.toolspeed, target = src)) +/obj/machinery/optable/attackby(obj/item/I, mob/living/carbon/user, params) + if(istype(I, /obj/item/grab)) + var/obj/item/grab/G = I + if(iscarbon(G.affecting)) + take_victim(G.affecting, user) + qdel(G) + if(iswrench(I)) + playsound(loc, I.usesound, 50, 1) + if(do_after(user, 20 * I.toolspeed, target = src)) to_chat(user, "You deconstruct the table.") new /obj/item/stack/sheet/plasteel(loc, 5) qdel(src) - + else + return ..() /obj/machinery/optable/proc/check_table(mob/living/carbon/patient as mob) if(src.victim && get_turf(victim) == get_turf(src) && victim.lying) diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index a90bc66bce3..f3701945017 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -43,19 +43,21 @@ QDEL_NULL(storedpda) return ..() -/obj/machinery/pdapainter/attackby(var/obj/item/O as obj, var/mob/user as mob, params) - if(istype(O, /obj/item/pda)) +/obj/machinery/pdapainter/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/pda)) if(storedpda) to_chat(user, "There is already a PDA inside.") return else - var/obj/item/pda/P = usr.get_active_hand() + var/obj/item/pda/P = user.get_active_hand() if(istype(P)) - user.drop_item() - storedpda = P - P.loc = src - P.add_fingerprint(usr) - update_icon() + if(user.drop_item()) + storedpda = P + P.forceMove(src) + P.add_fingerprint(user) + update_icon() + else + return ..() /obj/machinery/pdapainter/attack_hand(mob/user as mob) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 7d386ddfb1a..934e925ce62 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -11,7 +11,7 @@ var/base_icon = "sleeper" density = 1 anchored = 1 - dir = 8 + dir = WEST var/orient = "LEFT" // "RIGHT" changes the dir suffix to "-r" var/mob/living/carbon/human/occupant = null var/possible_chems = list(list("epinephrine", "ether", "salbutamol", "styptic_powder", "silver_sulfadiazine"), @@ -97,10 +97,10 @@ return if(beaker.reagents.total_volume < beaker.reagents.maximum_volume) - src.occupant.transfer_blood_to(beaker, 1) - for(var/datum/reagent/x in src.occupant.reagents.reagent_list) - src.occupant.reagents.trans_to(beaker, 3) - src.occupant.transfer_blood_to(beaker, 1) + occupant.transfer_blood_to(beaker, 1) + for(var/datum/reagent/x in occupant.reagents.reagent_list) + occupant.reagents.trans_to(beaker, 3) + occupant.transfer_blood_to(beaker, 1) if(occupant) for(var/A in occupant.reagents.addiction_list) @@ -117,7 +117,7 @@ if(M == occupant) continue else - M.forceMove(src.loc) + M.forceMove(loc) updateDialog() return @@ -253,11 +253,11 @@ to_chat(usr, "Close the maintenance panel first.") return 0 - if((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai))) + if((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon/ai))) if(href_list["chemical"]) if(occupant) if(occupant.stat == DEAD) - to_chat(usr, "This person has no life for to preserve anymore. Take them to a department capable of reanimating them.") + to_chat(usr, "This person has no life for to preserve anymore. Take [occupant.p_them()] to a department capable of reanimating them.") else if(occupant.health > min_health || (href_list["chemical"] in emergency_chems)) inject_chemical(usr,href_list["chemical"],text2num(href_list["amount"])) else @@ -268,7 +268,7 @@ toggle_filter() if(href_list["ejectify"]) eject() - src.add_fingerprint(usr) + add_fingerprint(usr) return 1 /obj/machinery/sleeper/blob_act() @@ -280,83 +280,84 @@ return -/obj/machinery/sleeper/attackby(var/obj/item/G as obj, var/mob/user as mob, params) - if(istype(G, /obj/item/reagent_containers/glass)) +/obj/machinery/sleeper/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/reagent_containers/glass)) if(!beaker) if(!user.drop_item()) - to_chat(user, "\The [G] is stuck to you!") + to_chat(user, "[I] is stuck to you!") return - beaker = G - G.forceMove(src) - user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!") + beaker = I + I.forceMove(src) + user.visible_message("[user] adds \a [I] to [src]!", "You add \a [I] to [src]!") return else to_chat(user, "The sleeper has a beaker already.") return - if(istype(G, /obj/item/screwdriver)) - if(src.occupant) + if(isscrewdriver(I)) + if(occupant) to_chat(user, "The maintenance panel is locked.") return - default_deconstruction_screwdriver(user, "[base_icon]-o", "[base_icon]-open", G) + default_deconstruction_screwdriver(user, "[base_icon]-o", "[base_icon]-open", I) return - if(istype(G, /obj/item/wrench)) - if(src.occupant) + if(iswrench(I)) + if(occupant) to_chat(user, "The scanner is occupied.") return if(panel_open) to_chat(user, "Close the maintenance panel first.") return - if(dir == 4) + if(dir == EAST) orient = "LEFT" - dir = 8 + setDir(WEST) else orient = "RIGHT" - dir = 4 - playsound(src.loc, G.usesound, 50, 1) + setDir(EAST) + playsound(loc, I.usesound, 50, 1) return - if(exchange_parts(user, G)) + if(exchange_parts(user, I)) return - if(istype(G, /obj/item/crowbar)) - default_deconstruction_crowbar(G) + if(default_deconstruction_crowbar(I)) return - if(istype(G, /obj/item/grab)) + if(istype(I, /obj/item/grab)) + var/obj/item/grab/G = I if(panel_open) to_chat(user, "Close the maintenance panel first.") return - if(!ismob(G:affecting)) + if(!ismob(G.affecting)) return - if(src.occupant) + if(occupant) to_chat(user, "The sleeper is already occupied!") return - for(var/mob/living/carbon/slime/M in range(1,G:affecting)) - if(M.Victim == G:affecting) - to_chat(usr, "[G:affecting.name] will not fit into the sleeper because they have a slime latched onto their head.") + for(var/mob/living/carbon/slime/M in range(1, G.affecting)) + if(M.Victim == G.affecting) + to_chat(user, "[G.affecting.name] will not fit into the sleeper because [G.affecting.p_they()] [G.affecting.p_have()] a slime latched onto [G.affecting.p_their()] head.") return - visible_message("[user] starts putting [G:affecting:name] into the sleeper.") + visible_message("[user] starts putting [G.affecting.name] into the sleeper.") - if(do_after(user, 20, target = G:affecting)) - if(src.occupant) + if(do_after(user, 20, target = G.affecting)) + if(occupant) to_chat(user, "The sleeper is already occupied!") return - if(!G || !G:affecting) return - var/mob/M = G:affecting + if(!G || !G.affecting) + return + var/mob/M = G.affecting M.forceMove(src) - src.occupant = M - src.icon_state = "[base_icon]" + occupant = M + icon_state = "[base_icon]" to_chat(M, "You feel cool air surround you. You go numb as your senses turn inward.") - - src.add_fingerprint(user) + add_fingerprint(user) qdel(G) - return - return + return + + return ..() /obj/machinery/sleeper/ex_act(severity) @@ -365,21 +366,21 @@ switch(severity) if(1.0) for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) + A.forceMove(loc) A.ex_act(severity) qdel(src) return if(2.0) if(prob(50)) for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) + A.forceMove(loc) A.ex_act(severity) qdel(src) return if(3.0) if(prob(25)) for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) + A.forceMove(loc) A.ex_act(severity) qdel(src) return @@ -422,10 +423,10 @@ to_chat(user, "The sleeper does not offer that chemical!") return - if(src.occupant) - if(src.occupant.reagents) - if(src.occupant.reagents.get_reagent_amount(chemical) + amount <= max_chem) - src.occupant.reagents.add_reagent(chemical, amount) + if(occupant) + if(occupant.reagents) + if(occupant.reagents.get_reagent_amount(chemical) + amount <= max_chem) + occupant.reagents.add_reagent(chemical, amount) return else to_chat(user, "You can not inject any more of this chemical.") @@ -445,8 +446,8 @@ if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return - src.icon_state = "[base_icon]-open" - src.go_out() + icon_state = "[base_icon]-open" + go_out() add_fingerprint(usr) return @@ -496,7 +497,7 @@ return for(var/mob/living/carbon/slime/M in range(1,L)) if(M.Victim == L) - to_chat(usr, "[L.name] will not fit into the sleeper because they have a slime latched onto their head.") + to_chat(usr, "[L.name] will not fit into the sleeper because [L.p_they()] [L.p_have()] a slime latched onto their head.") return if(L == user) visible_message("[user] starts climbing into the sleeper.") @@ -504,15 +505,15 @@ visible_message("[user] starts putting [L.name] into the sleeper.") if(do_after(user, 20, target = L)) - if(src.occupant) + if(occupant) to_chat(user, "The sleeper is already occupied!") return if(!L) return L.forceMove(src) - src.occupant = L - src.icon_state = "[base_icon]" + occupant = L + icon_state = "[base_icon]" to_chat(L, "You feel cool air surround you. You go numb as your senses turn inward.") - src.add_fingerprint(user) + add_fingerprint(user) if(user.pulling == L) user.stop_pulling() return @@ -527,7 +528,7 @@ set src in oview(1) if(usr.stat != 0 || !(ishuman(usr))) return - if(src.occupant) + if(occupant) to_chat(usr, "The sleeper is already occupied!") return if(panel_open) @@ -541,17 +542,17 @@ return visible_message("[usr] starts climbing into the sleeper.") if(do_after(usr, 20, target = usr)) - if(src.occupant) + if(occupant) to_chat(usr, "The sleeper is already occupied!") return usr.stop_pulling() usr.forceMove(src) - src.occupant = usr - src.icon_state = "[base_icon]" + occupant = usr + icon_state = "[base_icon]" for(var/obj/O in src) qdel(O) - src.add_fingerprint(usr) + add_fingerprint(usr) return return diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index f2dc8c8bfa2..1d70b389a94 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -2,9 +2,9 @@ name = "body scanner" icon = 'icons/obj/Cryogenic2.dmi' icon_state = "bodyscanner-open" - density = 1 - dir = 8 - anchored = 1 + density = TRUE + dir = WEST + anchored = TRUE idle_power_usage = 1250 active_power_usage = 2500 @@ -32,7 +32,7 @@ if(M == occupant) continue else - M.forceMove(src.loc) + M.forceMove(loc) /obj/machinery/bodyscanner/New() ..() @@ -54,37 +54,36 @@ component_parts += new /obj/item/stack/cable_coil(null, 2) RefreshParts() -/obj/machinery/bodyscanner/attackby(var/obj/item/G as obj, var/mob/user as mob) - if(istype(G, /obj/item/screwdriver)) - if(src.occupant) +/obj/machinery/bodyscanner/attackby(obj/item/I, mob/user) + if(isscrewdriver(I)) + if(occupant) to_chat(user, "The maintenance panel is locked.") return - default_deconstruction_screwdriver(user, "bodyscanner-o", "bodyscanner-open", G) + default_deconstruction_screwdriver(user, "bodyscanner-o", "bodyscanner-open", I) return - if(istype(G, /obj/item/wrench)) - if(src.occupant) + if(iswrench(I)) + if(occupant) to_chat(user, "The scanner is occupied.") return if(panel_open) to_chat(user, "Close the maintenance panel first.") return - if(dir == 4) - dir = 8 + if(dir == EAST) + setDir(WEST) else - dir = 4 - playsound(src.loc, G.usesound, 50, 1) + setDir(EAST) + playsound(loc, I.usesound, 50, 1) return - if(exchange_parts(user, G)) + if(exchange_parts(user, I)) return - if(istype(G, /obj/item/crowbar)) - default_deconstruction_crowbar(G) + if(default_deconstruction_crowbar(I)) return - if(istype(G, /obj/item/grab)) - var/obj/item/grab/TYPECAST_YOUR_SHIT = G + if(istype(I, /obj/item/grab)) + var/obj/item/grab/TYPECAST_YOUR_SHIT = I if(panel_open) to_chat(user, "Close the maintenance panel first.") return @@ -95,7 +94,7 @@ return for(var/mob/living/carbon/slime/M in range(1, TYPECAST_YOUR_SHIT.affecting)) if(M.Victim == TYPECAST_YOUR_SHIT.affecting) - to_chat(user, "[TYPECAST_YOUR_SHIT.affecting.name] has a fucking slime attached to them, deal with that first.") + to_chat(user, "[TYPECAST_YOUR_SHIT.affecting.name] has a fucking slime attached to [TYPECAST_YOUR_SHIT.affecting.p_them()], deal with that first.") return var/mob/M = TYPECAST_YOUR_SHIT.affecting if(M.abiotic()) @@ -105,7 +104,10 @@ occupant = M icon_state = "body_scanner_1" add_fingerprint(user) - qdel(G) + qdel(TYPECAST_YOUR_SHIT) + return + + return ..() /obj/machinery/bodyscanner/MouseDrop_T(mob/living/carbon/human/O, mob/user as mob) @@ -123,7 +125,7 @@ to_chat(user, "Close the maintenance panel first.") return 0 //panel open if(occupant) - to_chat(user, "\The [src] is already occupied.") + to_chat(user, "[src] is already occupied.") return 0 //occupied if(O.buckled) @@ -133,11 +135,11 @@ return 0 for(var/mob/living/carbon/slime/M in range(1, O)) if(M.Victim == O) - to_chat(user, "[O] has a fucking slime attached to them, deal with that first.") + to_chat(user, "[O] has a fucking slime attached to [O.p_them()], deal with that first.") return 0 if(O == user) - visible_message("[user] climbs into \the [src].") + visible_message("[user] climbs into [src].") else visible_message("[user] puts [O] into the body scanner.") @@ -175,21 +177,21 @@ switch(severity) if(1.0) for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) + A.forceMove(loc) A.ex_act(severity) qdel(src) return if(2.0) if(prob(50)) for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) + A.forceMove(loc) A.ex_act(severity) qdel(src) return if(3.0) if(prob(25)) for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) + A.forceMove(loc) A.ex_act(severity) qdel(src) return @@ -220,7 +222,7 @@ icon_state = "bodyscannerconsole" density = 1 anchored = 1 - dir = 8 + dir = WEST idle_power_usage = 250 active_power_usage = 500 var/obj/machinery/bodyscanner/connected = null @@ -238,7 +240,7 @@ stat &= ~NOPOWER else spawn(rand(0, 15)) - src.icon_state = "bodyscannerconsole-p" + icon_state = "bodyscannerconsole-p" stat |= NOPOWER /obj/machinery/body_scanconsole/New() @@ -292,33 +294,35 @@ break -/obj/machinery/body_scanconsole/attackby(var/obj/item/G as obj, var/mob/user as mob, params) - if(istype(G, /obj/item/screwdriver)) - default_deconstruction_screwdriver(user, "bodyscannerconsole-p", "bodyscannerconsole", G) +/obj/machinery/body_scanconsole/attackby(obj/item/I, mob/user, params) + if(default_deconstruction_screwdriver(user, "bodyscannerconsole-p", "bodyscannerconsole", I)) return - if(istype(G, /obj/item/wrench)) + if(iswrench(I)) if(panel_open) to_chat(user, "Close the maintenance panel first.") return - if(dir == 4) - dir = 8 + if(dir == EAST) + setDir(WEST) else - dir = 4 - playsound(loc, G.usesound, 50, 1) + setDir(EAST) + playsound(loc, I.usesound, 50, 1) - if(exchange_parts(user, G)) + if(exchange_parts(user, I)) return - default_deconstruction_crowbar(G) + if(default_deconstruction_crowbar(I)) + return + else + return ..() -/obj/machinery/body_scanconsole/attack_ai(user as mob) +/obj/machinery/body_scanconsole/attack_ai(user) return attack_hand(user) -/obj/machinery/body_scanconsole/attack_ghost(user as mob) +/obj/machinery/body_scanconsole/attack_ghost(user) return attack_hand(user) -/obj/machinery/body_scanconsole/attack_hand(user as mob) +/obj/machinery/body_scanconsole/attack_hand(user) if(stat & (NOPOWER|BROKEN)) return @@ -326,13 +330,13 @@ to_chat(user, "Close the maintenance panel first.") return - if(!src.connected) + if(!connected) findscanner() ui_interact(user) -/obj/machinery/body_scanconsole/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) +/obj/machinery/body_scanconsole/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "adv_med.tmpl", "Body Scanner", 690, 600) @@ -427,7 +431,7 @@ var/organStatus[0] if(E.status & ORGAN_BROKEN) organStatus["broken"] = E.broken_description - if(E.status & ORGAN_ROBOT) + if(E.is_robotic()) organStatus["robotic"] = 1 if(E.status & ORGAN_SPLINTED) organStatus["splinted"] = 1 @@ -456,7 +460,7 @@ organData["maxHealth"] = I.max_damage organData["bruised"] = I.min_broken_damage organData["broken"] = I.min_bruised_damage - organData["robotic"] = I.robotic + organData["robotic"] = I.is_robotic() organData["dead"] = (I.status & ORGAN_DEAD) intOrganData.Add(list(organData)) @@ -475,14 +479,14 @@ return 1 if(href_list["ejectify"]) - src.connected.eject() + connected.eject() if(href_list["print_p"]) generate_printing_text() if(!(printing) && printing_text) printing = 1 - visible_message("\The [src] rattles and prints out a sheet of paper.") + visible_message("[src] rattles and prints out a sheet of paper.") var/obj/item/paper/P = new /obj/item/paper(loc) playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1) P.info = "
Body Scan - [href_list["name"]]

" @@ -596,8 +600,8 @@ splint = "Splinted:" if(e.status & ORGAN_BROKEN) AN = "[e.broken_description]:" - if(e.status & ORGAN_ROBOT) - robot = "Prosthetic:" + if(e.is_robotic()) + robot = "Robotic:" if(e.open) open = "Open:" switch(e.germ_level) @@ -654,7 +658,7 @@ if(occupant.disabilities & NEARSIGHTED) dat += "Retinal misalignment detected.
" else - dat += "\The [src] is empty." + dat += "[src] is empty." else dat = " Error: No Body Scanner connected." diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index f9d83ff43f6..de32918c068 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -118,6 +118,8 @@ var/report_danger_level = 1 + var/automatic_emergency = 1 //Does the alarm automaticly respond to an emergency condition + /obj/machinery/alarm/monitor report_danger_level = 0 @@ -236,9 +238,11 @@ elect_master() /obj/machinery/alarm/proc/master_is_operating() - if(! alarm_area) + if(!alarm_area) alarm_area = areaMaster - + if(!alarm_area) + log_runtime(EXCEPTION("Air alarm /obj/machinery/alarm lacks alarm_area and areaMaster vars during proc/master_is_operating()"), src) + return FALSE return alarm_area.master_air_alarm && !(alarm_area.master_air_alarm.stat & (NOPOWER|BROKEN)) @@ -304,7 +308,7 @@ if(old_danger_level!=danger_level) apply_danger_level() - if(mode == AALARM_MODE_SCRUBBING && danger_level == ATMOS_ALARM_DANGER) + if(automatic_emergency && mode == AALARM_MODE_SCRUBBING && danger_level == ATMOS_ALARM_DANGER) if(pressure_dangerlevel == ATMOS_ALARM_DANGER) mode = AALARM_MODE_OFF if(temperature_dangerlevel == ATMOS_ALARM_DANGER && cur_tlv.max2 <= environment.temperature) @@ -969,31 +973,30 @@ playsound(src.loc, 'sound/effects/sparks4.ogg', 50, 1) return -/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob, params) - src.add_fingerprint(user) +/obj/machinery/alarm/attackby(obj/item/I, mob/user, params) + add_fingerprint(user) switch(buildstage) if(2) - if(istype(W, /obj/item/screwdriver)) // Opening that Air Alarm up. -// to_chat(user, "You pop the Air Alarm's maintence panel open.") + if(isscrewdriver(I)) // Opening that Air Alarm up. wiresexposed = !wiresexposed to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]") update_icon() return - if(istype(W, /obj/item/wirecutters)) // cutting the wires out + if(iswirecutter(I)) // cutting the wires out if(wires.wires_status == 31) // all wires cut var/obj/item/stack/cable_coil/new_coil = new /obj/item/stack/cable_coil() new_coil.amount = 5 - new_coil.loc = user.loc + new_coil.forceMove(user.loc) buildstage = 1 update_icon() - return + return - if(wiresexposed && ((istype(W, /obj/item/multitool) || istype(W, /obj/item/wirecutters)))) + if(wiresexposed && ((ismultitool(I) || iswirecutter(I)))) return attack_hand(user) - if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda))// trying to unlock the interface with an ID card + if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda))// trying to unlock the interface with an ID card if(stat & (NOPOWER|BROKEN)) to_chat(user, "It does nothing") return @@ -1004,13 +1007,11 @@ updateUsrDialog() else to_chat(user, "Access denied.") - - - return + return if(1) - if(istype(W, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/coil = W + if(istype(I, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/coil = I if(coil.amount < 5) to_chat(user, "You need more cable for this!") return @@ -1026,34 +1027,35 @@ first_run() return - else if(istype(W, /obj/item/crowbar)) + else if(iscrowbar(I)) to_chat(user, "You start prying out the circuit.") - playsound(get_turf(src), W.usesound, 50, 1) - if(do_after(user, 20 * W.toolspeed, target = src)) + playsound(get_turf(src), I.usesound, 50, 1) + if(do_after(user, 20 * I.toolspeed, target = src)) if(buildstage != 1) return to_chat(user, "You pry out the circuit!") var/obj/item/airalarm_electronics/circuit = new /obj/item/airalarm_electronics() - circuit.loc = user.loc + circuit.forceMove(user.loc) buildstage = 0 update_icon() return if(0) - if(istype(W, /obj/item/airalarm_electronics)) + if(istype(I, /obj/item/airalarm_electronics)) to_chat(user, "You insert the circuit!") - playsound(get_turf(src), W.usesound, 50, 1) - qdel(W) + playsound(get_turf(src), I.usesound, 50, 1) + qdel(I) buildstage = 1 update_icon() return - else if(istype(W, /obj/item/wrench)) + else if(iswrench(I)) to_chat(user, "You remove the fire alarm assembly from the wall!") new /obj/item/mounted/frame/alarm_frame(get_turf(user)) - playsound(get_turf(src), W.usesound, 50, 1) + playsound(get_turf(src), I.usesound, 50, 1) qdel(src) + return - return 0 + return ..() /obj/machinery/alarm/power_change() if(powered(power_channel)) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index b61d5513561..9ad575f74d7 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -338,6 +338,7 @@ update_flag ..() /obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/W as obj, var/mob/user as mob, params) + user.changeNext_move(CLICK_CD_MELEE) if(iswelder(W) && src.destroyed) if(weld(W, user)) to_chat(user, "You salvage whats left of \the [src]") diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 57ade18dab3..6b728f2a20b 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -36,8 +36,8 @@ if(charging) to_chat(user, "Current charge: [round(charging.percent(), 1)]%") -/obj/machinery/cell_charger/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/stock_parts/cell)) +/obj/machinery/cell_charger/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/stock_parts/cell)) if(stat & BROKEN) to_chat(user, "[src] is broken!") return @@ -57,19 +57,19 @@ if(!user.drop_item()) return - W.forceMove(src) - charging = W + I.forceMove(src) + charging = I user.visible_message("[user] inserts a cell into the charger.", "You insert a cell into the charger.") chargelevel = -1 updateicon() - else if(iswrench(W)) + else if(iswrench(I)) if(charging) to_chat(user, "Remove the cell first!") return anchored = !anchored to_chat(user, "You [anchored ? "attach" : "detach"] the cell charger [anchored ? "to" : "from"] the ground") - playsound(src.loc, W.usesound, 75, 1) + playsound(src.loc, I.usesound, 75, 1) else return ..() diff --git a/code/game/machinery/chiller.dm b/code/game/machinery/chiller.dm index f48d59593ca..d2f76a7c42a 100644 --- a/code/game/machinery/chiller.dm +++ b/code/game/machinery/chiller.dm @@ -68,8 +68,8 @@ user << browse(null, "window=aircond") user.unset_machine() else - ..() - return + return ..() + /obj/machinery/space_heater/air_conditioner/attack_hand(mob/user as mob) src.add_fingerprint(user) interact(user) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index ee53fdbce8b..881136dbd58 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -349,19 +349,19 @@ use_power(200) //Let's unlock this early I guess. Might be too early, needs tweaking. -/obj/machinery/clonepod/attackby(obj/item/W, mob/user, params) +/obj/machinery/clonepod/attackby(obj/item/I, mob/user, params) if(!(occupant || mess)) - if(default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]", W)) + if(default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]", I)) return - if(exchange_parts(user, W)) + if(exchange_parts(user, I)) return - if(default_deconstruction_crowbar(W)) + if(default_deconstruction_crowbar(I)) return - if(W.GetID()) - if(!check_access(W)) + if(I.GetID()) + if(!check_access(I)) to_chat(user, "Access Denied.") return if(!(occupant || mess)) @@ -374,34 +374,33 @@ go_out() //Removing cloning pod biomass - else if(istype(W, /obj/item/reagent_containers/food/snacks/meat)) - to_chat(user, "\The [src] processes \the [W].") - biomass += BIOMASS_MEAT_AMOUNT - user.drop_item() - qdel(W) - return - else if(istype(W, /obj/item/wrench)) + else if(istype(I, /obj/item/reagent_containers/food/snacks/meat)) + if(user.drop_item()) + to_chat(user, "[src] processes [I].") + biomass += BIOMASS_MEAT_AMOUNT + qdel(I) + else if(iswrench(I)) if(occupant) to_chat(user, "Can not do that while [src] is in use.") else if(anchored) - anchored = 0 + anchored = FALSE connected.pods -= src connected = null else - anchored = 1 - playsound(loc, W.usesound, 100, 1) + anchored = TRUE + playsound(loc, I.usesound, 100, 1) if(anchored) user.visible_message("[user] secures [src] to the floor.", "You secure [src] to the floor.") else user.visible_message("[user] unsecures [src] from the floor.", "You unsecure [src] from the floor.") - else if(istype(W, /obj/item/multitool)) - var/obj/item/multitool/M = W + else if(ismultitool(I)) + var/obj/item/multitool/M = I M.buffer = src to_chat(user, "You load connection data from [src] to [M].") return else - ..() + return ..() /obj/machinery/clonepod/emag_act(user) if(isnull(occupant)) diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 2b3c338fa3d..67f1dba85f0 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -117,7 +117,7 @@ return laws = M.laws - if(istype(P, /obj/item/mmi) || istype(P, /obj/item/mmi/posibrain)) + if(istype(P, /obj/item/mmi)) if(!P:brainmob) to_chat(user, "Sticking an empty [P] into the frame would sort of defeat the purpose.") return diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 1e207e3bdde..eebae34b9ea 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -814,7 +814,7 @@ if(ORION_TRAIL_SPACEPORT) if(spaceport_raided) - eventdat += "The Spaceport is on high alert! they wont let you dock since you tried to attack them!" + eventdat += "The Spaceport is on high alert! They wont let you dock since you tried to attack them!" if(last_spaceport_action) eventdat += "
Last Spaceport Action: [last_spaceport_action]" eventdat += "

Depart Spaceport

" diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index cf94e35f1cf..30ccb23b467 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -362,7 +362,7 @@ /obj/item/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob, params) if(istype(I,/obj/item/card/id)||istype(I, /obj/item/pda)) if(allowed(user)) - user.visible_message("\the [user] waves their ID past the [src]'s access protocol scanner.", "You swipe your ID past the [src]'s access protocol scanner.") + user.visible_message("\the [user] waves [user.p_their()] ID past the [src]'s access protocol scanner.", "You swipe your ID past the [src]'s access protocol scanner.") var/console_choice = input(user, "What do you want to configure the access to?", "Access Modification", "R&D Core") as null|anything in access_types if(console_choice == null) return diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index 2195ee25522..00f6a98f2bc 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -8,16 +8,39 @@ var/list/networks = list("SS13") var/datum/action/innate/camera_off/off_action = new var/datum/action/innate/camera_jump/jump_action = new + var/list/actions = list() /obj/machinery/computer/camera_advanced/proc/CreateEye() eyeobj = new() eyeobj.origin = src -/obj/machinery/computer/camera_advanced/proc/GrantActions(mob/living/carbon/user) - off_action.target = user - off_action.Grant(user) - jump_action.target = user - jump_action.Grant(user) +/obj/machinery/computer/camera_advanced/proc/GrantActions(mob/living/user) + if(off_action) + off_action.target = user + off_action.Grant(user) + actions += off_action + + if(jump_action) + jump_action.target = user + jump_action.Grant(user) + actions += jump_action + +/obj/machinery/computer/camera_advanced/proc/remove_eye_control(mob/living/user) + if(!user) + return + for(var/V in actions) + var/datum/action/A = V + A.Remove(user) + if(user.client) + user.reset_perspective(null) + eyeobj.RemoveImages() + eyeobj.eye_user = null + user.remote_control = null + user.remote_view = FALSE + + current_user = null + user.unset_machine() + playsound(src, 'sound/machines/terminal_off.ogg', 25, 0) /obj/machinery/computer/camera_advanced/check_eye(mob/user) if((stat & (NOPOWER|BROKEN)) || !Adjacent(user) || !user.has_vision() || user.incapacitated()) @@ -33,7 +56,7 @@ /obj/machinery/computer/camera_advanced/on_unset_machine(mob/M) if(M == current_user) - off_action.Activate() + remove_eye_control(M) /obj/machinery/computer/camera_advanced/attack_hand(mob/user) if(current_user) @@ -95,6 +118,13 @@ origin = null return ..() +/mob/camera/aiEye/remote/RemoveImages() + ..() + if(visible_icon) + var/client/C = GetViewerClient() + if(C) + C.images -= user_image + /mob/camera/aiEye/remote/GetViewerClient() if(eye_user) return eye_user.client @@ -140,20 +170,8 @@ return var/mob/living/carbon/C = target var/mob/camera/aiEye/remote/remote_eye = C.remote_control - C.remote_view = 0 - remote_eye.origin.current_user = null - remote_eye.origin.jump_action.Remove(C) - remote_eye.eye_user = null - if(C.client) - C.reset_perspective(null) - if(remote_eye.visible_icon) - C.client.images -= remote_eye.user_image - for(var/datum/camerachunk/chunk in remote_eye.visibleCameraChunks) - C.client.images -= chunk.obscured - C.remote_control = null - C.unset_machine() - src.Remove(C) - playsound(remote_eye.origin, 'sound/machines/terminal_off.ogg', 25, 0) + var/obj/machinery/computer/camera_advanced/console = remote_eye.origin + console.remove_eye_control(target) /datum/action/innate/camera_jump name = "Jump To Camera" diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index fa582362308..054d4d441a3 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -528,7 +528,8 @@ if("alert") status_signal.data["picture_state"] = data1 - frequency.post_signal(src, status_signal) + spawn(0) + frequency.post_signal(src, status_signal) /obj/machinery/computer/communications/Destroy() diff --git a/code/game/machinery/computer/hologram.dm b/code/game/machinery/computer/hologram.dm deleted file mode 100644 index 2d2e5d37ae0..00000000000 --- a/code/game/machinery/computer/hologram.dm +++ /dev/null @@ -1,118 +0,0 @@ -/obj/machinery/computer/hologram_comp - name = "hologram computer" - desc = "Rumoured to control holograms." - icon = 'icons/obj/stationobjs.dmi' - icon_keyboard = "tech_key" - icon_screen = "holocontrol" - var/obj/machinery/hologram/projector/projector = null - var/temp = null - var/lumens = 0.0 - var/h_r = 245.0 - var/h_g = 245.0 - var/h_b = 245.0 - - -/obj/machinery/computer/hologram_comp/New() - ..() - spawn( 10 ) - src.projector = locate(/obj/machinery/hologram/projector, get_step(src.loc, NORTH)) - return - return - -/obj/machinery/computer/hologram_comp/attack_hand() - if(!in_range(src, usr)) - return 0 - src.show_console(usr) - return - -/obj/machinery/computer/hologram_comp/proc/render() - var/icon/I = new /icon('icons/mob/human.dmi', "body_m_s") - - if(src.lumens >= 0) - I.Blend(rgb(src.lumens, src.lumens, src.lumens), ICON_ADD) - else - I.Blend(rgb(- src.lumens, -src.lumens, -src.lumens), ICON_SUBTRACT) - - I.Blend(new /icon('icons/mob/human.dmi', "mouth_m_s"), ICON_OVERLAY) - I.Blend(new /icon('icons/mob/underwear.dmi', "Mens White"), ICON_OVERLAY) - - var/icon/U = new /icon('icons/mob/human_face.dmi', "hair_a_s") - U.Blend(rgb(src.h_r, src.h_g, src.h_b), ICON_ADD) - - I.Blend(U, ICON_OVERLAY) - - src.projector.hologram.icon = I - -/obj/machinery/computer/hologram_comp/proc/show_console(var/mob/user as mob) - var/dat - user.set_machine(src) - if(src.temp) - dat = text("[]

Clear", src.temp) - else - dat = text({"Hologram Status:
\n - Power: []
\n - Hologram Control:
\n - Color Luminosity: []/220 \[Reset\]
\n - Lighten: 1 10
\n - Darken: 1 10
\n -
\nHair Color: ([],[],[]) \[Reset\]
\n - Red (0-255): \[0\] -10 -1 [] 1 10 \[255\]
\n - Green (0-255): \[0\] -10 -1 [] 1 10 \[255\]
\n - Blue (0-255): \[0\] -10 -1 [] 1 10 \[255\]
- "}, (src.projector.hologram ? "On" : "Off"), -src.lumens + 35, src.h_r, src.h_g, src.h_b, src.h_r, src.h_g, src.h_b) - user << browse(dat, "window=hologram_console") - onclose(user, "hologram_console") - return - -/obj/machinery/computer/hologram_comp/Topic(href, href_list) - if(..()) - return 1 - if(in_range(src, usr)) - flick("holo_console1", src) - if(href_list["power"]) - if(src.projector.hologram) - src.projector.icon_state = "hologram0" - //src.projector.hologram = null - qdel(src.projector.hologram) - else - src.projector.hologram = new(src.projector.loc) - src.projector.hologram.icon = 'icons/mob/human.dmi' - src.projector.hologram.icon_state = "body_m_s" - src.projector.icon_state = "hologram1" - src.render() - else - if(href_list["h_r"]) - if(src.projector.hologram) - src.h_r += text2num(href_list["h_r"]) - src.h_r = min(max(src.h_r, 0), 255) - render() - else - if(href_list["h_g"]) - if(src.projector.hologram) - src.h_g += text2num(href_list["h_g"]) - src.h_g = min(max(src.h_g, 0), 255) - render() - else - if(href_list["h_b"]) - if(src.projector.hologram) - src.h_b += text2num(href_list["h_b"]) - src.h_b = min(max(src.h_b, 0), 255) - render() - else - if(href_list["light"]) - if(src.projector.hologram) - src.lumens += text2num(href_list["light"]) - src.lumens = min(max(src.lumens, -185.0), 35) - render() - else - if(href_list["reset"]) - if(src.projector.hologram) - src.lumens = 0 - render() - else - if(href_list["temp"]) - src.temp = null - for(var/mob/M in viewers(1, src)) - if((M.client && M.machine == src)) - src.show_console(M) - return diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 8bdc6b87243..bcbe7a07e5d 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -22,7 +22,7 @@ var/defaultmsg = "Welcome. Please select an option." var/rebootmsg = "%$&(£: Critical %$$@ Error // !RestArting! - ?pLeaSe wAit!" //Computer properties - var/screen = 0 // 0 = Main menu, 1 = Message Logs, 2 = Hacked screen, 3 = Custom Message, 4 = chat room selection, 5 = chat room logs + var/screen = 0 // 0 = Main menu, 1 = Message Logs, 2 = Hacked screen, 3 = Custom Message var/hacking = 0 // Is it being hacked into by the AI/Cyborg var/emag = 0 // When it is emagged. var/message = "System bootup complete. Please select an option." // The message that shows on the main menu. @@ -33,7 +33,6 @@ var/obj/item/pda/customrecepient = null var/customjob = "Admin" var/custommessage = "This is a test, please ignore." - var/datum/chatroom/current_chatroom = null light_color = LIGHT_COLOR_DARKGREEN @@ -129,7 +128,6 @@ dat += "
[++i]. Clear Request Console Logs
" dat += "
[++i]. Set Custom Key
" dat += "
[++i]. Send Admin Message
" - dat += "
[++i]. View Chatrooms
" else for(var/n = ++i; n <= optioncount; n++) dat += "
[n]. ---------------
" @@ -247,42 +245,6 @@ dat += {"
X
[rc.send_dpt] [rc.rec_dpt][rc.message][rc.stamp][rc.id_auth][rc.priority]"} dat += "" - //Chat room list - if(5) - dat += "
Back - Refresh

" - dat += {" - - - - - - "} - for(var/datum/chatroom/C in chatrooms) - var/list/invites = (C.invites - C.users) - dat += {" - - - - - "} - dat += "
Room NameUsersInvitesMessages
[C.name][C.users.len][invites.len][C.logs.len]
" - //View chat room logs - if(6) - dat += "
Back - Refresh

" - dat += {" - - - - "} - if(current_chatroom) - for(var/M in current_chatroom.logs) - var/list/message = M - dat += {" - - - "} - dat += "
NameMessage
[message["username"]][message["message"]]
" - dat += "" message = defaultmsg user << browse(dat, "window=message;size=700x700") @@ -520,19 +482,6 @@ if(href_list["back"]) src.screen = 0 - // View chat room list - if(href_list["chatroom"]) - if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN))) - message = noserver - else if(auth) - screen = 5 - if(href_list["viewroom"]) - if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN))) - message = noserver - else if(auth) - current_chatroom = locate(href_list["viewroom"]) - if(current_chatroom) - screen = 6 return src.attack_hand(usr) diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 98d14c8ac30..4cbf105c100 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -205,8 +205,8 @@ if(href_list["dstele"]) var/choices = list(0) var/list/reachable_levels = levels_by_trait(REACHABLE) - for(var/datum/space_level/S in reachable_levels) - choices += S.zpos + for(var/z in reachable_levels) + choices += z var/obj/machinery/computer/pod/deathsquad/D = src var/input = input("Enter the destination Z-Level. The mechs will arrive from the East. Leave 0 if you don't want to set a specific ZLevel", "Mass Driver Controls", 0) in choices D.teleporter_dest = input diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 63d5c9811b4..2cf9de49571 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -108,13 +108,14 @@ return for(var/mob/living/carbon/slime/M in range(1,L)) if(M.Victim == L) - to_chat(usr, "[L.name] will not fit into the cryo cell because they have a slime latched onto their head.") + to_chat(usr, "[L.name] will not fit into the cryo cell because [L.p_they()] [L.p_have()] a slime latched onto [L.p_their()] head.") return if(put_mob(L)) if(L == user) visible_message("[user] climbs into the cryo cell.") else visible_message("[user] puts [L.name] into the cryo cell.") + add_attack_logs(user, L, "put into a cryo cell at [COORD(src)].", ATKLOG_ALL) if(user.pulling == L) user.stop_pulling() @@ -262,6 +263,7 @@ if(href_list["ejectOccupant"]) if(!occupant || isslime(usr) || ispAI(usr)) return 0 // don't update UIs attached to this object + add_attack_logs(usr, occupant, "ejected from cryo cell at [COORD(src)]", ATKLOG_ALL) go_out() add_fingerprint(usr) @@ -269,16 +271,18 @@ /obj/machinery/atmospherics/unary/cryo_cell/attackby(var/obj/item/G as obj, var/mob/user as mob, params) if(istype(G, /obj/item/reagent_containers/glass)) + var/obj/item/reagent_containers/B = G if(beaker) to_chat(user, "A beaker is already loaded into the machine.") return if(!user.drop_item()) - to_chat(user, "The [G] is stuck to you!") + to_chat(user, "[B] is stuck to you!") return - G.forceMove(src) - beaker = G + B.forceMove(src) + beaker = B + add_attack_logs(user, null, "Added [B] containing [B.reagentlist()] to a cryo cell at [COORD(src)]") + user.visible_message("[user] adds \a [B] to [src]!", "You add \a [B] to [src]!") - user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!") if(istype(G, /obj/item/screwdriver)) if(occupant || on) @@ -293,18 +297,19 @@ default_deconstruction_crowbar(G) if(istype(G, /obj/item/grab)) + var/obj/item/grab/GG = G if(panel_open) to_chat(user, "Close the maintenance panel first.") return - if(!ismob(G:affecting)) + if(!ismob(GG.affecting)) return - for(var/mob/living/carbon/slime/M in range(1,G:affecting)) - if(M.Victim == G:affecting) - to_chat(usr, "[G:affecting:name] will not fit into the cryo because they have a slime latched onto their head.") + for(var/mob/living/carbon/slime/M in range(1,GG.affecting)) + if(M.Victim == GG.affecting) + to_chat(usr, "[GG.affecting.name] will not fit into the cryo because [GG.affecting.p_they()] [GG.affecting.p_have()] a slime latched onto [GG.affecting.p_their()] head.") return - var/mob/M = G:affecting + var/mob/M = GG.affecting if(put_mob(M)) - qdel(G) + qdel(GG) return /obj/machinery/atmospherics/unary/cryo_cell/update_icon() @@ -452,6 +457,7 @@ else if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return + add_attack_logs(usr, occupant, "Ejected from cryo cell at [COORD(src)]") go_out() add_fingerprint(usr) return diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 88827a6ab05..332dc2854e1 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -112,7 +112,7 @@ to_chat(user, "\The [I] is no longer in storage.") return - visible_message("The console beeps happily as it disgorges \the [I].") + visible_message("The console beeps happily as it disgorges [I].") dispense_item(I) @@ -120,7 +120,8 @@ if(!allowed(user)) to_chat(user, "Access Denied.") return - if(!allow_items) return + if(!allow_items) + return if(frozen_items.len == 0) to_chat(user, "There is nothing to recover from storage.") @@ -238,7 +239,7 @@ ) // These items will NOT be preserved var/list/do_not_preserve_items = list ( - /obj/item/mmi/posibrain + /obj/item/mmi/robotic_brain ) /obj/machinery/cryopod/right @@ -323,15 +324,15 @@ // Also make sure there is a valid control computer /obj/machinery/cryopod/proc/despawn_occupant() //Drop all items into the pod. - for(var/obj/item/W in occupant) - occupant.unEquip(W) - W.forceMove(src) + for(var/obj/item/I in occupant) + occupant.unEquip(I) + I.forceMove(src) - if(W.contents.len) //Make sure we catch anything not handled by qdel() on the items. - if(should_preserve_item(W) != CRYO_DESTROY) // Don't remove the contents of things that need preservation + if(I.contents.len) //Make sure we catch anything not handled by qdel() on the items. + if(should_preserve_item(I) != CRYO_DESTROY) // Don't remove the contents of things that need preservation continue - for(var/obj/item/O in W.contents) - if(istype(O,/obj/item/tank)) //Stop eating pockets, you fuck! + for(var/obj/item/O in I.contents) + if(istype(O, /obj/item/tank)) //Stop eating pockets, you fuck! continue O.forceMove(src) @@ -345,23 +346,23 @@ items -= occupant // Don't delete the occupant items -= announce // or the autosay radio. - for(var/obj/item/W in items) - if(istype(W,/obj/item/pda)) - var/obj/item/pda/P = W + for(var/obj/item/I in items) + if(istype(I, /obj/item/pda)) + var/obj/item/pda/P = I QDEL_NULL(P.id) qdel(P) continue - var/preserve = should_preserve_item(W) + var/preserve = should_preserve_item(I) if(preserve == CRYO_DESTROY) - qdel(W) + qdel(I) else if(control_computer && control_computer.allow_items) - control_computer.frozen_items += W + control_computer.frozen_items += I if(preserve == CRYO_OBJECTIVE) - control_computer.objective_items += W - W.loc = null + control_computer.objective_items += I + I.loc = null else - W.forceMove(loc) + I.forceMove(loc) // Skip past any cult sacrifice objective using this person if(GAMEMODE_IS_CULT && is_sacrifice_target(occupant.mind)) @@ -461,22 +462,23 @@ #undef CRYO_PRESERVE #undef CRYO_OBJECTIVE -/obj/machinery/cryopod/attackby(var/obj/item/G as obj, var/mob/user as mob, params) +/obj/machinery/cryopod/attackby(obj/item/I, mob/user, params) - if(istype(G, /obj/item/grab)) + if(istype(I, /obj/item/grab)) + var/obj/item/grab/G = I if(occupant) - to_chat(user, "\The [src] is in use.") + to_chat(user, "[src] is in use.") return - if(!ismob(G:affecting)) + if(!ismob(G.affecting)) return - if(!check_occupant_allowed(G:affecting)) + if(!check_occupant_allowed(G.affecting)) return var/willing = null //We don't want to allow people to be forced into despawning. - var/mob/living/M = G:affecting + var/mob/living/M = G.affecting time_till_despawn = initial(time_till_despawn) if(!istype(M) || M.stat == DEAD) @@ -485,20 +487,21 @@ if(M.client) if(alert(M,"Would you like to enter long-term storage?",,"Yes","No") == "Yes") - if(!M || !G || !G:affecting) return + if(!M || !G || !G.affecting) return willing = willing_time_divisor else willing = 1 if(willing) - visible_message("[user] starts putting [G:affecting:name] into \the [src].") + visible_message("[user] starts putting [G.affecting.name] into [src].") - if(do_after(user, 20, target = G:affecting)) - if(!M || !G || !G:affecting) return + if(do_after(user, 20, target = G.affecting)) + if(!M || !G || !G.affecting) + return if(occupant) - to_chat(user, "\The [src] is in use.") + to_chat(user, "[src] is in use.") return take_occupant(M, willing) @@ -516,6 +519,8 @@ to_chat(M, "If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.") take_occupant(M, willing) + else + return ..() /obj/machinery/cryopod/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob) @@ -551,7 +556,7 @@ for(var/mob/living/carbon/slime/M in range(1,L)) if(M.Victim == L) - to_chat(usr, "[L.name] will not fit into the cryo pod because they have a slime latched onto their head.") + to_chat(usr, "[L.name] will not fit into the cryo pod because [L.p_they()] [L.p_have()] a slime latched onto [L.p_their()] head.") return @@ -567,7 +572,7 @@ if(willing) if(!Adjacent(L)) - to_chat(user, "You're not close enough to \the [src].") + to_chat(user, "You're not close enough to [src].") return if(L == user) visible_message("[user] starts climbing into the cryo pod.") @@ -633,14 +638,13 @@ if(occupant) items -= occupant if(announce) items -= announce - for(var/obj/item/W in items) - W.loc = get_turf(src) + for(var/obj/item/I in items) + I.forceMove(get_turf(src)) go_out() add_fingerprint(usr) name = initial(name) - return /obj/machinery/cryopod/verb/move_inside() set name = "Enter Pod" @@ -659,7 +663,7 @@ to_chat(usr, "You're too busy getting your life sucked out of you.") return - visible_message("[usr] starts climbing into \the [src].") + visible_message("[usr] starts climbing into [src].") if(do_after(usr, 20, target = usr)) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 501f510348b..0d49cc1b0cd 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -647,7 +647,7 @@ About the new airlock wires panel: if(affecting.receive_damage(10, 0)) H.UpdateDamageIcon() else - visible_message("[user] headbutts the airlock. Good thing they're wearing a helmet.") + visible_message("[user] headbutts the airlock. Good thing [user.p_theyre()] wearing a helmet.") return if(panel_open) diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index 678e29d3ae0..db508b9288f 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -10,8 +10,6 @@ usesound = 'sound/items/Deconstruct.ogg' var/list/conf_access = null var/one_access = 0 //if set to 1, door would receive req_one_access instead of req_access - var/last_configurator = null - var/locked = TRUE var/const/max_brain_damage = 60 // Maximum brain damage a mob can have until it can't use the electronics /obj/item/airlock_electronics/attack_self(mob/user) @@ -26,31 +24,23 @@ var/t1 = text("Access control
\n") - if(last_configurator) - t1 += "Operator: [last_configurator]
" + t1 += "Access requirement is set to " + t1 += one_access ? "
ONE
" : "ALL
" - if(locked) - t1 += "Swipe ID
" - else - t1 += "Block
" + t1 += conf_access == null ? "All
" : "All
" - t1 += "Access requirement is set to " - t1 += one_access ? "ONE
" : "ALL
" + t1 += "
" - t1 += conf_access == null ? "All
" : "All
" + var/list/accesses = get_all_accesses() + for(var/acc in accesses) + var/aname = get_access_desc(acc) - t1 += "
" - - var/list/accesses = get_all_accesses() - for(var/acc in accesses) - var/aname = get_access_desc(acc) - - if(!conf_access || !conf_access.len || !(acc in conf_access)) - t1 += "[aname]
" - else if(one_access) - t1 += "[aname]
" - else - t1 += "[aname]
" + if(!conf_access || !conf_access.len || !(acc in conf_access)) + t1 += "[aname]
" + else if(one_access) + t1 += "[aname]
" + else + t1 += "[aname]
" t1 += "

Close

\n" @@ -66,20 +56,9 @@ return 1 if(href_list["close"]) - usr << browse(null, "window=airlock") + usr << browse(null, "window=airlock_electronics") return - if(href_list["login"]) - if(allowed(usr)) - locked = FALSE - last_configurator = usr.name - - if(locked) - return - - if(href_list["logout"]) - locked = TRUE - if(href_list["one_access"]) one_access = !one_access diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 78949fa0e45..563e4eb49f2 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -325,7 +325,7 @@ /obj/machinery/door/proc/crush() for(var/mob/living/L in get_turf(src)) - L.visible_message("[src] closes on [L], crushing them!", "[src] closes on you and crushes you!") + L.visible_message("[src] closes on [L], crushing [L.p_them()]!", "[src] closes on you and crushes you!") if(isalien(L)) //For xenos L.adjustBruteLoss(DOOR_CRUSH_DAMAGE * 1.5) //Xenos go into crit after aproximately the same amount of crushes as humans. L.emote("roar") diff --git a/code/game/machinery/doors/poddoor.dm b/code/game/machinery/doors/poddoor.dm index b20d99b2613..3f9e4f55a08 100644 --- a/code/game/machinery/doors/poddoor.dm +++ b/code/game/machinery/doors/poddoor.dm @@ -53,11 +53,38 @@ if(!hasPower()) open() -/obj/machinery/door/poddoor/multi_tile // Whoever wrote the old code for multi-tile spesspod doors needs to burn in hell. + // Whoever wrote the old code for multi-tile spesspod doors needs to burn in hell. - Unknown + // Wise words. - Bxil +/obj/machinery/door/poddoor/multi_tile name = "large pod door" layer = CLOSED_DOOR_LAYER closingLayer = CLOSED_DOOR_LAYER +/obj/machinery/door/poddoor/multi_tile/New() + . = ..() + apply_opacity_to_my_turfs(opacity) + +/obj/machinery/door/poddoor/multi_tile/open() + if(..()) + apply_opacity_to_my_turfs(opacity) + + +/obj/machinery/door/poddoor/multi_tile/close() + if(..()) + apply_opacity_to_my_turfs(opacity) + +/obj/machinery/door/poddoor/multi_tile/Destroy() + apply_opacity_to_my_turfs(0) + return ..() + +//Multi-tile poddoors don't turn invisible automatically, so we change the opacity of the turfs below instead one by one. +/obj/machinery/door/poddoor/multi_tile/proc/apply_opacity_to_my_turfs(var/new_opacity) + for(var/turf/T in locs) + T.opacity = new_opacity + T.has_opaque_atom = new_opacity + T.reconsider_lights() + update_freelook_sight() + /obj/machinery/door/poddoor/multi_tile/four_tile_ver/ icon = 'icons/obj/doors/1x4blast_vert.dmi' width = 4 diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 181e273dd43..1ab22f341b6 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -16,17 +16,20 @@ var/obj/item/airlock_electronics/electronics var/base_state = "left" var/reinf = 0 + var/cancolor = TRUE var/shards = 2 var/rods = 2 var/cable = 1 var/list/debris = list() -/obj/machinery/door/window/New() +/obj/machinery/door/window/New(loc, set_dir) ..() + if(set_dir) + setDir(set_dir) if(req_access && req_access.len) icon_state = "[icon_state]" base_state = icon_state - if(!color) + if(!color && cancolor) color = color_windows(src) for(var/i in 1 to shards) debris += new /obj/item/shard(src) @@ -97,6 +100,16 @@ return 1 if(get_dir(loc, target) == dir) //Make sure looking at appropriate border return !density + if(istype(mover, /obj/structure/window)) + var/obj/structure/window/W = mover + if(!valid_window_location(loc, W.ini_dir)) + return FALSE + else if(istype(mover, /obj/structure/windoor_assembly)) + var/obj/structure/windoor_assembly/W = mover + if(!valid_window_location(loc, W.ini_dir)) + return FALSE + else if(istype(mover, /obj/machinery/door/window) && !valid_window_location(loc, mover.dir)) + return FALSE else return 1 @@ -128,7 +141,7 @@ if(emagged) return 0 if(!operating) //in case of emag - operating = 1 + operating = TRUE do_animate("opening") playsound(loc, 'sound/machines/windowdoor.ogg', 100, 1) icon_state ="[base_state]open" @@ -152,7 +165,7 @@ if(forced < 2) if(emagged) return 0 - operating = 1 + operating = TRUE do_animate("closing") playsound(loc, 'sound/machines/windowdoor.ogg', 100, 1) icon_state = base_state @@ -186,6 +199,11 @@ /obj/machinery/door/window/narsie_act() color = NARSIE_WINDOW_COLOUR +/obj/machinery/door/window/ratvar_act() + var/obj/machinery/door/window/clockwork/C = new(loc, dir) + C.name = name + qdel(src) + /obj/machinery/door/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > T0C + (reinf ? 1600 : 800)) take_damage(round(exposed_volume / 200), BURN, 0, 0) @@ -204,7 +222,7 @@ /obj/machinery/door/window/emag_act(mob/user, obj/weapon) if(!operating && density && !emagged) emagged = TRUE - operating = 1 + operating = TRUE flick("[base_state]spark", src) playsound(src, "sparks", 75, 1) sleep(6) @@ -314,6 +332,45 @@ desc = "For keeping in criminal scum." req_access = list(access_brig) +/obj/machinery/door/window/clockwork + name = "brass windoor" + desc = "A thin door with translucent brass paneling." + icon_state = "clockwork" + base_state = "clockwork" + shards = 0 + rods = 0 + burn_state = FIRE_PROOF + cancolor = FALSE + var/made_glow = FALSE + +/obj/machinery/door/window/clockwork/New(loc, set_dir) + ..() + debris += new/obj/item/stack/tile/brass(src, 2) + +/obj/machinery/door/window/clockwork/setDir(direct) + if(!made_glow) + var/obj/effect/E = new /obj/effect/temp_visual/ratvar/door/window(get_turf(src)) + E.setDir(direct) + made_glow = TRUE + ..() + +/obj/machinery/door/window/clockwork/emp_act(severity) + if(prob(80/severity)) + open() + +/obj/machinery/door/window/clockwork/ratvar_act() + obj_integrity = max_integrity + +/obj/machinery/door/window/clockwork/hasPower() + return TRUE //yup that's power all right + +/obj/machinery/door/window/clockwork/narsie_act() + take_damage(rand(30, 60), BRUTE) + if(src) + var/previouscolor = color + color = "#960000" + animate(src, color = previouscolor, time = 8) + /obj/machinery/door/window/northleft dir = NORTH diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index f8d7432c540..f06f7ac1b37 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -8,6 +8,20 @@ var/list/doppler_arrays = list() density = 1 anchored = 1 atom_say_verb = "states coldly" + var/list/logged_explosions = list() + +/datum/explosion_log + var/logged_time + var/epicenter + var/actual_size_message + var/theoretical_size_message + +/datum/explosion_log/New(var/log_time, var/log_epicenter, var/log_actual_size_message, var/log_theoretical_size_message) + ..() + logged_time = log_time + epicenter = log_epicenter + actual_size_message = log_actual_size_message + theoretical_size_message = log_theoretical_size_message /obj/machinery/doppler_array/New() ..() @@ -15,70 +29,122 @@ var/list/doppler_arrays = list() /obj/machinery/doppler_array/Destroy() doppler_arrays -= src + logged_explosions.Cut() return ..() /obj/machinery/doppler_array/process() return PROCESS_KILL -/obj/machinery/doppler_array/attackby(var/obj/item/O, var/mob/user, params) - if(istype(O, /obj/item/wrench)) +/obj/machinery/doppler_array/attackby(obj/item/I, mob/user, params) + if(iswrench(I)) if(!anchored && !isinspace()) - anchored = 1 + anchored = TRUE power_change() to_chat(user, "You fasten [src].") else if(anchored) - anchored = 0 + anchored = FALSE power_change() to_chat(user, "You unfasten [src].") - playsound(loc, O.usesound, 50, 1) + playsound(loc, I.usesound, 50, 1) + else + return ..() -/obj/machinery/doppler_array/verb/rotate() +/obj/machinery/doppler_array/attack_hand(mob/user) + if(..()) + return + add_fingerprint(user) + ui_interact(user) + +/obj/machinery/doppler_array/attack_ghost(mob/user) + ui_interact(user) + +/obj/machinery/doppler_array/AltClick(mob/user) + rotate(user) + +/obj/machinery/doppler_array/verb/rotate(mob/user) set name = "Rotate Tachyon-doppler Dish" set category = "Object" set src in oview(1) - if(!usr || !isturf(usr.loc)) + if(user.incapacitated()) return - if(usr.stat || usr.restrained() || !usr.canmove) + if(!Adjacent(user)) return - src.dir = turn(src.dir, 90) - return + if(!user.IsAdvancedToolUser()) + to_chat(user, "You don't have the dexterity to do that!") + return + dir = turn(dir, 90) + to_chat(user, "You rotate [src].") + +/obj/machinery/doppler_array/proc/print_explosive_logs(mob/user) + if(!logged_explosions.len) + atom_say("No logs currently stored in internal database.") + return + if(active_timers) + to_chat(user, "[src] is already printing something, please wait.") + return + atom_say("Printing explosive log. Standby...") + addtimer(CALLBACK(src, .print), 50) + +/obj/machinery/doppler_array/proc/print() + visible_message("[src] prints a piece of paper!") + playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1) + var/obj/item/paper/explosive_log/P = new(get_turf(src)) + for(var/D in logged_explosions) + var/datum/explosion_log/E = D + P.info += "\ + [E.logged_time]\ + [E.epicenter]\ + [E.actual_size_message]\ + [E.theoretical_size_message]\ + " + P.info += "
\ + Printed at [station_time_timestamp()]." /obj/machinery/doppler_array/proc/sense_explosion(var/x0,var/y0,var/z0,var/devastation_range,var/heavy_impact_range,var/light_impact_range, var/took,var/orig_dev_range,var/orig_heavy_range,var/orig_light_range) - if(stat & NOPOWER) return - if(z != z0) return + if(stat & NOPOWER) + return + if(z != z0) + return var/dx = abs(x0-x) var/dy = abs(y0-y) var/distance var/direct + var/capped = FALSE if(dx > dy) distance = dx - if(x0 > x) direct = EAST - else direct = WEST + if(x0 > x) + direct = EAST + else + direct = WEST else distance = dy - if(y0 > y) direct = NORTH - else direct = SOUTH - - if(distance > 100) return - if(!(direct & dir)) return + if(y0 > y) + direct = NORTH + else + direct = SOUTH + if(distance > 100) + return + if(!(direct & dir)) + return var/list/messages = list("Explosive disturbance detected.", \ "Epicenter at: grid ([x0],[y0]). Temporal displacement of tachyons: [took] seconds.", \ "Factual: Epicenter radius: [devastation_range]. Outer radius: [heavy_impact_range]. Shockwave radius: [light_impact_range].") - // If the bomb was capped, say it's theoretical size. + // If the bomb was capped, say its theoretical size. if(devastation_range < orig_dev_range || heavy_impact_range < orig_heavy_range || light_impact_range < orig_light_range) + capped = TRUE messages += "Theoretical: Epicenter radius: [orig_dev_range]. Outer radius: [orig_heavy_range]. Shockwave radius: [orig_light_range]." - + logged_explosions.Insert(1, new /datum/explosion_log(station_time_timestamp(), "[x0],[y0]", "[devastation_range], [heavy_impact_range], [light_impact_range]", capped ? "[orig_dev_range], [orig_heavy_range], [orig_light_range]" : "n/a")) //Newer logs appear first + messages += "Event successfully logged in internal database." for(var/message in messages) atom_say(message) - /obj/machinery/doppler_array/power_change() if(stat & BROKEN) icon_state = "[initial(icon_state)]-broken" @@ -88,4 +154,55 @@ var/list/doppler_arrays = list() stat &= ~NOPOWER else icon_state = "[initial(icon_state)]-off" - stat |= NOPOWER \ No newline at end of file + stat |= NOPOWER + +/obj/machinery/doppler_array/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "doppler_array.tmpl", "Tachyon-doppler array", 500, 650) + ui.open() + ui.set_auto_update(1) + +/obj/machinery/doppler_array/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state) + var/data[0] + var/list/explosion_data = list() + for(var/D in logged_explosions) + var/datum/explosion_log/E = D + explosion_data += list(list( + "logged_time" = E.logged_time, + "epicenter" = E.epicenter, + "actual_size_message" = E.actual_size_message, + "theoretical_size_message" = E.theoretical_size_message, + "unique_datum_id" = E.UID())) + data["explosion_data"] = explosion_data + data["printing"] = active_timers + return data + +/obj/machinery/doppler_array/Topic(href, href_list) + if(..()) + return + if(href_list["log_to_delete"]) + var/log_to_delete = sanitize(href_list["log_to_delete"]) + for(var/D in logged_explosions) + var/datum/explosion_log/E = D + if(E.UID() == log_to_delete) + logged_explosions -= E + qdel(E) + to_chat(usr, "Log deletion successful.") + break + else if(href_list["print_logs"]) + print_explosive_logs(usr) + else + return + SSnanoui.update_uis(src) + +/obj/item/paper/explosive_log + name = "explosive log" + info = "

Explosive Log Report

\ + \ + \ + \ + \ + \ + \ + " //NB: the
Time loggedEpicenterActualTheoretical
tag is left open, it is closed later on, when the doppler array adds its data diff --git a/code/game/machinery/dye_generator.dm b/code/game/machinery/dye_generator.dm index bb47a4939ec..89974f9b337 100644 --- a/code/game/machinery/dye_generator.dm +++ b/code/game/machinery/dye_generator.dm @@ -41,7 +41,7 @@ stat |= BROKEN icon_state = "[initial(icon_state)]-broken" -/obj/machinery/dye_generator/attack_hand(mob/user as mob) +/obj/machinery/dye_generator/attack_hand(mob/user) ..() src.add_fingerprint(user) if(stat & (BROKEN|NOPOWER)) @@ -50,18 +50,18 @@ dye_color = temp set_light(2, l_color = temp) -/obj/machinery/dye_generator/attackby(obj/item/W, mob/user, params) +/obj/machinery/dye_generator/attackby(obj/item/I, mob/user, params) - if(default_unfasten_wrench(user, W, time = 60)) + if(default_unfasten_wrench(user, I, time = 60)) return - if(istype(W, /obj/item/hair_dye_bottle)) - user.visible_message("[user] fills the [W] up with some dye.","You fill the [W] up with some hair dye.") - var/obj/item/hair_dye_bottle/HD = W + if(istype(I, /obj/item/hair_dye_bottle)) + var/obj/item/hair_dye_bottle/HD = I + user.visible_message("[user] fills the [HD] up with some dye.","You fill the [HD] up with some hair dye.") HD.dye_color = dye_color HD.update_dye_overlay() else - ..() + return ..() //Hair Dye Bottle @@ -87,7 +87,7 @@ I.color = dye_color overlays += I -/obj/item/hair_dye_bottle/attack(mob/living/carbon/M as mob, mob/user as mob) +/obj/item/hair_dye_bottle/attack(mob/living/carbon/M, mob/user) if(user.a_intent != INTENT_HELP) ..() return diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 8cb98021576..b3664c58cd6 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -45,7 +45,7 @@ FIRE ALARM /obj/machinery/firealarm/emag_act(mob/user) if(!emagged) - emagged = 1 + emagged = TRUE if(user) user.visible_message("Sparks fly out of the [src]!", "You emag [src], disabling its thermal sensors.") @@ -62,19 +62,15 @@ FIRE ALARM /obj/machinery/firealarm/attack_ghost(mob/user) ui_interact(user) -/obj/machinery/firealarm/bullet_act(BLAH) - return alarm() - - /obj/machinery/firealarm/emp_act(severity) if(prob(50/severity)) alarm(rand(30/severity, 60/severity)) ..() -/obj/machinery/firealarm/attackby(obj/item/W, mob/user, params) +/obj/machinery/firealarm/attackby(obj/item/I, mob/user, params) add_fingerprint(user) - if(istype(W, /obj/item/screwdriver) && buildstage == 2) + if(iswirecutter(I) && buildstage == 2) wiresexposed = !wiresexposed update_icon() return @@ -82,37 +78,37 @@ FIRE ALARM if(wiresexposed) switch(buildstage) if(2) - if(istype(W, /obj/item/multitool)) + if(ismultitool(I)) detecting = !detecting if(detecting) user.visible_message("[user] has reconnected [src]'s detecting unit!", "You have reconnected [src]'s detecting unit.") else user.visible_message("[user] has disconnected [src]'s detecting unit!", "You have disconnected [src]'s detecting unit.") - else if(istype(W, /obj/item/wirecutters)) // cutting the wires out + else if(iswirecutter(I)) // cutting the wires out to_chat(user, "You cut the wires!") - playsound(loc, W.usesound, 50, 1) + playsound(loc, I.usesound, 50, 1) var/obj/item/stack/cable_coil/new_coil = new /obj/item/stack/cable_coil() new_coil.amount = 5 - new_coil.loc = user.loc + new_coil.forceMove(user.loc) buildstage = 1 update_icon() if(1) - if(istype(W, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/coil = W + if(istype(I, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/coil = I if(!coil.use(5)) to_chat(user, "You cut the wires!") return buildstage = 2 - playsound(get_turf(src), W.usesound, 50, 1) - to_chat(user, "You wire \the [src]!") + playsound(get_turf(src), I.usesound, 50, 1) + to_chat(user, "You wire [src]!") update_icon() - else if(istype(W, /obj/item/crowbar)) + else if(iscrowbar(I)) to_chat(user, "You pry out the circuit!") - playsound(get_turf(src), W.usesound, 50, 1) - if(do_after(user, 20 * W.toolspeed, target = src)) + playsound(get_turf(src), I.usesound, 50, 1) + if(do_after(user, 20 * I.toolspeed, target = src)) if(buildstage != 1) return var/obj/item/firealarm_electronics/circuit = new /obj/item/firealarm_electronics() @@ -120,20 +116,20 @@ FIRE ALARM buildstage = 0 update_icon() if(0) - if(istype(W, /obj/item/firealarm_electronics)) + if(istype(I, /obj/item/firealarm_electronics)) to_chat(user, "You insert the circuit!") - qdel(W) + qdel(I) buildstage = 1 update_icon() - else if(istype(W, /obj/item/wrench)) + else if(iswrench(I)) to_chat(user, "You remove the fire alarm assembly from the wall!") new /obj/item/mounted/frame/firealarm(get_turf(user)) - playsound(get_turf(src), W.usesound, 50, 1) + playsound(get_turf(src), I.usesound, 50, 1) qdel(src) - return - alarm() + else + return ..() /obj/machinery/firealarm/process()//Note: this processing was mostly phased out due to other code, and only runs when needed if(stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index da64430b941..7a13b0bf796 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -38,14 +38,16 @@ // sd_set_light(0) //Don't want to render prison breaks impossible -/obj/machinery/flasher/attackby(obj/item/W as obj, mob/user as mob, params) - if(istype(W, /obj/item/wirecutters)) +/obj/machinery/flasher/attackby(obj/item/I, mob/user, params) + if(iswirecutter(I)) add_fingerprint(user) disable = !disable if(disable) - user.visible_message("[user] has disconnected the [src]'s flashbulb!", "You disconnect the [src]'s flashbulb!") + user.visible_message("[user] has disconnected [src]'s flashbulb!", "You disconnect [src]'s flashbulb!") if(!disable) - user.visible_message("[user] has connected the [src]'s flashbulb!", "You connect the [src]'s flashbulb!") + user.visible_message("[user] has connected [src]'s flashbulb!", "You connect [src]'s flashbulb!") + else + return ..() //Let the AI trigger them directly. /obj/machinery/flasher/attack_ai(mob/user) @@ -76,7 +78,7 @@ L.Weaken(strength) if(L.weakeyes) L.Weaken(strength * 1.5) - L.visible_message("[L] gasps and shields their eyes!") + L.visible_message("[L] gasps and shields [L.p_their()] eyes!") /obj/machinery/flasher/emp_act(severity) if(stat & (BROKEN|NOPOWER)) @@ -95,8 +97,8 @@ if((M.m_intent != MOVE_INTENT_WALK) && (anchored)) flash() -/obj/machinery/flasher/portable/attackby(obj/item/W as obj, mob/user as mob, params) - if(istype(W, /obj/item/wrench)) +/obj/machinery/flasher/portable/attackby(obj/item/I, mob/user, params) + if(iswrench(I)) add_fingerprint(user) anchored = !anchored @@ -107,6 +109,8 @@ else if(anchored) user.show_message(text("[src] is now secured.")) overlays += "[base_state]-s" + else + return ..() // Flasher button /obj/machinery/flasher_button diff --git a/code/game/machinery/gameboard.dm b/code/game/machinery/gameboard.dm index f1bd8b65a10..526a935cf90 100644 --- a/code/game/machinery/gameboard.dm +++ b/code/game/machinery/gameboard.dm @@ -93,8 +93,11 @@ if(href_list["close"]) close_game() -/obj/machinery/gameboard/attackby(var/obj/item/G as obj, var/mob/user as mob, params) - if(istype(G, /obj/item/wrench)) - default_unfasten_wrench(user, G) - else if(istype(G, /obj/item/crowbar)) - default_deconstruction_crowbar(G, ignore_panel = 1) +/obj/machinery/gameboard/attackby(obj/item/I, mob/user, params) + if(default_unfasten_wrench(user, I)) + return + + if(default_deconstruction_crowbar(I, ignore_panel = TRUE)) + return + else + return ..() \ No newline at end of file diff --git a/code/game/machinery/guestpass.dm b/code/game/machinery/guestpass.dm index 6d90de7bf4d..450260f5f79 100644 --- a/code/game/machinery/guestpass.dm +++ b/code/game/machinery/guestpass.dm @@ -48,20 +48,22 @@ var/list/internal_log = list() var/mode = 0 // 0 - making pass, 1 - viewing logs -/obj/machinery/computer/guestpass/attackby(obj/O, mob/user, params) - if(istype(O, /obj/item/card/id)) +/obj/machinery/computer/guestpass/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/card/id)) if(!giver) - user.drop_item() - O.loc = src - giver = O - updateUsrDialog() + if(user.drop_item()) + I.forceMove(src) + giver = I + updateUsrDialog() else to_chat(user, "There is already ID card inside.") + else + return ..() /obj/machinery/computer/guestpass/proc/get_changeable_accesses() return giver.access -/obj/machinery/computer/guestpass/attack_ai(var/mob/user as mob) +/obj/machinery/computer/guestpass/attack_ai(mob/user) return attack_hand(user) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 58404b133bd..bda66a55622 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -1,7 +1,7 @@ -/* Holograms! +/* holograms! * Contains: * Holopad - * Hologram + * hologram * Other stuff */ @@ -9,11 +9,10 @@ Revised. Original based on space ninja hologram code. Which is also mine. /N How it works: AI clicks on holopad in camera view. View centers on holopad. -AI clicks again on the holopad to display a hologram. Hologram stays as long as AI is looking at the pad and it (the hologram) is in range of the pad. +AI clicks again on the holopad to display a hologram. hologram stays as long as AI is looking at the pad and it (the hologram) is in range of the pad. AI can use the directional keys to move the hologram around, provided the above conditions are met and the AI in question is the holopad's master. Only one AI may project from a holopad at any given time. AI may cancel the hologram at any time by clicking on the holopad once more. - Possible to do for anyone motivated enough: Give an AI variable for different hologram icons. Itegrate EMP effect to disable the unit. @@ -27,19 +26,35 @@ Possible to do for anyone motivated enough: // HOLOPAD MODE // 0 = RANGE BASED // 1 = AREA BASED -var/const/HOLOPAD_MODE = 0 +#define HOLOPAD_PASSIVE_POWER_USAGE 1 +#define HOLOGRAM_POWER_USAGE 2 +#define RANGE_BASED 0 +#define AREA_BASED 1 + +var/const/HOLOPAD_MODE = RANGE_BASED + var/list/holopads = list() /obj/machinery/hologram/holopad - name = "\improper AI holopad" - desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely." + name = "holopad" + desc = "It's a floor-mounted device for projecting holographic images." icon_state = "holopad0" - + anchored = 1 + use_power = 1 + idle_power_usage = 5 + active_power_usage = 100 layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them. armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0) - var/mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time. + var/list/masters = list()//List of living mobs that use the holopad + var/list/holorays = list()//Holoray-mob link. var/last_request = 0 //to prevent request spam. ~Carn var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating. + var/temp = "" + var/list/holo_calls //array of /datum/holocalls + var/datum/holocall/outgoing_call //do not modify the datums only check and call the public procs + var/static/force_answer_call = FALSE //Calls will be automatically answered after a couple rings, here for debugging + var/obj/effect/overlay/holoray/ray + var/ringing = FALSE /obj/machinery/hologram/holopad/New() ..() @@ -49,216 +64,426 @@ var/list/holopads = list() component_parts += new /obj/item/stock_parts/capacitor(null) RefreshParts() +/obj/machinery/hologram/holopad/Destroy() + if(outgoing_call) + outgoing_call.ConnectionFailure(src) + + for(var/I in holo_calls) + var/datum/holocall/HC = I + HC.ConnectionFailure(src) + + for(var/I in masters) + clear_holo(I) + holopads -= src + return ..() + +/obj/machinery/hologram/holopad/power_change() + if(powered()) + stat &= ~NOPOWER + else + stat |= NOPOWER + if(outgoing_call) + outgoing_call.ConnectionFailure(src) + /obj/machinery/hologram/holopad/RefreshParts() var/holograph_range = 4 for(var/obj/item/stock_parts/capacitor/B in component_parts) holograph_range += 1 * B.rating holo_range = holograph_range -/obj/machinery/hologram/holopad/attackby(obj/item/P as obj, mob/user as mob, params) - if(default_deconstruction_screwdriver(user, "holopad_open", "holopad0", P)) +/obj/machinery/hologram/holopad/attackby(obj/item/I, mob/user, params) + if(default_deconstruction_screwdriver(user, "holopad_open", "holopad0", I)) return - if(exchange_parts(user, P)) + if(exchange_parts(user, I)) return - if(default_unfasten_wrench(user, P)) + if(default_unfasten_wrench(user, I)) return - default_deconstruction_crowbar(P) + if(default_deconstruction_crowbar(I)) + return + else + return ..() -/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests. +/obj/machinery/hologram/holopad/attack_hand(mob/living/carbon/human/user) + if(..()) + return + + if(outgoing_call) + return + + user.set_machine(src) + interact(user) + +/obj/machinery/hologram/holopad/AltClick(mob/living/carbon/human/user) + if(..()) + return + if(isAI(user)) + hangup_all_calls() + return + +//Stop ringing the AI!! +/obj/machinery/hologram/holopad/proc/hangup_all_calls() + for(var/I in holo_calls) + var/datum/holocall/HC = I + HC.Disconnect(src) + +/obj/machinery/hologram/holopad/interact(mob/living/carbon/human/user) //Carn: hologram requests. if(!istype(user)) return - if(alert(user,"Would you like to request an AI's presence?",,"Yes","No") == "Yes") - if(last_request + 200 < world.time) //don't spam the AI with requests you jerk! - last_request = world.time - to_chat(user, "You request an AI's presence.") - var/area/area = get_area(src) - for(var/mob/living/silicon/ai/AI in living_mob_list) - if(!AI.client) continue - to_chat(AI, "Your presence is requested at \the [area].") - else - to_chat(user, "A request for AI presence was already sent recently.") + var/dat + if(temp) + dat = temp + else + dat = "Request an AI's presence.
" + dat += "Call another holopad.
" + + if(LAZYLEN(holo_calls)) + dat += "=====================================================
" + + var/one_answered_call = FALSE + var/one_unanswered_call = FALSE + for(var/I in holo_calls) + var/datum/holocall/HC = I + if(HC.connected_holopad != src) + dat += "Answer call from [get_area(HC.calling_holopad)].
" + one_unanswered_call = TRUE + else + one_answered_call = TRUE + + if(one_answered_call && one_unanswered_call) + dat += "=====================================================
" + //we loop twice for formatting + for(var/I in holo_calls) + var/datum/holocall/HC = I + if(HC.connected_holopad == src) + dat += "Disconnect call from [HC.user].
" + + var/area/area = get_area(src) + var/datum/browser/popup = new(user, "holopad", "[area] holopad", 400, 300) + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(icon, icon_state)) + popup.open() + +/obj/machinery/hologram/holopad/Topic(href, href_list) + if(..() || isAI(usr)) + return + add_fingerprint(usr) + if(stat & NOPOWER) + return + if(href_list["AIrequest"]) + if(last_request + 200 < world.time) + last_request = world.time + temp = "You requested an AI's presence.
" + temp += "Main Menu" + var/area/area = get_area(src) + for(var/mob/living/silicon/ai/AI in ai_list) + if(!AI.client) + continue + to_chat(AI, "Your presence is requested at \the [area].") + else + temp = "A request for AI presence was already sent recently.
" + temp += "Main Menu" + + else if(href_list["Holocall"]) + if(outgoing_call) + return + + temp = "You must stand on the holopad to make a call!
" + temp += "Main Menu" + if(usr.loc == loc) + var/list/callnames = list() + for(var/I in holopads) + var/area/A = get_area(I) + if(A) + LAZYADD(callnames[A], I) + callnames -= get_area(src) + + var/result = input(usr, "Choose an area to call", "Holocall") as null|anything in callnames + + if(QDELETED(usr) || !result || outgoing_call) + return + + if(usr.loc == loc) + temp = "Dialing...
" + temp += "Main Menu" + new /datum/holocall(usr, src, callnames[result]) + + else if(href_list["connectcall"]) + var/datum/holocall/call_to_connect = locateUID(href_list["connectcall"]) + if(!QDELETED(call_to_connect) && (call_to_connect in holo_calls)) + call_to_connect.Answer(src) + temp = "" + + else if(href_list["disconnectcall"]) + var/datum/holocall/call_to_disconnect = locateUID(href_list["disconnectcall"]) + if(!QDELETED(call_to_disconnect)) + call_to_disconnect.Disconnect(src) + temp = "" + + else if(href_list["mainmenu"]) + temp = "" + if(outgoing_call) + outgoing_call.Disconnect() + + updateDialog() + +//do not allow AIs to answer calls or people will use it to meta the AI satellite /obj/machinery/hologram/holopad/attack_ai(mob/living/silicon/ai/user) if(!istype(user)) return + if(outgoing_call) + return /*There are pretty much only three ways to interact here. I don't need to check for client since they're clicking on an object. This may change in the future but for now will suffice.*/ - if(user.eyeobj.loc != src.loc)//Set client eye on the object if it's not already. + if(user.eyeobj.loc != loc)//Set client eye on the object if it's not already. user.eyeobj.setLoc(get_turf(src)) - else if(!hologram)//If there is no hologram, possibly make one. - activate_holo(user, 0) - else if(master == user)//If there is a hologram, remove it. But only if the user is the master. Otherwise do nothing. - clear_holo() - return + else if(!LAZYLEN(masters) || !masters[user])//If there is no hologram, possibly make one. + activate_holo(user, 1) + else//If there is a hologram, remove it. + clear_holo(user) -/obj/machinery/hologram/holopad/proc/activate_holo(mob/living/silicon/ai/user, var/force = 0) - if(!force && user.eyeobj.loc != src.loc) // allows holopads to pass off holograms to the next holopad in the chain +/obj/machinery/hologram/holopad/process() + for(var/I in masters) + var/mob/living/master = I + if((stat & NOPOWER) || !validate_user(master)) + clear_holo(master) + + if(outgoing_call) + outgoing_call.Check() + + ringing = FALSE + + for(var/I in holo_calls) + var/datum/holocall/HC = I + //Sanity check and skip if no longer valid call + if(!HC.Check()) + atom_say("Call was terminated at remote terminal.") + continue + + if(HC.connected_holopad != src) + if(force_answer_call && world.time > (HC.call_start_time + (HOLOPAD_MAX_DIAL_TIME / 2))) + HC.Answer(src) + break + if(outgoing_call) + HC.Disconnect(src)//can't answer calls while calling + else + playsound(src, 'sound/machines/twobeep.ogg', 100) //bring, bring! + ringing = TRUE + + update_icon() + + +//Try to transfer hologram to another pad that can project on T +/obj/machinery/hologram/holopad/proc/transfer_to_nearby_pad(turf/T, mob/holo_owner) + if(!isAI(holo_owner)) + return + for(var/pad in holopads) + var/obj/machinery/hologram/holopad/another = pad + if(another == src) + continue + if(another.validate_location(T)) + var/obj/effect/overlay/holo_pad_hologram/h = masters[holo_owner] + unset_holo(holo_owner) + another.set_holo(holo_owner, h) + return TRUE + return FALSE + +/obj/machinery/hologram/holopad/proc/validate_user(mob/living/user) + if(QDELETED(user) || user.incapacitated() || !user.client) + return FALSE + + if(istype(user, /mob/living/silicon/ai)) + var/mob/living/silicon/ai/AI = user + if(!AI.current) + return FALSE + return TRUE + +//Can we display holos there +//Area check instead of line of sight check because this is a called a lot if AI wants to move around. +/obj/machinery/hologram/holopad/proc/validate_location(turf/T,check_los = FALSE) + if(T.z == z && get_dist(T, src) <= holo_range && T.loc == get_area(src)) + return TRUE + return FALSE + + +/obj/machinery/hologram/holopad/proc/move_hologram(mob/living/user, turf/new_turf) + if(masters[user]) + var/obj/effect/overlay/holo_pad_hologram/holo = masters[user] + var/transfered = FALSE + if(!validate_location(new_turf)) + if(!transfer_to_nearby_pad(new_turf,user)) + clear_holo(user) + return FALSE + else + transfered = TRUE + //All is good. + holo.setDir(get_dir(holo.loc, new_turf)) + holo.forceMove(new_turf) + if(!transfered) + update_holoray(user,new_turf) + return TRUE + +/obj/machinery/hologram/holopad/proc/activate_holo(mob/living/user, var/force = 0) + var/mob/living/silicon/ai/AI = user + if(!istype(AI)) + AI = null + if(AI && !force && AI.eyeobj.loc != loc) // allows holopads to pass off holograms to the next holopad in the chain to_chat(user, "ERROR: Unable to project hologram.") - else if(!(stat & NOPOWER))//If the projector has power - if(user.holo) - var/obj/machinery/hologram/holopad/current = user.holo - current.clear_holo() - if(!hologram)//If there is not already a hologram. - create_holo(user)//Create one. - src.visible_message("A holographic image of [user] flicks to life right before your eyes!") - else - to_chat(user, "ERROR: Image feed in progress.") - else - to_chat(user, "ERROR: Unable to project hologram.") - return + if(!(stat & NOPOWER) && (!AI || force)) + if(AI && (istype(AI.current, /obj/machinery/hologram/holopad))) + to_chat(user, "ERROR: Image feed in progress.") + return + + var/obj/effect/overlay/holo_pad_hologram/hologram = new(loc)//Spawn a blank effect at the location. + if(isAI(user)) + hologram.icon = AI.holo_icon + else //make it like real life + hologram.icon = getHologramIcon(get_id_photo(user)) + hologram.icon_state = user.icon_state + hologram.alpha = 100 + hologram.Impersonation = user + + hologram.mouse_opacity = 0//So you can't click on it. + hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them. + hologram.anchored = 1//So space wind cannot drag it. + hologram.name = "[user.name] (hologram)"//If someone decides to right click. + hologram.set_light(2) //hologram lighting + move_hologram() + + set_holo(user, hologram) + + if(!masters[user])//If there is not already a hologram. + visible_message("A holographic image of [user] flicks to life right before your eyes!") + + return hologram + + + to_chat(user, "ERROR: Hologram Projection Malfunction.") + clear_holo(user)//safety check /*This is the proc for special two-way communication between AI and holopad/people talking near holopad. For the other part of the code, check silicon say.dm. Particularly robot talk.*/ -/obj/machinery/hologram/holopad/hear_talk(mob/living/M, text, verb, datum/language/speaking) - if(M && hologram && master)//Master is mostly a safety in case lag hits or something. - master.relay_speech(M, text, verb, speaking) +/obj/machinery/hologram/holopad/hear_talk(atom/movable/speaker, message, verb, datum/language/message_language) + if(speaker && masters.len)//Master is mostly a safety in case lag hits or something. Radio_freq so AIs dont hear holopad stuff through radios. + for(var/mob/living/silicon/ai/master in masters) + if(masters[master] && speaker != master) + master.relay_speech(speaker, message, verb, message_language) -/obj/machinery/hologram/holopad/hear_message(mob/living/M, text) - if(M&&hologram&&master)//Master is mostly a safety in case lag hits or something. - var/name_used = M.GetVoice() - var/rendered = "Holopad received, [name_used] [text]" - master.show_message(rendered, 2) - return + for(var/I in holo_calls) + var/datum/holocall/HC = I + if(HC.connected_holopad == src && speaker != HC.hologram) + HC.user.hear_say(message, verb, message_language, speaker = speaker) -/obj/machinery/hologram/holopad/proc/create_holo(mob/living/silicon/ai/A, turf/T = loc) - hologram = new(T)//Spawn a blank effect at the location. - hologram.icon = A.holo_icon - hologram.mouse_opacity = 0//So you can't click on it. - hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them. - hologram.anchored = 1//So space wind cannot drag it. - hologram.name = "[A.name] (Hologram)"//If someone decides to right click. - hologram.set_light(2) //hologram lighting - set_light(2) //pad lighting - icon_state = "holopad1" - A.holo = src - master = A//AI is the master. - use_power = 2//Active power usage. - return 1 + if(outgoing_call && speaker == outgoing_call.user) + outgoing_call.hologram.atom_say(message) -/obj/machinery/hologram/holopad/proc/clear_holo() -// hologram.set_light(0)//Clear lighting. //handled by the lighting controller when its ower is deleted - QDEL_NULL(hologram)//Get rid of hologram. - if(master.holo == src) - master.holo = null - master = null//Null the master, since no-one is using it now. - set_light(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted) - icon_state = "holopad0" - use_power = 1//Passive power usage. - return 1 -/obj/machinery/hologram/holopad/process() - if(hologram)//If there is a hologram. - if(master && !master.stat && master.client && master.eyeobj)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector. - if(!(stat & NOPOWER))//If the machine has power. - if((HOLOPAD_MODE == 0 && (get_dist(master.eyeobj, src) <= holo_range))) - return 1 - else if(HOLOPAD_MODE == 1) - - var/area/holo_area = get_area(src) - var/area/eye_area = get_area(master.eyeobj) - - if(eye_area != holo_area) - return 1 - - var/mob/living/silicon/ai/theai = master - var/turf/target_turf = get_turf(master.eyeobj) - var/newdir = hologram.dir - clear_holo()//If not, we want to get rid of the hologram. - var/obj/machinery/hologram/holopad/pad_close = get_closest_atom(/obj/machinery/hologram/holopad, holopads, theai.eyeobj) - if(get_dist(pad_close, theai.eyeobj) <= pad_close.holo_range) - if(!(pad_close.stat & NOPOWER) && !pad_close.hologram && (theai && !theai.stat && theai.client)) - pad_close.activate_holo(theai, 1) - if(pad_close.hologram) - pad_close.hologram.forceMove(target_turf) - pad_close.hologram.dir = newdir - return 1 - -/obj/machinery/hologram/holopad/proc/move_hologram() - if(hologram) - step_to(hologram, master.eyeobj) // So it turns. - hologram.loc = get_turf(master.eyeobj) - - return 1 - -// Simple helper to face what you clicked on, in case it should be needed in more than one place -/obj/machinery/hologram/holopad/proc/face_atom(var/atom/A) - if( !hologram || !A || !hologram.x || !hologram.y || !A.x || !A.y ) return - var/dx = A.x - hologram.x - var/dy = A.y - hologram.y - if(!dx && !dy) // Wall items are graphically shifted but on the floor - if(A.pixel_y > 16) hologram.dir = NORTH - else if(A.pixel_y < -16)hologram.dir = SOUTH - else if(A.pixel_x > 16) hologram.dir = EAST - else if(A.pixel_x < -16)hologram.dir = WEST - return - - if(abs(dx) < abs(dy)) - if(dy > 0) hologram.dir = NORTH - else hologram.dir = SOUTH +/obj/machinery/hologram/holopad/proc/SetLightsAndPower() + var/total_users = masters.len + LAZYLEN(holo_calls) + use_power = HOLOPAD_PASSIVE_POWER_USAGE + HOLOGRAM_POWER_USAGE * total_users + if(total_users) + set_light(2) + icon_state = "holopad1" else - if(dx > 0) hologram.dir = EAST - else hologram.dir = WEST + set_light(0) + icon_state = "holopad0" + update_icon() -/* - * Hologram - */ +/obj/machinery/hologram/holopad/update_icon() + var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls) + if(ringing) + icon_state = "holopad_ringing" + else if(total_users) + icon_state = "holopad1" + else + icon_state = "holopad0" -/obj/machinery/hologram - anchored = 1 - use_power = 1 - idle_power_usage = 5 - active_power_usage = 100 - var/obj/effect/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise. -//Destruction procs. -/obj/machinery/hologram/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - if(2.0) - if(prob(50)) - qdel(src) - if(3.0) - if(prob(5)) - qdel(src) - return +/obj/machinery/hologram/holopad/proc/set_holo(mob/living/user, var/obj/effect/overlay/holo_pad_hologram/h) + masters[user] = h + holorays[user] = new /obj/effect/overlay/holoray(loc) + var/mob/living/silicon/ai/AI = user + if(istype(AI)) + AI.current = src + SetLightsAndPower() + update_holoray(user, get_turf(loc)) + return TRUE -/obj/machinery/hologram/blob_act() - qdel(src) - return +/obj/machinery/hologram/holopad/proc/clear_holo(mob/living/user) + qdel(masters[user]) // Get rid of user's hologram + unset_holo(user) + return TRUE -/obj/machinery/hologram/holopad/Destroy() - holopads -= src - if(hologram) - clear_holo() +/obj/machinery/hologram/holopad/proc/unset_holo(mob/living/user) + var/mob/living/silicon/ai/AI = user + if(istype(AI) && AI.current == src) + AI.current = null + masters -= user // Discard AI from the list of those who use holopad + qdel(holorays[user]) + holorays -= user + SetLightsAndPower() + return TRUE + +/obj/machinery/hologram/holopad/proc/update_holoray(mob/living/user, turf/new_turf) + var/obj/effect/overlay/holo_pad_hologram/holo = masters[user] + var/obj/effect/overlay/holoray/ray = holorays[user] + var/disty = holo.y - ray.y + var/distx = holo.x - ray.x + var/newangle + if(!disty) + if(distx >= 0) + newangle = 90 + else + newangle = 270 + else + newangle = arctan(distx/disty) + if(disty < 0) + newangle += 180 + else if(distx < 0) + newangle += 360 + var/matrix/M = matrix() + if(get_dist(get_turf(holo), new_turf) <= 1) + animate(ray, transform = turn(M.Scale(1, sqrt(distx*distx+disty*disty)), newangle), time = 1) + else + ray.transform = turn(M.Scale(1, sqrt(distx*distx+disty*disty)), newangle) + + +/obj/effect/overlay/holo_pad_hologram + var/mob/living/Impersonation + var/datum/holocall/HC + +/obj/effect/overlay/holo_pad_hologram/Destroy() + Impersonation = null + if(!QDELETED(HC)) + HC.Disconnect(HC.calling_holopad) return ..() -/* -Holographic project of everything else. +/obj/effect/overlay/holo_pad_hologram/Process_Spacemove(movement_dir = 0) + return 1 -/mob/verb/hologram_test() - set name = "Hologram Debug New" - set category = "CURRENT DEBUG" +/obj/effect/overlay/holo_pad_hologram/examine(mob/user) + if(Impersonation) + return Impersonation.examine(user) + return ..() - var/obj/effect/overlay/hologram = new(loc)//Spawn a blank effect at the location. - var/icon/flat_icon = icon(getFlatIcon(src,0))//Need to make sure it's a new icon so the old one is not reused. - flat_icon.ColorTone(rgb(125,180,225))//Let's make it bluish. - flat_icon.ChangeOpacity(0.5)//Make it half transparent. - var/input = input("Select what icon state to use in effect.",,"") - if(input) - var/icon/alpha_mask = new('icons/effects/effects.dmi', "[input]") - flat_icon.AddAlphaMask(alpha_mask)//Finally, let's mix in a distortion effect. - hologram.icon = flat_icon - to_chat(world, "Your icon should appear now.") - return -*/ +/obj/effect/overlay/holoray + name = "holoray" + icon = 'icons/effects/96x96.dmi' + icon_state = "holoray" + layer = FLY_LAYER + density = FALSE + anchored = TRUE + mouse_opacity = 1 + pixel_x = -32 + pixel_y = -32 + alpha = 100 /* * Other Stuff: Is this even used? @@ -268,3 +493,6 @@ Holographic project of everything else. desc = "It makes a hologram appear...with magnets or something..." icon = 'icons/obj/stationobjs.dmi' icon_state = "hologram0" + +#undef HOLOPAD_PASSIVE_POWER_USAGE +#undef HOLOGRAM_POWER_USAGE diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 411543b662f..22d1177c437 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -68,21 +68,23 @@ icon_state = "[base_state]-p" // src.sd_set_light(0) -/obj/machinery/sparker/attackby(obj/item/W as obj, mob/user as mob, params) - if(istype(W, /obj/item/detective_scanner)) +/obj/machinery/sparker/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/detective_scanner)) return - if(istype(W, /obj/item/screwdriver)) + if(isscrewdriver(I)) add_fingerprint(user) - src.disable = !src.disable - if(src.disable) - user.visible_message("[user] has disabled the [src]!", "You disable the connection to the [src].") + disable = !disable + if(disable) + user.visible_message("[user] has disabled [src]!", "You disable the connection to [src].") icon_state = "[base_state]-d" - if(!src.disable) - user.visible_message("[user] has reconnected the [src]!", "You fix the connection to the [src].") - if(src.powered()) + if(!disable) + user.visible_message("[user] has reconnected [src]!", "You fix the connection to [src].") + if(powered()) icon_state = "[base_state]" else icon_state = "[base_state]-p" + else + return ..() /obj/machinery/sparker/attack_ai() if(src.anchored) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index d7a4a3e2b04..4ccaa246578 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -88,17 +88,17 @@ to_chat(usr, "There's nothing attached to the IV drip!") -/obj/machinery/iv_drip/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/reagent_containers)) +/obj/machinery/iv_drip/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/reagent_containers)) if(beaker) to_chat(user, "There is already a reagent container loaded!") return if(!user.drop_item()) return - W.forceMove(src) - beaker = W - to_chat(user, "You attach [W] to [src].") + I.forceMove(src) + beaker = I + to_chat(user, "You attach [I] to [src].") update_icon() else return ..() diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 18fc505a49b..a29dcb9e274 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -118,6 +118,7 @@ Class Procs: var/list/settagwhitelist = list()//WHITELIST OF VARIABLES THAT THE set_tag HREF CAN MODIFY, DON'T PUT SHIT YOU DON'T NEED ON HERE, AND IF YOU'RE GONNA USE set_tag (format_tag() proc), ADD TO THIS LIST. atom_say_verb = "beeps" var/speed_process = 0 // Process as fast as possible? + var/defer_process = 0 /obj/machinery/Initialize() addAtProcessing() @@ -128,7 +129,10 @@ Class Procs: if(use_power) myArea = get_area_master(src) if(!speed_process) - START_PROCESSING(SSmachines, src) + if(!defer_process) + START_PROCESSING(SSmachines, src) + else + START_DEFERRED_PROCESSING(SSmachines, src) else fast_processing += src isprocessing = TRUE // all of these isprocessing = TRUE can be removed when the PS is dead diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index ee4f2e6eb62..116a0f8dbe1 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -97,17 +97,18 @@ updateicon() - else if(istype(I, /obj/item/card/id)||istype(I, /obj/item/pda)) + else if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) if(open) - if(src.allowed(user)) - src.locked = !src.locked - to_chat(user, "Controls are now [src.locked ? "locked" : "unlocked"].") + if(allowed(user)) + locked = !locked + to_chat(user, "Controls are now [locked ? "locked" : "unlocked"].") else to_chat(user, "Access denied.") updateDialog() else to_chat(user, "You must open the cover first!") - return + else + return ..() /obj/machinery/navbeacon/attack_ai(mob/user) interact(user, 1) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 422e697e7b0..491cb93018e 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -306,21 +306,21 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co if(FC.channel_name == channel_name) check = 1 break - if(channel_name == "" || channel_name == REDACTED || scanned_user == "Unknown" || check || (scanned_user in existing_authors)) - temp = "ERROR: Could not submit feed channel to Network.
    " - if(scanned_user in existing_authors) - temp += "
  • There already exists a feed channel under your name.
  • " - if(channel_name == "" || channel_name == REDACTED) - temp += "
  • Invalid channel name.
  • " - if(check) - temp += "
  • Channel name already in use.
  • " - if(scanned_user == "Unknown") - temp += "
  • Channel author unverified.
  • " - temp += "
" - temp_back_screen = NEWSCASTER_CREATE_FC - else - var/choice = alert("Please confirm feed channel creation", "Network Channel Handler", "Confirm", "Cancel") - if(choice == "Confirm") + var/choice = alert("Please confirm feed channel creation", "Network Channel Handler", "Confirm", "Cancel") + if(choice == "Confirm") + if(channel_name == "" || channel_name == REDACTED || scanned_user == "Unknown" || check || (scanned_user in existing_authors)) + temp = "ERROR: Could not submit feed channel to Network.
    " + if(scanned_user in existing_authors) + temp += "
  • There already exists a feed channel under your name.
  • " + if(channel_name == "" || channel_name == REDACTED) + temp += "
  • Invalid channel name.
  • " + if(check) + temp += "
  • Channel name already in use.
  • " + if(scanned_user == "Unknown") + temp += "
  • Channel author unverified.
  • " + temp += "
" + temp_back_screen = NEWSCASTER_CREATE_FC + else var/datum/feed_channel/newChannel = new /datum/feed_channel newChannel.channel_name = channel_name newChannel.author = scanned_user @@ -422,19 +422,19 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co else if(href_list["submit_wanted"]) var/input_param = text2num(href_list["submit_wanted"]) - if(msg == "" || channel_name == "" || scanned_user == "Unknown") - temp = "ERROR: Wanted issue rejected by Network.
    " - if(channel_name == "" || channel_name == REDACTED) - temp += "
  • Invalid name for person wanted.
  • " - if(scanned_user == "Unknown") - temp += "
  • Channel author unverified.
  • " - if(msg == "" || msg == REDACTED) - temp += "
  • Invalid description.
  • " - temp += "
" - temp_back_screen = NEWSCASTER_MAIN - else - var/choice = alert("Please confirm wanted issue [input_param == 1 ? "creation." : "edit."]", "Network Security Handler", "Confirm", "Cancel") - if(choice == "Confirm") + var/choice = alert("Please confirm wanted issue [input_param == 1 ? "creation." : "edit."]", "Network Security Handler", "Confirm", "Cancel") + if(choice == "Confirm") + if(msg == "" || channel_name == "" || scanned_user == "Unknown") + temp = "ERROR: Wanted issue rejected by Network.
    " + if(channel_name == "" || channel_name == REDACTED) + temp += "
  • Invalid name for person wanted.
  • " + if(scanned_user == "Unknown") + temp += "
  • Channel author unverified.
  • " + if(msg == "" || msg == REDACTED) + temp += "
  • Invalid description.
  • " + temp += "
" + temp_back_screen = NEWSCASTER_MAIN + else if(input_param == 1) //input_param == 1: new wanted issue, input_param == 2: editing an existing one var/datum/feed_message/W = new /datum/feed_message W.author = channel_name diff --git a/code/game/machinery/poolcontroller.dm b/code/game/machinery/poolcontroller.dm index f6ecd511b2b..39f67a72add 100644 --- a/code/game/machinery/poolcontroller.dm +++ b/code/game/machinery/poolcontroller.dm @@ -31,18 +31,18 @@ emagged = 1 //Set the emag var to true. -/obj/machinery/poolcontroller/attackby(obj/item/P as obj, mob/user as mob, params) //Proc is called when a user hits the pool controller with something. - if(istype(P,/obj/item/multitool)) //If the mob hits the pool controller with a multitool, reset the emagged status +/obj/machinery/poolcontroller/attackby(obj/item/I, mob/user, params) //Proc is called when a user hits the pool controller with something. + if(ismultitool(I)) //If the mob hits the pool controller with a multitool, reset the emagged status if(emagged) //Check the emag status - to_chat(user, "You re-enable \the [src]'s temperature safeguards.")//Inform the user that they have just fixed the safeguards. + to_chat(user, "You re-enable [src]'s temperature safeguards.")//Inform the user that they have just fixed the safeguards. - emagged = 0 //Set the emagged var to false. + emagged = FALSE //Set the emagged var to false. else to_chat(user, "Nothing happens.")//If not emagged, don't do anything, and don't tell the user that it can be emagged. else //If it's not a multitool, defer to /obj/machinery/attackby - ..() + return ..() /obj/machinery/poolcontroller/attack_hand(mob/user as mob) ui_interact(user) @@ -100,14 +100,14 @@ if(drownee.losebreath > 20) //You've probably got bigger problems than drowning at this point, so we won't add to it until you get that under control. return - add_attack_logs(src, drownee, "Drowned", isLivingSSD(drownee)) + add_attack_logs(src, drownee, "Drowned", isLivingSSD(drownee) ? null : ATKLOG_ALL) if(drownee.stat) //Mob is in critical. drownee.AdjustLoseBreath(3, bound_lower = 0, bound_upper = 20) drownee.visible_message("\The [drownee] appears to be drowning!","You're quickly drowning!") //inform them that they are fucked. else drownee.AdjustLoseBreath(2, bound_lower = 0, bound_upper = 20) //For every time you drown, you miss 2 breath attempts. Hope you catch on quick! if(prob(35)) //35% chance to tell them what is going on. They should probably figure it out before then. - drownee.visible_message("\The [drownee] flails, almost like they are drowning!","You're lacking air!") //*gasp* *gasp* *gasp* *gasp* *gasp* + drownee.visible_message("\The [drownee] flails, almost like [drownee.p_they()] [drownee.p_are()] drowning!","You're lacking air!") //*gasp* *gasp* *gasp* *gasp* *gasp* diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 68e6eaf2ad2..abc8d137679 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -54,7 +54,7 @@ to_chat(user, "[src] isn't connected to anything!") return 1 else - ..() + return ..() /obj/machinery/recharger/attack_hand(mob/user) if(issilicon(user)) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index fd973290244..f987b698772 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -136,18 +136,21 @@ else icon_state = "borgcharger0" -/obj/machinery/recharge_station/attackby(obj/item/P as obj, mob/user as mob, params) - if(istype(P, /obj/item/screwdriver)) - if(src.occupant) +/obj/machinery/recharge_station/attackby(obj/item/I, mob/user, params) + if(isscrewdriver(I)) + if(occupant) to_chat(user, "The maintenance panel is locked.") return - default_deconstruction_screwdriver(user, "borgdecon2", "borgcharger0", P) + default_deconstruction_screwdriver(user, "borgdecon2", "borgcharger0", I) return - if(exchange_parts(user, P)) + if(exchange_parts(user, I)) return - default_deconstruction_crowbar(P) + if(default_deconstruction_crowbar(I)) + return + else + return ..() /obj/machinery/recharge_station/proc/process_occupant() if(src.occupant) diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index d80a628927b..72c0cd91002 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -51,6 +51,7 @@ var/const/SAFETY_COOLDOWN = 100 /obj/machinery/recycler/attackby(obj/item/I, mob/user, params) + add_fingerprint(user) if(default_deconstruction_screwdriver(user, "grinder-oOpen", "grinder-o0", I)) return @@ -60,9 +61,10 @@ var/const/SAFETY_COOLDOWN = 100 if(default_unfasten_wrench(user, I)) return - default_deconstruction_crowbar(I) - ..() - add_fingerprint(user) + if(default_deconstruction_crowbar(I)) + return + else + return ..() /obj/machinery/recycler/emag_act(mob/user) if(!emagged) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index e9c7c497d72..3aae4af4405 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -269,7 +269,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() return //err... hacking code, which has no reason for existing... but anyway... it was once supposed to unlock priority 3 messanging on that console (EXTREME priority...), but the code for that was removed. -/obj/machinery/requests_console/attackby(var/obj/item/O as obj, var/mob/user as mob) +/obj/machinery/requests_console/attackby(obj/item/I, mob/user) /* if(istype(O, /obj/item/crowbar)) if(open) @@ -292,14 +292,15 @@ var/list/obj/machinery/requests_console/allConsoles = list() else to_chat(user, "You can't do much with that.")*/ - if(istype(O, /obj/item/card/id)) - if(inoperable(MAINT)) return + if(istype(I, /obj/item/card/id)) + if(inoperable(MAINT)) + return if(screen == RCS_MESSAUTH) - var/obj/item/card/id/T = O + var/obj/item/card/id/T = I msgVerified = text("Verified by [T.registered_name] ([T.assignment])") updateUsrDialog() if(screen == RCS_ANNOUNCE) - var/obj/item/card/id/ID = O + var/obj/item/card/id/ID = I if(access_RC_announce in ID.GetAccess()) announceAuth = 1 announcement.announcer = ID.assignment ? "[ID.assignment] [ID.registered_name]" : ID.registered_name @@ -308,16 +309,18 @@ var/list/obj/machinery/requests_console/allConsoles = list() to_chat(user, "You are not authorized to send announcements.") updateUsrDialog() if(screen == RCS_SHIPPING) - var/obj/item/card/id/T = O + var/obj/item/card/id/T = I msgVerified = text("Sender verified as [T.registered_name] ([T.assignment])") updateUsrDialog() - if(istype(O, /obj/item/stamp)) - if(inoperable(MAINT)) return + if(istype(I, /obj/item/stamp)) + if(inoperable(MAINT)) + return if(screen == RCS_MESSAUTH) - var/obj/item/stamp/T = O + var/obj/item/stamp/T = I msgStamped = text("Stamped with the [T.name]") updateUsrDialog() - return + else + return ..() /obj/machinery/requests_console/proc/reset_message(var/mainmenu = 0) message = "" diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 1962e3631fb..3777dfc866d 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -56,27 +56,26 @@ return else // insert cell - var/obj/item/stock_parts/cell/C = usr.get_active_hand() + var/obj/item/stock_parts/cell/C = user.get_active_hand() if(istype(C)) - user.drop_item() - cell = C - C.loc = src - C.add_fingerprint(usr) + if(user.drop_item()) + cell = C + C.forceMove(src) + C.add_fingerprint(user) - user.visible_message("[user] inserts a power cell into [src].", "You insert the power cell into [src].") + user.visible_message("[user] inserts a power cell into [src].", "You insert the power cell into [src].") else to_chat(user, "The hatch must be open to insert a power cell.") return - else if(istype(I, /obj/item/screwdriver)) + else if(isscrewdriver(I)) open = !open - user.visible_message("[user] [open ? "opens" : "closes"] the hatch on the [src].", "You [open ? "open" : "close"] the hatch on the [src].") + user.visible_message("[user] [open ? "opens" : "closes"] the hatch on [src].", "You [open ? "open" : "close"] the hatch on [src].") update_icon() if(!open && user.machine == src) user << browse(null, "window=spaceheater") user.unset_machine() else - ..() - return + return ..() /obj/machinery/space_heater/attack_hand(mob/user as mob) src.add_fingerprint(user) @@ -106,7 +105,7 @@ else on = !on - user.visible_message("[user] switches [on ? "on" : "off"] the [src].","You switch [on ? "on" : "off"] the [src].") + user.visible_message("[user] switches [on ? "on" : "off"] [src].","You switch [on ? "on" : "off"] [src].") update_icon() return @@ -131,7 +130,7 @@ usr.put_in_hands(cell) cell.add_fingerprint(usr) cell = null - usr.visible_message("[usr] removes the power cell from \the [src].", "You remove the power cell from \the [src].") + usr.visible_message("[usr] removes the power cell from [src].", "You remove the power cell from [src].") if("cellinstall") @@ -143,7 +142,7 @@ C.loc = src C.add_fingerprint(usr) - usr.visible_message("[usr] inserts a power cell into \the [src].", "You insert the power cell into \the [src].") + usr.visible_message("[usr] inserts a power cell into [src].", "You insert the power cell into [src].") updateDialog() else diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index a77bd744f92..ebf3cfeadf9 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -276,7 +276,6 @@ overlays.Cut() overlays += image('icons/obj/status_display.dmi', icon_state=picture_state) -#undef CHARS_PER_LINE #undef FONT_SIZE #undef FONT_COLOR #undef WARNING_FONT_COLOR diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index a7d68adbe62..370cef73559 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -413,13 +413,13 @@ var/i for(i=0,i<4,i++) //Gradually give the guy inside some damaged based on the intensity spawn(50) - if(src.OCCUPANT) - if(src.issuperUV) + if(OCCUPANT) + if(issuperUV) OCCUPANT.take_organ_damage(0,40) - to_chat(user, "Test. You gave him 40 damage") + to_chat(user, "Test. You gave [OCCUPANT.p_them()] 40 damage") else OCCUPANT.take_organ_damage(0,8) - to_chat(user, "Test. You gave him 8 damage") + to_chat(user, "Test. You gave [OCCUPANT.p_them()] 8 damage") return*/ diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 7ec64373373..37d1c3ae93c 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -158,14 +158,14 @@ return -/obj/machinery/power/singularity_beacon/attackby(obj/item/W as obj, mob/user as mob, params) - if(istype(W,/obj/item/screwdriver)) +/obj/machinery/power/singularity_beacon/attackby(obj/item/I, mob/user, params) + if(isscrewdriver(I)) if(active) to_chat(user, "You need to deactivate the beacon first!") return if(anchored) - anchored = 0 + anchored = FALSE to_chat(user, "You unscrew the beacon from the floor.") disconnect_from_network() return @@ -173,11 +173,10 @@ if(!connect_to_network()) to_chat(user, "This device must be placed over an exposed cable.") return - anchored = 1 + anchored = TRUE to_chat(user, "You screw the beacon to the floor and attach the cable.") - return - ..() - return + else + return ..() /obj/machinery/power/singularity_beacon/Destroy() diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index a4c73cc8fac..b5806d1472e 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -230,8 +230,9 @@ var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) if(payload && !istype(payload, /obj/item/bombcore/training)) - msg_admin_attack("[key_name_admin(user)] has primed a [name] ([payload]) for detonation at [A.name] (JMP).") - log_game("[key_name(user)] has primed a [name] ([payload]) for detonation at [A.name] ([bombturf.x], [bombturf.y], [bombturf.z])") + msg_admin_attack("[key_name_admin(user)] has primed a [name] ([payload]) for detonation at [A.name] (JMP).", ATKLOG_FEW) + log_game("[key_name(user)] has primed a [name] ([payload]) for detonation at [A.name] [COORD(bombturf)]") + investigate_log("[key_name(user)] has has primed a [name] ([payload]) for detonation at [A.name] [COORD(bombturf)]", INVESTIGATE_BOMB) payload.adminlog = "\The [src] that [key_name(user)] had primed detonated!" /obj/machinery/syndicatebomb/proc/isWireCut(var/index) @@ -486,7 +487,8 @@ else to_chat(user, "The [I] wont fit! The [src] can only hold up to [max_beakers] containers.") return - ..() + else + return ..() /obj/item/bombcore/chemical/CheckParts(list/parts_list) ..() @@ -556,11 +558,11 @@ var/area/A = get_area(T) detonated-- message_admins("[key_name_admin(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] (JMP).") - bombers += "[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] ([T.x],[T.y],[T.z])" + investigate_log("[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] ([T.x],[T.y],[T.z])", INVESTIGATE_BOMB) log_game("[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] ([T.x],[T.y],[T.z])") detonated = 0 existant = 0 timer = world.time + BUTTON_COOLDOWN #undef BUTTON_COOLDOWN -#undef BUTTON_DELAY \ No newline at end of file +#undef BUTTON_DELAY diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index 48384f78f1e..64e387fb731 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -156,8 +156,26 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept signal.data["realname"], signal.data["vname"], 3, signal.data["compression"], list(0), connection.frequency, signal.data["verb"], signal.data["language"]) - - +#define CREW_RADIO_TYPE 0 +#define CENTCOMM_RADIO_TYPE 1 +#define SYNDICATE_RADIO_TYPE 2 +/proc/Is_Bad_Connection(old_freq, new_freq) //Makes sure players cant read radios of a higher level than they are + var/old_type = CREW_RADIO_TYPE + var/new_type = CREW_RADIO_TYPE + for(var/antag_freq in ANTAG_FREQS) + if(old_freq == antag_freq) + old_type = SYNDICATE_RADIO_TYPE + if(new_freq == antag_freq) + new_type = SYNDICATE_RADIO_TYPE + + for(var/cent_freq in CENT_FREQS) + if(old_freq == cent_freq) + old_type = CENTCOMM_RADIO_TYPE + if(new_freq == cent_freq) + new_type = CENTCOMM_RADIO_TYPE + + return new_type > old_type + /** Here is the big, bad function that broadcasts a message given the appropriate @@ -226,21 +244,28 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept var/display_freq = freq + var/bad_connection = FALSE + var/datum/radio_frequency/new_connection = connection + + if(connection.frequency != display_freq) + bad_connection = Is_Bad_Connection(connection.frequency, display_freq) + new_connection = radio_controller.return_frequency(display_freq) + var/list/obj/item/radio/radios = list() // --- Broadcast only to intercom devices --- - if(data == 1) + if(data == 1 && !bad_connection) - for(var/obj/item/radio/intercom/R in connection.devices["[RADIO_CHAT]"]) + for(var/obj/item/radio/intercom/R in new_connection.devices["[RADIO_CHAT]"]) if(R.receive_range(display_freq, level) > -1) radios += R // --- Broadcast only to intercoms and station-bounced radios --- - else if(data == 2) + else if(data == 2 && !bad_connection) - for(var/obj/item/radio/R in connection.devices["[RADIO_CHAT]"]) + for(var/obj/item/radio/R in new_connection.devices["[RADIO_CHAT]"]) if(istype(R, /obj/item/radio/headset)) continue @@ -259,9 +284,9 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept // --- Broadcast to ALL radio devices --- - else + else if(!bad_connection) - for(var/obj/item/radio/R in connection.devices["[RADIO_CHAT]"]) + for(var/obj/item/radio/R in new_connection.devices["[RADIO_CHAT]"]) if(R.receive_range(display_freq, level) > -1) radios += R diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 9dc30edf61e..0b9b1449137 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -436,7 +436,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() var/totaltraffic = 0 // gigabytes (if > 1024, divide by 1024 -> terrabytes) var/list/memory = list() // stored memory - var/rawcode = "" // the code to compile (raw text) + var/list/rawcode = list() // the code to compile (list of characters) var/datum/TCS_Compiler/Compiler // the compiler that compiles and runs the code var/autoruncode = 0 // 1 if the code is set to run every time a signal is picked up @@ -516,10 +516,9 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() relay_information(signal, "/obj/machinery/telecomms/broadcaster") -/obj/machinery/telecomms/server/proc/setcode(var/t) - if(t) - if(istext(t)) - rawcode = t +/obj/machinery/telecomms/server/proc/setcode(var/list/code) + if(istype(code)) + rawcode = code /obj/machinery/telecomms/server/proc/compile(mob/user as mob) if(Compiler) @@ -548,8 +547,8 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() /obj/machinery/telecomms/server/proc/admin_log(var/mob/mob) var/msg="[key_name(mob)] has compiled a script to server [src]:" log_game("NTSL: [msg]") - log_game("NTSL: [rawcode]") - src.investigate_log("[msg]
[rawcode]", "ntsl") + log_game("NTSL: [rawcode.Join("")]") + src.investigate_log("[msg]
[rawcode.Join("")]", "ntsl") if(length(rawcode)) // Let's not bother the admins for empty code. message_admins("[key_name_admin(mob)] has compiled and uploaded a NTSL script to [src.id] (JMP)") diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm index a2580285a38..45f0817ef55 100644 --- a/code/game/machinery/telecomms/traffic_control.dm +++ b/code/game/machinery/telecomms/traffic_control.dm @@ -117,6 +117,7 @@ function compileCode() { var codeText = cMirror_fSubmit.getValue(); document.getElementById("cMirrorPost").value = codeText; + document.getElementById("cMirrorPostList").value = JSON.stringify(codeText.split('')); document.getElementById("theform").submit(); } @@ -135,6 +136,7 @@ + "} else @@ -189,6 +191,10 @@ if(code) storedcode = code + var/list/codelist = href_list["cMirrorList"] + if(istext(codelist)) + codelist = json_decode(codelist) + add_fingerprint(user) user.set_machine(src) @@ -198,14 +204,14 @@ switch(href_list["choice"]) if("Compile") - if(!code) + if(!istype(codelist)) return 0 if(user != editingcode) return 0 //only one editor if(SelectedServer) var/obj/machinery/telecomms/server/Server = SelectedServer - Server.setcode(code) + Server.setcode(codelist) spawn(0) // Output all the compile-time errors @@ -234,7 +240,7 @@ updateUsrDialog() for(var/obj/machinery/telecomms/server/Server in servers) - Server.setcode(code) + Server.setcode(codelist) var/list/compileerrors = Server.compile(user) if(!telecomms_check(user)) return diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index a1248fc0b6d..46671a9f4fa 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -38,21 +38,20 @@ break return power_station -/obj/machinery/computer/teleporter/attackby(I as obj, mob/living/user as mob, params) +/obj/machinery/computer/teleporter/attackby(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/gps)) var/obj/item/gps/L = I if(L.locked_location && !(stat & (NOPOWER|BROKEN))) if(!user.unEquip(L)) - to_chat(user, "\the [I] is stuck to your hand, you cannot put it in \the [src]") + to_chat(user, "[I] is stuck to your hand, you cannot put it in [src]") return - L.loc = src + L.forceMove(src) locked = L - to_chat(user, "You insert the GPS device into the [name]'s slot.") + to_chat(user, "You insert the GPS device into the [src]'s slot.") else - ..() - return + return ..() -/obj/machinery/computer/teleporter/emag_act(user as mob) +/obj/machinery/computer/teleporter/emag_act(mob/user) if(!emagged) emagged = 1 to_chat(user, "The teleporter can now lock on to Syndicate beacons!") @@ -341,14 +340,17 @@ //--FalseIncarnate return -/obj/machinery/teleport/hub/attackby(obj/item/W, mob/user, params) - if(default_deconstruction_screwdriver(user, "tele-o", "tele0", W)) +/obj/machinery/teleport/hub/attackby(obj/item/I, mob/user, params) + if(default_deconstruction_screwdriver(user, "tele-o", "tele0", I)) return - if(exchange_parts(user, W)) + if(exchange_parts(user, I)) return - default_deconstruction_crowbar(W) + if(default_deconstruction_crowbar(I)) + return + + return ..() /obj/machinery/teleport/hub/proc/teleport(atom/movable/M as mob|obj, turf/T) var/obj/machinery/computer/teleporter/com = power_station.teleporter_console @@ -438,14 +440,17 @@ else icon_state = "tele0" -/obj/machinery/teleport/perma/attackby(obj/item/W, mob/user, params) - if(default_deconstruction_screwdriver(user, "tele-o", "tele0", W)) +/obj/machinery/teleport/perma/attackby(obj/item/I, mob/user, params) + if(default_deconstruction_screwdriver(user, "tele-o", "tele0", I)) return - if(exchange_parts(user, W)) + if(exchange_parts(user, I)) return - default_deconstruction_crowbar(W) + if(default_deconstruction_crowbar(I)) + return + + return ..() /obj/machinery/teleport/station name = "station" @@ -506,41 +511,46 @@ teleporter_console = null return ..() -/obj/machinery/teleport/station/attackby(var/obj/item/W, mob/user, params) - if(istype(W, /obj/item/multitool) && !panel_open) - var/obj/item/multitool/M = W +/obj/machinery/teleport/station/attackby(obj/item/I, mob/user, params) + if(ismultitool(I) && !panel_open) + var/obj/item/multitool/M = I if(M.buffer && istype(M.buffer, /obj/machinery/teleport/station) && M.buffer != src) if(linked_stations.len < efficiency) linked_stations.Add(M.buffer) M.buffer = null - to_chat(user, "You upload the data from the [W.name]'s buffer.") + to_chat(user, "You upload the data from [M]'s buffer.") else to_chat(user, "This station can't hold more information, try to use better parts.") - if(default_deconstruction_screwdriver(user, "controller-o", "controller", W)) + return + + if(default_deconstruction_screwdriver(user, "controller-o", "controller", I)) update_icon() return - if(exchange_parts(user, W)) + if(exchange_parts(user, I)) return - default_deconstruction_crowbar(W) + if(default_deconstruction_crowbar(I)) + return if(panel_open) - if(istype(W, /obj/item/multitool)) - var/obj/item/multitool/M = W + if(ismultitool(I)) + var/obj/item/multitool/M = I M.buffer = src - to_chat(user, "You download the data to the [W.name]'s buffer.") + to_chat(user, "You download the data to the [M]'s buffer.") return - if(istype(W, /obj/item/wirecutters)) + if(iswirecutter(I)) link_console_and_hub() to_chat(user, "You reconnect the station to nearby machinery.") return - if(istype(W, /obj/item/circuitboard/teleporter_perma)) - var/obj/item/circuitboard/teleporter_perma/C = W + if(istype(I, /obj/item/circuitboard/teleporter_perma)) + var/obj/item/circuitboard/teleporter_perma/C = I C.target = teleporter_console.target - to_chat(user, "You copy the targeting information from \the [src] to \the [W]") + to_chat(user, "You copy the targeting information from [src] to [C]") return + return ..() + /obj/machinery/teleport/station/attack_ai() src.attack_hand() diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index 45294f01286..09385fa3a3e 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -344,12 +344,12 @@ domutcheck(H, null, MUTCHK_FORCED) H.update_mutations() -/obj/machinery/transformer/gene_applier/attackby(obj/item/W, mob/living/user, params) - if(istype(W, /obj/item/disk/data)) +/obj/machinery/transformer/gene_applier/attackby(obj/item/I, mob/living/user, params) + if(istype(I, /obj/item/disk/data)) if(locked) to_chat(user, "Access Denied.") return FALSE - var/obj/item/disk/data/D = W + var/obj/item/disk/data/D = I if(!D.buf) to_chat(user, "Error: No data found.") return FALSE diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index db228aff04f..7fe19960100 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -1,7 +1,3 @@ -#define CAT_NORMAL 1 -#define CAT_HIDDEN 2 // also used in corresponding wires/vending.dm -#define CAT_COIN 4 - /** * Datum used to hold information about a product in a vending machine */ @@ -292,7 +288,7 @@ insert_item(user, I) return else - ..() + return ..() //Override this proc to do per-machine checks on the inserted item, but remember to call the parent to handle these generic checks before your logic! /obj/machinery/vending/proc/item_slot_check(mob/user, obj/item/I) @@ -840,6 +836,9 @@ /obj/item/reagent_containers/food/drinks/chicken_soup = 30,/obj/item/reagent_containers/food/drinks/weightloss = 50, /obj/item/reagent_containers/food/drinks/mug = 50) refill_canister = /obj/item/vending_refill/coffee +/obj/machinery/vending/coffee/free + prices = list() + /obj/machinery/vending/coffee/New() ..() component_parts = list() @@ -892,6 +891,9 @@ /obj/item/reagent_containers/food/snacks/pistachios = 35, /obj/item/reagent_containers/food/snacks/spacetwinkie = 30,/obj/item/reagent_containers/food/snacks/cheesiehonkers = 25,/obj/item/reagent_containers/food/snacks/tastybread = 30) refill_canister = /obj/item/vending_refill/snack +/obj/machinery/vending/snack/free + prices = list() + /obj/machinery/vending/snack/New() ..() component_parts = list() @@ -913,6 +915,9 @@ /obj/item/reagent_containers/food/snacks/chinese/rice = 50) refill_canister = /obj/item/vending_refill/chinese +/obj/machinery/vending/chinese/free + prices = list() + /obj/machinery/vending/chinese/New() ..() component_parts = list() @@ -938,6 +943,9 @@ /obj/item/reagent_containers/food/drinks/cans/space_up = 20,/obj/item/reagent_containers/food/drinks/cans/grape_juice = 20) refill_canister = /obj/item/vending_refill/cola +/obj/machinery/vending/cola/free + prices = list() + /obj/machinery/vending/cola/New() ..() component_parts = list() @@ -965,6 +973,9 @@ /obj/item/cartridge/signal = 75) armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0) +/obj/machinery/vending/cart/free + prices = list() + /obj/machinery/vending/liberationstation name = "\improper Liberation Station" desc = "An overwhelming amount of ancient patriotism washes over you just by looking at the machine." @@ -994,6 +1005,9 @@ prices = list(/obj/item/storage/fancy/cigarettes = 60,/obj/item/storage/fancy/cigarettes/cigpack_uplift = 60,/obj/item/storage/fancy/cigarettes/cigpack_robust = 60,/obj/item/storage/fancy/cigarettes/cigpack_carp = 60,/obj/item/storage/fancy/cigarettes/cigpack_midori = 60,/obj/item/storage/fancy/cigarettes/cigpack_random = 150, /obj/item/reagent_containers/food/pill/patch/nicotine = 15, /obj/item/storage/box/matches = 10,/obj/item/lighter/random = 60, /obj/item/storage/fancy/rollingpapers = 20) refill_canister = /obj/item/vending_refill/cigarette +/obj/machinery/vending/cigarette/free + prices = list() + /obj/machinery/vending/cigarette/New() ..() component_parts = list() @@ -1433,6 +1447,9 @@ premium = list(/obj/item/toy/pet_rock/fred = 1, /obj/item/toy/pet_rock/roxie = 1) refill_canister = /obj/item/vending_refill/crittercare +/obj/machinery/vending/crittercare/free + prices = list() + /obj/machinery/vending/crittercare/New() ..() component_parts = list() diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index 217b1e70165..248514179af 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -1,62 +1,42 @@ /obj/machinery/wish_granter - name = "Wish Granter" + name = "wish granter" desc = "You're not so sure about this, anymore..." icon = 'icons/obj/device.dmi' icon_state = "syndbeacon" - use_power = 0 - anchored = 1 - density = 1 - var/datum/mind/target - var/list/types = list() - var/inuse = 0 + use_power = NO_POWER_USE + anchored = TRUE + density = TRUE -/obj/machinery/wish_granter/New() - for(var/supname in all_superheroes) - types |= supname - ..() + var/charges = 1 + var/insisting = FALSE -/obj/machinery/wish_granter/attack_hand(var/mob/user as mob) - usr.set_machine(src) +/obj/machinery/wish_granter/attack_hand(mob/living/carbon/user) + . = ..() + if(.) + return + if(charges <= 0) + to_chat(user, "The Wish Granter lies silent.") + return - if(!istype(user, /mob/living/carbon/human)) + else if(!ishuman(user)) to_chat(user, "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's.") return - if(is_special_character(user)) + else if(is_special_character(user)) to_chat(user, "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away.") - return - if(inuse) - to_chat(user, "Someone is already communing with the Wish Granter.") - return + else if(!insisting) + to_chat(user, "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?") + insisting = TRUE - to_chat(user, "The power of the Wish Granter have turned you into the superhero the station deserves. You are a masked vigilante, and answer to no man. Will you use your newfound strength to protect the innocent, or will you hunt the guilty?") - - inuse = 1 - var/wish - if(types.len == 1) - wish = pick(types) else - wish = input("You want to become...","Wish") as null|anything in types - if(!wish) - inuse=0 - return - types -= wish - var/mob/living/carbon/human/M = user - var/datum/superheroes/S = all_superheroes[wish] - if(S) - S.create(M) - inuse=0 + to_chat(user, "You speak. [pick("I want the station to disappear", "Humanity is corrupt, mankind must be destroyed", "I want to be rich", "I want to rule the world", "I want immortality.")]. The Wish Granter answers.") + to_chat(user, "Your head pounds for a moment, before your vision clears. You are the avatar of the Wish Granter, and your power is LIMITLESS! And it's all yours. You need to make sure no one can take it from you. No one can know, first.") - //Remove the wishgranter or teleport it randomly on the station - if(!types.len) - to_chat(user, "The wishgranter slowly fades into mist...") - qdel(src) - return - else - var/impact_area = findEventArea() - var/turf/T = pick(get_area_turfs(impact_area)) - if(T) - src.loc = T - return \ No newline at end of file + charges-- + insisting = FALSE + + user.mind.add_antag_datum(/datum/antagonist/wishgranter) + + to_chat(user, "You have a very bad feeling about this.") \ No newline at end of file diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 5f3483d2ce4..a9d4b4008b6 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -74,7 +74,7 @@ /obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/patient_insertion_check(mob/living/carbon/target) if(target.buckled) - occupant_message("[target] will not fit into the sleeper because they are buckled to [target.buckled]!") + occupant_message("[target] will not fit into the sleeper because [target.p_they()] [target.p_are()] buckled to [target.buckled]!") return if(target.has_buckled_mobs()) occupant_message("[target] will not fit into the sleeper because of the creatures attached to it!") diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 2ff4f478e2d..88c15e687ac 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -166,7 +166,8 @@ L.origin_tech = I.origin_tech else I.loc = get_step(src,SOUTH) - I.materials = res_coef + if(istype(I)) + I.materials = res_coef atom_say("[I] is complete.") being_built = null diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 23134bc3144..a2fa4220c3c 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -470,19 +470,10 @@ /obj/mecha/attack_hand(mob/living/user) user.changeNext_move(CLICK_CD_MELEE) log_message("Attack by hand/paw. Attacker - [user].",1) - - if((HULK in user.mutations) && !prob(deflect_chance)) - do_attack_animation(src, ATTACK_EFFECT_SMASH) - take_damage(15) - check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) - user.visible_message("[user] hits [name], doing some damage.", - "You hit [name] with all your might. The metal creaks and bends.") - else - user.do_attack_animation(src, ATTACK_EFFECT_PUNCH) - playsound(loc, 'sound/weapons/tap.ogg', 40, 1, -1) - user.visible_message("[user] hits [name]. Nothing happens","You hit [name] with no visible effect.") - log_append_to_last("Armor saved.") - return + user.do_attack_animation(src, ATTACK_EFFECT_PUNCH) + playsound(loc, 'sound/weapons/tap.ogg', 40, 1, -1) + user.visible_message("[user] hits [name]. Nothing happens", "You hit [name] with no visible effect.") + log_append_to_last("Armor saved.") /obj/mecha/attack_alien(mob/living/user) @@ -526,6 +517,16 @@ user.create_attack_log("attacked [name]") return +/obj/mecha/hulk_damage() + return 15 + +/obj/mecha/attack_hulk(mob/living/carbon/human/user) + . = ..() + if(.) + check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL, MECHA_INT_TANK_BREACH, MECHA_INT_CONTROL_LOST)) + log_message("Attack by hulk. Attacker - [user].", 1) + add_attack_logs(user, src, "Punched with hulk powers") + /obj/mecha/hitby(atom/movable/A) //wrapper ..() log_message("Hit by [A].",1) @@ -1205,6 +1206,10 @@ occupant = brainmob brainmob.forceMove(src) //should allow relaymove brainmob.canmove = 1 + if(istype(mmi_as_oc, /obj/item/mmi/robotic_brain)) + var/obj/item/mmi/robotic_brain/R = mmi_as_oc + if(R.imprinted_master) + to_chat(brainmob, "Your imprint to [R.imprinted_master] has been temporarily disabled. You should help the crew and not commit harm.") mmi_as_oc.loc = src mmi_as_oc.mecha = src verbs -= /obj/mecha/verb/eject @@ -1304,6 +1309,10 @@ mmi.mecha = null mmi.update_icon() L.canmove = 0 + if(istype(mmi, /obj/item/mmi/robotic_brain)) + var/obj/item/mmi/robotic_brain/R = mmi + if(R.imprinted_master) + to_chat(L, "Imprint re-enabled, you are once again bound to [R.imprinted_master]'s commands.") icon_state = initial(icon_state)+"-open" dir = dir_in diff --git a/code/game/objects/effects/decals/misc.dm b/code/game/objects/effects/decals/misc.dm index 6bcfb253454..301fd71a98d 100644 --- a/code/game/objects/effects/decals/misc.dm +++ b/code/game/objects/effects/decals/misc.dm @@ -1,12 +1,3 @@ -/obj/effect/decal/point - name = "arrow" - desc = "It's an arrow hanging in mid-air. There may be a wizard about." - icon = 'icons/mob/screen_gen.dmi' - icon_state = "arrow" - layer = 16.0 - anchored = 1 - mouse_opacity = 0 - // Used for spray that you spray at walls, tables, hydrovats etc /obj/effect/decal/spraystill density = 0 diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm index 93763c464e7..e765e59442d 100644 --- a/code/game/objects/effects/effect_system/effects_foam.dm +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -163,13 +163,14 @@ // dense and opaque, but easy to break /obj/structure/foamedmetal - icon = 'icons/effects/effects.dmi' - icon_state = "metalfoam" - density = 1 - opacity = 1 // changed in New() - anchored = 1 name = "foamed metal" desc = "A lightweight foamed metal wall." + icon = 'icons/effects/effects.dmi' + icon_state = "metalfoam" + density = TRUE + opacity = TRUE // changed in New() + anchored = TRUE + max_integrity = 20 var/metal = MFOAM_ALUMINUM /obj/structure/foamedmetal/Initialize() @@ -177,7 +178,6 @@ air_update_turf(1) /obj/structure/foamedmetal/Destroy() - density = 0 air_update_turf(1) return ..() @@ -186,64 +186,31 @@ ..() move_update_air(T) +/obj/structure/foamedmetal/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + playsound(loc, 'sound/weapons/tap.ogg', 100, 1) + /obj/structure/foamedmetal/proc/updateicon() if(metal == MFOAM_ALUMINUM) icon_state = "metalfoam" + max_integrity = 20 + obj_integrity = max_integrity else icon_state = "ironfoam" - -/obj/structure/foamedmetal/ex_act(severity) - qdel(src) - -/obj/structure/foamedmetal/blob_act() - qdel(src) - -/obj/structure/foamedmetal/bullet_act() - if(metal==MFOAM_ALUMINUM || prob(50)) - qdel(src) + max_integrity = 50 + obj_integrity = max_integrity /obj/structure/foamedmetal/attack_hand(mob/user) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src, ATTACK_EFFECT_PUNCH) - if((HULK in user.mutations) || (prob(75 - metal*25))) - user.visible_message("[user] smashes through \the [src].", "You smash through \the [src].") + if(prob(75 - metal * 25)) + user.visible_message("[user] smashes through [src].", "You smash through [src].") qdel(src) else to_chat(user, "You hit the metal foam but bounce off it.") + playsound(loc, 'sound/weapons/tap.ogg', 100, 1) -/obj/structure/foamedmetal/attackby(obj/item/I, mob/user, params) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - if(istype(I, /obj/item/grab)) - var/obj/item/grab/G = I - G.affecting.loc = src.loc - user.visible_message("[G.assailant] smashes [G.affecting] through the foamed metal wall.") - qdel(I) - qdel(src) - return - - if(prob(I.force*20 - metal*25)) - user.visible_message("[user] smashes through the foamed metal with \the [I].", "You smash through the foamed metal with \the [I].") - qdel(src) - else - to_chat(user, "You hit the metal foam to no effect.") - -/obj/structure/foamedmetal/attack_animal(mob/living/simple_animal/M) - M.do_attack_animation(src) - if(M.melee_damage_upper == 0) - M.visible_message("[M] nudges \the [src].") - else - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - M.visible_message("\The [M] [M.attacktext] [src]!") - qdel(src) - -/obj/structure/foamedmetal/attack_alien(mob/living/carbon/alien/humanoid/M) - M.visible_message("[M] tears apart \the [src]!"); - qdel(src) - -/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5) +/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target) return !density /obj/structure/foamedmetal/CanAtmosPass() - return !density + return !density \ No newline at end of file diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index 385067e0611..1df0166260e 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -263,13 +263,13 @@ var/more = "" if(M) more = " " - msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1) + msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", ATKLOG_FEW) log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].") else - msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1) + msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", ATKLOG_FEW) log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.") else - msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key. CODERS: carry.my_atom may be null.", 0, 1) + msg_admin_attack("A chemical smoke reaction has taken place in ([whereLink]). No associated key. CODERS: carry.my_atom may be null.", ATKLOG_FEW) log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key. CODERS: carry.my_atom may be null.") /datum/effect_system/smoke_spread/chem/start(effect_range = 2) diff --git a/code/game/objects/effects/effects.dm b/code/game/objects/effects/effects.dm index 6a3e1aba86a..5836136401e 100644 --- a/code/game/objects/effects/effects.dm +++ b/code/game/objects/effects/effects.dm @@ -12,4 +12,7 @@ return /obj/effect/fire_act() - return \ No newline at end of file + return + +/obj/effect/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) + return FALSE \ No newline at end of file diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm index cf65c0b912f..9ffca668c28 100644 --- a/code/game/objects/effects/spawners/lootdrop.dm +++ b/code/game/objects/effects/spawners/lootdrop.dm @@ -130,7 +130,7 @@ ////////////////CONTRABAND STUFF////////////////// /obj/item/grenade/clown_grenade = 3, /obj/item/seeds/ambrosia/cruciatus = 3, - /obj/item/gun/projectile/automatic/pistol/empty = 1, + /obj/item/gun/projectile/automatic/pistol = 1, /obj/item/ammo_box/magazine/m10mm = 4, /obj/item/soap/syndie = 7, /obj/item/gun/syringe/syndicate = 2, diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 02c04fbfbea..29abbef2d76 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -219,7 +219,7 @@ if(C) S.key = C.key if(S.master_commander) - to_chat(S, "You are a spider who is loyal to [S.master_commander], obey [S.master_commander]'s every order and assist them in completing their goals at any cost.") + to_chat(S, "You are a spider who is loyal to [S.master_commander], obey [S.master_commander]'s every order and assist [S.master_commander.p_them()] in completing [S.master_commander.p_their()] goals at any cost.") qdel(src) /obj/effect/decal/cleanable/spiderling_remains diff --git a/code/game/objects/effects/temporary_visuals/clockcult.dm b/code/game/objects/effects/temporary_visuals/clockcult.dm index 4a70c73c9c3..f6b654ccbbe 100644 --- a/code/game/objects/effects/temporary_visuals/clockcult.dm +++ b/code/game/objects/effects/temporary_visuals/clockcult.dm @@ -6,6 +6,10 @@ randomdir = 0 layer = ABOVE_NORMAL_TURF_LAYER +/obj/effect/temp_visual/ratvar/door/window + icon_state = "ratvarwindoorglow" + layer = ABOVE_WINDOW_LAYER + /obj/effect/temp_visual/ratvar/beam icon_state = "ratvarbeamglow" @@ -15,6 +19,13 @@ /obj/effect/temp_visual/ratvar/floor icon_state = "ratvarfloorglow" +/obj/effect/temp_visual/ratvar/window + icon_state = "ratvarwindowglow" + layer = ABOVE_OBJ_LAYER + +/obj/effect/temp_visual/ratvar/window/single + icon_state = "ratvarwindowglow_s" + /obj/effect/temp_visual/ratvar/grille icon_state = "ratvargrilleglow" layer = BELOW_OBJ_LAYER diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm index 001c482a922..03e8ea8fcd9 100644 --- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm +++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm @@ -1,3 +1,12 @@ +/obj/effect/temp_visual/point + name = "arrow" + desc = "It's an arrow hanging in mid-air. There may be a wizard about." + icon = 'icons/mob/screen_gen.dmi' + icon_state = "arrow" + layer = POINT_LAYER + duration = 20 + randomdir = FALSE + /obj/effect/temp_visual/dir_setting/bloodsplatter icon = 'icons/effects/blood.dmi' duration = 5 diff --git a/code/game/objects/empulse.dm b/code/game/objects/empulse.dm index ddf5b618bd5..2188337ba77 100644 --- a/code/game/objects/empulse.dm +++ b/code/game/objects/empulse.dm @@ -5,8 +5,8 @@ epicenter = get_turf(epicenter.loc) if(log) - message_admins("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ") - log_game("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ") + message_admins("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] [ADMIN_COORDJMP(epicenter)]") + log_game("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] [COORD(epicenter)]") if(heavy_range > 1) new/obj/effect/temp_visual/emp/pulse(epicenter) @@ -29,4 +29,4 @@ T.emp_act(2) else if(distance <= light_range) T.emp_act(2) - return 1 \ No newline at end of file + return 1 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index c57bbab4d27..03b4f4adfaa 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -452,7 +452,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d "[user] stabs you in the eye with [src]!") else user.visible_message( \ - "[user] has stabbed themself in the eyes with [src]!", \ + "[user] has stabbed [user.p_them()]self in the eyes with [src]!", \ "You stab yourself in the eyes with [src]!" \ ) @@ -467,7 +467,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d eyes.receive_damage(rand(3,4), 1) if(eyes.damage >= eyes.min_bruised_damage) if(M.stat != 2) - if(!(eyes.status & ORGAN_ROBOT) || !(eyes.status & ORGAN_ASSISTED)) //robot eyes bleeding might be a bit silly + if(!eyes.is_robotic()) //robot eyes bleeding might be a bit silly to_chat(M, "Your eyes start to bleed profusely!") if(prob(50)) if(M.stat != DEAD) @@ -552,3 +552,6 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d /obj/item/proc/on_trip(mob/living/carbon/human/H) if(H.slip(src, trip_stun, trip_weaken, trip_tiles, trip_walksafe, trip_any, trip_verb)) return TRUE + +/obj/item/attack_hulk(mob/living/carbon/human/user) + return FALSE \ No newline at end of file diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 295b133d92e..b4dd66e3be5 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -22,7 +22,7 @@ var/list/validSurfaces = list(/turf/simulated/floor) /obj/item/toy/crayon/suicide_act(mob/user) - user.visible_message("[user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide.") + user.visible_message("[user] is jamming the [name] up [user.p_their()] nose and into [user.p_their()] brain. It looks like [user.p_theyre()] trying to commit suicide.") return (BRUTELOSS|OXYLOSS) /obj/item/toy/crayon/New() diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 154a2032825..737abd10bb1 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -83,8 +83,8 @@ if(href_list["wipe"]) var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No") if(confirm == "Yes" && (CanUseTopic(user, state) == STATUS_INTERACTIVE)) - msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].") - log_attack(user, AI, "Wiped with [src].") + msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].", ATKLOG_FEW) + add_attack_logs(user, AI, "Wiped with [src].") flush = 1 AI.suiciding = 1 to_chat(AI, "Your core files are being wiped!") diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 0e2e3cc3785..5056c90793f 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -95,7 +95,7 @@ to_chat(M, "[user] blinds you with the flash!") if(M.weakeyes) M.Stun(2) - M.visible_message("[M] gasps and shields their eyes!", "You gasp and shields your eyes!") + M.visible_message("[M] gasps and shields [M.p_their()] eyes!", "You gasp and shields your eyes!") else visible_message("[user] fails to blind [M] with the flash!") to_chat(user, "You fail to blind [M] with the flash!") @@ -123,7 +123,7 @@ for(var/obj/item/borg/combat/shield/S in R.module.modules) if(R.activated(S)) add_attack_logs(user, M, "Flashed with [src]") - user.visible_message("[user] tries to overloads [M]'s sensors with the [src.name], but is blocked by [M]'s shield!", "You try to overload [M]'s sensors with the [src.name], but are blocked by their shield!") + user.visible_message("[user] tries to overloads [M]'s sensors with the [src.name], but is blocked by [M]'s shield!", "You try to overload [M]'s sensors with the [src.name], but are blocked by [M.p_their()] shield!") return 1 add_attack_logs(user, M, "Flashed with [src]") if(M.flash_eyes(affect_silicon = 1)) @@ -168,9 +168,9 @@ resisted = 1 if(resisted) - to_chat(user, "This mind seems resistant to the [src.name]!") + to_chat(user, "This mind seems resistant to the [name]!") else - to_chat(user, "They must be conscious before you can convert them!") + to_chat(user, "They must be conscious before you can convert [M.p_them()]!") else to_chat(user, "This mind is so vacant that it is not susceptible to influence!") diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index e7156cb6888..fb1956a56e9 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -61,10 +61,10 @@ if(M == user) //they're using it on themselves if(M.flash_eyes(visual = 1)) - M.visible_message("[M] directs [src] to \his eyes.", \ + M.visible_message("[M] directs [src] to [M.p_their()] eyes.", \ "You wave the light in front of your eyes! Trippy!") else - M.visible_message("[M] directs [src] to \his eyes.", \ + M.visible_message("[M] directs [src] to [M.p_their()] eyes.", \ "You wave the light in front of your eyes.") else diff --git a/code/game/objects/items/devices/instruments.dm b/code/game/objects/items/devices/instruments.dm index 3a0f2b6941d..639382ed03e 100644 --- a/code/game/objects/items/devices/instruments.dm +++ b/code/game/objects/items/devices/instruments.dm @@ -18,7 +18,7 @@ return ..() /obj/item/instrument/suicide_act(mob/user) - user.visible_message("[user] begins to play 'Gloomy Sunday'! It looks like \he's trying to commit suicide!") + user.visible_message("[user] begins to play 'Gloomy Sunday'! It looks like [user.p_theyre()] trying to commit suicide!") return (BRUTELOSS) /obj/item/instrument/Initialize(mapload) diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 678d6837a8e..c8ab2e1fc4f 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -109,11 +109,11 @@ //20% chance to actually hit the eyes if(prob(effectchance * diode.rating) && C.flash_eyes(severity)) - outmsg = "You blind [C] by shining [src] in their eyes." + outmsg = "You blind [C] by shining [src] in [C.p_their()] eyes." if(C.weakeyes) C.Stun(1) else - outmsg = "You fail to blind [C] by shining [src] at their eyes!" + outmsg = "You fail to blind [C] by shining [src] at [C.p_their()] eyes!" //robots and AI else if(issilicon(target)) @@ -123,11 +123,11 @@ S.flash_eyes(affect_silicon = 1) S.Weaken(rand(5,10)) to_chat(S, "Your sensors were overloaded by a laser!") - outmsg = "You overload [S] by shining [src] at their sensors." + outmsg = "You overload [S] by shining [src] at [S.p_their()] sensors." add_attack_logs(user, S, "shone [src] in their eyes") else - outmsg = "You fail to overload [S] by shining [src] at their sensors." + outmsg = "You fail to overload [S] by shining [src] at [S.p_their()] sensors." //cameras else if(istype(target, /obj/machinery/camera)) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 2a8e155dd06..62d8dc6c87d 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -245,7 +245,7 @@ REAGENT SCANNER user.show_message("Subject's pulse: [H.get_pulse(GETPULSE_TOOL)] bpm.") var/implant_detect for(var/obj/item/organ/internal/cyberimp/CI in H.internal_organs) - if(CI.status == ORGAN_ROBOT) + if(CI.is_robotic()) implant_detect += "[H.name] is modified with a [CI.name].
" if(implant_detect) user.show_message("Detected cybernetic modifications:") @@ -313,6 +313,9 @@ REAGENT SCANNER throw_range = 7 materials = list(MAT_METAL=30, MAT_GLASS=20) origin_tech = "magnets=1;engineering=1" + var/cooldown = FALSE + var/cooldown_time = 250 + var/accuracy // 0 is the best accuracy. /obj/item/analyzer/attack_self(mob/user as mob) @@ -366,6 +369,69 @@ REAGENT SCANNER src.add_fingerprint(user) return +/obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens + ..() + + if(!user.incapacitated() && Adjacent(user)) + + if(cooldown) + to_chat(user, "[src]'s barometer function is prepraring itself.") + return + + var/turf/T = get_turf(user) + if(!T) + return + + playsound(src, 'sound/effects/pop.ogg', 100) + var/area/user_area = T.loc + var/datum/weather/ongoing_weather = null + + if(!user_area.outdoors) + to_chat(user, "[src]'s barometer function won't work indoors!") + return + + for(var/V in SSweather.processing) + var/datum/weather/W = V + if(W.barometer_predictable && (T.z in W.impacted_z_levels) && W.area_type == user_area.type && !(W.stage == END_STAGE)) + ongoing_weather = W + break + + if(ongoing_weather) + if((ongoing_weather.stage == MAIN_STAGE) || (ongoing_weather.stage == WIND_DOWN_STAGE)) + to_chat(user, "[src]'s barometer function can't trace anything while the storm is [ongoing_weather.stage == MAIN_STAGE ? "already here!" : "winding down."]") + return + + to_chat(user, "The next [ongoing_weather] will hit in [butchertime(ongoing_weather.next_hit_time - world.time)].") + if(ongoing_weather.aesthetic) + to_chat(user, "[src]'s barometer function says that the next storm will breeze on by.") + else + var/next_hit = SSweather.next_hit_by_zlevel["[T.z]"] + var/fixed = next_hit ? next_hit - world.time : -1 + if(fixed < 0) + to_chat(user, "[src]'s barometer function was unable to trace any weather patterns.") + else + to_chat(user, "[src]'s barometer function says a storm will land in approximately [butchertime(fixed)].") + cooldown = TRUE + addtimer(CALLBACK(src,/obj/item/analyzer/proc/ping), cooldown_time) + +/obj/item/analyzer/proc/ping() + if(isliving(loc)) + var/mob/living/L = loc + to_chat(L, "[src]'s barometer function is ready!") + playsound(src, 'sound/machines/click.ogg', 100) + cooldown = FALSE + +/obj/item/analyzer/proc/butchertime(amount) + if(!amount) + return + if(accuracy) + var/inaccurate = round(accuracy * (1 / 3)) + if(prob(50)) + amount -= inaccurate + if(prob(50)) + amount += inaccurate + return DisplayTimeText(max(1, amount)) + /obj/item/mass_spectrometer desc = "A hand-held mass spectrometer which identifies trace chemicals in a blood sample. Inject sample with syringe." name = "mass-spectrometer" diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index beed9fb75c3..dbd7701ce93 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -63,8 +63,8 @@ A.holder = src A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb). - bombers += "[key_name(user)] attached a [A] to a transfer valve." - msg_admin_attack("[key_name_admin(user)]attached [A] to a transfer valve.") + investigate_log("[key_name(user)] attached a [A] to a transfer valve.", INVESTIGATE_BOMB) + msg_admin_attack("[key_name_admin(user)]attached [A] to a transfer valve.", ATKLOG_FEW) log_game("[key_name_admin(user)] attached [A] to a transfer valve.") attacher = user SSnanoui.update_uis(src) // update all UIs attached to src @@ -204,7 +204,7 @@ var/mob/mob = get_mob_by_key(src.fingerprintslast) - bombers += "Bomb valve opened at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name(mob)]" + investigate_log("Bomb valve opened at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name(mob)]", INVESTIGATE_BOMB) message_admins("Bomb valve opened at [A.name] (JMP) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name_admin(mob)]") log_game("Bomb valve opened at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name(mob)]") merge_gases() diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm index 2d40c1e683c..cc3320489f6 100644 --- a/code/game/objects/items/devices/uplinks.dm +++ b/code/game/objects/items/devices/uplinks.dm @@ -54,7 +54,7 @@ var/list/world_uplinks = list() dat += "Telecrystals left: [src.uses]
" dat += "
" dat += "Request item:
" - dat += "Each item costs a number of telecrystals as indicated by the number following their name.
" + dat += "Each item costs a number of telecrystals as indicated by the number following its name.
" var/category_items = 1 for(var/category in ItemsCategory) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 3ffdfaaf751..38a21f86b2c 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -12,6 +12,7 @@ var/self_delay = 20 var/unique_handling = 0 //some things give a special prompt, do we want to bypass some checks in parent? var/stop_bleeding = 0 + var/healverb = "bandage" /obj/item/stack/medical/attack(mob/living/M, mob/user) if(!iscarbon(M) && !isanimal(M)) @@ -34,7 +35,7 @@ to_chat(user, "That limb is missing!") return 1 - if(affecting.status & ORGAN_ROBOT) + if(affecting.is_robotic()) to_chat(user, "This can't be used on a robotic limb.") return 1 @@ -77,6 +78,40 @@ "You apply [src] on [M].") use(1) +/obj/item/stack/medical/proc/heal(mob/living/M, mob/user) + var/mob/living/carbon/human/H = M + var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) + user.visible_message("[user] [healverb]s the wounds on [H]'s [affecting.name].", \ + "You [healverb] the wounds on [H]'s [affecting.name]." ) + + var/rembrute = max(0, heal_brute - affecting.brute_dam) // Maxed with 0 since heal_damage let you pass in a negative value + var/remburn = max(0, heal_burn - affecting.burn_dam) // And deduct it from their health (aka deal damage) + var/nrembrute = rembrute + var/nremburn = remburn + affecting.heal_damage(heal_brute, heal_burn) + var/list/achildlist = affecting.children.Copy() + var/parenthealed = FALSE + while(rembrute + remburn > 0) // Don't bother if there's not enough leftover heal + var/obj/item/organ/external/E + if(achildlist.len) + E = pick_n_take(achildlist) // Pick a random children and then remove it from the list + else if(affecting.parent && !parenthealed) // If there's a parent and no healing attempt was made on it + E = affecting.parent + parenthealed = TRUE + else + break // If the organ have no child left and no parent / parent healed, break + if(E.status & ORGAN_ROBOT || E.open) // Ignore robotic or open limb + continue + else if(!E.brute_dam && !E.burn_dam) // Ignore undamaged limb + continue + nrembrute = max(0, rembrute - E.brute_dam) // Deduct the healed damage from the remain + nremburn = max(0, remburn - E.burn_dam) + E.heal_damage(rembrute, remburn) + rembrute = nrembrute + remburn = nremburn + user.visible_message("[user] [healverb]s the wounds on [H]'s [E.name] with the remaining medication.", \ + "You [healverb] the wounds on [H]'s [E.name] with the remaining medication." ) + //Bruise Packs// /obj/item/stack/medical/bruise_pack @@ -98,13 +133,12 @@ if(affecting.open == 0) affecting.germ_level = 0 - user.visible_message("[user] bandages the wounds on [H]'s [affecting.name].", \ - "You bandage the wounds on [H]'s [affecting.name]." ) - if(stop_bleeding) if(!H.bleedsuppress) //so you can't stack bleed suppression H.suppress_bloodloss(stop_bleeding) - affecting.heal_damage(heal_brute, heal_burn) + + heal(H, user) + H.UpdateDamageIcon() use(1) else @@ -131,6 +165,7 @@ singular_name = "ointment" icon_state = "ointment" origin_tech = "biotech=2" + healverb = "salve" /obj/item/stack/medical/ointment/attack(mob/living/M, mob/user) if(..()) @@ -143,9 +178,8 @@ if(affecting.open == 0) affecting.germ_level = 0 - user.visible_message("[user] salves the wounds on [H]'s [affecting.name].", \ - "You salve the wounds on [H]'s [affecting.name]." ) - affecting.heal_damage(heal_brute, heal_burn) + heal(H, user) + H.UpdateDamageIcon() use(1) else @@ -211,7 +245,7 @@ to_chat(user, "You remove the splint from [H]'s [limb].") return if(M == user) - user.visible_message("[user] starts to apply [src] to their [limb].", \ + user.visible_message("[user] starts to apply [src] to [user.p_their()] [limb].", \ "You start to apply [src] to your [limb].", \ "You hear something being wrapped.") if(!do_mob(user, H, self_delay)) diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index 593ef9a820f..ec5ba4ef684 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -28,7 +28,7 @@ var/mob/living/carbon/human/H = M var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting) - if(S && (S.status & ORGAN_ROBOT)) + if(S && S.is_robotic()) if(S.get_damage()) S.heal_damage(15, 15, robo_repair = 1) H.updatehealth() diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index a30c3e1b716..ebc89cdca7a 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -13,6 +13,15 @@ /* * Glass sheets */ + +GLOBAL_LIST_INIT(glass_recipes, list ( \ + new/datum/stack_recipe/window("directional window", /obj/structure/window/basic, time = 0, on_floor = TRUE, window_checks = TRUE), \ + new/datum/stack_recipe/window("fulltile window", /obj/structure/window/full/basic, 2, time = 0, on_floor = TRUE, window_checks = TRUE), \ + new/datum/stack_recipe("fishbowl", /obj/machinery/fishtank/bowl, 1, time = 0), \ + new/datum/stack_recipe("fish tank", /obj/machinery/fishtank/tank, 3, time = 0, on_floor = TRUE), \ + new/datum/stack_recipe("wall aquariam", /obj/machinery/fishtank/wall, 4, time = 0, on_floor = TRUE) \ +)) + /obj/item/stack/sheet/glass name = "glass" desc = "HOLY SHEET! That is a lot of glass." @@ -30,8 +39,9 @@ /obj/item/stack/sheet/glass/cyborg materials = list() -/obj/item/stack/sheet/glass/attack_self(mob/user as mob) - construct_window(user) +/obj/item/stack/sheet/glass/New(loc, amount) + recipes = GLOB.glass_recipes + ..() /obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user, params) ..() @@ -59,94 +69,18 @@ else return ..() -/obj/item/stack/sheet/glass/proc/construct_window(mob/user as mob) - if(!user || !src) return 0 - if(!istype(user.loc,/turf)) return 0 - if(!user.IsAdvancedToolUser()) - to_chat(user, "You don't have the dexterity to do this!") - return 0 - var/title = "Sheet-Glass" - title += " ([src.amount] sheet\s left)" - switch(input(title, "What would you like to construct?") in list("One Direction Window", "Full Window", "Fishbowl", "Fish Tank", "Wall Aquarium", "Cancel")) - if("One Direction Window") - if(!src) return 1 - if(src.loc != user) return 1 - - var/list/directions = new/list(cardinal) - var/i = 0 - for(var/obj/structure/window/win in user.loc) - i++ - if(i >= 4) - to_chat(user, "There are too many windows in this location.") - return 1 - directions-=win.dir - if(win.is_fulltile()) - to_chat(user, "Can't let you do that.") - return 1 - - //Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc. - var/dir_to_set = 2 - for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) )) - var/found = 0 - for(var/obj/structure/window/WT in user.loc) - if(WT.dir == direction) - found = 1 - if(!found) - dir_to_set = direction - break - - var/obj/structure/window/W - W = new /obj/structure/window/basic( user.loc, 0 ) - W.dir = dir_to_set - W.ini_dir = W.dir - W.state = 0 - W.anchored = 0 - W.air_update_turf(1) - src.use(1) - if("Full Window") - if(!src) return 1 - if(src.loc != user) return 1 - if(src.amount < 2) - to_chat(user, "You need more glass to do that.") - return 1 - if(locate(/obj/structure/window/full) in user.loc) - to_chat(user, "There is a full window in the way.") - return 1 - var/obj/structure/window/W = new full_window( user.loc, 0 ) - W.state = 0 - W.anchored = 0 - W.air_update_turf(1) - src.use(2) - if("Fishbowl") - if(!src) return 1 - if(src.loc != user) return 1 - var/obj/machinery/fishtank/F = new /obj/machinery/fishtank/bowl(user.loc, 0) - F.air_update_turf(1) - src.use(1) - if("Fish Tank") - if(!src) return 1 - if(src.loc != user) return 1 - if(src.amount < 3) - to_chat(user, "You need more glass to do that.") - return 1 - var/obj/machinery/fishtank/F = new /obj/machinery/fishtank/tank(user.loc, 0) - F.air_update_turf(1) - src.use(3) - if("Wall Aquarium") - if(!src) return 1 - if(src.loc != user) return 1 - if(src.amount < 4) - to_chat(user, "You need more glass to do that.") - return 1 - var/obj/machinery/fishtank/F = new /obj/machinery/fishtank/wall(user.loc, 0) - F.air_update_turf(1) - src.use(4) - return 0 - /* * Reinforced glass sheets */ + +GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \ + new/datum/stack_recipe/window("windoor frame", /obj/structure/windoor_assembly, 5, time = 0, on_floor = TRUE, window_checks = TRUE), \ + null, \ + new/datum/stack_recipe/window("directional reinforced window", /obj/structure/window/reinforced, time = 0, on_floor = TRUE, window_checks = TRUE), \ + new/datum/stack_recipe/window("fulltile reinforced window", /obj/structure/window/full/reinforced, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \ +)) + /obj/item/stack/sheet/rglass name = "reinforced glass" desc = "Glass which seems to have rods or something stuck in them." @@ -161,105 +95,14 @@ /obj/item/stack/sheet/rglass/cyborg materials = list() -/obj/item/stack/sheet/rglass/attack_self(mob/user as mob) - construct_window(user) - -/obj/item/stack/sheet/rglass/proc/construct_window(mob/user as mob) - if(!user || !src) return 0 - if(!istype(user.loc,/turf)) return 0 - if(!user.IsAdvancedToolUser()) - to_chat(user, "You don't have the dexterity to do this!") - return 0 - var/title = "Sheet Reinf. Glass" - title += " ([src.amount] sheet\s left)" - switch(input(title, "Would you like full tile glass a one direction glass pane or a windoor?") in list("One Direction", "Full Window", "Windoor", "Cancel")) - if("One Direction") - if(!src) return 1 - if(src.loc != user) return 1 - var/list/directions = new/list(cardinal) - var/i = 0 - for(var/obj/structure/window/win in user.loc) - i++ - if(i >= 4) - to_chat(user, "There are too many windows in this location.") - return 1 - directions-=win.dir - if(win.is_fulltile()) - to_chat(user, "Can't let you do that.") - return 1 - - //Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc. - var/dir_to_set = 2 - for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) )) - var/found = 0 - for(var/obj/structure/window/WT in user.loc) - if(WT.dir == direction) - found = 1 - if(!found) - dir_to_set = direction - break - - var/obj/structure/window/W - W = new /obj/structure/window/reinforced( user.loc, 1 ) - W.state = 0 - W.dir = dir_to_set - W.ini_dir = W.dir - W.anchored = 0 - src.use(1) - - if("Full Window") - if(!src) return 1 - if(src.loc != user) return 1 - if(src.amount < 2) - to_chat(user, "You need more glass to do that.") - return 1 - if(locate(/obj/structure/window/full) in user.loc) - to_chat(user, "There is a window in the way.") - return 1 - var/obj/structure/window/W = new full_window( user.loc, 0 ) - W.state = 0 - W.anchored = 0 - src.use(2) - - if("Windoor") - if(!src || src.loc != user) return 1 - - if(isturf(user.loc) && locate(/obj/structure/windoor_assembly/, user.loc)) - to_chat(user, "There is already a windoor assembly in that location.") - return 1 - - if(isturf(user.loc) && locate(/obj/machinery/door/window/, user.loc)) - to_chat(user, "There is already a windoor in that location.") - return 1 - - if(src.amount < 5) - to_chat(user, "You need more glass to do that.") - return 1 - - var/obj/structure/windoor_assembly/WD - WD = new /obj/structure/windoor_assembly(user.loc) - WD.state = "01" - WD.anchored = 0 - src.use(5) - switch(user.dir) - if(SOUTH) - WD.dir = SOUTH - WD.ini_dir = SOUTH - if(EAST) - WD.dir = EAST - WD.ini_dir = EAST - if(WEST) - WD.dir = WEST - WD.ini_dir = WEST - else//If the user is facing northeast. northwest, southeast, southwest or north, default to north - WD.dir = NORTH - WD.ini_dir = NORTH - else - return 1 - - - return 0 +/obj/item/stack/sheet/rglass/New(loc, amount) + recipes = GLOB.reinforced_glass_recipes + ..() +GLOBAL_LIST_INIT(pglass_recipes, list ( \ + new/datum/stack_recipe/window("directional window", /obj/structure/window/plasmabasic, time = 0, on_floor = TRUE, window_checks = TRUE), \ + new/datum/stack_recipe/window("fulltile window", /obj/structure/window/full/plasmabasic, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \ +)) /obj/item/stack/sheet/plasmaglass name = "plasma glass" @@ -271,8 +114,9 @@ created_window = /obj/structure/window/plasmabasic full_window = /obj/structure/window/full/plasmabasic -/obj/item/stack/sheet/plasmaglass/attack_self(mob/user as mob) - construct_window(user) +/obj/item/stack/sheet/plasmaglass/New(loc, amount) + recipes = GLOB.pglass_recipes + ..() /obj/item/stack/sheet/plasmaglass/attackby(obj/item/W, mob/user, params) ..() @@ -291,64 +135,15 @@ else return ..() -/obj/item/stack/sheet/plasmaglass/proc/construct_window(mob/user as mob) - if(!user || !src) return 0 - if(!istype(user.loc,/turf)) return 0 - if(!user.IsAdvancedToolUser()) - to_chat(user, " You don't have the dexterity to do this!") - return 0 - var/title = "Plasma-glass alloy" - title += " ([src.amount] sheet\s left)" - switch(alert(title, "Would you like full tile glass or one direction?", "One Direction", "Full Window", "Cancel", null)) - if("One Direction") - if(!src) return 1 - if(src.loc != user) return 1 - var/list/directions = new/list(cardinal) - var/i = 0 - for(var/obj/structure/window/win in user.loc) - i++ - if(i >= 4) - to_chat(user, "There are too many windows in this location.") - return 1 - directions-=win.dir - if(!(win.ini_dir in cardinal)) - to_chat(user, "Can't let you do that.") - return 1 - //Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc. - var/dir_to_set = 2 - for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) )) - var/found = 0 - for(var/obj/structure/window/WT in user.loc) - if(WT.dir == direction) - found = 1 - if(!found) - dir_to_set = direction - break - var/obj/structure/window/W - W = new /obj/structure/window/plasmabasic( user.loc, 0 ) - W.dir = dir_to_set - W.ini_dir = W.dir - W.state = 0 - W.anchored = 0 - src.use(1) - if("Full Window") - if(!src) return 1 - if(src.loc != user) return 1 - if(src.amount < 2) - to_chat(user, "You need more glass to do that.") - return 1 - if(locate(/obj/structure/window) in user.loc) - to_chat(user, "There is a window in the way.") - return 1 - var/obj/structure/window/W = new full_window( user.loc, 0 ) - W.state = 0 - W.anchored = 0 - src.use(2) - return 0 - /* * Reinforced plasma glass sheets */ + +GLOBAL_LIST_INIT(prglass_recipes, list ( \ + new/datum/stack_recipe/window("directional reinforced window", /obj/structure/window/plasmareinforced, time = 0, on_floor = TRUE, window_checks = TRUE), \ + new/datum/stack_recipe/window("fulltile reinforced window", /obj/structure/window/full/plasmareinforced, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \ +)) + /obj/item/stack/sheet/plasmarglass name = "reinforced plasma glass" desc = "Plasma glass which seems to have rods or something stuck in them." @@ -360,60 +155,42 @@ full_window = /obj/structure/window/full/plasmareinforced armor = list("melee" = 20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0) -/obj/item/stack/sheet/plasmarglass/attack_self(mob/user as mob) - construct_window(user) +/obj/item/stack/sheet/plasmarglass/New(loc, amount) + recipes = GLOB.prglass_recipes + ..() -/obj/item/stack/sheet/plasmarglass/proc/construct_window(mob/user as mob) - if(!user || !src) return 0 - if(!istype(user.loc,/turf)) return 0 - if(!user.IsAdvancedToolUser()) - to_chat(user, "You don't have the dexterity to do this!") - return 0 - var/title = "Reinforced plasma-glass alloy" - title += " ([src.amount] sheet\s left)" - switch(alert(title, "Would you like full tile glass or one direction?", "One Direction", "Full Window", "Cancel", null)) - if("One Direction") - if(!src) return 1 - if(src.loc != user) return 1 - var/list/directions = new/list(cardinal) - var/i = 0 - for(var/obj/structure/window/win in user.loc) - i++ - if(i >= 4) - to_chat(user, "There are too many windows in this location.") - return 1 - directions-=win.dir - if(!(win.ini_dir in cardinal)) - to_chat(user, "Can't let you do that.") - return 1 - //Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc. - var/dir_to_set = 2 - for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) )) - var/found = 0 - for(var/obj/structure/window/WT in user.loc) - if(WT.dir == direction) - found = 1 - if(!found) - dir_to_set = direction - break - var/obj/structure/window/W - W = new /obj/structure/window/plasmareinforced( user.loc, 0 ) - W.dir = dir_to_set - W.ini_dir = W.dir - W.state = 0 - W.anchored = 0 - src.use(1) - if("Full Window") - if(!src) return 1 - if(src.loc != user) return 1 - if(src.amount < 2) - to_chat(user, "You need more glass to do that.") - return 1 - if(locate(/obj/structure/window) in user.loc) - to_chat(user, "There is a window in the way.") - return 1 - var/obj/structure/window/W = new full_window( user.loc, 0 ) - W.state = 0 - W.anchored = 0 - src.use(2) - return 0 +GLOBAL_LIST_INIT(titaniumglass_recipes, list( + new/datum/stack_recipe/window("shuttle window", /obj/structure/window/full/shuttle, 2, time = 0, on_floor = TRUE, window_checks = TRUE) + )) + +/obj/item/stack/sheet/titaniumglass + name = "titanium glass" + desc = "A glass sheet made out of a titanium-silicate alloy." + singular_name = "titanium glass sheet" + icon_state = "sheet-titaniumglass" + item_state = "sheet-titaniumglass" + materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_GLASS=MINERAL_MATERIAL_AMOUNT) + merge_type = /obj/item/stack/sheet/titaniumglass + full_window = /obj/structure/window/full/shuttle + +/obj/item/stack/sheet/titaniumglass/New(loc, amount) + recipes = GLOB.titaniumglass_recipes + ..() + +GLOBAL_LIST_INIT(plastitaniumglass_recipes, list( + new/datum/stack_recipe/window("plastitanium window", /obj/structure/window/plastitanium, 2, time = 0, on_floor = TRUE, window_checks = TRUE) + )) + +/obj/item/stack/sheet/plastitaniumglass + name = "plastitanium glass" + desc = "A glass sheet made out of a plasma-titanium-silicate alloy." + singular_name = "plastitanium glass sheet" + icon_state = "sheet-plastitaniumglass" + item_state = "sheet-plastitaniumglass" + materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_PLASMA=MINERAL_MATERIAL_AMOUNT, MAT_GLASS=MINERAL_MATERIAL_AMOUNT) + merge_type = /obj/item/stack/sheet/plastitaniumglass + full_window = /obj/structure/window/plastitanium + +/obj/item/stack/sheet/plastitaniumglass/New(loc, amount) + recipes = GLOB.plastitaniumglass_recipes + ..() diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 4412b547b19..5ef40ee25e8 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -318,7 +318,11 @@ var/global/list/datum/stack_recipe/cult = list ( \ /* * Brass */ -var/global/list/datum/stack_recipe/brass_recipes = list ( \ +var/global/list/datum/stack_recipe/brass_recipes = list (\ + new/datum/stack_recipe/window("brass windoor", /obj/machinery/door/window/clockwork, 2, time = 30, on_floor = TRUE, window_checks = TRUE), \ + null, + new/datum/stack_recipe/window("directional brass window", /obj/structure/window/reinforced/clockwork, time = 0, on_floor = TRUE, window_checks = TRUE), \ + new/datum/stack_recipe/window("fulltile brass window", /obj/structure/window/reinforced/clockwork/fulltile, 2, time = 0, on_floor = TRUE, window_checks = TRUE), \ new/datum/stack_recipe("brass table frame", /obj/structure/table_frame/brass, 1, time = 5, one_per_turf = TRUE, on_floor = TRUE), \ ) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 4dd6ca365bf..e55569b23e8 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -149,6 +149,10 @@ to_chat(usr, "You haven't got enough [src] to build \the [R.title]!") return 0 + if(R.window_checks && !valid_window_location(usr.loc, usr.dir)) + to_chat(usr, "The [R.title] won't fit here!") + return FALSE + if(R.one_per_turf && (locate(R.result_type) in creation_loc)) to_chat(usr, "There is another [R.title] here!") return 0 @@ -166,7 +170,7 @@ return var/atom/O = new R.result_type(creation_loc) - O.dir = usr.dir + O.setDir(usr.dir) if(R.max_res_amount > 1) var/obj/item/stack/new_item = O new_item.amount = R.res_amount * multiplier diff --git a/code/game/objects/items/stacks/stack_recipe.dm b/code/game/objects/items/stacks/stack_recipe.dm index 67ddd964d0d..10d06e9741d 100644 --- a/code/game/objects/items/stacks/stack_recipe.dm +++ b/code/game/objects/items/stacks/stack_recipe.dm @@ -11,8 +11,9 @@ var/time = 0 var/one_per_turf = 0 var/on_floor = 0 + var/window_checks = FALSE -/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0) +/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0, window_checks = FALSE) src.title = title src.result_type = result_type src.req_amount = req_amount @@ -21,6 +22,7 @@ src.time = time src.one_per_turf = one_per_turf src.on_floor = on_floor + src.window_checks = window_checks /datum/stack_recipe/proc/post_build(var/obj/item/stack/S, var/obj/result) return @@ -40,6 +42,17 @@ R.update_icon() ..() +/datum/stack_recipe/window +/datum/stack_recipe/window/post_build(obj/item/stack/S, obj/result) + if(istype(result, /obj/structure/windoor_assembly)) + var/obj/structure/windoor_assembly/W = result + W.ini_dir = W.dir + else if(istype(result, /obj/structure/window)) + var/obj/structure/window/W = result + W.ini_dir = W.dir + W.anchored = FALSE + W.state = WINDOW_OUT_OF_FRAME + /* * Recipe list datum */ diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index b321721b639..5e8577d756a 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -229,8 +229,8 @@ hitsound = 'sound/weapons/bladeslice.ogg' /obj/item/toy/katana/suicide_act(mob/user) - var/dmsg = pick("[user] tries to stab \the [src] into their abdomen, but it shatters! They look as if they might die from the shame.","[user] tries to stab \the [src] into their abdomen, but \the [src] bends and breaks in half! They look as if they might die from the shame.","[user] tries to slice their own throat, but the plastic blade has no sharpness, causing them to lose their balance, slip over, and break their neck with a loud snap!") - user.visible_message("[dmsg] It looks like they are trying to commit suicide.") + var/dmsg = pick("[user] tries to stab \the [src] into [user.p_their()] abdomen, but it shatters! [user.p_they(TRUE)] look[user.p_s()] as if [user.p_they()] might die from the shame.","[user] tries to stab \the [src] into [user.p_their()] abdomen, but \the [src] bends and breaks in half! [user.p_they(TRUE)] look[user.p_s()] as if [user.p_they()] might die from the shame.","[user] tries to slice [user.p_their()] own throat, but the plastic blade has no sharpness, causing [user.p_them()] to lose [user.p_their()] balance, slip over, and break [user.p_their()] neck with a loud snap!") + user.visible_message("[dmsg] It looks like [user.p_theyre()] trying to commit suicide.") return (BRUTELOSS) @@ -531,7 +531,7 @@ obj/item/toy/cards/deck/attackby(obj/item/toy/cards/cardhand/C, mob/living/user, to_chat(user, "The hand of cards is stuck to your hand, you can't add it to the deck!") return cards += C.currenthand - user.visible_message("[user] puts their hand of cards in the deck.", "You put the hand of cards in the deck.") + user.visible_message("[user] puts [user.p_their()] hand of cards in the deck.", "You put the hand of cards in the deck.") qdel(C) else to_chat(user, "You can't mix cards from other decks.") @@ -610,7 +610,7 @@ obj/item/toy/cards/cardhand/Topic(href, href_list) C.apply_card_vars(C,O) C.pickup(cardUser) cardUser.put_in_any_hand_if_possible(C) - cardUser.visible_message("[cardUser] draws a card from \his hand.", "You take the [C.cardname] from your hand.") + cardUser.visible_message("[cardUser] draws a card from [cardUser.p_their()] hand.", "You take the [C.cardname] from your hand.") interact(cardUser) if(currenthand.len < 3) @@ -637,7 +637,7 @@ obj/item/toy/cards/cardhand/attackby(obj/item/toy/cards/singlecard/C, mob/living if(C.parentdeck == parentdeck) currenthand += C.cardname user.unEquip(C) - user.visible_message("[user] adds a card to their hand.", "You add the [C.cardname] to your hand.") + user.visible_message("[user] adds a card to [user.p_their()] hand.", "You add the [C.cardname] to your hand.") interact(user) if(currenthand.len > 4) icon_state = "[deckstyle]_hand5" @@ -677,7 +677,7 @@ obj/item/toy/cards/singlecard/examine(mob/user) if(ishuman(user)) var/mob/living/carbon/human/cardUser = user if(cardUser.get_item_by_slot(slot_l_hand) == src || cardUser.get_item_by_slot(slot_r_hand) == src) - cardUser.visible_message("[cardUser] checks \his card.", "The card reads: [src.cardname]") + cardUser.visible_message("[cardUser] checks [cardUser.p_their()] card.", "The card reads: [src.cardname]") else to_chat(cardUser, "You need to have the card in your hand to check it.") @@ -726,7 +726,7 @@ obj/item/toy/cards/singlecard/attackby(obj/item/I, mob/living/user, params) if(H.parentdeck == parentdeck) H.currenthand += cardname user.unEquip(src) - user.visible_message("[user] adds a card to \his hand.", "You add the [cardname] to your hand.") + user.visible_message("[user] adds a card to [user.p_their()] hand.", "You add the [cardname] to your hand.") H.interact(user) if(H.currenthand.len > 4) H.icon_state = "[deckstyle]_hand5" @@ -1367,7 +1367,7 @@ obj/item/toy/cards/deck/syndicate/black var/bullet_position = 1 /obj/item/toy/russian_revolver/suicide_act(mob/user) - user.visible_message("[user] quickly loads six bullets into [src]'s cylinder and points it at \his head before pulling the trigger! It looks like they are trying to commit suicide.") + user.visible_message("[user] quickly loads six bullets into [src]'s cylinder and points it at [user.p_their()] head before pulling the trigger! It looks like [user.p_theyre()] trying to commit suicide.") playsound(loc, 'sound/weapons/Gunshot.ogg', 50, 1) return (BRUTELOSS) @@ -1393,7 +1393,7 @@ obj/item/toy/cards/deck/syndicate/black if(!(user.has_organ("head"))) //For sanity to_chat(user, "Playing this game without a head would be classed as cheating.") return - user.visible_message("[user] points [src] at their head, ready to pull the trigger!") + user.visible_message("[user] points [src] at [user.p_their()] head, ready to pull the trigger!") if(do_after(user, 30, target = user)) if(bullet_position > 1) user.visible_message("*click*") @@ -1407,7 +1407,7 @@ obj/item/toy/cards/deck/syndicate/black user.apply_damage(200, BRUTE, "head", sharp = 1, used_weapon = "Self-inflicted gunshot wound to the head.") user.death() else - user.visible_message("[user] lowers [src] from their head.") + user.visible_message("[user] lowers [src] from [user.p_their()] head.") /obj/item/toy/russian_revolver/proc/spin_cylinder() bullet_position = rand(1,6) @@ -1662,7 +1662,7 @@ obj/item/toy/cards/deck/syndicate/black /obj/item/toy/eight_ball/attack_self(mob/user as mob) if(!cooldown) var/answer = pick(possible_answers) - user.visible_message("[user] focuses on their question and [use_action]...") + user.visible_message("[user] focuses on [user.p_their()] question and [use_action]...") user.visible_message("[bicon(src)] The [src] says \"[answer]\"") spawn(30) cooldown = 0 diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index fe132c107b0..5cc7ee684af 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -9,10 +9,10 @@ RCD icon_state = "rcd" opacity = 0 density = 0 - anchored = 0.0 - flags = CONDUCT - force = 10.0 - throwforce = 10.0 + anchored = 0 + flags = CONDUCT | NOBLUDGEON + force = 0 + throwforce = 10 throw_speed = 3 throw_range = 5 w_class = WEIGHT_CLASS_NORMAL @@ -296,8 +296,6 @@ RCD var/turf/T1 = get_turf(A) QDEL_NULL(A) for(var/obj/structure/window/W in T1.contents) - W.disassembled = 1 - W.density = 0 qdel(W) for(var/cdir in cardinal) var/turf/T2 = get_step(T1, cdir) @@ -307,8 +305,6 @@ RCD continue for(var/obj/structure/window/W in T2.contents) if(W.dir == turn(cdir, 180)) - W.disassembled = 1 - W.density = 0 qdel(W) var/obj/structure/window/reinforced/W = new(T2) W.dir = turn(cdir, 180) @@ -331,16 +327,12 @@ RCD activate() new /obj/structure/grille(A) for(var/obj/structure/window/W in contents) - W.disassembled = 1 // Prevent that annoying glass breaking sound - W.density = 0 qdel(W) for(var/cdir in cardinal) var/turf/T = get_step(A, cdir) if(locate(/obj/structure/grille) in T.contents) for(var/obj/structure/window/W in T.contents) if(W.dir == turn(cdir, 180)) - W.disassembled = 1 - W.density = 0 qdel(W) else // Build a window! var/obj/structure/window/reinforced/W = new(A) diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index 835de7617ee..62b203e43b1 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -57,16 +57,13 @@ RSF if(!proximity) return if(!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor))) return - var spawn_location - if(istype(A, /obj/structure/table)) - spawn_location = A.loc - else if (istype(A, /obj/structure/table)) - spawn_location = A + var/turf/T = get_turf(A) + if(istype(T) && !T.density) + spawn_location = T else to_chat(user, "The RSF can only create service items on tables, or floors.") return - if(isrobot(user)) var/mob/living/silicon/robot/engy = user if(!engy.cell.use(configured_items[mode][2])) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 8566fac6a3c..38fccdf4437 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -463,7 +463,7 @@ var/new_job = "Civilian" if(department == "Custom") - new_job = sanitize(stripped_input(user,"Choose a custom jon title:","Agent Card Occupation", "Civilian", MAX_MESSAGE_LEN)) + new_job = sanitize(stripped_input(user,"Choose a custom job title:","Agent Card Occupation", "Civilian", MAX_MESSAGE_LEN)) else if(department != "Civilian") switch(department) if("Engineering") diff --git a/code/game/objects/items/weapons/cigs.dm b/code/game/objects/items/weapons/cigs.dm index 9a55bb8e562..73ff43abbde 100644 --- a/code/game/objects/items/weapons/cigs.dm +++ b/code/game/objects/items/weapons/cigs.dm @@ -54,7 +54,7 @@ LIGHTERS ARE IN LIGHTERS.DM if(istype(M) && M.on_fire) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(M) - light("[user] coldly lights the [name] with the burning body of [M]. Clearly, they offer the warmest of regards...") + light("[user] coldly lights the [name] with the burning body of [M]. Clearly, [user.p_they()] offer[user.p_s()] the warmest of regards...") return 1 else return ..() @@ -73,31 +73,31 @@ LIGHTERS ARE IN LIGHTERS.DM else if(istype(W, /obj/item/lighter/zippo)) var/obj/item/lighter/zippo/Z = W if(Z.lit) - light("With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.") + light("With a single flick of [user.p_their()] wrist, [user] smoothly lights [user.p_their()] [name] with [user.p_their()] [W]. Damn [user.p_theyre()] cool.") else if(istype(W, /obj/item/lighter)) var/obj/item/lighter/L = W if(L.lit) - light("After some fiddling, [user] manages to light their [name] with [W].") + light("After some fiddling, [user] manages to light [user.p_their()] [name] with [W].") else if(istype(W, /obj/item/match)) var/obj/item/match/M = W if(M.lit == 1) - light("[user] lights their [name] with their [W].") + light("[user] lights [user.p_their()] [name] with [user.p_their()] [W].") else if(istype(W, /obj/item/melee/energy/sword/saber)) var/obj/item/melee/energy/sword/saber/S = W if(S.active) - light("[user] swings their [W], barely missing their nose. They light their [name] in the process.") + light("[user] swings their [W], barely missing their nose. [user.p_they(TRUE)] light[user.p_s()] [user.p_their()] [name] in the process.") else if(istype(W, /obj/item/assembly/igniter)) - light("[user] fiddles with [W], and manages to light their [name].") + light("[user] fiddles with [W], and manages to light [user.p_their()] [name].") else if(istype(W, /obj/item/gun/magic/wand/fireball)) var/obj/item/gun/magic/wand/fireball/F = W if(F.charges) if(prob(50) || user.mind.assigned_role == "Wizard") - light("Holy shit, did [user] just manage to light their [name] with [W], with only moderate eyebrow singing?") + light("Holy shit, did [user] just manage to light [user.p_their()] [name] with [W], with only moderate eyebrow singing?") else to_chat(user, "Unsure which end of the wand is which, [user] fails to light [name] with [W].") explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2) diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index 02a01a25e83..ec8a2a5e325 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -63,8 +63,8 @@ to_chat(user, "You need to wipe off the old lipstick first!") return if(H == user) - user.visible_message("[user] does their lips with \the [src].", \ - "You take a moment to apply \the [src]. Perfect!") + user.visible_message("[user] does [user.p_their()] lips with [src].", \ + "You take a moment to apply [src]. Perfect!") H.lip_style = "lipstick" H.lip_color = colour H.update_body() @@ -106,11 +106,11 @@ to_chat(user, "Already clean-shaven.") return if(H == user) //shaving yourself - user.visible_message("[user] starts to shave their facial hair with \the [src].", \ + user.visible_message("[user] starts to shave [user.p_their()] facial hair with [src].", \ "You take a moment shave your facial hair with \the [src].") if(do_after(user, 50 * toolspeed, target = H)) - user.visible_message("[user] shaves \his facial hair clean with the [src].", \ - "You finish shaving with the [src]. Fast and clean!") + user.visible_message("[user] shaves [user.p_their()] facial hair clean with [src].", \ + "You finish shaving with [src]. Fast and clean!") C.f_style = "Shaved" H.update_fhair() playsound(src.loc, usesound, 20, 1) @@ -140,10 +140,10 @@ to_chat(user, "Your razor isn't going to cut through tentacles.") return if(H == user) //shaving yourself - user.visible_message("[user] starts to shave their head with \the [src].", \ + user.visible_message("[user] starts to shave [user.p_their()] head with [src].", \ "You start to shave your head with \the [src].") if(do_after(user, 50 * toolspeed, target = H)) - user.visible_message("[user] shaves \his head with \the [src].", \ + user.visible_message("[user] shaves [user.p_their()] head with [src].", \ "You finish shaving with \the [src].") C.h_style = "Skinhead" H.update_hair() diff --git a/code/game/objects/items/weapons/courtroom.dm b/code/game/objects/items/weapons/courtroom.dm index 160bdd9bb1e..d25b6f54d29 100644 --- a/code/game/objects/items/weapons/courtroom.dm +++ b/code/game/objects/items/weapons/courtroom.dm @@ -14,7 +14,7 @@ burn_state = FLAMMABLE /obj/item/gavelhammer/suicide_act(mob/user) - user.visible_message("[user] has sentenced \himself to death with the [src.name]! It looks like \he's trying to commit suicide.") + user.visible_message("[user] has sentenced [user.p_them()]self to death with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") playsound(loc, 'sound/items/gavel.ogg', 50, 1, -1) return (BRUTELOSS) diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index e018625a971..b1fc3398af0 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -276,7 +276,7 @@ icon_state = "defibpaddles[wielded]_cooldown" /obj/item/twohanded/shockpaddles/suicide_act(mob/user) - user.visible_message("[user] is putting the live paddles on \his chest! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide.") defib.deductcharge(revivecost) playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1) return (OXYLOSS) @@ -375,6 +375,13 @@ update_icon() return else + var/obj/item/organ/internal/heart/heart = H.get_int_organ(/obj/item/organ/internal/heart) + if(heart.status & ORGAN_DEAD) + user.visible_message("[defib] buzzes: Resuscitation failed - Heart necrosis detected.") + playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0) + busy = 0 + update_icon() + return H.set_heartattack(FALSE) user.visible_message("[defib] pings: Cardiac arrhythmia corrected.") M.visible_message("[M]'s body convulses a bit.") diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm index 8ccfed1b517..d93ebcf3214 100644 --- a/code/game/objects/items/weapons/dice.dm +++ b/code/game/objects/items/weapons/dice.dm @@ -159,7 +159,7 @@ var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) - bombers += "E20 detonated at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with a roll of [result]. Triggered by: [key_name(user)]" + investigate_log("E20 detonated at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with a roll of [result]. Triggered by: [key_name(user)]", INVESTIGATE_BOMB) message_admins("E20 detonated at [A.name] (JMP) with a roll of [result]. Triggered by: [key_name_admin(user)]") log_game("E20 detonated at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with a roll of [result]. Triggered by: [key_name(user)]") diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index d120fb4e1cd..3a8bf12b143 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -142,7 +142,7 @@ else to_chat(user, "You inject yourself with [src].") - add_attack_logs(user, M, attack_log, FALSE) + add_attack_logs(user, M, attack_log, ATKLOG_ALL) if(!iscarbon(user)) M.LAssailant = null else diff --git a/code/game/objects/items/weapons/dnascrambler.dm b/code/game/objects/items/weapons/dnascrambler.dm index cd1d79ae683..2866e8d06ec 100644 --- a/code/game/objects/items/weapons/dnascrambler.dm +++ b/code/game/objects/items/weapons/dnascrambler.dm @@ -25,11 +25,11 @@ if(ishuman(M)) var/mob/living/carbon/human/H = M if(NO_DNA in H.species.species_traits) - to_chat(user, "You failed to inject [M], as they have no DNA to scramble, nor flesh to inject.") + to_chat(user, "You failed to inject [M], as [M.p_they()] [M.p_have()] no DNA to scramble, nor flesh to inject.") return if(M == user) - user.visible_message("[user] injects \himself with [src]!") + user.visible_message("[user] injects [user.p_them()]self with [src]!") injected(user, user) else user.visible_message("[user] is trying to inject [M] with [src]!") diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 6164ed01047..edf7e0fc32b 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -90,7 +90,7 @@ /obj/item/grenade/plastic/suicide_act(mob/user) message_admins("[key_name_admin(user)](?) (FLW) suicided with [src.name] at ([user.x],[user.y],[user.z] - JMP)",0,1) log_game("[key_name(user)] suicided with [name] at ([user.x],[user.y],[user.z])") - user.visible_message("[user] activates the [name] and holds it above \his head! It looks like \he's going out with a bang!") + user.visible_message("[user] activates the [name] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] going out with a bang!") var/message_say = "FOR NO RAISIN!" if(user.mind) if(user.mind.special_role) diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm index 7893a7898b8..4a01914a31a 100644 --- a/code/game/objects/items/weapons/garrote.dm +++ b/code/game/objects/items/weapons/garrote.dm @@ -75,7 +75,7 @@ return if(improvised && ((M.head && (M.head.flags_cover & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags_cover & MASKCOVERSMOUTH)))) // Improvised garrotes are blocked by mouth-covering items. - to_chat(user, "[M]'s neck is blocked by something they're wearing!") + to_chat(user, "[M]'s neck is blocked by something [M.p_theyre()] wearing!") if(strangling) to_chat(user, "You cannot use [src] on two people at once!") @@ -134,7 +134,7 @@ G = user.r_hand else - user.visible_message("[user] loses \his grip on [strangling]'s neck.", \ + user.visible_message("[user] loses [user.p_their()] grip on [strangling]'s neck.", \ "You lose your grip on [strangling]'s neck.") strangling = null @@ -144,7 +144,7 @@ return if(!G.affecting) - user.visible_message("[user] loses \his grip on [strangling]'s neck.", \ + user.visible_message("[user] loses [user.p_their()] grip on [strangling]'s neck.", \ "You lose your grip on [strangling]'s neck.") strangling = null @@ -167,6 +167,6 @@ /obj/item/twohanded/garrote/suicide_act(mob/user) - user.visible_message("[user] is wrapping the [src] around \his neck and pulling the handles! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is wrapping the [src] around [user.p_their()] neck and pulling the handles! It looks like [user.p_theyre()] trying to commit suicide.") playsound(src.loc, 'sound/weapons/cablecuff.ogg', 15, 1, -1) return (OXYLOSS) diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index de85ec64a58..9e836fecc87 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -102,7 +102,7 @@ // This used to go before the assembly check, but that has absolutely zero to do with priming the damn thing. You could spam the admins with it. message_admins("[key_name_admin(usr)] has primed a [name] for detonation at [A.name] (JMP) [contained].") log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) [contained].") - bombers += "[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])[contained]." + investigate_log("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])[contained].", INVESTIGATE_BOMB) to_chat(user, "You prime the [name]! [det_time / 10] second\s!") playsound(user.loc, 'sound/weapons/armbomb.ogg', 60, 1) active = 1 diff --git a/code/game/objects/items/weapons/grenades/emgrenade.dm b/code/game/objects/items/weapons/grenades/emgrenade.dm index 44d21506ee6..5b6d585ef5f 100644 --- a/code/game/objects/items/weapons/grenades/emgrenade.dm +++ b/code/game/objects/items/weapons/grenades/emgrenade.dm @@ -7,5 +7,5 @@ /obj/item/grenade/empgrenade/prime() update_mob() - empulse(src, 4, 10) - qdel(src) \ No newline at end of file + empulse(src, 4, 10, 1) + qdel(src) diff --git a/code/game/objects/items/weapons/grenades/ghettobomb.dm b/code/game/objects/items/weapons/grenades/ghettobomb.dm index d0dc2c8fe06..ca6177c04fa 100644 --- a/code/game/objects/items/weapons/grenades/ghettobomb.dm +++ b/code/game/objects/items/weapons/grenades/ghettobomb.dm @@ -49,7 +49,8 @@ var/area/A = get_area(bombturf) message_admins("[ADMIN_LOOKUPFLW(user)] has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)].") - log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].") + log_game("[key_name(user)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].") + investigate_log("[key_name(user)] has primed a [name] for detonation at [A.name] [COORD(bombturf)])", INVESTIGATE_BOMB) if(iscarbon(user)) var/mob/living/carbon/C = user C.throw_mode_on() diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index c7ababde601..09fdfe5a27f 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -66,7 +66,7 @@ var/area/A = get_area(bombturf) message_admins("[key_name_admin(usr)] has primed a [name] for detonation at [A.name] (JMP)") log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])") - bombers += "[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])" + investigate_log("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])", INVESTIGATE_BOMB) if(iscarbon(user)) var/mob/living/carbon/C = user C.throw_mode_on() diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm index 2d0865faa36..ea799bbcd76 100644 --- a/code/game/objects/items/weapons/holy_weapons.dm +++ b/code/game/objects/items/weapons/holy_weapons.dm @@ -13,7 +13,7 @@ var/list/fluff_transformations = list() //does it have any special transformations only accessible to it? Should only be subtypes of /obj/item/nullrod /obj/item/nullrod/suicide_act(mob/user) - user.visible_message("[user] is killing \himself with \the [src.name]! It looks like \he's trying to get closer to god!") + user.visible_message("[user] is killing [user.p_them()]self with \the [src.name]! It looks like [user.p_theyre()] trying to get closer to god!") return (BRUTELOSS|FIRELOSS) /obj/item/nullrod/attack(mob/M, mob/living/carbon/user) @@ -575,7 +575,7 @@ if(missionary in viewers(target)) //missionary must maintain line of sight to target, but the target doesn't necessary need to be able to see the missionary do_convert(target, missionary) else - to_chat(missionary, "You lost sight of the target before they could be converted!") + to_chat(missionary, "You lost sight of the target before [target.p_they()] could be converted!") faith -= 25 //they escaped, so you only lost a little faith (to prevent spamming) else //the do_after failed, probably because you moved or dropped the staff to_chat(missionary, "Your concentration was broken!") @@ -585,12 +585,12 @@ if(!target || !ishuman(target) || !missionary || !ishuman(missionary)) return if(ismindslave(target) || target.mind.zealot_master) //mindslaves and zealots override the staff because the staff is just a temporary mindslave - to_chat(missionary, "Your faith is strong, but their mind is already slaved to someone else's ideals. Perhaps an inquisition would reveal more...") + to_chat(missionary, "Your faith is strong, but [target.p_their()] mind is already slaved to someone else's ideals. Perhaps an inquisition would reveal more...") faith -= 25 //same faith cost as losing sight of them mid-conversion, but did you just find someone who can lead you to a fellow traitor? return if(ismindshielded(target)) faith -= 75 - to_chat(missionary, "Your faith is strong, but their mind remains closed to your ideals. Your resolve helps you retain a bit of faith though.") + to_chat(missionary, "Your faith is strong, but [target.p_their()] mind remains closed to your ideals. Your resolve helps you retain a bit of faith though.") return else if(target.mind.assigned_role == "Psychiatrist" || target.mind.assigned_role == "Librarian") //fancy book lernin helps counter religion (day 0 job love, what madness!) if(prob(35)) //35% chance to fail @@ -602,7 +602,7 @@ faith -= 100 else if(target.mind.assigned_role == "Civilian") if(prob(55)) //55% chance to take LESS faith than normal, because civies are stupid and easily manipulated - to_chat(missionary, "Your message seems to resound well with [target]; converting them was much easier than expected.") + to_chat(missionary, "Your message seems to resound well with [target]; converting [target.p_them()] was much easier than expected.") faith -= 50 else //45% chance to take the normal 100 faith cost to_chat(missionary, "You successfully convert [target] to your cause. The following grows because of your faith!") diff --git a/code/game/objects/items/weapons/implants/implant_misc.dm b/code/game/objects/items/weapons/implants/implant_misc.dm index a657d08847b..9c4049e8904 100644 --- a/code/game/objects/items/weapons/implants/implant_misc.dm +++ b/code/game/objects/items/weapons/implants/implant_misc.dm @@ -58,7 +58,7 @@ /obj/item/implant/emp/activate() uses-- - empulse(imp_in, 3, 5) + empulse(imp_in, 3, 5, 1) if(!uses) qdel(src) diff --git a/code/game/objects/items/weapons/implants/implant_traitor.dm b/code/game/objects/items/weapons/implants/implant_traitor.dm index adf988c2dee..58f78a7be4e 100644 --- a/code/game/objects/items/weapons/implants/implant_traitor.dm +++ b/code/game/objects/items/weapons/implants/implant_traitor.dm @@ -55,7 +55,7 @@ ticker.mode.implanter[ref] = implanters ticker.mode.traitors += H.mind H.mind.special_role = SPECIAL_ROLE_TRAITOR - to_chat(H, "You're now completely loyal to [user.name]! You now must lay down your life to protect them and assist in their goals at any cost.") + to_chat(H, "You're now completely loyal to [user.name]! You now must lay down your life to protect [user.p_them()] and assist in [user.p_their()] goals at any cost.") var/datum/objective/protect/mindslave/MS = new MS.owner = H.mind MS.target = user.mind diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm index da6e3b95968..314077db68e 100644 --- a/code/game/objects/items/weapons/implants/implantchair.dm +++ b/code/game/objects/items/weapons/implants/implantchair.dm @@ -79,7 +79,7 @@ return var/mob/M = G.affecting if(M.buckled_mob) - to_chat(usr, "[M] will not fit into [src] because they have a slime latched onto their head.") + to_chat(usr, "[M] will not fit into [src] because [M.p_they()] [M.p_have()] a slime latched onto [M.p_their()] head.") return if(put_mob(M)) qdel(G) diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 93103568f58..668cc74ac73 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -113,9 +113,9 @@ sharp = 1 /obj/item/kitchen/knife/suicide_act(mob/user) - user.visible_message(pick("[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.", \ - "[user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.", \ - "[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.")) + user.visible_message(pick("[user] is slitting [user.p_their()] wrists with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.", \ + "[user] is slitting [user.p_their()] throat with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.", \ + "[user] is slitting [user.p_their()] stomach open with the [name]! It looks like [user.p_theyre()] trying to commit seppuku.")) return (BRUTELOSS) /obj/item/kitchen/knife/plastic diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm index e6ba57ff8da..047a75bd634 100644 --- a/code/game/objects/items/weapons/legcuffs.dm +++ b/code/game/objects/items/weapons/legcuffs.dm @@ -33,7 +33,7 @@ return ..() /obj/item/restraints/legcuffs/beartrap/suicide_act(mob/user) - user.visible_message("[user] is sticking \his head in the [src.name]! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is sticking [user.p_their()] head in the [name]! It looks like [user.p_theyre()] trying to commit suicide.") playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) return (BRUTELOSS) diff --git a/code/game/objects/items/weapons/lighters.dm b/code/game/objects/items/weapons/lighters.dm index a620f3fdb5c..94e97ea7c20 100644 --- a/code/game/objects/items/weapons/lighters.dm +++ b/code/game/objects/items/weapons/lighters.dm @@ -57,7 +57,7 @@ if(affecting.receive_damage( 0, 5 )) //INFERNO H.UpdateDamageIcon() H.updatehealth() - user.visible_message("After a few attempts, [user] manages to light the [src], they however burn their finger in the process.") + user.visible_message("After a few attempts, [user] manages to light the [src], [user.p_they()] however burn[user.p_s()] [user.p_their()] finger in the process.") set_light(2) processing_objects.Add(src) @@ -70,7 +70,7 @@ force = 0 attack_verb = null //human_defense.dm takes care of it if(istype(src, /obj/item/lighter/zippo) ) - user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing. Wow.") + user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what [user.p_theyre()] doing. Wow.") playsound(src.loc, 'sound/items/ZippoClose.ogg', 25, 1) else user.visible_message("[user] quietly shuts off the [src].") @@ -95,7 +95,7 @@ cig.attackby(src, user) else if(istype(src, /obj/item/lighter/zippo)) - cig.light("[user] whips the [name] out and holds it for [M]. Their arm is as steady as the unflickering flame they light \the [cig] with.") + cig.light("[user] whips the [name] out and holds it for [M]. [user.p_their(TRUE)] arm is as steady as the unflickering flame [user.p_they()] light[user.p_s()] \the [cig] with.") else cig.light("[user] holds the [name] out for [M], and lights the [cig.name].") M.update_inv_wear_mask() diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 6702f893d50..2dcbef5b1a5 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -14,8 +14,8 @@ var/colormap = list(red=LIGHT_COLOR_RED, blue=LIGHT_COLOR_LIGHTBLUE, green=LIGHT_COLOR_GREEN, purple=LIGHT_COLOR_PURPLE, rainbow=LIGHT_COLOR_WHITE) /obj/item/melee/energy/suicide_act(mob/user) - user.visible_message(pick("[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.", \ - "[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.")) + user.visible_message(pick("[user] is slitting [user.p_their()] stomach open with the [name]! It looks like [user.p_theyre()] trying to commit seppuku.", \ + "[user] is falling on the [name]! It looks like [user.p_theyre()] trying to commit suicide.")) return (BRUTELOSS|FIRELOSS) /obj/item/melee/energy/attack_self(mob/living/carbon/user) @@ -80,7 +80,7 @@ light_color = LIGHT_COLOR_WHITE /obj/item/melee/energy/axe/suicide_act(mob/user) - user.visible_message("[user] swings the [src.name] towards /his head! It looks like \he's trying to commit suicide.") + user.visible_message("[user] swings the [name] towards [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide.") return (BRUTELOSS|FIRELOSS) /obj/item/melee/energy/sword diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index 267c2deda5e..a19df11e790 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -17,7 +17,7 @@ /obj/item/melee/chainofcommand/suicide_act(mob/user) - to_chat(viewers(user), "[user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide.") + to_chat(viewers(user), "[user] is strangling [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") return (OXYLOSS) /obj/item/melee/rapier diff --git a/code/game/objects/items/weapons/pneumaticCannon.dm b/code/game/objects/items/weapons/pneumaticCannon.dm index 84b8d55a915..64f554682fc 100644 --- a/code/game/objects/items/weapons/pneumaticCannon.dm +++ b/code/game/objects/items/weapons/pneumaticCannon.dm @@ -103,7 +103,7 @@ to_chat(user, "\The [src] lets out a weak hiss and doesn't react!") return if(user && (CLUMSY in user.mutations) && prob(75)) - user.visible_message("[user] loses their grip on [src], causing it to go off!", "[src] slips out of your hands and goes off!") + user.visible_message("[user] loses [user.p_their()] grip on [src], causing it to go off!", "[src] slips out of your hands and goes off!") user.drop_item() if(prob(10)) target = get_turf(user) diff --git a/code/game/objects/items/weapons/powerfist.dm b/code/game/objects/items/weapons/powerfist.dm index 7b6dfeb3a75..a2315544d35 100644 --- a/code/game/objects/items/weapons/powerfist.dm +++ b/code/game/objects/items/weapons/powerfist.dm @@ -83,7 +83,7 @@ user.do_attack_animation(target) target.apply_damage(force * fisto_setting, BRUTE) - target.visible_message("[user]'s powerfist lets out a loud hiss as they punch [target.name]!", \ + target.visible_message("[user]'s powerfist lets out a loud hiss as [user.p_they()] punch[user.p_es()] [target.name]!", \ "You cry out in pain as [user]'s punch flings you backwards!") new /obj/effect/temp_visual/kinetic_blast(target.loc) playsound(loc, 'sound/weapons/resonator_blast.ogg', 50, 1) diff --git a/code/game/objects/items/weapons/scissors.dm b/code/game/objects/items/weapons/scissors.dm index 677b2d99168..6ff1fbe95b0 100644 --- a/code/game/objects/items/weapons/scissors.dm +++ b/code/game/objects/items/weapons/scissors.dm @@ -114,7 +114,7 @@ playsound(loc, 'sound/goonstation/misc/Scissor.ogg', 100, 1) if(do_after(user, 50 * toolspeed, target = H)) playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) - user.visible_message("[user] abruptly stops cutting [M]'s hair and slices their throat!", "You stop cutting [M]'s hair and slice their throat!") //Just a little off the top. + user.visible_message("[user] abruptly stops cutting [M]'s hair and slices [M.p_their()] throat!", "You stop cutting [M]'s hair and slice [M.p_their()] throat!") //Just a little off the top. H.AdjustLoseBreath(10) //30 Oxy damage over time H.apply_damage(18, BRUTE, "head", sharp =1, used_weapon = "scissors") var/turf/location = get_turf(src) diff --git a/code/game/objects/items/weapons/shards.dm b/code/game/objects/items/weapons/shards.dm index 6170eae96a7..0f771fee03d 100644 --- a/code/game/objects/items/weapons/shards.dm +++ b/code/game/objects/items/weapons/shards.dm @@ -16,8 +16,8 @@ armor = list("melee" = 100, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0) /obj/item/shard/suicide_act(mob/user) - to_chat(viewers(user), pick("[user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.", - "[user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide.")) + to_chat(viewers(user), pick("[user] is slitting [user.p_their()] wrists with [src]! It looks like [user.p_theyre()] trying to commit suicide.", + "[user] is slitting [user.p_their()] throat with [src]! It looks like [user.p_theyre()] trying to commit suicide.")) return (BRUTELOSS) /obj/item/shard/New() @@ -45,7 +45,7 @@ var/mob/living/carbon/human/H = user if(!H.gloves) var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand") - if(affecting.status & ORGAN_ROBOT) + if(affecting.is_robotic()) return to_chat(H, "[src] cuts into your hand!") if(affecting.receive_damage(force*0.5)) @@ -82,7 +82,7 @@ var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot")) if(!affecting) return - if(affecting.status & ORGAN_ROBOT) + if(affecting.is_robotic()) return H.Weaken(3) if(affecting.receive_damage(5, 0)) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 9ef11ec3b2d..85a0e679bb6 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -49,10 +49,10 @@ if(istype(W, /obj/item/storage/backpack/holding)) var/response = alert(user, "Are you sure you want to put the bag of holding inside another bag of holding?","Are you sure you want to die?","Yes","No") if(response == "Yes") - user.visible_message("[user] grins as \he begins to put a Bag of Holding into a Bag of Holding!", "You begin to put the Bag of Holding into the Bag of Holding!") + user.visible_message("[user] grins as [user.p_they()] begin[user.p_s()] to put a Bag of Holding into a Bag of Holding!", "You begin to put the Bag of Holding into the Bag of Holding!") if(do_after(user, 30, target=src)) investigate_log("has become a singularity. Caused by [user.key]","singulo") - user.visible_message("[user] erupts in evil laughter as \he puts the Bag of Holding into another Bag of Holding!", "You can't help but laugh wildly as you put the Bag of Holding into another Bag of Holding, complete darkness surrounding you."," You hear the sound of scientific evil brewing! ") + user.visible_message("[user] erupts in evil laughter as [user.p_they()] put[user.p_s()] the Bag of Holding into another Bag of Holding!", "You can't help but laugh wildly as you put the Bag of Holding into another Bag of Holding, complete darkness surrounding you."," You hear the sound of scientific evil brewing! ") qdel(W) var/obj/singularity/singulo = new /obj/singularity(get_turf(user)) singulo.energy = 300 //To give it a small boost diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 2b67373d9c4..26793a8165b 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -40,7 +40,7 @@ cant_hold = list(/obj/item/disk/nuclear) /obj/item/storage/bag/trash/suicide_act(mob/user) - user.visible_message("[user] puts the [src.name] over their head and starts chomping at the insides! Disgusting!") + user.visible_message("[user] puts the [name] over [user.p_their()] head and starts chomping at the insides! Disgusting!") playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1) return (TOXLOSS) @@ -453,9 +453,9 @@ sleep(rand(2,4)) if( droppedSomething ) if( foundtable ) - user.visible_message("[user] unloads their service tray.") + user.visible_message("[user] unloads [user.p_their()] service tray.") else - user.visible_message("[user] drops all the items on their tray.") + user.visible_message("[user] drops all the items on [user.p_their()] tray.") return ..() diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index 4d56e2a22ad..03787385e1c 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -68,7 +68,7 @@ if(M.stat !=2) /*if((M.mind in ticker.mode.cult) && (prob(20))) to_chat(M, "The power of [src.deity_name] clears your mind of heresy!") - to_chat(user, "You see how [M]'s eyes become clear, the cult no longer holds control over him!") + to_chat(user, "You see how [M]'s eyes become clear, the cult no longer holds control over [M.p_them()]!") ticker.mode.remove_cultist(M.mind)*/ if((istype(M, /mob/living/carbon/human) && prob(60))) bless(M) diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index e0e43bfbda6..a78bc40dd3a 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -26,6 +26,7 @@ item_state = "syringe_kit" burn_state = FLAMMABLE var/foldable = /obj/item/stack/sheet/cardboard + var/amt = 1 /obj/item/storage/box/attack_self(mob/user) ..() @@ -49,7 +50,7 @@ return to_chat(user, "You fold [src] flat.") - var/obj/item/I = new foldable(get_turf(src)) + var/obj/item/stack/I = new foldable(get_turf(src), amt) user.put_in_hands(I) qdel(src) @@ -59,6 +60,7 @@ icon_state = "largebox" w_class = 42 // Big, bulky. foldable = /obj/item/stack/sheet/cardboard + amt = 4 storage_slots = 21 max_combined_w_class = 42 // 21*2 diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 9bf760aee29..4896f2cfb60 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -403,6 +403,7 @@ icon_state = "AquaticKit" throw_speed = 2 throw_range = 8 + med_bot_skin = "fish" /obj/item/storage/firstaid/aquatic_kit/full desc = "It's a starter kit for an acquarium; includes 1 tank brush, 1 egg scoop, 1 fish net, and 1 container of fish food." diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index 34e350e3d50..ddc8b79012f 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -21,6 +21,8 @@ var/treatment_fire = "salglu_solution" var/treatment_tox = "charcoal" var/treatment_virus = "spaceacillin" + var/med_bot_skin = null + var/syndicate_aligned = FALSE /obj/item/storage/firstaid/fire @@ -28,6 +30,7 @@ desc = "A medical kit that contains several medical patches and pills for treating burns. Contains one epinephrine syringe for emergency use and a health analyzer." icon_state = "ointment" item_state = "firstaid-ointment" + med_bot_skin = "ointment" New() ..() @@ -68,6 +71,7 @@ desc = "A medical kit designed to counter poisoning by common toxins. Contains three pills and syringes, and a health analyzer to determine the health of the patient." icon_state = "antitoxin" item_state = "firstaid-toxin" + med_bot_skin = "tox" New() ..() @@ -92,6 +96,7 @@ desc = "A first aid kit that contains four pills of salbutamol, which is able to counter injuries caused by suffocation. Also contains a health analyzer to determine the health of the patient." icon_state = "o2" item_state = "firstaid-o2" + med_bot_skin = "o2" New() ..() @@ -111,6 +116,7 @@ desc = "A medical kit that contains several medical patches and pills for treating brute injuries. Contains one epinephrine syringe for emergency use and a health analyzer." icon_state = "brute" item_state = "firstaid-brute" + med_bot_skin = "brute" New() ..() @@ -135,6 +141,7 @@ desc = "Contains advanced medical treatments." icon_state = "advfirstaid" item_state = "firstaid-advanced" + med_bot_skin = "adv" /obj/item/storage/firstaid/adv/New() ..() @@ -157,10 +164,12 @@ desc = "I hope you've got insurance." max_w_class = WEIGHT_CLASS_NORMAL treatment_oxy = "perfluorodecalin" - treatment_brute = "styptic_powder" - treatment_fire = "silver_sulfadiazine" + treatment_brute = "bicaridine" + treatment_fire = "kelotane" treatment_tox = "charcoal" req_one_access =list(access_syndicate) + med_bot_skin = "bezerk" + syndicate_aligned = TRUE /obj/item/storage/firstaid/tactical/New() ..() diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 98b8395f161..31cc7a1faf2 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -16,7 +16,7 @@ var/hitcost = 1000 /obj/item/melee/baton/suicide_act(mob/user) - user.visible_message("[user] is putting the live [name] in \his mouth! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is putting the live [name] in [user.p_their()] mouth! It looks like [user.p_theyre()] trying to commit suicide.") return (FIRELOSS) /obj/item/melee/baton/New() @@ -104,7 +104,7 @@ /obj/item/melee/baton/attack(mob/M, mob/living/user) if(status && (CLUMSY in user.mutations) && prob(50)) - user.visible_message("[user] accidentally hits themself with [src]!", \ + user.visible_message("[user] accidentally hits [user.p_them()]self with [src]!", \ "You accidentally hit yourself with [src]!") user.Weaken(stunforce*3) deductcharge(hitcost) @@ -175,7 +175,7 @@ user.Weaken(stunforce) user.stuttering = stunforce deductcharge(hitcost) - user.visible_message("[user] shocks themself while attempting to wash the active [src]!", \ + user.visible_message("[user] shocks [user.p_them()]self while attempting to wash the active [src]!", \ "You unwisely attempt to wash [src] while it's still on.") playsound(src, "sparks", 50, 1) return 1 diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index 38a16be40ce..57e0290346e 100644 --- a/code/game/objects/items/weapons/tape.dm +++ b/code/game/objects/items/weapons/tape.dm @@ -14,11 +14,11 @@ /obj/item/stack/tape_roll/attack(mob/living/carbon/human/M as mob, mob/living/user as mob) if(M.wear_mask) - to_chat(user, "Remove their mask first!") + to_chat(user, "Remove [M.p_their()] mask first!") else if(amount < 2) to_chat(user, "You'll need more tape for this!") else if(!M.check_has_mouth()) - to_chat(user, "They have no mouth to tape over!") + to_chat(user, "[M.p_they(TRUE)] [M.p_have()] no mouth to tape over!") else if(M == user) to_chat(user, "You try to tape your own mouth shut.") @@ -29,7 +29,7 @@ if(M == user) to_chat(user, "You cover your own mouth with a piece of duct tape.") else - to_chat(user, "You cover [M]'s mouth with a piece of duct tape. That will shut them up!") + to_chat(user, "You cover [M]'s mouth with a piece of duct tape. That will shut [M.p_them()] up!") M.visible_message("[user] tapes [M]'s mouth shut!") var/obj/item/clothing/mask/muzzle/G = new /obj/item/clothing/mask/muzzle/tapegag M.equip_to_slot(G, slot_wear_mask) diff --git a/code/game/objects/items/weapons/teleprod.dm b/code/game/objects/items/weapons/teleprod.dm index 8c942b5e0c5..1fe31f8a4f7 100644 --- a/code/game/objects/items/weapons/teleprod.dm +++ b/code/game/objects/items/weapons/teleprod.dm @@ -10,7 +10,7 @@ ..() if(status) if((CLUMSY in user.mutations) && prob(50)) - user.visible_message("[user] accidentally hits themself with [src]!", \ + user.visible_message("[user] accidentally hits [user.p_them()]self with [src]!", \ "You accidentally hit yourself with [src]!") user.Weaken(stunforce*3) deductcharge(hitcost) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 44cfc648757..43904d27359 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -28,7 +28,7 @@ toolspeed = 1 /obj/item/wrench/suicide_act(mob/user) - user.visible_message("[user] is beating themselves to death with [src]! It looks like they're trying to commit suicide!") + user.visible_message("[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!") playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1) return (BRUTELOSS) @@ -73,7 +73,7 @@ user.put_in_active_hand(s_drill) /obj/item/wrench/power/suicide_act(mob/user) - user.visible_message("[user] is pressing [src] against their head! It looks like they're trying to commit suicide!") + user.visible_message("[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!") return (BRUTELOSS) /obj/item/wrench/medical @@ -86,7 +86,7 @@ attack_verb = list("wrenched", "medicaled", "tapped", "jabbed", "whacked") /obj/item/wrench/medical/suicide_act(mob/user) - user.visible_message("[user] is praying to the medical wrench to take their soul. It looks like they're trying to commit suicide!") + user.visible_message("[user] is praying to the medical wrench to take [user.p_their()] soul. It looks like [user.p_theyre()] trying to commit suicide!") // TODO Make them glow with the power of the M E D I C A L W R E N C H // during their ascension @@ -139,7 +139,7 @@ toolspeed = 0.5 /obj/item/screwdriver/suicide_act(mob/user) - user.visible_message("[user] is stabbing [src] into their [pick("temple", "heart")]! It looks like they're trying to commit suicide!") + user.visible_message("[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!") return(BRUTELOSS) /obj/item/screwdriver/New(loc, var/param_color = null) @@ -192,7 +192,7 @@ toolspeed = 0.25 /obj/item/screwdriver/power/suicide_act(mob/user) - user.visible_message("[user] is putting [src] to their temple. It looks like they're trying to commit suicide!") + user.visible_message("[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!") return(BRUTELOSS) /obj/item/screwdriver/power/attack_self(mob/user) @@ -247,7 +247,7 @@ ..() /obj/item/wirecutters/suicide_act(mob/user) - user.visible_message("[user] is cutting at their arteries with [src]! It looks like they're trying to commit suicide!") + user.visible_message("[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!") playsound(loc, usesound, 50, 1, -1) return (BRUTELOSS) @@ -281,7 +281,7 @@ toolspeed = 0.25 /obj/item/wirecutters/power/suicide_act(mob/user) - user.visible_message("[user] is wrapping \the [src] around their neck. It looks like they're trying to rip their head off!") + user.visible_message("[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!") playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1) if(ishuman(user)) var/mob/living/carbon/human/H = user @@ -338,7 +338,7 @@ to_chat(user, "It contains [get_fuel()] unit\s of fuel out of [max_fuel].") /obj/item/weldingtool/suicide_act(mob/user) - user.visible_message("[user] welds their every orifice closed! It looks like they're trying to commit suicide!") + user.visible_message("[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!") return (FIRELOSS) /obj/item/weldingtool/proc/update_torch() @@ -400,7 +400,7 @@ if(!S) return - if(!(S.status & ORGAN_ROBOT) || user.a_intent != INTENT_HELP || S.open == 2) + if(!S.is_robotic() || user.a_intent != INTENT_HELP || S.open == 2) return ..() if(!isOn()) //why wasn't this being checked already? @@ -699,7 +699,7 @@ obj/item/weldingtool/experimental/process() var/airlock_open_time = 100 // Time required to open powered airlocks /obj/item/crowbar/power/suicide_act(mob/user) - user.visible_message("[user] is putting their head in [src], it looks like they're trying to commit suicide!") + user.visible_message("[user] is putting [user.p_their()] head in [src]. It looks like [user.p_theyre()] trying to commit suicide!") playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1) return (BRUTELOSS) diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 7bae5139b27..abe546d25b1 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -23,19 +23,20 @@ * Twohanded */ /obj/item/twohanded - var/wielded = 0 + var/wielded = FALSE var/force_unwielded = 0 var/force_wielded = 0 var/wieldsound = null var/unwieldsound = null /obj/item/twohanded/proc/unwield(mob/living/carbon/user) - if(!wielded || !user) return - wielded = 0 + if(!wielded || !user) + return + wielded = FALSE force = force_unwielded var/sf = findtext(name," (Wielded)") if(sf) - name = copytext(name,1,sf) + name = copytext(name, 1, sf) else //something wrong name = "[initial(name)]" update_icon() @@ -45,16 +46,16 @@ if(isrobot(user)) to_chat(user, "You free up your module.") else - to_chat(user, "You are now carrying the [name] with one hand.") + to_chat(user, "You are now carrying [name] with one hand.") if(unwieldsound) playsound(loc, unwieldsound, 50, 1) var/obj/item/twohanded/offhand/O = user.get_inactive_hand() if(O && istype(O)) O.unwield() - return /obj/item/twohanded/proc/wield(mob/living/carbon/user) - if(wielded) return + if(wielded) + return if(ishuman(user)) var/mob/living/carbon/human/H = user if(H.species.is_small) @@ -63,7 +64,7 @@ if(user.get_inactive_hand()) to_chat(user, "You need your other hand to be empty!") return - wielded = 1 + wielded = TRUE force = force_wielded name = "[name] (Wielded)" update_icon() @@ -80,7 +81,6 @@ O.name = "[name] - offhand" O.desc = "Your second grip on the [name]" user.put_in_inactive_hand(O) - return /obj/item/twohanded/dropped(mob/user) ..() @@ -124,22 +124,22 @@ ///////////Two hand required objects/////////////// //This is for objects that require two hands to even pick up -/obj/item/twohanded/required/ +/obj/item/twohanded/required w_class = WEIGHT_CLASS_HUGE /obj/item/twohanded/required/attack_self() return -/obj/item/twohanded/required/mob_can_equip(M as mob, slot) +/obj/item/twohanded/required/mob_can_equip(mob/M, slot) if(wielded && !slot_flags) to_chat(M, "[src] is too cumbersome to carry with anything but your hands!") - return 0 + return FALSE return ..() /obj/item/twohanded/required/attack_hand(mob/user)//Can't even pick it up without both hands empty var/obj/item/twohanded/required/H = user.get_inactive_hand() - if(get_dist(src,user) > 1) - return 0 + if(get_dist(src, user) > 1) + return FALSE if(H != null) to_chat(user, "[src] is too cumbersome to carry in one hand!") return @@ -163,7 +163,7 @@ desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?" force = 5 throwforce = 15 - sharp = 1 + sharp = TRUE w_class = WEIGHT_CLASS_BULKY slot_flags = SLOT_BACK force_unwielded = 5 @@ -174,30 +174,29 @@ /obj/item/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons. icon_state = "fireaxe[wielded]" - return -/obj/item/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity) - if(!proximity) return - ..() - if(A && wielded && (istype(A,/obj/structure/window) || istype(A,/obj/structure/grille))) //destroys windows and grilles in one hit - - if(istype(A,/obj/structure/window)) +/obj/item/twohanded/fireaxe/afterattack(atom/A, mob/user, proximity) + if(!proximity) + return + if(wielded) //destroys windows and grilles in one hit + if(istype(A, /obj/structure/window)) var/obj/structure/window/W = A - W.destroy() - else - qdel(A) + W.take_damage(200, BRUTE, "melee", 0) + else if(istype(A, /obj/structure/grille)) + var/obj/structure/grille/G = A + G.take_damage(40, BRUTE, "melee", 0) /* * Double-Bladed Energy Swords - Cheridan */ /obj/item/twohanded/dualsaber - var/hacked = 0 + var/hacked = FALSE var/blade_color icon_state = "dualsaber0" name = "double-bladed energy sword" desc = "Handle with care." force = 3 - throwforce = 5.0 + throwforce = 5 throw_speed = 1 throw_range = 5 w_class = WEIGHT_CLASS_SMALL @@ -209,7 +208,7 @@ origin_tech = "magnets=4;syndicate=5" attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") block_chance = 75 - sharp = 1 + sharp = TRUE light_power = 2 var/brightness_on = 2 var/colormap = list(red=LIGHT_COLOR_RED, blue=LIGHT_COLOR_LIGHTBLUE, green=LIGHT_COLOR_GREEN, purple=LIGHT_COLOR_PURPLE, rainbow=LIGHT_COLOR_WHITE) @@ -226,26 +225,35 @@ icon_state = "dualsaber0" set_light(0) -/obj/item/twohanded/dualsaber/attack(target as mob, mob/living/user as mob) +/obj/item/twohanded/dualsaber/attack(mob/target, mob/living/user) if(HULK in user.mutations) to_chat(user, "You grip the blade too hard and accidentally close it!") unwield() return ..() - if((CLUMSY in user.mutations) && (wielded) &&prob(40)) + if((CLUMSY in user.mutations) && (wielded) && prob(40)) to_chat(user, "You twirl around a bit before losing your balance and impaling yourself on the [src].") - user.take_organ_damage(20,25) + user.take_organ_damage(20, 25) return if((wielded) && prob(50)) - spawn(0) - for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2)) - user.dir = i - sleep(1) + INVOKE_ASYNC(src, .proc/jedi_spin, user) + +/obj/item/twohanded/dualsaber/proc/jedi_spin(mob/living/user) + for(var/i in list(NORTH, SOUTH, EAST, WEST, EAST, SOUTH, NORTH, SOUTH, EAST, WEST, EAST, SOUTH)) + user.setDir(i) + if(i == WEST) + user.SpinAnimation(7, 1) + sleep(1) /obj/item/twohanded/dualsaber/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance) if(wielded) return ..() - return 0 + return FALSE + +/obj/item/twohanded/dualsaber/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) //In case thats just so happens that it is still activated on the groud, prevents hulk from picking it up + if(wielded) + to_chat(user, "You can't pick up such a dangerous item with your meaty hands without losing fingers, better not to!") + return TRUE /obj/item/twohanded/dualsaber/green blade_color = "green" @@ -265,7 +273,7 @@ /obj/item/twohanded/dualsaber/IsReflect() if(wielded) - return 1 + return TRUE /obj/item/twohanded/dualsaber/wield(mob/living/carbon/M) //Specific wield () hulk checks due to reflection chance for balance issues and switches hitsounds. if(HULK in M.mutations) @@ -274,16 +282,17 @@ ..() hitsound = 'sound/weapons/blade1.ogg' -/obj/item/twohanded/dualsaber/attackby(obj/item/W as obj, mob/user as mob, params) - ..() - if(istype(W, /obj/item/multitool)) - if(hacked == 0) - hacked = 1 +/obj/item/twohanded/dualsaber/attackby(obj/item/W, mob/user, params) + if(ismultitool(W)) + if(!hacked) + hacked = TRUE to_chat(user, "2XRNBW_ENGAGE") blade_color = "rainbow" update_icon() else to_chat(user, "It's starting to look like a triple rainbow - no, nevermind.") + else + return ..() //spears /obj/item/twohanded/spear @@ -298,13 +307,12 @@ throwforce = 20 throw_speed = 4 armour_penetration = 10 - materials = list(MAT_METAL=1150, MAT_GLASS=2075) + materials = list(MAT_METAL = 1150, MAT_GLASS = 2075) hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "poked", "jabbed", "torn", "gored") - sharp = 1 - no_spin_thrown = 1 + sharp = TRUE + no_spin_thrown = TRUE var/obj/item/grenade/explosive = null - var/war_cry = "AAAAARGH!!!" /obj/item/twohanded/spear/update_icon() if(explosive) @@ -318,7 +326,6 @@ if(isturf(AM)) //So you can actually melee with it return if(explosive && wielded) - user.say("[war_cry]") explosive.forceMove(AM) explosive.prime() qdel(src) @@ -329,30 +336,6 @@ explosive.prime() qdel(src) -/obj/item/twohanded/spear/AltClick(mob/user) - ..() - if(!explosive) - return - if(ismob(loc)) - var/mob/M = loc - var/input = stripped_input(M, "What do you want your war cry to be? You will shout it when you hit someone in melee.", ,"", 50) - if(input) - war_cry = input - -/obj/item/twohanded/spear/CheckParts(list/parts_list) - ..() - if(explosive) - explosive.forceMove(get_turf(loc)) - explosive = null - update_icon() - var/obj/item/grenade/G = locate() in contents - if(G) - explosive = G - name = "explosive lance" - embed_chance = 0 - desc = "A makeshift spear with [G] attached to it. Alt+click on the spear to set your war cry!" - update_icon() - //GREY TIDE /obj/item/twohanded/spear/grey_tide icon_state = "spearglass0" @@ -381,48 +364,47 @@ M.GiveTarget(L) //Putting heads on spears -/obj/item/organ/external/head/attackby(var/obj/item/W, var/mob/living/user, params) - if(istype(W, /obj/item/twohanded/spear)) - to_chat(user, "You stick the head onto the spear and stand it upright on the ground.") - var/obj/structure/headspear/HS = new /obj/structure/headspear(user.loc) - var/matrix/M = matrix() - src.transform = M - user.drop_item() - src.loc = HS - var/image/IM = image(src.icon,src.icon_state) - IM.overlays = src.overlays.Copy() - HS.overlays += IM - qdel(W) - return - return ..() - -/obj/item/twohanded/spear/attackby(var/obj/item/I, var/mob/living/user) +/obj/item/twohanded/spear/attackby(obj/item/I, mob/living/user) if(istype(I, /obj/item/organ/external/head)) - to_chat(user, "You stick the head onto the spear and stand it upright on the ground.") - var/obj/structure/headspear/HS = new /obj/structure/headspear(user.loc) - var/matrix/M = matrix() - I.transform = M - usr.drop_item() - I.loc = HS - var/image/IM = image(I.icon,I.icon_state) - IM.overlays = I.overlays.Copy() - HS.overlays += IM - qdel(src) - return - return ..() + if(user.unEquip(src) && user.drop_item()) + to_chat(user, "You stick [I] onto the spear and stand it upright on the ground.") + var/obj/structure/headspear/HS = new /obj/structure/headspear(get_turf(src)) + var/matrix/M = matrix() + I.transform = M + var/image/IM = image(I.icon, I.icon_state) + IM.overlays = I.overlays.Copy() + HS.overlays += IM + I.forceMove(HS) + HS.mounted_head = I + forceMove(HS) + HS.contained_spear = src + else + return ..() /obj/structure/headspear name = "head on a spear" desc = "How barbaric." icon_state = "headspear" - density = 0 - anchored = 1 + density = FALSE + anchored = TRUE + var/obj/item/organ/external/head/mounted_head = null + var/obj/item/twohanded/spear/contained_spear = null + +/obj/structure/headspear/Destroy() + QDEL_NULL(mounted_head) + QDEL_NULL(contained_spear) + return ..() /obj/structure/headspear/attack_hand(mob/living/user) - user.visible_message("[user] kicks over \the [src]!", "You kick down \the [src]!") - new /obj/item/twohanded/spear(user.loc) - for(var/obj/item/organ/external/head/H in src) - H.loc = user.loc + user.visible_message("[user] kicks over [src]!", "You kick down [src]!") + playsound(src, 'sound/weapons/Genhit.ogg', 50, 1) + var/turf/T = get_turf(src) + if(contained_spear) + contained_spear.forceMove(T) + contained_spear = null + if(mounted_head) + mounted_head.forceMove(T) + mounted_head = null qdel(src) /obj/item/twohanded/spear/kidan @@ -437,18 +419,18 @@ icon_state = "gchainsaw_off" flags = CONDUCT force = 13 - var/force_on = 21 + var/force_on = 24 w_class = WEIGHT_CLASS_HUGE throwforce = 13 throw_speed = 2 throw_range = 4 - materials = list(MAT_METAL=13000) + materials = list(MAT_METAL = 13000) origin_tech = "materials=3;engineering=4;combat=2" attack_verb = list("sawed", "cut", "hacked", "carved", "cleaved", "butchered", "felled", "timbered") hitsound = "swing_hit" - sharp = 1 + sharp = TRUE actions_types = list(/datum/action/item_action/startchainsaw) - var/on = 0 + var/on = FALSE /obj/item/twohanded/required/chainsaw/attack_self(mob/user) on = !on @@ -481,8 +463,8 @@ if(attack_type == PROJECTILE_ATTACK) owner.visible_message("Ranged attacks just make [owner] angrier!") playsound(src, pick('sound/weapons/bulletflyby.ogg','sound/weapons/bulletflyby2.ogg','sound/weapons/bulletflyby3.ogg'), 75, 1) - return 1 - return 0 + return TRUE + return FALSE ///CHAINSAW/// @@ -502,7 +484,7 @@ armour_penetration = 35 origin_tech = "materials=6;syndicate=4" attack_verb = list("sawed", "cut", "hacked", "carved", "cleaved", "butchered", "felled", "timbered") - sharp = 1 + sharp = TRUE /obj/item/twohanded/chainsaw/update_icon() if(wielded) @@ -510,7 +492,7 @@ else icon_state = "chainsaw0" -/obj/item/twohanded/chainsaw/attack(mob/target as mob, mob/living/user as mob) +/obj/item/twohanded/chainsaw/attack(mob/target, mob/living/user) if(wielded) playsound(loc, 'sound/weapons/chainsaw.ogg', 100, 1, -1) //incredibly loud; you ain't goin' for stealth with this thing. Credit to Lonemonk of Freesound for this sound. if(isrobot(target)) @@ -562,43 +544,41 @@ /obj/item/twohanded/singularityhammer/process() if(charged < 5) charged++ - return /obj/item/twohanded/singularityhammer/update_icon() //Currently only here to fuck with the on-mob icons. icon_state = "mjollnir[wielded]" - return -/obj/item/twohanded/singularityhammer/proc/vortex(var/turf/pull as turf, mob/wielder as mob) - for(var/atom/X in orange(5,pull)) - if(istype(X, /atom/movable)) - if(X == wielder) continue - if((X) &&(!X:anchored) && (!istype(X,/mob/living/carbon/human))) - step_towards(X,pull) - step_towards(X,pull) - step_towards(X,pull) - else if(istype(X,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = X - if(istype(H.shoes,/obj/item/clothing/shoes/magboots)) - var/obj/item/clothing/shoes/magboots/M = H.shoes - if(M.magpulse) - continue - H.apply_effect(1, WEAKEN, 0) - step_towards(H,pull) - step_towards(H,pull) - step_towards(H,pull) - return +/obj/item/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder) + for(var/atom/movable/X in orange(5, pull)) + if(X == wielder) + continue + if((X) && (!X.anchored) && (!ishuman(X))) + step_towards(X, pull) + step_towards(X, pull) + step_towards(X, pull) + else if(ishuman(X)) + var/mob/living/carbon/human/H = X + if(istype(H.shoes, /obj/item/clothing/shoes/magboots)) + var/obj/item/clothing/shoes/magboots/M = H.shoes + if(M.magpulse) + continue + H.apply_effect(1, WEAKEN, 0) + step_towards(H, pull) + step_towards(H, pull) + step_towards(H, pull) -/obj/item/twohanded/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity) - if(!proximity) return +/obj/item/twohanded/singularityhammer/afterattack(atom/A, mob/user, proximity) + if(!proximity) + return if(wielded) if(charged == 5) charged = 0 - if(istype(A, /mob/living/)) + if(isliving(A)) var/mob/living/Z = A - Z.take_organ_damage(20,0) + Z.take_organ_damage(20, 0) playsound(user, 'sound/weapons/marauder.ogg', 50, 1) var/turf/target = get_turf(A) - vortex(target,user) + vortex(target, user) /obj/item/twohanded/mjollnir name = "Mjolnir" @@ -615,37 +595,35 @@ //var/charged = 5 origin_tech = "combat=4;powerstorage=7" -/obj/item/twohanded/mjollnir/proc/shock(mob/living/target as mob) +/obj/item/twohanded/mjollnir/proc/shock(mob/living/target) var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() s.set_up(5, 1, target.loc) s.start() - target.visible_message("[target.name] was shocked by the [src.name]!", \ + target.visible_message("[target.name] was shocked by the [name]!", \ "You feel a powerful shock course through your body sending you flying!", \ "You hear a heavy electrical crack!") var/atom/throw_target = get_edge_target_turf(target, get_dir(src, get_step_away(target, src))) target.throw_at(throw_target, 200, 4) - return -/obj/item/twohanded/mjollnir/attack(mob/M as mob, mob/user as mob) +/obj/item/twohanded/mjollnir/attack(mob/M, mob/user) ..() if(wielded) //if(charged == 5) //charged = 0 - playsound(src.loc, "sparks", 50, 1) - if(istype(M, /mob/living)) + playsound(loc, "sparks", 50, 1) + if(isliving(M)) M.Stun(3) shock(M) /obj/item/twohanded/mjollnir/throw_impact(atom/target) . = ..() - if(istype(target, /mob/living)) + if(isliving(target)) var/mob/living/L = target L.Stun(3) shock(L) /obj/item/twohanded/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons. icon_state = "mjollnir[wielded]" - return /obj/item/twohanded/knighthammer name = "singuloth knight's hammer" @@ -673,27 +651,26 @@ /obj/item/twohanded/knighthammer/process() if(charged < 5) charged++ - return /obj/item/twohanded/knighthammer/update_icon() //Currently only here to fuck with the on-mob icons. icon_state = "knighthammer[wielded]" - return -/obj/item/twohanded/knighthammer/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity) - if(!proximity) return +/obj/item/twohanded/knighthammer/afterattack(atom/A, mob/user, proximity) + if(!proximity) + return if(charged == 5) charged = 0 - if(istype(A, /mob/living/)) + if(isliving(A)) var/mob/living/Z = A if(Z.health >= 1) - Z.visible_message("[Z.name] was sent flying by a blow from the [src.name]!", \ + Z.visible_message("[Z.name] was sent flying by a blow from the [name]!", \ "You feel a powerful blow connect with your body and send you flying!", \ "You hear something heavy impact flesh!.") var/atom/throw_target = get_edge_target_turf(Z, get_dir(src, get_step_away(Z, src))) Z.throw_at(throw_target, 200, 4) playsound(user, 'sound/weapons/marauder.ogg', 50, 1) else if(wielded && Z.health < 1) - Z.visible_message("[Z.name] was blown to peices by the power of [src.name]!", \ + Z.visible_message("[Z.name] was blown to pieces by the power of [name]!", \ "You feel a powerful blow rip you apart!", \ "You hear a heavy impact and the sound of ripping flesh!.") Z.gib() @@ -704,7 +681,7 @@ Z.ex_act(2) charged = 3 playsound(user, 'sound/weapons/marauder.ogg', 50, 1) - else if(istype(A, /obj/structure) || istype(A, /obj/mecha/)) + else if(istype(A, /obj/structure) || istype(A, /obj/mecha)) var/obj/Z = A Z.ex_act(2) charged = 3 @@ -717,7 +694,7 @@ icon_state = "fireaxe0" force = 5 throwforce = 15 - sharp = 1 + sharp = TRUE w_class = WEIGHT_CLASS_HUGE armour_penetration = 20 slot_flags = SLOT_BACK @@ -737,12 +714,12 @@ if(!proximity) return if(wielded) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/Z = A if(charged) charged-- - Z.take_organ_damage(0,30) - user.visible_message("[user] slams the charged axe into [Z.name] with all their might!") + Z.take_organ_damage(0, 30) + user.visible_message("[user] slams the charged axe into [Z.name] with all [user.p_their()] might!") playsound(loc, 'sound/magic/lightningbolt.ogg', 5, 1) var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread sparks.set_up(1, 1, src) @@ -751,7 +728,7 @@ if(A && wielded && (istype(A, /obj/structure/window) || istype(A, /obj/structure/grille))) if(istype(A, /obj/structure/window)) var/obj/structure/window/W = A - W.destroy() + W.deconstruct(FALSE) if(prob(4)) charged++ user.visible_message("The axe starts to emit an electric buzz!") @@ -759,4 +736,4 @@ qdel(A) if(prob(4)) charged++ - user.visible_message("The axe starts to emit an electric buzz!") + user.visible_message("The axe starts to emit an electric buzz!") \ No newline at end of file diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index e3b50123638..1a5fe872251 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -12,7 +12,7 @@ /obj/item/banhammer/suicide_act(mob/user) - to_chat(viewers(user), "[user] is hitting \himself with the [src.name]! It looks like \he's trying to ban \himself from life.") + to_chat(viewers(user), "[user] is hitting [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to ban [user.p_them()]self from life.") return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS) /obj/item/sord @@ -28,7 +28,7 @@ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") /obj/item/sord/suicide_act(mob/user) - user.visible_message("[user] is trying to impale themself with [src]! It might be a suicide attempt if it weren't so shitty.", \ + user.visible_message("[user] is trying to impale [user.p_them()]self with [src]! It might be a suicide attempt if it weren't so shitty.", \ "You try to impale yourself with [src], but it's USELESS...") return SHAME @@ -48,7 +48,7 @@ block_chance = 50 /obj/item/claymore/suicide_act(mob/user) - user.visible_message("[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is falling on the [name]! It looks like [user.p_theyre()] trying to commit suicide.") return(BRUTELOSS) /obj/item/claymore/ceremonial @@ -75,7 +75,7 @@ slot_flags = null /obj/item/katana/suicide_act(mob/user) - user.visible_message("[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.") + user.visible_message("[user] is slitting [user.p_their()] stomach open with [src]! It looks like [user.p_theyre()] trying to commit seppuku.") return(BRUTELOSS) /obj/item/harpoon @@ -179,7 +179,7 @@ obj/item/wirerod/attackby(obj/item/I, mob/user, params) return to_chat(user, "You begin gathering strength...") playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, 1) - if(do_after(user, 90, target = src)) + if(do_after(user, 90, target = user)) to_chat(user, "You gather power! Time for a home run!") homerun_ready = 1 ..() diff --git a/code/game/objects/items/weapons/whetstone.dm b/code/game/objects/items/weapons/whetstone.dm index c6a27267d10..6cbc2e0e972 100644 --- a/code/game/objects/items/weapons/whetstone.dm +++ b/code/game/objects/items/weapons/whetstone.dm @@ -54,7 +54,7 @@ var/mob/living/carbon/human/H = user var/datum/unarmed_attack/attack = H.species.unarmed if(istype(attack, /datum/unarmed_attack/claws)) - H.visible_message("[H] sharpens \his claws on the [src]!", "You sharpen your claws on the [src].") + H.visible_message("[H] sharpens [H.p_their()] claws on the [src]!", "You sharpen your claws on the [src].") playsound(get_turf(H), usesound, 50, 1) /obj/item/whetstone/super diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index fcd233318d5..d31338dfe06 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -71,6 +71,22 @@ visible_message("[src] is hit by \a [P]!") take_damage(P.damage, P.damage_type, P.flag, 0, turn(P.dir, 180), P.armour_penetration) +/obj/proc/hulk_damage() + return 150 //the damage hulks do on punches to this object, is affected by melee armor + +/obj/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) + if(user.a_intent == INTENT_HARM) + ..(user, TRUE) + visible_message("[user] smashes [src]!") + if(density) + playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) + user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) + else + playsound(src, 'sound/effects/bang.ogg', 50, 1) + take_damage(hulk_damage(), BRUTE, "melee", 0, get_dir(src, user)) + return TRUE + return FALSE + /obj/blob_act(obj/structure/blob/B) if(isturf(loc)) var/turf/T = loc diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index 76deeac93e8..1738344ae60 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -13,6 +13,27 @@ /obj/structure/alien icon = 'icons/mob/alien.dmi' + max_integrity = 100 + +/obj/structure/alien/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + if(damage_flag == "melee") + switch(damage_type) + if(BRUTE) + damage_amount *= 0.25 + if(BURN) + damage_amount *= 2 + . = ..() + +/obj/structure/alien/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + if(damage_amount) + playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) + else + playsound(src, 'sound/weapons/tap.ogg', 50, 1) + if(BURN) + if(damage_amount) + playsound(loc, 'sound/items/welder.ogg', 100, 1) /* * Resin @@ -22,13 +43,13 @@ desc = "Looks like some kind of thick resin." icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi' icon_state = "resin" - density = 1 - opacity = 1 - anchored = 1 + density = TRUE + opacity = TRUE + anchored = TRUE canSmoothWith = list(/obj/structure/alien/resin) - var/health = 200 - var/resintype = null + max_integrity = 200 smooth = SMOOTH_TRUE + var/resintype = null /obj/structure/alien/resin/Initialize() air_update_turf(1) @@ -60,7 +81,7 @@ /obj/structure/alien/resin/wall/shadowling //For chrysalis name = "chrysalis wall" desc = "Some sort of purple substance in an egglike shape. It pulses and throbs from within and seems impenetrable." - health = INFINITY + max_integrity = INFINITY /obj/structure/alien/resin/membrane name = "resin membrane" @@ -68,80 +89,11 @@ icon = 'icons/obj/smooth_structures/alien/resin_membrane.dmi' icon_state = "membrane0" opacity = 0 - health = 120 + max_integrity = 160 resintype = "membrane" canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane) -/obj/structure/alien/resin/proc/healthcheck() - if(health <=0) - qdel(src) - - -/obj/structure/alien/resin/bullet_act(obj/item/projectile/Proj) - if(Proj.damage_type == BRUTE || Proj.damage_type == BURN) - health -= Proj.damage - ..() - healthcheck() - - -/obj/structure/alien/resin/ex_act(severity) - switch(severity) - if(1) - health -= 150 - if(2) - health -= 100 - if(3) - health -= 50 - healthcheck() - - -/obj/structure/alien/resin/blob_act() - health -= 50 - healthcheck() - - -/obj/structure/alien/resin/hitby(atom/movable/AM) - ..() - var/tforce = 0 - if(ismob(AM)) - tforce = 10 - else if(isobj(AM)) - var/obj/O = AM - tforce = O.throwforce - playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) - health -= tforce - healthcheck() - -/obj/structure/alien/resin/attack_hand(mob/living/user) - if(HULK in user.mutations) - user.do_attack_animation(src) - user.visible_message("[user] destroys [src]!") - health = 0 - healthcheck() - - -/obj/structure/alien/resin/attack_alien(mob/living/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - if(islarva(user)) - return - user.visible_message("[user] claws at the resin!") - playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) - health -= 50 - if(health <= 0) - user.visible_message("[user] slices the [name] apart!") - healthcheck() - - -/obj/structure/alien/resin/attackby(obj/item/I, mob/living/user, params) - user.changeNext_move(CLICK_CD_MELEE) - health -= I.force - playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) - healthcheck() - ..() - - -/obj/structure/alien/resin/CanPass(atom/movable/mover, turf/target, height=0) +/obj/structure/alien/resin/CanPass(atom/movable/mover, turf/target) if(istype(mover) && mover.checkpass(PASSGLASS)) return !opacity return !density @@ -157,11 +109,11 @@ gender = PLURAL name = "resin floor" desc = "A thick resin surface covers the floor." + anchored = TRUE + density = FALSE + layer = TURF_LAYER icon_state = "weeds" - anchored = 1 - density = 0 - layer = 2 - var/health = 15 + max_integrity = 15 var/obj/structure/alien/weeds/node/linked_node = null var/static/list/weedImageCache @@ -204,39 +156,9 @@ new /obj/structure/alien/weeds(T, linked_node) - -/obj/structure/alien/weeds/ex_act(severity) - qdel(src) - - -/obj/structure/alien/weeds/attackby(obj/item/I, mob/user, params) - user.changeNext_move(CLICK_CD_MELEE) - if(I.attack_verb.len) - visible_message("[user] has [pick(I.attack_verb)] [src] with [I]!") - else - visible_message("[user] has attacked [src] with [I]!") - - var/damage = I.force / 4 - if(istype(I, /obj/item/weldingtool)) - var/obj/item/weldingtool/WT = I - if(WT.remove_fuel(0, user)) - damage = 15 - playsound(loc, WT.usesound, 100, 1) - - health -= damage - healthcheck() - - -/obj/structure/alien/weeds/proc/healthcheck() - if(health <= 0) - qdel(src) - - /obj/structure/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > 300) - health -= 5 - healthcheck() - + take_damage(5, BURN, 0, 0) /obj/structure/alien/weeds/proc/updateWeedOverlays() @@ -303,9 +225,10 @@ name = "egg" desc = "A large mottled egg." icon_state = "egg_growing" - density = 0 - anchored = 1 - var/health = 100 + density = FALSE + anchored = TRUE + max_integrity = 100 + integrity_failure = 5 var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive layer = MOB_LAYER @@ -315,6 +238,8 @@ ..() spawn(rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME)) Grow() + if(status == BURST) + obj_integrity = integrity_failure /obj/structure/alien/egg/attack_alien(mob/living/carbon/alien/user) return attack_hand(user) @@ -346,7 +271,7 @@ icon_state = "egg" status = GROWN -/obj/structure/alien/egg/proc/Burst(kill = 1) //drops and kills the hugger if any is remaining +/obj/structure/alien/egg/proc/Burst(kill = TRUE) //drops and kills the hugger if any is remaining if(status == GROWN || status == GROWING) icon_state = "egg_hatched" flick("egg_opening", src) @@ -364,45 +289,13 @@ child.Attach(M) break -/obj/structure/alien/egg/bullet_act(obj/item/projectile/Proj) - if((Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - health -= Proj.damage - ..() - healthcheck() - - -/obj/structure/alien/egg/attackby(obj/item/I, mob/user, params) - if(I.attack_verb.len) - visible_message("[user] has [pick(I.attack_verb)] [src] with [I]!") - else - visible_message("[user] has attacked [src] with [I]!") - - var/damage = I.force / 4 - if(istype(I, /obj/item/weldingtool)) - var/obj/item/weldingtool/WT = I - - if(WT.remove_fuel(0, user)) - damage = 15 - playsound(loc, WT.usesound, 100, 1) - - health -= damage - user.changeNext_move(CLICK_CD_MELEE) - healthcheck() - - -/obj/structure/alien/egg/proc/healthcheck() - if(health <= 0) - if(status != BURST && status != BURSTING) - Burst() - else if(status == BURST && prob(50)) - qdel(src) //Remove the egg after it has been hit after bursting. - +/obj/structure/alien/egg/obj_break(damage_flag) + if(status != BURST) + Burst(kill = TRUE) /obj/structure/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > 500) - health -= 5 - healthcheck() - + take_damage(5, BURN, 0, 0) /obj/structure/alien/egg/HasProximity(atom/movable/AM) if(status == GROWN) diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm index 37ab3977755..19e08c15bde 100644 --- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm +++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm @@ -10,6 +10,7 @@ burntime = 20 sound = 'sound/effects/rustle2.ogg' material_drop = /obj/item/stack/sheet/cardboard + var/amt = 4 cutting_sound = 'sound/items/poster_ripped.ogg' var/move_delay = 0 var/egged = 0 @@ -60,7 +61,7 @@ return if(istype(W, /obj/item/wirecutters)) var/obj/item/wirecutters/WC = W - new /obj/item/stack/sheet/cardboard(src.loc) + new /obj/item/stack/sheet/cardboard(src.loc, amt) for(var/mob/M in viewers(src)) M.show_message("\The [src] has been cut apart by [user] with \the [WC].", 3, "You hear cutting.", 2) qdel(src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm index e5c7c2b27fb..551a8b30d9d 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm @@ -262,6 +262,7 @@ new /obj/item/sensor_device(src) new /obj/item/key/ambulance(src) new /obj/item/pinpointer/crew(src) + new /obj/item/clothing/shoes/magboots(src) /obj/structure/closet/secure_closet/reagents name = "chemical storage closet" diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 0156cac96cc..3b174480ce8 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -321,7 +321,7 @@ var/global/list/captain_display_cases = list() to_chat(src, "[bicon(src)] \The [src] is empty!") else user.changeNext_move(CLICK_CD_MELEE) - user.visible_message("[user.name] gently runs \his hands over [src] in appreciation of its contents.", \ + user.visible_message("[user.name] gently runs [user.p_their()] hands over [src] in appreciation of its contents.", \ "You gently run your hands over [src] in appreciation of its contents.", \ "You hear someone streaking glass with their greasy hands.") diff --git a/code/game/objects/structures/fullwindow.dm b/code/game/objects/structures/fullwindow.dm deleted file mode 100644 index eec957c2d52..00000000000 --- a/code/game/objects/structures/fullwindow.dm +++ /dev/null @@ -1,116 +0,0 @@ -/obj/structure/window/full - sheets = 2 - dir=SOUTHWEST - level = 3 - -/obj/structure/window/full/CheckExit(atom/movable/O as mob|obj, target as turf) - return 1 - -/obj/structure/window/full/CanPass(atom/movable/mover, turf/target, height=0) - if(istype(mover) && mover.checkpass(PASSGLASS)) - return 1 - return 0 - -/obj/structure/window/full/is_fulltile() - return 1 - -//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm) -/obj/structure/window/full/update_icon() - //A little cludge here, since I don't know how it will work with slim windows. Most likely VERY wrong. - //this way it will only update full-tile ones - //This spawn is here so windows get properly updated when one gets deleted. - spawn(2) - if(!src) return - if(!is_fulltile()) - return - var/junction = 0 //will be used to determine from which side the window is connected to other windows - if(anchored) - for(var/obj/structure/window/full/W in orange(src,1)) - if(W.anchored && W.density) //Only counts anchored, not-destroyed full-tile windows. - if(abs(x-W.x)-abs(y-W.y) ) //doesn't count windows, placed diagonally to src - junction |= get_dir(src,W) - icon_state = "[basestate][junction]" - return - -/obj/structure/window/full/basic - desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it." - icon_state = "window" - basestate = "window" - -/obj/structure/window/full/plasmabasic - name = "plasma window" - desc = "A plasma-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through." - basestate = "plasmawindow" - icon_state = "plasmawindow" - shardtype = /obj/item/shard/plasma - glasstype = /obj/item/stack/sheet/plasmaglass - health = 240 - -/obj/structure/window/full/plasmabasic/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(exposed_temperature > T0C + 32000) - hit(round(exposed_volume / 1000), 0) - ..() - -/obj/structure/window/full/plasmareinforced - name = "reinforced plasma window" - desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof." - basestate = "plasmarwindow" - icon_state = "plasmarwindow" - shardtype = /obj/item/shard/plasma - glasstype = /obj/item/stack/sheet/plasmaglass - reinf = 1 - health = 320 - -/obj/structure/window/full/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) - return - -/obj/structure/window/full/reinforced - name = "reinforced window" - desc = "It looks rather strong. Might take a few good hits to shatter it." - icon_state = "rwindow" - basestate = "rwindow" - health = 80 - reinf = 1 - -/obj/structure/window/full/reinforced/tinted - name = "tinted window" - desc = "It looks rather strong and opaque. Might take a few good hits to shatter it." - icon_state = "twindow" - basestate = "twindow" - opacity = 1 - -/obj/structure/window/full/reinforced/tinted/frosted - name = "frosted window" - desc = "It looks rather strong and frosted over. Looks like it might take a few less hits then a normal reinforced window." - icon_state = "fwindow" - basestate = "fwindow" - health = 60 - -/obj/structure/window/full/shuttle - name = "shuttle window" - desc = "It looks rather strong. Might take a few good hits to shatter it." - icon = 'icons/obj/podwindows.dmi' - icon_state = "window" - basestate = "window" - health = 160 - reinf = 1 - explosion_block = 3 - armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100) - -/obj/structure/window/full/shuttle/New() - ..() - color = null - -/obj/structure/window/full/shuttle/update_icon() //icon_state has to be set manually - return - -/obj/structure/window/full/shuttle/shuttleRotate(rotation) - ..() - var/matrix/M = transform - M.Turn(rotation) - transform = M - -/obj/structure/window/full/shuttle/dark - icon = 'icons/turf/shuttle.dmi' - icon_state = "window5" - basestate = "window5" \ No newline at end of file diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 0c0c3c1aa0c..b8ef71bd9c8 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -69,18 +69,23 @@ if(ismob(user)) shock(user, 70) +/obj/structure/grille/hulk_damage() + return 60 + +/obj/structure/grille/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) + if(user.a_intent == INTENT_HARM) + if(!shock(user, 70)) + ..(user, TRUE) + return TRUE + /obj/structure/grille/attack_hand(mob/living/user) + . = ..() + if(.) + return user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src, ATTACK_EFFECT_KICK) - user.visible_message("[user] kicks [src].", \ - "You kick [src].", \ - "You hear twisting metal.") - - if(shock(user, 70)) - return - if(HULK in user.mutations) - take_damage(60, BRUTE, "melee", 1) - else + user.visible_message("[user] hits [src].") + if(!shock(user, 70)) take_damage(rand(5,10), BRUTE, "melee", 1) /obj/structure/grille/attack_alien(mob/living/user) @@ -137,7 +142,7 @@ return //window placing begin - else if(istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) || istype(W,/obj/item/stack/sheet/plasmaglass) || istype(W,/obj/item/stack/sheet/plasmarglass)) + else if(is_glass_sheet(W)) build_window(W, user) return //window placing end @@ -190,10 +195,10 @@ S.use(1) W.setDir(dir_to_set) W.ini_dir = dir_to_set - W.anchored = 0 - W.state = 0 + W.anchored = FALSE + W.state = WINDOW_OUT_OF_FRAME to_chat(user, "You place the [W] on [src].") - W.update_icon() + W.update_nearby_icons() return /obj/structure/grille/attacked_by(obj/item/I, mob/living/user) diff --git a/code/game/objects/structures/guillotine.dm b/code/game/objects/structures/guillotine.dm index 0de1a09a74c..3c4875978a2 100644 --- a/code/game/objects/structures/guillotine.dm +++ b/code/game/objects/structures/guillotine.dm @@ -203,7 +203,7 @@ return FALSE if(!ishuman(M)) - to_chat(usr, "It doesn't look like they can fit into this properly!") + to_chat(usr, "It doesn't look like [M.p_they()] can fit into this properly!") return FALSE // Can't decapitate non-humans if(blade_status != GUILLOTINE_BLADE_RAISED) diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index 199691aa4db..6168d637c56 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -48,7 +48,10 @@ /obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction if(istype(tool, /obj/item/screwdriver) && isturf(user.loc)) var/direction = input("In which direction?", "Select direction.") in list("North", "East", "South", "West", "Cancel") - if(direction == "Cancel") return + if(direction == "Cancel") + return + if(QDELETED(src)) + return var/obj/structure/sign/S = new(user.loc) switch(direction) if("North") @@ -59,7 +62,8 @@ S.pixel_y = -32 if("West") S.pixel_x = -32 - else return + else + return S.name = name S.desc = desc S.icon_state = sign_state diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 32ceefbd834..4a1ecdb08d7 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -186,7 +186,7 @@ buildstackamount = 1 /obj/structure/stool/bed/chair/sofa - name = "old ratty sofa" + name = "sofa" icon_state = "sofamiddle" anchored = 1 buildstackamount = 1 diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 4fedc99f0c5..91f348d0106 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -83,14 +83,7 @@ qdel(src) /obj/structure/table/attack_hand(mob/living/user) - if(HULK in user.mutations) - user.do_attack_animation(src) - visible_message("[user] smashes [src] apart!") - playsound(loc, 'sound/effects/bang.ogg', 50, 1) - user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) - deconstruct(FALSE) - else - ..() + ..() if(climber) climber.Weaken(2) climber.visible_message("[climber.name] has been knocked off the table", "You've been knocked off the table", "You see [climber.name] get knocked off the table") diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 3ea23108662..179615dada3 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -548,7 +548,7 @@ var/washing_face = 0 if(selected_area in list("head", "mouth", "eyes")) washing_face = 1 - user.visible_message("[user] starts washing their [washing_face ? "face" : "hands"]...", \ + user.visible_message("[user] starts washing [user.p_their()] [washing_face ? "face" : "hands"]...", \ "You start washing your [washing_face ? "face" : "hands"]...") busy = 1 @@ -558,7 +558,7 @@ busy = 0 - user.visible_message("[user] washes their [washing_face ? "face" : "hands"] using [src].", \ + user.visible_message("[user] washes [user.p_their()] [washing_face ? "face" : "hands"] using [src].", \ "You wash your [washing_face ? "face" : "hands"] using [src].") if(washing_face) if(ishuman(user)) diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index dcf89008416..72469e2ebfb 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -27,6 +27,10 @@ var/secure = FALSE //Whether or not this creates a secure windoor var/state = "01" //How far the door assembly has progressed +/obj/structure/windoor_assembly/examine(mob/user) + ..() + to_chat(user, "Alt-click to rotate it clockwise.") + obj/structure/windoor_assembly/New(loc, set_dir) ..() if(set_dir) @@ -42,7 +46,7 @@ obj/structure/windoor_assembly/Destroy() /obj/structure/windoor_assembly/Move() var/turf/T = loc - . = ..() + ..() setDir(ini_dir) move_update_air(T) @@ -54,8 +58,17 @@ obj/structure/windoor_assembly/Destroy() return 1 if(get_dir(loc, target) == dir) //Make sure looking at appropriate border return !density - else - return 1 + if(istype(mover, /obj/structure/window)) + var/obj/structure/window/W = mover + if(!valid_window_location(loc, W.ini_dir)) + return FALSE + else if(istype(mover, /obj/structure/windoor_assembly)) + var/obj/structure/windoor_assembly/W = mover + if(!valid_window_location(loc, W.ini_dir)) + return FALSE + else if(istype(mover, /obj/machinery/door/window) && !valid_window_location(loc, mover.dir)) + return FALSE + return 1 /obj/structure/windoor_assembly/CanAtmosPass(turf/T) if(get_dir(loc, T) == dir) @@ -317,9 +330,16 @@ obj/structure/windoor_assembly/Destroy() if(usr.stat || !usr.canmove || usr.restrained()) return if(anchored) - to_chat(usr, "It is fastened to the floor; therefore, you can't rotate it!") - return 0 - setDir(turn(dir, 270)) + to_chat(usr, "[src] cannot be rotated while it is fastened to the floor!") + return FALSE + var/target_dir = turn(dir, 270) + + if(!valid_window_location(loc, target_dir)) + to_chat(usr, "[src] cannot be rotated in that direction!") + return FALSE + + setDir(target_dir) + ini_dir = dir update_icon() return TRUE diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index aebd111ad26..8a30f18f7bd 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -2,13 +2,14 @@ var/global/wcBar = pick(list("#0d8395", "#58b5c3", "#58c366", "#90d79a", "#fffff var/global/wcBrig = pick(list("#aa0808", "#7f0606", "#ff0000")) var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8fcf44", "#ffffff")) -/obj/proc/color_windows(var/obj/W as obj) +/obj/proc/color_windows(obj/W) var/list/wcBarAreas = list(/area/crew_quarters/bar) var/list/wcBrigAreas = list(/area/security,/area/prison,/area/shuttle/gamma) var/newcolor var/turf/T = get_turf(W) - if(!istype(T)) return + if(!istype(T)) + return var/area/A = T.loc if(is_type_in_list(A,wcBarAreas)) @@ -23,168 +24,207 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f /obj/structure/window name = "window" desc = "A window." - icon = 'icons/obj/structures.dmi' - density = 1 - layer = 3.2//Just above doors + icon_state = "window" + density = TRUE + layer = ABOVE_OBJ_LAYER //Just above doors pressure_resistance = 4*ONE_ATMOSPHERE - anchored = 1.0 + anchored = TRUE flags = ON_BORDER - var/health = 14.0 + can_be_unanchored = TRUE + max_integrity = 25 var/ini_dir = null - var/state = 2 - var/reinf = 0 - var/basestate + var/state = WINDOW_OUT_OF_FRAME + var/reinf = FALSE + var/heat_resistance = 800 + var/decon_speed = null + var/fulltile = FALSE var/shardtype = /obj/item/shard - var/glasstype = /obj/item/stack/sheet/glass - var/disassembled = 0 - var/sheets = 1 // Number of sheets needed to build this window (determines how much shit is spawned by destroy()) -// var/silicate = 0 // number of units of silicate -// var/icon/silicateIcon = null // the silicated icon + var/glass_type = /obj/item/stack/sheet/glass + var/glass_amount = 1 + var/cancolor = FALSE + var/image/crack_overlay + var/list/debris = list() + var/real_explosion_block //ignore this, just use explosion_block + var/breaksound = "shatter" + var/hitsound = 'sound/effects/Glasshit.ogg' -/obj/structure/window/bullet_act(var/obj/item/projectile/Proj) - if((Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - health -= Proj.damage - air_update_turf(1) +/obj/structure/window/examine(mob/user) ..() - if(health <= 0) - destroy() - return + if(reinf) + if(anchored && state == WINDOW_SCREWED_TO_FRAME) + to_chat(user, "The window is screwed to the frame.") + else if(anchored && state == WINDOW_IN_FRAME) + to_chat(user, "The window is unscrewed but pried into the frame.") + else if(anchored && state == WINDOW_OUT_OF_FRAME) + to_chat(user, "The window is out of the frame, but could be pried in. It is screwed to the floor.") + else if(!anchored) + to_chat(user, "The window is unscrewed from the floor, and could be deconstructed by wrenching.") + else + if(anchored) + to_chat(user, "The window is screwed to the floor.") + else + to_chat(user, "The window is unscrewed from the floor, and could be deconstructed by wrenching.") + if(!anchored && !fulltile) + to_chat(user, "Alt-click to rotate it clockwise.") -// This should result in the same materials used to make the window. -/obj/structure/window/proc/destroy() - for(var/i=0;i= STAGE_FIVE) - destroy() + deconstruct(FALSE) -/obj/structure/window/CheckExit(var/atom/movable/O, var/turf/target) - if(istype(O) && O.checkpass(PASSGLASS)) - return 1 - if(get_dir(O.loc, target) == dir) - return !density - return 1 +/obj/structure/window/setDir(direct) + if(!fulltile) + ..() + else + ..(FULLTILE_WINDOW_DIR) /obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0) if(istype(mover) && mover.checkpass(PASSGLASS)) return 1 - if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST) + if(dir == FULLTILE_WINDOW_DIR) return 0 //full tile window, you can't move into it! if(get_dir(loc, target) == dir) return !density - else + if(istype(mover, /obj/structure/window)) + var/obj/structure/window/W = mover + if(!valid_window_location(loc, W.ini_dir)) + return FALSE + else if(istype(mover, /obj/structure/windoor_assembly)) + var/obj/structure/windoor_assembly/W = mover + if(!valid_window_location(loc, W.ini_dir)) + return FALSE + else if(istype(mover, /obj/machinery/door/window) && !valid_window_location(loc, mover.dir)) + return FALSE + return 1 + +/obj/structure/window/CheckExit(atom/movable/O, target) + if(istype(O) && O.checkpass(PASSGLASS)) return 1 + if(get_dir(O.loc, target) == dir) + return 0 + return 1 /obj/structure/window/CanAStarPass(ID, to_dir) if(!density) return 1 - if((dir == SOUTHWEST) || (dir == to_dir)) + if((dir == FULLTILE_WINDOW_DIR) || (dir == to_dir)) return 0 return 1 -/obj/structure/window/hitby(atom/movable/AM) - ..() - var/tforce = 0 - if(ismob(AM)) - tforce = 10 - else if(isobj(AM)) - var/obj/O = AM - tforce = O.throwforce - if(reinf) - tforce *= 0.25 - playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1) - health = max(0, health - tforce) - if(health <= 7 && !reinf) - anchored = 0 - update_nearby_icons() - step(src, get_dir(AM, src)) - if(health <= 0) - destroy() +/obj/structure/window/attack_tk(mob/user) + user.changeNext_move(CLICK_CD_MELEE) + user.visible_message("Something knocks on [src].") + add_fingerprint(user) + playsound(src, 'sound/effects/Glassknock.ogg', 50, 1) +/obj/structure/window/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) + if(!can_be_reached(user)) + return 1 + . = ..() -/obj/structure/window/attack_hand(mob/user as mob) - if(HULK in user.mutations) - user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!")) - user.visible_message("[user] smashes through [src]!") - destroy() - else if(user.a_intent == INTENT_HARM) +/obj/structure/window/attack_hand(mob/user) + if(!can_be_reached(user)) + return + if(user.a_intent == INTENT_HARM) user.changeNext_move(CLICK_CD_MELEE) - playsound(get_turf(src), 'sound/effects/glassknock.ogg', 80, 1) - user.visible_message("[user.name] bangs against the [src.name]!", \ - "You bang against the [src.name]!", \ + playsound(src, 'sound/effects/glassknock.ogg', 80, 1) + user.visible_message("[user] bangs against [src]!", \ + "You bang against [src]!", \ "You hear a banging sound.") + add_fingerprint(user) else user.changeNext_move(CLICK_CD_MELEE) - playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1) - user.visible_message("[user.name] knocks on the [src.name].", \ - "You knock on the [src.name].", \ + playsound(src, 'sound/effects/glassknock.ogg', 80, 1) + user.visible_message("[user] knocks on [src].", \ + "You knock on [src].", \ "You hear a knocking sound.") - return + add_fingerprint(user) - -/obj/structure/window/attack_generic(mob/living/user, damage = 0) //used by attack_alien, attack_animal, and attack_slime - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - health -= damage - if(health <= 0) - user.visible_message("[user] smashes through [src]!") - destroy() - else //for nicer text~ - user.visible_message("[user] smashes into [src]!") - playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1) - - -/obj/structure/window/attack_alien(mob/living/user as mob) - if(islarva(user)) return - attack_generic(user, 15) - -/obj/structure/window/attack_animal(mob/living/user as mob) - if(!isanimal(user)) return - var/mob/living/simple_animal/M = user - if(M.melee_damage_upper <= 0 || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN)) +/obj/structure/window/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) //used by attack_alien, attack_animal, and attack_slime + if(!can_be_reached(user)) return - attack_generic(M, M.melee_damage_upper) + ..() +/obj/structure/window/attackby(obj/item/I, mob/living/user, params) + if(!can_be_reached(user)) + return 1 //skip the afterattack -/obj/structure/window/attack_slime(mob/living/user as mob) - var/mob/living/carbon/slime/S = user - if(!S.is_adult) + add_fingerprint(user) + + if(iswelder(I) && user.a_intent == INTENT_HELP) + var/obj/item/weldingtool/WT = I + if(obj_integrity < max_integrity) + if(WT.remove_fuel(0,user)) + to_chat(user, "You begin repairing [src]...") + playsound(src, WT.usesound, 40, 1) + if(do_after(user, 40*I.toolspeed, target = src)) + obj_integrity = max_integrity + playsound(src, 'sound/items/Welder2.ogg', 50, 1) + update_nearby_icons() + to_chat(user, "You repair [src].") + else + to_chat(user, "[src] is already in good condition!") return - attack_generic(user, rand(10, 15)) - -/obj/structure/window/attackby(obj/item/I as obj, mob/living/user as mob, params) - if(!istype(I)) - return//I really wish I did not need this - if(istype(I, /obj/item/grab) && get_dist(src,user)<2) + if(istype(I, /obj/item/grab) && get_dist(src, user) < 2) var/obj/item/grab/G = I - if(istype(G.affecting,/mob/living)) + if(isliving(G.affecting)) var/mob/living/M = G.affecting var/state = G.state qdel(I) //gotta delete it here because if window breaks, it won't get deleted @@ -192,129 +232,120 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f if(1) M.visible_message("[user] slams [M] against \the [src]!") M.apply_damage(7) - hit(10) + take_damage(10) if(2) M.visible_message("[user] bashes [M] against \the [src]!") if(prob(50)) M.Weaken(1) M.apply_damage(10) - hit(25) + take_damage(25) if(3) M.visible_message("[user] crushes [M] against \the [src]!") M.Weaken(5) M.apply_damage(20) - hit(50) + take_damage(50) if(4) visible_message("[user] smashes [M] against \the [src]!") M.Weaken(5) M.apply_damage(30) - hit(75) + take_damage(75) return - if(I.flags & NOBLUDGEON) - return - - if(handle_decon(I, user, is_fulltile())) - return - - if(I.damtype == BRUTE || I.damtype == BURN) - user.changeNext_move(CLICK_CD_MELEE) - hit(I.force) - if(health <= 7) - anchored = 0 - update_nearby_icons() - step(src, get_dir(user, src)) - else - playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1) - ..() - -/obj/structure/window/proc/handle_decon(obj/item/W, mob/user, var/takes_time = FALSE) - //screwdriver - if(isscrewdriver(W)) - playsound(loc, W.usesound, 75, 1) - if(reinf) - if(state == 0) - if(takes_time) - to_chat(user, "You begin to [anchored ? "unfasten the frame from" : "fasten the frame to"] the floor.") - if(!do_after(user, 20 * W.toolspeed, target = src)) - return 1 - anchored = !anchored - to_chat(user, "You have [anchored? "fastened the frame to" : "unfastened the frame from"] the floor.") - if(state >= 1) - if(takes_time) - to_chat(user, "You begin to [(state == 1) ? "fasten the window to" : "unfasten the window from"] the frame.") - if(!do_after(user, 20 * W.toolspeed, target = src)) - return 1 - state = 3 - state - to_chat(user, "You have [(state == 1) ? "unfastened the window from" : "fastened the window to"] the frame.") - else - if(takes_time) - to_chat(user, "You begin to [anchored ? "unfasten the frame from" : "fasten the frame to"] the floor.") - if(!do_after(user, 20 * W.toolspeed, target = src)) - return 1 - anchored = !anchored - update_nearby_icons() - to_chat(user, "You have [anchored ? "fastened the window to" : "unfastened the window from"] the floor.") - return 1 - //crowbar - if(iscrowbar(W)) - if(!reinf || state > 1) - return 0 - playsound(loc, W.usesound, 75, 1) - if(takes_time) - to_chat(user, "You begin to pry the window [state ? "out of" : "in to"] the frame.") - if(!do_after(user, 20 * W.toolspeed, target = src)) - return 1 - state = 1 - state - to_chat(user, "You have pried the window [state ? "into" : "out of"] the frame.") - return 1 - //wrench - if(iswrench(W)) - if(anchored) - return 0 - playsound(loc, W.usesound, 50, 1) - if(takes_time) - to_chat(user, "You begin to disassemble [src]...") - if(!do_after(user, 20 * W.toolspeed, target = src)) - return 1 - for(var/i=0; i= S.max_amount) - continue - S.attackby(NS, user) + if(can_deconstruct) + if(isscrewdriver(I)) + playsound(src, I.usesound, 75, 1) if(reinf) - var/obj/item/stack/rods/NR = new (get_turf(src)) - for(var/obj/item/stack/rods/R in loc) - if(R == NR) - continue - if(R.amount >= R.max_amount) - continue - R.attackby(NR, user) + if(state == WINDOW_SCREWED_TO_FRAME || state == WINDOW_IN_FRAME) + to_chat(user, "You begin to [state == WINDOW_SCREWED_TO_FRAME ? "unscrew the window from":"screw the window to"] the frame...") + if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored))) + state = (state == WINDOW_IN_FRAME ? WINDOW_SCREWED_TO_FRAME : WINDOW_IN_FRAME) + to_chat(user, "You [state == WINDOW_IN_FRAME ? "unfasten the window from":"fasten the window to"] the frame.") + else if(state == WINDOW_OUT_OF_FRAME) + to_chat(user, "You begin to [anchored ? "unscrew the frame from":"screw the frame to"] the floor...") + if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored))) + anchored = !anchored + update_nearby_icons() + to_chat(user, "You [anchored ? "fasten the frame to":"unfasten the frame from"] the floor.") + else //if we're not reinforced, we don't need to check or update state + to_chat(user, "You begin to [anchored ? "unscrew the window from":"screw the window to"] the floor...") + if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_anchored, anchored))) + anchored = !anchored + air_update_turf(TRUE) + update_nearby_icons() + to_chat(user, "You [anchored ? "fasten the window to":"unfasten the window from"] the floor.") + return - to_chat(user, "You have disassembled [src].") - disassembled = 1 - density = 0 - air_update_turf(1) - update_nearby_icons() - qdel(src) - return 1 + else if(iscrowbar(I) && reinf && (state == WINDOW_OUT_OF_FRAME || state == WINDOW_IN_FRAME)) + to_chat(user, "You begin to lever the window [state == WINDOW_OUT_OF_FRAME ? "into":"out of"] the frame...") + playsound(src, I.usesound, 75, 1) + if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored))) + state = (state == WINDOW_OUT_OF_FRAME ? WINDOW_IN_FRAME : WINDOW_OUT_OF_FRAME) + to_chat(user, "You pry the window [state == WINDOW_IN_FRAME ? "into":"out of"] the frame.") + return + + else if(iswrench(I) && !anchored) + playsound(src, I.usesound, 75, 1) + to_chat(user, " You begin to disassemble [src]...") + if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored))) + var/obj/item/stack/sheet/G = new glass_type(user.loc, glass_amount) + G.add_fingerprint(user) + playsound(src, 'sound/items/Deconstruct.ogg', 50, 1) + to_chat(user, "You successfully disassemble [src].") + qdel(src) + return + return ..() + +/obj/structure/window/proc/check_state(checked_state) + if(state == checked_state) + return TRUE + +/obj/structure/window/proc/check_anchored(checked_anchored) + if(anchored == checked_anchored) + return TRUE + +/obj/structure/window/proc/check_state_and_anchored(checked_state, checked_anchored) + return check_state(checked_state) && check_anchored(checked_anchored) /obj/structure/window/mech_melee_attack(obj/mecha/M) - if(..()) - hit(M.force, 1) - -/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1) - if(reinf) damage *= 0.5 - health = max(0, health - damage) - if(sound_effect) - playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1) - if(health <= 0) - destroy() + if(!can_be_reached()) return + ..() +/obj/structure/window/proc/can_be_reached(mob/user) + if(!fulltile) + if(get_dir(user, src) & dir) + for(var/obj/O in loc) + if(!O.CanPass(user, user.loc, 1)) + return 0 + return 1 + +/obj/structure/window/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) + . = ..() + if(.) //received damage + update_nearby_icons() + +/obj/structure/window/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + if(damage_amount) + playsound(src, hitsound, 75, 1) + else + playsound(src, 'sound/weapons/tap.ogg', 50, 1) + if(BURN) + playsound(src, 'sound/items/Welder.ogg', 100, 1) + +/obj/structure/window/deconstruct(disassembled = TRUE) + if(QDELETED(src)) + return + if(!disassembled) + playsound(src, breaksound, 70, 1) + if(can_deconstruct) + for(var/i in debris) + var/obj/item/I = i + I.forceMove(loc) + transfer_fingerprints_to(I) + qdel(src) + update_nearby_icons() /obj/structure/window/verb/rotate() set name = "Rotate Window Counter-Clockwise" @@ -325,15 +356,19 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f return if(anchored) - to_chat(usr, "It is fastened to the floor therefore you can't rotate it!") - return 0 + to_chat(usr, "[src] cannot be rotated while it is fastened to the floor!") + return FALSE - dir = turn(dir, 90) -// updateSilicate() + var/target_dir = turn(dir, 90) + if(!valid_window_location(loc, target_dir)) + to_chat(usr, "[src] cannot be rotated in that direction!") + return FALSE + + setDir(target_dir) air_update_turf(1) ini_dir = dir add_fingerprint(usr) - return + return TRUE /obj/structure/window/verb/revrotate() set name = "Rotate Window Clockwise" @@ -344,16 +379,19 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f return if(anchored) - to_chat(usr, "It is fastened to the floor therefore you can't rotate it!") - return 0 + to_chat(usr, "[src] cannot be rotated while it is fastened to the floor!") + return FALSE - dir = turn(dir, 270) -// updateSilicate() - air_update_turf(1) + var/target_dir = turn(dir, 270) + + if(!valid_window_location(loc, target_dir)) + to_chat(usr, "[src] cannot be rotated in that direction!") + return FALSE + + setDir(target_dir) ini_dir = dir add_fingerprint(usr) - return - + return TRUE /obj/structure/window/AltClick(mob/user) if(user.incapacitated()) @@ -363,158 +401,77 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f return revrotate() -/* -/obj/structure/window/proc/updateSilicate() - if(silicateIcon && silicate) - icon = initial(icon) - - var/icon/I = icon(icon,icon_state,dir) - - var/r = (silicate / 100) + 1 - var/g = (silicate / 70) + 1 - var/b = (silicate / 50) + 1 - I.SetIntensity(r,g,b) - icon = I - silicateIcon = I -*/ - -/obj/structure/window/New(Loc,re=0) - ..() - ini_dir = dir - if(!color && !istype(src,/obj/structure/window/plasmabasic) && !istype(src,/obj/structure/window/plasmareinforced)) - color = color_windows(src) - update_nearby_icons() - return - -/obj/structure/window/Initialize() - air_update_turf(1) - return ..() - /obj/structure/window/Destroy() - density = 0 + density = FALSE air_update_turf(1) - if(loc && !disassembled) - playsound(get_turf(src), "shatter", 70, 1) + update_nearby_icons() return ..() - /obj/structure/window/Move() var/turf/T = loc ..() - dir = ini_dir + setDir(ini_dir) move_update_air(T) -//checks if this window is full-tile one -/obj/structure/window/proc/is_fulltile() - if(dir & (dir - 1)) - return 1 - return 0 - /obj/structure/window/CanAtmosPass(turf/T) - if(get_dir(loc, T) == dir) - return !density - if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST) - return !density - return 1 + if(!anchored || !density) + return TRUE + return !(FULLTILE_WINDOW_DIR == dir || dir == get_dir(loc, T)) //This proc is used to update the icons of nearby windows. /obj/structure/window/proc/update_nearby_icons() - if(!loc) return 0 update_icon() - for(var/direction in cardinal) - for(var/obj/structure/window/W in get_step(src,direction) ) - W.update_icon() + if(smooth) + smooth_icon_neighbors(src) /obj/structure/window/update_icon() - return + if(!QDELETED(src)) + if(!fulltile) + return + var/ratio = obj_integrity / max_integrity + ratio = CEILING(ratio*4, 1) * 25 + if(smooth) + smooth_icon(src) + overlays -= crack_overlay + if(ratio > 75) + return + crack_overlay = image('icons/obj/structures.dmi',"damage[ratio]",-(layer+0.1)) + overlays += crack_overlay /obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(exposed_temperature > T0C + 800) - hit(round(exposed_volume / 100), 0) + if(exposed_temperature > (T0C + heat_resistance)) + take_damage(round(exposed_volume / 100), BURN, 0, 0) ..() +/obj/structure/window/GetExplosionBlock() + return reinf && fulltile ? real_explosion_block : 0 + /obj/structure/window/basic - icon_state = "window" desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it." - basestate = "window" - -/obj/structure/window/plasmabasic - name = "plasma window" - desc = "A plasma-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through." - basestate = "plasmawindow" - icon_state = "plasmawindow" - shardtype = /obj/item/shard/plasma - glasstype = /obj/item/stack/sheet/plasmaglass - health = 120 - armor = list("melee" = 75, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100) - -/obj/structure/window/plasmabasic/New(Loc,re=0) - ..() - ini_dir = dir - update_nearby_icons() - return - -/obj/structure/window/plasmabasic/Initialize() - ..() - air_update_turf(1) - -/obj/structure/window/plasmabasic/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(exposed_temperature > T0C + 32000) - hit(round(exposed_volume / 1000), 0) - ..() - -/obj/structure/window/plasmabasic/BlockSuperconductivity() - return 1 - -/obj/structure/window/plasmareinforced - name = "reinforced plasma window" - desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof." - basestate = "plasmarwindow" - icon_state = "plasmarwindow" - shardtype = /obj/item/shard/plasma - glasstype = /obj/item/stack/sheet/plasmaglass - reinf = 1 - health = 160 - armor = list("melee" = 85, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100) - -/obj/structure/window/plasmareinforced/New(Loc,re=0) - ..() - ini_dir = dir - update_nearby_icons() - return - -/obj/structure/window/plasmareinforced/Initialize() - ..() - air_update_turf(1) - -/obj/structure/window/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) - return - -/obj/structure/window/plasmareinforced/BlockSuperconductivity() - return 1 //okay this SHOULD MAKE THE TOXINS CHAMBER WORK /obj/structure/window/reinforced name = "reinforced window" desc = "It looks rather strong. Might take a few good hits to shatter it." icon_state = "rwindow" - reinf = 1 - basestate = "rwindow" - health = 40 + reinf = TRUE + cancolor = TRUE + heat_resistance = 1600 armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100) + max_integrity = 50 + explosion_block = 1 + glass_type = /obj/item/stack/sheet/rglass /obj/structure/window/reinforced/tinted name = "tinted window" desc = "It looks rather strong and opaque. Might take a few good hits to shatter it." icon_state = "twindow" - basestate = "twindow" opacity = 1 /obj/structure/window/reinforced/tinted/frosted name = "frosted window" desc = "It looks rather strong and frosted over. Looks like it might take a few less hits then a normal reinforced window." icon_state = "fwindow" - basestate = "fwindow" - health = 30 + max_integrity = 30 /obj/structure/window/reinforced/polarized name = "electrochromic window" @@ -529,8 +486,6 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f animate(src, color="#222222", time=5) set_opacity(1) - - /obj/machinery/button/windowtint name = "window tint control" icon = 'icons/obj/power.dmi' @@ -540,7 +495,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f var/id = 0 var/active = 0 -/obj/machinery/button/windowtint/attack_hand(mob/user as mob) +/obj/machinery/button/windowtint/attack_hand(mob/user) if(..()) return 1 @@ -565,3 +520,195 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f /obj/machinery/button/windowtint/update_icon() icon_state = "light[active]" + +/obj/structure/window/plasmabasic + name = "plasma window" + desc = "A window made out of a plasma-silicate alloy. It looks insanely tough to break and burn through." + icon_state = "plasmawindow" + shardtype = /obj/item/shard/plasma + glass_type = /obj/item/stack/sheet/plasmaglass + heat_resistance = 32000 + max_integrity = 120 + explosion_block = 1 + armor = list("melee" = 75, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100) + +/obj/structure/window/plasmabasic/BlockSuperconductivity() + return 1 + +/obj/structure/window/plasmareinforced + name = "reinforced plasma window" + desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof." + icon_state = "plasmarwindow" + shardtype = /obj/item/shard/plasma + glass_type = /obj/item/stack/sheet/plasmaglass + reinf = TRUE + max_integrity = 160 + explosion_block = 2 + armor = list("melee" = 85, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100) + +/obj/structure/window/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + return + +/obj/structure/window/plasmareinforced/BlockSuperconductivity() + return 1 //okay this SHOULD MAKE THE TOXINS CHAMBER WORK + +/obj/structure/window/full + glass_amount = 2 + dir = FULLTILE_WINDOW_DIR + level = 3 + fulltile = TRUE + +/obj/structure/window/full/basic + desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it." + icon = 'icons/obj/smooth_structures/window.dmi' + icon_state = "window" + max_integrity = 50 + smooth = SMOOTH_TRUE + cancolor = TRUE + canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced) + +/obj/structure/window/full/plasmabasic + name = "plasma window" + desc = "A plasma-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through." + icon = 'icons/obj/smooth_structures/plasma_window.dmi' + icon_state = "plasmawindow" + shardtype = /obj/item/shard/plasma + glass_type = /obj/item/stack/sheet/plasmaglass + heat_resistance = 32000 + max_integrity = 240 + smooth = SMOOTH_TRUE + canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced) + +/obj/structure/window/full/plasmareinforced + name = "reinforced plasma window" + desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof." + icon = 'icons/obj/smooth_structures/rplasma_window.dmi' + icon_state = "rplasmawindow" + shardtype = /obj/item/shard/plasma + glass_type = /obj/item/stack/sheet/plasmaglass + smooth = SMOOTH_TRUE + reinf = TRUE + max_integrity = 320 + +/obj/structure/window/full/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + return + +/obj/structure/window/full/reinforced + name = "reinforced window" + desc = "It looks rather strong. Might take a few good hits to shatter it." + icon = 'icons/obj/smooth_structures/reinforced_window.dmi' + icon_state = "r_window" + smooth = SMOOTH_TRUE + canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced) + max_integrity = 100 + reinf = TRUE + heat_resistance = 1600 + armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100) + explosion_block = 1 + glass_type = /obj/item/stack/sheet/rglass + cancolor = TRUE + +/obj/structure/window/full/reinforced/tinted + name = "tinted window" + desc = "It looks rather strong and opaque. Might take a few good hits to shatter it." + icon = 'icons/obj/smooth_structures/tinted_window.dmi' + icon_state = "tinted_window" + opacity = 1 + +obj/structure/window/full/reinforced/ice + icon = 'icons/obj/smooth_structures/rice_window.dmi' + icon_state = "ice_window" + max_integrity = 150 + cancolor = FALSE + +/obj/structure/window/full/shuttle + name = "shuttle window" + desc = "A reinforced, air-locked pod window." + icon = 'icons/obj/smooth_structures/shuttle_window.dmi' + icon_state = "shuttle_window" + max_integrity = 160 + reinf = TRUE + heat_resistance = 1600 + explosion_block = 3 + armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100) + smooth = SMOOTH_TRUE + canSmoothWith = null + glass_type = /obj/item/stack/sheet/titaniumglass + +/obj/structure/window/full/shuttle/narsie_act() + color = "#3C3434" + +/obj/structure/window/full/shuttle/tinted + opacity = TRUE + +/obj/structure/window/plastitanium + name = "plastitanium window" + desc = "An evil looking window of plasma and titanium." + icon = 'icons/obj/smooth_structures/plastitanium_window.dmi' + icon_state = "plastitanium_window" + dir = FULLTILE_WINDOW_DIR + max_integrity = 100 + fulltile = TRUE + reinf = TRUE + heat_resistance = 1600 + armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100) + smooth = SMOOTH_TRUE + canSmoothWith = null + explosion_block = 3 + level = 3 + glass_type = /obj/item/stack/sheet/plastitaniumglass + glass_amount = 2 + +/obj/structure/window/reinforced/clockwork + name = "brass window" + desc = "A paper-thin pane of translucent yet reinforced brass." + icon = 'icons/obj/smooth_structures/clockwork_window.dmi' + icon_state = "clockwork_window_single" + burn_state = FIRE_PROOF + unacidable = 1 + max_integrity = 80 + armor = list("melee" = 60, "bullet" = 25, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100) + explosion_block = 2 //fancy AND hard to destroy. the most useful combination. + glass_type = /obj/item/stack/tile/brass + reinf = FALSE + cancolor = FALSE + var/made_glow = FALSE + +/obj/structure/window/reinforced/clockwork/New(loc, direct) + if(fulltile) + made_glow = TRUE + ..() + QDEL_LIST(debris) + if(fulltile) + new /obj/effect/temp_visual/ratvar/window(get_turf(src)) + debris += new/obj/item/stack/tile/brass(src, 2) + else + debris += new/obj/item/stack/tile/brass(src, 1) + +/obj/structure/window/reinforced/clockwork/setDir(direct) + if(!made_glow) + var/obj/effect/E = new /obj/effect/temp_visual/ratvar/window/single(get_turf(src)) + E.setDir(direct) + made_glow = TRUE + ..() + +/obj/structure/window/reinforced/clockwork/ratvar_act() + obj_integrity = max_integrity + update_icon() + +/obj/structure/window/reinforced/clockwork/narsie_act() + take_damage(rand(25, 75), BRUTE) + if(src) + var/previouscolor = color + color = "#960000" + animate(src, color = previouscolor, time = 8) + +/obj/structure/window/reinforced/clockwork/fulltile + icon_state = "clockwork_window" + smooth = SMOOTH_TRUE + canSmoothWith = null + fulltile = TRUE + dir = FULLTILE_WINDOW_DIR + max_integrity = 120 + level = 3 + glass_amount = 2 \ No newline at end of file diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 596d59c7b16..c59dd7bd78f 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -203,13 +203,13 @@ var/ert_request_answered = 0 var/cyborg_unlock = 0 /datum/response_team/proc/setSlots(com, sec, med, eng, jan, par, cyb) - command_slots = com - security_slots = sec - medical_slots = med - engineer_slots = eng - janitor_slots = jan - paranormal_slots = par - cyborg_slots = cyb + command_slots = com == null ? command_slots : com + security_slots = sec == null ? security_slots : sec + medical_slots = med == null ? medical_slots : med + engineer_slots = eng == null ? engineer_slots : eng + janitor_slots = jan == null ? janitor_slots : jan + paranormal_slots = par == null ? paranormal_slots : par + cyborg_slots = cyb == null ? cyborg_slots : cyb /datum/response_team/proc/reduceCyborgSlots() cyborg_slots-- diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index b1cbf84493f..db85329f8c1 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -214,7 +214,7 @@ //Interactions -/turf/simulated/wall/attack_animal(var/mob/living/simple_animal/M) +/turf/simulated/wall/attack_animal(mob/living/simple_animal/M) M.changeNext_move(CLICK_CD_MELEE) M.do_attack_animation(src) if((M.environment_smash & ENVIRONMENT_SMASH_WALLS) || (M.environment_smash & ENVIRONMENT_SMASH_RWALLS)) @@ -229,20 +229,19 @@ to_chat(M, "You push the wall but nothing happens!") return -/turf/simulated/wall/attack_hand(mob/user as mob) - user.changeNext_move(CLICK_CD_MELEE) - if(HULK in user.mutations) - if(prob(hardness) || rotting) - playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) - to_chat(user, text("You smash through the wall.")) - user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) - dismantle_wall(1) - return - else - playsound(src, 'sound/effects/bang.ogg', 50, 1) - to_chat(user, text("You punch the wall.")) - return +/turf/simulated/wall/attack_hulk(mob/user, does_attack_animation = FALSE) + ..(user, TRUE) + if(prob(hardness) || rotting) + playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) + user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) + dismantle_wall(TRUE) + else + playsound(src, 'sound/effects/bang.ogg', 50, 1) + to_chat(user, text("You punch the wall.")) + return TRUE +/turf/simulated/wall/attack_hand(mob/user) + user.changeNext_move(CLICK_CD_MELEE) if(rotting) if(hardness <= 10) to_chat(user, "This wall feels rather unstable.") @@ -254,183 +253,169 @@ to_chat(user, "You push the wall but nothing happens!") playsound(src, 'sound/weapons/Genhit.ogg', 25, 1) - src.add_fingerprint(user) - ..() - return + add_fingerprint(user) + return ..() -/turf/simulated/wall/attackby(obj/item/W as obj, mob/user as mob, params) +/turf/simulated/wall/attackby(obj/item/I, mob/user, params) user.changeNext_move(CLICK_CD_MELEE) - if(!user.IsAdvancedToolUser()) - to_chat(user, "You don't have the dexterity to do this!") + + if(!isturf(user.loc)) + return // No touching walls unless you're on a turf (pretty sure attackby can't be called anyways but whatever) + + if(rotting && try_rot(I, user, params)) return - //get the user's location - if(!istype(user.loc, /turf)) - return //can't do this stuff whilst inside objects and such + if(thermite && try_thermite(I, user, params)) + return - if(rotting) - if(istype(W, /obj/item/weldingtool) ) - var/obj/item/weldingtool/WT = W - if(WT.remove_fuel(0,user)) - to_chat(user, "You burn away the fungi with \the [WT].") - playsound(src, WT.usesound, 10, 1) - for(var/obj/effect/overlay/wall_rot/WR in src) - qdel(WR) - rotting = 0 - return - else if(!is_sharp(W) && W.force >= 10 || W.force >= 20) - to_chat(user, "\The [src] crumbles away under the force of your [W.name].") - src.dismantle_wall(1) - return + if(try_decon(I, user, params)) + return - //THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects - if(thermite) - if(istype(W, /obj/item/weldingtool)) - var/obj/item/weldingtool/WT = W - if(WT.remove_fuel(0,user)) - thermitemelt(user) - return + if(try_destroy(I, user, params)) + return - else if(istype(W, /obj/item/gun/energy/plasmacutter)) + if(try_wallmount(I, user, params)) + return + + // The magnetic gripper does a separate attackby, so bail from this one + if(istype(I, /obj/item/gripper)) + return + + return ..() + +/turf/simulated/wall/proc/try_rot(obj/item/I, mob/user, params) + if(iswelder(I)) + var/obj/item/weldingtool/WT = I + if(WT.remove_fuel(0, user)) + to_chat(user, "You burn away the fungi with [WT].") + playsound(src, WT.usesound, 10, 1) + for(var/obj/effect/overlay/wall_rot/WR in src) + qdel(WR) + rotting = 0 + return TRUE + else if((!is_sharp(I) && I.force >= 10) || I.force >= 20) + to_chat(user, "[src] crumbles away under the force of your [I.name].") + dismantle_wall(1) + return TRUE + return FALSE + +/turf/simulated/wall/proc/try_thermite(obj/item/I, mob/user, params) + if(iswelder(I)) + var/obj/item/weldingtool/WT = I + if(WT.remove_fuel(0, user)) thermitemelt(user) - return + return TRUE - else if(istype(W, /obj/item/melee/energy/blade)) - var/obj/item/melee/energy/blade/EB = W + else if(istype(I, /obj/item/gun/energy/plasmacutter)) + thermitemelt(user) + return TRUE - EB.spark_system.start() - to_chat(user, "You slash \the [src] with \the [EB]; the thermite ignites!") - playsound(src, "sparks", 50, 1) - playsound(src, EB.usesound, 50, 1) - thermitemelt(user) - return + return FALSE - //DECONSTRUCTION - if(istype(W, /obj/item/weldingtool)) +/turf/simulated/wall/proc/try_decon(obj/item/I, mob/user, params) + if(iswelder(I)) + var/obj/item/weldingtool/WT = I + if(!WT.remove_fuel(0, user)) + to_chat(user, "You need more welding fuel to complete this task.") + return TRUE // this means "don't continue trying to find alternative uses in attackby", not "decon succeeded" var/response = "Dismantle" if(damage) response = alert(user, "Would you like to repair or dismantle [src]?", "[src]", "Repair", "Dismantle") - var/obj/item/weldingtool/WT = W - - if(WT.remove_fuel(0,user)) - if(response == "Repair") + switch(response) + if("Repair") to_chat(user, "You start repairing the damage to [src].") playsound(src, WT.usesound, 100, 1) if(do_after(user, max(5, damage / 5) * WT.toolspeed, target = src) && WT && WT.isOn()) to_chat(user, "You finish repairing the damage to [src].") take_damage(-damage) - - else if(response == "Dismantle") + else to_chat(user, "You begin slicing through the outer plating.") playsound(src, WT.usesound, 100, 1) if(do_after(user, 100 * WT.toolspeed, target = src) && WT && WT.isOn()) to_chat(user, "You remove the outer plating.") dismantle_wall() - else to_chat(user, "You stop slicing through [src].") - return - - else - to_chat(user, "You need more welding fuel to complete this task.") - return - - else if(istype(W, /obj/item/gun/energy/plasmacutter)) + return TRUE + else if(istype(I, /obj/item/gun/energy/plasmacutter)) to_chat(user, "You begin slicing through the outer plating.") - playsound(src, W.usesound, 100, 1) + playsound(src, I.usesound, 100, 1) - if(do_after(user, istype(sheet_type, /obj/item/stack/sheet/mineral/diamond) ? 120 * W.toolspeed : 60 * W.toolspeed, target = src)) + if(do_after(user, istype(sheet_type, /obj/item/stack/sheet/mineral/diamond) ? 120 * I.toolspeed : 60 * I.toolspeed, target = src)) to_chat(user, "You remove the outer plating.") dismantle_wall() - visible_message("[user] slices apart \the [src]!","You hear metal being sliced apart.") + visible_message("[user] slices apart [src]!", "You hear metal being sliced apart.") + return TRUE - //DRILLING - else if(istype(W, /obj/item/pickaxe/drill/diamonddrill)) + return FALSE +/turf/simulated/wall/proc/try_destroy(obj/item/I, mob/user, params) + var/isdiamond = istype(sheet_type, /obj/item/stack/sheet/mineral/diamond) // snowflake bullshit + + if(istype(I, /obj/item/pickaxe/drill/diamonddrill)) to_chat(user, "You begin to drill though the wall.") - if(do_after(user, istype(sheet_type, /obj/item/stack/sheet/mineral/diamond) ? 480 * W.toolspeed : 240 * W.toolspeed, target = src)) // Diamond pickaxe has 0.25 toolspeed, so 120/60 - to_chat(user, "Your drill tears though the last of the reinforced plating.") + if(do_after(user, isdiamond ? 480 * I.toolspeed : 240 * I.toolspeed, target = src)) // Diamond pickaxe has 0.25 toolspeed, so 120/60 + to_chat(user, "Your [I.name] tears though the last of the reinforced plating.") dismantle_wall() - visible_message("[user] drills through \the [src]!","You hear the grinding of metal.") - - else if(istype(W, /obj/item/pickaxe/drill/jackhammer)) + visible_message("[user] drills through [src]!", "You hear the grinding of metal.") + return TRUE + else if(istype(I, /obj/item/pickaxe/drill/jackhammer)) to_chat(user, "You begin to disintegrates the wall.") - if(do_after(user, istype(sheet_type, /obj/item/stack/sheet/mineral/diamond) ? 600 * W.toolspeed : 300 * W.toolspeed, target = src)) // Jackhammer has 0.1 toolspeed, so 60/30 - to_chat(user, "Your sonic jackhammer disintegrate the reinforced plating.") + if(do_after(user, isdiamond ? 600 * I.toolspeed : 300 * I.toolspeed, target = src)) // Jackhammer has 0.1 toolspeed, so 60/30 + to_chat(user, "Your [I.name] disintegrates the reinforced plating.") dismantle_wall() - visible_message("[user] disintegrates \the [src]!","You hear the grinding of metal.") + visible_message("[user] disintegrates [src]!","You hear the grinding of metal.") + return TRUE - else if(istype(W, /obj/item/melee/energy/blade)) - var/obj/item/melee/energy/blade/EB = W + return FALSE - EB.spark_system.start() - to_chat(user, "You stab \the [EB] into the wall and begin to slice it apart.") - playsound(src, "sparks", 50, 1) +/turf/simulated/wall/proc/try_wallmount(obj/item/I, mob/user, params) + if(istype(I, /obj/item/mounted)) + return TRUE // We don't want attack_hand running and doing stupid shit with this - if(do_after(user, istype(sheet_type, /obj/item/stack/sheet/mineral/diamond) ? 140 * EB.toolspeed : 70 * EB.toolspeed, target = src)) - EB.spark_system.start() - playsound(src, "sparks", 50, 1) - playsound(src, EB.usesound, 50, 1) - dismantle_wall(1) - visible_message("[user] slices apart \the [src]!","You hear metal being sliced apart and sparks flying.") - - else if(istype(W,/obj/item/mounted)) //if we place it, we don't want to have a silly message - return - - //Poster stuff - else if(istype(W, /obj/item/poster)) - place_poster(W, user) - return - - //Bone White - Place pipes on walls - else if(istype(W,/obj/item/pipe)) - var/obj/item/pipe/V = W - if(V.pipe_type != -1) // ANY PIPE - var/obj/item/pipe/P = W + if(istype(I, /obj/item/poster)) + place_poster(I, user) + return TRUE + //Bone White - Place pipes on walls // I fucking hate your code with a passion bone + if(istype(I, /obj/item/pipe)) + var/obj/item/pipe/P = I + if(P.pipe_type != -1) // ANY PIPE playsound(get_turf(src), 'sound/weapons/circsawhit.ogg', 50, 1) - user.visible_message( \ - "[user] starts drilling a hole in \the [src].", \ - "You start drilling a hole in \the [src].", \ - "You hear ratchet.") - if(do_after(user, 80 * W.toolspeed, target = src)) - user.visible_message( \ - "[user] drills a hole in \the [src] and pushes \a [P] into the void", \ - "You have finished drilling in \the [src] and push the [P] into the void.", \ - "You hear ratchet.") + user.visible_message( + "[user] starts drilling a hole in [src].", + "You start drilling a hole in [src].", + "You hear a drill.") + + if(do_after(user, 80 * P.toolspeed, target = src)) + user.visible_message( + "[user] drills a hole in [src] and pushes [P] into the void.", + "You finish drilling [src] and push [P] into the void.", + "You hear a ratchet.") user.drop_item() if(P.is_bent_pipe()) // bent pipe rotation fix see construction.dm - P.dir = 5 + P.setDir(5) if(user.dir == 1) - P.dir = 6 + P.setDir(6) else if(user.dir == 2) - P.dir = 9 + P.setDir(9) else if(user.dir == 4) - P.dir = 10 + P.setDir(10) else - P.dir = user.dir - P.x = src.x - P.y = src.y - P.z = src.z - P.loc = src + P.setDir(user.dir) + P.forceMove(src) P.level = 2 - return - // The magnetic gripper does a separate attackby, so bail from this one - else if(istype(W, /obj/item/gripper)) - return - - else - return attack_hand(user) - return + return TRUE + return FALSE /turf/simulated/wall/singularity_pull(S, current_size) if(current_size >= STAGE_FIVE) diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index 827791be76d..eb054ba19ed 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -33,333 +33,256 @@ if(RWALL_SHEATH) to_chat(user, "The support rods have been sliced through, and the outer sheath is connected loosely to the girder.") -/turf/simulated/wall/r_wall/attackby(obj/item/W, mob/user, params) - user.changeNext_move(CLICK_CD_MELEE) - if(!user.IsAdvancedToolUser()) - to_chat(user, "You don't have the dexterity to do this!") +/turf/simulated/wall/r_wall/attackby(obj/item/I, mob/user, params) + if(try_repair(I, user, params)) return + return ..() - //get the user's location - if(!isturf(user.loc)) - return //can't do this stuff whilst inside objects and such - - if(rotting) - if(iswelder(W)) - var/obj/item/weldingtool/WT = W - if(WT.remove_fuel(0,user)) - to_chat(user, "You burn away the fungi with \the [WT].") - playsound(src, WT.usesound, 10, 1) - for(var/obj/effect/overlay/wall_rot/WR in src) - qdel(WR) - rotting = 0 - return - else if(!is_sharp(W) && W.force >= 10 || W.force >= 20) - to_chat(user, "\The [src] crumbles away under the force of your [W.name].") - dismantle_wall() - return - - //THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects - if(thermite) - if(iswelder(W)) - var/obj/item/weldingtool/WT = W - if(WT.remove_fuel(0,user)) - thermitemelt(user) - return - - else if(istype(W, /obj/item/gun/energy/plasmacutter)) - thermitemelt(user) - return - - else if(istype(W, /obj/item/melee/energy/blade)) - var/obj/item/melee/energy/blade/EB = W - - EB.spark_system.start() - to_chat(user, "You slash \the [src] with \the [EB]; the thermite ignites!") - playsound(src, "sparks", 50, 1) - playsound(src, EB.usesound, 50, 1) - - thermitemelt(user) - return - - else if(istype(W, /obj/item/melee/energy/blade)) - to_chat(user, "This wall is too thick to slice through. You will need to find a different path.") - return - - if(damage && iswelder(W)) - var/obj/item/weldingtool/WT = W - if(WT.remove_fuel(0,user)) - to_chat(user, "You start repairing the damage to [src].") - playsound(src, WT.usesound, 100, 1) - if(do_after(user, max(5, damage / 5) * WT.toolspeed, target = src) && WT && WT.isOn()) - to_chat(user, "You finish repairing the damage to [src].") - take_damage(-damage) - return - else +/turf/simulated/wall/r_wall/proc/try_repair(obj/item/I, mob/user, params) + if(damage && iswelder(I)) + var/obj/item/weldingtool/WT = I + if(!WT.remove_fuel(0, user)) to_chat(user, "You need more welding fuel to complete this task.") - return + return TRUE + to_chat(user, "You start repairing the damage to [src].") + playsound(src, WT.usesound, 100, 1) + if(do_after(user, max(5, damage / 5) * WT.toolspeed, target = src) && WT && WT.isOn()) + to_chat(user, "You finish repairing the damage to [src].") + take_damage(-damage) + return TRUE - //DECONSTRUCTION - switch(d_state) - if(RWALL_INTACT) - if(iswirecutter(W)) - playsound(src, W.usesound, 100, 1) - d_state = RWALL_SUPPORT_LINES + if(d_state) + // Repairing + if(istype(I, /obj/item/stack/sheet/metal)) + var/obj/item/stack/sheet/metal/MS = I + + to_chat(user, "You begin patching-up the wall with [MS]...") + if(do_after(user, max(20 * d_state, 100) * MS.toolspeed, target = src) && d_state) + if(!MS.use(1)) + to_chat(user, "You don't have enough [MS.name] for that!") + return TRUE + + d_state = RWALL_INTACT update_icon() - new /obj/item/stack/rods(src) - to_chat(user, "You cut the outer grille.") - return + smooth_icon_neighbors(src) + to_chat(user, "You repair the last of the damage.") - if(RWALL_SUPPORT_LINES) - if(isscrewdriver(W)) - to_chat(user, "You begin unsecuring the support lines...") - playsound(src, W.usesound, 100, 1) + return TRUE - if(do_after(user, 40 * W.toolspeed, target = src) && d_state == RWALL_SUPPORT_LINES) - d_state = RWALL_COVER - update_icon() - to_chat(user, "You unsecure the support lines.") - return - - //REPAIRING (replacing the outer grille for cosmetic damage) - else if(istype(W, /obj/item/stack/rods)) - var/obj/item/stack/O = W - if(O.use(1)) - d_state = RWALL_INTACT - update_icon() - icon_state = "r_wall" - update_icon() - to_chat(user, "You replace the outer grille.") - else - to_chat(user, "You don't have enough rods for that!") - - if(RWALL_COVER) - if(iswelder(W)) - var/obj/item/weldingtool/WT = W - if(WT.remove_fuel(0,user)) - to_chat(user, "You begin slicing through the metal cover...") - playsound(src, WT.usesound, 100, 1) - - if(do_after(user, 60 * WT.toolspeed, target = src) && d_state == RWALL_COVER) - d_state = RWALL_CUT_COVER - update_icon() - to_chat(user, "You press firmly on the cover, dislodging it.") - - else - to_chat(user, "You need more welding fuel to complete this task.") - return - - if(istype(W, /obj/item/gun/energy/plasmacutter)) - to_chat(user, "You begin slicing through the metal cover...") - playsound(src, W.usesound, 100, 1) - - if(do_after(user, 40 * W.toolspeed, target = src) && d_state == RWALL_COVER) - d_state = RWALL_CUT_COVER - update_icon() - to_chat(user, "You press firmly on the cover, dislodging it.") - return - - if(isscrewdriver(W)) - to_chat(user, "You begin securing the support lines...") - playsound(src, W.usesound, 100, 1) - if(do_after(user, 40*W.toolspeed, target = src)) - if(!istype(src, /turf/simulated/wall/r_wall) || !W || d_state != RWALL_COVER) - return 1 - d_state = RWALL_SUPPORT_LINES - update_icon() - to_chat(user, "The support lines have been secured.") - return 1 - - if(RWALL_CUT_COVER) - if(iscrowbar(W)) - to_chat(user, "You struggle to pry off the cover...") - playsound(src, W.usesound, 100, 1) - - if(do_after(user, 100 * W.toolspeed, target = src) && d_state == RWALL_CUT_COVER) - d_state = RWALL_BOLTS - update_icon() - to_chat(user, "You pry off the cover.") - return - - if(iswelder(W)) - var/obj/item/weldingtool/WT = W - if(WT.remove_fuel(0,user)) - to_chat(user, "You begin welding the metal cover back to the frame...") - playsound(src, WT.usesound, 100, 1) - if(do_after(user, 60*WT.toolspeed, target = src)) - if(!istype(src, /turf/simulated/wall/r_wall) || !WT || !WT.isOn() || d_state != RWALL_CUT_COVER) - return 1 - d_state = RWALL_COVER - update_icon() - to_chat(user, "The metal cover has been welded securely to the frame.") - return 1 - - if(RWALL_BOLTS) - if(iswrench(W)) - to_chat(user, "You start loosening the anchoring bolts which secure the support rods to their frame...") - playsound(src, W.usesound, 100, 1) - - if(do_after(user, 40 * W.toolspeed, target = src) && d_state == RWALL_BOLTS) - d_state = RWALL_SUPPORT_RODS - update_icon() - to_chat(user, "You remove the bolts anchoring the support rods.") - return - - if(iscrowbar(W)) - to_chat(user, "You start to pry the cover back into place...") - playsound(src, W.usesound, 100, 1) - if(do_after(user, 20*W.toolspeed, target = src)) - if(!istype(src, /turf/simulated/wall/r_wall) || !W || d_state != RWALL_BOLTS) - return 1 - d_state = RWALL_CUT_COVER - update_icon() - to_chat(user, "The metal cover has been pried back into place.") - return 1 - - if(RWALL_SUPPORT_RODS) - if(iswelder(W)) - var/obj/item/weldingtool/WT = W - if(WT.remove_fuel(0,user)) - to_chat(user, "You begin slicing through the support rods...") - playsound(src, WT.usesound, 100, 1) - - if(do_after(user, 100 * WT.toolspeed, target = src) && d_state == RWALL_SUPPORT_RODS) - d_state = RWALL_SHEATH - update_icon() - else - to_chat(user, "You need more welding fuel to complete this task.") - return - - if(istype(W, /obj/item/gun/energy/plasmacutter)) - to_chat(user, "You begin slicing through the support rods...") - playsound(src, W.usesound, 100, 1) - - if(do_after(user, 70 * W.toolspeed, target = src) && d_state == RWALL_SUPPORT_RODS) - d_state = RWALL_SHEATH - update_icon() - return - - if(iswrench(W)) - to_chat(user, "You start tightening the bolts which secure the support rods to their frame...") - playsound(src, W.usesound, 100, 1) - if(do_after(user, 40*W.toolspeed, target = src)) - if(!istype(src, /turf/simulated/wall/r_wall) || !W || d_state != RWALL_SUPPORT_RODS) - return 1 - d_state = RWALL_BOLTS - update_icon() - to_chat(user, "You tighten the bolts anchoring the support rods.") - return 1 - - if(RWALL_SHEATH) - if(iscrowbar(W)) - to_chat(user, "You struggle to pry off the outer sheath...") - playsound(src, W.usesound, 100, 1) - - if(do_after(user, 100 * W.toolspeed, target = src) && d_state == RWALL_SHEATH) - to_chat(user, "You pry off the outer sheath.") - dismantle_wall() - return - -//vv OK, we weren't performing a valid deconstruction step or igniting thermite,let's check the other possibilities vv - - //DRILLING - if(istype(W, /obj/item/pickaxe/drill/diamonddrill)) - to_chat(user, "You begin to drill though the wall...") - - if(do_after(user, 800 * W.toolspeed, target = src)) // Diamond drill has 0.25 toolspeed, so 200 - to_chat(user, "Your drill tears through the last of the reinforced plating.") - dismantle_wall() - - if(istype(W,/obj/item/pickaxe/drill/jackhammer)) - to_chat(user, "You begin to disintegrate the wall...") - - if(do_after(user, 1000 * W.toolspeed, target = src)) // Jackhammer has 0.1 toolspeed, so 100 - to_chat(user, "Your sonic jackhammer disintegrates the reinforced plating.") - dismantle_wall() - - //REPAIRING - else if(istype(W, /obj/item/stack/sheet/metal) && d_state) - var/obj/item/stack/sheet/metal/MS = W - - to_chat(user, "You begin patching-up the wall with \a [MS]...") - - if(do_after(user, max(20 * d_state, 100) * MS.toolspeed, target = src) && d_state) - if(!MS.use(1)) - to_chat(user, "You don't have enough metal for that!") - return - - d_state = RWALL_INTACT - update_icon() - smooth_icon_neighbors(src) - to_chat(user, "You repair the last of the damage.") - - //UPGRADING TO COATED - else if(istype(W, /obj/item/stack/sheet/plasteel) && !d_state) - var/obj/item/stack/sheet/plasteel/MS = W + else if(istype(I, /obj/item/stack/sheet/plasteel)) + var/obj/item/stack/sheet/plasteel/PS = I if(!can_be_reinforced) to_chat(user, "The wall is already coated!") - return - to_chat(user, "You begin adding an additional layer of coating to the wall with \a [MS]...") + return FALSE - if(do_after(user, 40 * MS.toolspeed, target = src) && !d_state) - if(!MS.use(2)) - to_chat(user, "You don't have enough plasteel for that!") + to_chat(user, "You begin adding an additional layer of coating to the wall with [PS]...") + if(do_after(user, 40 * PS.toolspeed, target = src) && !d_state) + if(!PS.use(2)) + to_chat(user, "You don't have enough [PS.name] for that!") return to_chat(user, "You add an additional layer of coating to the wall.") ChangeTurf(/turf/simulated/wall/r_wall/coated) update_icon() smooth_icon_neighbors(src) - can_be_reinforced = 0 - return + can_be_reinforced = FALSE + return TRUE + return FALSE - //APC - else if(istype(W,/obj/item/mounted)) - return - //Poster stuff - else if(istype(W, /obj/item/poster)) - place_poster(W, user) - return +/turf/simulated/wall/r_wall/try_decon(obj/item/I, mob/user, params) + switch(d_state) + if(RWALL_INTACT) + // RWALL_INTACT > RWALL_SUPPORT_LINES + if(iswirecutter(I)) + playsound(src, I.usesound, 100, 1) + d_state = RWALL_SUPPORT_LINES + update_icon() + new /obj/item/stack/rods(src) + to_chat(user, "You cut the outer grille.") + return TRUE - //Bone White - Place pipes on walls - else if(istype(W,/obj/item/pipe)) - var/obj/item/pipe/V = W - if(V.pipe_type != -1) // ANY PIPE - var/obj/item/pipe/P = W + if(RWALL_SUPPORT_LINES) + // RWALL_SUPPORT_LINES > RWALL_COVER + if(isscrewdriver(I)) + to_chat(user, "You begin unsecuring the support lines...") + playsound(src, I.usesound, 100, 1) - playsound(get_turf(src), 'sound/weapons/circsawhit.ogg', 50, 1) - user.visible_message( \ - "[user] starts drilling a hole in \the [src]...", \ - "You start drilling a hole in \the [src]. This is going to take a while.", \ - "You hear ratchet.") - if(do_after(user, 160 * V.toolspeed, target = src)) - user.visible_message( \ - "[user] drills a hole in \the [src] and pushes \a [P] into the void.", \ - "You have finished drilling in \the [src] and push the [P] into the void.", \ - "You hear ratchet.") + if(do_after(user, 40 * I.toolspeed, target = src) && d_state == RWALL_SUPPORT_LINES) + d_state = RWALL_COVER + update_icon() + to_chat(user, "You unsecure the support lines.") + return TRUE - user.drop_item() - if(P.is_bent_pipe()) // bent pipe rotation fix see construction.dm - P.dir = 5 - if(user.dir == 1) - P.dir = 6 - else if(user.dir == 2) - P.dir = 9 - else if(user.dir == 4) - P.dir = 10 + // RWALL_INTACT < RWALL_SUPPORT_LINES + if(istype(I, /obj/item/stack/rods)) + var/obj/item/stack/S = I + if(S.use(1)) + d_state = RWALL_INTACT + update_icon() + to_chat(user, "You replace the outer grille.") else - P.dir = user.dir - P.x = src.x - P.y = src.y - P.z = src.z - P.loc = src - P.level = 2 - return + to_chat(user, "You don't have enough rods for that!") + return TRUE + + if(RWALL_COVER) + // RWALL_COVER > RWALL_CUT_COVER + if(iswelder(I)) + var/obj/item/weldingtool/WT = I + if(!WT.remove_fuel(0, user)) + to_chat(user, "You need more welding fuel to complete this task.") + return TRUE + + to_chat(user, "You begin slicing through the metal cover...") + playsound(src, WT.usesound, 100, 1) + + if(do_after(user, 60 * WT.toolspeed, target = src) && d_state == RWALL_COVER) + d_state = RWALL_CUT_COVER + update_icon() + to_chat(user, "You press firmly on the cover, dislodging it.") + return TRUE + + // RWALL_COVER > RWALL_CUT_COVER + if(istype(I, /obj/item/gun/energy/plasmacutter)) + to_chat(user, "You begin slicing through the metal cover...") + playsound(src, I.usesound, 100, 1) + + if(do_after(user, 40 * I.toolspeed, target = src) && d_state == RWALL_COVER) + d_state = RWALL_CUT_COVER + update_icon() + to_chat(user, "You press firmly on the cover, dislodging it.") + return TRUE + + // RWALL_SUPPORT_LINES < RWALL_COVER + if(isscrewdriver(I)) + to_chat(user, "You begin securing the support lines...") + playsound(src, I.usesound, 100, 1) + if(do_after(user, 40 * I.toolspeed, target = src)) + if(!istype(src, /turf/simulated/wall/r_wall) || !I || d_state != RWALL_COVER) + return TRUE + d_state = RWALL_SUPPORT_LINES + update_icon() + to_chat(user, "The support lines have been secured.") + return TRUE + + if(RWALL_CUT_COVER) + // RWALL_CUT_COVER > RWALL_BOLTS + if(iscrowbar(I)) + to_chat(user, "You struggle to pry off the cover...") + playsound(src, I.usesound, 100, 1) + + if(do_after(user, 100 * I.toolspeed, target = src) && d_state == RWALL_CUT_COVER) + d_state = RWALL_BOLTS + update_icon() + to_chat(user, "You pry off the cover.") + return TRUE + + // RWALL_COVER < RWALL_CUT_COVER + if(iswelder(I)) + var/obj/item/weldingtool/WT = I + if(!WT.remove_fuel(0, user)) + return TRUE + + to_chat(user, "You begin welding the metal cover back to the frame...") + playsound(src, WT.usesound, 100, 1) + if(do_after(user, 60 * WT.toolspeed, target = src)) + if(!istype(src, /turf/simulated/wall/r_wall) || !WT || !WT.isOn() || d_state != RWALL_CUT_COVER) + return TRUE + d_state = RWALL_COVER + update_icon() + to_chat(user, "The metal cover has been welded securely to the frame.") + return TRUE + + if(RWALL_BOLTS) + // RWALL_BOLTS > RWALL_SUPPORT_RODS + if(iswrench(I)) + to_chat(user, "You start loosening the anchoring bolts which secure the support rods to their frame...") + playsound(src, I.usesound, 100, 1) + + if(do_after(user, 40 * I.toolspeed, target = src) && d_state == RWALL_BOLTS) + d_state = RWALL_SUPPORT_RODS + update_icon() + to_chat(user, "You remove the bolts anchoring the support rods.") + return TRUE + + // RWALL_CUT_COVER < RWALL_BOLTS + if(iscrowbar(I)) + to_chat(user, "You start to pry the cover back into place...") + playsound(src, I.usesound, 100, 1) + if(do_after(user, 20 * I.toolspeed, target = src)) + if(!istype(src, /turf/simulated/wall/r_wall) || !I || d_state != RWALL_BOLTS) + return TRUE + d_state = RWALL_CUT_COVER + update_icon() + to_chat(user, "The metal cover has been pried back into place.") + return TRUE + + if(RWALL_SUPPORT_RODS) + // RWALL_SUPPORT_RODS > RWALL_SHEATH + if(iswelder(I)) + var/obj/item/weldingtool/WT = I + if(!WT.remove_fuel(0, user)) + to_chat(user, "You need more welding fuel to complete this task.") + return TRUE + + to_chat(user, "You begin slicing through the support rods...") + playsound(src, WT.usesound, 100, 1) + + if(do_after(user, 100 * WT.toolspeed, target = src) && d_state == RWALL_SUPPORT_RODS) + d_state = RWALL_SHEATH + update_icon() + return TRUE + + // RWALL_SUPPORT_RODS > RWALL_SHEATH + if(istype(I, /obj/item/gun/energy/plasmacutter)) + to_chat(user, "You begin slicing through the support rods...") + playsound(src, I.usesound, 100, 1) + + if(do_after(user, 70 * I.toolspeed, target = src) && d_state == RWALL_SUPPORT_RODS) + d_state = RWALL_SHEATH + update_icon() + return TRUE + + // RWALL_BOLTS < RWALL_SUPPORT_RODS + if(iswrench(I)) + to_chat(user, "You start tightening the bolts which secure the support rods to their frame...") + playsound(src, I.usesound, 100, 1) + if(do_after(user, 40 * I.toolspeed, target = src)) + if(!istype(src, /turf/simulated/wall/r_wall) || !I || d_state != RWALL_SUPPORT_RODS) + return TRUE + d_state = RWALL_BOLTS + update_icon() + to_chat(user, "You tighten the bolts anchoring the support rods.") + return TRUE + + if(RWALL_SHEATH) + // RWALL_SHEATH > deconstructed + if(iscrowbar(I)) + to_chat(user, "You struggle to pry off the outer sheath...") + playsound(src, I.usesound, 100, 1) + + if(do_after(user, 100 * I.toolspeed, target = src) && d_state == RWALL_SHEATH) + to_chat(user, "You pry off the outer sheath.") + dismantle_wall() + return TRUE + +/turf/simulated/wall/r_wall/try_destroy(obj/item/I, mob/user, params) + if(istype(I, /obj/item/pickaxe/drill/diamonddrill)) + to_chat(user, "You begin to drill though the wall...") + + if(do_after(user, 800 * I.toolspeed, target = src)) // Diamond drill has 0.25 toolspeed, so 200 + to_chat(user, "Your drill tears through the last of the reinforced plating.") + dismantle_wall() + return TRUE + + if(istype(I, /obj/item/pickaxe/drill/jackhammer)) + to_chat(user, "You begin to disintegrate the wall...") + + if(do_after(user, 1000 * I.toolspeed, target = src)) // Jackhammer has 0.1 toolspeed, so 100 + to_chat(user, "Your sonic jackhammer disintegrates the reinforced plating.") + dismantle_wall() + return TRUE - //Finally, CHECKING FOR FALSE WALLS if it isn't damaged - else if(!d_state) - return attack_hand(user) - return /turf/simulated/wall/r_wall/singularity_pull(S, current_size) if(current_size >= STAGE_FIVE) diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm index 611ff1656f3..2831894e3ea 100644 --- a/code/game/turfs/space/transit.dm +++ b/code/game/turfs/space/transit.dm @@ -94,8 +94,7 @@ var/max = world.maxx-TRANSITIONEDGE var/min = 1+TRANSITIONEDGE - var/datum/space_level/dest = pick(levels_by_trait(REACHABLE)) - var/_z = dest.zpos //select a random space zlevel + var/_z = pick(levels_by_trait(REACHABLE)) //select a random space zlevel //now select coordinates for a border turf var/_x diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index b9a51a661d1..32d5824c4d5 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -84,7 +84,7 @@ do_suicide(damagetype, held_item) return - to_chat(viewers(src), "[src] [pick(species.suicide_messages)] It looks like they're trying to commit suicide.") + to_chat(viewers(src), "[src] [replacetext(pick(species.suicide_messages), "their", p_their())] It looks like [p_theyre()] trying to commit suicide.") do_suicide(0) updatehealth() @@ -129,7 +129,7 @@ if(confirm == "Yes") suiciding = 1 - to_chat(viewers(src), "[src] is powering down. It looks like \he's trying to commit suicide.") + to_chat(viewers(src), "[src] is powering down. It looks like [p_theyre()] trying to commit suicide.") //put em at -175 adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) updatehealth() @@ -149,7 +149,7 @@ if(confirm == "Yes") suiciding = 1 - to_chat(viewers(src), "[src] is powering down. It looks like \he's trying to commit suicide.") + to_chat(viewers(src), "[src] is powering down. It looks like [p_theyre()] trying to commit suicide.") //put em at -175 adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) updatehealth() @@ -186,7 +186,7 @@ if(confirm == "Yes") suiciding = 1 - to_chat(viewers(src), "[src] is thrashing wildly! It looks like \he's trying to commit suicide.") + to_chat(viewers(src), "[src] is thrashing wildly! It looks like [p_theyre()] trying to commit suicide.") //put em at -175 adjustOxyLoss(max(175 - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) updatehealth() diff --git a/code/game/world.dm b/code/game/world.dm index 7d592864501..ffb9dfb1ecd 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -362,7 +362,7 @@ var/world_topic_spam_protect_time = world.timeofday /world/proc/load_motd() join_motd = file2text("config/motd.txt") - + GLOB.join_tos = file2text("config/tos.txt") /proc/load_configuration() config = new /datum/configuration() diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index b97993d5327..4c905a0b517 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -93,7 +93,7 @@ world/IsBanned(key,address,computer_id) var/appealmessage = "" if(config.banappeals) appealmessage = " You may appeal it at [config.banappeals]." - expires = " The is a permanent ban.[appealmessage]" + expires = " This is a permanent ban.[appealmessage]" var/desc = "\nReason: You, or another user of this computer or connection ([pckey]) is banned from playing here. The ban reason is:\n[reason]\nThis ban was applied by [ackey] on [bantime].[expires]" diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index b155ddc13dd..051f450179b 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -9,15 +9,17 @@ var/global/nologevent = 0 if(C.prefs && !(C.prefs.toggles & CHAT_NO_ADMINLOGS)) to_chat(C, msg) -/proc/msg_admin_attack(var/text) //Toggleable Attack Messages +/proc/msg_admin_attack(var/text, var/loglevel) if(!nologevent) var/rendered = "ATTACK: [text]" for(var/client/C in admins) if(R_ADMIN & C.holder.rights) - if(C.prefs.toggles & CHAT_ATTACKLOGS) - if(!istype(C, /mob/living)) - var/msg = rendered - to_chat(C, msg) + if(C.prefs.atklog == ATKLOG_NONE) + continue + var/msg = rendered + if(C.prefs.atklog <= loglevel) + to_chat(C, msg) + /proc/message_adminTicket(var/msg) msg = "ADMIN TICKET: [msg]" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 80fbca96dac..72334496ea5 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -826,10 +826,10 @@ var/list/admin_verbs_ticket = list( if(!istype(H)) if(istype(H, /mob/living/carbon/brain)) var/mob/living/carbon/brain/B = H - if(istype(B.container, /obj/item/mmi/posibrain/ipc)) - var/obj/item/mmi/posibrain/ipc/C = B.container + if(istype(B.container, /obj/item/mmi/robotic_brain/positronic)) + var/obj/item/mmi/robotic_brain/positronic/C = B.container var/obj/item/organ/internal/brain/mmi_holder/posibrain/P = C.loc - if(istype(P.owner, /mob/living/carbon/human)) + if(ishuman(P.owner)) H = P.owner else return @@ -852,10 +852,10 @@ var/list/admin_verbs_ticket = list( if(!istype(H)) if(istype(H, /mob/living/carbon/brain)) var/mob/living/carbon/brain/B = H - if(istype(B.container, /obj/item/mmi/posibrain/ipc)) - var/obj/item/mmi/posibrain/ipc/C = B.container + if(istype(B.container, /obj/item/mmi/robotic_brain/positronic)) + var/obj/item/mmi/robotic_brain/positronic/C = B.container var/obj/item/organ/internal/brain/mmi_holder/posibrain/P = C.loc - if(istype(P.owner, /mob/living/carbon/human)) + if(ishuman(P.owner)) H = P.owner else return @@ -868,10 +868,10 @@ var/list/admin_verbs_ticket = list( switch(alert("Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel")) if("Yes") - admin_log_and_message_admins("has allowed [H] to change \his appearance, without whitelisting of races.") + admin_log_and_message_admins("has allowed [H] to change [H.p_their()] appearance, without whitelisting of races.") H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 0) if("No") - admin_log_and_message_admins("has allowed [H] to change \his appearance, with whitelisting of races.") + admin_log_and_message_admins("has allowed [H] to change [H.p_their()] appearance, with whitelisting of races.") H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 1) feedback_add_details("admin_verb","CMAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -902,12 +902,27 @@ var/list/admin_verbs_ticket = list( if(!check_rights(R_ADMIN)) return - prefs.toggles ^= CHAT_ATTACKLOGS - prefs.save_preferences(src) - if(prefs.toggles & CHAT_ATTACKLOGS) - to_chat(usr, "You now will get attack log messages") + if(prefs.atklog == ATKLOG_ALL) + prefs.atklog = ATKLOG_ALMOSTALL + to_chat(usr, "Your attack logs preference is now: show ALMOST ALL attack logs (notable exceptions: NPCs attacking other NPCs, vampire bites, equipping/stripping, people pushing each other over)") + else if(prefs.atklog == ATKLOG_ALMOSTALL) + prefs.atklog = ATKLOG_MOST + to_chat(usr, "Your attack logs preference is now: show MOST attack logs (like ALMOST ALL, except that it also hides attacks by players on NPCs)") + else if(prefs.atklog == ATKLOG_MOST) + prefs.atklog = ATKLOG_FEW + to_chat(usr, "Your attack logs preference is now: show FEW attack logs (only the most important stuff: attacks on SSDs, use of explosives, messing with the engine, gibbing, AI wiping, forcefeeding, acid sprays, and organ extraction)") + else if(prefs.atklog == ATKLOG_FEW) + prefs.atklog = ATKLOG_NONE + to_chat(usr, "Your attack logs preference is now: show NO attack logs") + else if(prefs.atklog == ATKLOG_NONE) + prefs.atklog = ATKLOG_ALL + to_chat(usr, "Your attack logs preference is now: show ALL attack logs") else - to_chat(usr, "You now won't get attack log messages") + prefs.atklog = ATKLOG_ALL + to_chat(usr, "Your attack logs preference is now: show ALL attack logs (your preference was set to an invalid value, it has been reset)") + + prefs.save_preferences(src) + /client/proc/toggleadminlogs() set name = "Toggle Admin Log Messages" diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 21731cc8b7a..fe487ae6431 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -25,8 +25,6 @@ Show current traitors and objectives
Set Night Shift Mode
Bombs
- Bombing List   - Remove all bombs currently in existence [check_rights(R_SERVER, 0) ? "  Toggle bomb cap
" : "
"] Lists
Show last [length(lastsignalers)] signalers   @@ -82,7 +80,6 @@ Security Level - Delta
Create Weather
Weather - Ash Storm   - Weather - Advanced Darkness  
"} @@ -130,5 +127,3 @@ var/datum/browser/popup = new(usr, "secrets", "
Admin Secrets
", 630, 670) popup.set_content(dat) popup.open(0) - - diff --git a/code/modules/admin/tickets/admintickets.dm b/code/modules/admin/tickets/admintickets.dm index 5ef1f58dbf5..ea5f7003870 100644 --- a/code/modules/admin/tickets/admintickets.dm +++ b/code/modules/admin/tickets/admintickets.dm @@ -104,7 +104,7 @@ var/global/datum/adminTicketHolder/globAdminTicketHolder = new /datum/adminTicke /datum/adminTicketHolder/proc/checkForTicket(var/client/C) var/list/tickets = list() for(var/datum/admin_ticket/T in allTickets) - if(T.clientName == C && T.ticketState == ADMIN_TICKET_OPEN || T.ticketState == ADMIN_TICKET_STALE) + if(T.clientName == C && (T.ticketState == ADMIN_TICKET_OPEN || T.ticketState == ADMIN_TICKET_STALE)) tickets += T if(tickets.len) return tickets diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index bc5f67d49a8..abfc807f9df 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -39,35 +39,35 @@ switch(href_list["makeAntag"]) if("1") log_admin("[key_name(usr)] has spawned a traitor.") - if(!src.makeTraitors()) + if(!makeTraitors()) to_chat(usr, "Unfortunately there weren't enough candidates available.") if("2") log_admin("[key_name(usr)] has spawned a changeling.") - if(!src.makeChanglings()) + if(!makeChangelings()) to_chat(usr, "Unfortunately there weren't enough candidates available.") if("3") log_admin("[key_name(usr)] has spawned revolutionaries.") - if(!src.makeRevs()) + if(!makeRevs()) to_chat(usr, "Unfortunately there weren't enough candidates available.") if("4") log_admin("[key_name(usr)] has spawned a cultists.") - if(!src.makeCult()) + if(!makeCult()) to_chat(usr, "Unfortunately there weren't enough candidates available.") if("5") log_admin("[key_name(usr)] has spawned a wizard.") - if(!src.makeWizard()) + if(!makeWizard()) to_chat(usr, "Unfortunately there weren't enough candidates available.") if("6") log_admin("[key_name(usr)] has spawned vampires.") - if(!src.makeVampires()) + if(!makeVampires()) to_chat(usr, "Unfortunately there weren't enough candidates available.") if("7") log_admin("[key_name(usr)] has spawned vox raiders.") - if(!src.makeVoxRaiders()) + if(!makeVoxRaiders()) to_chat(usr, "Unfortunately there weren't enough candidates available.") if("8") log_admin("[key_name(usr)] has spawned an abductor team.") - if(!src.makeAbductorTeam()) + if(!makeAbductorTeam()) to_chat(usr, "Unfortunately there weren't enough candidates available.") else if(href_list["dbsearchckey"] || href_list["dbsearchadmin"] || href_list["dbsearchip"] || href_list["dbsearchcid"] || href_list["dbsearchbantype"]) @@ -1622,14 +1622,14 @@ H.equip_to_slot_or_del( new /obj/item/reagent_containers/food/snacks/cookie(H), slot_r_hand ) if(!(istype(H.r_hand,/obj/item/reagent_containers/food/snacks/cookie))) log_admin("[key_name(H)] has their hands full, so they did not receive their cookie, spawned by [key_name(src.owner)].") - message_admins("[key_name_admin(H)] has their hands full, so they did not receive their cookie, spawned by [key_name_admin(src.owner)].") + message_admins("[key_name_admin(H)] has [H.p_their()] hands full, so [H.p_they()] did not receive [H.p_their()] cookie, spawned by [key_name_admin(src.owner)].") return else H.update_inv_r_hand()//To ensure the icon appears in the HUD else H.update_inv_l_hand() log_admin("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]") - message_admins("[key_name_admin(H)] got their cookie, spawned by [key_name_admin(src.owner)]") + message_admins("[key_name_admin(H)] got [H.p_their()] cookie, spawned by [key_name_admin(src.owner)]") feedback_inc("admin_cookies_spawned",1) to_chat(H, "Your prayers have been answered!! You received the best cookie!") @@ -1683,7 +1683,7 @@ to_chat(usr, "The person you are trying to contact is not wearing a headset") return - var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from Centcomm", "") + var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via [H.p_their()] headset.","Outgoing message from Centcomm", "") if(!input) return to_chat(src.owner, "You sent [input] to [H] via a secure channel.") @@ -2045,7 +2045,7 @@ if(!istype(H.l_ear, /obj/item/radio/headset) && !istype(H.r_ear, /obj/item/radio/headset)) to_chat(usr, "The person you are trying to contact is not wearing a headset") return - var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from The Syndicate", "") + var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via [H.p_their()] headset.","Outgoing message from The Syndicate", "") if(!input) return to_chat(src.owner, "You sent [input] to [H] via a secure channel.") @@ -2061,7 +2061,7 @@ to_chat(usr, "The person you are trying to contact is not wearing a headset") return - var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from HONKplanet", "") + var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via [H.p_their()] headset.","Outgoing message from HONKplanet", "") if(!input) return to_chat(src.owner, "You sent [input] to [H] via a secure channel.") @@ -2727,48 +2727,6 @@ for(var/mob/M in player_list) if(M.stat != 2) M.show_message(text("The chilling wind suddenly stops..."), 1) -/* if("shockwave") - ok = 1 - to_chat(world, "ALERT: STATION STRESS CRITICAL") - sleep(60) - to_chat(world, "ALERT: STATION STRESS CRITICAL. TOLERABLE LEVELS EXCEEDED!") - sleep(80) - to_chat(world, "ALERT: STATION STRUCTURAL STRESS CRITICAL. SAFETY MECHANISMS FAILED!") - sleep(40) - for(var/mob/M in world) - shake_camera(M, 400, 1) - for(var/obj/structure/window/W in world) - spawn(0) - sleep(rand(10,400)) - W.ex_act(rand(2,1)) - for(var/obj/structure/grille/G in world) - spawn(0) - sleep(rand(20,400)) - G.ex_act(rand(2,1)) - for(var/obj/machinery/door/D in world) - spawn(0) - sleep(rand(20,400)) - D.ex_act(rand(2,1)) - for(var/turf/station/floor/Floor in world) - spawn(0) - sleep(rand(30,400)) - Floor.ex_act(rand(2,1)) - for(var/obj/structure/cable/Cable in world) - spawn(0) - sleep(rand(30,400)) - Cable.ex_act(rand(2,1)) - for(var/obj/structure/closet/Closet in world) - spawn(0) - sleep(rand(30,400)) - Closet.ex_act(rand(2,1)) - for(var/obj/machinery/Machinery in world) - spawn(0) - sleep(rand(30,400)) - Machinery.ex_act(rand(1,3)) - for(var/turf/station/wall/Wall in world) - spawn(0) - sleep(rand(30,400)) - Wall.ex_act(rand(2,1)) */ if("lightout") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","LO") @@ -2793,7 +2751,7 @@ var/sure = alert(usr, "Are you sure you want to do this?", "Confirmation", "Yes", "No") if(sure == "No") return - weather_master.run_weather("the floor is lava") + SSweather.run_weather(/datum/weather/floor_is_lava) message_admins("[key_name_admin(usr)] made the floor lava") if("fakelava") feedback_inc("admin_secrets_fun_used", 1) @@ -2801,7 +2759,7 @@ var/sure = alert(usr, "Are you sure you want to do this?", "Confirmation", "Yes", "No") if(sure == "No") return - weather_master.run_weather("fake lava") + SSweather.run_weather(/datum/weather/floor_is_lava/fake) message_admins("[key_name_admin(usr)] made aesthetic lava on the floor") if("weatherashstorm") feedback_inc("admin_secrets_fun_used", 1) @@ -2809,16 +2767,8 @@ var/sure = alert(usr, "Are you sure you want to do this?", "Confirmation", "Yes", "No") if(sure == "No") return - weather_master.run_weather("ash storm") + SSweather.run_weather(/datum/weather/ash_storm) message_admins("[key_name_admin(usr)] spawned an ash storm on the mining asteroid") - if("weatherdarkness") - feedback_inc("admin_secrets_fun_used", 1) - feedback_add_details("admin_secrets_fun_used", "WD") - var/sure = alert(usr, "Are you sure you want to do this?", "Confirmation", "Yes", "No") - if(sure == "No") - return - weather_master.run_weather("advanced darkness") - message_admins("[key_name_admin(usr)] made the station go through advanced darkness") if("retardify") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","RET") @@ -2957,13 +2907,6 @@ var/ok = 0 switch(href_list["secretsadmin"]) - if("clear_bombs") - //I do nothing - if("list_bombers") - var/dat = "Bombing List
" - for(var/l in bombers) - dat += text("[l]
") - usr << browse(dat, "window=bombers") if("list_signalers") var/dat = "Showing last [length(lastsignalers)] signalers.
" for(var/sig in lastsignalers) @@ -3432,7 +3375,7 @@ to_chat(hunter_mob, "ATTENTION: You are now on a mission!") to_chat(hunter_mob, "Goal: [killthem ? "MURDER" : "PROTECT"] [H.real_name], currently in [get_area(H.loc)]. "); if(killthem) - to_chat(hunter_mob, "If you kill them, they cannot be revived."); + to_chat(hunter_mob, "If you kill [H.p_them()], [H.p_they()] cannot be revived."); hunter_mob.mind.special_role = SPECIAL_ROLE_TRAITOR var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_TRAITOR] tatorhud.join_hud(hunter_mob) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 2533eab0570..600a53d81eb 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -183,6 +183,8 @@ if(check_rights(R_ADMIN|R_MOD, 0, X.mob)) to_chat(X, "[type]: [key_name(src, TRUE, type)]->[key_name(C, TRUE, type)]: [emoji_msg]") + if(type == "Mentorhelp") + return //Check if the mob being PM'd has any open admin tickets. var/tickets = list() tickets = globAdminTicketHolder.checkForTicket(C) diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index f091e49f60e..2a0f78351e4 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -12,6 +12,7 @@ if(check_rights(R_ADMIN,0)) for(var/client/C in admins) if(R_ADMIN & C.holder.rights) + msg = "[msg]" to_chat(C, "ADMIN: [key_name(usr, 1)] ([admin_jump_link(mob)]): [msg]") feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -38,6 +39,7 @@ display_name = "[holder.fakekey]/([key])" else display_name = holder.fakekey + msg = "[msg]" to_chat(C, "MENTOR: [display_name] ([admin_jump_link(mob)]): [msg]") feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 00966ee31fc..682a174c450 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -266,7 +266,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that if(!choice) return 0 if(!istype(choice, /mob/dead/observer)) - var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No") + var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank [choice.p_them()] out of [choice.p_their()] body and place [choice.p_them()] in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No") if(confirm != "Yes") return 0 var/obj/item/paicard/card = new(T) diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 9b6c4363008..a87308bb9b1 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -92,7 +92,7 @@ var/intercom_range_display_status = 0 if(!(locate(/obj/structure/grille,T))) var/window_check = 0 for(var/obj/structure/window/W in T) - if(W.dir == turn(C1.dir,180) || W.is_fulltile() ) + if(W.dir == turn(C1.dir,180) || W.fulltile) window_check = 1 break if(!window_check) diff --git a/code/modules/admin/verbs/modifyvariables.dm b/code/modules/admin/verbs/modifyvariables.dm index dfca07426c5..c1e28a48f8d 100644 --- a/code/modules/admin/verbs/modifyvariables.dm +++ b/code/modules/admin/verbs/modifyvariables.dm @@ -46,6 +46,8 @@ var/list/VVpixelmovement = list("step_x", "step_y", "step_size", "bound_height", else if(isfile(var_value)) . = VV_FILE + else if(istype(var_value, /regex)) + . = VV_REGEX else . = VV_NULL @@ -66,6 +68,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "step_size", "bound_height", VV_DATUM_TYPE, VV_TYPE, VV_MATRIX, + VV_REGEX, VV_FILE, VV_NEW_ATOM, VV_NEW_DATUM, @@ -141,6 +144,14 @@ var/list/VVpixelmovement = list("step_x", "step_y", "step_size", "bound_height", .["class"] = null return + if(VV_REGEX) + var/reg = input("Enter regex", "Regex", "") as null|text + if(!reg) + return + .["value"] = regex(reg) + if(.["value"] == null) + .["class"] = null + if(VV_ATOM_REFERENCE) var/type = pick_closest_path(FALSE) diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index b3f0a1a15a8..5c8e1c77745 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -25,6 +25,22 @@ client/proc/one_click_antag() usr << browse(dat, "window=oneclickantag;size=400x400") return +/datum/admins/proc/CandCheck(var/role = null, var/mob/living/carbon/human/M, var/datum/game_mode/temp = null) + // You pass in ROLE define (optional), the applicant, and the gamemode, and it will return true / false depending on whether the applicant qualify for the candidacy in question + if(jobban_isbanned(M, "Syndicate")) + return FALSE + if(M.stat || !M.mind || M.mind.special_role) + return FALSE + if(temp) + if(M.mind.assigned_role in temp.restricted_jobs || M.client.prefs.species in temp.protected_species) + return FALSE + if(role) // Don't even bother evaluating if there's no role + if(player_old_enough_antag(M.client,role) && (role in M.client.prefs.be_special) && (!jobban_isbanned(M, role))) + return TRUE + else + return FALSE + else + return TRUE /datum/admins/proc/makeTraitors() var/datum/game_mode/traitor/temp = new @@ -35,35 +51,29 @@ client/proc/one_click_antag() var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null - log_admin("[key_name(owner)] tried making Traitors with One-Click-Antag") - message_admins("[key_name_admin(owner)] tried making Traitors with One-Click-Antag") + var/antnum = input(owner, "How many traitors you want to create? Enter 0 to cancel","Amount:", 0) as num + if(!antnum || antnum <= 0) + return + log_admin("[key_name(owner)] tried making [antnum] traitors with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making [antnum] traitors with One-Click-Antag") for(var/mob/living/carbon/human/applicant in player_list) - if(ROLE_TRAITOR in applicant.client.prefs.be_special) - if(player_old_enough_antag(applicant.client,ROLE_TRAITOR)) - if(!applicant.stat) - if(applicant.mind) - if(!applicant.mind.special_role) - if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.mind.assigned_role in temp.restricted_jobs)) - if(!(applicant.client.prefs.species in temp.protected_species)) - candidates += applicant + if(CandCheck(ROLE_TRAITOR, applicant, temp)) + candidates += applicant if(candidates.len) - var/numTratiors = min(candidates.len, 3) + var/numTraitors = min(candidates.len, antnum) - for(var/i = 0, i300)//If more than 30 game seconds passed. + //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. + for(var/mob/G in respawnable_list) + if(!jobban_isbanned(G, "Syndicate")) + spawn(0) + switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No")) + if("Yes") + if((world.time-time_passed)>300)//If more than 30 game seconds passed. + return + candidates += G + if("No") return - candidates += G - if("No") - return - else - return - sleep(300) + else + return + sleep(300) - for(var/mob/dead/observer/G in candidates) - if(!G.key) - candidates.Remove(G) + for(var/mob/dead/observer/G in candidates) + if(!G.key) + candidates.Remove(G) - if(candidates.len) - var/numagents = 6 - //Spawns commandos and equips them. - for(var/obj/effect/landmark/L in /area/syndicate_mothership/elite_squad) - if(numagents<=0) - break - if(L.name == "Syndicate-Commando") - syndicate_leader_selected = numagents == 1?1:0 - - var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected) - - - while((!theghost || !theghost.client) && candidates.len) - theghost = pick(candidates) - candidates.Remove(theghost) - - if(!theghost) - qdel(new_syndicate_commando) + if(candidates.len) + //Spawns commandos and equips them. + for(var/obj/effect/landmark/L in /area/syndicate_mothership/elite_squad) + if(antnum <= 0) break + if(L.name == "Syndicate-Commando") + syndicate_leader_selected = antnum == 1?1:0 - new_syndicate_commando.key = theghost.key - new_syndicate_commando.internal = new_syndicate_commando.s_store - new_syndicate_commando.update_action_buttons_icon() + var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected) - //So they don't forget their code or mission. + while((!theghost || !theghost.client) && candidates.len) + theghost = pick(candidates) + candidates.Remove(theghost) + + if(!theghost) + qdel(new_syndicate_commando) + break + + new_syndicate_commando.key = theghost.key + new_syndicate_commando.internal = new_syndicate_commando.s_store + new_syndicate_commando.update_action_buttons_icon() + + //So they don't forget their code or mission. - to_chat(new_syndicate_commando, "You are an Elite Syndicate. [!syndicate_leader_selected ? "commando" : "LEADER"] in the service of the Syndicate. \nYour current mission is: [input]") + to_chat(new_syndicate_commando, "You are an Elite Syndicate. [!syndicate_leader_selected ? "commando" : "LEADER"] in the service of the Syndicate. \nYour current mission is: [input]") - numagents-- - if(numagents >= 6) - return 0 - - for(var/obj/effect/landmark/L in /area/shuttle/syndicate_elite) - if(L.name == "Syndicate-Commando-Bomb") - new /obj/effect/spawner/newbomb/timer/syndicate(L.loc) + antnum-- + for(var/obj/effect/landmark/L in /area/shuttle/syndicate_elite) + if(L.name == "Syndicate-Commando-Bomb") + new /obj/effect/spawner/newbomb/timer/syndicate(L.loc) return 1 @@ -429,10 +431,12 @@ client/proc/one_click_antag() var/leader_chosen = 0 //when the leader is chosen. The last person spawned. + var/antnum = input(owner, "How many raiders you want to create? Enter 0 to cancel.","Amount:", 0) as num + if(!antnum || antnum <= 0) + return log_admin("[key_name(owner)] tried making Vox Raiders with One-Click-Antag") message_admins("[key_name_admin(owner)] tried making Vox Raiders with One-Click-Antag") - - //Generates a list of candidates from active ghosts. +//Generates a list of candidates from active ghosts. for(var/mob/G in respawnable_list) if(istype(G) && G.client && (ROLE_RAIDER in G.client.prefs.be_special)) if(player_old_enough_antag(G.client,ROLE_RAIDER)) @@ -455,8 +459,7 @@ client/proc/one_click_antag() candidates.Remove(G) if(candidates.len) - var/max_raiders = 1 - var/raiders = max_raiders + var/raiders = min(antnum, candidates.len) //Spawns vox raiders and equips them. for(var/obj/effect/landmark/L in world) if(L.name == "voxstart") @@ -480,8 +483,6 @@ client/proc/one_click_antag() to_chat(new_vox, "Don't forget to turn on your nitrogen internals!") raiders-- - if(raiders > max_raiders) - return 0 else return 0 return 1 @@ -534,32 +535,26 @@ client/proc/one_click_antag() var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null + var/antnum = input(owner, "How many vampires you want to create? Enter 0 to cancel","Amount:", 0) as num + if(!antnum || antnum <= 0) + return + log_admin("[key_name(owner)] tried making Vampires with One-Click-Antag") message_admins("[key_name_admin(owner)] tried making Vampires with One-Click-Antag") for(var/mob/living/carbon/human/applicant in player_list) - if(ROLE_VAMPIRE in applicant.client.prefs.be_special) - if(player_old_enough_antag(applicant.client,ROLE_VAMPIRE)) - if(!applicant.stat) - if(applicant.mind) - if(!applicant.mind.special_role) - if(!jobban_isbanned(applicant, "vampire") && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.job in temp.restricted_jobs)) - if(!(applicant.client.prefs.species in temp.protected_species)) - candidates += applicant + if(CandCheck(ROLE_VAMPIRE, applicant, temp)) + candidates += applicant if(candidates.len) - var/numVampires = min(candidates.len, 3) + var/numVampires = min(candidates.len, antnum) for(var/i = 0, iNobody volunteered to join the DeathSquad.
") return @@ -47,53 +47,62 @@ var/global/sent_strike_team = 0 // Spawns commandos and equips them. var/commando_number = commandos_possible //for selecting a leader var/is_leader = TRUE // set to FALSE after leader is spawned + for(var/obj/effect/landmark/L in landmarks_list) - if(commando_number<=0) break + + if(commando_number <= 0) + break + if(L.name == "Commando") - spawn(0) - var/use_ds_borg = FALSE - var/ghost_key // Ghost ckey that we intend to put into the commando. Can remain undefined if we don't have one. - if(commando_ckeys.len) - ghost_key = pick(commando_ckeys) - commando_ckeys -= ghost_key - if(!is_leader) - var/new_gender = alert(src, "Select Deathsquad Type.", "DS Character Generation", "Organic", "Cyborg") - if(new_gender == "Cyborg") - use_ds_borg = TRUE + if(!commando_ghosts.len) + break - if(use_ds_borg) - var/mob/living/silicon/robot/deathsquad/R = new() - R.forceMove(get_turf(L)) - var/rnum = rand(1,1000) - var/borgname = "Epsilon [rnum]" - R.name = borgname - R.custom_name = borgname - R.real_name = R.name - R.mind = new - R.mind.current = R - R.mind.original = R - R.mind.assigned_role = SPECIAL_ROLE_DEATHSQUAD - R.mind.special_role = SPECIAL_ROLE_DEATHSQUAD - if(!(R.mind in ticker.minds)) - ticker.minds += R.mind - ticker.mode.traitors += R.mind - if(ghost_key) - R.key = ghost_key - if(nuke_code) - R.mind.store_memory("Nuke Code: [nuke_code].") - R.mind.store_memory("Mission: [input].") - to_chat(R, "You are a Special Operations cyborg, in the service of Central Command. \nYour current mission is: [input]") - else - var/mob/living/carbon/human/new_commando = create_death_commando(L, is_leader) - if(ghost_key) - new_commando.key = ghost_key - new_commando.internal = new_commando.s_store - new_commando.update_action_buttons_icon() - if(nuke_code) - new_commando.mind.store_memory("Nuke Code: [nuke_code].") - new_commando.mind.store_memory("Mission: [input].") - to_chat(new_commando, "You are a Special Ops [is_leader ? "TEAM LEADER" : "commando"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: [input]") + var/use_ds_borg = FALSE + var/mob/ghost_mob = pick(commando_ghosts) + commando_ghosts -= ghost_mob + if(!ghost_mob || !ghost_mob.key || !ghost_mob.client) + continue + + if(!is_leader) + var/new_dstype = alert(ghost_mob.client, "Select Deathsquad Type.", "DS Character Generation", "Organic", "Cyborg") + if(new_dstype == "Cyborg") + use_ds_borg = TRUE + + if(!ghost_mob || !ghost_mob.key || !ghost_mob.client) // Have to re-check this due to the above alert() call + continue + + if(use_ds_borg) + var/mob/living/silicon/robot/deathsquad/R = new() + R.forceMove(get_turf(L)) + var/rnum = rand(1,1000) + var/borgname = "Epsilon [rnum]" + R.name = borgname + R.custom_name = borgname + R.real_name = R.name + R.mind = new + R.mind.current = R + R.mind.original = R + R.mind.assigned_role = SPECIAL_ROLE_DEATHSQUAD + R.mind.special_role = SPECIAL_ROLE_DEATHSQUAD + if(!(R.mind in ticker.minds)) + ticker.minds += R.mind + ticker.mode.traitors += R.mind + R.key = ghost_mob.key + if(nuke_code) + R.mind.store_memory("Nuke Code: [nuke_code].") + R.mind.store_memory("Mission: [input].") + to_chat(R, "You are a Special Operations cyborg, in the service of Central Command. \nYour current mission is: [input]") + else + var/mob/living/carbon/human/new_commando = create_death_commando(L, is_leader) + new_commando.mind.key = ghost_mob.key + new_commando.key = ghost_mob.key + new_commando.internal = new_commando.s_store + new_commando.update_action_buttons_icon() + if(nuke_code) + new_commando.mind.store_memory("Nuke Code: [nuke_code].") + new_commando.mind.store_memory("Mission: [input].") + to_chat(new_commando, "You are a Special Ops [is_leader ? "TEAM LEADER" : "commando"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: [input]") is_leader = FALSE commando_number-- @@ -133,6 +142,7 @@ var/global/sent_strike_team = 0 A.real_name = "[commando_rank] [commando_name]" A.copy_to(new_commando) + new_commando.dna.ready_dna(new_commando)//Creates DNA. //Creates mind stuff. diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index ec31632208e..c5f46c98592 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -45,8 +45,8 @@ var/global/sent_syndicate_strike_team = 0 break // Find ghosts willing to be SST - var/list/commando_ckeys = pollCandidatesByKeyWithVeto(src, usr, syndicate_commandos_possible, "Join the Syndicate Strike Team?",, 21, 600, 1, role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE) - if(!commando_ckeys.len) + var/list/commando_ghosts = pollCandidatesWithVeto(src, usr, syndicate_commandos_possible, "Join the Syndicate Strike Team?",, 21, 600, 1, role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE) + if(!commando_ghosts.len) to_chat(usr, "Nobody volunteered to join the SST.") return @@ -54,15 +54,29 @@ var/global/sent_syndicate_strike_team = 0 //Spawns commandos and equips them. for(var/obj/effect/landmark/L in landmarks_list) - if(syndicate_commando_number<=0) break + + if(syndicate_commando_number <= 0) + break + if(L.name == "Syndicate-Commando") + + if(!commando_ghosts.len) + break + + var/mob/ghost_mob = pick(commando_ghosts) + commando_ghosts -= ghost_mob + + if(!ghost_mob || !ghost_mob.key || !ghost_mob.client) + continue + var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, is_leader) - if(commando_ckeys.len) - new_syndicate_commando.key = pick(commando_ckeys) - commando_ckeys -= new_syndicate_commando.key - new_syndicate_commando.internal = new_syndicate_commando.s_store - new_syndicate_commando.update_action_buttons_icon() + if(!new_syndicate_commando) + continue + + new_syndicate_commando.key = ghost_mob.key + new_syndicate_commando.internal = new_syndicate_commando.s_store + new_syndicate_commando.update_action_buttons_icon() //So they don't forget their code or mission. if(nuke_code) diff --git a/code/modules/alarm/alarm.dm b/code/modules/alarm/alarm.dm index ac8b65d9d82..1d4a570999a 100644 --- a/code/modules/alarm/alarm.dm +++ b/code/modules/alarm/alarm.dm @@ -134,5 +134,3 @@ /mob/living/silicon/robot/syndicate/get_alarm_cameras() return list() - -#undef ALARM_LOSS_DELAY diff --git a/code/datums/antagonists/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm similarity index 100% rename from code/datums/antagonists/antag_datum.dm rename to code/modules/antagonists/_common/antag_datum.dm diff --git a/code/datums/antagonists/antag_helpers.dm b/code/modules/antagonists/_common/antag_helpers.dm similarity index 100% rename from code/datums/antagonists/antag_helpers.dm rename to code/modules/antagonists/_common/antag_helpers.dm diff --git a/code/datums/antagonists/antag_hud.dm b/code/modules/antagonists/_common/antag_hud.dm similarity index 100% rename from code/datums/antagonists/antag_hud.dm rename to code/modules/antagonists/_common/antag_hud.dm diff --git a/code/datums/antagonists/antag_spawner.dm b/code/modules/antagonists/_common/antag_spawner.dm similarity index 100% rename from code/datums/antagonists/antag_spawner.dm rename to code/modules/antagonists/_common/antag_spawner.dm diff --git a/code/datums/antagonists/antag_team.dm b/code/modules/antagonists/_common/antag_team.dm similarity index 100% rename from code/datums/antagonists/antag_team.dm rename to code/modules/antagonists/_common/antag_team.dm diff --git a/code/modules/antagonists/wishgranter/wishgranter.dm b/code/modules/antagonists/wishgranter/wishgranter.dm new file mode 100644 index 00000000000..54d12867ac1 --- /dev/null +++ b/code/modules/antagonists/wishgranter/wishgranter.dm @@ -0,0 +1,81 @@ +/datum/antagonist/wishgranter + name = "Wishgranter Avatar" + +/datum/antagonist/wishgranter/proc/forge_objectives() + var/datum/objective/hijack/hijack = new + hijack.owner = owner + objectives += hijack + owner.objectives |= objectives + +/datum/antagonist/wishgranter/on_gain() + owner.special_role = "Avatar of the Wish Granter" + forge_objectives() + . = ..() + give_powers() + +/datum/antagonist/wishgranter/greet() + to_chat(owner.current, "Your inhibitions are swept away, the bonds of loyalty broken, you are free to murder as you please!") + owner.announce_objectives() + +/datum/antagonist/wishgranter/proc/give_powers() + var/mob/living/carbon/human/H = owner.current + if(!istype(H)) + return + H.ignore_gene_stability = TRUE + H.dna.SetSEState(HULKBLOCK, TRUE) + genemutcheck(H, HULKBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(XRAYBLOCK, TRUE) + genemutcheck(H, XRAYBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(FIREBLOCK, TRUE) + genemutcheck(H, FIREBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(COLDBLOCK, TRUE) + genemutcheck(H, COLDBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(TELEBLOCK, TRUE) + genemutcheck(H, TELEBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(INCREASERUNBLOCK, TRUE) + genemutcheck(H, INCREASERUNBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(BREATHLESSBLOCK, TRUE) + genemutcheck(H, BREATHLESSBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(REGENERATEBLOCK, TRUE) + genemutcheck(H, REGENERATEBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(SHOCKIMMUNITYBLOCK, TRUE) + genemutcheck(H, SHOCKIMMUNITYBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(SMALLSIZEBLOCK, TRUE) + genemutcheck(H, SMALLSIZEBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(SOBERBLOCK, TRUE) + genemutcheck(H, SOBERBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(PSYRESISTBLOCK, TRUE) + genemutcheck(H, PSYRESISTBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(SHADOWBLOCK, TRUE) + genemutcheck(H, SHADOWBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(CRYOBLOCK, TRUE) + genemutcheck(H, CRYOBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(EATBLOCK, TRUE) + genemutcheck(H, EATBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(JUMPBLOCK, TRUE) + genemutcheck(H, JUMPBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(SUPERFARTBLOCK, TRUE) + genemutcheck(H, SUPERFARTBLOCK, null, MUTCHK_FORCED) + + H.dna.SetSEState(IMMOLATEBLOCK, TRUE) + genemutcheck(H, IMMOLATEBLOCK, null, MUTCHK_FORCED) + + H.mutations.Add(LASER) + H.update_mutations() + H.update_body() \ No newline at end of file diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index e5f1cb10525..763152cc5cf 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -45,13 +45,13 @@ if((istype(W, /obj/item/weldingtool) && W:welding)) if(!status) status = 1 - bombers += "[key_name(user)] welded a single tank bomb. Temperature: [bombtank.air_contents.temperature-T0C]" - msg_admin_attack("[key_name_admin(user)] welded a single tank bomb. Temperature: [bombtank.air_contents.temperature-T0C]") + investigate_log("[key_name(user)] welded a single tank bomb. Temperature: [bombtank.air_contents.temperature-T0C]", INVESTIGATE_BOMB) + msg_admin_attack("[key_name_admin(user)] welded a single tank bomb. Temperature: [bombtank.air_contents.temperature-T0C]", ATKLOG_FEW) log_game("[key_name(user)] welded a single tank bomb. Temperature: [bombtank.air_contents.temperature - T0C]") to_chat(user, "A pressure hole has been bored to [bombtank] valve. \The [bombtank] can now be ignited.") else status = 0 - bombers += "[key_name(user)] unwelded a single tank bomb. Temperature: [bombtank.air_contents.temperature-T0C]" + investigate_log("[key_name(user)] unwelded a single tank bomb. Temperature: [bombtank.air_contents.temperature-T0C]", INVESTIGATE_BOMB) to_chat(user, "The hole has been closed.") add_fingerprint(user) ..() diff --git a/code/modules/assembly/igniter.dm b/code/modules/assembly/igniter.dm index 08601522c5e..785e4549a47 100644 --- a/code/modules/assembly/igniter.dm +++ b/code/modules/assembly/igniter.dm @@ -28,7 +28,7 @@ if(istype(src.loc.loc, /obj/structure/reagent_dispensers/fueltank/)) var/obj/structure/reagent_dispensers/fueltank/tank = src.loc.loc if(tank) - tank.boom() + tank.boom(TRUE) if(istype(src.loc.loc, /obj/item/reagent_containers/glass/beaker/)) var/obj/item/reagent_containers/glass/beaker/beakerbomb = src.loc.loc if(beakerbomb) @@ -41,4 +41,4 @@ /obj/item/assembly/igniter/attack_self(mob/user as mob) activate() add_fingerprint(user) - return \ No newline at end of file + return diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 6bcefc6027c..5d6aa7490e2 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -75,7 +75,7 @@ if(!user.hand) which_hand = "r_hand" triggered(user, which_hand) - user.visible_message("[user] accidentally sets off [src], breaking their fingers.", \ + user.visible_message("[user] accidentally sets off [src], breaking [user.p_their()] fingers.", \ "You accidentally trigger [src]!") return to_chat(user, "You disarm [src].") @@ -91,7 +91,7 @@ if(!user.hand) which_hand = "r_hand" triggered(user, which_hand) - user.visible_message("[user] accidentally sets off [src], breaking their fingers.", \ + user.visible_message("[user] accidentally sets off [src], breaking [user.p_their()] fingers.", \ "You accidentally trigger [src]!") return ..() @@ -114,7 +114,7 @@ on_found(mob/finder as mob) if(armed) - finder.visible_message("[finder] accidentally sets off [src], breaking their fingers.", \ + finder.visible_message("[finder] accidentally sets off [src], breaking [finder.p_their()] fingers.", \ "You accidentally trigger [src]!") triggered(finder, finder.hand ? "l_hand" : "r_hand") return 1 //end the search! diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index 5d8c0ed1e98..a585a689f2c 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -114,7 +114,7 @@ timing = !timing if(timing && istype(holder, /obj/item/transfer_valve)) message_admins("[key_name_admin(usr)] activated [src] attachment on [holder].") - bombers += "[key_name(usr)] activated [src] attachment for [loc]" + investigate_log("[key_name(usr)] activated [src] attachment for [loc]", INVESTIGATE_BOMB) log_game("[key_name(usr)] activated [src] attachment for [loc]") update_icon() if(href_list["reset"]) diff --git a/code/modules/awaymissions/mission_code/spacehotel.dm b/code/modules/awaymissions/mission_code/spacehotel.dm index 4e4f2628736..81d21df5dcf 100644 --- a/code/modules/awaymissions/mission_code/spacehotel.dm +++ b/code/modules/awaymissions/mission_code/spacehotel.dm @@ -299,6 +299,4 @@ return S.retal_target = target - S.retal = 1 - -#undef CHECKOUT_TIME + S.retal = 1 \ No newline at end of file diff --git a/code/modules/awaymissions/snpc.dm b/code/modules/awaymissions/snpc.dm index bd7046e3b2c..0b0de76ead3 100644 --- a/code/modules/awaymissions/snpc.dm +++ b/code/modules/awaymissions/snpc.dm @@ -18,8 +18,6 @@ ..() var/datum/data/pda/app/messenger/M = MYPDA.find_program(/datum/data/pda/app/messenger) M.toff = 1 - var/datum/data/pda/app/chatroom/C = MYPDA.find_program(/datum/data/pda/app/chatroom) - C.toff = 1 /mob/living/carbon/human/interactive/away/job2area() return away_area diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index d3dd6a5438b..471c1334bf8 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -246,6 +246,13 @@ proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE) "sig_low.gif" = 'icons/program_icons/sig_low.gif', "sig_lan.gif" = 'icons/program_icons/sig_lan.gif', "sig_none.gif" = 'icons/program_icons/sig_none.gif', + "smmon_0.gif" = 'icons/program_icons/smmon_0.gif', + "smmon_1.gif" = 'icons/program_icons/smmon_1.gif', + "smmon_2.gif" = 'icons/program_icons/smmon_2.gif', + "smmon_3.gif" = 'icons/program_icons/smmon_3.gif', + "smmon_4.gif" = 'icons/program_icons/smmon_4.gif', + "smmon_5.gif" = 'icons/program_icons/smmon_5.gif', + "smmon_6.gif" = 'icons/program_icons/smmon_6.gif', ) /datum/asset/nanoui diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index ad25c8fdeb1..0582b92be67 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -54,15 +54,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts return max(0, days - C.player_age) return 0 -//used for alternate_option -#define GET_RANDOM_JOB 0 -#define BE_CIVILIAN 1 -#define RETURN_TO_LOBBY 2 - #define MAX_SAVE_SLOTS 20 // Save slots for regular players #define MAX_SAVE_SLOTS_MEMBER 20 // Save slots for BYOND members - #define TAB_CHAR 0 #define TAB_GAME 1 #define TAB_GEAR 2 @@ -96,6 +90,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/UI_style_alpha = 255 var/windowflashing = TRUE var/clientfps = 0 + var/atklog = ATKLOG_ALL //ghostly preferences var/ghost_anonsay = 0 @@ -209,6 +204,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+") max_gear_slots = config.max_loadout_points + var/loaded_preferences_successfully = FALSE if(istype(C)) if(!IsGuestKey(C.key)) unlock_content = C.IsByondMember() @@ -217,16 +213,17 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(C.donator_level >= DONATOR_LEVEL_ONE) max_gear_slots += 5 - var/loaded_preferences_successfully = load_preferences(C) - if(loaded_preferences_successfully) - if(load_character(C)) - return + loaded_preferences_successfully = load_preferences(C) // Do not call this with no client/C, it generates a runtime / SQL error + if(loaded_preferences_successfully) + if(load_character(C)) + return //we couldn't load character data so just randomize the character appearance + name random_character() //let's create a random character then - rather than a fat, bald and naked man. real_name = random_name(gender) - if(!loaded_preferences_successfully) - save_preferences(C) - save_character(C) //let's save this new random character so it doesn't keep generating new ones. + if(istype(C)) + if(!loaded_preferences_successfully) + save_preferences(C) // Do not call this with no client/C, it generates a runtime / SQL error + save_character(C) // Do not call this with no client/C, it generates a runtime / SQL error /datum/preferences/proc/color_square(colour) return "___" @@ -372,21 +369,40 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/status = organ_data[name] var/organ_name = null switch(name) - if("chest") organ_name = "torso" - if("groin") organ_name = "lower body" - if("head") organ_name = "head" - if("l_arm") organ_name = "left arm" - if("r_arm") organ_name = "right arm" - if("l_leg") organ_name = "left leg" - if("r_leg") organ_name = "right leg" - if("l_foot") organ_name = "left foot" - if("r_foot") organ_name = "right foot" - if("l_hand") organ_name = "left hand" - if("r_hand") organ_name = "right hand" - if("heart") organ_name = "heart" - if("eyes") organ_name = "eyes" + if("chest") + organ_name = "torso" + if("groin") + organ_name = "lower body" + if("head") + organ_name = "head" + if("l_arm") + organ_name = "left arm" + if("r_arm") + organ_name = "right arm" + if("l_leg") + organ_name = "left leg" + if("r_leg") + organ_name = "right leg" + if("l_foot") + organ_name = "left foot" + if("r_foot") + organ_name = "right foot" + if("l_hand") + organ_name = "left hand" + if("r_hand") + organ_name = "right hand" + if("eyes") + organ_name = "eyes" + if("heart") + organ_name = "heart" + if("lungs") + organ_name = "lungs" + if("liver") + organ_name = "liver" + if("kidneys") + organ_name = "kidneys" - if(status in list("cyborg", "amputated", "mechanical", "assisted")) + if(status in list("cyborg", "amputated", "cybernetic")) ++ind if(ind > 1) dat += ", " @@ -398,14 +414,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts else R = basic_robolimb dat += "\t[R.company] [organ_name] prosthesis" - if("amputated") dat += "\tAmputated [organ_name]" - if("mechanical") dat += "\tMechanical [organ_name]" - if("assisted") - switch(organ_name) - if("heart") dat += "\tPacemaker-assisted [organ_name]" - if("voicebox") dat += "\tSurgically altered [organ_name]" - if("eyes") dat += "\tRetinal overlayed [organ_name]" - else dat += "\tMechanically assisted [organ_name]" + if("amputated") + dat += "\tAmputated [organ_name]" + if("cybernetic") + dat += "\tCybernetic [organ_name]" if(!ind) dat += "\[...\]
" else dat += "
" @@ -699,7 +711,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts switch(alternate_option) if(GET_RANDOM_JOB) HTML += "

Get random job if preferences unavailable

" - if(BE_CIVILIAN) + if(BE_ASSISTANT) HTML += "

Be a civilian if preferences unavailable

" if(RETURN_TO_LOBBY) HTML += "

Return to lobby if preferences unavailable

" @@ -1051,7 +1063,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts ResetJobs() SetChoices(user) if("random") - if(alternate_option == GET_RANDOM_JOB || alternate_option == BE_CIVILIAN) + if(alternate_option == GET_RANDOM_JOB || alternate_option == BE_ASSISTANT) alternate_option += 1 else if(alternate_option == RETURN_TO_LOBBY) alternate_option = 0 @@ -1869,26 +1881,31 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts rlimb_data[second_limb] = choice organ_data[second_limb] = "cyborg" if("organs") - var/organ_name = input(user, "Which internal function do you want to change?") as null|anything in list("Heart", "Eyes") - if(!organ_name) return + var/organ_name = input(user, "Which internal function do you want to change?") as null|anything in list("Eyes", "Heart", "Lungs", "Liver", "Kidneys") + if(!organ_name) + return var/organ = null switch(organ_name) - if("Heart") - organ = "heart" if("Eyes") organ = "eyes" + if("Heart") + organ = "heart" + if("Lungs") + organ = "lungs" + if("Liver") + organ = "liver" + if("Kidneys") + organ = "kidneys" - var/new_state = input(user, "What state do you wish the organ to be in?") as null|anything in list("Normal","Assisted","Mechanical") + var/new_state = input(user, "What state do you wish the organ to be in?") as null|anything in list("Normal", "Cybernetic") if(!new_state) return switch(new_state) if("Normal") organ_data[organ] = null - if("Assisted") - organ_data[organ] = "assisted" - if("Mechanical") - organ_data[organ] = "mechanical" + if("Cybernetic") + organ_data[organ] = "cybernetic" if("clientfps") var/version_message @@ -2133,9 +2150,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts else var/obj/item/organ/internal/I = character.get_int_organ_tag(name) if(I) - if(status == "assisted") - I.mechassist() - else if(status == "mechanical") + if(status == "cybernetic") I.robotize() character.dna.b_type = b_type diff --git a/code/modules/client/preference/preferences_mysql.dm b/code/modules/client/preference/preferences_mysql.dm index f2a9d739cfe..a175e39bc71 100644 --- a/code/modules/client/preference/preferences_mysql.dm +++ b/code/modules/client/preference/preferences_mysql.dm @@ -17,7 +17,8 @@ windowflashing, ghost_anonsay, exp, - clientfps + clientfps, + atklog FROM [format_table_name("player")] WHERE ckey='[C.ckey]'"} ) @@ -48,6 +49,7 @@ ghost_anonsay = text2num(query.item[15]) exp = query.item[16] clientfps = text2num(query.item[17]) + atklog = text2num(query.item[18]) //Sanitize ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor)) @@ -66,6 +68,7 @@ ghost_anonsay = sanitize_integer(ghost_anonsay, 0, 1, initial(ghost_anonsay)) exp = sanitize_text(exp, initial(exp)) clientfps = sanitize_integer(clientfps, 0, 1000, initial(clientfps)) + atklog = sanitize_integer(atklog, 0, 100, initial(atklog)) return 1 /datum/preferences/proc/save_preferences(client/C) @@ -85,6 +88,7 @@ be_role='[sanitizeSQL(list2params(be_special))]', default_slot='[default_slot]', toggles='[toggles]', + atklog='[atklog]', sound='[sound]', randomslot='[randomslot]', volume='[volume]', @@ -93,7 +97,8 @@ lastchangelog='[lastchangelog]', windowflashing='[windowflashing]', ghost_anonsay='[ghost_anonsay]', - clientfps='[clientfps]' + clientfps='[clientfps]', + atklog='[atklog]' WHERE ckey='[C.ckey]'"} ) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 282603a8879..060e53df5b7 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -411,7 +411,7 @@ BLIND // can't see anything desc = "[desc] They have had their toes opened up." update_icon() else - to_chat(user, "[src] have already had their toes cut open!") + to_chat(user, "[src] have already had [p_their()] toes cut open!") return else ..() @@ -489,7 +489,7 @@ BLIND // can't see anything for(var/obj/item/I in O.contents) //Dump the pocket out onto the floor below the user. user.unEquip(I,1) - user.visible_message("[user] bellows, [pick("shredding", "ripping open", "tearing off")] their jacket in a fit of rage!","You accidentally [pick("shred", "rend", "tear apart")] \the [src] with your [pick("excessive", "extreme", "insane", "monstrous", "ridiculous", "unreal", "stupendous")] [pick("power", "strength")]!") + user.visible_message("[user] bellows, [pick("shredding", "ripping open", "tearing off")] [user.p_their()] jacket in a fit of rage!","You accidentally [pick("shred", "rend", "tear apart")] [src] with your [pick("excessive", "extreme", "insane", "monstrous", "ridiculous", "unreal", "stupendous")] [pick("power", "strength")]!") user.unEquip(src) qdel(src) //Now that the pockets have been emptied, we can safely destroy the jacket. user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!")) diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index dc1504b80b6..40c29c1d991 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -134,7 +134,7 @@ update_icon() /obj/item/clothing/gloves/fingerless/rapid - name = "Gloves of the north star" + name = "Gloves of the North Star" desc = "Just looking at these fills you with an urge to beat the shit out of people." /obj/item/clothing/gloves/fingerless/rapid/Touch(mob/living/target, proximity = TRUE) diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 10f5a348318..dc8c4b59a4d 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -222,7 +222,7 @@ return 1 /obj/item/clothing/head/fedora/proc/tip_fedora(mob/user) - user.visible_message("[user] tips their fedora.", "You tip your fedora") + user.visible_message("[user] tips [user.p_their()] fedora.", "You tip your fedora") /obj/item/clothing/head/fez diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 60cbfff3dd9..22f293aedfc 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -8,7 +8,7 @@ gas_transfer_coefficient = 0.90 put_on_delay = 20 var/resist_time = 0 //deciseconds of how long you need to gnaw to get rid of the gag, 0 to make it impossible to remove - var/mute = MUTE_ALL + var/mute = MUZZLE_MUTE_ALL var/security_lock = FALSE // Requires brig access to remove 0 - Remove as normal var/locked = FALSE //Indicates if a mask is locked, should always start as 0. species_fit = list("Vox") @@ -22,8 +22,8 @@ return 0 else if(security_lock && locked) if(do_unlock(user)) - visible_message("[user] unlocks their [src.name].", \ - "[user] unlocks their [src.name].") + visible_message("[user] unlocks [user.p_their()] [src.name].", \ + "[user] unlocks [user.p_their()] [src.name].") ..() return 1 @@ -93,7 +93,7 @@ item_state = null w_class = WEIGHT_CLASS_TINY resist_time = 150 - mute = MUTE_MUFFLE + mute = MUZZLE_MUTE_MUFFLE flags = DROPDEL species_fit = list("Vox", "Unathi", "Tajaran", "Vulpkanin", "Grey") sprite_sheets = list( @@ -117,7 +117,7 @@ name = "safety muzzle" desc = "A muzzle designed to prevent biting." resist_time = 600 - mute = MUTE_NONE + mute = MUZZLE_MUTE_NONE security_lock = TRUE locked = FALSE @@ -169,7 +169,7 @@ return 1 /obj/item/clothing/mask/fakemoustache/proc/pontificate(mob/user) - user.visible_message("\ [user] twirls \his moustache and laughs [pick("fiendishly","maniacally","diabolically","evilly")]!") + user.visible_message("\ [user] twirls [user.p_their()] moustache and laughs [pick("fiendishly","maniacally","diabolically","evilly")]!") //scarves (fit in in mask slot) diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index 88796165114..3156b617c03 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -6,6 +6,7 @@ var/magboot_state = "magboots" var/magpulse = 0 var/slowdown_active = 2 + var/slowdown_passive = SHOES_SLOWDOWN actions_types = list(/datum/action/item_action/toggle) strip_delay = 70 put_on_delay = 70 @@ -14,7 +15,7 @@ /obj/item/clothing/shoes/magboots/attack_self(mob/user) if(magpulse) flags &= ~NOSLIP - slowdown = SHOES_SLOWDOWN + slowdown = slowdown_passive else flags |= NOSLIP slowdown = slowdown_active @@ -53,4 +54,18 @@ obj/item/clothing/shoes/magboots/syndie/advance //For the Syndicate Strike Team desc = "Reverse-engineered magboots that appear to be based on an advanced model, as they have a lighter magnetic pull. Property of Gorlex Marauders." name = "advanced blood-red magboots" - slowdown_active = SHOES_SLOWDOWN \ No newline at end of file + slowdown_active = SHOES_SLOWDOWN + +/obj/item/clothing/shoes/magboots/clown + desc = "The prankster's standard-issue clowning shoes. Damn they're huge! There's a red light on the side." + name = "clown shoes" + icon_state = "clownmag0" + magboot_state = "clownmag" + item_state = "clown_shoes" + slowdown = SHOES_SLOWDOWN+1 + slowdown_active = SHOES_SLOWDOWN+1 + slowdown_passive = SHOES_SLOWDOWN+1 + item_color = "clown" + silence_steps = 1 + shoe_sound = "clownstep" + origin_tech = "magnets=4;syndicate=2" \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/ert.dm b/code/modules/clothing/spacesuits/ert.dm index 123b4e5fd5e..91884eeba2d 100644 --- a/code/modules/clothing/spacesuits/ert.dm +++ b/code/modules/clothing/spacesuits/ert.dm @@ -9,9 +9,10 @@ var/obj/machinery/camera/camera var/has_camera = TRUE strip_delay = 130 - species_fit = list("Grey") + species_fit = list("Grey", "Vox") sprite_sheets = list( - "Grey" = 'icons/mob/species/grey/helmet.dmi' + "Grey" = 'icons/mob/species/grey/helmet.dmi', + "Vox" = 'icons/mob/species/vox/helmet.dmi' ) /obj/item/clothing/head/helmet/space/hardsuit/ert/attack_self(mob/user) @@ -41,9 +42,10 @@ /obj/item/radio, /obj/item/analyzer, /obj/item/gun/energy/laser, /obj/item/gun/energy/pulse, \ /obj/item/gun/energy/gun/advtaser, /obj/item/melee/baton, /obj/item/gun/energy/gun) strip_delay = 130 - species_fit = list("Drask") + species_fit = list("Drask", "Vox") sprite_sheets = list( - "Drask" = 'icons/mob/species/drask/suit.dmi' + "Drask" = 'icons/mob/species/drask/suit.dmi', + "Vox" = 'icons/mob/species/vox/suit.dmi' ) //Commander diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index f5a6176a6c4..8ee357b1ffb 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -71,6 +71,11 @@ allowed = list(/obj/item/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/restraints/handcuffs,/obj/item/tank,/obj/item/kitchen/knife/combat) armor = list(melee = 40, bullet = 30, laser = 30, energy = 30, bomb = 50, bio = 90, rad = 20) strip_delay = 120 + species_restricted = list("exclude", "Diona", "Wryn") + species_fit = list("Vox") + sprite_sheets = list( + "Vox" = 'icons/mob/species/vox/suit.dmi' + ) /obj/item/clothing/head/helmet/space/deathsquad/beret name = "officer's beret" diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm index 49991df72d7..74af696e76e 100644 --- a/code/modules/clothing/spacesuits/rig/modules/computer.dm +++ b/code/modules/clothing/spacesuits/rig/modules/computer.dm @@ -116,7 +116,7 @@ return 1 // Okay, it wasn't a terminal being touched, check for all the simple insertions. - if(input_device.type in list(/obj/item/paicard, /obj/item/mmi, /obj/item/mmi/posibrain)) + if(input_device.type in list(/obj/item/paicard, /obj/item/mmi, /obj/item/mmi/robotic_brain)) if(integrated_ai) integrated_ai.attackby(input_device,user) // If the transfer was successful, we can clear out our vars. diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 7a2d9e5e495..eab5aa0c5bb 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -366,7 +366,7 @@ correct_piece.icon_state = "[initial(icon_state)]" switch(msg_type) if("boots") - to_chat(wearer, "\The [correct_piece] relax their grip on your legs.") + to_chat(wearer, "\The [correct_piece] relax [correct_piece.p_their()] grip on your legs.") if(user != wearer) to_chat(user, "\The [correct_piece] has been unsealed.") wearer.update_inv_shoes() diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm index 74d07164101..7880dcc1dd3 100644 --- a/code/modules/clothing/suits/bio.dm +++ b/code/modules/clothing/suits/bio.dm @@ -9,6 +9,10 @@ armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES burn_state = FIRE_PROOF + species_fit = list("Vox") + sprite_sheets = list( + "Vox" = 'icons/mob/species/vox/helmet.dmi' + ) /obj/item/clothing/suit/bio_suit name = "bio suit" diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 6aa79584fc7..e0b444afcd0 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -77,7 +77,7 @@ burn_state = FIRE_PROOF species_fit = list("Vox") sprite_sheets = list( - "Vox" = 'icons/mob/species/vox/head.dmi' + "Vox" = 'icons/mob/species/vox/helmet.dmi' ) /obj/item/clothing/suit/bomb_suit @@ -108,16 +108,12 @@ /obj/item/clothing/head/bomb_hood/security icon_state = "bombsuitsec" item_state = "bombsuitsec" - species_fit = null - sprite_sheets = null /obj/item/clothing/suit/bomb_suit/security icon_state = "bombsuitsec" item_state = "bombsuitsec" allowed = list(/obj/item/gun/energy,/obj/item/melee/baton,/obj/item/restraints/handcuffs) - species_fit = null - sprite_sheets = null /* * Radiation protection diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 6d2e0363138..aac34032dfb 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -131,7 +131,7 @@ /obj/item/clothing/accessory/stethoscope/attack(mob/living/carbon/human/M, mob/living/user) if(ishuman(M) && isliving(user)) if(user == M) - user.visible_message("[user] places \the [src] against \his chest and listens attentively.", "You place \the [src] against your chest...") + user.visible_message("[user] places [src] against [user.p_their()] chest and listens attentively.", "You place [src] against your chest...") else user.visible_message("[user] places \the [src] against [M]'s chest and listens attentively.", "You place \the [src] against [M]'s chest...") var/obj/item/organ/internal/H = M.get_int_organ(/obj/item/organ/internal/heart) @@ -250,7 +250,7 @@ to_chat(user, "Waving around a badge before swiping an ID would be pretty pointless.") return if(isliving(user)) - user.visible_message("[user] displays their Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.","You display your Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.") + user.visible_message("[user] displays [user.p_their()] Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.","You display your Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.") /obj/item/clothing/accessory/holobadge/attackby(var/obj/item/O as obj, var/mob/user as mob, params) if(istype(O, /obj/item/card/id) || istype(O, /obj/item/pda)) @@ -284,7 +284,7 @@ /obj/item/clothing/accessory/holobadge/attack(mob/living/carbon/human/M, mob/living/user) if(isliving(user)) - user.visible_message("[user] invades [M]'s personal space, thrusting [src] into their face insistently.","You invade [M]'s personal space, thrusting [src] into their face insistently. You are the law.") + user.visible_message("[user] invades [M]'s personal space, thrusting [src] into [M.p_their()] face insistently.","You invade [M]'s personal space, thrusting [src] into [M.p_their()] face insistently. You are the law.") /obj/item/storage/box/holobadge name = "holobadge box" diff --git a/code/modules/clothing/under/jobs/civilian.dm b/code/modules/clothing/under/jobs/civilian.dm index 1ca94e9a4f3..76bef3e056b 100644 --- a/code/modules/clothing/under/jobs/civilian.dm +++ b/code/modules/clothing/under/jobs/civilian.dm @@ -69,9 +69,10 @@ item_state = "clown" item_color = "clown" flags_size = ONESIZEFITSALL + var/honk_sound = 'sound/items/bikehorn.ogg' /obj/item/clothing/under/rank/clown/hit_reaction() - playsound(loc, 'sound/items/bikehorn.ogg', 50, 1, -1) + playsound(loc, honk_sound, 50, 1, -1) if(ishuman(loc)) var/mob/living/carbon/human/H = loc if(H.mind && H.mind.assigned_role == "Clown") diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm index f1739750a0a..012c79bab06 100644 --- a/code/modules/crafting/recipes.dm +++ b/code/modules/crafting/recipes.dm @@ -25,15 +25,6 @@ time = 15 category = CAT_WEAPON -/datum/crafting_recipe/lance - name = "explosive lance (grenade)" - result = /obj/item/twohanded/spear - reqs = list(/obj/item/twohanded/spear = 1, - /obj/item/grenade = 1) - parts = list(/obj/item/grenade = 1) - time = 15 - category = CAT_WEAPON - /datum/crafting_recipe/molotov name = "Molotov" result = /obj/item/reagent_containers/food/drinks/bottle/molotov diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 1fe849a4cb0..ce3e9df0655 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -46,7 +46,7 @@ var/mob/living/carbon/human/target = M if(istype(target.species, /datum/species/machine)) - to_chat(user, "[target] has no skin, how do you expect to tattoo them?") + to_chat(user, "[target] has no skin, how do you expect to tattoo [target.p_them()]?") return if(target.m_styles["body"] != "None") @@ -1354,6 +1354,13 @@ item_state = "teri_horn" honk_sound = 'sound/items/teri_horn.ogg' +/obj/item/clothing/accessory/medal/fluff/elo //V-Force_Bomber: E.L.O. + name = "distinguished medal of loyalty and excellence" + desc = "This medal is cut into the shape of a Victoria Cross, and is awarded to those who have proven themselves to Nanotrasen with a long and successful career." + icon = 'icons/obj/custom_items.dmi' + icon_state = "elo-medal" + item_color = "elo-medal" + /obj/item/clothing/suit/fluff/vetcoat //Furasian: Fillmoore Grayson name = "Veteran Coat" desc = "An old, yet well-kept Nanotrasen uniform. Very few of its kind are still produced." @@ -1370,4 +1377,13 @@ /obj/item/clothing/suit/fluff/vetcoat/navy //Furasian: Fillmoore Grayson icon_state = "alchemistcoatnavy" - item_state = "alchemistcoatnavy" \ No newline at end of file + item_state = "alchemistcoatnavy" + +/obj/item/clothing/accessory/medal/fluff/panzermedal //PanzerSkull: GRN-DER + name = "Cross of Valor" + desc = "A medal from the bygone Asteroid Wars. Its Ruby shines with a strange intensity." + icon = 'icons/obj/custom_items.dmi' + icon_state = "panzermedal" + item_state = "panzermedal" + item_color = "panzermedal" + slot_flags = SLOT_TIE diff --git a/code/modules/economy/Economy.dm b/code/modules/economy/Economy.dm index 028c2810ae7..57d76e98c5c 100644 --- a/code/modules/economy/Economy.dm +++ b/code/modules/economy/Economy.dm @@ -38,7 +38,7 @@ #define MINERALS 8 #define EMERGENCY 9 -#define GAS 10 +#define EGAS 10 #define MAINTENANCE 11 #define ELECTRICAL 12 #define ROBOTICS 13 diff --git a/code/modules/economy/Economy_Events.dm b/code/modules/economy/Economy_Events.dm index c1e5b95273e..10e0d574f98 100644 --- a/code/modules/economy/Economy_Events.dm +++ b/code/modules/economy/Economy_Events.dm @@ -29,16 +29,16 @@ if(INDUSTRIAL_ACCIDENT) dearer_goods = list(EMERGENCY, BIOMEDICAL, ROBOTICS) if(BIOHAZARD_OUTBREAK) - dearer_goods = list(BIOMEDICAL, GAS) + dearer_goods = list(BIOMEDICAL, EGAS) if(PIRATES) dearer_goods = list(SECURITY, MINERALS) if(CORPORATE_ATTACK) dearer_goods = list(SECURITY, MAINTENANCE) if(ALIEN_RAIDERS) dearer_goods = list(BIOMEDICAL, ANIMALS) - cheaper_goods = list(GAS, MINERALS) + cheaper_goods = list(EGAS, MINERALS) if(AI_LIBERATION) - dearer_goods = list(EMERGENCY, GAS, MAINTENANCE) + dearer_goods = list(EMERGENCY, EGAS, MAINTENANCE) if(MOURNING) cheaper_goods = list(MINERALS, MAINTENANCE) if(CULT_CELL_REVEALED) diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index abab5c39254..cd9b0c02206 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -2,6 +2,10 @@ announceWhen = 50 endWhen = 900 + var/list/spawned_mobs = list( + /mob/living/simple_animal/hostile/carp = 95, + /mob/living/simple_animal/hostile/carp/megacarp = 5, + ) var/list/spawned_carp = list() /datum/event/carp_migration/setup() @@ -17,6 +21,7 @@ event_announcement.Announce(announcement, "Lifesign Alert") /datum/event/carp_migration/start() + if(severity == EVENT_LEVEL_MAJOR) spawn_fish(landmarks_list.len) else if(severity == EVENT_LEVEL_MODERATE) @@ -32,19 +37,17 @@ spawn_locations.Add(C.loc) spawn_locations = shuffle(spawn_locations) num_groups = min(num_groups, spawn_locations.len) - + var/i = 1 while(i <= num_groups) var/group_size = rand(group_size_min, group_size_max) for(var/j = 1, j <= group_size, j++) - var/carptype = /mob/living/simple_animal/hostile/carp - if(prob(5)) - carptype = /mob/living/simple_animal/hostile/carp/megacarp + var/carptype = pickweight(spawned_mobs) spawned_carp.Add(new carptype(spawn_locations[i])) i++ /datum/event/carp_migration/end() - for(var/mob/living/simple_animal/hostile/carp/C in spawned_carp) + for(var/mob/living/simple_animal/hostile/C in spawned_carp) if(!C.stat) var/turf/T = get_turf(C) if(istype(T, /turf/space)) diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index b514924abfa..cf2e3621498 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -11,7 +11,7 @@ /datum/event/disease_outbreak/start() if(!virus_type) - virus_type = pick(/datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis) + virus_type = pick(/datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis, /datum/disease/beesease, /datum/disease/anxiety, /datum/disease/fake_gbs, /datum/disease/fluspanish, /datum/disease/pierrot_throat, /datum/disease/lycan) for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) if(issmall(H)) //don't infect monkies; that's a waste diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm index ef7b99e1133..888e2b38dd1 100644 --- a/code/modules/events/event_container.dm +++ b/code/modules/events/event_container.dm @@ -139,7 +139,8 @@ var/list/event_last_fired = list() new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Sentience", /datum/event/sentience, 50), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)), - new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Aurora Caelus", /datum/event/aurora_caelus, 15, is_one_shot = TRUE) + new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Aurora Caelus", /datum/event/aurora_caelus, 15, is_one_shot = TRUE), + new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Koi School", /datum/event/carp_migration/koi, 80,) ) /datum/event_container/moderate diff --git a/code/modules/events/infestation.dm b/code/modules/events/infestation.dm index c5a5873afa0..d11a1227ddf 100644 --- a/code/modules/events/infestation.dm +++ b/code/modules/events/infestation.dm @@ -107,7 +107,6 @@ #undef LOC_HYDRO #undef LOC_VAULT #undef LOC_TECH -#undef LOC_TACTICAL #undef VERM_MICE #undef VERM_LIZARDS diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index b4a67ac9850..a66dcd66d0e 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -119,22 +119,22 @@ if(2) //X is an object message = "THE CREW ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]" - if(9) //X is harmful to humans + if(9) //X is harmful to crew switch(rand(1,7)) //What is X? if(1) //X is a threat - message = "[ionadjectiveshalf][ionthreats] ARE HARMFUL TO HUMANS" + message = "[ionadjectiveshalf][ionthreats] ARE HARMFUL TO CREW" if(2) //X is a job - message = "[ionadjectiveshalf][ioncrew1] ARE HARMFUL TO HUMANS" + message = "[ionadjectiveshalf][ioncrew1] ARE HARMFUL TO CREW" if(3) //X is an object - message = "[ionadjectiveshalf][ionobjects] ARE HARMFUL TO HUMANS" + message = "[ionadjectiveshalf][ionobjects] ARE HARMFUL TO CREW" if(4) //X is an action - message = "THOSE WHO [ionmust] ARE HARMFUL TO HUMANS" + message = "THOSE WHO [ionmust] ARE HARMFUL TO CREW" if(5) //X is an abstract - message = "[ionabstract] IS HARMFUL TO HUMANS" + message = "[ionabstract] IS HARMFUL TO CREW" if(6) //X is being a job - message = "BEING [ionadjectiveshalf][ioncrew1] IS HARMFUL TO HUMANS" + message = "BEING [ionadjectiveshalf][ioncrew1] IS HARMFUL TO CREW" if(7) //X is doing a thing - message = "[ionthings] IS HARMFUL TO HUMANS" + message = "[ionthings] IS HARMFUL TO CREW" if(10 to 11) //(Not) Having X is harmful switch(rand(1,2)) //Is having or not having harmful? @@ -304,16 +304,16 @@ if(24 to 26) //The AI must always message = "YOU MUST ALWAYS [ionmust]" - if(27 to 28) //Humans must eat X to survive + if(27 to 28) //Crew must eat X to survive switch(rand(1,4)) //What is X? if(1) //X is a food - message = "HUMANS MUST EAT [ionadjectiveshalf][ionfood] TO SURVIVE" + message = "CREW MUST EAT [ionadjectiveshalf][ionfood] TO SURVIVE" if(2) //X is an object - message = "HUMANS MUST EAT [ionadjectiveshalf][ionobjects] TO SURVIVE" + message = "CREW MUST EAT [ionadjectiveshalf][ionobjects] TO SURVIVE" if(3) //X is a threat - message = "HUMANS MUST EAT [ionadjectiveshalf][ionthreats] TO SURVIVE" + message = "CREW MUST EAT [ionadjectiveshalf][ionthreats] TO SURVIVE" if(4) //X is a job - message = "HUMANS MUST EAT [ionadjectiveshalf][ioncrew1] TO SURVIVE" + message = "CREW MUST EAT [ionadjectiveshalf][ioncrew1] TO SURVIVE" if(29 to 31) //Change jobs or ranks switch(rand(1,2)) //Change job or rank? @@ -360,54 +360,54 @@ if(2) //X is perform Y message = "THE [ioncrew1] MUST [ionmust]" - if(34) //X is non/the only human + if(34) //X is non/the only crew switch(rand(1,2)) //Only or non? - if(1) //Only human + if(1) //Only crew switch(rand(1,7)) //Who is it? if(1) //A specific job - message = "ONLY THE [ioncrew1] ARE HUMAN" + message = "ONLY THE [ioncrew1] ARE CREW" if(2) //Two specific jobs - message = "ONLY THE [ioncrew1] AND [ioncrew2] ARE HUMAN" + message = "ONLY THE [ioncrew1] AND [ioncrew2] ARE CREW" if(3) //Threats - message = "ONLY [ionadjectiveshalf][ionthreats] ARE HUMAN" + message = "ONLY [ionadjectiveshalf][ionthreats] ARE CREW" if(4) // Objects - message = "ONLY [ionadjectiveshalf][ionobjects] ARE HUMAN" + message = "ONLY [ionadjectiveshalf][ionobjects] ARE CREW" if(5) // Species - message = "ONLY [ionspecies] ARE HUMAN" + message = "ONLY [ionspecies] ARE CREW" if(6) //Adjective crewmembers - message = "ONLY [ionadjectives] PEOPLE ARE HUMAN" + message = "ONLY [ionadjectives] PEOPLE ARE CREW" if(7) //Only people who X switch(rand(1,3)) //What is X? if(1) //X is perform an action - message = "ONLY THOSE WHO [ionmust] ARE HUMAN" + message = "ONLY THOSE WHO [ionmust] ARE CREW" if(2) //X is own certain objects - message = "ONLY THOSE WHO HAVE [ionadjectiveshalf][ionobjects] ARE HUMAN" + message = "ONLY THOSE WHO HAVE [ionadjectiveshalf][ionobjects] ARE CREW" if(3) //X is eat certain food - message = "ONLY THOSE WHO EAT [ionadjectiveshalf][ionfood] ARE HUMAN" + message = "ONLY THOSE WHO EAT [ionadjectiveshalf][ionfood] ARE CREW" - if(2) //Non human + if(2) //Non crew switch(rand(1,7)) //Who is it? if(1) //A specific job - message = "[ioncrew1] ARE NON-HUMAN" + message = "[ioncrew1] ARE NON-CREW" if(2) //Two specific jobs - message = "[ioncrew1] AND [ioncrew2] ARE NON-HUMAN" + message = "[ioncrew1] AND [ioncrew2] ARE NON-CREW" if(3) //Threats - message = "[ionadjectiveshalf][ionthreats] ARE NON-HUMAN" + message = "[ionadjectiveshalf][ionthreats] ARE NON-CREW" if(4) // Objects - message = "[ionadjectiveshalf][ionobjects] ARE NON-HUMAN" + message = "[ionadjectiveshalf][ionobjects] ARE NON-CREW" if(5) // Species - message = "[ionspecies] ARE NON-HUMAN" + message = "[ionspecies] ARE NON-CREW" if(6) //Adjective crewmembers - message = "[ionadjectives] PEOPLE ARE NON-HUMAN" + message = "[ionadjectives] PEOPLE ARE NON-CREW" if(7) //Only people who X switch(rand(1,3)) //What is X? if(1) //X is perform an action - message = "THOSE WHO [ionmust] ARE NON-HUMAN" + message = "THOSE WHO [ionmust] ARE NON-CREW" if(2) //X is own certain objects - message = "THOSE WHO HAVE [ionadjectiveshalf][ionobjects] ARE NON-HUMAN" + message = "THOSE WHO HAVE [ionadjectiveshalf][ionobjects] ARE NON-CREW" if(3) //X is eat certain food - message = "THOSE WHO EAT [ionadjectiveshalf][ionfood] ARE NON-HUMAN" + message = "THOSE WHO EAT [ionadjectiveshalf][ionfood] ARE NON-CREW" if(35 to 36) //You must protect or harm X switch(rand(1,2)) //Protect or harm? diff --git a/code/modules/events/koi_mirgration.dm b/code/modules/events/koi_mirgration.dm new file mode 100644 index 00000000000..868457721b2 --- /dev/null +++ b/code/modules/events/koi_mirgration.dm @@ -0,0 +1,9 @@ +/datum/event/carp_migration + spawned_mobs = list( + /mob/living/simple_animal/hostile/retaliate/carp/koi = 95, + /mob/living/simple_animal/hostile/retaliate/carp/koi/honk = 2, + ) + + +/datum/event/carp_migration/koi/start() + spawn_fish(landmarks_list.len) \ No newline at end of file diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index 0f2da54818c..4b822dd718e 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -1,70 +1,11 @@ -/datum/event/radiation_storm - announceWhen = 1 - var/safe_zones = list( - /area/maintenance, - /area/crew_quarters/sleep, - /area/security/brig, - /area/shuttle, - /area/vox_station, - /area/syndicate_station - ) - +/datum/event/radiation_storm/setup() + startWhen = 3 + endWhen = startWhen + 1 + announceWhen = 1 /datum/event/radiation_storm/announce() - // Don't do anything, we want to pack the announcement with the actual event - -/datum/event/radiation_storm/proc/is_safe_zone(var/area/A) - for(var/szt in safe_zones) - if(istype(A, szt)) - return 1 - return 0 + priority_announcement.Announce("High levels of radiation detected near the station. Maintenance is best shielded from radiation.", "Anomaly Alert", 'sound/ai/radiation.ogg') + //sound not longer matches the text, but an audible warning is probably good /datum/event/radiation_storm/start() - spawn() - event_announcement.Announce("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') - - for(var/area/A in world) - if(!is_station_level(A.z) || is_safe_zone(A)) - continue - A.radiation_alert() - - make_maint_all_access() - - sleep(600) - - event_announcement.Announce("The station has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert") - - for(var/i = 0, i < 10, i++) - for(var/mob/living/carbon/human/H in living_mob_list) - var/armor = H.getarmor(type = "rad") - if((RADIMMUNE in H.species.species_traits) || armor >= 100) // Leave radiation-immune species/fully rad armored players completely unaffected - continue - var/turf/T = get_turf(H) - if(!T) - continue - if(!is_station_level(T.z) || is_safe_zone(T.loc)) - continue - - if(istype(H,/mob/living/carbon/human)) - H.apply_effect((rand(15,35)),IRRADIATE,0) - if(prob(5)) - H.apply_effect((rand(40,70)),IRRADIATE,0) - if(prob(75)) - randmutb(H) // Applies bad mutation - domutcheck(H,null,1) - else - randmutg(H) // Applies good mutation - domutcheck(H,null,1) - - sleep(100) - - event_announcement.Announce("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert") - - for(var/area/A in world) - if(!is_station_level(A.z) || is_safe_zone(A)) - continue - A.reset_radiation_alert() - - sleep(600) // Want to give them time to get out of maintenance. - - revoke_maint_all_access() + SSweather.run_weather(/datum/weather/rad_storm) \ No newline at end of file diff --git a/code/modules/fish/fish_items.dm b/code/modules/fish/fish_items.dm index 58566f9872d..63a4b668930 100644 --- a/code/modules/fish/fish_items.dm +++ b/code/modules/fish/fish_items.dm @@ -26,7 +26,7 @@ throw_range = 7 suicide_act(mob/user) //"A tiny net is a death sentence: it's a net and it's tiny!" https://www.youtube.com/watch?v=FCI9Y4VGCVw - to_chat(viewers(user), "[user] places the [src.name] on top of \his head, \his fingers tangled in the netting! It looks like \he's trying to commit suicide.") + to_chat(viewers(user), "[user] places the [src.name] on top of [user.p_their()] head, [user.p_their()] fingers tangled in the netting! It looks like [user.p_theyre()] trying to commit suicide.") return(OXYLOSS) /obj/item/fishfood @@ -52,7 +52,7 @@ attack_verb = list("scrubbed", "brushed", "scraped") suicide_act(mob/user) - to_chat(viewers(user), "[user] is vigorously scrubbing \himself raw with the [src.name]! It looks like \he's trying to commit suicide.") + to_chat(viewers(user), "[user] is vigorously scrubbing [user.p_them()]self raw with the [name]! It looks like [user.p_theyre()] trying to commit suicide.") return(BRUTELOSS|FIRELOSS) ////////////////////////////////////////////// diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm index 584fdd5b93c..412c5407ddc 100644 --- a/code/modules/fish/fishtank.dm +++ b/code/modules/fish/fishtank.dm @@ -1,6 +1,6 @@ ////////////////////////////// -// Fish Tanks! // +// Fish Tanks // ////////////////////////////// @@ -9,44 +9,41 @@ desc = "So generic, it might as well have no description at all." icon = 'icons/obj/fish_items.dmi' icon_state = "tank1" - density = 0 - anchored = 0 + density = FALSE + anchored = FALSE pass_flags = 0 var/tank_type = "" // Type of aquarium, used for icon updating var/water_capacity = 0 // Number of units the tank holds (varies with tank type) var/water_level = 0 // Number of units currently in the tank (new tanks start empty) var/light_switch = 0 // 0 = off, 1 = on (off by default) - var/filth_level = 0.0 // How dirty the tank is (max 10) + var/filth_level = 0 // How dirty the tank is (max 10) var/lid_switch = 0 // 0 = open, 1 = closed (open by default) var/max_fish = 0 // How many fish the tank can support (varies with tank type, 1 fish per 50 units sounds reasonable) var/food_level = 0 // Amount of fishfood floating in the tank (max 10) var/fish_count = 0 // Number of fish in the tank - var/list/fish_list = null // Tracks the current types of fish in the tank + var/list/fish_list = list() // Tracks the current types of fish in the tank var/egg_count = 0 // How many fish eggs can be harvested from the tank (capped at the max_fish value) - var/list/egg_list = null // Tracks the current types of harvestable eggs in the tank + var/list/egg_list = list() // Tracks the current types of harvestable eggs in the tank - var/has_lid = 0 // 0 if the tank doesn't have a lid/light, 1 if it does - var/max_health = 0 // Can handle a couple hits - var/cur_health = 0 // Current health, starts at max_health - var/leaking = 0 // 0 if not leaking, 1 if minor leak, 2 if major leak (not leaking by default) + var/has_lid = FALSE // 0 if the tank doesn't have a lid/light, 1 if it does + var/leaking = FALSE // 0 if not leaking, 1 if minor leak, 2 if major leak (not leaking by default) var/shard_count = 0 // Number of glass shards to salvage when broken (1 less than the number of sheets to build the tank) /obj/machinery/fishtank/bowl name = "fish bowl" desc = "A small bowl capable of housing a single fish, commonly found on desks. This one has a tiny treasure chest in it!" icon_state = "bowl1" - density = 0 // Small enough to not block stuff - anchored = 0 // Small enough to move even when filled + density = FALSE // Small enough to not block stuff + anchored = FALSE // Small enough to move even when filled pass_flags = PASSTABLE | LETPASSTHROW // Just like at the county fair, you can't seem to throw the ball in to win the goldfish, and it's small enough to pull onto a table tank_type = "bowl" water_capacity = 50 // Not very big, therefore it can't hold much max_fish = 1 // What a lonely fish - has_lid = 0 - max_health = 15 // Not very sturdy - cur_health = 15 + has_lid = FALSE + max_integrity = 15 // Not very sturdy shard_count = 0 // No salvageable shards /obj/machinery/fishtank/tank @@ -54,17 +51,16 @@ desc = "A large glass tank designed to house aquatic creatures. Contains an integrated water circulation system." icon = 'icons/obj/fish_items.dmi' icon_state = "tank1" - density = 1 - anchored = 1 + density = TRUE + anchored = TRUE pass_flags = LETPASSTHROW tank_type = "tank" water_capacity = 200 // Decent sized, holds almost 2 full buckets max_fish = 4 // Room for a few fish - has_lid = 1 - max_health = 50 // Average strength, will take a couple hits from a toolbox. - cur_health = 50 + has_lid = TRUE + max_integrity = 50 // Average strength, will take a couple hits from a toolbox. shard_count = 2 @@ -72,17 +68,16 @@ name = "wall aquarium" desc = "This aquarium is massive! It completely occupies the same space as a wall, and looks very sturdy too!" icon_state = "wall1" - density = 1 - anchored = 1 + density = TRUE + anchored = TRUE pass_flags = 0 // This thing is the size of a wall, you can't throw past it. tank_type = "wall" water_capacity = 500 // This thing fills an entire tile, it holds a lot. max_fish = 10 // Plenty of room for a lot of fish - has_lid = 1 - max_health = 100 // This thing is a freaking wall, it can handle abuse. - cur_health = 100 + has_lid = TRUE + max_integrity = 100 // This thing is a freaking wall, it can handle abuse. shard_count = 3 @@ -94,9 +89,10 @@ set name = "Toggle Tank Lid" set category = "Object" set src in view(1) - toggle_lid(usr) -/obj/machinery/fishtank/proc/toggle_lid(var/mob/living/user) + toggle_lid() + +/obj/machinery/fishtank/proc/toggle_lid() lid_switch = !lid_switch update_icon() @@ -104,12 +100,13 @@ set name = "Toggle Tank Light" set category = "Object" set src in view(1) - toggle_light(usr) -/obj/machinery/fishtank/proc/toggle_light(var/mob/living/user) + toggle_light() + +/obj/machinery/fishtank/proc/toggle_light() light_switch = !light_switch if(light_switch) - set_light(2,2,"#a0a080") + set_light(2, 2, "#a0a080") else adjust_tank_light() @@ -119,8 +116,6 @@ /obj/machinery/fishtank/New() ..() - fish_list = new/list() - egg_list = new/list() if(!has_lid) //Tank doesn't have a lid/light, remove the verbs for then verbs -= /obj/machinery/fishtank/verb/toggle_lid_verb verbs -= /obj/machinery/fishtank/verb/toggle_light_verb @@ -154,7 +149,8 @@ overlays += "over_leak_[leaking]" //Green if we aren't leaking, light blue and slow blink if minor link, dark blue and rapid flashing for major leak //Update water overlay - if(water_level == 0) return //Skip the rest of this if there is no water in the aquarium + if(!water_level) + return //Skip the rest of this if there is no water in the aquarium var/water_type = "_clean" //Default to clean water if(filth_level > 5) water_type = "_dirty" //Show dirty water above filth_level 5 (breeding threshold) if(water_level > (water_capacity * 0.85)) //Show full if the water_level is over 85% of water_capacity @@ -162,15 +158,13 @@ else if(water_level > (water_capacity * 0.35)) //Show half-full if the water_level is over 35% of water_capacity overlays += "over_[tank_type]_half[water_type]" - return - ////////////////////////////// // PROCESS PROC // ////////////////////////////// //Stops atmos from passing wall tanks, since they are effectively full-windows. -/obj/machinery/fishtank/wall/CanAtmosPass(var/turf/T) - return 0 +/obj/machinery/fishtank/wall/CanAtmosPass(turf/T) + return FALSE /obj/machinery/fishtank/process() //Start by counting fish in the tank @@ -238,9 +232,7 @@ adjust_tank_light() /obj/machinery/fishtank/proc/adjust_tank_light() - if(light_switch) //tank light overrides fish lights - return - else + if(!light_switch) //tank light overrides fish lights var/glo_light = 0 for(var/datum/fish/fish in fish_list) if(istype(fish, /datum/fish/glofish)) @@ -261,19 +253,13 @@ food_level = min(10, max(0, food_level + amount)) /obj/machinery/fishtank/proc/check_health() - //Max value check - if(cur_health > max_health) //Cur_health cannot exceed max_health, set it to max_health if it does - cur_health = max_health //Leaking status check - if(cur_health <= (max_health * 0.25)) //Major leak at or below 25% health (-10 water/cycle) + if(obj_integrity <= (max_integrity * 0.25)) //Major leak at or below 25% health (-10 water/cycle) leaking = 2 - else if(cur_health <= (max_health * 0.5)) //Minor leak at or below 50% health (-1 water/cycle) + else if(obj_integrity <= (max_integrity * 0.5)) //Minor leak at or below 50% health (-1 water/cycle) leaking = 1 else //Not leaking above 50% health leaking = 0 - //Destruction check - if(cur_health <= 0) //The tank is broken, destroy it - destroy() /obj/machinery/fishtank/proc/kill_fish(datum/fish/fish_type = null) //Check if we were passed a fish to kill, otherwise kill a random one @@ -292,12 +278,12 @@ fish_list.Add(fish_type) //Add a fish of the specified type fish_count++ //Increase fish_count to reflect the introduction of a fish, so the everything else works fine //Announce the new fish - visible_message("A new [fish_type.fish_name] has hatched in \the [src]!") + visible_message("A new [fish_type.fish_name] has hatched in [src]!") //Null type fish are dud eggs, give a message to inform the player else to_chat(usr, "The eggs disolve in the water. They were duds!") -/obj/machinery/fishtank/proc/harvest_eggs(var/mob/user) +/obj/machinery/fishtank/proc/harvest_eggs(mob/user) if(!egg_count) //Can't harvest non-existant eggs return @@ -312,62 +298,39 @@ egg_list.Cut() //Destroy any excess eggs, clearing the egg_list -/obj/machinery/fishtank/proc/harvest_fish(var/mob/user) - if(fish_count <= 0) //Can't catch non-existant fish! - to_chat(usr, "There are no fish in \the [src] to catch!") +/obj/machinery/fishtank/proc/harvest_fish(mob/user) + if(fish_count <= 0) //Can't catch non-existant fish! + to_chat(user, "There are no fish in [src] to catch!") return var/list/fish_names_list = list() for(var/datum/fish/fish_type in fish_list) fish_names_list += list("[fish_type.fish_name]" = fish_type) var/caught_fish = input("Select a fish to catch.", "Fishing") as null|anything in fish_names_list //Select a fish from the tank if(fish_count <= 0) - to_chat(usr, "There are no fish in \the [src] to catch!") + to_chat(user, "There are no fish in [src] to catch!") return else if(caught_fish) - user.visible_message("[user.name] harvests \a [caught_fish] from \the [src].", "You scoop \a [caught_fish] out of \the [src].") + user.visible_message("[user.name] harvests \a [caught_fish] from [src].", "You scoop \a [caught_fish] out of [src].") var/datum/fish/fish_type = fish_names_list[caught_fish] var/fish_item = fish_type.fish_item if(fish_item) new fish_item(get_turf(user)) //Spawn the appropriate fish_item at the user's feet. kill_fish(fish_type) //Kill the caught fish from the tank - -/obj/machinery/fishtank/proc/destroy(var/deconstruct = 0) - var/turf/T = get_turf(src) //Store the tank's turf for atmos updating after deletion of tank - if(!deconstruct) //Check if we are deconstructing or breaking the tank - var/shards_left = shard_count - while(shards_left > 0) //Produce the appropriate number of glass shards - new /obj/item/shard(get_turf(src)) - shards_left -- - if(water_level) //Spill any water that was left in the tank when it broke - spill_water() - else //We are deconstructing, make glass sheets instead of shards - var/sheets = shard_count + 1 //Deconstructing it salvages all the glass used to build the tank - new /obj/item/stack/sheet/glass(get_turf(src), sheets) //Produce the appropriate number of glass sheets, in a single stack - qdel(src) //qdel the tank and it's contents - T.air_update_turf(1) //Update the air for the turf, to avoid permanent atmos sealing with wall tanks - + //Update the air for the turf, to avoid permanent atmos sealing with wall tanks /obj/machinery/fishtank/proc/spill_water() + var/turf/simulated/T = get_turf(src) switch(tank_type) if("bowl") //Fishbowl: Wets it's own tile - var/turf/T = get_turf(src) - if(!istype(T, /turf/simulated)) return - var/turf/simulated/S = T - S.MakeSlippery() + if(istype(T)) + T.MakeSlippery() if("tank") //Fishtank: Wets it's own tile and the 4 adjacent tiles (cardinal directions) - var/turf/ST = get_turf(src) - if(istype(ST, /turf/simulated)) - var/turf/simulated/ST2 = ST - ST2.MakeSlippery() - var/list/L = ST.CardinalTurfs() - for(var/turf/T in L) - if(!istype(T, /turf/simulated)) continue - var/turf/simulated/S = T - S.MakeSlippery() + if(istype(T)) + T.MakeSlippery() + for(var/turf/simulated/ST in T.CardinalTurfs()) + ST.MakeSlippery() if("wall") //Wall-tank: Wets it's own tile and the surrounding 8 tiles (3x3 square) - for(var/turf/T in spiral_range_turfs(1, src.loc)) - if(!istype(T, /turf/simulated)) continue - var/turf/simulated/S = T - S.MakeSlippery() + for(var/turf/simulated/ST in spiral_range_turfs(1, loc)) + ST.MakeSlippery() /obj/machinery/fishtank/proc/breed_fish() var/list/breed_candidates = fish_list.Copy() @@ -412,20 +375,20 @@ examine_message += "Water level: " - if(water_level == 0) - examine_message += "\The [src] is empty! " + if(!water_level) + examine_message += "[src] is empty! " else if(water_level < water_capacity * 0.1) - examine_message += "\The [src] is nearly empty! " + examine_message += "[src] is nearly empty! " else if(water_level <= water_capacity * 0.25) - examine_message += "\The [src] is about one-quarter filled. " + examine_message += "[src] is about one-quarter filled. " else if(water_level <= water_capacity * 0.5) - examine_message += "\The [src] is about half filled. " + examine_message += "[src] is about half filled. " else if(water_level <= water_capacity * 0.75) - examine_message += "\The [src] is about three-quarters filled. " + examine_message += "[src] is about three-quarters filled. " else if(water_level < water_capacity) - examine_message += "\The [src] is nearly full! " + examine_message += "[src] is nearly full! " else if(water_level == water_capacity) - examine_message += "\The [src] is full! " + examine_message += "[src] is full! " examine_message += "
Cleanliness level: " @@ -467,7 +430,7 @@ //Report the number and types of live fish if there is water in the tank if(fish_count == 0) - examine_message += "\The [src] doesn't contain any live fish. " + examine_message += "[src] doesn't contain any live fish. " else //Build a message reporting the types of fish var/fish_num = fish_count @@ -483,7 +446,7 @@ message +=", " message +="." //No more fish, end the message with a period //Display the number of fish and previously constructed message - examine_message += "\The [src] contains [fish_count] live fish. [message] " + examine_message += "[src] contains [fish_count] live fish. [message] " examine_message += "
" @@ -498,12 +461,16 @@ examine_message += "
" //Report if the tank is leaking/cracked - if(water_level > 0) //Tank has water, so it's actually leaking - if(leaking == 1) examine_message += "\The [src] is leaking." - if(leaking == 2) examine_message += "\The [src] is leaking profusely!" + if(water_level) //Tank has water, so it's actually leaking + if(leaking == 1) + examine_message += "[src] is leaking." + if(leaking == 2) + examine_message += "[src] is leaking profusely!" else //No water, report the cracks instead - if(leaking == 1) examine_message += "\The [src] is cracked." - if(leaking == 2) examine_message += "\The [src] is nearly shattered!" + if(leaking == 1) + examine_message += "[src] is cracked." + if(leaking == 2) + examine_message += "[src] is nearly shattered!" //Finally, report the full examine_message constructed from the above reports @@ -514,127 +481,113 @@ // ATACK PROCS // ////////////////////////////// -/obj/machinery/fishtank/attack_animal(mob/living/simple_animal/M as mob) +/obj/machinery/fishtank/attack_animal(mob/living/simple_animal/M) if(istype(M, /mob/living/simple_animal/pet/cat)) if(M.a_intent == INTENT_HELP) //Cats can try to fish in open tanks on help intent if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open. - M.visible_message("[M.name] stares at into \the [src] while sitting perfectly still.", "The lid is closed, so you stare into \the [src] intently.") + M.visible_message("[M.name] stares at into [src] while sitting perfectly still.", "The lid is closed, so you stare into [src] intently.") else if(fish_count) //Tank must actually have fish to try catching one - M.visible_message("[M.name] leaps up onto \the[src] and attempts to fish through the opening!", "You jump up onto \the [src] and begin fishing through the opening!") - spawn(10) - if(water_level && prob(45)) //If there is water, there is a chance the cat will slip, Syndicat will spark like E-N when this happens - M.visible_message("[M.name] slipped and got soaked!", "You slipped and got soaked!") - if(istype(M, /mob/living/simple_animal/pet/cat/Syndi)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() - else //No water or didn't slip, get that fish! - M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!") - kill_fish() //Kill a random fish - M.health = M.maxHealth //Eating fish heals the predator + M.visible_message("[M.name] leaps up onto [src] and attempts to fish through the opening!", "You jump up onto [src] and begin fishing through the opening!") + if(water_level && prob(45)) //If there is water, there is a chance the cat will slip, Syndicat will spark like E-N when this happens + M.visible_message("[M.name] slipped and got soaked!", "You slipped and got soaked!") + if(istype(M, /mob/living/simple_animal/pet/cat/Syndi)) + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread + s.set_up(3, 1, src) + s.start() + else //No water or didn't slip, get that fish! + M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!") + kill_fish() //Kill a random fish + M.health = M.maxHealth //Eating fish heals the predator else - to_chat(usr, "There are no fish in [src]!") + to_chat(M, "There are no fish in [src]!") else - attack_generic(M, M.harm_intent_damage) + return ..() else if(istype(M, /mob/living/simple_animal/hostile/bear)) if(M.a_intent == INTENT_HELP) //Bears can try to fish in open tanks on help intent if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open. - M.visible_message("[M.name] scrapes it's claws along \the [src]'s lid.", "The lid is closed, so you scrape your claws against \the [src]'s lid.") + M.visible_message("[M.name] scrapes it's claws along [src]'s lid.", "The lid is closed, so you scrape your claws against [src]'s lid.") else if(fish_count) //Tank must actually have fish to try catching one - M.visible_message("[M.name] reaches into \the[src] and attempts to fish through the opening!", "You reach into \the [src] and begin fishing through the opening!") - spawn(5) - if(water_level && prob(5)) //Bears are good at catching fish, only a 5% chance to fail - M.visible_message("[M.name] swipes at the water!", "You just barely missed that fish!") - else //No water or didn't slip, get that fish! - M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!") - kill_fish() //Kill a random fish - M.health = M.maxHealth //Eating fish heals the predator + M.visible_message("[M.name] reaches into [src] and attempts to fish through the opening!", "You reach into [src] and begin fishing through the opening!") + if(water_level && prob(5)) //Bears are good at catching fish, only a 5% chance to fail + M.visible_message("[M.name] swipes at the water!", "You just barely missed that fish!") + else //No water or didn't slip, get that fish! + M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!") + kill_fish() //Kill a random fish + M.health = M.maxHealth //Eating fish heals the predator else - to_chat(usr, "There are no fish in [src]!") + to_chat(M, "There are no fish in [src]!") else - attack_generic(M, M.harm_intent_damage) + return ..() else - if(M.melee_damage_upper > 0) //If the simple_animal has a melee_damage_upper defined, use that for the damage - attack_generic(M, M.melee_damage_upper) - else if(M.a_intent == INTENT_HARM) //Let any simple_animal try to break tanks when on harm intent - if(M.harm_intent_damage <= 0) return //If it doesn't do damage, don't bother with the attack - attack_generic(M, M.harm_intent_damage) - check_health() + return ..() -/obj/machinery/fishtank/attack_alien(mob/living/user as mob) - if(islarva(user)) return - attack_generic(user, 15) - -/obj/machinery/fishtank/attack_slime(mob/living/user as mob) - var/mob/living/carbon/slime/S = user - if(!S.is_adult) - return - attack_generic(user, rand(10, 15)) - -/obj/machinery/fishtank/attack_hand(mob/user as mob) - if(HULK in user.mutations) - user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!")) - user.visible_message("[user] smashes through [src]!") - destroy() - else if(usr.a_intent == INTENT_HARM) - user.changeNext_move(CLICK_CD_MELEE) +/obj/machinery/fishtank/attack_hand(mob/user) + user.changeNext_move(CLICK_CD_MELEE) + if(user.a_intent == INTENT_HARM) playsound(get_turf(src), 'sound/effects/glassknock.ogg', 80, 1) - usr.visible_message("[usr.name] bangs against the [src.name]!", \ - "You bang against the [src.name]!", \ + user.visible_message("[user.name] bangs against the [name]!", \ + "You bang against the [name]!", \ "You hear a banging sound.") else - user.changeNext_move(CLICK_CD_MELEE) - playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1) - usr.visible_message("[usr.name] taps on the [src.name].", \ - "You tap on the [src.name].", \ + playsound(loc, 'sound/effects/glassknock.ogg', 80, 1) + user.visible_message("[user.name] taps on the [name].", \ + "You tap on the [name].", \ "You hear a knocking sound.") - return -/obj/machinery/fishtank/proc/hit(var/damage, var/sound_effect = 1) - cur_health = max(0, cur_health - damage) - if(sound_effect) - playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1) - check_health() - -/obj/machinery/fishtank/attack_generic(mob/living/user, damage = 0) //used by attack_alien, attack_animal, and attack_slime - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - cur_health -= damage - if(cur_health <= 0) - user.visible_message("[user] smashes through \the [src]!") - destroy() - else //for nicer text~ - user.visible_message("[user] smashes into \the [src]!") - playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1) +/obj/machinery/fishtank/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) + . = ..() + if(.) //received damage check_health() -/obj/machinery/fishtank/attackby(var/obj/item/O, var/mob/user as mob) +/obj/machinery/fishtank/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + if(damage_amount) + playsound(src, 'sound/effects/Glasshit.ogg', 75, 1) + else + playsound(src, 'sound/weapons/tap.ogg', 50, 1) + if(BURN) + playsound(src, 'sound/items/Welder.ogg', 100, 1) + +/obj/machinery/fishtank/deconstruct(disassembled = TRUE) + if(QDELETED(src)) + return + if(!disassembled) + playsound(src, "shatter", 70, 1) + for(var/i in 1 to shard_count) //Produce the appropriate number of glass shards + var/obj/item/shard/S = new /obj/item/shard(get_turf(src)) + transfer_fingerprints_to(S) + if(water_level) //Spill any water that was left in the tank when it broke + spill_water() + else //We are deconstructing, make glass sheets instead of shards + new /obj/item/stack/sheet/glass(get_turf(src), shard_count + 1) //Produce the appropriate number of glass sheets, in a single stack + qdel(src) + +/obj/machinery/fishtank/attackby(obj/item/O, mob/user) //Welders repair damaged tanks on help intent, damage on all others - if(istype(O, /obj/item/weldingtool)) + if(iswelder(O)) var/obj/item/weldingtool/W = O if(user.a_intent == INTENT_HELP) if(W.isOn()) - if(cur_health < max_health) + if(obj_integrity < max_integrity) playsound(loc, W.usesound, 50, 1) - to_chat(usr, "You repair some of the cracks on \the [src].") - cur_health += 20 + to_chat(user, "You repair some of the cracks on [src].") + obj_integrity = min(obj_integrity + 20, max_integrity) check_health() else - to_chat(usr, "There is no damage to fix!") + to_chat(user, "There is no damage to fix!") else - if(cur_health < max_health) - to_chat(usr, "[W.name] must be on to repair this damage.") + if(obj_integrity < max_integrity) + to_chat(user, "[W] must be on to repair this damage.") else - user.changeNext_move(CLICK_CD_MELEE) - hit(W.force) - return + return ..() //Open reagent containers add and remove water - if(O.is_open_container()) + else if(O.is_open_container()) if(istype(O, /obj/item/reagent_containers/glass)) if(lid_switch) - to_chat(usr, "Open the lid on \the [src] first!") + to_chat(user, "Open the lid on [src] first!") return var/obj/item/reagent_containers/glass/C = O //Containers with any reagents will get dumped in @@ -652,57 +605,52 @@ C.reagents.clear_reagents() else if(water_level == water_capacity) - to_chat(usr, "[src] is already full!") - return + to_chat(user, "[src] is already full!") else message = "The filtration process purifies the water, raising the water level." if((water_level + water_value) == water_capacity) - message += " You filled \the [src] to the brim!" + message += " You filled [src] to the brim!" if((water_level + water_value) > water_capacity) - message += " You overfilled \the [src] and some water runs down the side, wasted." + message += " You overfilled [src] and some water runs down the side, wasted." C.reagents.clear_reagents() adjust_water_level(water_value) - user.visible_message("[user.name] pours the contents of [C.name] into \the [src].", "[message]") - return + user.visible_message("[user.name] pours the contents of [C.name] into [src].", "[message]") //Empty containers will scoop out water, filling the container as much as possible from the water_level else - if(water_level == 0) - to_chat(usr, "[src] is empty!") + if(!water_level) + to_chat(user, "[src] is empty!") else if(water_level >= C.volume) //Enough to fill the container completely C.reagents.add_reagent("fishwater", C.volume) adjust_water_level(-C.volume) - user.visible_message("[user.name] scoops out some water from \the [src].", "You completely fill [C.name] from \the [src].") + user.visible_message("[user.name] scoops out some water from [src].", "You completely fill [C.name] from [src].") else //Fill the container as much as possible with the water_level C.reagents.add_reagent("fishwater", water_level) adjust_water_level(-water_level) - user.visible_message("[user.name] scoops out some water from \the [src].", "You fill [C.name] with the last of the water in \the [src].") - return + user.visible_message("[user.name] scoops out some water from [src].", "You fill [C.name] with the last of the water in [src].") //Wrenches can deconstruct empty tanks, but not tanks with any water. Kills any fish left inside and destroys any unharvested eggs in the process - if(istype(O, /obj/item/wrench)) - if(water_level == 0) - to_chat(usr, "Now disassembling [src].") - playsound(src.loc, O.usesound, 50, 1) + else if(iswrench(O)) + if(!water_level) + to_chat(user, "Now disassembling [src].") + playsound(loc, O.usesound, 50, 1) if(do_after(user, 50 * O.toolspeed, target = src)) - destroy(1) + deconstruct(TRUE) else - to_chat(usr, "[src] must be empty before you disassemble it!") - return + to_chat(user, "[src] must be empty before you disassemble it!") //Fish eggs else if(istype(O, /obj/item/fish_eggs)) var/obj/item/fish_eggs/egg = O //Don't add eggs if there is no water (they kinda need that to live) - if(water_level == 0) - to_chat(usr, "[src] has no water; [egg.name] won't hatch without water!") + if(!water_level) + to_chat(user, "[src] has no water; [egg.name] won't hatch without water!") else //Don't add eggs if the tank already has the max number of fish if(fish_count >= max_fish) - to_chat(usr, "[src] can't hold any more fish.") + to_chat(user, "[src] can't hold any more fish.") else add_fish(egg.fish_type) qdel(egg) - return //Fish food else if(istype(O, /obj/item/fishfood)) //Only add food if there is water and it isn't already full of food @@ -711,33 +659,28 @@ if(fish_count == 0) user.visible_message("[user.name] shakes some fish food into the empty [src]... How sad.", "You shake some fish food into the empty [src]... If only it had fish.") else - user.visible_message("[user.name] feeds the fish in \the [src]. The fish look excited!", "You feed the fish in \the [src]. They look excited!") + user.visible_message("[user.name] feeds the fish in [src]. The fish look excited!", "You feed the fish in [src]. They look excited!") adjust_food_level(10) else - to_chat(usr, "[src] already has plenty of food in it. You decide to not add more.") + to_chat(user, "[src] already has plenty of food in it. You decide to not add more.") else - to_chat(usr, "[src] doesn't have any water in it. You should fill it with water first.") - return + to_chat(user, "[src] doesn't have any water in it. You should fill it with water first.") //Fish egg scoop else if(istype(O, /obj/item/egg_scoop)) if(egg_count) - user.visible_message("[user.name] harvests some fish eggs from \the [src].", "You scoop the fish eggs out of \the [src].") + user.visible_message("[user.name] harvests some fish eggs from [src].", "You scoop the fish eggs out of [src].") harvest_eggs(user) else - user.visible_message("[user.name] fails to harvest any fish eggs from \the [src].", "There are no fish eggs in \the [src] to scoop out.") - return + user.visible_message("[user.name] fails to harvest any fish eggs from [src].", "There are no fish eggs in [src] to scoop out.") //Fish net - if(istype(O, /obj/item/fish_net)) + else if(istype(O, /obj/item/fish_net)) harvest_fish(user) - return //Tank brush - if(istype(O, /obj/item/tank_brush)) + else if(istype(O, /obj/item/tank_brush)) if(filth_level == 0) - to_chat(usr, "[src] is already spotless!") + to_chat(user, "[src] is already spotless!") else adjust_filth_level(-filth_level) - user.visible_message("[user.name] scrubs the inside of \the [src], cleaning the filth.", "You scrub the inside of \the [src], cleaning the filth.") - else if(O && O.force) - user.visible_message("\The [src] has been attacked by [user.name] with \the [O]!") - hit(O.force) - return + user.visible_message("[user.name] scrubs the inside of [src], cleaning the filth.", "You scrub the inside of [src], cleaning the filth.") + else + return ..() \ No newline at end of file diff --git a/code/modules/flufftext/Dreaming.dm b/code/modules/flufftext/Dreaming.dm index 6a1d28eaf87..b69ed4738b6 100644 --- a/code/modules/flufftext/Dreaming.dm +++ b/code/modules/flufftext/Dreaming.dm @@ -43,7 +43,7 @@ nightmare() if(ishuman(src)) if(prob(10)) - emote("writhes in their sleep.") + emote("writhes in [p_their()] sleep.") dir = pick(cardinal) /mob/living/carbon/proc/experience_dream(dream_image, isNightmare) diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index a5aa4662c63..91ee910c8d4 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -47,7 +47,7 @@ to_chat(chugger, "You need to open [src] first!") return if(istype(chugger) && loc == chugger && src == chugger.get_active_hand() && reagents.total_volume) - chugger.visible_message("[chugger] raises the [src] to their mouth and starts [pick("chugging","gulping")] it down like [pick("a savage","a mad beast","it's going out of style","there's no tomorrow")]!", "You start chugging \the [src].", "You hear what sounds like gulping.") + chugger.visible_message("[chugger] raises the [src] to [chugger.p_their()] mouth and starts [pick("chugging","gulping")] it down like [pick("a savage","a mad beast","it's going out of style","there's no tomorrow")]!", "You start chugging [src].", "You hear what sounds like gulping.") while(do_mob(chugger, chugger, 40)) //Between the default time for do_mob and the time it takes for a vampire to suck blood. chugger.eat(src, chugger, 25) //Half of a glass, quarter of a bottle. if(!reagents.total_volume) //Finish in style. diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index a7274c53f4e..d9c59a46d58 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -102,8 +102,8 @@ target.visible_message("[user] has hit [target][head_attack_message] with a bottle of [name]!", \ "[user] has hit [target][head_attack_message] with a bottle of [name]!") else - user.visible_message("[target] hits \himself with a bottle of [name][head_attack_message]!", \ - "[target] hits \himself with a bottle of [name][head_attack_message]!") + user.visible_message("[target] hits [target.p_them()]self with a bottle of [name][head_attack_message]!", \ + "[target] hits [target.p_them()]self with a bottle of [name][head_attack_message]!") //Attack logs add_attack_logs(user, target, "Hit with [src]") diff --git a/code/modules/food_and_drinks/drinks/drinks/cans.dm b/code/modules/food_and_drinks/drinks/drinks/cans.dm index 282278c990e..979acf473fd 100644 --- a/code/modules/food_and_drinks/drinks/drinks/cans.dm +++ b/code/modules/food_and_drinks/drinks/drinks/cans.dm @@ -33,14 +33,14 @@ to_chat(user, "You need to open the drink!") return else if(M == user && !reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_sel.selecting == "head") - user.visible_message("[user] crushes ["\the [src]"] on \his forehead!", "You crush \the [src] on your forehead.") + user.visible_message("[user] crushes [src] on [user.p_their()] forehead!", "You crush [src] on your forehead.") crush(user) return return ..() /obj/item/reagent_containers/food/drinks/cans/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/storage/bag/trash/cyborg)) - user.visible_message("[user] crushes \the [src] in their trash compactor.", "You crush \the [src] in your trash compactor.") + user.visible_message("[user] crushes [src] in [user.p_their()] trash compactor.", "You crush [src] in your trash compactor.") var/obj/can = crush(user) can.attackby(I, user, params) return 1 diff --git a/code/modules/food_and_drinks/drinks/drinks/shotglass.dm b/code/modules/food_and_drinks/drinks/drinks/shotglass.dm index 24b50489402..393543b093c 100644 --- a/code/modules/food_and_drinks/drinks/drinks/shotglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/shotglass.dm @@ -38,7 +38,7 @@ /obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/proc/clumsilyDrink(mob/living/carbon/human/user) //Clowns beware if(burn_state != ON_FIRE) return - user.visible_message("[user] pours [src] all over themself!", "You pour [src] all over yourself!", "You hear a 'whoompf' and a sizzle.") + user.visible_message("[user] pours [src] all over [user.p_them()]self!", "You pour [src] all over yourself!", "You hear a 'whoompf' and a sizzle.") extinguish(TRUE) reagents.reaction(user, TOUCH) reagents.clear_reagents() @@ -90,7 +90,7 @@ if((CLUMSY in user.mutations) && prob(50)) clumsilyDrink(user) else - user.visible_message("[user] places their hand over [src] to put it out!", "You use your hand to extinguish [src]!") + user.visible_message("[user] places [user.p_their()] hand over [src] to put it out!", "You use your hand to extinguish [src]!") extinguish() /obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/MouseDrop(mob/living/carbon/human/user) diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm index f9ec698f196..b0c0d24efaa 100644 --- a/code/modules/food_and_drinks/food/condiment.dm +++ b/code/modules/food_and_drinks/food/condiment.dm @@ -47,7 +47,7 @@ if(!reagents || !reagents.total_volume) return // The condiment might be empty after the delay. user.visible_message("[user] feeds [M] from [src].") - add_attack_logs(user, M, "Fed [src] containing [reagentlist(src)]") + add_attack_logs(user, M, "Fed [src] containing [reagentlist()]") var/fraction = min(10/reagents.total_volume, 1) reagents.reaction(M, INGEST, fraction) @@ -131,7 +131,7 @@ possible_states = list() /obj/item/reagent_containers/food/condiment/saltshaker/suicide_act(mob/user) - user.visible_message("[user] begins to swap forms with the salt shaker! It looks like \he's trying to commit suicide.") + user.visible_message("[user] begins to swap forms with the salt shaker! It looks like [user.p_theyre()] trying to commit suicide.") var/newname = "[name]" name = "[user.name]" user.name = newname diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index bc442486d5c..3a730c3868d 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -99,6 +99,7 @@ U.overlays += I var/obj/item/reagent_containers/food/snacks/collected = new type + collected.name = name collected.loc = U collected.reagents.remove_any(collected.reagents.total_volume) collected.trash = null @@ -1040,6 +1041,21 @@ filling_color = "#EDDD00" list_reagents = list("nutriment" = 1, "vitamin" = 1) +/obj/item/reagent_containers/food/snacks/macaroni + name = "Macaroni twists" + desc = "These are little twists of raw macaroni." + icon_state = "macaroni" + filling_color = "#EDDD00" + list_reagents = list("nutriment" = 1, "vitamin" = 1) + +/obj/item/reagent_containers/food/snacks/macncheese + name = "Macaroni cheese" + desc = "One of the most comforting foods in the world. Apparently." + trash = /obj/item/trash/snack_bowl + icon_state = "macncheese" + filling_color = "#ffe45d" + list_reagents = list("nutriment" = 5, "vitamin" = 2, "cheese" = 4) + /obj/item/reagent_containers/food/snacks/cheesyfries name = "Cheesy Fries" desc = "Fries. Covered in cheese. Duh." @@ -1054,6 +1070,7 @@ icon_state = "fortune_cookie" filling_color = "#E8E79E" list_reagents = list("nutriment" = 3) + trash = /obj/item/paper/fortune /obj/item/reagent_containers/food/snacks/badrecipe name = "Burned mess" @@ -2072,6 +2089,20 @@ icon_state = "hawaiianpizzaslice" filling_color = "#e5b437" +/obj/item/reagent_containers/food/snacks/sliceable/pizza/macpizza + name = "Macaroni cheese pizza" + desc = "Gastronomists have yet to classify this dish as 'pizza'." + icon_state = "macpizza" + slice_path = /obj/item/reagent_containers/food/snacks/macpizzaslice + list_reagents = list("nutriment" = 40, "vitamin" = 5) //More nutriment because carbs, but it's not any more vitaminicious + filling_color = "#ffe45d" + +/obj/item/reagent_containers/food/snacks/macpizzaslice + name = "Macaroni cheese pizza slice" + desc = "A delicious slice of pizza topped with macaroni cheese... wait, what the hell? Who would do this?!" + icon_state = "macpizzaslice" + filling_color = "#ffe45d" + /obj/item/pizzabox name = "pizza box" desc = "A box suited for pizzas." diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm index b4a787ea4c8..6f6d9132fdf 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm @@ -58,7 +58,7 @@ C.emote("scream") user.changeNext_move(CLICK_CD_MELEE) C.apply_damage(25, BURN, "head") //25 fire damage and disfigurement because your face was just deep fried! - head.disfigure("burn") + head.disfigure() add_attack_logs(user, G.affecting, "Deep-fried with [src]") qdel(G) //Removes the grip so the person MIGHT have a small chance to run the fuck away and to prevent rapid dunks. return 0 diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index 0c2af905a74..a67b88f97d4 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -260,7 +260,7 @@ new /obj/effect/decal/cleanable/blood/gibs(src) if(!UserOverride) - add_attack_logs(user, occupant, "Gibbed in [src]", !!occupant.ckey) + add_attack_logs(user, occupant, "Gibbed in [src]", !!occupant.ckey ? ATKLOG_FEW : ATKLOG_ALL) if(!iscarbon(user)) occupant.LAssailant = null diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm index dfbea528d53..ad4dcb5e4d8 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm @@ -87,6 +87,10 @@ input = /obj/item/reagent_containers/food/snacks/doughslice output = /obj/item/reagent_containers/food/snacks/spaghetti +/datum/food_processor_process/macaroni + input = /obj/item/reagent_containers/food/snacks/spaghetti + output = /obj/item/reagent_containers/food/snacks/macaroni + /datum/food_processor_process/parsnip input = /obj/item/reagent_containers/food/snacks/grown/parsnip output = /obj/item/reagent_containers/food/snacks/roastparsnip diff --git a/code/modules/food_and_drinks/recipes/recipes_microwave.dm b/code/modules/food_and_drinks/recipes/recipes_microwave.dm index effbcef37ba..70169476c9d 100644 --- a/code/modules/food_and_drinks/recipes/recipes_microwave.dm +++ b/code/modules/food_and_drinks/recipes/recipes_microwave.dm @@ -396,6 +396,14 @@ ) result = /obj/item/reagent_containers/food/snacks/spesslaw +/datum/recipe/microwave/macncheese + reagents = list("water" = 5, "milk" = 5) + items = list( + /obj/item/reagent_containers/food/snacks/cheesewedge, + /obj/item/reagent_containers/food/snacks/macaroni, + ) + result = /obj/item/reagent_containers/food/snacks/macncheese + /datum/recipe/microwave/superbiteburger reagents = list("sodiumchloride" = 5, "blackpepper" = 5) items = list( diff --git a/code/modules/food_and_drinks/recipes/recipes_oven.dm b/code/modules/food_and_drinks/recipes/recipes_oven.dm index b4b636a6ee7..7dcfe199ded 100644 --- a/code/modules/food_and_drinks/recipes/recipes_oven.dm +++ b/code/modules/food_and_drinks/recipes/recipes_oven.dm @@ -180,21 +180,16 @@ result = /obj/item/reagent_containers/food/snacks/fortunecookie /datum/recipe/oven/fortunecookie/make_food(obj/container) - var/obj/item/paper/paper = locate() in container - paper.loc = null //prevent deletion + var/obj/item/paper/P = locate() in container + P.loc = null //So we don't delete the paper while cooking the cookie var/obj/item/reagent_containers/food/snacks/fortunecookie/being_cooked = ..() - paper.loc = being_cooked - being_cooked.trash = paper //so the paper is left behind as trash without special-snowflake(TM Nodrak) code ~carn + if(P.info) //If there's anything written on the paper, just move it into the fortune cookie + P.forceMove(being_cooked) //Prevents the oven deleting our paper + being_cooked.trash = P //so the paper is left behind as trash without special-snowflake(TM Nodrak) code ~carn + else + qdel(P) return being_cooked -/datum/recipe/oven/fortunecookie/check_items(obj/container) - . = ..() - if(.) - var/obj/item/paper/paper = locate() in container - if(!paper || !paper.info) - return -1 - return . - /datum/recipe/oven/pizzamargherita items = list( /obj/item/reagent_containers/food/snacks/sliceable/flatdough, @@ -264,6 +259,15 @@ ) result = /obj/item/reagent_containers/food/snacks/sliceable/pizza/hawaiianpizza +/datum/recipe/oven/macncheesepizza + items = list( + /obj/item/reagent_containers/food/snacks/sliceable/flatdough, + /obj/item/reagent_containers/food/snacks/cheesewedge, + /obj/item/reagent_containers/food/snacks/cheesewedge, + /obj/item/reagent_containers/food/snacks/macncheese, + ) + result = /obj/item/reagent_containers/food/snacks/sliceable/pizza/macpizza + /datum/recipe/oven/amanita_pie items = list( /obj/item/reagent_containers/food/snacks/sliceable/flatdough, diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm index 58cec86dc1c..950b873af55 100644 --- a/code/modules/hydroponics/beekeeping/beebox.dm +++ b/code/modules/hydroponics/beekeeping/beebox.dm @@ -179,7 +179,7 @@ visible_message("The [qb] refuses to settle down. Maybe it's something to do with its reagent?") if(queen_bee) - visible_message("[user] sets [qb] down inside the apiary, making it their new home.") + visible_message("[user] sets [qb] down inside the apiary, making it [user.p_their()] new home.") var/relocated = 0 for(var/b in bees) var/mob/living/simple_animal/hostile/poison/bees/worker/B = b diff --git a/code/modules/hydroponics/grown/banana.dm b/code/modules/hydroponics/grown/banana.dm index 36065efa298..6874038a7bf 100644 --- a/code/modules/hydroponics/grown/banana.dm +++ b/code/modules/hydroponics/grown/banana.dm @@ -25,7 +25,7 @@ bitesize = 5 /obj/item/reagent_containers/food/snacks/grown/banana/suicide_act(mob/user) - user.visible_message("[user] is aiming the [src.name] at themself! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is aiming the [name] at [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide.") playsound(loc, 'sound/items/bikehorn.ogg', 50, 1, -1) sleep(25) if(!user) @@ -34,7 +34,7 @@ sleep(25) if(!user) return (OXYLOSS) - user.visible_message("[user] laughs so hard they begin to suffocate!") + user.visible_message("[user] laughs so hard [user.p_they()] begin[user.p_s()] to suffocate!") return (OXYLOSS) /obj/item/grown/bananapeel @@ -49,7 +49,7 @@ throw_range = 7 /obj/item/grown/bananapeel/suicide_act(mob/user) - user.visible_message("[user] is deliberately slipping on the [src.name]! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is deliberately slipping on the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") playsound(loc, 'sound/misc/slip.ogg', 50, 1, -1) return (BRUTELOSS) diff --git a/code/modules/hydroponics/grown/citrus.dm b/code/modules/hydroponics/grown/citrus.dm index 157a2813b8f..86bc8082661 100644 --- a/code/modules/hydroponics/grown/citrus.dm +++ b/code/modules/hydroponics/grown/citrus.dm @@ -109,7 +109,7 @@ var/area/A = get_area(user) user.visible_message("[user] primes the [src]!", "You prime the [src]!") var/message = "[ADMIN_LOOKUPFLW(user)] primed a combustible lemon for detonation at [A] [ADMIN_COORDJMP(user)]" - bombers += message + investigate_log("[key_name(user)] primed a combustible lemon for detonation at [A] [COORD(user)].", INVESTIGATE_BOMB) message_admins(message) log_game("[key_name(user)] primed a combustible lemon for detonation at [A] [COORD(user)].") if(iscarbon(user)) diff --git a/code/modules/hydroponics/grown/kudzu.dm b/code/modules/hydroponics/grown/kudzu.dm index 0169e3bb5d9..09c16544396 100644 --- a/code/modules/hydroponics/grown/kudzu.dm +++ b/code/modules/hydroponics/grown/kudzu.dm @@ -22,7 +22,7 @@ return S /obj/item/seeds/kudzu/suicide_act(mob/user) - user.visible_message("[user] swallows the pack of kudzu seeds! It looks like \he's trying to commit suicide..") + user.visible_message("[user] swallows the pack of kudzu seeds! It looks like [user.p_theyre()] trying to commit suicide..") plant(user) return (BRUTELOSS) diff --git a/code/modules/hydroponics/grown/nettle.dm b/code/modules/hydroponics/grown/nettle.dm index c65c9dcf618..8bbe4a4e240 100644 --- a/code/modules/hydroponics/grown/nettle.dm +++ b/code/modules/hydroponics/grown/nettle.dm @@ -44,7 +44,7 @@ attack_verb = list("stung") /obj/item/grown/nettle/suicide_act(mob/user) - user.visible_message("[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is eating some of the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") return (BRUTELOSS|TOXLOSS) /obj/item/grown/nettle/pickup(mob/living/user) diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index 7bb064f752e..6b2da2c29ae 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -33,7 +33,7 @@ reagents.add_reagent("atrazine", 100) /obj/item/reagent_containers/spray/weedspray/suicide_act(mob/user) - user.visible_message("[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is huffing the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") return (TOXLOSS) /obj/item/reagent_containers/spray/pestspray // -- Skie @@ -55,7 +55,7 @@ reagents.add_reagent("pestkiller", 100) /obj/item/reagent_containers/spray/pestspray/suicide_act(mob/user) - user.visible_message("[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is huffing the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") return (TOXLOSS) /obj/item/cultivator @@ -89,7 +89,7 @@ sharp = 1 /obj/item/hatchet/suicide_act(mob/user) - user.visible_message("[user] is chopping at \himself with the [src.name]! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is chopping at [user.p_them()]self with the [name]! It looks like [user.p_theyre()] trying to commit suicide.") playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) return (BRUTELOSS) @@ -119,7 +119,7 @@ var/swiping = FALSE /obj/item/scythe/suicide_act(mob/user) - user.visible_message("[user] is beheading \himself with the [src.name]! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is beheading [user.p_them()]self with the [name]! It looks like [user.p_theyre()] trying to commit suicide.") if(ishuman(user)) var/mob/living/carbon/human/H = user var/obj/item/organ/external/affecting = H.get_organ("head") diff --git a/code/modules/library/computers/checkout.dm b/code/modules/library/computers/checkout.dm index 0f0774aa1f4..fdcfee0e87a 100644 --- a/code/modules/library/computers/checkout.dm +++ b/code/modules/library/computers/checkout.dm @@ -49,7 +49,7 @@ if(src.arcanecheckout) new /obj/item/tome(src.loc) to_chat(user, "Your sanity barely endures the seconds spent in the vault's browsing window. The only thing to remind you of this when you stop browsing is a dusty old tome sitting on the desk. You don't really remember printing it.") - user.visible_message("[user] stares at the blank screen for a few moments, his expression frozen in fear. When he finally awakens from it, he looks a lot older.", 2) + user.visible_message("[user] stares at the blank screen for a few moments, [user.p_their()] expression frozen in fear. When [user.p_they()] finally awaken[user.p_s()] from it, [user.p_they()] look[user.p_s()] a lot older.", 2) src.arcanecheckout = 0 if(1) // Inventory diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index df1753e1dd7..f42b7963104 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -60,7 +60,7 @@ D.apply_damage(damage, BRUTE, affecting, armor_block) - add_attack_logs(A, D, "Melee attacked with martial-art [src]", admin_notify = (damage > 0) ? TRUE : FALSE) + add_attack_logs(A, D, "Melee attacked with martial-art [src]", (damage > 0) ? null : ATKLOG_ALL) if((D.stat != DEAD) && damage >= A.species.punchstunthreshold) D.visible_message("[A] has weakened [D]!!", \ @@ -210,7 +210,7 @@ return ..() var/mob/living/carbon/C = target if(C.stat) - to_chat(user, "It would be dishonorable to attack a foe while they cannot retaliate.") + to_chat(user, "It would be dishonorable to attack a foe while [C.p_they()] cannot retaliate.") return switch(user.a_intent) if(INTENT_DISARM) @@ -236,7 +236,7 @@ if(H.staminaloss && !H.sleeping) var/total_health = (H.health - H.staminaloss) if(total_health <= config.health_threshold_crit && !H.stat) - H.visible_message("[user] delivers a heavy hit to [H]'s head, knocking them out cold!", \ + H.visible_message("[user] delivers a heavy hit to [H]'s head, knocking [H.p_them()] out cold!", \ "[user] knocks you unconscious!") H.SetSleeping(30) H.adjustBrainLoss(25) diff --git a/code/modules/martial_arts/mimejutsu.dm b/code/modules/martial_arts/mimejutsu.dm index 4d8edbf7236..38605c3538d 100644 --- a/code/modules/martial_arts/mimejutsu.dm +++ b/code/modules/martial_arts/mimejutsu.dm @@ -55,8 +55,8 @@ /datum/martial_art/mimejutsu/proc/mimePalm(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D) if(!D.stat && !D.stunned && !D.weakened) - D.visible_message("[A] has barely touched [D] with their palm!", \ - "[A] hovers their palm over your face!") + D.visible_message("[A] has barely touched [D] with [A.p_their()] palm!", \ + "[A] hovers [A.p_their()] palm over your face!") var/atom/throw_target = get_edge_target_turf(D, get_dir(D, get_step_away(D, A))) D.throw_at(throw_target, 200, 4,A) diff --git a/code/modules/martial_arts/sleeping_carp.dm b/code/modules/martial_arts/sleeping_carp.dm index 1cd29ac2511..a6cd25d50c0 100644 --- a/code/modules/martial_arts/sleeping_carp.dm +++ b/code/modules/martial_arts/sleeping_carp.dm @@ -94,7 +94,7 @@ if(D.weakened || D.resting || D.stat) A.do_attack_animation(D, ATTACK_EFFECT_PUNCH) D.visible_message("[A] elbow drops [D]!", \ - "[A] piledrives you with their elbow!") + "[A] piledrives you with [A.p_their()] elbow!") if(D.stat) D.death() //FINISH HIM! D.apply_damage(50, BRUTE, "chest") diff --git a/code/modules/mining/coins.dm b/code/modules/mining/coins.dm index 9f4f7629c7e..4d94793a5e9 100644 --- a/code/modules/mining/coins.dm +++ b/code/modules/mining/coins.dm @@ -106,7 +106,7 @@ return if(CC.use(1)) - overlays += image('icons/obj/items.dmi',"coin_string_overlay") + overlays += image('icons/obj/economy.dmi',"coin_string_overlay") string_attached = 1 to_chat(user, "You attach a string to the coin.") else diff --git a/code/modules/mining/lavaland/loot/ashdragon_loot.dm b/code/modules/mining/lavaland/loot/ashdragon_loot.dm index fba4725e5f0..ff0db975895 100644 --- a/code/modules/mining/lavaland/loot/ashdragon_loot.dm +++ b/code/modules/mining/lavaland/loot/ashdragon_loot.dm @@ -52,7 +52,7 @@ return to_chat(user, "You call out for aid, attempting to summon spirits to your side.") - notify_ghosts("[user] is raising their [src], calling for your help!", enter_link="(Click to help)", source = user, action = NOTIFY_FOLLOW) + notify_ghosts("[user] is raising [user.p_their()] [src], calling for your help!", enter_link="(Click to help)", source = user, action = NOTIFY_FOLLOW) summon_cooldown = world.time + 600 diff --git a/code/modules/mining/lavaland/loot/bubblegum_loot.dm b/code/modules/mining/lavaland/loot/bubblegum_loot.dm index 03ee7eb0a8d..613239b58a9 100644 --- a/code/modules/mining/lavaland/loot/bubblegum_loot.dm +++ b/code/modules/mining/lavaland/loot/bubblegum_loot.dm @@ -75,7 +75,7 @@ for(var/mob/living/carbon/human/H in player_list) if(H == L) continue - to_chat(H, "You have an overwhelming desire to kill [L]. They have been marked red! Go kill them!") + to_chat(H, "You have an overwhelming desire to kill [L]. [L.p_they(TRUE)] [L.p_have()] been marked red! Go kill [L.p_them()]!") H.put_in_hands(new /obj/item/kitchen/knife/butcher(H)) qdel(src) \ No newline at end of file diff --git a/code/modules/mining/lavaland/loot/hierophant_loot.dm b/code/modules/mining/lavaland/loot/hierophant_loot.dm index 62d72d4a0a9..1d66d59d316 100644 --- a/code/modules/mining/lavaland/loot/hierophant_loot.dm +++ b/code/modules/mining/lavaland/loot/hierophant_loot.dm @@ -57,7 +57,7 @@ return if(!rune) if(isturf(user.loc)) - user.visible_message("[user] holds [src] carefully in front of them, moving it in a strange pattern...", \ + user.visible_message("[user] holds [src] carefully in front of [user.p_them()], moving it in a strange pattern...", \ "You start creating a hierophant rune to teleport to...") timer = world.time + 51 if(do_after(user, 50, target = user)) @@ -67,7 +67,7 @@ var/obj/effect/hierophant/H = new/obj/effect/hierophant(T) rune = H user.update_action_buttons_icon() - user.visible_message("[user] creates a strange rune beneath them!", \ + user.visible_message("[user] creates a strange rune beneath [user.p_them()]!", \ "You create a hierophant rune, which you can teleport yourself and any allies to at any time!\n\ You can remove the rune to place a new one by striking it with the staff.") else diff --git a/code/modules/mining/lavaland/loot/legion_loot.dm b/code/modules/mining/lavaland/loot/legion_loot.dm index 210710db4d9..f11d6162f55 100644 --- a/code/modules/mining/lavaland/loot/legion_loot.dm +++ b/code/modules/mining/lavaland/loot/legion_loot.dm @@ -5,7 +5,6 @@ item_state = "staffofstorms" icon = 'icons/obj/guns/magic.dmi' slot_flags = SLOT_BACK - item_state = "staffofstorms" w_class = WEIGHT_CLASS_BULKY force = 25 damtype = BURN @@ -19,34 +18,36 @@ return var/area/user_area = get_area(user) + var/turf/user_turf = get_turf(user) + if(!user_area || !user_turf) + to_chat(user, "Something is preventing you from using the staff here.") + return var/datum/weather/A - var/z_level_name = space_manager.levels_by_name[user.z] - for(var/V in weather_master.existing_weather) + for(var/V in SSweather.processing) var/datum/weather/W = V - if(W.target_z == z_level_name && W.area_type == user_area.type) + if((user_turf.z in W.impacted_z_levels) && W.area_type == user_area.type) A = W break - if(A) + if(A) if(A.stage != END_STAGE) if(A.stage == WIND_DOWN_STAGE) to_chat(user, "The storm is already ending! It would be a waste to use the staff now.") return user.visible_message("[user] holds [src] skywards as an orange beam travels into the sky!", \ "You hold [src] skyward, dispelling the storm!") - playsound(user, 'sound/magic/Staff_Change.ogg', 200, 0) + playsound(user, 'sound/magic/staff_change.ogg', 200, 0) A.wind_down() return else - A = new storm_type + A = new storm_type(list(user_turf.z)) A.name = "staff storm" A.area_type = user_area.type - A.target_z = z_level_name A.telegraph_duration = 100 A.end_duration = 100 user.visible_message("[user] holds [src] skywards as red lightning crackles into the sky!", \ "You hold [src] skyward, calling down a terrible storm!") - playsound(user, 'sound/magic/Staff_Change.ogg', 200, 0) + playsound(user, 'sound/magic/staff_change.ogg', 200, 0) A.telegraph() storm_cooldown = world.time + 200 diff --git a/code/modules/mining/lavaland/loot/tendril_loot.dm b/code/modules/mining/lavaland/loot/tendril_loot.dm index 9c6ea675ba3..e1c6c7f28a9 100644 --- a/code/modules/mining/lavaland/loot/tendril_loot.dm +++ b/code/modules/mining/lavaland/loot/tendril_loot.dm @@ -355,7 +355,7 @@ if(cooldown < world.time) feedback_add_details("immortality_talisman","U") // usage cooldown = world.time + 600 - user.visible_message("[user] vanishes from reality, leaving a a hole in their place!") + user.visible_message("[user] vanishes from reality, leaving a a hole in [user.p_their()] place!") var/obj/effect/immortality_talisman/Z = new(get_turf(src.loc)) Z.name = "hole in reality" Z.desc = "It's shaped an awful lot like [user.name]." diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 1ef887c2527..0a151babe67 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -341,20 +341,28 @@ //Pod turfs and objects //Window +/obj/structure/window/shuttle/survival_pod + name = "pod window" + icon = 'icons/obj/smooth_structures/pod_window.dmi' + icon_state = "smooth" + dir = FULLTILE_WINDOW_DIR + max_integrity = 100 + fulltile = TRUE + reinf = TRUE + heat_resistance = 1600 + armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100) + smooth = SMOOTH_MORE + canSmoothWith = list(/turf/simulated/wall/mineral/titanium/survival, /obj/machinery/door/airlock/survival_pod, /obj/structure/window/shuttle/survival_pod) + explosion_block = 3 + level = 3 + glass_type = /obj/item/stack/sheet/titaniumglass + glass_amount = 2 + /obj/structure/window/reinforced/survival_pod name = "pod window" icon = 'icons/obj/lavaland/survival_pod.dmi' icon_state = "pwindow" -// This override can be removed whenever we get rid of the stupid fucking `dir = 9` = full tile!!!! shit -/obj/structure/window/reinforced/survival_pod/CanPass(atom/movable/mover, turf/target, height=0) - if(istype(mover) && mover.checkpass(PASSGLASS)) - return 1 - if(get_dir(loc, target) == dir) - return !density - else - return 1 - //Floors /turf/simulated/floor/pod name = "pod floor" diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 711d4cea992..57be913c699 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -70,7 +70,7 @@ if(speaker == src) to_chat(src, "You cannot hear yourself speak!") else - to_chat(src, "[speaker_name][alt_name] talks but you cannot hear them.") + to_chat(src, "[speaker_name][alt_name] talks but you cannot hear [speaker.p_them()].") else if(language) to_chat(src, "[speaker_name][alt_name] [track][language.format_message(message, verb)]") diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index dc2e8ee7106..93bdfe30c27 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -310,12 +310,7 @@ to_chat(speaker,"You can't communicate while unable to move your hands to your head!") return FALSE - var/their = "their" - if(speaker.gender == "female") - their = "her" - if(speaker.gender == "male") - their = "his" - speaker.visible_message("[speaker] touches [their] fingers to [their] temple.") //If placed in grey/broadcast, it will happen regardless of the success of the action. + speaker.visible_message("[speaker] touches [speaker.p_their()] fingers to [speaker.p_their()] temple.") //If placed in grey/broadcast, it will happen regardless of the success of the action. return TRUE diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index e706b89ca85..8f74fbce413 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -1,7 +1,3 @@ -#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point -#define HEAT_DAMAGE_LEVEL_2 3 //Amount of damage applied when your body temperature passes the 400K point -#define HEAT_DAMAGE_LEVEL_3 8 //Amount of damage applied when your body temperature passes the 1000K point - /mob/living/carbon/alien name = "alien" voice_name = "alien" @@ -229,10 +225,6 @@ Des: Removes all infected images from the alien. /mob/living/carbon/alien/can_use_vents() return -#undef HEAT_DAMAGE_LEVEL_1 -#undef HEAT_DAMAGE_LEVEL_2 -#undef HEAT_DAMAGE_LEVEL_3 - /mob/living/carbon/alien/handle_footstep(turf/T) if(..()) if(T.footstep_sounds["xeno"]) diff --git a/code/modules/mob/living/carbon/alien/alien_defense.dm b/code/modules/mob/living/carbon/alien/alien_defense.dm index 0d9c50ba5cc..72bf30ceedf 100644 --- a/code/modules/mob/living/carbon/alien/alien_defense.dm +++ b/code/modules/mob/living/carbon/alien/alien_defense.dm @@ -35,7 +35,7 @@ In all, this is a lot like the monkey code. /N visible_message("[M.name] bites [src]!", \ "[M.name] bites [src]!") adjustBruteLoss(damage) - add_attack_logs(M, src, "Alien attack", FALSE) + add_attack_logs(M, src, "Alien attack", ATKLOG_ALL) updatehealth() else to_chat(M, "[name] is too injured for that.") diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index a2527317eec..7f23be77774 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -161,7 +161,7 @@ Doesn't work on other aliens/AI.*/ stomach_contents.Remove(M) M.loc = loc //Paralyse(10) - src.visible_message("[src] hurls out the contents of their stomach!") + src.visible_message("[src] hurls out the contents of [p_their()] stomach!") return /mob/living/carbon/proc/getPlasma() diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm index 41ebc8d8247..3fa08702605 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm @@ -1,16 +1,25 @@ +/mob/living/carbon/alien/humanoid/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) + if(user.a_intent == INTENT_HARM) + ..(user, TRUE) + adjustBruteLoss(15) + var/hitverb = "punched" + if(mob_size < MOB_SIZE_LARGE) + Paralyse(1) + spawn(0) + step_away(src, user, 15) + sleep(1) + step_away(src, user, 15) + hitverb = "slammed" + playsound(loc, "punch", 25, 1, -1) + visible_message("[user] has [hitverb] [src]!", "[user] has [hitverb] [src]!") + return TRUE + /mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M) if(..()) switch(M.a_intent) if(INTENT_HARM) var/damage = rand(1, 9) if(prob(90)) - if(HULK in M.mutations)//HULK SMASH - damage = 15 - spawn(0) - Paralyse(1) - step_away(src, M, 15) - sleep(3) - step_away(src, M, 15) playsound(loc, "punch", 25, 1, -1) visible_message("[M] has punched [src]!", \ "[M] has punched [src]!") diff --git a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm index f1bcfc0eeaf..44287493718 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm @@ -3,7 +3,7 @@ #define X_SUIT_LAYER 2 #define X_L_HAND_LAYER 3 #define X_R_HAND_LAYER 4 -#define TARGETED_LAYER 5 +#define X_TARGETED_LAYER 5 #define X_FIRE_LAYER 6 #define X_TOTAL_LAYERS 6 ///////////////////////////////// @@ -161,6 +161,6 @@ #undef X_SUIT_LAYER #undef X_L_HAND_LAYER #undef X_R_HAND_LAYER -#undef TARGETED_LAYER +#undef X_TARGETED_LAYER #undef X_FIRE_LAYER #undef X_TOTAL_LAYERS diff --git a/code/modules/mob/living/carbon/alien/larva/larva_defense.dm b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm index ef38327b5ee..919eecee8d8 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva_defense.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm @@ -2,13 +2,6 @@ if(..()) var/damage = rand(1, 9) if(prob(90)) - if(HULK in M.mutations) - damage += 5 - spawn(0) - Paralyse(1) - step_away(src, M, 15) - sleep(3) - step_away(src, M, 15) playsound(loc, "punch", 25, 1, -1) add_attack_logs(M, src, "Melee attacked with fists") visible_message("[M] has kicked [src]!", \ @@ -23,6 +16,18 @@ visible_message("[M] has attempted to kick [src]!", \ "[M] has attempted to kick [src]!") + +/mob/living/carbon/alien/larva/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) + if(user.a_intent == INTENT_HARM) + ..(user, TRUE) + adjustBruteLoss(5 + rand(1, 9)) + spawn(0) + Paralyse(1) + step_away(src, user, 15) + sleep(3) + step_away(src, user, 15) + return TRUE + /mob/living/carbon/alien/larva/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y) if(!no_effect && !visual_effect_icon) visual_effect_icon = ATTACK_EFFECT_BITE diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 99d5c795eb5..e3069f4d5d3 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -16,6 +16,9 @@ var/obj/mecha/mecha = null//This does not appear to be used outside of reference in mecha.dm. // I'm using this for mechs giving MMIs HUDs now + var/obj/item/radio/radio = null // For use with the radio MMI upgrade + var/datum/action/generic/configure_mmi_radio/radio_action = null + /obj/item/mmi/attackby(var/obj/item/O as obj, var/mob/user as mob, params) if(istype(O, /obj/item/organ/internal/brain/crystal )) to_chat(user, " This brain is too malformed to be able to use with the [src].") @@ -29,34 +32,70 @@ to_chat(user, "Somehow, this MMI still has a brain in it. Report this to the bug tracker.") log_runtime(EXCEPTION("[user] tried to stick a [O] into [src] in [get_area(src)], but the held brain variable wasn't cleared"), src) return - for(var/mob/V in viewers(src, null)) - V.show_message("[user] sticks \a [O] into \the [src].") - brainmob = B.brainmob - B.brainmob = null - brainmob.loc = src - brainmob.container = src - brainmob.stat = CONSCIOUS - respawnable_list -= brainmob - dead_mob_list -= brainmob//Update dem lists - living_mob_list += brainmob + if(user.drop_item()) + B.forceMove(src) + visible_message("[user] sticks \a [O] into \the [src].") + brainmob = B.brainmob + B.brainmob = null + brainmob.loc = src + brainmob.container = src + brainmob.stat = CONSCIOUS + respawnable_list -= brainmob + dead_mob_list -= brainmob//Update dem lists + living_mob_list += brainmob - user.drop_item() - B.forceMove(src) - held_brain = B - if(istype(O,/obj/item/organ/internal/brain/xeno)) // kept the type check, as it still does other weird stuff - name = "Man-Machine Interface: Alien - [brainmob.real_name]" - icon = 'icons/mob/alien.dmi' - icon_state = "AlienMMI" - alien = 1 + held_brain = B + if(istype(O,/obj/item/organ/internal/brain/xeno)) // kept the type check, as it still does other weird stuff + name = "Man-Machine Interface: Alien - [brainmob.real_name]" + icon = 'icons/mob/alien.dmi' + become_occupied("AlienMMI") + alien = 1 + else + name = "Man-Machine Interface: [brainmob.real_name]" + icon = B.mmi_icon + become_occupied("[B.mmi_icon_state]") + alien = 0 + + if(radio_action) + radio_action.UpdateButtonIcon() + feedback_inc("cyborg_mmis_filled",1) else - name = "Man-Machine Interface: [brainmob.real_name]" - icon = B.mmi_icon - icon_state = "[B.mmi_icon_state]" - alien = 0 - feedback_inc("cyborg_mmis_filled",1) + to_chat(user, "You can't drop [B]!") return + if(istype(O, /obj/item/mmi_radio_upgrade)) + if(radio) + to_chat(user, "[src] already has a radio installed.") + else + user.visible_message("[user] begins to install the [O] into [src]...", \ + "You start to install the [O] into [src]...") + if(do_after(user, 20, target=src)) + if(user.drop_item()) + user.visible_message("[user] installs [O] in [src].", \ + "You install [O] in [src].") + if(brainmob) + to_chat(brainmob, "MMI radio capability installed.") + install_radio() + qdel(O) + else + to_chat(user, "You can't drop [O]!") + return + + // Maybe later add encryption key support, but that's a pain in the neck atm + if(isscrewdriver(O)) + if(radio) + user.visible_message("[user] begins to uninstall the radio from [src]...", \ + "You start to uninstall the radio from [src]...") + if(do_after(user, 40 * O.toolspeed, target = src)) + uninstall_radio() + new /obj/item/mmi_radio_upgrade(get_turf(src)) + user.visible_message("[user] uninstalls the radio from [src].", \ + "You uninstall the radio from [src].") + else + to_chat(user, "There is no radio in [src]!") + return + if(brainmob) O.attack(brainmob, user)//Oh noooeeeee // Brainmobs can take damage, but they can't actually die. Maybe should fix. @@ -93,8 +132,7 @@ held_brain.name = "\the [brainmob.name]'s [initial(held_brain.name)]" name = "Man-Machine Interface: [brainmob.real_name]" - icon_state = "mmi_full" - return + become_occupied("mmi_full") //I made this proc as a way to have a brainmob be transferred to any created brain, and to solve the //problem i was having with alien/nonalien brain drops. @@ -116,31 +154,54 @@ held_brain.forceMove(dropspot) held_brain = null +/obj/item/mmi/proc/become_occupied(var/new_icon) + icon_state = new_icon + if(radio) + radio_action.ApplyIcon() -/obj/item/mmi/radio_enabled - name = "Radio-enabled Man-Machine Interface" - desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity. This one comes with a built-in radio." - origin_tech = "biotech=2;programming=3;engineering=2;magnets=2" +/obj/item/mmi/examine(mob/user) + . = ..() + if(radio) + to_chat(user, "A radio is installed on [src].") - var/obj/item/radio/radio = null//Let's give it a radio. +/obj/item/mmi/proc/install_radio() + radio = new(src) + radio.broadcasting = TRUE + radio_action = new(radio, src) + if(brainmob && brainmob.loc == src) + radio_action.Grant(brainmob) -/obj/item/mmi/radio_enabled/New() - ..() - radio = new(src)//Spawns a radio inside the MMI. - radio.broadcasting = 1//So it's broadcasting from the start. +/obj/item/mmi/proc/uninstall_radio() + QDEL_NULL(radio) + QDEL_NULL(radio_action) -/obj/item/mmi/radio_enabled/verb/Toggle_Listening() - set name = "Toggle Listening" - set desc = "Toggle listening channel on or off." - set category = "MMI" - set src = usr.loc - set popup_menu = 0 +/datum/action/generic/configure_mmi_radio + name = "Configure MMI Radio" + desc = "Configure the radio installed in your MMI." + check_flags = AB_CHECK_CONSCIOUS + procname = "ui_interact" + var/obj/item/mmi = null - if(brainmob.stat) - to_chat(brainmob, "Can't do that while incapacitated or dead.") +/datum/action/generic/configure_mmi_radio/New(var/Target, var/obj/item/mmi/M) + . = ..() + mmi = M - radio.listening = radio.listening==1 ? 0 : 1 - to_chat(brainmob, "Radio is [radio.listening==1 ? "now" : "no longer"] receiving broadcast.") +/datum/action/generic/configure_mmi_radio/Destroy() + mmi = null + return ..() + +/datum/action/generic/configure_mmi_radio/ApplyIcon(obj/screen/movable/action_button/current_button) + // A copy/paste of the item action icon code + current_button.overlays.Cut() + if(target) + var/obj/item/I = mmi + var/old_layer = I.layer + var/old_plane = I.plane + I.layer = 21 + I.plane = HUD_PLANE + current_button.overlays += I + I.layer = old_layer + I.plane = old_plane /obj/item/mmi/emp_act(severity) if(!brainmob) @@ -168,8 +229,22 @@ borg.mmi = null QDEL_NULL(brainmob) QDEL_NULL(held_brain) + QDEL_NULL(radio) + QDEL_NULL(radio_action) return ..() +// These two procs are important for when an MMI pilots a mech +// (Brainmob "enters/leaves" the MMI when piloting) +// Also neatly handles basically every case where a brain +// is inserted or removed from an MMI +/obj/item/mmi/Entered(atom/movable/A) + if(radio && istype(A, /mob/living/carbon/brain)) + radio_action.Grant(A) + +/obj/item/mmi/Exited(atom/movable/A) + if(radio && istype(A, /mob/living/carbon/brain)) + radio_action.Remove(A) + /obj/item/mmi/syndie name = "Syndicate Man-Machine Interface" desc = "Syndicate's own brand of MMI. It enforces laws designed to help Syndicate agents achieve their goals upon cyborgs created with it, but doesn't fit in Nanotrasen AI cores." @@ -190,10 +265,25 @@ forceMove(holder) holder.stored_mmi = src holder.update_from_mmi() - if(istype(src, /obj/item/mmi/posibrain)) - holder.robotize() if(brainmob && brainmob.mind) brainmob.mind.transfer_to(H) holder.insert(H) return 1 + +// As a synthetic, the only limit on visibility is view range +/obj/item/mmi/contents_nano_distance(var/src_object, var/mob/living/user) + if((src_object in view(src)) && get_dist(src_object, src) <= user.client.view) + return STATUS_INTERACTIVE // interactive (green visibility) + return user.shared_living_nano_distance(src_object) + +// For now the only thing that is helped by this is radio access +// Later a more intricate system for MMI UI interaction can be established +/obj/item/mmi/contents_nano_interact(var/src_object, var/mob/living/user) + if(!istype(user, /mob/living/carbon/brain)) + log_runtime(EXCEPTION("Somehow a non-brain mob is inside an MMI!"), user) + return ..() + var/mob/living/carbon/brain/BM = user + if(BM.container == src && src_object == radio) + return STATUS_INTERACTIVE + return ..() diff --git a/code/modules/mob/living/carbon/brain/MMI_radio.dm b/code/modules/mob/living/carbon/brain/MMI_radio.dm new file mode 100644 index 00000000000..6eeaa44a42c --- /dev/null +++ b/code/modules/mob/living/carbon/brain/MMI_radio.dm @@ -0,0 +1,5 @@ +/obj/item/mmi_radio_upgrade + name = "MMI radio upgrade" + desc = "Enables radio capability on MMIs when either installed directly on the MMI, or through a cyborg's chassis." + icon = 'icons/obj/module.dmi' + icon_state = "cyborg_upgrade1" diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index 2abc612f758..0a8f6fb3b83 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -14,7 +14,8 @@ organ_tag = "brain" parent_organ = "head" slot = "brain" - vital = 1 + vital = TRUE + hidden_pain = TRUE //the brain has no pain receptors, and brain damage is meant to be a stealthy damage type. var/mmi_icon = 'icons/obj/assemblies.dmi' var/mmi_icon_state = "mmi_full" diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm deleted file mode 100644 index f5e575dccaf..00000000000 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ /dev/null @@ -1,205 +0,0 @@ -/obj/item/mmi/posibrain - name = "positronic brain" - desc = "A cube of shining metal, four inches to a side and covered in shallow grooves." - icon = 'icons/obj/assemblies.dmi' - icon_state = "posibrain" - w_class = WEIGHT_CLASS_NORMAL - origin_tech = "biotech=3;programming=3;plasmatech=2" - - var/searching = 0 - var/askDelay = 10 * 60 * 1 - //var/mob/living/carbon/brain/brainmob = null - var/list/ghost_volunteers[0] - req_access = list(access_robotics) - mecha = null//This does not appear to be used outside of reference in mecha.dm. - var/silenced = 0 //if set to 1, they can't talk. - var/next_ping_at = 0 - -/obj/item/mmi/posibrain/examine(mob/user) - if(..(user, 1)) - to_chat(user, "Its speaker is turned [silenced ? "off" : "on"].") - -/obj/item/mmi/posibrain/attack_self(mob/user) - if(brainmob && !brainmob.key && searching == 0) - //Start the process of searching for a new user. - to_chat(user, "You carefully locate the manual activation switch and start the positronic brain's boot process.") - icon_state = "posibrain-searching" - ghost_volunteers.Cut() - searching = 1 - request_player() - spawn(600) - if(ghost_volunteers.len) - var/mob/dead/observer/O - while(!istype(O) && ghost_volunteers.len) - O = pick_n_take(ghost_volunteers) - if(istype(O) && check_observer(O)) - transfer_personality(O) - reset_search() - else - silenced = !silenced - to_chat(user, "You toggle the speaker [silenced ? "off" : "on"].") - if(brainmob && brainmob.key) - to_chat(brainmob, "Your internal speaker has been toggled [silenced ? "off" : "on"].") - -/obj/item/mmi/posibrain/proc/request_player() - for(var/mob/dead/observer/O in player_list) - if(check_observer(O)) - to_chat(O, "\A [src] has been activated. (Teleport | Sign Up)") - -/obj/item/mmi/posibrain/proc/check_observer(var/mob/dead/observer/O) - if(cannotPossess(O)) - return 0 - if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept")) - return 0 - if(!O.can_reenter_corpse) - return 0 - if(O.client) - return 1 - return 0 - -/obj/item/mmi/posibrain/proc/question(var/client/C) - spawn(0) - if(!C) return - var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round") - if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located. - if(response == "Yes") - transfer_personality(C.mob) - else if(response == "Never for this round") - C.prefs.be_special -= ROLE_POSIBRAIN - -// This should not ever happen, but let's be safe -/obj/item/mmi/posibrain/dropbrain(var/turf/dropspot) - log_runtime(EXCEPTION("[src] at [loc] attempted to drop brain without a contained brain."), src) - return - -/obj/item/mmi/posibrain/transfer_identity(var/mob/living/carbon/H) - name = "positronic brain ([H])" - if(isnull(brainmob.dna)) - brainmob.dna = H.dna.Clone() - brainmob.name = brainmob.dna.real_name - brainmob.real_name = brainmob.name - brainmob.timeofhostdeath = H.timeofdeath - brainmob.stat = CONSCIOUS - if(brainmob.mind) - brainmob.mind.assigned_role = "Positronic Brain" - if(H.mind) - H.mind.transfer_to(brainmob) - to_chat(brainmob, "You feel slightly disoriented. That's normal when you're just a metal cube.") - icon_state = "posibrain-occupied" - return - -/obj/item/mmi/posibrain/proc/transfer_personality(var/mob/candidate) - src.searching = 0 - src.brainmob.key = candidate.key - src.name = "positronic brain ([src.brainmob.name])" - - to_chat(src.brainmob, "You are a positronic brain, brought into existence on [station_name()].") - to_chat(src.brainmob, "As a synthetic intelligence, you answer to all crewmembers, as well as the AI.") - to_chat(src.brainmob, "Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.") - src.brainmob.mind.assigned_role = "Positronic Brain" - - var/turf/T = get_turf_or_move(src.loc) - for(var/mob/M in viewers(T)) - M.show_message("The positronic brain chimes quietly.") - icon_state = "posibrain-occupied" - -/obj/item/mmi/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer. - if(src.brainmob && src.brainmob.key) return - - src.searching = 0 - icon_state = "posibrain" - - var/turf/T = get_turf_or_move(src.loc) - for(var/mob/M in viewers(T)) - M.show_message("The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?") - -/obj/item/mmi/posibrain/Topic(href,href_list) - if("signup" in href_list) - var/mob/dead/observer/O = locate(href_list["signup"]) - if(!O) return - volunteer(O) - -/obj/item/mmi/posibrain/proc/volunteer(var/mob/dead/observer/O) - if(!searching) - to_chat(O, "Not looking for a ghost, yet.") - return - if(!istype(O)) - to_chat(O, "Error.") - return - if(O in ghost_volunteers) - to_chat(O, "Removed from registration list.") - ghost_volunteers.Remove(O) - return - if(!check_observer(O)) - to_chat(O, "You cannot be \a [src].") - return - if(cannotPossess(O)) - to_chat(O, "Upon using the antagHUD you forfeited the ability to join the round.") - return - if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept")) - to_chat(O, "You are job banned from this role.") - return - to_chat(O., "You've been added to the list of ghosts that may become this [src]. Click again to unvolunteer.") - ghost_volunteers.Add(O) - - -/obj/item/mmi/posibrain/examine(mob/user) - to_chat(user, "*---------*") - if(!..(user)) - to_chat(user, "*---------*") - return - - var/msg = "" - - if(src.brainmob && src.brainmob.key) - switch(src.brainmob.stat) - if(CONSCIOUS) - if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk - if(UNCONSCIOUS) msg += "It doesn't seem to be responsive.\n" - if(DEAD) msg += "It appears to be completely inactive.\n" - else - msg += "It appears to be completely inactive.\n" - msg += "*---------*" - to_chat(user, msg) - -/obj/item/mmi/posibrain/emp_act(severity) - if(!src.brainmob) - return - else - switch(severity) - if(1) - src.brainmob.emp_damage += rand(20,30) - if(2) - src.brainmob.emp_damage += rand(10,20) - if(3) - src.brainmob.emp_damage += rand(0,10) - ..() - -/obj/item/mmi/posibrain/New() - src.brainmob = new(src) - src.brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]" - src.brainmob.real_name = src.brainmob.name - src.brainmob.loc = src - src.brainmob.container = src - src.brainmob.stat = 0 - src.brainmob.SetSilence(0) - dead_mob_list -= src.brainmob - - ..() - -/obj/item/mmi/posibrain/attack_ghost(var/mob/dead/observer/O) - if(searching) - volunteer(O) - return - if(brainmob && brainmob.key) - return // No point pinging a posibrain with a player already inside - if(check_observer(O) && (world.time >= next_ping_at)) - next_ping_at = world.time + (20 SECONDS) - playsound(get_turf(src), 'sound/items/posiping.ogg', 80, 0) - var/turf/T = get_turf_or_move(src.loc) - for(var/mob/M in viewers(T)) - M.show_message("The positronic brain pings softly.") - -/obj/item/mmi/posibrain/ipc - desc = "A cube of shining metal, four inches to a side and covered in shallow grooves. The speaker switch is set to 'off'." - silenced = 1 diff --git a/code/modules/mob/living/carbon/brain/robotic_brain.dm b/code/modules/mob/living/carbon/brain/robotic_brain.dm new file mode 100644 index 00000000000..ea83ab90206 --- /dev/null +++ b/code/modules/mob/living/carbon/brain/robotic_brain.dm @@ -0,0 +1,231 @@ +/obj/item/mmi/robotic_brain + name = "robotic brain" + desc = "An advanced circuit, capable of housing a non-sentient synthetic intelligence." + icon = 'icons/obj/module.dmi' + icon_state = "boris_blank" + var/blank_icon = "boris_blank" + var/searching_icon = "boris_recharging" + var/occupied_icon = "boris" + w_class = WEIGHT_CLASS_NORMAL + origin_tech = "biotech=3;programming=3;plasmatech=2" + + var/searching = FALSE + var/askDelay = 10 * 60 * 1 + //var/mob/living/carbon/brain/brainmob = null + var/list/ghost_volunteers[0] + req_access = list(access_robotics) + mecha = null//This does not appear to be used outside of reference in mecha.dm. + var/silenced = FALSE //if TRUE, they can't talk. + var/next_ping_at = 0 + var/requires_master = TRUE + var/mob/living/carbon/human/imprinted_master = null + var/ejected_flavor_text = "circuit" + +/obj/item/mmi/robotic_brain/Destroy() + imprinted_master = null + return ..() + +/obj/item/mmi/robotic_brain/attack_self(mob/user) + if(requires_master && !imprinted_master) + to_chat(user, "You press your thumb on [src] and imprint your user information.") + imprinted_master = user + return + if(brainmob && !brainmob.key && !searching) + //Start the process of searching for a new user. + to_chat(user, "You carefully locate the manual activation switch and start [src]'s boot process.") + icon_state = searching_icon + ghost_volunteers.Cut() + searching = TRUE + request_player() + spawn(600) + if(ghost_volunteers.len) + var/mob/dead/observer/O + while(!istype(O) && ghost_volunteers.len) + O = pick_n_take(ghost_volunteers) + if(istype(O) && check_observer(O)) + transfer_personality(O) + reset_search() + else + silenced = !silenced + to_chat(user, "You toggle the speaker [silenced ? "off" : "on"].") + if(brainmob && brainmob.key) + to_chat(brainmob, "Your internal speaker has been toggled [silenced ? "off" : "on"].") + +/obj/item/mmi/robotic_brain/proc/request_player() + for(var/mob/dead/observer/O in player_list) + if(check_observer(O)) + to_chat(O, "\A [src] has been activated. (Teleport | Sign Up)") + +/obj/item/mmi/robotic_brain/proc/check_observer(mob/dead/observer/O) + if(cannotPossess(O)) + return FALSE + if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept")) + return FALSE + if(!O.can_reenter_corpse) + return FALSE + if(O.client) + return TRUE + return FALSE + +/obj/item/mmi/robotic_brain/proc/question(client/C) + spawn(0) + if(!C) + return + var/response = alert(C, "Someone is requesting a personality for a [src]. Would you like to play as one?", "[src] request", "Yes", "No", "Never for this round") + if(!C || brainmob.key || !searching) + return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located. + if(response == "Yes") + transfer_personality(C.mob) + else if(response == "Never for this round") + C.prefs.be_special -= ROLE_POSIBRAIN + +// This should not ever happen, but let's be safe +/obj/item/mmi/robotic_brain/dropbrain(turf/dropspot) + log_runtime(EXCEPTION("[src] at [loc] attempted to drop brain without a contained brain."), src) + +/obj/item/mmi/robotic_brain/transfer_identity(mob/living/carbon/H) + name = "[src] ([H])" + if(isnull(brainmob.dna)) + brainmob.dna = H.dna.Clone() + brainmob.name = brainmob.dna.real_name + brainmob.real_name = brainmob.name + brainmob.timeofhostdeath = H.timeofdeath + brainmob.stat = CONSCIOUS + if(brainmob.mind) + brainmob.mind.assigned_role = "Positronic Brain" + if(H.mind) + H.mind.transfer_to(brainmob) + to_chat(brainmob, "You feel slightly disoriented. That's normal when you're just a [ejected_flavor_text].") + become_occupied(occupied_icon) + if(radio) + radio_action.ApplyIcon() + +/obj/item/mmi/robotic_brain/attempt_become_organ(obj/item/organ/external/parent, mob/living/carbon/human/H) + if(..()) + if(imprinted_master) + to_chat(H, "You are permanently imprinted to [imprinted_master], obey [imprinted_master]'s every order and assist [imprinted_master.p_them()] in completing [imprinted_master.p_their()] goals at any cost.") + + +/obj/item/mmi/robotic_brain/proc/transfer_personality(mob/candidate) + searching = FALSE + brainmob.key = candidate.key + name = "[src] ([brainmob.name])" + + to_chat(brainmob, "You are a [src], brought into existence on [station_name()].") + to_chat(brainmob, "As a non-sentient synthetic intelligence, you answer to [imprinted_master], unless otherwise placed inside of a lawed synthetic structure or mech.") + to_chat(brainmob, "Remember, the purpose of your existence is to serve [imprinted_master]'s every word, unless lawed or placed into a mech in the future.") + brainmob.mind.assigned_role = "Positronic Brain" + + visible_message("[src] chimes quietly.") + become_occupied(occupied_icon) + + +/obj/item/mmi/robotic_brain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer. + if(brainmob && brainmob.key) + return + + searching = FALSE + icon_state = blank_icon + + visible_message("[src] buzzes quietly as the light fades out. Perhaps you could try again?") + +/obj/item/mmi/robotic_brain/Topic(href, href_list) + if("signup" in href_list) + var/mob/dead/observer/O = locate(href_list["signup"]) + if(!O) + return + volunteer(O) + +/obj/item/mmi/robotic_brain/proc/volunteer(mob/dead/observer/O) + if(!searching) + to_chat(O, "Not looking for a ghost, yet.") + return + if(!istype(O)) + to_chat(O, "Error.") + return + if(O in ghost_volunteers) + to_chat(O, "Removed from registration list.") + ghost_volunteers.Remove(O) + return + if(!check_observer(O)) + to_chat(O, "You cannot be \a [src].") + return + if(cannotPossess(O)) + to_chat(O, "Upon using the antagHUD you forfeited the ability to join the round.") + return + if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept")) + to_chat(O, "You are job banned from this role.") + return + to_chat(O., "You've been added to the list of ghosts that may become this [src]. Click again to unvolunteer.") + ghost_volunteers.Add(O) + + +/obj/item/mmi/robotic_brain/examine(mob/user) + to_chat(user, "Its speaker is turned [silenced ? "off" : "on"].") + to_chat(user, "*---------*") + . = ..() + if(!.) + to_chat(user, "*---------*") + return + + var/list/msg = list("") + + if(brainmob && brainmob.key) + switch(brainmob.stat) + if(CONSCIOUS) + if(!brainmob.client) + msg += "It appears to be in stand-by mode.\n" //afk + if(UNCONSCIOUS) + msg += "It doesn't seem to be responsive.\n" + if(DEAD) + msg += "It appears to be completely inactive.\n" + else + msg += "It appears to be completely inactive.\n" + msg += "*---------*" + to_chat(user, msg.Join("")) + +/obj/item/mmi/robotic_brain/emp_act(severity) + if(!brainmob) + return + switch(severity) + if(1) + brainmob.emp_damage += rand(20, 30) + if(2) + brainmob.emp_damage += rand(10, 20) + if(3) + brainmob.emp_damage += rand(0, 10) + ..() + +/obj/item/mmi/robotic_brain/New() + brainmob = new(src) + brainmob.name = "[pick(list("PBU", "HIU", "SINA", "ARMA", "OSI"))]-[rand(100, 999)]" + brainmob.real_name = brainmob.name + brainmob.forceMove(src) + brainmob.container = src + brainmob.stat = CONSCIOUS + brainmob.SetSilence(0) + dead_mob_list -= brainmob + ..() + +/obj/item/mmi/robotic_brain/attack_ghost(mob/dead/observer/O) + if(searching) + volunteer(O) + return + if(brainmob && brainmob.key) + return // No point pinging a posibrain with a player already inside + if(check_observer(O) && (world.time >= next_ping_at)) + next_ping_at = world.time + (20 SECONDS) + playsound(get_turf(src), 'sound/items/posiping.ogg', 80, 0) + visible_message("[src] pings softly.") + +/obj/item/mmi/robotic_brain/positronic + name = "positronic brain" + icon = 'icons/obj/assemblies.dmi' + icon_state = "posibrain" + blank_icon = "posibrain" + searching_icon = "posibrain-searching" + occupied_icon = "posibrain-occupied" + desc = "A cube of shining metal, four inches to a side and covered in shallow grooves." + silenced = TRUE + requires_master = FALSE + ejected_flavor_text = "metal cube" \ No newline at end of file diff --git a/code/modules/mob/living/carbon/brain/say.dm b/code/modules/mob/living/carbon/brain/say.dm index e8e2dd00c45..907a2e4862d 100644 --- a/code/modules/mob/living/carbon/brain/say.dm +++ b/code/modules/mob/living/carbon/brain/say.dm @@ -2,7 +2,7 @@ /mob/living/carbon/brain/say(var/message, var/datum/language/speaking = null) if(!can_speak(warning = TRUE)) return - + if(prob(emp_damage * 4)) if(prob(10)) //10% chance to drop the message entirely return @@ -10,21 +10,21 @@ message = Gibberish(message, (emp_damage*6))//scrambles the message, gets worse when emp_damage is higher ..(message) - + /mob/living/carbon/brain/whisper(message as text) if(!can_speak(warning = TRUE)) return ..() - + /mob/living/carbon/brain/can_speak(var/warning = FALSE) . = ..() if(!istype(container, /obj/item/mmi)) . = FALSE - else if(istype(container, /obj/item/mmi/posibrain)) - var/obj/item/mmi/posibrain/P = container - if(P && P.silenced) + else if(istype(container, /obj/item/mmi/robotic_brain)) + var/obj/item/mmi/robotic_brain/R = container + if(R && R.silenced) if(warning) to_chat(usr, "You cannot speak, as your internal speaker is turned off.") . = FALSE @@ -41,12 +41,10 @@ if(metalgear.radio) radio_worked = metalgear.radio.talk_into(src, message, message_mode, verb, speaking) - else if(!radio_worked && istype(c, /obj/item/mmi/radio_enabled)) - var/obj/item/mmi/radio_enabled/R = c - if(R.radio) - radio_worked = R.radio.talk_into(src, message, message_mode, verb, speaking) + else if(!radio_worked && c.radio) + radio_worked = c.radio.talk_into(src, message, message_mode, verb, speaking) return radio_worked if("whisper") whisper_say(message, speaking, alt_name) return 1 - else return 0 \ No newline at end of file + else return 0 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index a1e4b555412..604dfc36f32 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -201,7 +201,7 @@ swap_hand() /mob/living/carbon/proc/help_shake_act(mob/living/carbon/M) - add_attack_logs(M, src, "Shaked", admin_notify = FALSE) + add_attack_logs(M, src, "Shaked", ATKLOG_ALL) if(health >= config.health_threshold_crit) if(src == M && ishuman(src)) var/mob/living/carbon/human/H = src @@ -256,14 +256,9 @@ H.play_xylophone() else if(player_logged) - M.visible_message("[M] shakes [src], but they do not respond. Probably suffering from SSD.", \ - "You shake [src], but they are unresponsive. Probably suffering from SSD.") + M.visible_message("[M] shakes [src], but [p_they()] [p_do()] not respond. Probably suffering from SSD.", \ + "You shake [src], but [p_theyre()] unresponsive. Probably suffering from SSD.") if(lying) // /vg/: For hugs. This is how update_icon figgers it out, anyway. - N3X15 - var/t_him = "it" - if(gender == MALE) - t_him = "him" - else if(gender == FEMALE) - t_him = "her" if(ishuman(src)) var/mob/living/carbon/human/H = src if(H.w_uniform) @@ -277,8 +272,8 @@ playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) if(!player_logged) M.visible_message( \ - "[M] shakes [src] trying to wake [t_him] up!",\ - "You shake [src] trying to wake [t_him] up!",\ + "[M] shakes [src] trying to wake [p_them()] up!",\ + "You shake [src] trying to wake [p_them()] up!",\ ) // BEGIN HUGCODE - N3X else @@ -347,7 +342,7 @@ AdjustEyeBlurry(damage * rand(3, 6)) if(E.damage > (E.min_bruised_damage + E.min_broken_damage) / 2) - if(!(E.status & ORGAN_ROBOT)) + if(!E.is_robotic()) to_chat(src, "Your eyes start to burn badly!") else //snowflake conditions piss me off for the record to_chat(src, "The flash blinds you!") @@ -745,7 +740,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, if(restrained()) changeNext_move(CLICK_CD_BREAKOUT) last_special = world.time + CLICK_CD_BREAKOUT - visible_message("[src] attempts to unbuckle themself!", \ + visible_message("[src] attempts to unbuckle [p_them()]self!", \ "You attempt to unbuckle yourself... (This will take around one minute and you need to stay still.)") if(do_after(src, 600, 0, target = src)) if(!buckled) @@ -762,11 +757,11 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, Weaken(3, 1, 1) //We dont check for CANWEAKEN, I don't care how immune to weakening you are, if you're rolling on the ground, you're busy. update_canmove() spin(32,2) - visible_message("[src] rolls on the floor, trying to put themselves out!", \ + visible_message("[src] rolls on the floor, trying to put [p_them()]self out!", \ "You stop, drop, and roll!") sleep(30) if(fire_stacks <= 0) - visible_message("[src] has successfully extinguished themselves!", \ + visible_message("[src] has successfully extinguished [p_them()]self!", \ "You extinguish yourself.") ExtinguishMob() @@ -1020,7 +1015,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, return 1 /mob/living/carbon/proc/forceFedAttackLog(var/obj/item/reagent_containers/food/toEat, mob/user) - add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagentlist(toEat)]") + add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagentlist(toEat)]", ATKLOG_FEW) if(!iscarbon(user)) LAssailant = null else diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index 80b871e7996..152262b69ea 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -129,7 +129,7 @@ /mob/living/carbon/human/proc/change_alt_head(var/alternate_head) var/obj/item/organ/external/head/H = get_organ("head") - if(!H || H.alt_head == alternate_head || (H.status & ORGAN_ROBOT) || (!(species.bodyflags & HAS_ALT_HEADS) && alternate_head != "None") || !(alternate_head in alt_heads_list)) + if(!H || H.alt_head == alternate_head || H.is_robotic() || (!(species.bodyflags & HAS_ALT_HEADS) && alternate_head != "None") || !(alternate_head in alt_heads_list)) return H.alt_head = alternate_head diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 84b4608b233..37749c0dd76 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -139,9 +139,11 @@ /mob/living/carbon/human/proc/makeSkeleton() var/obj/item/organ/external/head/H = get_organ("head") - if(SKELETON in src.mutations) return + if(SKELETON in src.mutations) + return if(istype(H)) + H.disfigured = TRUE if(H.f_style) H.f_style = initial(H.f_style) if(H.h_style) @@ -159,16 +161,17 @@ mutations.Add(SKELETON) mutations.Add(NOCLONE) - status_flags |= DISFIGURED update_body(0) update_mutantrace() return /mob/living/carbon/human/proc/ChangeToHusk() var/obj/item/organ/external/head/H = bodyparts_by_name["head"] - if(HUSK in mutations) return + if(HUSK in mutations) + return if(istype(H)) + H.disfigured = TRUE //makes them unknown without fucking up other stuff like admintools if(H.f_style) H.f_style = "Shaved" //we only change the icon_state of the hair datum, so it doesn't mess up their UI/UE if(H.h_style) @@ -177,7 +180,6 @@ update_hair(0) mutations.Add(HUSK) - status_flags |= DISFIGURED //makes them unknown without fucking up other stuff like admintools update_body(0) update_mutantrace() return diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index e9ae44bf433..be46cc9fa7d 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -173,14 +173,14 @@ if("clack", "clacks") var/M = handle_emote_param(param) - message = "[src] clacks their mandibles[M ? " at [M]" : ""]." + message = "[src] clacks [p_their()] mandibles[M ? " at [M]" : ""]." playsound(loc, 'sound/effects/Kidanclack.ogg', 50, 0) //Credit to DrMinky (freesound.org) for the sound. m_type = 2 if("click", "clicks") var/M = handle_emote_param(param) - message = "[src] clicks their mandibles[M ? " at [M]" : ""]." + message = "[src] clicks [p_their()] mandibles[M ? " at [M]" : ""]." playsound(loc, 'sound/effects/Kidanclack2.ogg', 50, 0) //Credit to DrMinky (freesound.org) for the sound. m_type = 2 @@ -201,7 +201,7 @@ if("quill", "quills") var/M = handle_emote_param(param) - message = "[src] rustles their quills[M ? " at [M]" : ""]." + message = "[src] rustles [p_their()] quills[M ? " at [M]" : ""]." playsound(loc, 'sound/effects/voxrustle.ogg', 50, 0) //Credit to sound-ideas (freesfx.co.uk) for the sound. m_type = 2 @@ -222,12 +222,12 @@ if("wag", "wags") if(body_accessory) if(body_accessory.try_restrictions(src)) - message = "[src] starts wagging \his tail." + message = "[src] starts wagging [p_their()] tail." start_tail_wagging(1) else if(species.bodyflags & TAIL_WAGGING) if(!wear_suit || !(wear_suit.flags_inv & HIDETAIL) && !istype(wear_suit, /obj/item/clothing/suit/space)) - message = "[src] starts wagging \his tail." + message = "[src] starts wagging [p_their()] tail." start_tail_wagging(1) else return @@ -237,7 +237,7 @@ if("swag", "swags") if(species.bodyflags & TAIL_WAGGING || body_accessory) - message = "[src] stops wagging \his tail." + message = "[src] stops wagging [p_their()] tail." stop_tail_wagging(1) else return @@ -282,7 +282,7 @@ if("choke", "chokes") if(miming) - message = "[src] clutches \his throat desperately!" + message = "[src] clutches [p_their()] throat desperately!" m_type = 1 else if(!muzzled) @@ -294,7 +294,7 @@ if("burp", "burps") if(miming) - message = "[src] opens their mouth rather obnoxiously." + message = "[src] opens [p_their()] mouth rather obnoxiously." m_type = 1 else if(!muzzled) @@ -330,7 +330,7 @@ if("flap", "flaps") if(!restrained()) - message = "[src] flaps \his wings." + message = "[src] flaps [p_their()] wings." m_type = 2 if(miming) m_type = 1 @@ -382,7 +382,7 @@ if("aflap", "aflaps") if(!restrained()) - message = "[src] flaps \his wings ANGRILY!" + message = "[src] flaps [p_their()] wings ANGRILY!" m_type = 2 if(miming) m_type = 1 @@ -479,7 +479,7 @@ m_type = 2 if("deathgasp", "deathgasps") - message = "[src] [species.death_message]" + message = "[src] [replacetext(species.death_message, "their", p_their())]" m_type = 1 if("giggle", "giggles") @@ -527,7 +527,7 @@ message = "[src] cries." m_type = 2 else - message = "[src] makes a weak noise. \He frowns." + message = "[src] makes a weak noise. [p_they(TRUE)] frown[p_s()]." m_type = 2 if("sigh", "sighs") @@ -605,7 +605,7 @@ message = "[src] takes a drag from a cigarette and blows \"[M]\" out in smoke." m_type = 1 else - message = "[src] says, \"[M], please. They had a family.\" [name] takes a drag from a cigarette and blows their name out in smoke." + message = "[src] says, \"[M], please. They had a family.\" [name] takes a drag from a cigarette and blows [p_their()] name out in smoke." m_type = 2 if("point", "points") @@ -631,7 +631,7 @@ if("shake", "shakes") var/M = handle_emote_param(param, 1) //Check to see if the param is valid (mob with the param name is in view) but exclude ourselves. - message = "[src] shakes \his head[M ? " at [M]" : ""]." + message = "[src] shakes [p_their()] head[M ? " at [M]" : ""]." m_type = 1 if("shrug", "shrugs") @@ -742,7 +742,7 @@ if(M) message = "[src] hugs [M]." else - message = "[src] hugs \himself." + message = "[src] hugs [p_them()]self." if("handshake") m_type = 1 @@ -753,7 +753,7 @@ if(M.canmove && !M.r_hand && !M.restrained()) message = "[src] shakes hands with [M]." else - message = "[src] holds out \his hand to [M]." + message = "[src] holds out [p_their()] hand to [M]." if("dap", "daps") m_type = 1 @@ -763,7 +763,7 @@ if(M) message = "[src] gives daps to [M]." else - message = "[src] sadly can't find anybody to give daps to, and daps \himself. Shameful." + message = "[src] sadly can't find anybody to give daps to, and daps [p_them()]self. Shameful." if("slap", "slaps") m_type = 1 @@ -773,7 +773,7 @@ if(M) message = "[src] slaps [M] across the face. Ouch!" else - message = "[src] slaps \himself!" + message = "[src] slaps [p_them()]self!" adjustFireLoss(4) playsound(loc, 'sound/effects/snap.ogg', 50, 1) @@ -814,10 +814,10 @@ var/M = handle_emote_param(param) - message = "[src] snaps \his fingers[M ? " at [M]" : ""]." + message = "[src] snaps [p_their()] fingers[M ? " at [M]" : ""]." playsound(loc, 'sound/effects/fingersnap.ogg', 50, 1, -3) else - message = "[src] snaps \his fingers right off!" + message = "[src] snaps [p_their()] fingers right off!" playsound(loc, 'sound/effects/snap.ogg', 50, 1) // Needed for M_TOXIC_FART @@ -826,34 +826,34 @@ return // playsound(loc, 'sound/effects/fart.ogg', 50, 1, -3) //Admins still vote no to fun if(locate(/obj/item/storage/bible) in get_turf(src)) - to_chat(viewers(src), "[src] farts on the Bible!") - var/image/cross = image('icons/obj/storage.dmi',"bible") - var/adminbfmessage = "\blue [bicon(cross)] Bible Fart: [key_name(src, 1)] (?) (PP) (VV) (SM) ([admin_jump_link(src)]) (CA) (SMITE):" + to_chat(viewers(src), "[src] farts on the Bible!") + var/image/cross = image('icons/obj/storage.dmi', "bible") + var/adminbfmessage = "[bicon(cross)] Bible Fart: [key_name(src, 1)] (?) (PP) (VV) (SM) ([admin_jump_link(src)]) (CA) (SMITE):" for(var/client/X in admins) - if(check_rights(R_EVENT,0,X.mob)) + if(check_rights(R_EVENT, 0, X.mob)) to_chat(X, adminbfmessage) else if(TOXIC_FARTS in mutations) - message = "[src] unleashes a [pick("horrible","terrible","foul","disgusting","awful")] fart." + message = "[src] unleashes a [pick("horrible", "terrible", "foul", "disgusting", "awful")] fart." else if(SUPER_FART in mutations) - message = "[src] unleashes a [pick("loud","deafening")] fart." - newtonian_move(dir) + message = "[src] unleashes a [pick("loud", "deafening")] fart." else - message = "[src] [pick("passes wind","farts")]." + message = "[src] [pick("passes wind", "farts")]." m_type = 2 var/turf/location = get_turf(src) - var/aoe_range=2 // Default // Process toxic farts first. if(TOXIC_FARTS in mutations) - for(var/mob/M in range(location,aoe_range)) - if(M.internal != null && M.wear_mask && (M.wear_mask.flags & AIRTIGHT)) + for(var/mob/living/carbon/C in range(location, 2)) + if(C.internal != null && C.wear_mask && (C.wear_mask.flags & AIRTIGHT)) continue - // Now, we don't have this: - //new /obj/effects/fart_cloud(T,L) - if(M == src) + if(C == src) continue - M.reagents.add_reagent("jenkem", 1) + C.reagents.add_reagent("jenkem", 1) + + // Farting as a form of locomotion in space + if(SUPER_FART in mutations) + newtonian_move(dir) if("hem") message = "[src] hems." @@ -941,7 +941,7 @@ set desc = "Sets a description which will be shown when someone examines you." set category = "IC" - pose = sanitize(copytext(input(usr, "This is [src]. \He is...", "Pose", null) as text, 1, MAX_MESSAGE_LEN)) + pose = sanitize(copytext(input(usr, "This is [src]. [p_they(TRUE)] [p_are()]...", "Pose", null) as text, 1, MAX_MESSAGE_LEN)) /mob/living/carbon/human/verb/set_flavor() set name = "Set Flavour Text" diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index c15f30f94bd..e382796cd09 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -23,41 +23,10 @@ if(wear_mask) skipface |= wear_mask.flags_inv & HIDEFACE - - // crappy hacks because you can't do \his[src] etc. I'm sorry this proc is so unreadable, blame the text macros :< - var/t_He = "It" //capitalised for use at the start of each line. - var/t_his = "its" - var/t_him = "it" - var/t_has = "has" - var/t_is = "is" - var/msg = "*---------*\nThis is " - if((skipjumpsuit && skipface)) //big suits/masks/helmets make it hard to tell their gender - t_He = "They" - t_his = "their" - t_him = "them" - t_has = "have" - t_is = "are" - else - if(icon) - msg += "[bicon(icon(icon, dir=SOUTH))] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated - switch(gender) - if(MALE) - t_He = "He" - t_his = "his" - t_him = "him" - if(FEMALE) - t_He = "She" - t_his = "her" - t_him = "her" - if(PLURAL) - t_He = "They" - t_his = "their" - t_him = "them" - t_has = "have" - t_is = "are" - + if(!(skipjumpsuit && skipface) && icon) //big suits/masks/helmets make it hard to tell their gender + msg += "[bicon(icon(icon, dir=SOUTH))] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated msg += "[name]" var/list/nospecies = list("Abductor", "Shadowling", "Neara", "Monkey", "Stok", "Farwa", "Wolpin") //species that won't show their race no matter what @@ -86,129 +55,129 @@ tie_msg += " with [english_accessory_list(U)]" if(w_uniform.blood_DNA) - msg += "[t_He] [t_is] wearing [bicon(w_uniform)] [w_uniform.gender==PLURAL?"some":"a"] [w_uniform.blood_color != "#030303" ? "blood-stained":"oil-stained"] [w_uniform.name][tie_msg]!\n" + msg += "[p_they(TRUE)] [p_are()] wearing [bicon(w_uniform)] [w_uniform.gender==PLURAL?"some":"a"] [w_uniform.blood_color != "#030303" ? "blood-stained":"oil-stained"] [w_uniform.name][tie_msg]!\n" else - msg += "[t_He] [t_is] wearing [bicon(w_uniform)] \a [w_uniform][tie_msg].\n" + msg += "[p_they(TRUE)] [p_are()] wearing [bicon(w_uniform)] \a [w_uniform][tie_msg].\n" //head if(head && !(head.flags & ABSTRACT)) if(head.blood_DNA) - msg += "[t_He] [t_is] wearing [bicon(head)] [head.gender==PLURAL?"some":"a"] [head.blood_color != "#030303" ? "blood-stained":"oil-stained"] [head.name] on [t_his] head!\n" + msg += "[p_they(TRUE)] [p_are()] wearing [bicon(head)] [head.gender==PLURAL?"some":"a"] [head.blood_color != "#030303" ? "blood-stained":"oil-stained"] [head.name] on [p_their()] head!\n" else - msg += "[t_He] [t_is] wearing [bicon(head)] \a [head] on [t_his] head.\n" + msg += "[p_they(TRUE)] [p_are()] wearing [bicon(head)] \a [head] on [p_their()] head.\n" //suit/armour if(wear_suit && !(wear_suit.flags & ABSTRACT)) if(wear_suit.blood_DNA) - msg += "[t_He] [t_is] wearing [bicon(wear_suit)] [wear_suit.gender==PLURAL?"some":"a"] [wear_suit.blood_color != "#030303" ? "blood-stained":"oil-stained"] [wear_suit.name]!\n" + msg += "[p_they(TRUE)] [p_are()] wearing [bicon(wear_suit)] [wear_suit.gender==PLURAL?"some":"a"] [wear_suit.blood_color != "#030303" ? "blood-stained":"oil-stained"] [wear_suit.name]!\n" else - msg += "[t_He] [t_is] wearing [bicon(wear_suit)] \a [wear_suit].\n" + msg += "[p_they(TRUE)] [p_are()] wearing [bicon(wear_suit)] \a [wear_suit].\n" //suit/armour storage if(s_store && !skipsuitstorage) if(s_store.blood_DNA) - msg += "[t_He] [t_is] carrying [bicon(s_store)] [s_store.gender==PLURAL?"some":"a"] [s_store.blood_color != "#030303" ? "blood-stained":"oil-stained"] [s_store.name] on [t_his] [wear_suit.name]!\n" + msg += "[p_they(TRUE)] [p_are()] carrying [bicon(s_store)] [s_store.gender==PLURAL?"some":"a"] [s_store.blood_color != "#030303" ? "blood-stained":"oil-stained"] [s_store.name] on [p_their()] [wear_suit.name]!\n" else - msg += "[t_He] [t_is] carrying [bicon(s_store)] \a [s_store] on [t_his] [wear_suit.name].\n" + msg += "[p_they(TRUE)] [p_are()] carrying [bicon(s_store)] \a [s_store] on [p_their()] [wear_suit.name].\n" //back if(back && !(back.flags & ABSTRACT)) if(back.blood_DNA) - msg += "[t_He] [t_has] [bicon(back)] [back.gender==PLURAL?"some":"a"] [back.blood_color != "#030303" ? "blood-stained":"oil-stained"] [back] on [t_his] back.\n" + msg += "[p_they(TRUE)] [p_have()] [bicon(back)] [back.gender==PLURAL?"some":"a"] [back.blood_color != "#030303" ? "blood-stained":"oil-stained"] [back] on [p_their()] back.\n" else - msg += "[t_He] [t_has] [bicon(back)] \a [back] on [t_his] back.\n" + msg += "[p_they(TRUE)] [p_have()] [bicon(back)] \a [back] on [p_their()] back.\n" //left hand if(l_hand && !(l_hand.flags & ABSTRACT)) if(l_hand.blood_DNA) - msg += "[t_He] [t_is] holding [bicon(l_hand)] [l_hand.gender==PLURAL?"some":"a"] [l_hand.blood_color != "#030303" ? "blood-stained":"oil-stained"] [l_hand.name] in [t_his] left hand!\n" + msg += "[p_they(TRUE)] [p_are()] holding [bicon(l_hand)] [l_hand.gender==PLURAL?"some":"a"] [l_hand.blood_color != "#030303" ? "blood-stained":"oil-stained"] [l_hand.name] in [p_their()] left hand!\n" else - msg += "[t_He] [t_is] holding [bicon(l_hand)] \a [l_hand] in [t_his] left hand.\n" + msg += "[p_they(TRUE)] [p_are()] holding [bicon(l_hand)] \a [l_hand] in [p_their()] left hand.\n" //right hand if(r_hand && !(r_hand.flags & ABSTRACT)) if(r_hand.blood_DNA) - msg += "[t_He] [t_is] holding [bicon(r_hand)] [r_hand.gender==PLURAL?"some":"a"] [r_hand.blood_color != "#030303" ? "blood-stained":"oil-stained"] [r_hand.name] in [t_his] right hand!\n" + msg += "[p_they(TRUE)] [p_are()] holding [bicon(r_hand)] [r_hand.gender==PLURAL?"some":"a"] [r_hand.blood_color != "#030303" ? "blood-stained":"oil-stained"] [r_hand.name] in [p_their()] right hand!\n" else - msg += "[t_He] [t_is] holding [bicon(r_hand)] \a [r_hand] in [t_his] right hand.\n" + msg += "[p_they(TRUE)] [p_are()] holding [bicon(r_hand)] \a [r_hand] in [p_their()] right hand.\n" //gloves if(gloves && !skipgloves && !(gloves.flags & ABSTRACT)) if(gloves.blood_DNA) - msg += "[t_He] [t_has] [bicon(gloves)] [gloves.gender==PLURAL?"some":"a"] [gloves.blood_color != "#030303" ? "blood-stained":"oil-stained"] [gloves.name] on [t_his] hands!\n" + msg += "[p_they(TRUE)] [p_have()] [bicon(gloves)] [gloves.gender==PLURAL?"some":"a"] [gloves.blood_color != "#030303" ? "blood-stained":"oil-stained"] [gloves.name] on [p_their()] hands!\n" else - msg += "[t_He] [t_has] [bicon(gloves)] \a [gloves] on [t_his] hands.\n" + msg += "[p_they(TRUE)] [p_have()] [bicon(gloves)] \a [gloves] on [p_their()] hands.\n" else if(blood_DNA) - msg += "[t_He] [t_has] [hand_blood_color != "#030303" ? "blood-stained":"oil-stained"] hands!\n" + msg += "[p_they(TRUE)] [p_have()] [hand_blood_color != "#030303" ? "blood-stained":"oil-stained"] hands!\n" //handcuffed? if(handcuffed) if(istype(handcuffed, /obj/item/restraints/handcuffs/cable/zipties)) - msg += "[t_He] [t_is] [bicon(handcuffed)] restrained with zipties!\n" + msg += "[p_they(TRUE)] [p_are()] [bicon(handcuffed)] restrained with zipties!\n" else if(istype(handcuffed, /obj/item/restraints/handcuffs/cable)) - msg += "[t_He] [t_is] [bicon(handcuffed)] restrained with cable!\n" + msg += "[p_they(TRUE)] [p_are()] [bicon(handcuffed)] restrained with cable!\n" else - msg += "[t_He] [t_is] [bicon(handcuffed)] handcuffed!\n" + msg += "[p_they(TRUE)] [p_are()] [bicon(handcuffed)] handcuffed!\n" //belt if(belt) if(belt.blood_DNA) - msg += "[t_He] [t_has] [bicon(belt)] [belt.gender==PLURAL?"some":"a"] [belt.blood_color != "#030303" ? "blood-stained":"oil-stained"] [belt.name] about [t_his] waist!\n" + msg += "[p_they(TRUE)] [p_have()] [bicon(belt)] [belt.gender==PLURAL?"some":"a"] [belt.blood_color != "#030303" ? "blood-stained":"oil-stained"] [belt.name] about [p_their()] waist!\n" else - msg += "[t_He] [t_has] [bicon(belt)] \a [belt] about [t_his] waist.\n" + msg += "[p_they(TRUE)] [p_have()] [bicon(belt)] \a [belt] about [p_their()] waist.\n" //shoes if(shoes && !skipshoes && !(shoes.flags & ABSTRACT)) if(shoes.blood_DNA) - msg += "[t_He] [t_is] wearing [bicon(shoes)] [shoes.gender==PLURAL?"some":"a"] [shoes.blood_color != "#030303" ? "blood-stained":"oil-stained"] [shoes.name] on [t_his] feet!\n" + msg += "[p_they(TRUE)] [p_are()] wearing [bicon(shoes)] [shoes.gender==PLURAL?"some":"a"] [shoes.blood_color != "#030303" ? "blood-stained":"oil-stained"] [shoes.name] on [p_their()] feet!\n" else - msg += "[t_He] [t_is] wearing [bicon(shoes)] \a [shoes] on [t_his] feet.\n" + msg += "[p_they(TRUE)] [p_are()] wearing [bicon(shoes)] \a [shoes] on [p_their()] feet.\n" else if(blood_DNA) - msg += "[t_He] [t_has] [feet_blood_color != "#030303" ? "blood-stained":"oil-stained"] feet!\n" + msg += "[p_they(TRUE)] [p_have()] [feet_blood_color != "#030303" ? "blood-stained":"oil-stained"] feet!\n" //mask if(wear_mask && !skipmask && !(wear_mask.flags & ABSTRACT)) if(wear_mask.blood_DNA) - msg += "[t_He] [t_has] [bicon(wear_mask)] [wear_mask.gender==PLURAL?"some":"a"] [wear_mask.blood_color != "#030303" ? "blood-stained":"oil-stained"] [wear_mask.name] on [t_his] face!\n" + msg += "[p_they(TRUE)] [p_have()] [bicon(wear_mask)] [wear_mask.gender==PLURAL?"some":"a"] [wear_mask.blood_color != "#030303" ? "blood-stained":"oil-stained"] [wear_mask.name] on [p_their()] face!\n" else - msg += "[t_He] [t_has] [bicon(wear_mask)] \a [wear_mask] on [t_his] face.\n" + msg += "[p_they(TRUE)] [p_have()] [bicon(wear_mask)] \a [wear_mask] on [p_their()] face.\n" //eyes if(glasses && !skipeyes && !(glasses.flags & ABSTRACT)) if(glasses.blood_DNA) - msg += "[t_He] [t_has] [bicon(glasses)] [glasses.gender==PLURAL?"some":"a"] [glasses.blood_color != "#030303" ? "blood-stained":"oil-stained"] [glasses] covering [t_his] eyes!\n" + msg += "[p_they(TRUE)] [p_have()] [bicon(glasses)] [glasses.gender==PLURAL?"some":"a"] [glasses.blood_color != "#030303" ? "blood-stained":"oil-stained"] [glasses] covering [p_their()] eyes!\n" else - msg += "[t_He] [t_has] [bicon(glasses)] \a [glasses] covering [t_his] eyes.\n" + msg += "[p_they(TRUE)] [p_have()] [bicon(glasses)] \a [glasses] covering [p_their()] eyes.\n" //left ear if(l_ear && !skipears) - msg += "[t_He] [t_has] [bicon(l_ear)] \a [l_ear] on [t_his] left ear.\n" + msg += "[p_they(TRUE)] [p_have()] [bicon(l_ear)] \a [l_ear] on [p_their()] left ear.\n" //right ear if(r_ear && !skipears) - msg += "[t_He] [t_has] [bicon(r_ear)] \a [r_ear] on [t_his] right ear.\n" + msg += "[p_they(TRUE)] [p_have()] [bicon(r_ear)] \a [r_ear] on [p_their()] right ear.\n" //ID if(wear_id) - msg += "[t_He] [t_is] wearing [bicon(wear_id)] \a [wear_id].\n" + msg += "[p_they(TRUE)] [p_are()] wearing [bicon(wear_id)] \a [wear_id].\n" //Jitters switch(jitteriness) if(300 to INFINITY) - msg += "[t_He] [t_is] convulsing violently!\n" + msg += "[p_they(TRUE)] [p_are()] convulsing violently!\n" if(200 to 300) - msg += "[t_He] [t_is] extremely jittery.\n" + msg += "[p_they(TRUE)] [p_are()] extremely jittery.\n" if(100 to 200) - msg += "[t_He] [t_is] twitching ever so slightly.\n" + msg += "[p_they(TRUE)] [p_are()] twitching ever so slightly.\n" var/appears_dead = FALSE if(stat == DEAD || (status_flags & FAKEDEATH)) appears_dead = TRUE if(suiciding) - msg += "[t_He] appears to have committed suicide... there is no hope of recovery.\n" - msg += "[t_He] [t_is] limp and unresponsive; there are no signs of life" + msg += "[p_they(TRUE)] appear[p_s()] to have committed suicide... there is no hope of recovery.\n" + msg += "[p_they(TRUE)] [p_are()] limp and unresponsive; there are no signs of life" if(get_int_organ(/obj/item/organ/internal/brain)) if(!key) var/foundghost = FALSE @@ -220,11 +189,11 @@ foundghost = FALSE break if(!foundghost) - msg += " and [t_his] soul has departed" + msg += " and [p_their()] soul has departed" msg += "...\n" if(!get_int_organ(/obj/item/organ/internal/brain)) - msg += "It appears that [t_his] brain is missing...\n" + msg += "It appears that [p_their()] brain is missing...\n" msg += "" @@ -238,17 +207,17 @@ var/obj/item/organ/external/E = bodyparts_by_name[organ_tag] if(!E) - wound_flavor_text["[organ_tag]"] = "[t_He] [t_is] missing [t_his] [organ_descriptor].\n" + wound_flavor_text["[organ_tag]"] = "[p_they(TRUE)] [p_are()] missing [p_their()] [organ_descriptor].\n" else if(!isSynthetic()) - if(E.status & ORGAN_ROBOT) - wound_flavor_text["[E.limb_name]"] = "[t_He] [t_has] a robotic [E.name]!\n" + if(E.is_robotic()) + wound_flavor_text["[E.limb_name]"] = "[p_they(TRUE)] [p_have()] a robotic [E.name]!\n" else if(E.status & ORGAN_SPLINTED) - wound_flavor_text["[E.limb_name]"] = "[t_He] [t_has] a splint on [t_his] [E.name]!\n" + wound_flavor_text["[E.limb_name]"] = "[p_they(TRUE)] [p_have()] a splint on [p_their()] [E.name]!\n" for(var/obj/item/I in E.embedded_objects) - msg += "[t_He] [t_has] \a [bicon(I)] [I] embedded in [t_his] [E.name]!\n" + msg += "[p_they(TRUE)] [p_have()] \a [bicon(I)] [I] embedded in [p_their()] [E.name]!\n" //Handles the text strings being added to the actual description. //If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext. @@ -280,101 +249,101 @@ if(temp) var/brute_message = !isSynthetic() ? "bruising" : "denting" if(temp < 30) - msg += "[t_He] [t_has] minor [brute_message ].\n" + msg += "[p_they(TRUE)] [p_have()] minor [brute_message ].\n" else - msg += "[t_He] [t_has] severe [brute_message ]!\n" + msg += "[p_they(TRUE)] [p_have()] severe [brute_message ]!\n" temp = getFireLoss() if(temp) if(temp < 30) - msg += "[t_He] [t_has] minor burns.\n" + msg += "[p_they(TRUE)] [p_have()] minor burns.\n" else - msg += "[t_He] [t_has] severe burns!\n" + msg += "[p_they(TRUE)] [p_have()] severe burns!\n" temp = getCloneLoss() if(temp) if(temp < 30) - msg += "[t_He] [t_has] minor cellular damage.\n" + msg += "[p_they(TRUE)] [p_have()] minor cellular damage.\n" else - msg += "[t_He] [t_has] severe cellular damage.\n" + msg += "[p_they(TRUE)] [p_have()] severe cellular damage.\n" if(fire_stacks > 0) - msg += "[t_He] [t_is] covered in something flammable.\n" + msg += "[p_they(TRUE)] [p_are()] covered in something flammable.\n" if(fire_stacks < 0) - msg += "[t_He] looks a little soaked.\n" + msg += "[p_they(TRUE)] looks a little soaked.\n" switch(wetlevel) if(1) - msg += "[t_He] looks a bit damp.\n" + msg += "[p_they(TRUE)] looks a bit damp.\n" if(2) - msg += "[t_He] looks a little bit wet.\n" + msg += "[p_they(TRUE)] looks a little bit wet.\n" if(3) - msg += "[t_He] looks wet.\n" + msg += "[p_they(TRUE)] looks wet.\n" if(4) - msg += "[t_He] looks very wet.\n" + msg += "[p_they(TRUE)] looks very wet.\n" if(5) - msg += "[t_He] looks absolutely soaked.\n" + msg += "[p_they(TRUE)] looks absolutely soaked.\n" if(nutrition < NUTRITION_LEVEL_STARVING - 50) - msg += "[t_He] [t_is] severely malnourished.\n" + msg += "[p_they(TRUE)] [p_are()] severely malnourished.\n" else if(nutrition >= NUTRITION_LEVEL_FAT) if(user.nutrition < NUTRITION_LEVEL_STARVING - 50) - msg += "[t_He] [t_is] plump and delicious looking - Like a fat little piggy. A tasty piggy.\n" + msg += "[p_they(TRUE)] [p_are()] plump and delicious looking - Like a fat little piggy. A tasty piggy.\n" else - msg += "[t_He] [t_is] quite chubby.\n" + msg += "[p_they(TRUE)] [p_are()] quite chubby.\n" if(blood_volume < BLOOD_VOLUME_SAFE) - msg += "[t_He] [t_has] pale skin.\n" + msg += "[p_they(TRUE)] [p_have()] pale skin.\n" if(bleedsuppress) - msg += "[t_He] [t_is] bandaged with something.\n" + msg += "[p_they(TRUE)] [p_are()] bandaged with something.\n" else if(bleed_rate) if(reagents.has_reagent("heparin")) - msg += "[t_He] [t_is] bleeding uncontrollably!\n" + msg += "[p_they(TRUE)] [p_are()] bleeding uncontrollably!\n" else - msg += "[t_He] [t_is] bleeding!\n" + msg += "[p_they(TRUE)] [p_are()] bleeding!\n" if(reagents.has_reagent("teslium")) - msg += "[t_He] is emitting a gentle blue glow!\n" + msg += "[p_they(TRUE)] [p_are()] emitting a gentle blue glow!\n" msg += "" if(!appears_dead) if(stat == UNCONSCIOUS) - msg += "[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.\n" + msg += "[p_they(TRUE)] [p_are()]n't responding to anything around [p_them()] and seems to be asleep.\n" else if(getBrainLoss() >= 60) - msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n" + msg += "[p_they(TRUE)] [p_have()] a stupid expression on [p_their()] face.\n" if(get_int_organ(/obj/item/organ/internal/brain)) if(istype(src, /mob/living/carbon/human/interactive)) var/mob/living/carbon/human/interactive/auto = src if(auto.showexaminetext) - msg += "[t_He] [t_is] appears to be some sort of sick automaton, [t_his] eyes are glazed over and [t_his] mouth is slightly agape.\n" + msg += "[p_they(TRUE)] [p_are()] appears to be some sort of sick automaton, [p_their()] eyes are glazed over and [p_their()] mouth is slightly agape.\n" if(auto.debugexamine) var/dodebug = auto.doing2string(auto.doing) var/interestdebug = auto.interest2string(auto.interest) - msg += "[t_He] [t_is] appears to be [interestdebug] and [dodebug].\n" + msg += "[p_they(TRUE)] [p_are()] appears to be [interestdebug] and [dodebug].\n" else if(species.show_ssd) if(!key) - msg += "[t_He] [t_is] totally catatonic. The stresses of life in deep-space must have been too much for [t_him]. Any recovery is unlikely.\n" + msg += "[p_they(TRUE)] [p_are()] totally catatonic. The stresses of life in deep-space must have been too much for [p_them()]. Any recovery is unlikely.\n" else if(!client) - msg += "[t_He] [t_has] suddenly fallen asleep, suffering from Space Sleep Disorder. [t_He] may wake up soon.\n" + msg += "[p_they(TRUE)] [p_have()] suddenly fallen asleep, suffering from Space Sleep Disorder. [p_they(TRUE)] may wake up soon.\n" if(digitalcamo) - msg += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly inhuman manner.\n" + msg += "[p_they(TRUE)] [p_are()] moving [p_their()] body in an unnatural and blatantly inhuman manner.\n" if(!(skipface || ( wear_mask && ( wear_mask.flags_inv & HIDEFACE || wear_mask.flags_cover & MASKCOVERSMOUTH) ) ) && is_thrall(src) && in_range(user,src)) msg += "Their features seem unnaturally tight and drawn.\n" if(decaylevel == 1) - msg += "[t_He] [t_is] starting to smell.\n" + msg += "[p_they(TRUE)] [p_are()] starting to smell.\n" if(decaylevel == 2) - msg += "[t_He] [t_is] bloated and smells disgusting.\n" + msg += "[p_they(TRUE)] [p_are()] bloated and smells disgusting.\n" if(decaylevel == 3) - msg += "[t_He] [t_is] rotting and blackened, the skin sloughing off. The smell is indescribably foul.\n" + msg += "[p_they(TRUE)] [p_are()] rotting and blackened, the skin sloughing off. The smell is indescribably foul.\n" if(decaylevel == 4) - msg += "[t_He] [t_is] mostly dessicated now, with only bones remaining of what used to be a person.\n" + msg += "[p_they(TRUE)] [p_are()] mostly dessicated now, with only bones remaining of what used to be a person.\n" if(hasHUD(user,"security")) var/perpname = "wot" @@ -429,7 +398,7 @@ if(pose) if( findtext(pose,".",lentext(pose)) == 0 && findtext(pose,"!",lentext(pose)) == 0 && findtext(pose,"?",lentext(pose)) == 0 ) pose = addtext(pose,".") //Makes sure all emotes end with a period. - msg += "\n[t_He] is [pose]" + msg += "\n[p_they(TRUE)] [p_are()] [pose]" to_chat(user, msg) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index e0f90aacdd0..dbc788cd0bb 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -118,6 +118,20 @@ /mob/living/carbon/human/machine/Initialize(mapload) ..(mapload, "Machine") +/mob/living/carbon/human/machine/created + name = "Integrated Robotic Chassis" + +/mob/living/carbon/human/machine/created/Initialize(mapload) + ..() + rename_character(null, "Integrated Robotic Chassis ([rand(1, 9999)])") + update_dna() + for(var/obj/item/organ/external/E in bodyparts) + if(istype(E, /obj/item/organ/external/chest) || istype(E, /obj/item/organ/external/groin)) + continue + qdel(E) + for(var/obj/item/organ/O in internal_organs) + qdel(O) + /mob/living/carbon/human/shadow/Initialize(mapload) ..(mapload, "Shadow") @@ -306,7 +320,7 @@ if(!prob(martial_art.deflection_chance)) return ..() if(!src.lying && !(HULK in mutations)) //But only if they're not lying down, and hulks can't do it - visible_message("[src] deflects the projectile; they can't be hit with ranged weapons!", "You deflect the projectile!") + visible_message("[src] deflects the projectile; [p_they()] can't be hit with ranged weapons!", "You deflect the projectile!") return 0 ..() @@ -513,7 +527,7 @@ //Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable /mob/living/carbon/human/proc/get_face_name() var/obj/item/organ/external/head = get_organ("head") - if( !head || head.disfigured || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible + if(!head || head.disfigured || cloneloss > 50 || !real_name || (HUSK in mutations)) //disfigured. use id-name if possible return "Unknown" return real_name @@ -608,7 +622,7 @@ if(!I || I.loc != src) //no item, no limb, or item is not in limb or in the person anymore return var/time_taken = I.embedded_unsafe_removal_time*I.w_class - usr.visible_message("[usr] attempts to remove [I] from their [L.name].","You attempt to remove [I] from your [L.name]... (It will take [time_taken/10] seconds.)") + usr.visible_message("[usr] attempts to remove [I] from [usr.p_their()] [L.name].","You attempt to remove [I] from your [L.name]... (It will take [time_taken/10] seconds.)") if(do_after(usr, time_taken, needhand = 1, target = src)) if(!I || !L || I.loc != src || !(I in L.embedded_objects)) return @@ -617,7 +631,7 @@ I.forceMove(get_turf(src)) usr.put_in_hands(I) usr.emote("scream") - usr.visible_message("[usr] successfully rips [I] out of their [L.name]!","You successfully remove [I] from your [L.name].") + usr.visible_message("[usr] successfully rips [I] out of [usr.p_their()] [L.name]!","You successfully remove [I] from your [L.name].") if(!has_embedded_objects()) clear_alert("embeddedobject") return @@ -651,12 +665,12 @@ unEquip(pocket_item) if(thief_mode) usr.put_in_hands(pocket_item) - add_attack_logs(usr, src, "Stripped of [pocket_item]", isLivingSSD(src)) + add_attack_logs(usr, src, "Stripped of [pocket_item]", isLivingSSD(src) ? null : ATKLOG_ALL) else if(place_item) usr.unEquip(place_item) equip_to_slot_if_possible(place_item, pocket_id, 0, 1) - add_attack_logs(usr, src, "Equipped with [pocket_item]", isLivingSSD(src)) + add_attack_logs(usr, src, "Equipped with [pocket_item]", isLivingSSD(src) ? null : ATKLOG_ALL) // Update strip window if(usr.machine == src && in_range(src, usr)) @@ -665,7 +679,7 @@ // Display a warning if the user mocks up if they don't have pickpocket gloves. if(!thief_mode) to_chat(src, "You feel your [pocket_side] pocket being fumbled with!") - add_attack_logs(usr, src, "Attempted strip of [pocket_item]", isLivingSSD(src)) + add_attack_logs(usr, src, "Attempted strip of [pocket_item]", isLivingSSD(src) ? null : ATKLOG_ALL) if(href_list["set_sensor"]) if(istype(w_uniform, /obj/item/clothing/under)) @@ -680,7 +694,7 @@ "You have dislodged everything from [src]'s headpocket!") var/obj/item/organ/internal/headpocket/C = get_int_organ(/obj/item/organ/internal/headpocket) C.empty_contents() - add_attack_logs(usr, src, "Stripped of headpocket items", isLivingSSD(src)) + add_attack_logs(usr, src, "Stripped of headpocket items", isLivingSSD(src) ? null : ATKLOG_ALL) if(href_list["strip_accessory"]) if(istype(w_uniform, /obj/item/clothing/under)) @@ -1043,7 +1057,7 @@ /mob/living/carbon/human/proc/play_xylophone() if(!src.xylophone) - visible_message("[src] begins playing his ribcage like a xylophone. It's quite spooky.","You begin to play a spooky refrain on your ribcage.","You hear a spooky xylophone melody.") + visible_message("[src] begins playing [p_their()] ribcage like a xylophone. It's quite spooky.","You begin to play a spooky refrain on your ribcage.","You hear a spooky xylophone melody.") var/song = pick('sound/effects/xylophone1.ogg','sound/effects/xylophone2.ogg','sound/effects/xylophone3.ogg') playsound(loc, song, 50, 1, -1) xylophone = 1 @@ -1064,8 +1078,8 @@ var/fail_msg if(!affecting) . = 0 - fail_msg = "They are missing that limb." - else if(affecting.status & ORGAN_ROBOT) + fail_msg = "[p_they(TRUE)] [p_are()] missing that limb." + else if(affecting.is_robotic()) . = 0 fail_msg = "That limb is robotic." else @@ -1078,7 +1092,7 @@ . = 0 if(!. && error_msg && user) if(!fail_msg) - fail_msg = "There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into." + fail_msg = "There is no exposed flesh or thin material [target_zone == "head" ? "on [p_their()] head" : "on [p_their()] body"] to inject into." to_chat(user, "[fail_msg]") /mob/living/carbon/human/proc/check_obscured_slots() @@ -1114,8 +1128,10 @@ return 1 /mob/living/carbon/human/proc/get_visible_gender() - if(wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT && ((head && head.flags_inv & HIDEMASK) || wear_mask)) - return NEUTER + var/list/obscured = check_obscured_slots() + var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) + if((slot_w_uniform in obscured) && skipface) + return PLURAL return gender /mob/living/carbon/human/proc/increase_germ_level(n) @@ -1201,7 +1217,7 @@ return 0 if(!L.is_bruised()) - src.custom_pain("You feel a stabbing pain in your chest!", 1) + custom_pain("You feel a stabbing pain in your chest!") L.damage = L.min_bruised_damage //returns 1 if made bloody, returns 0 otherwise @@ -1252,10 +1268,10 @@ if(usr == src) self = 1 if(!self) - usr.visible_message("[usr] kneels down, puts \his hand on [src]'s wrist and begins counting their pulse.",\ + usr.visible_message("[usr] kneels down, puts [usr.p_their()] hand on [src]'s wrist and begins counting [p_their()] pulse.",\ "You begin counting [src]'s pulse") else - usr.visible_message("[usr] begins counting their pulse.",\ + usr.visible_message("[usr] begins counting [p_their()] pulse.",\ "You begin counting your pulse.") if(src.pulse) @@ -1746,7 +1762,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X to_chat(src, "Remove your mask first!") return 0 if((H.head && (H.head.flags_cover & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags_cover & MASKCOVERSMOUTH) && !H.wear_mask.mask_adjusted)) - to_chat(src, "Remove their mask first!") + to_chat(src, "Remove [H.p_their()] mask first!") return 0 visible_message("[src] is trying to perform CPR on [H.name]!", \ "You try to perform CPR on [H.name]!") @@ -1760,7 +1776,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X to_chat(H, "You feel a breath of fresh air enter your lungs. It feels good.") to_chat(src, "Repeat at least every 7 seconds.") - add_attack_logs(src, H, "CPRed", FALSE) + add_attack_logs(src, H, "CPRed", ATKLOG_ALL) return 1 else to_chat(src, "You need to stay still while performing CPR!") diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 5ed14b3a18e..c2c16382995 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -115,7 +115,7 @@ O.receive_damage(amount, 0, sharp=is_sharp(damage_source), used_weapon=damage_source) else //if you don't want to heal robot organs, they you will have to check that yourself before using this proc. - O.heal_damage(-amount, 0, internal=0, robo_repair=(O.status & ORGAN_ROBOT)) + O.heal_damage(-amount, 0, internal = 0, robo_repair = O.is_robotic()) /mob/living/carbon/human/proc/adjustFireLossByPart(amount, organ_name, obj/damage_source = null) @@ -129,7 +129,7 @@ O.receive_damage(0, amount, sharp=is_sharp(damage_source), used_weapon=damage_source) else //if you don't want to heal robot organs, they you will have to check that yourself before using this proc. - O.heal_damage(0, -amount, internal=0, robo_repair=(O.status & ORGAN_ROBOT)) + O.heal_damage(0, -amount, internal = 0, robo_repair = O.is_robotic()) /mob/living/carbon/human/Paralyse(amount) @@ -149,7 +149,7 @@ if(prob(mut_prob)) var/list/obj/item/organ/external/candidates = list() //TYPECASTED LISTS ARE NOT A FUCKING THING WHAT THE FUCK for(var/obj/item/organ/external/O in bodyparts) - if(O.status & ORGAN_ROBOT) + if(O.is_robotic()) continue if(!(O.status & ORGAN_MUTATED)) candidates |= O @@ -205,9 +205,9 @@ var/list/obj/item/organ/external/parts = list() for(var/obj/item/organ/external/O in bodyparts) if((brute && O.brute_dam) || (burn && O.burn_dam)) - if(!(flags & AFFECT_ROBOTIC_ORGAN) && O.status & ORGAN_ROBOT) + if(!(flags & AFFECT_ROBOTIC_ORGAN) && O.is_robotic()) continue - if(!(flags & AFFECT_ORGANIC_ORGAN) && !(O.status & ORGAN_ROBOT)) + if(!(flags & AFFECT_ORGANIC_ORGAN) && !O.is_robotic()) continue parts += O return parts diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index c45154e4931..2991e0a7111 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -165,7 +165,7 @@ emp_act /mob/living/carbon/human/emag_act(user as mob, var/obj/item/organ/external/affecting) if(!istype(affecting)) return - if(!(affecting.status & ORGAN_ROBOT)) + if(!affecting.is_robotic()) to_chat(user, "That limb isn't robotic.") return if(affecting.sabotaged) @@ -348,6 +348,18 @@ emp_act if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam) +/mob/living/carbon/human/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) + if(user.a_intent == INTENT_HARM) + var/hulk_verb = pick("smash", "pummel") + if(check_shields(user, 15, "the [hulk_verb]ing")) + return + ..(user, TRUE) + playsound(loc, user.species.unarmed.attack_sound, 25, 1, -1) + var/message = "[user] has [hulk_verb]ed [src]!" + visible_message("[message]", "[message]") + adjustBruteLoss(15) + return TRUE + /mob/living/carbon/human/attack_hand(mob/user) if(..()) //to allow surgery to return properly. return diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 428fafeb71e..3f478e65d40 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -20,7 +20,7 @@ //Moving around with fractured ribs won't do you any good if(E.is_broken() && E.internal_organs && E.internal_organs.len && prob(15)) var/obj/item/organ/internal/I = pick(E.internal_organs) - custom_pain("You feel broken bones moving in your [E.name]!", 1) + custom_pain("You feel broken bones moving in your [E.name]!") I.receive_damage(rand(3,5)) //handle_stance() @@ -90,7 +90,7 @@ continue var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ") - custom_emote(1, "[(NO_PAIN in species.species_traits) ? "" : emote_scream ]drops what they were holding in their [E.name]!") + custom_emote(1, "[(NO_PAIN in species.species_traits) ? "" : emote_scream ]drops what [p_they()] [p_were()] holding in [p_their()] [E.name]!") else if(E.is_malfunctioning()) @@ -105,7 +105,7 @@ if(!unEquip(r_hand)) continue - custom_emote(1, "drops what they were holding, their [E.name] malfunctioning!") + custom_emote(1, "drops what [p_they()] [p_were()] holding, [p_their()] [E.name] malfunctioning!") var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src) @@ -178,7 +178,7 @@ I use this to standardize shadowling dethrall code /mob/living/carbon/human/has_organic_damage() var/odmg = 0 for(var/obj/item/organ/external/O in bodyparts) - if(O.status & ORGAN_ROBOT) + if(O.is_robotic()) odmg += O.brute_dam odmg += O.burn_dam return (health < (100 - odmg)) diff --git a/code/modules/mob/living/carbon/human/interactive/functions.dm b/code/modules/mob/living/carbon/human/interactive/functions.dm index eae754b5283..8e8c2c80013 100644 --- a/code/modules/mob/living/carbon/human/interactive/functions.dm +++ b/code/modules/mob/living/carbon/human/interactive/functions.dm @@ -87,11 +87,11 @@ if(inactivity_period <= 0) inactivity_period = 9999 // technically infinite if(do_after(src, 60, target = traitorTarget)) - custom_emote(1, "A fire bursts from [src]'s eyes, igniting white hot and consuming their body in a flaming explosion!") + custom_emote(1, "A fire bursts from [src]'s eyes, igniting white hot and consuming [p_their()] body in a flaming explosion!") explosion(src, 6, 6, 6) else inactivity_period = 0 - custom_emote(1, "[src]'s chest closes, hiding their insides.") + custom_emote(1, "[src]'s chest closes, hiding [p_their()] insides.") if(SNPC_PSYCHO) var/choice = pick(typesof(/obj/item/grenade/chem_grenade) - /obj/item/grenade/chem_grenade) @@ -469,7 +469,7 @@ if(!Adjacent(SF)) tryWalk(get_turf(SF)) else - custom_emote(2, "[pick("gibbers","drools","slobbers","claps wildly","spits")], grabbing various foodstuffs from [SF] and sticking them in it's mouth!") + custom_emote(2, "[pick("gibbers","drools","slobbers","claps wildly","spits")], grabbing various foodstuffs from [SF] and sticking them in its mouth!") for(var/obj/item/A in SF.contents) if(prob(smartness/2)) var/count = SF.item_quants[A.name] @@ -631,7 +631,7 @@ TARGET = newSnack newSnack.reagents.remove_any((newSnack.reagents.total_volume/2)-1) newSnack.name = "Synthetic [newSnack.name]" - custom_emote(2, "[pick("gibbers","drools","slobbers","claps wildly","spits")] as they vomit [newSnack] from their mouth!") + custom_emote(2, "[pick("gibbers","drools","slobbers","claps wildly","spits")] as [p_they()] vomit[p_s()] [newSnack] from [p_their()] mouth!") catch(var/exception/e) log_runtime(e, src, "Caught in SNPC cooking module") doing &= ~SNPC_SPECIAL diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 00de7814170..2e9e9b88656 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -150,7 +150,7 @@ AdjustSilence(2) if(getBrainLoss() >= 120 && stat != 2) //they died from stupidity--literally. -Fox - visible_message("[src] goes limp, their facial expression utterly blank.") + visible_message("[src] goes limp, [p_their()] facial expression utterly blank.") death() /mob/living/carbon/human/handle_mutations_and_radiation() @@ -832,7 +832,8 @@ /mob/living/carbon/human/handle_vision() if(machine) - if(!machine.check_eye(src)) reset_perspective(null) + if(!machine.check_eye(src)) + reset_perspective(null) else var/isRemoteObserve = 0 if((REMOTE_VIEW in mutations) && remoteview_target) @@ -992,7 +993,7 @@ if(!H) //H.status will runtime if there is no H (obviously) return - if(H.status & ORGAN_ROBOT) //Handle robotic hearts specially with a wuuuubb. This also applies to machine-people. + if(H.is_robotic()) //Handle robotic hearts specially with a wuuuubb. This also applies to machine-people. if(shock_stage >= 10 || istype(get_turf(src), /turf/space)) //PULSE_THREADY - maximum value for pulse, currently it 5. //High pulse value corresponds to a fast rate of heartbeat. @@ -1019,10 +1020,7 @@ if(heartbeat >= rate) heartbeat = 0 - if(H.status & ORGAN_ASSISTED) - src << sound('sound/effects/pacemakebeat.ogg',0,0,CHANNEL_HEARTBEAT,50) - else - src << sound('sound/effects/singlebeat.ogg',0,0,CHANNEL_HEARTBEAT,50) + src << sound('sound/effects/singlebeat.ogg',0,0,CHANNEL_HEARTBEAT,50) else heartbeat++ diff --git a/code/modules/mob/living/carbon/human/shock.dm b/code/modules/mob/living/carbon/human/shock.dm index 05042a226d6..d8dc9356de7 100644 --- a/code/modules/mob/living/carbon/human/shock.dm +++ b/code/modules/mob/living/carbon/human/shock.dm @@ -43,7 +43,7 @@ if(shock_stage >= 30) if(shock_stage == 30) - custom_emote(1,"is having trouble keeping their eyes open.") + custom_emote(1,"is having trouble keeping [p_their()] eyes open.") EyeBlurry(2) Stuttering(5) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 25d3fd342c5..139f2f7c9bb 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -21,7 +21,7 @@ var/primitive_form // Lesser form, if any (ie. monkey for humans) var/greater_form // Greater form, if any, ie. human for monkeys. var/tail // Name of tail image in species effects icon file. - var/unarmed //For empty hand harm-intent attack + var/datum/unarmed_attack/unarmed //For empty hand harm-intent attack var/unarmed_type = /datum/unarmed_attack var/slowdown = 0 // Passive movement speed malus (or boost, if negative) var/silent_steps = 0 // Stops step noises @@ -357,7 +357,7 @@ var/datum/unarmed_attack/attack = user.species.unarmed user.do_attack_animation(target, attack.animation_type) - add_attack_logs(user, target, "Melee attacked with fists", admin_notify = target.ckey ? TRUE : FALSE) + add_attack_logs(user, target, "Melee attacked with fists", target.ckey ? null : ATKLOG_ALL) if(!iscarbon(user)) target.LAssailant = null @@ -375,9 +375,6 @@ var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_sel.selecting)) var/armor_block = target.run_armor_check(affecting, "melee") - if(HULK in user.mutations) - target.adjustBruteLoss(15) - playsound(target.loc, attack.attack_sound, 25, 1, -1) target.visible_message("[user] [pick(attack.attack_verb)]ed [target]!") @@ -395,7 +392,7 @@ if(attacker_style && attacker_style.disarm_act(user, target)) return 1 else - add_attack_logs(user, target, "Disarmed", admin_notify = FALSE) + add_attack_logs(user, target, "Disarmed", ATKLOG_ALL) user.do_attack_animation(target, ATTACK_EFFECT_DISARM) if(target.w_uniform) target.w_uniform.add_fingerprint(user) @@ -405,7 +402,7 @@ target.apply_effect(2, WEAKEN, target.run_armor_check(affecting, "melee")) playsound(target.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) target.visible_message("[user] has pushed [target]!") - add_attack_logs(user, target, "Pushed over", admin_notify = FALSE) + add_attack_logs(user, target, "Pushed over", ATKLOG_ALL) if(!iscarbon(user)) target.LAssailant = null else diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index 015f1515683..6b692601226 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -687,7 +687,7 @@ var/limb_select = input(src, "Choose a limb to regrow", "Limb Regrowth") as null|anything in missing_limbs var/chosen_limb = missing_limbs[limb_select] - visible_message("[src] begins to hold still and concentrate on their missing [limb_select]...", "You begin to focus on regrowing your missing [limb_select]... (This will take [round(SLIMEPERSON_REGROWTHDELAY/10)] seconds, and you must hold still.)") + visible_message("[src] begins to hold still and concentrate on [p_their()] missing [limb_select]...", "You begin to focus on regrowing your missing [limb_select]... (This will take [round(SLIMEPERSON_REGROWTHDELAY/10)] seconds, and you must hold still.)") if(do_after(src, SLIMEPERSON_REGROWTHDELAY, needhand=0, target = src)) if(stat || paralysis || stunned) to_chat(src, "You cannot regenerate missing limbs in your current state.") @@ -725,7 +725,7 @@ updatehealth() UpdateDamageIcon() nutrition -= SLIMEPERSON_HUNGERCOST - visible_message("[src] finishes regrowing their missing [new_limb]!", "You finish regrowing your [limb_select]") + visible_message("[src] finishes regrowing [p_their()] missing [new_limb]!", "You finish regrowing your [limb_select]") else to_chat(src, "You need to hold still in order to regrow a limb!") return diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index ec7592d4d3f..3a1ac4d3a83 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -205,7 +205,7 @@ var/global/list/damage_icon_parts = list() DI = damage_icon_parts[cache_index] standing_image.overlays += DI - overlays_standing[DAMAGE_LAYER] = standing_image + overlays_standing[H_DAMAGE_LAYER] = standing_image if(update_icons) update_icons() @@ -241,7 +241,7 @@ var/global/list/damage_icon_parts = list() var/obj/item/organ/external/part = bodyparts_by_name[organ_tag] if(isnull(part)) icon_key += "0" - else if(part.status & ORGAN_ROBOT) + else if(part.is_robotic()) icon_key += "2[part.model ? "-[part.model]": ""]" else if(part.status & ORGAN_DEAD) icon_key += "3" diff --git a/code/modules/mob/living/carbon/slime/slime.dm b/code/modules/mob/living/carbon/slime/slime.dm index 79bcd54775b..506cc804bd3 100644 --- a/code/modules/mob/living/carbon/slime/slime.dm +++ b/code/modules/mob/living/carbon/slime/slime.dm @@ -234,6 +234,24 @@ adjustBruteLoss(damage) updatehealth() +/mob/living/carbon/slime/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) + if(user.a_intent == INTENT_HARM) + if(Victim || Target) + Victim = null + Target = null + anchored = 0 + if(prob(80) && !client) + Discipline++ + spawn(0) + step_away(src, user, 15) + sleep(3) + step_away(src, user, 15) + ..(user, TRUE) + playsound(loc, "punch", 25, 1, -1) + visible_message("[user] has punched [src]!", "[user] has punched [src]!") + adjustBruteLoss(15) + return TRUE + /mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M) if(Victim) M.do_attack_animation(src, ATTACK_EFFECT_DISARM) @@ -301,20 +319,6 @@ var/damage = rand(1, 9) attacked += 10 if(prob(90)) - if(HULK in M.mutations) - damage += 15 - if(Victim || Target) - Victim = null - Target = null - anchored = 0 - if(prob(80) && !client) - Discipline++ - spawn(0) - step_away(src,M,15) - sleep(3) - step_away(src,M,15) - - playsound(loc, "punch", 25, 1, -1) add_attack_logs(M, src, "Melee attacked with fists") visible_message("[M] has punched [src]!", \ diff --git a/code/modules/mob/living/carbon/superheroes.dm b/code/modules/mob/living/carbon/superheroes.dm index d850caf658f..d9c7a9f12ef 100644 --- a/code/modules/mob/living/carbon/superheroes.dm +++ b/code/modules/mob/living/carbon/superheroes.dm @@ -188,15 +188,15 @@ switch(progress) if(1) to_chat(user, "You begin by introducing yourself and explaining what you're about.") - user.visible_message("[user] introduces \himself and explains \his plans.") + user.visible_message("[user] introduces [user.p_them()]self and explains [user.p_their()] plans.") if(2) to_chat(user, "You begin the recruitment of [target].") - user.visible_message("[user] leans over towards [target], whispering excitedly as he gives a speech.") + user.visible_message("[user] leans over towards [target], whispering excitedly as [user.p_they()] give[user.p_s()] a speech.") to_chat(target, "You feel yourself agreeing with [user], and a surge of loyalty begins building.") target.Weaken(12) sleep(20) if(ismindshielded(target)) - to_chat(user, "They are enslaved by Nanotrasen. You feel their interest in your cause wane and disappear.") + to_chat(user, "[target.p_they(TRUE)] are enslaved by Nanotrasen. You feel [target.p_their()] interest in your cause wane and disappear.") user.visible_message("[user] stops talking for a moment, then moves back away from [target].") to_chat(target, "Your mindshield implant activates, protecting you from conversion.") return @@ -214,7 +214,7 @@ recruiting = 0 to_chat(user, "You have recruited [target] as your henchman!") to_chat(target, "You have decided to enroll as a henchman for [user]. You are now part of the feared 'Greyshirts'.") - to_chat(target, "You must follow the orders of [user], and help him succeed in \his dastardly schemes.") + to_chat(target, "You must follow the orders of [user], and help [user.p_them()] succeed in [user.p_their()] dastardly schemes.") to_chat(target, "You may not harm other Greyshirt or [user]. However, you do not need to obey other Greyshirts.") ticker.mode.greyshirts += target.mind target.set_species("Human") diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 2f0d341f697..bff49e7c527 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -137,10 +137,12 @@ if(!AM.anchored) now_pushing = 1 var/t = get_dir(src, AM) - if(istype(AM, /obj/structure/window/full)) - for(var/obj/structure/window/win in get_step(AM, t)) - now_pushing = 0 - return + if(istype(AM, /obj/structure/window)) + var/obj/structure/window/W = AM + if(W.fulltile) + for(var/obj/structure/window/win in get_step(W, t)) + now_pushing = 0 + return if(pulling == AM) stop_pulling() var/current_dir @@ -816,7 +818,7 @@ who.unEquip(what) if(silent) put_in_hands(what) - add_attack_logs(src, who, "Stripped of [what]", isLivingSSD(who)) + add_attack_logs(src, who, "Stripped of [what]") // The src mob is trying to place an item on someone // Override if a certain mob should be behave differently when placing items (can't, for example) @@ -835,8 +837,7 @@ if(what && Adjacent(who)) unEquip(what) who.equip_to_slot_if_possible(what, where, 0, 1) - add_attack_logs(src, who, "Equipped [what]", isLivingSSD(who)) - + add_attack_logs(src, who, "Equipped [what]") /mob/living/singularity_act() var/gain = 20 diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index d734272e905..aaeb26fe2c6 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -129,7 +129,7 @@ add_attack_logs(M.occupant, src, "Mecha-meleed with [M]") else step_away(src,M) - add_attack_logs(M.occupant, src, "Mecha-pushed with [M]", FALSE) + add_attack_logs(M.occupant, src, "Mecha-pushed with [M]", ATKLOG_ALL) M.occupant_message("You push [src] out of the way.") visible_message("[M] pushes [src] out of the way.") return @@ -240,11 +240,11 @@ to_chat(user, "You already grabbed [src].") return - add_attack_logs(user, src, "Grabbed passively", admin_notify = FALSE) + add_attack_logs(user, src, "Grabbed passively", ATKLOG_ALL) var/obj/item/grab/G = new /obj/item/grab(user, src) if(buckled) - to_chat(user, "You cannot grab [src], \he is buckled in!") + to_chat(user, "You cannot grab [src]; [p_they()] [p_are()] buckled in!") if(!G) //the grab will delete itself in New if src is anchored return 0 user.put_in_active_hand(G) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index b2755e2b7d8..55e8536cd10 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -164,10 +164,10 @@ proc/get_radio_key_from_channel(var/channel) if(is_muzzled()) var/obj/item/clothing/mask/muzzle/G = wear_mask - if(G.mute == MUTE_ALL) //if the mask is supposed to mute you completely or just muffle you + if(G.mute == MUZZLE_MUTE_ALL) //if the mask is supposed to mute you completely or just muffle you to_chat(src, "You're muzzled and cannot speak!") return - else if(G.mute == MUTE_MUFFLE) + else if(G.mute == MUZZLE_MUTE_MUFFLE) message = muffledspeech(message) verb = "mumbles" diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 09b62f1c89c..c0393d78f92 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -87,11 +87,12 @@ var/list/ai_verbs_default = list( var/mob/living/simple_animal/bot/Bot var/turf/waypoint //Holds the turf of the currently selected waypoint. var/waypoint_mode = 0 //Waypoint mode is for selecting a turf via clicking. + var/apc_override = FALSE //hack for letting the AI use its APC even when visionless var/nuking = 0 var/obj/machinery/doomsday_device/doomsday_device var/obj/machinery/hologram/holopad/holo = null - var/mob/camera/aiEye/eyeobj = new() + var/mob/camera/aiEye/eyeobj var/sprint = 10 var/cooldown = 0 var/acceleration = 1 @@ -191,9 +192,7 @@ var/list/ai_verbs_default = list( spawn(5) new /obj/machinery/ai_powersupply(src) - eyeobj.ai = src - eyeobj.name = "[src.name] (AI Eye)" // Give it a name - eyeobj.loc = src.loc + create_eye() builtInCamera = new /obj/machinery/camera/portable(src) builtInCamera.c_tag = name @@ -1163,6 +1162,17 @@ var/list/ai_verbs_default = list( client.eye = eyeobj return TRUE + +/mob/living/silicon/ai/proc/can_see(atom/A) + if(isturf(loc)) //AI in core, check if on cameras + //get_turf_pixel() is because APCs in maint aren't actually in view of the inner camera + //apc_override is needed here because AIs use their own APC when depowered + return (cameranet && cameranet.checkTurfVis(get_turf_pixel(A))) || apc_override + //AI is carded/shunted + //view(src) returns nothing for carded/shunted AIs and they have x-ray vision so just use get_dist + var/list/viewscale = getviewsize(client.view) + return get_dist(src, A) <= max(viewscale[1]*0.5,viewscale[2]*0.5) + /mob/living/silicon/ai/proc/relay_speech(mob/living/M, text, verb, datum/language/speaking) if(!say_understands(M, speaking))//The AI will be able to understand most mobs talking through the holopad. if(speaking) @@ -1239,4 +1249,16 @@ var/list/ai_verbs_default = list( to_chat(src, "Unable to locate an airlock near [target].") else - to_chat(src, "Target is not on or near any active cameras on the station.") \ No newline at end of file + to_chat(src, "Target is not on or near any active cameras on the station.") + +/mob/living/silicon/ai/handle_fire() + return + +/mob/living/silicon/ai/update_fire() + return + +/mob/living/silicon/ai/IgniteMob() + return FALSE + +/mob/living/silicon/ai/ExtinguishMob() + return diff --git a/code/modules/mob/living/silicon/ai/freelook/chunk.dm b/code/modules/mob/living/silicon/ai/freelook/chunk.dm index eeeeed8e8bb..6737be463d6 100644 --- a/code/modules/mob/living/silicon/ai/freelook/chunk.dm +++ b/code/modules/mob/living/silicon/ai/freelook/chunk.dm @@ -28,7 +28,7 @@ eye.visibleCameraChunks += src visible++ seenby += eye - if(changed && !updating) + if(changed) update() // Remove an AI eye from the chunk, then update if changed. diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index 71a2e6cba36..2728a1af55e 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -20,7 +20,6 @@ // It will also stream the chunk that the new loc is in. /mob/camera/aiEye/setLoc(T) - if(ai) if(!isturf(ai.loc)) return @@ -30,8 +29,9 @@ if(ai.client) ai.client.eye = src //Holopad - if(ai.holo) - ai.holo.move_hologram() + if(istype(ai.current, /obj/machinery/hologram/holopad)) + var/obj/machinery/hologram/holopad/H = ai.current + H.move_hologram(ai, T) /mob/camera/aiEye/Move() return 0 @@ -41,8 +41,22 @@ return ai.client return null + +/mob/camera/aiEye/proc/RemoveImages() + var/client/C = GetViewerClient() + if(C) + for(var/V in visibleCameraChunks) + var/datum/camerachunk/chunk = V + C.images -= chunk.obscured + + /mob/camera/aiEye/Destroy() - ai = null + if(ai) + //ai.all_eyes -= src + ai = null + for(var/V in visibleCameraChunks) + var/datum/camerachunk/chunk = V + chunk.remove(src) return ..() /atom/proc/move_camera_by_click() @@ -102,12 +116,18 @@ src.eyeobj.loc = src.loc else to_chat(src, "ERROR: Eyeobj not found. Creating new eye...") - src.eyeobj = new(src.loc) - src.eyeobj.ai = src - src.eyeobj.name = "[src.name] (AI Eye)" // Give it a name + create_eye() eyeobj.setLoc(loc) +/mob/living/silicon/ai/proc/create_eye() + if(eyeobj) + return + eyeobj = new /mob/camera/aiEye() + eyeobj.ai = src + eyeobj.setLoc(loc) + eyeobj.name = "[name] (AI Eye)" + /mob/living/silicon/ai/proc/toggle_acceleration() set category = "AI Commands" set name = "Toggle Camera Acceleration" diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 1755674b4f6..42f132e39d4 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -129,8 +129,10 @@ to_chat(src, "Receiving control information from APC.") sleep(2) //bring up APC dialog - aiRestorePowerRoutine = 3 + apc_override = 1 theAPC.attack_ai(src) + apc_override = 0 + aiRestorePowerRoutine = 3 to_chat(src, "Here are your current laws:") src.show_laws() //WHY THE FUCK IS THIS HERE sleep(50) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 54ebdaf4da2..d28ce620a0c 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -114,8 +114,6 @@ pda.name = pda.owner + " (" + pda.ownjob + ")" var/datum/data/pda/app/messenger/M = pda.find_program(/datum/data/pda/app/messenger) M.toff = 1 - var/datum/data/pda/app/chatroom/C = pda.find_program(/datum/data/pda/app/chatroom) - C.toff = 1 ..() /mob/living/silicon/pai/Destroy() @@ -599,7 +597,7 @@ var/mob/living/carbon/human/H = over_object //changed to human to avoid stupid issues like xenos holding pAIs. if(!istype(H) || !Adjacent(H)) return ..() if(usr == src) - switch(alert(H, "[src] wants you to pick them up. Do it?",,"Yes","No")) + switch(alert(H, "[src] wants you to pick [p_them()] up. Do it?",,"Yes","No")) if("Yes") if(Adjacent(H)) get_scooped(H) diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm index 32bef5d7494..48c1c1d7d10 100644 --- a/code/modules/mob/living/silicon/pai/software_modules.dm +++ b/code/modules/mob/living/silicon/pai/software_modules.dm @@ -71,7 +71,7 @@ if(answer == "Yes") var/turf/T = get_turf_or_move(P.loc) for(var/mob/v in viewers(T)) - v.show_message("[M] presses \his thumb against [P].", 3, "[P] makes a sharp clicking sound as it extracts DNA material from [M].", 2) + v.show_message("[M] presses [M.p_their()] thumb against [P].", 3, "[P] makes a sharp clicking sound as it extracts DNA material from [M].", 2) var/datum/dna/dna = M.dna to_chat(P, "

[M]'s UE string : [dna.unique_enzymes]

") if(dna.unique_enzymes == P.master_dna) @@ -79,7 +79,7 @@ else to_chat(P, "DNA does not match stored Master DNA.") else - to_chat(P, "[M] does not seem like \he is going to provide a DNA sample willingly.") + to_chat(P, "[M] does not seem like [M.p_they()] [M.p_are()] going to provide a DNA sample willingly.") return 1 /datum/pai_software/radio_config @@ -226,123 +226,6 @@ M.create_message(P, target, 1) return 1 -/datum/pai_software/chatroom - name = "Digital Chatroom" - ram_cost = 5 - id = "chatroom" - toggle = 0 - - autoupdate = 1 - template_file = "pai_chatroom.tmpl" - ui_title = "Digital Chatroom" - -/datum/pai_software/chatroom/on_ui_data(mob/living/silicon/pai/user, datum/topic_state/state = self_state) - var/data[0] - - if(!user.pda) - log_runtime(EXCEPTION("pAI found without PDA."), user) - return data - var/datum/data/pda/app/chatroom/M = user.pda.find_program(/datum/data/pda/app/chatroom) - if(!M) - log_runtime(EXCEPTION("pAI PDA lacks a chatroom program"), user) - return data - - data["receiver_off"] = M.toff - data["ringer_off"] = M.notify_silent - - var/list/rooms[0] - for(var/datum/chatroom/c in chatrooms) - if((M in c.users) || (M in c.invites) || c.is_public) - rooms += list(list(name = "[c]", ref = "\ref[c]")) - data["rooms"] = rooms - - if(M.disconnected || !M.messaging_available(1)) - data["disconnected"] = 1 - else if(M.current_room) - data["current_room"] = "\ref[M.current_room]" - data["current_room_name"] = M.current_room.name - data["current_room_topic"] = M.current_room.topic - data["messages"] = M.current_room.logs - var/list/users[0] - for(var/U in M.current_room.users) - var/datum/data/pda/app/chatroom/ch = U - users += "[ch.pda.owner]" - for(var/U in (M.current_room.invites - M.current_room.users)) - var/datum/data/pda/app/chatroom/ch = U - users += "[ch.pda.owner]" - data["users"] = users - - return data - -/datum/pai_software/chatroom/Topic(href, href_list) - var/mob/living/silicon/pai/P = usr - if(!istype(P)) - return - - if(!isnull(P.pda) && P.pda.can_use()) - var/datum/data/pda/app/chatroom/M = P.pda.find_program(/datum/data/pda/app/chatroom) - if(!M) - return - - if(href_list["toggler"]) - M.toff = href_list["toggler"] != "1" - return 1 - else if(href_list["ringer"]) - M.notify_silent = href_list["ringer"] != "1" - return 1 - else if(href_list["topic"]) - if(!M.current_room) - return 1 - - var/t = input("Enter new topic:", M.current_room, M.current_room.topic) as text|null - spawn() - if(!t || !M.check_messaging_available() || !P.pda.can_use()) - return - t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN)) - t = readd_quotes(t) - if(!t) - return - - M.current_room.topic = t - M.current_room.announce(M, "Topic has been changed to '[t]' by [P.pda.owner].") - return 1 - else if(href_list["select"]) - var/s = href_list["select"] - if(s == "*NONE*") - M.current_room = null - else - var/datum/chatroom/CR = locate(s) - if(istype(CR)) - if(!(M in CR.users)) - if(!CR.login(M)) - return - M.current_room = CR - return 1 - else if(href_list["target"]) - if(P.silence_time) - return alert("Communications circuits remain uninitialized.") - - var/datum/chatroom/target = locate(href_list["target"]) - if(istype(target)) - if(!(M in target.users)) - if(!target.login(M)) - return - var/t = input("Please enter message", target) as text|null - spawn() - if(!t || !M.check_messaging_available()) - return - t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN)) - t = readd_quotes(t) - if(!t || !P.pda.can_use()) - return - - target.post(M, t) - return 1 - else if(href_list["reconnect"]) - spawn() - M.messaging_available() - return 1 - /datum/pai_software/med_records name = "Medical Records" ram_cost = 15 diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index e3407c06f3d..5802bdeb9ec 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -234,7 +234,7 @@ var/organ_found if(H.internal_organs.len) for(var/obj/item/organ/external/E in H.bodyparts) - if(!(E.status & ORGAN_ROBOT)) + if(!E.is_robotic()) continue organ_found = 1 to_chat(user, "[E.name]: [round(E.brute_dam)] [round(E.burn_dam)]") @@ -245,7 +245,7 @@ organ_found = null if(H.internal_organs.len) for(var/obj/item/organ/internal/O in H.internal_organs) - if(!(O.status & ORGAN_ROBOT)) + if(!O.is_robotic()) continue organ_found = 1 to_chat(user, "[capitalize(O.name)]: [O.damage]") diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index bd06f7045ae..aaaeb15b283 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -142,7 +142,7 @@ to_chat(usr, "The reboot system is currently offline. Please wait another [cooldown_time] seconds.") return - user.visible_message("\the [user] swipes \his ID card through \the [src], attempting to reboot it.", "You swipe your ID card through \the [src], attempting to reboot it.") + user.visible_message("\the [user] swipes [user.p_their()] ID card through [src], attempting to reboot it.", "You swipe your ID card through [src], attempting to reboot it.") last_reboot = world.time / 10 var/drones = 0 for(var/mob/living/silicon/robot/drone/D in world) @@ -153,7 +153,7 @@ return else - user.visible_message("\the [user] swipes \his ID card through \the [src], attempting to shut it down.", "You swipe your ID card through \the [src], attempting to shut it down.") + user.visible_message("\the [user] swipes [user.p_their()] ID card through [src], attempting to shut it down.", "You swipe your ID card through \the [src], attempting to shut it down.") if(emagged) return diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 444c4c23949..755b874667a 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -131,8 +131,8 @@ var/list/robot_verbs_default = list( camera.status = 0 if(mmi == null) - mmi = new /obj/item/mmi/posibrain(src) //Give the borg an MMI if he spawns without for some reason. (probably not the correct way to spawn a posibrain, but it works) - mmi.icon_state="posibrain-occupied" + mmi = new /obj/item/mmi/robotic_brain(src) //Give the borg an MMI if he spawns without for some reason. (probably not the correct way to spawn a robotic brain, but it works) + mmi.icon_state = "boris" initialize_components() //if(!unfinished) @@ -210,7 +210,7 @@ var/list/robot_verbs_default = list( if(prefix) modtype = prefix if(mmi) - if(istype(mmi, /obj/item/mmi/posibrain)) + if(istype(mmi, /obj/item/mmi/robotic_brain)) braintype = "Android" else braintype = "Cyborg" @@ -738,7 +738,7 @@ var/list/robot_verbs_default = list( else if(istype(W, /obj/item/borg/upgrade/)) var/obj/item/borg/upgrade/U = W if(!opened) - to_chat(user, "You must access the borgs internals!") + to_chat(user, "You must access the borg's internals!") else if(!src.module && U.require_module) to_chat(user, "The borg must choose a module before it can be upgraded!") else if(U.locked) @@ -752,6 +752,21 @@ var/list/robot_verbs_default = list( else to_chat(user, "Upgrade error.") + else if(istype(W, /obj/item/mmi_radio_upgrade)) + if(!opened) + to_chat(user, "You must access the borg's internals!") + return + else if(!mmi) + to_chat(user, "This cyborg does not have an MMI to augment!") + return + else if(mmi.radio) + to_chat(user, "A radio upgrade is already installed in the MMI!") + return + else if(user.drop_item()) + to_chat(user, "You apply the upgrade to [src].") + to_chat(src, "MMI radio capability installed.") + mmi.install_radio() + qdel(W) else return ..() @@ -794,7 +809,7 @@ var/list/robot_verbs_default = list( laws = new /datum/ai_laws/syndicate_override var/time = time2text(world.realtime,"hh:mm:ss") lawchanges.Add("[time] : [M.name]([M.key]) emagged [name]([key])") - set_zeroth_law("Only [M.real_name] and people he designates as being such are Syndicate Agents.") + set_zeroth_law("Only [M.real_name] and people [M.p_they()] designate[M.p_s()] as being such are Syndicate Agents.") to_chat(src, "ALERT: Foreign software detected.") sleep(5) to_chat(src, "Initiating diagnostics...") @@ -810,7 +825,7 @@ var/list/robot_verbs_default = list( to_chat(src, "ERRORERRORERROR") to_chat(src, "Obey these laws:") laws.show_laws(src) - to_chat(src, "ALERT: [M.real_name] is your new master. Obey your new laws and his commands.") + to_chat(src, "ALERT: [M.real_name] is your new master. Obey your new laws and [M.p_their()] commands.") SetLockdown(0) if(src.module && istype(src.module, /obj/item/robot_module/miner)) for(var/obj/item/pickaxe/drill/cyborg/D in src.module.modules) @@ -1442,4 +1457,4 @@ var/list/robot_verbs_default = list( return eye_protection /mob/living/silicon/robot/check_ear_prot() - return ear_protection \ No newline at end of file + return ear_protection diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index 0de811224dc..0a3ed47b933 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -74,8 +74,8 @@ if(!message) return - var/obj/machinery/hologram/holopad/T = src.holo - if(T && T.hologram && T.master == src)//If there is a hologram and its master is the user. + var/obj/machinery/hologram/holopad/T = current + if(istype(T) && T.masters[src]) //Human-like, sorta, heard by those who understand humans. var/rendered_a @@ -112,8 +112,8 @@ if(!message) return - var/obj/machinery/hologram/holopad/T = src.holo - if(T && T.hologram && T.master == src) + var/obj/machinery/hologram/holopad/T = current + if(istype(T) && T.masters[src]) var/rendered = "[name] [message]" to_chat(src, "Holopad action relayed, [real_name] [message]") @@ -127,8 +127,8 @@ return 1 /mob/living/silicon/ai/emote(var/act, var/type, var/message) - var/obj/machinery/hologram/holopad/T = src.holo - if(T && T.hologram && T.master == src) //Is the AI using a holopad? + var/obj/machinery/hologram/holopad/T = current + if(istype(T) && T.masters[src])//Is the AI using a holopad? src.holopad_emote(message) else //Emote normally, then. ..() diff --git a/code/modules/mob/living/silicon/silicon_defense.dm b/code/modules/mob/living/silicon/silicon_defense.dm index 070ed327163..a903b6999dc 100644 --- a/code/modules/mob/living/silicon/silicon_defense.dm +++ b/code/modules/mob/living/silicon/silicon_defense.dm @@ -41,6 +41,15 @@ if(L.a_intent == INTENT_HELP) visible_message("[L.name] rubs its head against [src].") +/mob/living/silicon/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) + if(user.a_intent == INTENT_HARM) + ..(user, TRUE) + adjustBruteLoss(rand(10, 15)) + playsound(loc, "punch", 25, 1, -1) + visible_message("[user] has punched [src]!", "[user] has punched [src]!") + return TRUE + return FALSE + /mob/living/silicon/attack_hand(mob/living/carbon/human/M) switch(M.a_intent) if(INTENT_HELP) @@ -51,15 +60,6 @@ else M.do_attack_animation(src, ATTACK_EFFECT_PUNCH) playsound(loc, 'sound/effects/bang.ogg', 10, 1) - if(HULK in M.mutations) - var/damage = rand(10,15) - adjustBruteLoss(damage) - add_attack_logs(M, src, "Melee attacked with fists") - playsound(loc, "punch", 25, 1, -1) - visible_message("[M] has punched [src]!", \ - "[M] has punched [src]!") - return 1 - else - visible_message("[M] punches [src], but doesn't leave a dent.", \ + visible_message("[M] punches [src], but doesn't leave a dent.", \ "[M] punches [src], but doesn't leave a dent.!") - return 0 + return FALSE diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm index 972759812b4..309a13468a3 100644 --- a/code/modules/mob/living/simple_animal/animal_defense.dm +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -19,6 +19,14 @@ updatehealth() return 1 +/mob/living/simple_animal/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) + if(user.a_intent == INTENT_HARM) + ..(user, TRUE) + playsound(loc, "punch", 25, 1, -1) + visible_message("[user] has punched [src]!", "[user] has punched [src]!") + adjustBruteLoss(15) + return TRUE + /mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M) if(..()) //if harm or disarm intent. var/damage = rand(15, 30) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 986795ccd1e..5e79c315f42 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -276,7 +276,7 @@ return apply_damage(M.melee_damage_upper, BRUTE) visible_message("[M] has [M.attacktext] [src]!") - add_attack_logs(M, src, "Animal attacked", FALSE) + add_attack_logs(M, src, "Animal attacked", ATKLOG_ALL) if(prob(10)) new /obj/effect/decal/cleanable/blood/oil(loc) diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 9e96a16fb0f..90c44f19286 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -282,73 +282,66 @@ log_game("[key_name(user)] has renamed a robot to [t]") //Medbot Assembly -/obj/item/firstaid_arm_assembly - name = "incomplete medibot assembly." - desc = "A first aid kit with a robot arm permanently grafted to it." - icon = 'icons/obj/aibots.dmi' - icon_state = "firstaid_arm" - var/build_step = 0 - var/created_name = "Medibot" //To preserve the name if it's a unique medbot I guess - var/skin = null //Same as medbot, set to tox or ointment for the respective kits. - w_class = WEIGHT_CLASS_NORMAL - var/treatment_brute = "salglu_solution" - var/treatment_oxy = "salbutamol" - var/treatment_fire = "salglu_solution" - var/treatment_tox = "charcoal" - var/treatment_virus = "spaceacillin" - req_one_access = list(access_medical, access_robotics) - - /obj/item/firstaid_arm_assembly/New() - ..() - spawn(5) - if(skin) - overlays += image('icons/obj/aibots.dmi', "kit_skin_[skin]") - -/obj/item/storage/firstaid/attackby(obj/item/robot_parts/S, mob/user, params) - - if((!istype(S, /obj/item/robot_parts/l_arm)) && (!istype(S, /obj/item/robot_parts/r_arm))) - ..() - return +/obj/item/storage/firstaid/attackby(obj/item/I, mob/user, params) + if(!istype(I, /obj/item/robot_parts/l_arm) && !istype(I, /obj/item/robot_parts/r_arm)) + return ..() //Making a medibot! - if(contents.len >= 1) + if(contents.len) to_chat(user, "You need to empty [src] out first!") return - var/obj/item/firstaid_arm_assembly/A = new /obj/item/firstaid_arm_assembly - if(istype(src,/obj/item/storage/firstaid/fire)) - A.skin = "ointment" - else if(istype(src,/obj/item/storage/firstaid/toxin)) - A.skin = "tox" - else if(istype(src,/obj/item/storage/firstaid/o2)) - A.skin = "o2" - else if(istype(src,/obj/item/storage/firstaid/brute)) - A.skin = "brute" - else if(istype(src,/obj/item/storage/firstaid/adv)) - A.skin = "adv" - else if(istype(src,/obj/item/storage/firstaid/tactical)) - A.skin = "bezerk" - else if(istype(src,/obj/item/storage/firstaid/aquatic_kit)) - A.skin = "fish" + var/obj/item/firstaid_arm_assembly/A = new /obj/item/firstaid_arm_assembly(loc, med_bot_skin) A.req_one_access = req_one_access + A.syndicate_aligned = syndicate_aligned A.treatment_oxy = treatment_oxy A.treatment_brute = treatment_brute A.treatment_fire = treatment_fire A.treatment_tox = treatment_tox A.treatment_virus = treatment_virus - qdel(S) + qdel(I) user.put_in_hands(A) to_chat(user, "You add the robot arm to the first aid kit.") user.unEquip(src, 1) qdel(src) +/obj/item/firstaid_arm_assembly + name = "incomplete medibot assembly." + desc = "A first aid kit with a robot arm permanently grafted to it." + icon = 'icons/obj/aibots.dmi' + icon_state = "firstaid_arm" + w_class = WEIGHT_CLASS_NORMAL + req_one_access = list(access_medical, access_robotics) + var/build_step = 0 + var/created_name = "Medibot" //To preserve the name if it's a unique medbot I guess + var/skin = null //Same as medbot, set to tox or ointment for the respective kits. + var/syndicate_aligned = FALSE + var/treatment_brute = "salglu_solution" + var/treatment_oxy = "salbutamol" + var/treatment_fire = "salglu_solution" + var/treatment_tox = "charcoal" + var/treatment_virus = "spaceacillin" -/obj/item/firstaid_arm_assembly/attackby(obj/item/W, mob/user, params) +/obj/item/firstaid_arm_assembly/New(loc, new_skin) ..() - if(istype(W, /obj/item/pen)) - var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN) + if(new_skin) + skin = new_skin + update_icon() + +/obj/item/firstaid_arm_assembly/update_icon() + overlays.Cut() + if(skin) + overlays += image('icons/obj/aibots.dmi', "kit_skin_[skin]") + if(build_step > 0) + overlays += image('icons/obj/aibots.dmi', "na_scanner") + + +/obj/item/firstaid_arm_assembly/attackby(obj/item/I, mob/user, params) + ..() + if(istype(I, /obj/item/pen)) + var/t = stripped_input(user, "Enter new robot name", name, created_name, MAX_NAME_LEN) if(!t) return if(!in_range(src, user) && loc != user) @@ -358,32 +351,34 @@ else switch(build_step) if(0) - if(istype(W, /obj/item/healthanalyzer)) - if(!user.unEquip(W)) + if(istype(I, /obj/item/healthanalyzer)) + if(!user.drop_item()) return - qdel(W) + qdel(I) build_step++ to_chat(user, "You add the health sensor to [src].") name = "First aid/robot arm/health analyzer assembly" - overlays += image('icons/obj/aibots.dmi', "na_scanner") + update_icon() if(1) - if(isprox(W)) - if(!user.unEquip(W)) + if(isprox(I)) + if(!user.drop_item()) return - qdel(W) + qdel(I) build_step++ to_chat(user, "You complete the Medibot. Beep boop!") var/turf/T = get_turf(src) - var/mob/living/simple_animal/bot/medbot/S = new /mob/living/simple_animal/bot/medbot(T) - S.skin = skin - S.name = created_name - S.bot_core.req_one_access = req_one_access - S.treatment_oxy = treatment_oxy - S.treatment_brute = treatment_brute - S.treatment_fire = treatment_fire - S.treatment_tox = treatment_tox - S.treatment_virus = treatment_virus + if(!syndicate_aligned) + var/mob/living/simple_animal/bot/medbot/S = new /mob/living/simple_animal/bot/medbot(T, skin) + S.name = created_name + S.bot_core.req_one_access = req_one_access + S.treatment_oxy = treatment_oxy + S.treatment_brute = treatment_brute + S.treatment_fire = treatment_fire + S.treatment_tox = treatment_tox + S.treatment_virus = treatment_virus + else + new /mob/living/simple_animal/bot/medbot/syndicate(T) //Syndicate medibots are a special case that have so many unique vars on them, it's not worth passing them through construction phases user.unEquip(src, 1) qdel(src) diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 576ad200d5c..9d7fa39ed87 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -17,7 +17,7 @@ bot_filter = RADIO_SECBOT model = "ED-209" bot_purpose = "seek out criminals, handcuff them, and report their location to security" - bot_core = /obj/machinery/bot_core/secbot + bot_core_type = /obj/machinery/bot_core/secbot window_id = "autoed209" window_name = "Automatic Security Unit v2.6" path_image_color = "#FF0000" @@ -61,12 +61,14 @@ shot_delay = 6//Longer shot delay because JESUS CHRIST check_records = 0//Don't actively target people set to arrest arrest_type = 1//Don't even try to cuff - bot_core.req_access = list(access_maint_tunnels, access_theatre) - arrest_type = 1 - if((lasercolor == "b") && (name == "\improper ED-209 Security Robot"))//Picks a name if there isn't already a custome one - name = pick("BLUE BALLER","SANIC","BLUE KILLDEATH MURDERBOT") - if((lasercolor == "r") && (name == "\improper ED-209 Security Robot")) - name = pick("RED RAMPAGE","RED ROVER","RED KILLDEATH MURDERBOT") + declare_arrests = 0 // Don't spam sec + bot_core.req_access = list(access_maint_tunnels, access_theatre, access_robotics) + + if(created_name == initial(name) || !created_name) + if(lasercolor == "b") + name = pick("BLUE BALLER","SANIC","BLUE KILLDEATH MURDERBOT") + else if (lasercolor == "r") + name = pick("RED RAMPAGE","RED ROVER","RED KILLDEATH MURDERBOT") //SECHUD var/datum/atom_hud/secsensor = huds[DATA_HUD_SECURITY_ADVANCED] @@ -94,37 +96,37 @@ /mob/living/simple_animal/bot/ed209/set_custom_texts() text_hack = "You disable [name]'s combat inhibitor." text_dehack = "You restore [name]'s combat inhibitor." - text_dehack_fail = "[name] ignores your attempts to restrict him!" + text_dehack_fail = "[name] ignores your attempts to restrict [p_them()]!" /mob/living/simple_animal/bot/ed209/get_controls(mob/user) var/dat dat += hack(user) dat += showpai(user) dat += text({" -Security Unit v2.6 controls

-Status: []
-Behaviour controls are [locked ? "locked" : "unlocked"]
-Maintenance panel panel is [open ? "opened" : "closed"]
"}, + Security Unit v2.6 controls

+ Status: []
+ Behaviour controls are [locked ? "locked" : "unlocked"]
+ Maintenance panel panel is [open ? "opened" : "closed"]
"}, -"[on ? "On" : "Off"]" ) + "[on ? "On" : "Off"]" ) if(!locked || issilicon(user) || user.can_admin_interact()) + dat += "Auto Patrol [auto_patrol ? "On" : "Off"]
" + if(!lasercolor) dat += text({"
-Arrest Unidentifiable Persons: []
-Arrest for Unauthorized Weapons: []
-Arrest for Warrant: []
-
-Operating Mode: []
-Report Arrests[]
-Auto Patrol[]"}, + Arrest Unidentifiable Persons: []
+ Arrest for Unauthorized Weapons: []
+ Arrest for Warrant: []
+
+ Operating Mode: []
+ Report Arrests[]
"}, -"[idcheck ? "Yes" : "No"]", -"[weaponscheck ? "Yes" : "No"]", -"[check_records ? "Yes" : "No"]", -"[arrest_type ? "Detain" : "Arrest"]", -"[declare_arrests ? "Yes" : "No"]", -"[auto_patrol ? "On" : "Off"]" ) + "[idcheck ? "Yes" : "No"]", + "[weaponscheck ? "Yes" : "No"]", + "[check_records ? "Yes" : "No"]", + "[arrest_type ? "Detain" : "Arrest"]", + "[declare_arrests ? "Yes" : "No"]") return dat @@ -239,13 +241,18 @@ Auto Patrol[]"}, if(target) // make sure target exists if(Adjacent(target) && isturf(target.loc)) // if right next to perp stun_attack(target) + if(!lasercolor) + mode = BOT_PREP_ARREST + anchored = 1 + target_lastloc = target.loc + return + else + mode = BOT_HUNT + target = null + target_lastloc = null + return - mode = BOT_PREP_ARREST - anchored = 1 - target_lastloc = target.loc - return - - else // not next to perp + else if(!disabled) // not next to perp var/turf/olddist = get_dist(src, target) walk_to(src, target,1,4) if((get_dist(src, target)) >= (olddist)) @@ -406,7 +413,7 @@ Auto Patrol[]"}, shoot_sound = 'sound/weapons/laser.ogg' if(emagged == 2) if(lasercolor) - projectile = /obj/item/projectile/beam/lasertag + projectile = /obj/item/projectile/beam/disabler else projectile = /obj/item/projectile/beam else @@ -501,6 +508,7 @@ Auto Patrol[]"}, if(lasertag_check) icon_state = "[lasercolor]ed2090" disabled = 1 + walk_to(src, 0) target = null spawn(100) disabled = 0 @@ -569,4 +577,4 @@ Auto Patrol[]"}, if(!C.handcuffed) C.handcuffed = new /obj/item/restraints/handcuffs/cable/zipties/used(C) C.update_handcuffed() - back_to_idle() + back_to_idle() \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index c531a6ed067..b1133cb0e08 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -14,7 +14,7 @@ bot_filter = RADIO_FLOORBOT model = "Floorbot" bot_purpose = "seek out damaged or missing floor tiles, and repair or replace them as necessary" - bot_core = /obj/machinery/bot_core/floorbot + bot_core_type = /obj/machinery/bot_core/floorbot window_id = "autofloor" window_name = "Automatic Station Floor Repairer v1.1" path_image_color = "#FFA500" @@ -58,7 +58,7 @@ /mob/living/simple_animal/bot/floorbot/set_custom_texts() text_hack = "You corrupt [name]'s construction protocols." - text_dehack = "You detect errors in [name] and reset his programming." + text_dehack = "You detect errors in [name] and reset [p_their()] programming." text_dehack_fail = "[name] is not responding to reset commands!" /mob/living/simple_animal/bot/floorbot/get_controls(mob/user) @@ -98,7 +98,7 @@ T.use(loaded) amount += loaded if(loaded > 0) - to_chat(user, "You load [loaded] tiles into the floorbot. He now contains [amount] tiles.") + to_chat(user, "You load [loaded] tiles into the floorbot. [p_they(TRUE)] now contains [amount] tiles.") nagged = 0 update_icon() else diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 7c737690ec0..6cdffd48f16 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -44,6 +44,7 @@ var/treatment_virus = "spaceacillin" var/treat_virus = 1 //If on, the bot will attempt to treat viral infections, curing them if possible. var/shut_up = 0 //self explanatory :) + var/syndicate_aligned = FALSE // Will it only treat operatives? /mob/living/simple_animal/bot/medbot/tox skin = "tox" @@ -68,8 +69,8 @@ desc = "International Medibot of mystery." skin = "bezerk" treatment_oxy = "perfluorodecalin" - treatment_brute = "styptic_powder" - treatment_fire = "silver_sulfadiazine" + treatment_brute = "bicaridine" + treatment_fire = "kelotane" treatment_tox = "charcoal" /mob/living/simple_animal/bot/medbot/syndicate @@ -77,9 +78,10 @@ desc = "You'd better have insurance!" skin = "bezerk" treatment_oxy = "perfluorodecalin" - treatment_brute = "styptic_powder" - treatment_fire = "silver_sulfadiazine" + treatment_brute = "bicaridine" + treatment_fire = "kelotane" treatment_tox = "charcoal" + syndicate_aligned = TRUE bot_core_type = /obj/machinery/bot_core/medbot/syndicate control_freq = BOT_FREQ + 1000 // make it not show up on lists radio_channel = "Syndicate" @@ -90,6 +92,9 @@ Radio.syndie = 1 /mob/living/simple_animal/bot/medbot/update_icon() + overlays.Cut() + if(skin) + overlays += "medskin_[skin]" if(!on) icon_state = "medibot0" return @@ -101,22 +106,21 @@ else icon_state = "medibot1" -/mob/living/simple_animal/bot/medbot/New() +/mob/living/simple_animal/bot/medbot/New(loc, new_skin) ..() - update_icon() - - spawn(4) - if(skin) - overlays += image('icons/obj/aibots.dmi', "medskin_[skin]") - - var/datum/job/doctor/J = new/datum/job/doctor - access_card.access += J.get_access() - prev_access = access_card.access + var/datum/job/doctor/J = new /datum/job/doctor + access_card.access += J.get_access() + prev_access = access_card.access + qdel(J) var/datum/atom_hud/medsensor = huds[DATA_HUD_MEDICAL_ADVANCED] medsensor.add_hud_to(src) permanent_huds |= medsensor + if(new_skin) + skin = new_skin + update_icon() + /mob/living/simple_animal/bot/medbot/bot_reset() ..() patient = null @@ -271,8 +275,10 @@ if(assess_patient(H)) last_found = world.time if((last_newpatient_speak + 300) < world.time) //Don't spam these messages! - var/message = pick("Hey, [H.name]! Hold on, I'm coming.","Wait [H.name]! I want to help!","[H.name], you appear to be injured!") + var/list/messagevoice = list("Hey, [H.name]! Hold on, I'm coming." = 'sound/voice/mcoming.ogg', "Wait [H.name]! I want to help!" = 'sound/voice/mhelp.ogg', "[H.name], you appear to be injured!" = 'sound/voice/minjured.ogg') + var/message = pick(messagevoice) speak(message) + playsound(loc, messagevoice[message], 50, 0) last_newpatient_speak = world.time return H else @@ -304,8 +310,10 @@ if(!patient) if(!shut_up && prob(1)) - var/message = pick("Radar, put a mask on!","There's always a catch, and it's the best there is.","I knew it, I should've been a plastic surgeon.","What kind of medbay is this? Everyone's dropping like dead flies.","Delicious!") + var/list/messagevoice = list("Radar, put a mask on!" = 'sound/voice/mradar.ogg', "There's always a catch, and I'm the best there is." = 'sound/voice/mcatch.ogg', "I knew it, I should've been a plastic surgeon." = 'sound/voice/msurgeon.ogg', "What kind of medbay is this? Everyone's dropping like flies." = 'sound/voice/mflies.ogg', "Delicious!" = 'sound/voice/mdelicious.ogg') + var/message = pick(messagevoice) speak(message) + playsound(loc, messagevoice[message], 50, 0) var/scan_range = (stationary_mode ? 1 : DEFAULT_SCAN_RANGE) //If in stationary mode, scan range is limited to adjacent patients. patient = scan(/mob/living/carbon/human, oldpatient, scan_range) oldpatient = patient @@ -371,7 +379,7 @@ if(emagged == 2) //Everyone needs our medicine. (Our medicine is toxins) return 1 - if((skin == "bezerk") && (!("syndicate" in C.faction))) + if(syndicate_aligned && (!("syndicate" in C.faction))) return 0 if(declare_crit && C.health <= 0) //Critical condition! Call for help! @@ -440,9 +448,11 @@ soft_reset() return - if(C.stat == 2) - var/death_message = pick("No! NO!","Live, damnit! LIVE!","I...I've never lost a patient before. Not today, I mean.") - speak(death_message) + if(C.stat == DEAD || (C.status_flags & FAKEDEATH)) + var/list/messagevoice = list("No! Stay with me!" = 'sound/voice/mno.ogg', "Live, damnit! LIVE!" = 'sound/voice/mlive.ogg', "I...I've never lost a patient before. Not today, I mean." = 'sound/voice/mlost.ogg') + var/message = pick(messagevoice) + speak(message) + playsound(loc, messagevoice[message], 50, 0) oldpatient = patient soft_reset() return @@ -492,8 +502,10 @@ break if(!reagent_id) //If they don't need any of that they're probably cured! - var/message = pick("All patched up!","An apple a day keeps me away.","Feel better soon!") + var/list/messagevoice = list("All patched up!" = 'sound/voice/mpatchedup.ogg', "An apple a day keeps me away." = 'sound/voice/mapple.ogg', "Feel better soon!" = 'sound/voice/mfeelbetter.ogg') + var/message = pick(messagevoice) speak(message) + playsound(loc, messagevoice[message], 50, 0) bot_reset() return else @@ -554,7 +566,8 @@ if("adv") new /obj/item/storage/firstaid/adv/empty(Tsec) if("bezerk") - new /obj/item/storage/firstaid/tactical/empty(Tsec) + var/obj/item/storage/firstaid/tactical/empty/T = new(Tsec) + T.syndicate_aligned = syndicate_aligned //This is a special case since Syndicate medibots and the mysterious medibot look the same; we also dont' want crew building Syndicate medibots if the mysterious medibot blows up. if("fish") new /obj/item/storage/firstaid/aquatic_kit(Tsec) else @@ -571,6 +584,9 @@ if(prob(50)) new /obj/item/robot_parts/l_arm(Tsec) + if(emagged && prob(25)) + playsound(loc, 'sound/voice/minsult.ogg', 50, 0) + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(3, 1, src) s.start() @@ -579,7 +595,7 @@ /mob/living/simple_animal/bot/medbot/proc/declare(crit_patient) if(declare_cooldown) return - if((skin == "bezerk")) + if(syndicate_aligned) return var/area/location = get_area(src) speak("Medical emergency! [crit_patient ? "[crit_patient]" : "A patient"] is in critical condition at [location]!", radio_channel) diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 613f91e024c..2514af0eebd 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -75,10 +75,10 @@ //helmet and armor = 100% protection if( istype(inventory_head,/obj/item/clothing/head/helmet) && istype(inventory_back,/obj/item/clothing/suit/armor) ) if( O.force ) - to_chat(user, "[src] is wearing too much armor! You can't cause \him any damage.") + to_chat(user, "[src] is wearing too much armor! You can't cause [p_them()] any damage.") visible_message(" [user] hits [src] with [O], however [src] is too armored.") else - to_chat(user, "[src] is wearing too much armor! You can't reach \his skin.") + to_chat(user, "[src] is wearing too much armor! You can't reach [p_their()] skin.") visible_message("[user] gently taps [src] with [O].") if(health>0 && prob(15)) custom_emote(1, "looks at [user] with [pick("an amused","an annoyed","a confused","a resentful", "a happy", "an excited")] expression.") @@ -180,7 +180,7 @@ ) if( ! ( item_to_add.type in allowed_types ) ) - to_chat(usr, "You set [item_to_add] on [src]'s back, but \he shakes it off!") + to_chat(usr, "You set [item_to_add] on [src]'s back, but [p_they()] shake[p_s()] it off!") if(!usr.drop_item()) to_chat(usr, "\The [item_to_add] is stuck to your hand, you cannot put it on [src]'s back!") return @@ -379,10 +379,10 @@ to_chat(user, "\The [item_to_add] is stuck to your hand, you cannot put it on [src]'s head!") return 0 if(health <= 0) - to_chat(user, "There is merely a dull, lifeless look in [real_name]'s eyes as you put the [item_to_add] on \him.") + to_chat(user, "There is merely a dull, lifeless look in [real_name]'s eyes as you put the [item_to_add] on [p_them()].") else if(user) user.visible_message("[user] puts [item_to_add] on [real_name]'s head. [src] looks at [user] and barks once.", - "You put [item_to_add] on [real_name]'s head. [src] gives you a peculiar look, then wags \his tail once and barks.", + "You put [item_to_add] on [real_name]'s head. [src] gives you a peculiar look, then wags [p_their()] tail once and barks.", "You hear a friendly-sounding bark.") item_to_add.loc = src src.inventory_head = item_to_add @@ -392,7 +392,7 @@ if(user && !user.drop_item()) to_chat(user, "\The [item_to_add] is stuck to your hand, you cannot put it on [src]'s head!") return 0 - to_chat(user, "You set [item_to_add] on [src]'s head, but \he shakes it off!") + to_chat(user, "You set [item_to_add] on [src]'s head, but [p_they()] shake[p_s()] it off!") item_to_add.loc = loc if(prob(25)) step_rand(item_to_add) diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index 70a64d2dbcb..37ed25f15e8 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -35,7 +35,7 @@ var/emagged = 0 //is it getting ready to explode? var/obj/item/mmi/mmi = null - var/emagged_master = null //for administrative purposes, to see who emagged the spiderbot; also for a holder for if someone emags an empty frame first then inserts an MMI. + var/mob/emagged_master = null //for administrative purposes, to see who emagged the spiderbot; also for a holder for if someone emags an empty frame first then inserts an MMI. /mob/living/simple_animal/spiderbot/Destroy() if(emagged) @@ -135,8 +135,8 @@ else emagged = 1 to_chat(user, "You short out the security protocols and rewrite [src]'s internal memory.") - to_chat(src, "You have been emagged; you are now completely loyal to [user] and their every order!") - emagged_master = user.name + to_chat(src, "You have been emagged; you are now completely loyal to [user] and [user.p_their()] every order!") + emagged_master = user add_attack_logs(user, src, "Emagged") maxHealth = 60 health = 60 @@ -150,14 +150,14 @@ ckey = M.brainmob.ckey name = "Spider-bot ([M.brainmob.name])" if(emagged) - to_chat(src, "You have been emagged; you are now completely loyal to [emagged_master] and their every order!") + to_chat(src, "You have been emagged; you are now completely loyal to [emagged_master] and [emagged_master.p_their()] every order!") /mob/living/simple_animal/spiderbot/proc/update_icon() if(mmi) if(istype(mmi, /obj/item/mmi)) icon_state = "spiderbot-chassis-mmi" icon_living = "spiderbot-chassis-mmi" - if(istype(mmi, /obj/item/mmi/posibrain)) + if(istype(mmi, /obj/item/mmi/robotic_brain)) icon_state = "spiderbot-chassis-posi" icon_living = "spiderbot-chassis-posi" diff --git a/code/modules/mob/living/simple_animal/hostile/deathsquid.dm b/code/modules/mob/living/simple_animal/hostile/deathsquid.dm index e825bb2d273..065247a538d 100644 --- a/code/modules/mob/living/simple_animal/hostile/deathsquid.dm +++ b/code/modules/mob/living/simple_animal/hostile/deathsquid.dm @@ -11,6 +11,8 @@ icon_state = "deathsquid" icon_living = "deathsquid" icon_dead = "deathsquiddead" + pixel_x = -24 + pixel_y = -24 attacktext = "slices" attack_sound = 'sound/weapons/bladeslice.ogg' diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm index 5c25e9820e1..6027070dfc9 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm @@ -229,7 +229,7 @@ Difficulty: Medium playsound(src.loc, 'sound/effects/meteorimpact.ogg', 200, 1) for(var/mob/living/L in orange(1, src)) if(L.stat) - visible_message("[src] slams down on [L], crushing them!") + visible_message("[src] slams down on [L], crushing [L.p_them()]!") L.gib() else L.adjustBruteLoss(75) diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm index 3462e8e18e7..7b10c0e828a 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm @@ -27,4 +27,41 @@ speak_emote = list("gnashes") faction = list("carp") - flying = 1 \ No newline at end of file + flying = 1 + + +/mob/living/simple_animal/hostile/retaliate/carp/koi + name = "space koi" + desc = "A gentle space-faring koi." + icon = 'icons/obj/fish_items.dmi' + icon_state = "koi1" + icon_living = "koi1" + icon_dead = "koi1-dead" + + harm_intent_damage = 1 + melee_damage_lower = 2 + melee_damage_upper = 2 + speak_emote = list("blurps") + butcher_results = null + + atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) + minbodytemp = 0 + maxbodytemp = 1500 + + gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE + +/mob/living/simple_animal/hostile/retaliate/carp/koi/New() + ..() + var/koinum = rand(1, 4) + icon_state = "koi[koinum]" + icon_living = "koi[koinum]" + icon_dead = "koi[koinum]-dead" + + +/mob/living/simple_animal/hostile/retaliate/carp/koi/Process_Spacemove(var/movement_dir) + return TRUE + +/mob/living/simple_animal/hostile/retaliate/carp/koi/honk + icon_state = "koi5" + icon_living = "koi5" + icon_dead = "koi5-dead" \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/black.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/black.dm index 982a0eaae90..377b8ff335a 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/black.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/black.dm @@ -36,7 +36,7 @@ L.reagents.add_reagent("terror_black_toxin", 30) // inject our special poison visible_message("[src] buries its long fangs deep into the [inject_target] of [target]!") else - visible_message("[src] bites [target], but cannot inject venom into their [inject_target]!") + visible_message("[src] bites [target], but cannot inject venom into [target.p_their()] [inject_target]!") L.attack_animal(src) if(!ckey && (!(target in enemies) || L.reagents.has_reagent("terror_black_toxin", 60))) step_away(src, L) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm index 06b28c6400e..43c0e7b0be5 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm @@ -33,7 +33,7 @@ if(W) melee_damage_lower = initial(melee_damage_lower) * 2 melee_damage_upper = initial(melee_damage_upper) * 2 - visible_message("[src] savagely mauls [target] while they are stuck in the web!") + visible_message("[src] savagely mauls [target] while [L.p_theyre()] stuck in the web!") else melee_damage_lower = initial(melee_damage_lower) melee_damage_upper = initial(melee_damage_upper) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/green.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/green.dm index 9d6f977a1ae..64ef285ded8 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/green.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/green.dm @@ -93,5 +93,5 @@ // instead of having a venom that only lasts seconds, we just add the eyeblur directly. visible_message("[src] buries its fangs deep into the [inject_target] of [target]!") else - visible_message("[src] bites [target], but cannot inject venom into their [inject_target]!") + visible_message("[src] bites [target], but cannot inject venom into [target.p_their()] [inject_target]!") L.attack_animal(src) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm index 21b1276425c..66e88af1e1b 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm @@ -43,7 +43,7 @@ /mob/living/simple_animal/hostile/poison/terror_spider/prince/spider_specialattack(mob/living/carbon/human/L) if(prob(15)) - visible_message("[src] rams into [L], knocking them to the floor!") + visible_message("[src] rams into [L], knocking [L.p_them()] to the floor!") L.Weaken(5) L.Stun(5) else diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm index 9133b8cc14c..532c2b7357a 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm @@ -39,7 +39,7 @@ var/lastnestsetup = 0 var/neststep = 0 var/hasnested = 0 - var/spider_max_per_nest = 25 // above this, AI queens become stable + var/spider_max_per_nest = 35 // above this, AI queens become stable var/canlay = 4 // main counter for egg-laying ability! # = num uses, incremented at intervals var/eggslaid = 0 var/spider_can_fakelings = 3 // spawns defective spiderlings that don't grow up, used to freak out crew, atmosphere diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index ef456ddcb0e..235a161c595 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -201,11 +201,6 @@ var/global/list/ts_spiderling_list = list() spider_specialattack(G,can_poison) else G.attack_animal(src) - else if(istype(target, /obj/structure/alien/resin)) - var/obj/structure/alien/resin/E = target - do_attack_animation(E) - E.health -= rand(melee_damage_lower, melee_damage_upper) - E.healthcheck() else target.attack_animal(src) diff --git a/code/modules/mob/living/simple_animal/pony.dm b/code/modules/mob/living/simple_animal/pony.dm index 437c9b0ac4d..960f8fc0998 100644 --- a/code/modules/mob/living/simple_animal/pony.dm +++ b/code/modules/mob/living/simple_animal/pony.dm @@ -27,7 +27,7 @@ ..() if(stat == 2) new /obj/item/reagent_containers/food/snacks/ectoplasm(src.loc) - src.visible_message("\The [src] lets out a contented sigh as their form unwinds.") + src.visible_message("[src] lets out a contented sigh as [p_their()] form unwinds.") src.ghostize() qdel(src) return diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index c7b82dc44b8..57fe64f3265 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -130,8 +130,8 @@ if(..()) //alive if(health < 1) death() - return 0 - return 1 + return FALSE + return TRUE /mob/living/simple_animal/proc/handle_automated_action() return @@ -270,7 +270,7 @@ if((Proj.damage_type != STAMINA)) adjustBruteLoss(Proj.damage) Proj.on_hit(src, 0) - return 0 + return FALSE /mob/living/simple_animal/attackby(obj/item/O, mob/living/user) if(can_collar && !collar && istype(O, /obj/item/clothing/accessory/petcollar)) @@ -342,7 +342,7 @@ /mob/living/simple_animal/proc/adjustHealth(amount) if(status_flags & GODMODE) - return 0 + return FALSE bruteloss = Clamp(bruteloss + amount, 0, maxHealth) handle_regular_status_updates() @@ -372,20 +372,20 @@ /mob/living/simple_animal/proc/CanAttack(var/atom/the_target) if(see_invisible < the_target.invisibility) - return 0 + return FALSE if(isliving(the_target)) var/mob/living/L = the_target if(L.stat != CONSCIOUS) - return 0 + return FALSE if(istype(the_target, /obj/mecha)) var/obj/mecha/M = the_target if(M.occupant) - return 0 + return FALSE if(istype(the_target,/obj/spacepod)) var/obj/spacepod/S = the_target if(S.pilot) - return 0 - return 1 + return FALSE + return TRUE /mob/living/simple_animal/handle_fire() return @@ -394,7 +394,7 @@ return /mob/living/simple_animal/IgniteMob() - return 0 + return FALSE /mob/living/simple_animal/ExtinguishMob() return @@ -502,19 +502,19 @@ switch(slot) if(slot_collar) if(collar) - return 0 + return FALSE if(!can_collar) - return 0 + return FALSE if(!istype(I, /obj/item/clothing/accessory/petcollar)) - return 0 - return 1 + return FALSE + return TRUE /mob/living/simple_animal/equip_to_slot(obj/item/W, slot) if(!istype(W)) - return 0 + return FALSE if(!slot) - return 0 + return FALSE W.forceMove(src) W.equipped(src, slot) diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 63b248ffd41..fb62ad3a629 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -4,6 +4,7 @@ lastKnownIP = client.address computer_id = client.computer_id log_access_in(client) + create_attack_log("Logged in at [atom_loc_line(get_turf(src))]") if(config.log_access) for(var/mob/M in player_list) if(M == src) continue diff --git a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm index a0f8594e870..cbcd51c44a7 100644 --- a/code/modules/mob/logout.dm +++ b/code/modules/mob/logout.dm @@ -3,6 +3,7 @@ unset_machine() player_list -= src log_access_out(src) + create_attack_log("Logged out at [atom_loc_line(get_turf(src))]") // `holder` is nil'd out by now, so we check the `admin_datums` array directly //Only report this stuff if we are currently playing. if(admin_datums[ckey] && ticker && ticker.current_state == GAME_STATE_PLAYING) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index db84df47f52..beba84eaa3f 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -543,11 +543,11 @@ var/list/slot_equipment_priority = list( \ client.screen = list() hud_used.show_hud(hud_used.hud_version) -/mob/setDir(new_dir) +/mob/setDir(new_dir) if(forced_look) if(isnum(forced_look)) dir = forced_look - else + else var/atom/A = locateUID(forced_look) if(istype(A)) dir = get_cardinal_dir(src, A) @@ -592,7 +592,7 @@ var/list/slot_equipment_priority = list( \ return if(!src || !isturf(src.loc)) return 0 - if(istype(A, /obj/effect/decal/point)) + if(istype(A, /obj/effect/temp_visual/point)) return 0 var/tile = get_turf(A) @@ -600,12 +600,8 @@ var/list/slot_equipment_priority = list( \ return 0 changeNext_move(CLICK_CD_POINT) - var/obj/P = new /obj/effect/decal/point(tile) + var/obj/P = new /obj/effect/temp_visual/point(tile) P.invisibility = invisibility - spawn (20) - if(P) - qdel(P) - return 1 /mob/proc/ret_grab(obj/effect/list_container/mobl/L as obj, flag) @@ -1179,7 +1175,7 @@ var/list/slot_equipment_priority = list( \ new /obj/effect/decal/cleanable/vomit/green(location) else if(!no_text) - visible_message("[src] pukes all over \himself!","You puke all over yourself!") + visible_message("[src] pukes all over [p_them()]self!","You puke all over yourself!") location.add_vomit_floor(src, 1) playsound(location, 'sound/effects/splat.ogg', 50, 1) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 1c4b0f38fbe..458138b9db0 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -263,17 +263,17 @@ state = GRAB_AGGRESSIVE icon_state = "grabbed1" hud.icon_state = "reinforce1" - add_attack_logs(assailant, affecting, "Aggressively grabbed", admin_notify = FALSE) + add_attack_logs(assailant, affecting, "Aggressively grabbed", ATKLOG_ALL) else if(state < GRAB_NECK) if(isslime(affecting)) to_chat(assailant, "You squeeze [affecting], but nothing interesting happens.") return - assailant.visible_message("[assailant] has reinforced \his grip on [affecting] (now neck)!") + assailant.visible_message("[assailant] has reinforced [assailant.p_their()] grip on [affecting] (now neck)!") state = GRAB_NECK icon_state = "grabbed+1" assailant.setDir(get_dir(assailant, affecting)) - add_attack_logs(assailant, affecting, "Neck grabbed", admin_notify = FALSE) + add_attack_logs(assailant, affecting, "Neck grabbed", ATKLOG_ALL) if(!iscarbon(assailant)) affecting.LAssailant = null else @@ -282,11 +282,11 @@ hud.name = "kill" affecting.Stun(10) //10 ticks of ensured grab else if(state < GRAB_UPGRADING) - assailant.visible_message("[assailant] starts to tighten \his grip on [affecting]'s neck!") + assailant.visible_message("[assailant] starts to tighten [assailant.p_their()] grip on [affecting]'s neck!") hud.icon_state = "kill1" state = GRAB_KILL - assailant.visible_message("[assailant] has tightened \his grip on [affecting]'s neck!") + assailant.visible_message("[assailant] has tightened [assailant.p_their()] grip on [affecting]'s neck!") add_attack_logs(assailant, affecting, "Strangled") assailant.next_move = world.time + 10 @@ -332,7 +332,7 @@ if(last_hit_zone == "head") //This checks the hitzone the user has selected. In this specific case, they have the head selected. if(affecting.lying) return - assailant.visible_message("[assailant] thrusts \his head into [affecting]'s skull!") //A visible message for what is going on. + assailant.visible_message("[assailant] thrusts [assailant.p_their()] head into [affecting]'s skull!") //A visible message for what is going on. var/damage = 5 var/obj/item/clothing/hat = attacker.head if(istype(hat)) @@ -354,7 +354,7 @@ if(!affected.internal_bodyparts_by_name["eyes"]) to_chat(assailant, "You cannot locate any eyes on [affecting]!") return - assailant.visible_message("[assailant] presses \his fingers into [affecting]'s eyes!") + assailant.visible_message("[assailant] presses [assailant.p_their()] fingers into [affecting]'s eyes!") to_chat(affecting, "You feel immense pain as digits are being pressed into your eyes!") add_attack_logs(assailant, affecting, "Eye-fucked with their fingers") var/obj/item/organ/internal/eyes/eyes = affected.get_int_organ(/obj/item/organ/internal/eyes) diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index bbecb8e6458..99047b0382c 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -30,11 +30,11 @@ callHook("mob_login", list("client" = client, "mob" = src)) new_player_panel() - + spawn(30) // Annoy the player with polls. establish_db_connection() - if(dbcon.IsConnected() && client.can_vote()) + if(dbcon.IsConnected() && client && client.can_vote()) var/isadmin = 0 if(client && client.holder) isadmin = 1 @@ -46,7 +46,7 @@ break if(newpoll) client.handle_player_polling() - + if(ckey in deadmins) verbs += /client/proc/readmin spawn(40) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index fdd9266c128..274c1602e04 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -4,6 +4,7 @@ var/spawning = 0 //Referenced when you want to delete the new_player later on in the code. var/totalPlayers = 0 //Player counts for the Lobby tab var/totalPlayersReady = 0 + var/tos_consent = FALSE universal_speak = 1 invisibility = 101 @@ -19,7 +20,40 @@ /mob/new_player/verb/new_player_panel() set src = usr - new_player_panel_proc() + + if(handle_tos_consent()) + new_player_panel_proc() + +/mob/new_player/proc/handle_tos_consent() + if(!GLOB.join_tos) + tos_consent = TRUE + return TRUE + + establish_db_connection() + if(!dbcon.IsConnected()) + tos_consent = TRUE + return TRUE + + var/DBQuery/query = dbcon.NewQuery("SELECT * FROM [format_table_name("privacy")] WHERE ckey='[src.ckey]' AND consent=1") + query.Execute() + while(query.NextRow()) + tos_consent = TRUE + return TRUE + + privacy_consent() + return FALSE + +/mob/new_player/proc/privacy_consent() + src << browse(null, "window=playersetup") + var/output = GLOB.join_tos + output += "

I consent" + output += "

I DO NOT consent" + src << browse(output,"window=privacy_consent;size=500x300") + var/datum/browser/popup = new(src, "privacy_consent", "

Privacy Consent
", 500, 400) + popup.set_window_options("can_close=0") + popup.set_content(output) + popup.open(0) + return /mob/new_player/proc/new_player_panel_proc() @@ -43,6 +77,9 @@ output += "

Observe

" + if(GLOB.join_tos) + output += "

Terms of Service

" + if(!IsGuestKey(src.key)) establish_db_connection() @@ -109,11 +146,28 @@ /mob/new_player/Topic(href, href_list[]) if(!client) return 0 + if(href_list["consent_signed"]) + var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss") + var/DBQuery/query = dbcon.NewQuery("REPLACE INTO [format_table_name("privacy")] (ckey, datetime, consent) VALUES ('[ckey]', '[sqltime]', 1)") + query.Execute() + src << browse(null, "window=privacy_consent") + tos_consent = 1 + new_player_panel_proc() + if(href_list["consent_rejected"]) + tos_consent = 0 + to_chat(usr, "You must consent to the terms of service before you can join!") + var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss") + var/DBQuery/query = dbcon.NewQuery("REPLACE INTO [format_table_name("privacy")] (ckey, datetime, consent) VALUES ('[ckey]', '[sqltime]', 0)") + query.Execute() + if(href_list["show_preferences"]) client.prefs.ShowChoices(src) return 1 if(href_list["ready"]) + if(!tos_consent) + to_chat(usr, "You must consent to the terms of service before you can join!") + return 0 ready = !ready new_player_panel_proc() @@ -126,6 +180,9 @@ new_player_panel_proc() if(href_list["observe"]) + if(!tos_consent) + to_chat(usr, "You must consent to the terms of service before you can join!") + return 0 if(alert(src,"Are you sure you wish to observe? You cannot normally join the round after doing this!","Player Setup","Yes","No") == "Yes") if(!client) return 1 @@ -155,8 +212,14 @@ respawnable_list += observer qdel(src) return 1 + if(href_list["tos"]) + privacy_consent() + return 0 if(href_list["late_join"]) + if(!tos_consent) + to_chat(usr, "You must consent to the terms of service before you can join!") + return 0 if(!ticker || ticker.current_state != GAME_STATE_PLAYING) to_chat(usr, "The round is either not ready, or has already finished...") return diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm index ace8ab1b621..1cb1bc5f3b0 100644 --- a/code/modules/mob/status_procs.dm +++ b/code/modules/mob/status_procs.dm @@ -208,3 +208,7 @@ /mob/proc/AdjustWeakened() return + +/mob/proc/adjust_bodytemperature(amount, min_temp = 0, max_temp = INFINITY) + if(bodytemperature > min_temp && bodytemperature < max_temp) + bodytemperature = Clamp(bodytemperature + amount, min_temp, max_temp) \ No newline at end of file diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 82aebda3a42..a1ed4f0bde9 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -86,7 +86,7 @@ if(O.mind && O.mind.assigned_role == "Cyborg") if(O.mind.role_alt_title == "Android") - O.mmi = new /obj/item/mmi/posibrain(O) + O.mmi = new /obj/item/mmi/robotic_brain(O) else if(O.mind.role_alt_title == "Robot") O.mmi = null //Robots do not have removable brains. else diff --git a/code/modules/modular_computers/computers/machinery/console_presets.dm b/code/modules/modular_computers/computers/machinery/console_presets.dm index 6e0be3b385f..5dd324945fa 100644 --- a/code/modules/modular_computers/computers/machinery/console_presets.dm +++ b/code/modules/modular_computers/computers/machinery/console_presets.dm @@ -36,6 +36,7 @@ var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] hard_drive.store_file(new/datum/computer_file/program/power_monitor()) hard_drive.store_file(new/datum/computer_file/program/alarm_monitor()) + hard_drive.store_file(new/datum/computer_file/program/supermatter_monitor()) // ===== RESEARCH CONSOLE ===== /obj/machinery/modular_computer/console/preset/research diff --git a/code/modules/modular_computers/file_system/programs/command/card.dm b/code/modules/modular_computers/file_system/programs/command/card.dm index 6ebf9228848..b570687569a 100644 --- a/code/modules/modular_computers/file_system/programs/command/card.dm +++ b/code/modules/modular_computers/file_system/programs/command/card.dm @@ -238,7 +238,7 @@ jobdatum = J break if(!jobdatum) - to_chat(usr, "\red No log exists for this job: [t1]") + to_chat(usr, "No log exists for this job: [t1]") return access = jobdatum.get_access() diff --git a/code/modules/modular_computers/file_system/programs/engineering/sm_monitor.dm b/code/modules/modular_computers/file_system/programs/engineering/sm_monitor.dm new file mode 100644 index 00000000000..db9081f6ad1 --- /dev/null +++ b/code/modules/modular_computers/file_system/programs/engineering/sm_monitor.dm @@ -0,0 +1,139 @@ +/datum/computer_file/program/supermatter_monitor + filename = "smmonitor" + filedesc = "Supermatter Monitoring" + ui_header = "smmon_0.gif" + program_icon_state = "smmon_0" + extended_desc = "This program connects to specially calibrated supermatter sensors to provide information on the status of supermatter-based engines." + requires_ntnet = TRUE + transfer_access = access_construction + network_destination = "supermatter monitoring system" + size = 5 + var/last_status = SUPERMATTER_INACTIVE + var/list/supermatters + var/obj/machinery/power/supermatter_shard/active // Currently selected supermatter crystal. + + +/datum/computer_file/program/supermatter_monitor/process_tick() + ..() + var/new_status = get_status() + if(last_status != new_status) + last_status = new_status + if(last_status == SUPERMATTER_ERROR) + last_status = SUPERMATTER_INACTIVE + ui_header = "smmon_[last_status].gif" + program_icon_state = "smmon_[last_status]" + if(istype(computer)) + computer.update_icon() + +/datum/computer_file/program/supermatter_monitor/run_program(mob/living/user) + . = ..(user) + refresh() + +/datum/computer_file/program/supermatter_monitor/kill_program(forced = FALSE) + active = null + supermatters = null + ..() + +// Refreshes list of active supermatter crystals +/datum/computer_file/program/supermatter_monitor/proc/refresh() + supermatters = list() + var/turf/T = get_turf(nano_host()) + if(!T) + return + for(var/obj/machinery/power/supermatter_shard/S in SSair.atmos_machinery) + // Delaminating, not within coverage, not on a tile. + if(!(is_station_level(S.z) || is_mining_level(S.z) || atoms_share_level(S, T) || !istype(S.loc, /turf/simulated/))) + continue + supermatters.Add(S) + + if(!(active in supermatters)) + active = null + +/datum/computer_file/program/supermatter_monitor/proc/get_status() + . = SUPERMATTER_INACTIVE + for(var/obj/machinery/power/supermatter_shard/S in supermatters) + . = max(., S.get_status()) + +/datum/computer_file/program/supermatter_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) + assets.send(user) + ui = new(user, src, ui_key, "supermatter_monitor.tmpl", "Supermatter Monitoring", 600, 400) + ui.set_auto_update(TRUE) + ui.set_layout_key("program") + ui.open() + +/datum/computer_file/program/supermatter_monitor/ui_data() + var/list/data = get_header_data() + + if(istype(active)) + var/turf/T = get_turf(active) + if(!T) + active = null + refresh() + return + var/datum/gas_mixture/air = T.return_air() + if(!air) + active = null + return + + data["active"] = TRUE + data["SM_integrity"] = active.get_integrity() + data["SM_power"] = active.power + data["SM_ambienttemp"] = air.temperature + data["SM_ambientpressure"] = air.return_pressure() + //data["SM_EPR"] = round((air.total_moles / air.group_multiplier) / 23.1, 0.01) + var/other_moles = 0.0 + for(var/datum/gas/G in air.trace_gases) + other_moles+=G.moles + var/TM = air.total_moles() + if(TM) + data["SM_gas_O2"] = round(100*air.oxygen/TM,0.01) + data["SM_gas_CO2"] = round(100*air.carbon_dioxide/TM,0.01) + data["SM_gas_N2"] = round(100*air.nitrogen/TM,0.01) + data["SM_gas_PL"] = round(100*air.toxins/TM,0.01) + if(other_moles) + data["SM_gas_OTHER"] = round(100*other_moles/TM,0.01) + else + data["SM_gas_OTHER"] = 0 + else + data["SM_gas_O2"] = 0 + data["SM_gas_CO2"] = 0 + data["SM_gas_N2"] = 0 + data["SM_gas_PH"] = 0 + data["SM_gas_OTHER"] = 0 + else + var/list/SMS = list() + for(var/obj/machinery/power/supermatter_shard/S in supermatters) + var/area/A = get_area(S) + if(!A) + continue + + SMS.Add(list(list( + "area_name" = A.name, + "integrity" = S.get_integrity(), + "uid" = S.uid + ))) + + data["active"] = FALSE + data["supermatters"] = SMS + + return data + + +/datum/computer_file/program/supermatter_monitor/Topic(href, href_list) + if(..()) + return TRUE + if(href_list["clear"]) + active = null + return TRUE + if(href_list["refresh"]) + refresh() + return TRUE + if(href_list["set"]) + var/newuid = text2num(href_list["set"]) + for(var/obj/machinery/power/supermatter_shard/S in supermatters) + if(S.uid == newuid) + active = S + return TRUE diff --git a/code/modules/nano/interaction/default.dm b/code/modules/nano/interaction/default.dm index 3f9155ed162..e5062bc0b12 100644 --- a/code/modules/nano/interaction/default.dm +++ b/code/modules/nano/interaction/default.dm @@ -59,10 +59,14 @@ return STATUS_CLOSE -//Some atoms such as vehicles might have special rules for how mobs inside them interact with NanoUI. +//Some atoms such as vehicles might have special limitations for how mobs inside them interact with NanoUI. /atom/proc/contents_nano_distance(var/src_object, var/mob/living/user) return user.shared_living_nano_distance(src_object) +//Some atoms such as vehicles might have special benefits for how mobs inside them interact with NanoUI. +/atom/proc/contents_nano_interact(var/src_object, var/mob/living/user) + return STATUS_CLOSE // No help at all by default + /mob/living/proc/shared_living_nano_distance(var/atom/movable/src_object) if(!(src_object in view(4, src))) // If the src object is not in visable, disable updates return STATUS_CLOSE @@ -84,6 +88,16 @@ if(STATUS_INTERACTIVE) return STATUS_UPDATE +/mob/living/carbon/brain/default_can_use_topic(var/src_object) + . = shared_nano_interaction(src_object) + if(. <= STATUS_DISABLED) + return + // Maybe add a handler here to call an "interaction state" thing on the MMI, + // later + if(loc) + . = max(., loc.contents_nano_interact(src_object, src)) // This is an "augment" on interaction + . = min(., loc.contents_nano_distance(src_object, src)) // This is a "limit" on interaction + /mob/living/carbon/human/default_can_use_topic(var/src_object) . = shared_nano_interaction(src_object) if(. != STATUS_CLOSE) diff --git a/code/modules/ninja/martial_art.dm b/code/modules/ninja/martial_art.dm index b6562d8377d..c97a3e505c3 100644 --- a/code/modules/ninja/martial_art.dm +++ b/code/modules/ninja/martial_art.dm @@ -20,7 +20,7 @@ /obj/item/creeping_widow_injector/attack_self(mob/living/carbon/human/user as mob) if(!used) user.visible_message("You stick the [src]'s needle into your arm and press the button.", \ - "[user] sticks the [src]'s needle \his arm and presses the button.") + "[user] sticks the [src]'s needle [user.p_their()] arm and presses the button.") to_chat(user, "The nanomachines in the [src] flow through your bloodstream.") var/datum/martial_art/ninja_martial_art/N = new/datum/martial_art/ninja_martial_art(null) @@ -98,8 +98,8 @@ D.silent += 1 D.adjustOxyLoss(1) else - D.visible_message("[A] loses \his grip on [D]'s neck!", \ - "[A] loses \his grip on your neck!") + D.visible_message("[A] loses [A.p_their()] grip on [D]'s neck!", \ + "[A] loses [A.p_their()] grip on your neck!") has_choke_hold = 0 return 0 I++ diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm index 92ec694ecb4..74bee9867ab 100644 --- a/code/modules/paperwork/handlabeler.dm +++ b/code/modules/paperwork/handlabeler.dm @@ -28,6 +28,7 @@ user.visible_message("[user] labels [A] as [label].", \ "You label [A] as [label].") + investigate_log("[key_name(user)] labelled [A] as [label].", INVESTIGATE_LABEL) // Investigate goes BEFORE rename so the original name is preserved in the log A.name = "[A.name] ([label])" /obj/item/hand_labeler/attack_self(mob/user as mob) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index db3f7cddce7..e8858a4dd31 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -34,6 +34,8 @@ var/contact_poison // Reagent ID to transfer on contact var/contact_poison_volume = 0 var/contact_poison_poisoner = null + var/paper_width = 400//Width of the window that opens + var/paper_height = 400//Height of the window that opens var/const/deffont = "Verdana" var/const/signfont = "Times New Roman" @@ -72,12 +74,12 @@ if((!user.say_understands(null, all_languages["Galactic Common"]) && !forceshow) || forcestars) //assuming all paper is written in common is better than hardcoded type checks data = "[name][stars(info)][stamps]" if(view) - usr << browse(data, "window=[name]") + usr << browse(data, "window=[name];size=[paper_width]x[paper_height]") onclose(usr, "[name]") else data = "[name][infolinks ? info_links : info][stamps]" if(view) - usr << browse(data, "window=[name]") + usr << browse(data, "window=[name];size=[paper_width]x[paper_height]") onclose(usr, "[name]") return data @@ -379,7 +381,7 @@ if(is_hot(P)) if((CLUMSY in user.mutations) && prob(10)) - user.visible_message("[user] accidentally ignites themselves!", \ + user.visible_message("[user] accidentally ignites [user.p_them()]self!", \ "You miss the paper and accidentally light yourself on fire!") user.unEquip(P) user.adjust_fire_stacks(1) @@ -476,6 +478,20 @@ /obj/item/paper/crumpled/bloody icon_state = "scrap_bloodied" +/obj/item/paper/fortune + name = "fortune" + icon_state = "slip" + paper_height = 150 + +/obj/item/paper/fortune/New() + ..() + var/fortunemessage = pick(GLOB.fortune_cookie_messages) + info = "

[fortunemessage]

" + info += "

Lucky numbers: [rand(1,49)], [rand(1,49)], [rand(1,49)], [rand(1,49)], [rand(1,49)]

" + +/obj/item/paper/fortune/update_icon() + ..() + icon_state = initial(icon_state) /* * Premade paper */ diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 6656eefcdf1..08cb7b6555e 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -79,8 +79,8 @@ if(istype(P, /obj/item/lighter/zippo)) class = "" - user.visible_message("[class][user] holds \the [P] up to \the [src], it looks like \he's trying to burn it!", \ - "[class]You hold \the [P] up to \the [src], burning it slowly.") + user.visible_message("[class][user] holds [P] up to [src], it looks like [user.p_theyre()] trying to burn it!", \ + "[class]You hold [P] up to [src], burning it slowly.") spawn(20) if(get_dist(src, user) < 2 && user.get_active_hand() == P && P.lit) diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index 1c4c0b357cc..fbbfacb0b8f 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -33,7 +33,7 @@ /obj/item/paperplane/suicide_act(mob/living/user) user.Stun(10) - user.visible_message("[user] jams [name] in \his nose. It looks like \he's trying to commit suicide!") + user.visible_message("[user] jams [name] in [user.p_their()] nose. It looks like [user.p_theyre()] trying to commit suicide!") user.EyeBlurry(6) var/obj/item/organ/internal/eyes/E = user.get_int_organ(/obj/item/organ/internal/eyes) if(E) @@ -73,7 +73,7 @@ else if(is_hot(P)) if(user.disabilities & CLUMSY && prob(10)) - user.visible_message("[user] accidentally ignites themselves!", \ + user.visible_message("[user] accidentally ignites [user.p_them()]self!", \ "You miss [src] and accidentally light yourself on fire!") user.unEquip(P) user.adjust_fire_stacks(1) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index b4446f67e0e..4e3aaefd1eb 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -25,7 +25,7 @@ pressure_resistance = 2 /obj/item/pen/suicide_act(mob/user) - to_chat(viewers(user), "[user] starts scribbling numbers over \himself with the [src.name]! It looks like \he's trying to commit sudoku.") + to_chat(viewers(user), "[user] starts scribbling numbers over [user.p_them()]self with the [name]! It looks like [user.p_theyre()] trying to commit sudoku.") return (BRUTELOSS) /obj/item/pen/blue diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 0ab4db844e9..40759ab792c 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -56,8 +56,8 @@ if(istype(P, /obj/item/lighter/zippo)) class = "" - user.visible_message("[class][user] holds \the [P] up to \the [src], it looks like \he's trying to burn it!", \ - "[class]You hold \the [P] up to \the [src], burning it slowly.") + user.visible_message("[class][user] holds \the [P] up to \the [src], it looks like [user.p_theyre()] trying to burn it!", \ + "[class]You hold [P] up to [src], burning it slowly.") spawn(20) if(get_dist(src, user) < 2 && user.get_active_hand() == P && P.lit) diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm index ad67a53cd5b..5a101629c94 100644 --- a/code/modules/paperwork/stamps.dm +++ b/code/modules/paperwork/stamps.dm @@ -14,7 +14,7 @@ attack_verb = list("stamped") /obj/item/stamp/suicide_act(mob/user) - user.visible_message("[user] stamps 'VOID' on \his forehead, then promptly falls over, dead.") + user.visible_message("[user] stamps 'VOID' on [user.p_their()] forehead, then promptly falls over, dead.") return (OXYLOSS) /obj/item/stamp/qm diff --git a/code/modules/pda/PDA.dm b/code/modules/pda/PDA.dm index 703ec2bd628..38422a89528 100755 --- a/code/modules/pda/PDA.dm +++ b/code/modules/pda/PDA.dm @@ -44,7 +44,6 @@ var/global/list/obj/item/pda/PDAs = list() new/datum/data/pda/app/notekeeper, new/datum/data/pda/app/messenger, new/datum/data/pda/app/manifest, - new/datum/data/pda/app/chatroom, new/datum/data/pda/app/atmos_scanner, new/datum/data/pda/utility/scanmode/notes, new/datum/data/pda/utility/flashlight) diff --git a/code/modules/pda/chatroom.dm b/code/modules/pda/chatroom.dm deleted file mode 100644 index ef9027b888c..00000000000 --- a/code/modules/pda/chatroom.dm +++ /dev/null @@ -1,265 +0,0 @@ -var/list/chatrooms = list(new /datum/chatroom("General Discussion")) - -/datum/chatroom - var/name = "Generic Chatroom" - var/list/users = list() - var/list/invites = list() - var/list/logs = list() // chat logs - var/topic = "Discussion" // topic message for the chatroom - var/is_public = 1 - var/announcer = "CyberiadAI" - -/datum/chatroom/New(n) - name = n - -/datum/chatroom/proc/post(user, message, username) - if(!user || !message) - return - - if(!username) - if(istype(user, /datum/data/pda/app/chatroom)) - var/datum/data/pda/app/chatroom/c = user - if(!c.pda.owner) - return - username = c.pda.owner - else - return - - logs += list(list(username = username, message = message)) - - for(var/datum/data/pda/app/chatroom/u in users) - spawn() - if(u.messaging_available() && !u.toff && user != u) - u.notify("Post from [username] in #[name], \"[message]\" (Post)") - -/datum/chatroom/proc/announce(user, message) - post(user, "[message]", announcer) - -/datum/chatroom/proc/login(datum/data/pda/app/chatroom/user) - if(!user || !user.pda.owner) - return 0 - - if(user in users) - return 1 - - if(!is_public && !(user in invites)) - return 0 - - users |= user - announce(user, "[user.pda.owner] has entered #[name].") - return 1 - -/datum/chatroom/proc/logout(datum/data/pda/app/chatroom/user) - if(!user || !user.pda.owner || !(user in users)) - return - - users -= user - invites -= user - announce(user, "[user.pda.owner] has left #[name].") - -/datum/data/pda/app/chatroom - name = "Chatbuddy" - icon = "hashtag" - notify_icon = "comments" - template = "pda_chatroom" - var/toff = 0 - var/datum/chatroom/current_room = null - var/inviting = 0 - var/channels_created = 0 - var/max_channels_created = 3 - var/latest_post = 0 - var/auto_scroll = 1 - var/disconnected = 0 - -/datum/data/pda/app/chatroom/Destroy() - for(var/C in chatrooms) - var/datum/chatroom/ch = C - if(src in ch.users) - ch.users -= src - if(src in ch.invites) - ch.invites -= src - return ..() - -/datum/data/pda/app/chatroom/start() - . = ..() - unnotify() - latest_post = 0 - -/datum/data/pda/app/chatroom/update_ui(mob/user as mob, list/data) - data["silent"] = notify_silent - data["toff"] = toff - if(disconnected || !messaging_available(1)) - data["no_server"] = 1 - has_back = 0 - else if(current_room) - data["room"] = current_room.name - data["topic"] = current_room.topic - if(inviting) - data["inviting"] = 1 - var/list/pdas = list() - for(var/A in PDAs) - var/obj/item/pda/P = A - var/datum/data/pda/app/chatroom/C = P.find_program(/datum/data/pda/app/chatroom) - var/datum/data/pda/app/messenger/PM = P.find_program(/datum/data/pda/app/messenger) - - if(!P.owner || P == pda || PM.m_hidden || (C in current_room.invites) || (C in current_room.users)) - continue - pdas += list(list(name = "[P.owner] ([P.ownjob])", ref = "\ref[C]")) - data["people"] = pdas - else - data["history"] = current_room.logs - var/list/users[0] - for(var/U in current_room.users) - var/datum/data/pda/app/chatroom/ch = U - users += "[ch.pda.owner]" - for(var/U in (current_room.invites - current_room.users)) - var/datum/data/pda/app/chatroom/ch = U - users += "[ch.pda.owner]" - data["users"] = users - data["auto_scroll"] = auto_scroll - data["latest_post"] = latest_post - latest_post = current_room.logs.len - has_back = 1 - else - var/list/rooms[0] - for(var/datum/chatroom/c in chatrooms) - if((src in c.users) || (src in c.invites) || c.is_public) - rooms += list(list(name = "[c]", ref = "\ref[c]")) - data["rooms"] = rooms - has_back = 0 - -/datum/data/pda/app/chatroom/proc/messaging_available(cheap = 0) - . = 0 - if(message_servers) - for(var/A in message_servers) - var/obj/machinery/message_server/MS = A - if(MS.active) - . = cheap || pda.test_telecomms() - disconnected = !. - -/datum/data/pda/app/chatroom/proc/check_messaging_available() - . = messaging_available() - if(!.) - to_chat(usr, "ERROR: Messaging server is not responding.") - -/datum/data/pda/app/chatroom/Topic(href, list/href_list) - if(!pda.can_use()) - return - unnotify() - - switch(href_list["choice"]) - if("Toggle Chatroom") - toff = !toff - if("Toggle Ringer") - notify_silent = !notify_silent - if("Back") - if(inviting) - inviting = 0 - else - current_room = null - latest_post = 0 - if("Join") - if(href_list["room"]) - current_room = locate(href_list["room"]) - if(!(src in current_room.users)) - if(!current_room.login(src)) - current_room = null - latest_post = 0 - if("Post") - var/datum/chatroom/target - if(href_list["target"]) - target = locate(href_list["target"]) - else - target = current_room - - if(!target) - return - - var/t = input("Please enter message", target) as text|null - spawn() - if(!t || !check_messaging_available()) - return - t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN)) - t = readd_quotes(t) - if(!t || !pda.can_use()) - return - - target.post(src, t) - if("Topic") - if(!current_room) - return - - var/t = input("Enter new topic:", current_room, current_room.topic) as text|null - spawn() - if(!t || !check_messaging_available() || !pda.can_use()) - return - t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN)) - t = readd_quotes(t) - if(!t) - return - - current_room.topic = t - current_room.announce(src, "Topic has been changed to '[t]' by [pda.owner].") - if("Leave") - if(!current_room) - return - - current_room.logout(src) - current_room = null - latest_post = 0 - if("Invite") - if(!current_room) - return - - inviting = 1 - if("Invite PDA") - spawn() - if(!check_messaging_available() || !current_room || !href_list["user"]) - return - - var/datum/data/pda/app/chatroom/C = locate(href_list["user"]) - if(C) - current_room.invites |= C - spawn() - if(C.messaging_available() && !C.toff) - C.notify("Invite to #[current_room] (Join)") - if("New Room") - if(channels_created >= max_channels_created) - alert("This PDA has already reached its maximum channels created.", name) - return - - var/t = input("Enter room name:", name) as text|null - if(!t) - return - t = sanitize(copytext(t, 1, MAX_NAME_LEN)) - t = readd_quotes(t) - - var/access = input("Room access?", current_room) as null|anything in list("Public", "Private") - if(!access) - return - - spawn() - if(!t || !check_messaging_available() || !pda.can_use()) - return - - // check if already taken - for(var/datum/chatroom/C in chatrooms) - if(C.name == t) - alert("Channel with that name already exists.", name) - return - - channels_created++ - current_room = new /datum/chatroom(t) - chatrooms += current_room - latest_post = 0 - - current_room.invites |= src - current_room.is_public = access == "Public" - current_room.login(src) - if(!current_room.is_public) - current_room.announce(src, "Users must be invited to join this room.") - if("Autoscroll") - auto_scroll = !auto_scroll - if("Reconnect") - spawn() - messaging_available() \ No newline at end of file diff --git a/code/modules/pda/messenger_plugins.dm b/code/modules/pda/messenger_plugins.dm index 7e228445d3f..2666b82c5df 100644 --- a/code/modules/pda/messenger_plugins.dm +++ b/code/modules/pda/messenger_plugins.dm @@ -35,9 +35,6 @@ if(.) user.show_message("Virus sent!", 1) var/datum/data/pda/app/M = P.find_program(/datum/data/pda/app/messenger) - if(M) - M.notify_silent = 1 - M = P.find_program(/datum/data/pda/app/chatroom) if(M) M.notify_silent = 1 P.ttone = "silence" diff --git a/code/modules/pda/pdas.dm b/code/modules/pda/pdas.dm index a9a4cbb9714..676d193a6d3 100644 --- a/code/modules/pda/pdas.dm +++ b/code/modules/pda/pdas.dm @@ -54,9 +54,6 @@ var/datum/data/pda/app/M = find_program(/datum/data/pda/app/messenger) if(M) M.notify_silent = 1 - M = find_program(/datum/data/pda/app/chatroom) - if(M) - M.notify_silent = 1 /obj/item/pda/heads default_cartridge = /obj/item/cartridge/head @@ -161,9 +158,6 @@ var/datum/data/pda/app/M = find_program(/datum/data/pda/app/messenger) if(M) M.notify_silent = 1 //Quiet in the library! - M = find_program(/datum/data/pda/app/chatroom) - if(M) - M.notify_silent = 1 //Quiet in the library! /obj/item/pda/clear icon_state = "pda-transp" diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 7580621834f..ae64d5d4d6e 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -501,9 +501,9 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( /obj/item/stack/cable_coil/suicide_act(mob/user) if(locate(/obj/structure/stool) in user.loc) - user.visible_message("[user] is making a noose with the [name]! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is making a noose with the [name]! It looks like [user.p_theyre()] trying to commit suicide.") else - user.visible_message("[user] is strangling \himself with the [name]! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is strangling [user.p_them()]self with the [name]! It looks like [user.p_theyre()] trying to commit suicide.") return(OXYLOSS) /obj/item/stack/cable_coil/New(loc, length = MAXCOIL, var/paramcolor = null) @@ -528,7 +528,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( if(!S) return - if(!(S.status & ORGAN_ROBOT) || user.a_intent != INTENT_HELP || S.open == 2) + if(!S.is_robotic() || user.a_intent != INTENT_HELP || S.open == 2) return ..() if(S.burn_dam) diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index ff7ee7b6784..3bc2b5bc39b 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -89,7 +89,7 @@ to_chat(user, "The charge meter reads [round(percent() )]%.") /obj/item/stock_parts/cell/suicide_act(mob/user) - to_chat(viewers(user), "[user] is licking the electrodes of the [src]! It looks like \he's trying to commit suicide.") + to_chat(viewers(user), "[user] is licking the electrodes of the [src]! It looks like [user.p_theyre()] trying to commit suicide.") return (FIRELOSS) /obj/item/stock_parts/cell/attackby(obj/item/W, mob/user, params) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 3eac3486791..df12267015f 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -726,7 +726,7 @@ update() /obj/item/light/suicide_act(mob/living/carbon/human/user) - user.visible_message("[user] touches \the [src], burning their hands off!", "You touch \the [src], burning your hands off!") + user.visible_message("[user] touches [src], burning [user.p_their()] hands off!", "You touch [src], burning your hands off!") for(var/oname in list("l_hand", "r_hand")) var/obj/item/organ/external/limb = user.get_organ(oname) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 70cd75bf85d..a6c86d3f2ef 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -121,7 +121,7 @@ if(radio_controller) radio_controller.remove_object(src, frequency) radio_connection = null - msg_admin_attack("Emitter deleted at ([x],[y],[z] - [ADMIN_JMP(src)])", 0, 1) + msg_admin_attack("Emitter deleted at ([x],[y],[z] - [ADMIN_JMP(src)])", ATKLOG_FEW) log_game("Emitter deleted at ([x],[y],[z])") investigate_log("deleted at ([x],[y],[z])","singulo") return ..() diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index 9a911400fd5..0520630dcac 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -10,6 +10,7 @@ move_self = 1 //Do we move on our own? grav_pull = 5 //How many tiles out do we pull? consume_range = 6 //How many tiles out do we eat + gender = FEMALE /obj/singularity/narsie/large name = "Nar-Sie" diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index b8570de2c78..42fbb784f49 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -227,7 +227,7 @@ active = !active investigate_log("turned [active?"ON":"OFF"] by [usr ? usr.key : "outside forces"]","singulo") if(active) - msg_admin_attack("PA Control Computer turned ON by [key_name_admin(usr)]",0,1) + msg_admin_attack("PA Control Computer turned ON by [key_name_admin(usr)]", ATKLOG_FEW) log_game("PA Control Computer turned ON by [key_name(usr)] in ([x],[y],[z])") use_log += text("\[[time_stamp()]\] [key_name(usr)] has turned on the PA Control Computer.") if(active) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index e69abc5b00f..e5a669ef860 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -13,6 +13,7 @@ icon_state = "smes" density = 1 anchored = 1 + defer_process = 1 var/capacity = 5e6 // maximum charge var/charge = 0 // actual charge @@ -39,7 +40,6 @@ var/building_terminal = 0 //Suggestions about how to avoid clickspam building several terminals accepted! var/obj/machinery/power/terminal/terminal = null - /obj/machinery/power/smes/New() ..() component_parts = list() @@ -224,8 +224,6 @@ /obj/machinery/power/smes/proc/chargedisplay() return round(5.5*charge/(capacity ? capacity : 5e6)) -#define SMESRATE 0.05 - /obj/machinery/power/smes/process() if(stat & BROKEN) return diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index be17b3f65db..fd031f987c6 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -1,21 +1,33 @@ -//Ported from /vg/station13, which was in turn forked from baystation12; -//Please do not bother them with bugs from this port, however, as it has been modified quite a bit. -//Modifications include removing the world-ending full supermatter variation, and leaving only the shard. +#define NITROGEN_RETARDATION_FACTOR 0.15 //Higher == N2 slows reaction more +#define THERMAL_RELEASE_MODIFIER 10000 //Higher == more heat released during reaction +#define PLASMA_RELEASE_MODIFIER 1500 //Higher == less phor.. plasma released by reaction +#define OXYGEN_RELEASE_MODIFIER 15000 //Higher == less oxygen released at high temperature/power +#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power -#define NITROGEN_RETARDATION_FACTOR 2 //Higher == N2 slows reaction more -#define THERMAL_RELEASE_MODIFIER 5 //Higher == less heat released during reaction -#define PLASMA_RELEASE_MODIFIER 750 //Higher == less plasma released by reaction -#define OXYGEN_RELEASE_MODIFIER 325 //Higher == less oxygen released at high temperature/power -#define REACTION_POWER_MODIFIER 0.55 //Higher == more overall power +/* + How to tweak the SM + POWER_FACTOR directly controls how much power the SM puts out at a given level of excitation (power var). Making this lower means you have to work the SM harder to get the same amount of power. + CRITICAL_TEMPERATURE The temperature at which the SM starts taking damage. + CHARGING_FACTOR Controls how much emitter shots excite the SM. + DAMAGE_RATE_LIMIT Controls the maximum rate at which the SM will take damage due to high temperatures. +*/ + +//Controls how much power is produced by each collector in range - this is the main parameter for tweaking SM balance, as it basically controls how the power variable relates to the rest of the game. +#define POWER_FACTOR 1.0 +#define DECAY_FACTOR 700 //Affects how fast the supermatter power decays +#define CRITICAL_TEMPERATURE 5000 //K +#define CHARGING_FACTOR 0.05 +#define DAMAGE_RATE_LIMIT 4.5 //damage rate cap at power = 300, scales linearly with power -//These would be what you would get at point blank, decreases with distance +// Base variants are applied to everyone on the same Z level +// Range variants are applied on per-range basis: numbers here are on point blank, it scales with the map size (assumes square shaped Z levels) #define DETONATION_RADS 200 #define DETONATION_HALLUCINATION 600 -#define WARNING_DELAY 30 //seconds between warnings. +#define WARNING_DELAY 20 //seconds between warnings. /obj/machinery/power/supermatter_shard name = "supermatter shard" desc = "A strangely translucent and iridescent crystal that looks like it used to be part of a larger structure. You get headaches just from looking at it." @@ -35,15 +47,16 @@ var/safe_alert = "Crystalline hyperstructure returning to safe operating levels." var/warning_point = 50 var/warning_alert = "Danger! Crystal hyperstructure instability!" - var/emergency_point = 500 + var/emergency_point = 400 var/emergency_alert = "CRYSTAL DELAMINATION IMMINENT." - var/explosion_point = 900 + var/explosion_point = 600 var/emergency_issued = 0 var/explosion_power = 8 var/lastwarning = 0 // Time in 1/10th of seconds since the last sent warning + var/last_zap = 0 // Time in 1/10th of seconds since the last tesla zap var/power = 0 var/oxygen = 0 // Moving this up here for easier debugging. @@ -51,38 +64,90 @@ //Temporary values so that we can optimize this //How much the bullets damage should be multiplied by when it is added to the internal variables var/config_bullet_energy = 2 - //How much of the power is left after processing is finished? -// var/config_power_reduction_per_tick = 0.5 //How much hallucination should it produce per unit of power? var/config_hallucination_power = 0.1 + var/debug = 0 + + var/disable_adminwarn = FALSE + + var/aw_normal = FALSE + var/aw_notify = FALSE + var/aw_warning = FALSE + var/aw_danger = FALSE + var/aw_emerg = FALSE + var/aw_delam = FALSE + var/obj/item/radio/radio //for logging var/has_been_powered = 0 var/has_reached_emergency = 0 +/obj/machinery/power/supermatter_shard/crystal + name = "supermatter crystal" + desc = "A strangely translucent and iridescent crystal." + base_icon_state = "darkmatter" + icon_state = "darkmatter" + anchored = TRUE + warning_point = 200 + emergency_point = 2000 + explosion_point = 3600 + gasefficency = 0.25 + explosion_power = 24 + + /obj/machinery/power/supermatter_shard/New() . = ..() poi_list |= src + //Added to the atmos_machine process as the SM is highly coupled with the atmospherics system. + //Having the SM run at a different rate then atmospherics causes odd behavior. + SSair.atmos_machinery += src radio = new(src) radio.listening = 0 investigate_log("has been created.", "supermatter") +/obj/machinery/power/supermatter_shard/proc/handle_admin_warnings() + if(disable_adminwarn) + return + + // Generic checks, similar to checks done by supermatter monitor program. + aw_normal = status_adminwarn_check(SUPERMATTER_NORMAL, aw_normal, "INFO: Supermatter crystal has been energised.(JMP).", FALSE) + aw_notify = status_adminwarn_check(SUPERMATTER_NOTIFY, aw_notify, "INFO: Supermatter crystal is approaching unsafe operating temperature.(JMP).", FALSE) + aw_warning = status_adminwarn_check(SUPERMATTER_WARNING, aw_warning, "WARN: Supermatter crystal is taking integrity damage!(JMP).", FALSE) + aw_danger = status_adminwarn_check(SUPERMATTER_DANGER, aw_danger, "WARN: Supermatter integrity is below 75%!(JMP).", TRUE) + aw_emerg = status_adminwarn_check(SUPERMATTER_EMERGENCY, aw_emerg, "CRIT: Supermatter integrity is below 50%!(JMP).", FALSE) + aw_delam = status_adminwarn_check(SUPERMATTER_DELAMINATING, aw_delam, "CRIT: Supermatter is delaminating!(JMP).", TRUE) + +/obj/machinery/power/supermatter_shard/proc/status_adminwarn_check(var/min_status, var/current_state, var/message, var/send_to_irc = FALSE) + var/status = get_status() + if(status >= min_status) + if(!current_state) + log_and_message_admins(message) + if(send_to_irc) + send2adminirc(message) + return TRUE + else + return FALSE + + /obj/machinery/power/supermatter_shard/Destroy() investigate_log("has been destroyed.", "supermatter") + if(damage > emergency_point) + emergency_lighting(0) QDEL_NULL(radio) poi_list.Remove(src) + SSair.atmos_machinery -= src return ..() /obj/machinery/power/supermatter_shard/proc/explode() investigate_log("has exploded.", "supermatter") - explosion(get_turf(src), explosion_power, explosion_power * 2, explosion_power * 3, explosion_power * 4, 1) + explosion(get_turf(src), explosion_power, explosion_power * 1.2, explosion_power * 1.5, explosion_power * 2, 1, 1) qdel(src) return -/obj/machinery/power/supermatter_shard/process() +/obj/machinery/power/supermatter_shard/process_atmos() var/turf/L = loc if(isnull(L)) // We have a null turf...something is wrong, stop processing this entity. @@ -91,11 +156,10 @@ if(!istype(L)) //We are in a crate or somewhere that isn't turf, if we return to turf resume processing but for now. return //Yeah just stop. - if(istype(L, /turf/space)) // Stop processing this stuff if we've been ejected. - return - if(damage > warning_point) // while the core is still damaged and it's still worth noting its status if((world.timeofday - lastwarning) / 10 >= WARNING_DELAY) + alarm() + emergency_lighting(1) var/stability = num2text(round((damage / explosion_point) * 100)) if(damage > emergency_point) @@ -112,6 +176,7 @@ else // Phew, we're safe radio.autosay("[safe_alert]", src.name) + emergency_lighting(0) lastwarning = world.timeofday if(damage > explosion_point) @@ -128,6 +193,11 @@ mob.apply_effect(rads, IRRADIATE) explode() + emergency_lighting(0) + + if(damage > warning_point && world.timeofday > last_zap) + last_zap = world.timeofday + rand(80,200) + supermatter_zap() //Ok, get the air from the turf var/datum/gas_mixture/env = L.return_air() @@ -135,52 +205,57 @@ //Remove gas from surrounding area var/datum/gas_mixture/removed = env.remove(gasefficency * env.total_moles()) - if(!removed || !removed.total_moles()) - damage += max((power-1600)/10, 0) - power = min(power, 1600) - return 1 + //ensure that damage doesn't increase too quickly due to super high temperatures resulting from no coolant, for example. We dont want the SM exploding before anyone can react. + //We want the cap to scale linearly with power (and explosion_point). Let's aim for a cap of 5 at power = 300 (based on testing, equals roughly 5% per SM alert announcement). + var/damage_inc_limit = (power/300)*(explosion_point/1000)*DAMAGE_RATE_LIMIT + + if(!env || !removed || !removed.total_moles()) + damage += max((power - 15*POWER_FACTOR)/10, 0) + else + damage_archived = damage + + damage = max(0, damage + between(-DAMAGE_RATE_LIMIT, (removed.temperature - CRITICAL_TEMPERATURE) / 150, damage_inc_limit)) - damage_archived = damage - damage = max( damage + ( (removed.temperature - 800) / 150 ) , 0 ) - //Ok, 100% oxygen atmosphere = best reaction //Maxes out at 100% oxygen pressure - oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0) - - var/temp_factor = 50 + oxygen = Clamp((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / removed.total_moles(), 0, 1) + var/temp_factor + var/equilibrium_power if(oxygen > 0.8) - // with a perfect gas mix, make the power less based on heat + //If chain reacting at oxygen > 0.8, we want the power at 800 K to stabilize at a power level of 400 + equilibrium_power = 400 icon_state = "[base_icon_state]_glow" else - // in normal mode, base the produced energy around the heat - temp_factor = 30 + //Otherwise, we want the power at 800 K to stabilize at a power level of 250 + equilibrium_power = 250 icon_state = base_icon_state - power = max( (removed.temperature * temp_factor / T0C) * oxygen + power, 0) //Total laser power plus an overload - - //We've generated power, now let's transfer it to the collectors for storing/usage - transfer_energy() + temp_factor = ((equilibrium_power / DECAY_FACTOR) ** 3) / 800 + power = max((removed.temperature * temp_factor) * oxygen + power, 0) var/device_energy = power * REACTION_POWER_MODIFIER - //To figure out how much temperature to add each tick, consider that at one atmosphere's worth - //of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature - //that the device energy is around 2140. At that stage, we don't want too much heat to be put out - //Since the core is effectively "cold" + var/heat_capacity = removed.heat_capacity() - //Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock - //is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall. - removed.temperature += (device_energy / THERMAL_RELEASE_MODIFIER) - - removed.temperature = max(0, min(removed.temperature, 2500)) - - //Calculate how much gas to release removed.toxins += max(device_energy / PLASMA_RELEASE_MODIFIER, 0) removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0) + var/thermal_power = THERMAL_RELEASE_MODIFIER * device_energy + if(debug) + var/heat_capacity_new = removed.heat_capacity() + visible_message("[src]: Releasing [round(thermal_power)] W.") + visible_message("[src]: Releasing additional [round((heat_capacity_new - heat_capacity)*removed.temperature)] W with exhaust gasses.") + + removed.temperature += (device_energy) + + removed.temperature = max(0, min(removed.temperature, 10000)) + env.merge(removed) + air_update_turf() + transfer_energy() + for(var/mob/living/carbon/human/l in view(src, min(7, round(sqrt(power/6))))) // If they can see it without mesons on. Bad on them. if(l.glasses && istype(l.glasses, /obj/item/clothing/glasses/meson)) @@ -196,7 +271,8 @@ var/rads = (power / 10) * sqrt( 1 / max(get_dist(l, src),1) ) l.apply_effect(rads, IRRADIATE) - power -= (power/500)**3 + power -= (power/DECAY_FACTOR)**3 + handle_admin_warnings() return 1 @@ -217,12 +293,13 @@ has_been_powered = 1 else damage += Proj.damage * config_bullet_energy + supermatter_zap() return 0 /obj/machinery/power/supermatter_shard/singularity_act() var/gain = 100 investigate_log("Supermatter shard consumed by singularity.","singulo") - message_admins("Singularity has consumed a supermatter shard and can now become stage six.") + message_admins("Singularity has consumed a supermatter shard and can now become stage six.(JMP).") visible_message("[src] is consumed by the singularity!") for(var/mob/M in mob_list) M << 'sound/effects/supermatter.ogg' //everyone gunna know bout this @@ -244,7 +321,7 @@ ui_interact(user) /obj/machinery/power/supermatter_shard/attack_hand(mob/user as mob) - user.visible_message("\The [user] reaches out and touches \the [src], inducing a resonance... \his body starts to glow and bursts into flames before flashing into ash.",\ + user.visible_message("\The [user] reaches out and touches \the [src], inducing a resonance... [user.p_their(TRUE)] body starts to glow and bursts into flames before flashing into ash.",\ "You reach out and touch \the [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"",\ "You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.") @@ -306,10 +383,9 @@ user.apply_effect(150, IRRADIATE) - /obj/machinery/power/supermatter_shard/Bumped(atom/AM as mob|obj) if(istype(AM, /mob/living)) - AM.visible_message("\The [AM] slams into \the [src] inducing a resonance... \his body starts to glow and catch flame before flashing into ash.",\ + AM.visible_message("\The [AM] slams into \the [src] inducing a resonance... [AM.p_their(TRUE)] body starts to glow and catch flame before flashing into ash.",\ "You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"",\ "You hear an unearthly noise as a wave of heat washes over you.") else if(isobj(AM) && !istype(AM, /obj/effect)) @@ -335,6 +411,8 @@ qdel(AM) power += 200 + supermatter_zap() + //Some poor sod got eaten, go ahead and irradiate people nearby. for(var/mob/living/L in range(10)) @@ -346,3 +424,53 @@ "The unearthly ringing subsides and you notice you have new radiation burns.", 2) else L.show_message("You hear an uneartly ringing and notice your skin is covered in fresh radiation burns.", 2) + +#define CRITICAL_TEMPERATURE 10000 + +/obj/machinery/power/supermatter_shard/proc/get_status() + var/turf/T = get_turf(src) + if(!T) + return SUPERMATTER_ERROR + var/datum/gas_mixture/air = T.return_air() + if(!air) + return SUPERMATTER_ERROR + + if(get_integrity() < 25) + return SUPERMATTER_DELAMINATING + + if(get_integrity() < 50) + return SUPERMATTER_EMERGENCY + + if(get_integrity() < 75) + return SUPERMATTER_DANGER + + if((get_integrity() < 100) || (air.temperature > CRITICAL_TEMPERATURE)) + return SUPERMATTER_WARNING + + if(air.temperature > (CRITICAL_TEMPERATURE * 0.8)) + return SUPERMATTER_NOTIFY + + if(power > 5) + return SUPERMATTER_NORMAL + return SUPERMATTER_INACTIVE + +/obj/machinery/power/supermatter_shard/proc/alarm() + switch(get_status()) + if(SUPERMATTER_DELAMINATING) + playsound(src, 'sound/misc/bloblarm.ogg', 100) + if(SUPERMATTER_EMERGENCY) + playsound(src, 'sound/machines/engine_alert1.ogg', 100) + if(SUPERMATTER_DANGER) + playsound(src, 'sound/machines/engine_alert2.ogg', 100) + if(SUPERMATTER_WARNING) + playsound(src, 'sound/machines/terminal_alert.ogg', 75) + +/obj/machinery/power/supermatter_shard/proc/emergency_lighting(active) + if(active) + post_status("alert", "radiation") + else + post_status("shuttle") + +/obj/machinery/power/supermatter_shard/proc/supermatter_zap() + playsound(src.loc, 'sound/magic/LightningShock.ogg', 100, 1, extrarange = 5) + tesla_zap(src, 10, max(1000,power * damage / explosion_point)) diff --git a/code/modules/projectiles/ammunition/magazines.dm b/code/modules/projectiles/ammunition/magazines.dm index 6ad60248a28..a7baacb9583 100644 --- a/code/modules/projectiles/ammunition/magazines.dm +++ b/code/modules/projectiles/ammunition/magazines.dm @@ -198,13 +198,6 @@ desc= "A gun magazine. Loaded with rounds which penetrate armour, but are less effective against normal targets" ammo_type = /obj/item/ammo_casing/c10mm/ap -/obj/item/ammo_box/magazine/m10mm/empty //for maint drops - desc = "A gun magazine. Seems to be broken and can only hold one bullet. Pretty useless." - max_ammo = 1 - -/obj/item/ammo_box/magazine/m10mm/empty/update_icon() - icon_state = "[initial(icon_state)]-[stored_ammo.len ? "8" : "0"]" - /obj/item/ammo_box/magazine/m45 name = "handgun magazine (.45)" icon_state = "45" diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index b54d5bff21f..51bf515ca1e 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -347,7 +347,7 @@ obj/item/gun/proc/newshot() return if(user == target) - target.visible_message("[user] sticks [src] in their mouth, ready to pull the trigger...", \ + target.visible_message("[user] sticks [src] in [user.p_their()] mouth, ready to pull the trigger...", \ "You stick [src] in your mouth, ready to pull the trigger...") else target.visible_message("[user] points [src] at [target]'s head, ready to pull the trigger...", \ diff --git a/code/modules/projectiles/guns/dartgun.dm b/code/modules/projectiles/guns/dartgun.dm index 5ae089d5522..c279abdc5c1 100644 --- a/code/modules/projectiles/guns/dartgun.dm +++ b/code/modules/projectiles/guns/dartgun.dm @@ -178,7 +178,8 @@ else M.LAssailant = user - add_attack_logs(user, M, "Shot with dartgun containing [R]", !!M.ckey) + add_attack_logs(user, M, "Shot with dartgun containing [R]") + if(D.reagents) D.reagents.trans_to(M, 15) to_chat(M, "You feel a slight prick.") diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index fd6c14c4e6b..795b5942845 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -146,10 +146,10 @@ /obj/item/gun/energy/suicide_act(mob/user) if(can_shoot()) - user.visible_message("[user] is putting the barrel of the [name] in \his mouth. It looks like \he's trying to commit suicide.") + user.visible_message("[user] is putting the barrel of the [name] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide.") sleep(25) if(user.l_hand == src || user.r_hand == src) - user.visible_message("[user] melts \his face off with the [name]!") + user.visible_message("[user] melts [user.p_their()] face off with the [name]!") playsound(loc, fire_sound, 50, 1, -1) var/obj/item/ammo_casing/energy/shot = ammo_type[select] power_supply.use(shot.e_cost) @@ -159,7 +159,7 @@ user.visible_message("[user] panics and starts choking to death!") return(OXYLOSS) else - user.visible_message("[user] is pretending to blow \his brains out with the [name]! It looks like \he's trying to commit suicide!
") + user.visible_message("[user] is pretending to blow [user.p_their()] brains out with the [name]! It looks like [user.p_theyre()] trying to commit suicide!
") playsound(loc, 'sound/weapons/empty.ogg', 50, 1, -1) return (OXYLOSS) diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 7d2568a7199..7559fc1a591 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -128,7 +128,7 @@ /obj/item/gun/energy/kinetic_accelerator/suicide_act(mob/user) if(!suppressed) playsound(loc, 'sound/weapons/kenetic_reload.ogg', 60, 1) - user.visible_message("[user] cocks the [name] and pretends to blow \his brains out! It looks like \he's trying to commit suicide!") + user.visible_message("[user] cocks the [name] and pretends to blow [user.p_their()] brains out! It looks like [user.p_theyre()] trying to commit suicide!") shoot_live_shot() return (OXYLOSS) diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index a1840663350..94f397b45bf 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -76,6 +76,6 @@ return /obj/item/gun/magic/suicide_act(mob/user) - user.visible_message("[user] is twisting the [name] above \his head, releasing a magical blast! It looks like \he's trying to commit suicide.") + user.visible_message("[user] is twisting the [name] above [user.p_their()] head, releasing a magical blast! It looks like [user.p_theyre()] trying to commit suicide.") playsound(loc, fire_sound, 50, 1, -1) return FIRELOSS diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index 1a8e5e45946..cae9d11cbb6 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -48,9 +48,9 @@ update_icon() /obj/item/gun/magic/wand/proc/zap_self(mob/living/user) - user.visible_message("[user] zaps \himself with [src].") + user.visible_message("[user] zaps [user.p_them()]self with [src].") playsound(user, fire_sound, 50, 1) - user.create_attack_log("[key_name(user)] zapped \himself with a [src]") + user.create_attack_log("[key_name(user)] zapped [user.p_them()]self with a [src]") ///////////////////////////////////// //WAND OF DEATH diff --git a/code/modules/projectiles/guns/misc/blastcannon.dm b/code/modules/projectiles/guns/misc/blastcannon.dm index f6881208a32..89cceab6cd3 100644 --- a/code/modules/projectiles/guns/misc/blastcannon.dm +++ b/code/modules/projectiles/guns/misc/blastcannon.dm @@ -76,7 +76,7 @@ var/heavy = power * 0.2 var/medium = power * 0.5 var/light = power - user.visible_message("[user] opens [bomb] on \his [name] and fires a blast wave at [target]!","You open [bomb] on your [name] and fire a blast wave at [target]!") + user.visible_message("[user] opens [bomb] on [user.p_their()] [name] and fires a blast wave at [target]!","You open [bomb] on your [name] and fire a blast wave at [target]!") playsound(user, "explosion", 100, 1) var/turf/starting = get_turf(user) var/turf/targturf = get_turf(target) diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 2b8ff6a59f8..0ff5e57e7c5 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -137,17 +137,17 @@ /obj/item/gun/projectile/suicide_act(mob/user) if(chambered && chambered.BB && !chambered.BB.nodamage) - user.visible_message("[user] is putting the barrel of the [name] in \his mouth. It looks like \he's trying to commit suicide.") + user.visible_message("[user] is putting the barrel of the [name] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide.") sleep(25) if(user.l_hand == src || user.r_hand == src) process_fire(user, user, 0, zone_override = "head") - user.visible_message("[user] blows \his brains out with the [name]!") + user.visible_message("[user] blows [user.p_their()] brains out with the [name]!") return(BRUTELOSS) else user.visible_message("[user] panics and starts choking to death!") return(OXYLOSS) else - user.visible_message("[user] is pretending to blow \his brains out with the [name]! It looks like \he's trying to commit suicide!") + user.visible_message("[user] is pretending to blow [user.p_their()] brains out with the [name]! It looks like [user.p_theyre()] trying to commit suicide!") playsound(loc, 'sound/weapons/empty.ogg', 50, 1, -1) return (OXYLOSS) diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm index 103595d7242..7ac82f99d5c 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -26,12 +26,6 @@ mag_type = /obj/item/ammo_box/magazine/m45 can_suppress = 0 -/obj/item/gun/projectile/automatic/pistol/empty //empty stetchshit for maint spawns - -/obj/item/gun/projectile/automatic/pistol/empty/New() - magazine = new /obj/item/ammo_box/magazine/m10mm/empty(src) - ..() - /obj/item/gun/projectile/automatic/pistol/enforcer name = "Enforcer .45" desc = "A pistol of modern design." diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index 502c69bed9c..c4c6f76a963 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -244,7 +244,7 @@ if(zone == "head" || zone == "eyes" || zone == "mouth") shoot_self(user, zone) else - user.visible_message("[user.name] cowardly fires [src] at \his [zone]!", "You cowardly fire [src] at your [zone]!", "You hear a gunshot!") + user.visible_message("[user.name] cowardly fires [src] at [user.p_their()] [zone]!", "You cowardly fire [src] at your [zone]!", "You hear a gunshot!") return user.visible_message("*click*") @@ -252,7 +252,7 @@ /obj/item/gun/projectile/revolver/russian/proc/shoot_self(mob/living/carbon/human/user, affecting = "head") user.apply_damage(300, BRUTE, affecting) - user.visible_message("[user.name] fires [src] at \his head!", "You fire [src] at your head!", "You hear a gunshot!") + user.visible_message("[user.name] fires [src] at [user.p_their()] head!", "You fire [src] at your head!", "You hear a gunshot!") /obj/item/gun/projectile/revolver/capgun name = "cap gun" diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index a378e291e7c..e38a42ff88f 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -114,13 +114,18 @@ "[L] is hit by \a [src][organ_hit_text]!") //X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter var/reagent_note + var/has_reagents = FALSE if(reagents && reagents.reagent_list) reagent_note = " REAGENTS:" for(var/datum/reagent/R in reagents.reagent_list) reagent_note += R.id + " (" reagent_note += num2text(R.volume) + ") " + has_reagents = TRUE if(!log_override && firer && original) - add_attack_logs(firer, L, "Shot with a [type] (potentially containing [reagent_note])") + if(has_reagents) + add_attack_logs(firer, L, "Shot with a [type] (containing [reagent_note])") + else + add_attack_logs(firer, L, "Shot with a [type]") return L.apply_effects(stun, weaken, paralyze, irradiate, slur, stutter, eyeblur, drowsy, blocked, stamina, jitter) /obj/item/projectile/proc/get_splatter_blockage(var/turf/step_over, var/atom/target, var/splatter_dir, var/target_loca) //Check whether the place we want to splatter blood is blocked (i.e. by windows). diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index becada9f19e..761fb50179c 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -77,7 +77,7 @@ /obj/item/projectile/beam/lasertag name = "laser tag beam" icon_state = "omnilaser" - hitsound = null + hitsound = 'sound/weapons/tap.ogg' damage = 0 damage_type = STAMINA flag = "laser" diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 4521dc8d7ba..3fe2277ed3b 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -32,7 +32,7 @@ else G.death() - visible_message("[G] topples backwards as the death bolt impacts them!") + visible_message("[G] topples backwards as the death bolt impacts [G.p_them()]!") /obj/item/projectile/magic/fireball/Range() var/turf/T1 = get_step(src,turn(dir, -45)) diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 6ac21128e56..2c774b7f3dd 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -8,14 +8,14 @@ /obj/item/projectile/ion/on_hit(var/atom/target, var/blocked = 0) ..() - empulse(target, 1, 1) + empulse(target, 1, 1, 1) return 1 /obj/item/projectile/ion/weak /obj/item/projectile/ion/weak/on_hit(atom/target, blocked = 0) ..() - empulse(target, 0, 0) + empulse(target, 0, 0, 1) return 1 /obj/item/projectile/bullet/gyro @@ -137,7 +137,7 @@ if(prob(15)) M.apply_effect((rand(30,80)),IRRADIATE) M.Weaken(5) - M.visible_message("[M] writhes in pain as \his vacuoles boil.", "You writhe in pain as your vacuoles boil!", "You hear the crunching of leaves.") + M.visible_message("[M] writhes in pain as [M.p_their()] vacuoles boil.", "You writhe in pain as your vacuoles boil!", "You hear the crunching of leaves.") if(prob(35)) if(prob(80)) randmutb(M) diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index e589936a935..d4d232d2ed7 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -1,7 +1,3 @@ -#define SOLID 1 -#define LIQUID 2 -#define GAS 3 - /obj/machinery/chem_dispenser name = "chem dispenser" density = 1 diff --git a/code/modules/reagents/chemistry/reagents/drugs.dm b/code/modules/reagents/chemistry/reagents/drugs.dm index 6a4ede5fe50..a2bd35ae75a 100644 --- a/code/modules/reagents/chemistry/reagents/drugs.dm +++ b/code/modules/reagents/chemistry/reagents/drugs.dm @@ -208,7 +208,7 @@ M.reagents.add_reagent("jagged_crystals", 5) else if(effect <= 7) M.emote("scream") - M.visible_message("[M] nervously scratches at their skin!") + M.visible_message("[M] nervously scratches at [M.p_their()] skin!") M.Jitter(10) M.adjustBruteLoss(5) M.emote("twitch_s") @@ -315,7 +315,7 @@ var/effect = ..() if(severity == 1) if(effect <= 2) - M.visible_message("[M] can't seem to control their legs!") + M.visible_message("[M] can't seem to control [M.p_their()] legs!") M.AdjustConfused(20) M.Weaken(4) else if(effect <= 4) @@ -356,7 +356,7 @@ head_organ.f_style = "Very Long Beard" H.update_hair() H.update_fhair() - H.visible_message("[H] has a wild look in their eyes!") + H.visible_message("[H] has a wild look in [H.p_their()] eyes!") if(check < 60) M.SetParalysis(0) M.SetStunned(0) @@ -368,7 +368,7 @@ M.AdjustConfused(10) if(check < 8) M.reagents.add_reagent(pick("methamphetamine", "crank", "neurotoxin"), rand(1,5)) - M.visible_message("[M] scratches at something under their skin!") + M.visible_message("[M] scratches at something under [M.p_their()] skin!") M.adjustBruteLoss(5) else if(check < 16) M.AdjustHallucinate(30) @@ -427,7 +427,7 @@ M.reagents.add_reagent("jagged_crystals", 5) else if(effect <= 7) M.emote("scream") - M.visible_message("[M] tears at their own skin!") + M.visible_message("[M] tears at [M.p_their()] own skin!") M.adjustBruteLoss(5) M.reagents.add_reagent("jagged_crystals", 5) M.emote("twitch") @@ -541,7 +541,7 @@ var/effect = ..() if(severity == 1) if(effect <= 2) - M.visible_message("[M] can't seem to control their legs!") + M.visible_message("[M] can't seem to control [M.p_their()] legs!") M.AdjustConfused(33) M.Weaken(2) else if(effect <= 4) diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm index ada22d5b139..c9f89743e7c 100644 --- a/code/modules/reagents/chemistry/reagents/medicine.dm +++ b/code/modules/reagents/chemistry/reagents/medicine.dm @@ -73,7 +73,7 @@ M.visible_message("[M] suddenly and violently vomits!") M.fakevomit(no_text = 1) else if(effect <= 5) - M.visible_message("[M] staggers and drools, their eyes bloodshot!") + M.visible_message("[M] staggers and drools, [M.p_their()] eyes bloodshot!") M.Dizzy(8) M.Weaken(4) if(effect <= 15) @@ -92,13 +92,14 @@ //Mitocholide is hard enough to get, it's probably fair to make this all internal organs for(var/obj/item/organ/internal/I in H.internal_organs) - I.receive_damage(-0.4) + I.heal_internal_damage(0.4) ..() /datum/reagent/medicine/mitocholide/reaction_obj(obj/O, volume) if(istype(O, /obj/item/organ)) var/obj/item/organ/Org = O - Org.rejuvenate() + if(!Org.is_robotic()) + Org.rejuvenate() /datum/reagent/medicine/cryoxadone name = "Cryoxadone" @@ -115,7 +116,11 @@ M.adjustToxLoss(-3) M.adjustBruteLoss(-12) M.adjustFireLoss(-12) - M.status_flags &= ~DISFIGURED + if(ishuman(M)) + var/mob/living/carbon/human/H = M + var/obj/item/organ/external/head/head = H.get_organ("head") + if(head) + head.disfigured = FALSE ..() /datum/reagent/medicine/rezadone @@ -131,7 +136,11 @@ M.adjustCloneLoss(-1) //What? We just set cloneloss to 0. Why? Simple; this is so external organs properly unmutate. M.adjustBruteLoss(-1) M.adjustFireLoss(-1) - M.status_flags &= ~DISFIGURED + if(ishuman(M)) + var/mob/living/carbon/human/H = M + var/obj/item/organ/external/head/head = H.get_organ("head") + if(head) + head.disfigured = FALSE ..() /datum/reagent/medicine/rezadone/overdose_process(mob/living/M, severity) @@ -277,7 +286,7 @@ if(severity == 1) //lesser M.stuttering += 1 if(effect <= 1) - M.visible_message("[M] suddenly cluches their gut!") + M.visible_message("[M] suddenly cluches [M.p_their()] gut!") M.emote("scream") M.Stun(4) M.Weaken(4) @@ -293,7 +302,7 @@ M.Jitter(30) else if(severity == 2) // greater if(effect <= 2) - M.visible_message("[M] suddenly cluches their gut!") + M.visible_message("[M] suddenly cluches [M.p_their()] gut!") M.emote("scream") M.Stun(7) M.Weaken(7) @@ -446,7 +455,7 @@ M.visible_message("[M] suddenly and violently vomits!") M.fakevomit(no_text = 1) else if(effect <= 5) - M.visible_message("[M.name] staggers and drools, their eyes bloodshot!") + M.visible_message("[M.name] staggers and drools, [M.p_their()] eyes bloodshot!") M.Dizzy(2) M.Weaken(3) if(effect <= 15) @@ -512,7 +521,7 @@ var/mob/living/carbon/human/H = M var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes) if(istype(E)) - E.receive_damage(-1) + E.heal_internal_damage(1) M.AdjustEyeBlurry(-1) M.AdjustEarDamage(-1) if(prob(50)) @@ -597,7 +606,7 @@ M.visible_message("[M] suddenly and violently vomits!") M.fakevomit(no_text = 1) else if(effect <= 5) - M.visible_message("[M] staggers and drools, their eyes bloodshot!") + M.visible_message("[M] staggers and drools, [M.p_their()] eyes bloodshot!") M.Dizzy(2) M.Weaken(3) if(effect <= 15) diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm index 8cad5400c02..7bff61218c6 100644 --- a/code/modules/reagents/chemistry/reagents/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -557,7 +557,7 @@ M.adjustBruteLoss(5) M.Weaken(5) M.AdjustJitter(6) - M.visible_message("[M] falls to the floor, scratching themselves violently!") + M.visible_message("[M] falls to the floor, scratching [M.p_them()]self violently!") M.emote("scream") ..() @@ -611,11 +611,11 @@ return if(!H.unacidable) - var/obj/item/organ/external/affecting = H.get_organ("head") - affecting.receive_damage(0, 75) + var/obj/item/organ/external/head/affecting = H.get_organ("head") + if(affecting) + affecting.receive_damage(0, 75) H.UpdateDamageIcon() H.emote("scream") - H.status_flags |= DISFIGURED /datum/reagent/facid/reaction_obj(obj/O, volume) if((istype(O, /obj/item) || istype(O, /obj/structure/glowshroom))) @@ -947,8 +947,7 @@ /datum/reagent/glyphosate/reaction_obj(obj/O, volume) if(istype(O,/obj/structure/alien/weeds)) var/obj/structure/alien/weeds/alien_weeds = O - alien_weeds.health -= rand(15,35) // Kills alien weeds pretty fast - alien_weeds.healthcheck() + alien_weeds.take_damage(rand(15, 35), BRUTE, 0) // Kills alien weeds pretty fast else if(istype(O, /obj/structure/glowshroom)) //even a small amount is enough to kill it qdel(O) else if(istype(O, /obj/structure/spacevine)) @@ -1016,7 +1015,7 @@ M.Drowsy(10) if(11) M.Paralyse(10) - M.visible_message("[M] seizes up and falls limp, their eyes dead and lifeless...") //so you can't trigger deathgasp emote on people. Edge case, but necessary. + M.visible_message("[M] seizes up and falls limp, [M.p_their()] eyes dead and lifeless...") //so you can't trigger deathgasp emote on people. Edge case, but necessary. if(12 to 60) M.Paralyse(10) if(61 to INFINITY) diff --git a/code/modules/reagents/chemistry/recipes/slime_extracts.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm index aa5e16adc04..4df7a525b88 100644 --- a/code/modules/reagents/chemistry/recipes/slime_extracts.dm +++ b/code/modules/reagents/chemistry/recipes/slime_extracts.dm @@ -334,7 +334,7 @@ /datum/chemical_reaction/slimeoverload/on_reaction(datum/reagents/holder, created_volume) feedback_add_details("slime_cores_used","[type]") - empulse(get_turf(holder.my_atom), 3, 7) + empulse(get_turf(holder.my_atom), 3, 7, 1) /datum/chemical_reaction/slimecell diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 28d8857efe1..e3e0daee333 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -61,10 +61,10 @@ /obj/item/reagent_containers/afterattack(obj/target, mob/user , flag) return -/obj/item/reagent_containers/proc/reagentlist(obj/item/reagent_containers/snack) //Attack logs for regents in pills +/obj/item/reagent_containers/proc/reagentlist() //Return reagents in a reagent_container, default to source var/data - if(snack && snack.reagents && snack.reagents.reagent_list && snack.reagents.reagent_list.len) //find a reagent list if there is and check if it has entries - for(var/datum/reagent/R in snack.reagents.reagent_list) //no reagents will be left behind + if(reagents && reagents.reagent_list && reagents.reagent_list.len) //find a reagent list if there is and check if it has entries + for(var/datum/reagent/R in reagents.reagent_list) //no reagents will be left behind data += "[R.id]([R.volume] units); " //Using IDs because SOME chemicals(I'm looking at you, chlorhydrate-beer) have the same names as other chemicals. return data else return "No reagents" diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 057a339649c..ad8b3438ee4 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -85,7 +85,7 @@ var/datum/reagent/injected = chemical_reagents_list[reagent_ids[mode]] var/contained = injected.name var/trans = R.trans_to(M, amount_per_transfer_from_this) - add_attack_logs(M, user, "Injected with [name] containing [contained], transfered [trans] units", !!M.ckey) + add_attack_logs(M, user, "Injected with [name] containing [contained], transfered [trans] units") M.LAssailant = user to_chat(user, "[trans] units injected. [R.total_volume] units remaining.") return diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index 39d3babf4bc..d20ef6f82ee 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -42,7 +42,8 @@ /obj/machinery/constructable_frame, /obj/machinery/icemachine, /obj/item/bombcore/chemical, - /obj/machinery/vending) + /obj/machinery/vending, + /obj/machinery/fishtank) /obj/item/reagent_containers/glass/New() ..() @@ -82,7 +83,7 @@ for(var/datum/reagent/R in reagents.reagent_list) injected += R.name var/contained = english_list(injected) - add_attack_logs(M, user, "Splashed with [name] containing [contained]", !!M.ckey) + add_attack_logs(M, user, "Splashed with [name] containing [contained]", !!M.ckey ? null : ATKLOG_ALL) if(!iscarbon(user)) M.LAssailant = null else diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index e405dbe169c..02ab4408acb 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -49,14 +49,14 @@ user.newtonian_move(get_dir(A, user)) if(reagents.has_reagent("sacid")) - msg_admin_attack("[key_name_admin(user)] fired sulphuric acid from \a [src].") - log_game("[key_name(user)] fired sulphuric acid from \a [src].") + msg_admin_attack("[key_name_admin(user)] fired sulphuric acid from \a [src] at [COORD(user)].", ATKLOG_FEW) + log_game("[key_name(user)] fired sulphuric acid from \a [src] at [COORD(user)].") if(reagents.has_reagent("facid")) - msg_admin_attack("[key_name_admin(user)] fired fluorosulfuric acid from \a [src].") - log_game("[key_name(user)] fired fluorosulfuric Acid from \a [src].") + msg_admin_attack("[key_name_admin(user)] fired fluorosulfuric acid from \a [src] at [COORD(user)].", ATKLOG_FEW) + log_game("[key_name(user)] fired fluorosulfuric Acid from \a [src] at [COORD(user)].") if(reagents.has_reagent("lube")) - msg_admin_attack("[key_name_admin(user)] fired space lube from \a [src].") - log_game("[key_name(user)] fired space lube from \a [src].") + msg_admin_attack("[key_name_admin(user)] fired space lube from \a [src] at [COORD(user)].") + log_game("[key_name(user)] fired space lube from \a [src] at [COORD(user)].") return diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index a80c4142d87..bcbcad6bc98 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -9,6 +9,7 @@ var/tank_volume = 1000 //In units, how much the dispenser can hold var/reagent_id = "water" //The ID of the reagent that the dispenser uses + var/lastrigger = "" // The last person to rig this fuel tank - Stored with the object. Only the last person matter for investigation /obj/structure/reagent_dispensers/attackby(obj/item/W, mob/user, params) return @@ -77,11 +78,16 @@ ..() if(!QDELETED(src)) //wasn't deleted by the projectile's effects. if(!P.nodamage && ((P.damage_type == BURN) || (P.damage_type == BRUTE))) - message_admins("[key_name_admin(P.firer)] triggered a fueltank explosion.") - log_game("[key_name(P.firer)] triggered a fueltank explosion.") + message_admins("[key_name_admin(P.firer)] triggered a fueltank explosion with [P.name] at [COORD(loc)] ") + log_game("[key_name(P.firer)] triggered a fueltank explosion with [P.name] at [COORD(loc)]") + investigate_log("[key_name(P.firer)] triggered a fueltank explosion with [P.name] at [COORD(loc)]", INVESTIGATE_BOMB) boom() -/obj/structure/reagent_dispensers/fueltank/boom() +/obj/structure/reagent_dispensers/fueltank/boom(var/rigtrigger = FALSE) // Prevent case where someone who rigged the tank is blamed for the explosion when the rig isn't what triggered the explosion + if(rigtrigger == TRUE) // If the explosion is triggered by an assembly holder + message_admins("A fueltank, last rigged by [lastrigger], exploded at [COORD(loc)]") // Then admin is informed of the last person who rigged the fuel tank + log_game("A fueltank, last rigged by [lastrigger], exploded at [COORD(loc)]") + investigate_log("A fueltank, last rigged by [lastrigger], exploded at [COORD(loc)]", INVESTIGATE_BOMB) explosion(loc, 0, 1, 5, 7, 10, flame_range = 5) qdel(src) @@ -111,6 +117,7 @@ usr.visible_message("[usr] detaches [rig] from [src].", "You detach [rig] from [src].") rig.forceMove(get_turf(usr)) rig = null + lastrigger = null overlays.Cut() /obj/structure/reagent_dispensers/fueltank/attackby(obj/item/I, mob/user, params) @@ -124,9 +131,11 @@ var/obj/item/assembly_holder/H = I if(istype(H.a_left, /obj/item/assembly/igniter) || istype(H.a_right, /obj/item/assembly/igniter)) - msg_admin_attack("[key_name_admin(user)] rigged a fueltank for explosion (JMP)") - log_game("[key_name(user)] rigged fueltank a fueltank for explosion at [loc.x], [loc.y], [loc.z]") + msg_admin_attack("[key_name_admin(user)] rigged [src.name] with [I.name] for explosion (JMP)", ATKLOG_FEW) + log_game("[key_name(user)] rigged [src.name] with [I.name] for explosion at [COORD(loc)]") + investigate_log("[key_name(user)] rigged [src.name] with [I.name] for explosion at [COORD(loc)]", INVESTIGATE_BOMB) + lastrigger = "[key_name(user)]" rig = H user.drop_item() H.forceMove(src) @@ -146,13 +155,14 @@ to_chat(user, "Your [W] is already full!") return reagents.trans_to(W, W.max_fuel) - user.visible_message("[user] refills \his [W].", "You refill [W].") + user.visible_message("[user] refills [user.p_their()] [W].", "You refill [W].") playsound(src, 'sound/effects/refill.ogg', 50, 1) W.update_icon() else - user.visible_message("[user] catastrophically fails at refilling \his [W]!", "That was stupid of you.") - message_admins("[key_name_admin(user)] triggered a fueltank explosion.") - log_game("[key_name(user)] triggered a fueltank explosion.") + user.visible_message("[user] catastrophically fails at refilling [user.p_their()] [W]!", "That was stupid of you.") + message_admins("[key_name_admin(user)] triggered a fueltank explosion at [COORD(loc)]") + log_game("[key_name(user)] triggered a fueltank explosion at [COORD(loc)]") + investigate_log("[key_name(user)] triggered a fueltank explosion at [COORD(loc)]", INVESTIGATE_BOMB) boom() else ..() diff --git a/code/modules/recycling/belt-placer.dm b/code/modules/recycling/belt-placer.dm new file mode 100644 index 00000000000..1b473bef814 --- /dev/null +++ b/code/modules/recycling/belt-placer.dm @@ -0,0 +1,46 @@ +/obj/item/storage/conveyor //Stores conveyor belts, click floor to make belt, use a conveyor switch on this to link all belts to that lever. + name = "conveyor belt placer" + desc = "This device facilitates the rapid deployment of conveyor belts." + icon_state = "belt_placer" + item_state = "belt_placer" + w_class = WEIGHT_CLASS_BULKY //Because belts are large things, you know? + can_hold = list(/obj/item/conveyor_construct) + flags = CONDUCT + max_w_class = WEIGHT_CLASS_BULKY + max_combined_w_class = 28 //7 belts + allow_quick_gather = TRUE + allow_quick_empty = TRUE + display_contents_with_number = TRUE + use_to_pickup = TRUE + origin_tech = "engineering=1" + +/obj/item/storage/conveyor/bluespace + name = "bluespace conveyor belt placer" + desc = "This device facilitates the rapid deployment of conveyor belts. It utilises bluespace in order to hold many more belts than its regular counterpart." + icon_state = "bluespace_belt_placer" + item_state = "bluespace_belt_placer" + w_class = WEIGHT_CLASS_NORMAL + storage_slots = 50 + max_combined_w_class = 200 //50 belts + origin_tech = "engineering=2;bluespace=1" + +/obj/item/storage/conveyor/attackby(obj/item/I, mob/user, params) //So we can link belts en masse + if(istype(I, /obj/item/conveyor_switch_construct)) + var/obj/item/conveyor_switch_construct/S = I + var/linked = FALSE //For nice message + for(var/obj/item/conveyor_construct/C in src) + C.id = S.id + linked = TRUE + if(linked) + to_chat(user, "All belts in [src] linked with [S].") + else + return ..() + +/obj/item/storage/conveyor/afterattack(atom/A, mob/user, proximity) + if(!proximity) + return + var/obj/item/conveyor_construct/C = locate() in src + if(!C) + to_chat(user, "There are no belts in [src].") + else + C.afterattack(A, user, proximity) diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index ba193744467..3658846a696 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -250,8 +250,6 @@ var/obj/structure/disposaloutlet/P = new /obj/structure/disposaloutlet(src.loc) src.transfer_fingerprints_to(P) P.dir = dir - var/obj/structure/disposalpipe/trunk/Trunk = CP - Trunk.linked = P else if(ptype==8) // Disposal outlet diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 3907ed052a6..00b3b06a3a5 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -36,19 +36,19 @@ update() /obj/machinery/disposal/proc/trunk_check() - trunk = locate() in src.loc - if(!trunk) + var/obj/structure/disposalpipe/trunk/T = locate() in loc + if(!T) mode = 0 flush = 0 else mode = initial(mode) flush = initial(flush) - trunk.linked = src // link the pipe trunk to self + T.nicely_link_to_other_stuff(src) /obj/machinery/disposal/Destroy() eject() if(trunk) - trunk.linked = null + trunk.remove_trunk_links() return ..() /obj/machinery/disposal/Initialize() @@ -133,7 +133,7 @@ for(var/mob/C in viewers(src)) C.show_message("[GM.name] has been placed in the [src] by [user].", 3) qdel(G) - add_attack_logs(usr, GM, "Disposal'ed", !!GM.ckey) + add_attack_logs(usr, GM, "Disposal'ed", !!GM.ckey ? null : ATKLOG_ALL) return if(!I) @@ -179,7 +179,7 @@ msg = "[user.name] stuffs [target.name] into the [src]!" to_chat(user, "You stuff [target.name] into the [src]!") - add_attack_logs(user, target, "Disposal'ed", !!target.ckey) + add_attack_logs(user, target, "Disposal'ed", !!target.ckey ? null : ATKLOG_ALL) else return target.forceMove(src) @@ -1149,24 +1149,39 @@ if(D.trunk == src) D.go_out() D.trunk = null - - linked = null + remove_trunk_links() return ..() /obj/structure/disposalpipe/trunk/proc/getlinked() - linked = null var/obj/machinery/disposal/D = locate() in src.loc if(D) - linked = D - if(!D.trunk) - D.trunk = src - + nicely_link_to_other_stuff(D) + return var/obj/structure/disposaloutlet/O = locate() in src.loc if(O) - linked = O + nicely_link_to_other_stuff(O) - update() - return +/obj/structure/disposalpipe/trunk/proc/remove_trunk_links() //disposals is well-coded + if(!linked) + return + else if(istype(linked, /obj/machinery/disposal)) //jk lol + var/obj/machinery/disposal/D = linked + D.trunk = null + else if(istype(linked, /obj/structure/disposaloutlet)) //God fucking damn it + var/obj/structure/disposaloutlet/D = linked + D.linkedtrunk = null + linked = null + +/obj/structure/disposalpipe/trunk/proc/nicely_link_to_other_stuff(obj/O) + remove_trunk_links() //Breaks the connections between this trunk and the linked machinery so we don't get sent to nullspace or some shit like that + if(istype(O, /obj/machinery/disposal)) + var/obj/machinery/disposal/D = O + linked = D + D.trunk = src + else if(istype(O, /obj/structure/disposaloutlet)) + var/obj/structure/disposaloutlet/D = O + linked = D + D.linkedtrunk = src // Override attackby so we disallow trunkremoval when somethings ontop /obj/structure/disposalpipe/trunk/attackby(var/obj/item/I, var/mob/user, params) @@ -1271,77 +1286,72 @@ var/obj/structure/disposalpipe/trunk/linkedtrunk var/mode = 0 - New() - ..() - - spawn(1) - target = get_ranged_target_turf(src, dir, 10) - - - linkedtrunk = locate() in src.loc - if(linkedtrunk) - linkedtrunk.linked = src +/obj/structure/disposaloutlet/New() + ..() + spawn(1) + target = get_ranged_target_turf(src, dir, 10) + var/obj/structure/disposalpipe/trunk/T = locate() in loc + if(T) + T.nicely_link_to_other_stuff(src) // expel the contents of the holder object, then delete it // called when the holder exits the outlet - proc/expel(var/obj/structure/disposalholder/H, animation = 1) - - if(animation) - flick("outlet-open", src) - playsound(src, 'sound/machines/warning-buzzer.ogg', 50, 0, 0) - sleep(20) //wait until correct animation frame - playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0) - - if(H) - for(var/atom/movable/AM in H) - AM.forceMove(loc) - AM.pipe_eject(dir) - if(!istype(AM,/mob/living/silicon/robot/drone)) //Drones keep smashing windows from being fired out of chutes. Bad for the station. ~Z - spawn(5) - if(AM) - AM.throw_at(target, 3, 1) - H.vent_gas(src.loc) - qdel(H) +/obj/structure/disposaloutlet/proc/expel(var/obj/structure/disposalholder/H, animation = 1) + if(animation) + flick("outlet-open", src) + playsound(src, 'sound/machines/warning-buzzer.ogg', 50, 0, 0) + sleep(20) //wait until correct animation frame + playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0) + if(H) + for(var/atom/movable/AM in H) + AM.forceMove(loc) + AM.pipe_eject(dir) + if(!istype(AM,/mob/living/silicon/robot/drone)) //Drones keep smashing windows from being fired out of chutes. Bad for the station. ~Z + spawn(5) + if(AM) + AM.throw_at(target, 3, 1) + H.vent_gas(src.loc) + qdel(H) - attackby(var/obj/item/I, var/mob/user, params) - if(!I || !user) +/obj/structure/disposaloutlet/attackby(var/obj/item/I, var/mob/user, params) + if(!I || !user) + return + src.add_fingerprint(user) + if(istype(I, /obj/item/screwdriver)) + if(mode==0) + mode=1 + playsound(src.loc, I.usesound, 50, 1) + to_chat(user, "You remove the screws around the power connection.") + return + else if(mode==1) + mode=0 + playsound(src.loc, I.usesound, 50, 1) + to_chat(user, "You attach the screws around the power connection.") + return + else if(istype(I,/obj/item/weldingtool) && mode==1) + var/obj/item/weldingtool/W = I + if(W.remove_fuel(0,user)) + playsound(src.loc, W.usesound, 100, 1) + to_chat(user, "You start slicing the floorweld off the disposal outlet.") + if(do_after(user, 20 * W.toolspeed, target = src)) + if(!src || !W.isOn()) return + to_chat(user, "You sliced the floorweld off the disposal outlet.") + var/obj/structure/disposalconstruct/C = new (src.loc) + src.transfer_fingerprints_to(C) + C.ptype = 7 // 7 = outlet + C.update() + C.anchored = 1 + C.density = 1 + qdel(src) + return + else + to_chat(user, "You need more welding fuel to complete this task.") return - src.add_fingerprint(user) - if(istype(I, /obj/item/screwdriver)) - if(mode==0) - mode=1 - playsound(src.loc, I.usesound, 50, 1) - to_chat(user, "You remove the screws around the power connection.") - return - else if(mode==1) - mode=0 - playsound(src.loc, I.usesound, 50, 1) - to_chat(user, "You attach the screws around the power connection.") - return - else if(istype(I,/obj/item/weldingtool) && mode==1) - var/obj/item/weldingtool/W = I - if(W.remove_fuel(0,user)) - playsound(src.loc, W.usesound, 100, 1) - to_chat(user, "You start slicing the floorweld off the disposal outlet.") - if(do_after(user, 20 * W.toolspeed, target = src)) - if(!src || !W.isOn()) return - to_chat(user, "You sliced the floorweld off the disposal outlet.") - var/obj/structure/disposalconstruct/C = new (src.loc) - src.transfer_fingerprints_to(C) - C.ptype = 7 // 7 = outlet - C.update() - C.anchored = 1 - C.density = 1 - qdel(src) - return - else - to_chat(user, "You need more welding fuel to complete this task.") - return /obj/structure/disposaloutlet/Destroy() if(linkedtrunk) - linkedtrunk.linked = null + linkedtrunk.remove_trunk_links() return ..() // called when movable is expelled from a disposal pipe or outlet diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index b7919662514..5cb51863851 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -800,6 +800,14 @@ build_path = /obj/item/conveyor_switch_construct category = list("initial", "Construction") +/datum/design/conveyor_belt_placer + name = "Conveyor Belt Placer" + id = "conveyor_belt_placer" + build_type = AUTOLATHE + materials = list(MAT_METAL = 5000, MAT_GLASS = 1000) //This thing doesn't need to be very resource-intensive as the belts are already expensive + build_path = /obj/item/storage/conveyor + category = list("initial", "Construction") + /datum/design/laptop name = "Laptop Frame" id = "laptop" diff --git a/code/modules/research/designs/bluespace_designs.dm b/code/modules/research/designs/bluespace_designs.dm index 3c555c40849..cf6e4b53882 100644 --- a/code/modules/research/designs/bluespace_designs.dm +++ b/code/modules/research/designs/bluespace_designs.dm @@ -51,13 +51,23 @@ build_path = /obj/item/storage/bag/ore/holding category = list("Bluespace") +/datum/design/bluespace_belt_holder + name = "Bluespace Conveyor Belt Placer" + desc = "This device facilitates the rapid deployment of conveyor belts. This one is powered by bluespace." + id = "bluespace_belt_holder" + req_tech = list("materials" = 1, "engineering" = 3, "bluespace" = 3) + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_GLASS = 1000, MAT_SILVER = 500) //Costs similar materials to the basic one, but this one needs silver + build_path = /obj/item/storage/conveyor/bluespace + category = list("Bluespace") + /datum/design/telepad_beacon name = "Telepad Beacon" desc = "Use to warp in a cargo telepad." id = "telepad_beacon" req_tech = list("programming" = 5, "bluespace" = 4, "engineering" = 4, "plasmatech" = 4) build_type = PROTOLATHE - materials = list (MAT_METAL = 2000, MAT_GLASS = 1750, MAT_SILVER = 500) + materials = list(MAT_METAL = 2000, MAT_GLASS = 1750, MAT_SILVER = 500) build_path = /obj/item/telepad_beacon category = list("Bluespace") @@ -67,6 +77,6 @@ id = "beacon" req_tech = list("bluespace" = 1) build_type = PROTOLATHE - materials = list (MAT_METAL = 150, MAT_GLASS = 100) + materials = list(MAT_METAL = 150, MAT_GLASS = 100) build_path = /obj/item/radio/beacon category = list("Bluespace") diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm index 7fde20333c7..1589b78438b 100644 --- a/code/modules/research/designs/mechfabricator_designs.dm +++ b/code/modules/research/designs/mechfabricator_designs.dm @@ -1120,6 +1120,15 @@ construction_time = 350 category = list("Misc") +/datum/design/integrated_robotic_chassis + name = "Integrated Robotic Chassis" + id = "integrated_robotic_chassis" + build_type = MECHFAB + build_path = /mob/living/carbon/human/machine/created + materials = list(MAT_METAL = 40000) + construction_time = 400 + category = list("Misc") + /datum/design/ipc_cell name = "IPC Microbattery" id = "ipc_cell" diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 9d973c1ed74..638a614fc85 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -103,26 +103,26 @@ build_path = /obj/item/mass_spectrometer category = list("Medical") -/datum/design/posibrain - name = "Positronic Brain" - desc = "The latest in Artificial Intelligences." - id = "mmi_posi" +/datum/design/robotic_brain + name = "Robotic Brain" + desc = "The latest in non-sentient Artificial Intelligences." + id = "mmi_robotic" req_tech = list("programming" = 5, "biotech" = 4, "plasmatech" = 3) build_type = PROTOLATHE | MECHFAB materials = list(MAT_METAL = 1700, MAT_GLASS = 1350, MAT_GOLD = 500) //Gold, because SWAG. construction_time = 75 - build_path = /obj/item/mmi/posibrain + build_path = /obj/item/mmi/robotic_brain category = list("Misc","Medical") -/datum/design/mmi_radio - name = "Radio-Enabled Man-Machine Interface" - desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity. This one comes with a built-in radio." - id = "mmi_radio" +/datum/design/mmi_radio_upgrade + name = "Man-Machine Interface Radio Upgrade" + desc = "Enables radio capability on MMIs when either installed directly on the MMI, or through a cyborg's chassis." + id = "mmi_radio_upgrade" req_tech = list("programming" = 3, "biotech" = 2, "engineering" = 2) build_type = PROTOLATHE | MECHFAB - materials = list(MAT_METAL = 1200, MAT_GLASS = 500) - construction_time = 75 - build_path = /obj/item/mmi/radio_enabled + materials = list(MAT_METAL = 200) + construction_time = 50 + build_path = /obj/item/mmi_radio_upgrade category = list("Misc","Medical") /datum/design/nanopaste @@ -181,7 +181,7 @@ id = "scalpel_manager" req_tech = list("biotech" = 4, "materials" = 7, "magnets" = 5, "programming" = 4) build_type = PROTOLATHE - materials = list (MAT_METAL = 2000, MAT_GLASS = 1500, MAT_SILVER = 1000, MAT_GOLD = 1000, MAT_DIAMOND = 1000) + materials = list(MAT_METAL = 2000, MAT_GLASS = 1500, MAT_SILVER = 1000, MAT_GOLD = 1000, MAT_DIAMOND = 1000) build_path = /obj/item/scalpel/laser/manager category = list("Medical") @@ -271,13 +271,24 @@ build_path = /obj/item/organ/internal/cyberimp/mouth/breathing_tube category = list("Misc", "Medical") +/datum/design/cyberimp_surgical + name = "Surgical Arm Implant" + desc = "A set of surgical tools hidden behind a concealed panel on the user's arm." + id = "ci-surgey" + req_tech = list("materials" = 3, "engineering" = 3, "biotech" = 3, "programming" = 2, "magnets" = 3) + build_type = PROTOLATHE | MECHFAB + materials = list(MAT_METAL = 2500, MAT_GLASS = 1500, MAT_SILVER = 1500) + construction_time = 200 + build_path = /obj/item/organ/internal/cyberimp/arm/surgery + category = list("Misc", "Medical") + /datum/design/cyberimp_toolset name = "Toolset Arm Implant" desc = "A stripped-down version of engineering cyborg toolset, designed to be installed on subject's arm." id = "ci-toolset" req_tech = list("materials" = 3, "engineering" = 4, "biotech" = 4, "powerstorage" = 4) build_type = PROTOLATHE | MECHFAB - materials = list (MAT_METAL = 2500, MAT_GLASS = 1500, MAT_SILVER = 1500) + materials = list(MAT_METAL = 2500, MAT_GLASS = 1500, MAT_SILVER = 1500) construction_time = 200 build_path = /obj/item/organ/internal/cyberimp/arm/toolset category = list("Misc", "Medical") @@ -435,3 +446,65 @@ materials = list(MAT_METAL = 500, MAT_GLASS = 500) build_path = /obj/item/implantcase/track category = list("Medical") + +//Cybernetic organs + +/datum/design/cybernetic_eyes + name = "Cybernetic Eyes" + desc = "A cybernetic pair of eyes" + id = "cybernetic_eyes" + req_tech = list("biotech" = 4, "materials" = 4) + build_type = PROTOLATHE | MECHFAB + materials = list(MAT_METAL = 500, MAT_GLASS = 500) + build_path = /obj/item/organ/internal/eyes/cybernetic + category = list("Medical") + +/datum/design/cybernetic_liver + name = "Cybernetic Liver" + desc = "A cybernetic liver" + id = "cybernetic_liver" + req_tech = list("biotech" = 4, "materials" = 4) + build_type = PROTOLATHE | MECHFAB + materials = list(MAT_METAL = 500, MAT_GLASS = 500) + build_path = /obj/item/organ/internal/liver/cybernetic + category = list("Medical") + +/datum/design/cybernetic_kidneys + name = "Cybernetic Kidneys" + desc = "A cybernetic pair of kidneys" + id = "cybernetic_kidneys" + req_tech = list("biotech" = 4, "materials" = 4) + build_type = PROTOLATHE | MECHFAB + materials = list(MAT_METAL = 500, MAT_GLASS = 500) + build_path = /obj/item/organ/internal/kidneys/cybernetic + category = list("Medical") + +/datum/design/cybernetic_heart + name = "Cybernetic Heart" + desc = "A cybernetic heart" + id = "cybernetic_heart" + req_tech = list("biotech" = 4, "materials" = 4) + build_type = PROTOLATHE | MECHFAB + materials = list(MAT_METAL = 500, MAT_GLASS = 500) + build_path = /obj/item/organ/internal/heart/cybernetic + category = list("Medical") + +/datum/design/cybernetic_lungs + name = "Cybernetic Lungs" + desc = "A pair of cybernetic lungs." + id = "cybernetic_lungs" + req_tech = list("biotech" = 4, "materials" = 4) + build_type = PROTOLATHE | MECHFAB + materials = list(MAT_METAL = 500, MAT_GLASS = 500) + build_path = /obj/item/organ/internal/lungs/cybernetic + category = list("Medical") + +/datum/design/cybernetic_lungs_u + name = "Upgraded Cybernetic Lungs" + desc = "A pair of upgraded cybernetic lungs." + id = "cybernetic_lungs_u" + req_tech = list("biotech" = 5, "materials" = 5, "engineering" = 5) + build_type = PROTOLATHE | MECHFAB + materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 500) + build_path = /obj/item/organ/internal/lungs/cybernetic/upgraded + category = list("Medical") \ No newline at end of file diff --git a/code/modules/research/designs/smelting_designs.dm b/code/modules/research/designs/smelting_designs.dm index fe45e8dacad..a043d90fb19 100644 --- a/code/modules/research/designs/smelting_designs.dm +++ b/code/modules/research/designs/smelting_designs.dm @@ -25,6 +25,22 @@ build_path = /obj/item/stack/sheet/plasmaglass category = list("initial") +/datum/design/titaniumglass_alloy + name = "Titanium + Glass alloy" + id = "titaniumglass" + build_type = SMELTER + materials = list(MAT_TITANIUM = MINERAL_MATERIAL_AMOUNT, MAT_GLASS = MINERAL_MATERIAL_AMOUNT) + build_path = /obj/item/stack/sheet/titaniumglass + category = list("initial") + +/datum/design/plastitaniumglass_alloy + name = "Plasma + Titanium + Glass alloy" + id = "plastitaniumglass" + build_type = SMELTER + materials = list(MAT_PLASMA = MINERAL_MATERIAL_AMOUNT, MAT_TITANIUM = MINERAL_MATERIAL_AMOUNT, MAT_GLASS = MINERAL_MATERIAL_AMOUNT) + build_path = /obj/item/stack/sheet/plastitaniumglass + category = list("initial") + /datum/design/alienalloy name = "Alien Alloy" desc = "A sheet of reverse-engineered alien alloy." diff --git a/code/modules/research/xenobiology/xenobio_camera.dm b/code/modules/research/xenobiology/xenobio_camera.dm index ee884bc20a4..dcae187b028 100644 --- a/code/modules/research/xenobiology/xenobio_camera.dm +++ b/code/modules/research/xenobiology/xenobio_camera.dm @@ -22,7 +22,6 @@ desc = "A computer used for remotely handling slimes." networks = list("SS13") circuit = /obj/item/circuitboard/xenobiology - off_action = new /datum/action/innate/camera_off/xenobio var/datum/action/innate/slime_place/slime_place_action = new var/datum/action/innate/slime_pick_up/slime_up_action = new var/datum/action/innate/feed_slime/feed_slime_action = new @@ -43,23 +42,27 @@ eyeobj.icon_state = "camera_target" /obj/machinery/computer/camera_advanced/xenobio/GrantActions(mob/living/carbon/user) - off_action.target = user - off_action.Grant(user) + ..() + if(slime_up_action) + slime_up_action.target = src + slime_up_action.Grant(user) + actions += slime_up_action + + if(slime_place_action) + slime_place_action.target = src + slime_place_action.Grant(user) + actions += slime_place_action + + if(feed_slime_action) + feed_slime_action.target = src + feed_slime_action.Grant(user) + actions += feed_slime_action + + if(monkey_recycle_action) + monkey_recycle_action.target = src + monkey_recycle_action.Grant(user) + actions += monkey_recycle_action - jump_action.target = user - jump_action.Grant(user) - - slime_up_action.target = src - slime_up_action.Grant(user) - - slime_place_action.target = src - slime_place_action.Grant(user) - - feed_slime_action.target = src - feed_slime_action.Grant(user) - - monkey_recycle_action.target = src - monkey_recycle_action.Grant(user) /obj/machinery/computer/camera_advanced/xenobio/attack_hand(mob/user) @@ -87,31 +90,6 @@ return ..() -/datum/action/innate/camera_off/xenobio/Activate() - if(!target || !ishuman(target)) - return - var/mob/living/carbon/C = target - var/mob/camera/aiEye/remote/xenobio/remote_eye = C.remote_control - var/obj/machinery/computer/camera_advanced/xenobio/origin = remote_eye.origin - C.remote_view = 0 - origin.current_user = null - origin.jump_action.Remove(C) - origin.slime_place_action.Remove(C) - origin.slime_up_action.Remove(C) - origin.feed_slime_action.Remove(C) - origin.monkey_recycle_action.Remove(C) - //All of this stuff below could probably be a proc for all advanced cameras, only the action removal needs to be camera specific - remote_eye.eye_user = null - C.reset_perspective(null) - if(C.client) - C.client.images -= remote_eye.user_image - for(var/datum/camerachunk/chunk in remote_eye.visibleCameraChunks) - C.client.images -= chunk.obscured - C.remote_control = null - C.unset_machine() - src.Remove(C) - - /datum/action/innate/slime_place name = "Place Slimes" button_icon_state = "slime_down" @@ -190,7 +168,7 @@ if(cameranet.checkTurfVis(remote_eye.loc)) for(var/mob/living/carbon/human/M in remote_eye.loc) if(issmall(M) && M.stat) - M.visible_message("[M] vanishes as they are reclaimed for recycling!") + M.visible_message("[M] vanishes as [M.p_theyre()] reclaimed for recycling!") X.monkeys = round(X.monkeys + 0.2,0.1) qdel(M) else diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index d8058efbb53..35bdb18caae 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -205,7 +205,7 @@ SM.master_commander = user SM.sentience_act() to_chat(SM, "All at once it makes sense: you know what you are and who you are! Self awareness is yours!") - to_chat(SM, "You are grateful to be self aware and owe [user] a great debt. Serve [user], and assist them in completing their goals at any cost.") + to_chat(SM, "You are grateful to be self aware and owe [user] a great debt. Serve [user], and assist [user.p_them()] in completing [user.p_their()] goals at any cost.") if(SM.flags_2 & HOLOGRAM_2) //Check to see if it's a holodeck creature to_chat(SM, "You also become depressingly aware that you are not a real creature, but instead a holoform. Your existence is limited to the parameters of the holodeck.") to_chat(user, "[M] accepts the potion and suddenly becomes attentive and aware. It worked!") @@ -426,7 +426,7 @@ G.loc = src.loc G.key = ghost.key add_attack_logs(user, G, "Summoned as a golem") - to_chat(G, "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist them in completing their goals at any cost.") + to_chat(G, "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist [user.p_them()] in completing [user.p_their()] goals at any cost.") qdel(src) /obj/effect/golemrune/Topic(href,href_list) diff --git a/code/modules/scripting/Implementations/Telecomms.dm b/code/modules/scripting/Implementations/Telecomms.dm index 16640a8b4c8..a24a9522b38 100644 --- a/code/modules/scripting/Implementations/Telecomms.dm +++ b/code/modules/scripting/Implementations/Telecomms.dm @@ -24,14 +24,22 @@ interpreter.GC() +//temp +/datum/TCS_Compiler + var/datum/n_scriptOptions/nS_Options/options + var/datum/n_Scanner/nS_Scanner/scanner + var/list/tokens + var/datum/n_Parser/nS_Parser/parser + var/datum/node/BlockDefinition/GlobalBlock/program + /* -- Compile a raw block of text -- */ -/datum/TCS_Compiler/proc/Compile(code as message) - var/datum/n_scriptOptions/nS_Options/options = new() - var/datum/n_Scanner/nS_Scanner/scanner = new(code, options) - var/list/tokens = scanner.Scan() - var/datum/n_Parser/nS_Parser/parser = new(tokens, options) - var/datum/node/BlockDefinition/GlobalBlock/program = parser.Parse() +/datum/TCS_Compiler/proc/Compile(list/code) + options = new() + scanner = new(code, options) + tokens = scanner.Scan() + parser = new(tokens, options) + program = parser.Parse() var/list/returnerrors = list() diff --git a/code/modules/scripting/Interpreter/Interpreter.dm b/code/modules/scripting/Interpreter/Interpreter.dm index 79802ff2fa5..c24e9ba5e3a 100644 --- a/code/modules/scripting/Interpreter/Interpreter.dm +++ b/code/modules/scripting/Interpreter/Interpreter.dm @@ -184,6 +184,8 @@ Runs each statement in a block of code. else RaiseError(new/datum/runtimeError/UnknownInstruction()) + CHECK_TICK + if(status) break diff --git a/code/modules/scripting/Options.dm b/code/modules/scripting/Options.dm index b27acff91d3..be471756359 100644 --- a/code/modules/scripting/Options.dm +++ b/code/modules/scripting/Options.dm @@ -36,11 +36,12 @@ File: Options if(!CanStartID(id)) //don't need to grab first char in id, since text2ascii does it automatically return 0 - if(length(id) == 1) + var/list/charmap = string2charlist(id) + if(charmap.len == 1) return 1 - for(var/i=2 to length(id)) - if(!IsValidIDChar(copytext(id, i, i + 1))) + for(var/i = 2 to charmap.len) + if(!IsValidIDChar(charmap[i])) return 0 return 1 diff --git a/code/modules/scripting/Scanner/Scanner.dm b/code/modules/scripting/Scanner/Scanner.dm index 011621c8ea8..da6a2c04803 100644 --- a/code/modules/scripting/Scanner/Scanner.dm +++ b/code/modules/scripting/Scanner/Scanner.dm @@ -6,7 +6,7 @@ An object responsible for breaking up source code into tokens for use by the parser. */ /datum/n_Scanner - var/code + var/list/code /* Var: errors A list of fatal errors found by the scanner. If there are any items in this list, then it is not safe to parse the returned tokens. @@ -25,7 +25,7 @@ Proc: LoadCode Loads source code. */ -/datum/n_Scanner/proc/LoadCode(var/c) +/datum/n_Scanner/proc/LoadCode(var/list/c) code=c /* @@ -100,24 +100,23 @@ code - The source code to tokenize. options - An object used to configure the scanner. */ -/datum/n_Scanner/nS_Scanner/New(var/code, var/datum/n_scriptOptions/nS_Options/options) +/datum/n_Scanner/nS_Scanner/New(var/list/c, var/datum/n_scriptOptions/nS_Options/options) . = ..() ignore += ascii2text(13) //Carriage return delim += ignore + options.symbols + end_stmt + string_delim src.options = options - LoadCode(code) + LoadCode(c) /datum/n_Scanner/nS_Scanner/Scan() //Creates a list of tokens from source code var/list/tokens = new - for(, src.codepos <= length(code), src.codepos++) - - var/char = copytext(code, codepos, codepos + 1) - var/nextchar = copytext(code, codepos + 1, codepos + 2) + for(, src.codepos <= code.len, src.codepos++) + var/char = code[codepos] + var/nextchar = TCOMMS_SAFE_INDEX(code, codepos + 1) if(char == "\n") line++ linepos = codepos - if(ignore.Find(char)) + if(char in ignore) continue else if(char == "/" && (nextchar == "*" || nextchar == "/")) @@ -139,6 +138,7 @@ else if(options.symbols.Find(char)) tokens += ReadSymbol() + CHECK_TICK codepos = initial(codepos) line = initial(line) @@ -155,12 +155,12 @@ */ /datum/n_Scanner/nS_Scanner/proc/ReadString(start) var/buf - for(, codepos <= length(code), codepos++)//codepos to length(code)) - var/char = copytext(code, codepos, codepos + 1) + for(, codepos <= code.len, codepos++)//codepos to length(code)) + var/char = code[codepos] switch(char) if("\\") //Backslash (\) encountered in string codepos++ //Skip next character in string, since it was escaped by a backslash - char = copytext(code, codepos, codepos+1) + char = TCOMMS_SAFE_INDEX(code, codepos) switch(char) if("\\") //Double backslash buf += "\\" @@ -190,12 +190,14 @@ Reads characters separated by an item in into a token. */ /datum/n_Scanner/nS_Scanner/proc/ReadWord() - var/char = copytext(code, codepos, codepos + 1) + var/char = code[codepos] var/buf - while(!delim.Find(char) && codepos <= length(code)) + while(!delim.Find(char)) buf += char - char = copytext(code, ++codepos, codepos + 1) + if(++codepos > code.len) break + char = code[codepos] + codepos-- //allow main Scan() proc to read the delimiter if(options.keywords.Find(buf)) return new/datum/token/keyword(buf, line, COL) @@ -207,13 +209,13 @@ Reads a symbol into a token. */ /datum/n_Scanner/nS_Scanner/proc/ReadSymbol() - var/char=copytext(code, codepos, codepos + 1) + var/char = code[codepos] var/buf while(options.symbols.Find(buf + char)) buf += char - if(++codepos > length(code)) break - char = copytext(code, codepos, codepos + 1) + if(++codepos > code.len) break + char = code[codepos] codepos-- //allow main Scan() proc to read the next character return new /datum/token/symbol(buf, line, COL) @@ -223,7 +225,7 @@ Reads a number into a token. */ /datum/n_Scanner/nS_Scanner/proc/ReadNumber() - var/char = copytext(code, codepos, codepos + 1) + var/char = code[codepos] var/buf var/dec = 0 @@ -233,7 +235,7 @@ buf += char codepos++ - char = copytext(code, codepos, codepos + 1) + char = TCOMMS_SAFE_INDEX(code, codepos) var/datum/token/number/T = new(buf, line, COL) if(isnull(text2num(buf))) @@ -249,8 +251,8 @@ */ /datum/n_Scanner/nS_Scanner/proc/ReadComment() - var/char = copytext(code, codepos, codepos + 1) - var/nextchar = copytext(code, codepos + 1, codepos + 2) + var/char = code[codepos] + var/nextchar = TCOMMS_SAFE_INDEX(code, codepos + 1) var/charstring = char + nextchar var/comm = 1 // 1: single-line comment @@ -262,23 +264,23 @@ comm = 2 // starts a multi-line comment while(comm) - if(++codepos > length(code)) + if(++codepos > code.len) break if(expectedend) // ending statement expected... - char = copytext(code, codepos, codepos + 1) + char = code[codepos] if(char == "/") // ending statement found - beak the comment comm = 0 break if(comm == 2) // multi-line comments are broken by ending statements - char = copytext(code, codepos, codepos + 1) + char = code[codepos] if(char == "*") expectedend = 1 continue else - char = copytext(code, codepos, codepos + 1) + char = code[codepos] if(char == "\n") comm = 0 break diff --git a/code/modules/scripting/__defines.dm b/code/modules/scripting/__defines.dm new file mode 100644 index 00000000000..52f30e68fdc --- /dev/null +++ b/code/modules/scripting/__defines.dm @@ -0,0 +1 @@ +#define TCOMMS_SAFE_INDEX(list, index) list.len > index ? list[index] : null diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index c8f36cfa37e..54f4836ff5b 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -1,4 +1,5 @@ //use this define to highlight docking port bounding boxes (ONLY FOR DEBUG USE) +// also uncomment the #undef at the bottom of the file //#define DOCKING_PORT_HIGHLIGHT //NORTH default dir @@ -909,7 +910,7 @@ var/global/trade_dockrequest_timelimit = 0 shuttleId = "trade_sol" docking_request_message = "A trading ship of Sol origin has requested docking aboard the NSS Cyberiad for trading. This request can be accepted or denied using a communications console." -#undef DOCKING_PORT_HIGHLIGHT +//#undef DOCKING_PORT_HIGHLIGHT /turf/proc/copyTurf(turf/T) diff --git a/code/modules/space_management/level_traits.dm b/code/modules/space_management/level_traits.dm index ae5d6447aae..39b584df64d 100644 --- a/code/modules/space_management/level_traits.dm +++ b/code/modules/space_management/level_traits.dm @@ -1,62 +1,63 @@ /proc/is_level_reachable(z) - return check_level_trait(z, REACHABLE) + return check_level_trait(z, REACHABLE) /proc/is_station_level(z) - return check_level_trait(z, STATION_LEVEL) + return check_level_trait(z, STATION_LEVEL) /proc/is_station_contact(z) - return check_level_trait(z, STATION_CONTACT) + return check_level_trait(z, STATION_CONTACT) /proc/is_teleport_allowed(z) - return !check_level_trait(z, BLOCK_TELEPORT) + return !check_level_trait(z, BLOCK_TELEPORT) /proc/is_admin_level(z) - return check_level_trait(z, ADMIN_LEVEL) + return check_level_trait(z, ADMIN_LEVEL) /proc/is_away_level(z) - return check_level_trait(z, AWAY_LEVEL) + return check_level_trait(z, AWAY_LEVEL) /proc/is_mining_level(z) - return check_level_trait(z, ORE_LEVEL) + return check_level_trait(z, ORE_LEVEL) /proc/is_ai_allowed(z) - return check_level_trait(z, AI_OK) + return check_level_trait(z, AI_OK) /proc/level_blocks_magic(z) - return check_level_trait(z, IMPEDES_MAGIC) + return check_level_trait(z, IMPEDES_MAGIC) /proc/level_boosts_signal(z) - return check_level_trait(z, BOOSTS_SIGNAL) + return check_level_trait(z, BOOSTS_SIGNAL) // Used for the nuke disk, or for checking if players survived through xenos /proc/is_secure_level(z) - var/secure = check_level_trait(z, STATION_LEVEL) - if(!secure) - // This is to allow further admin levels later, other than centcomm - secure = (z == level_name_to_num(CENTCOMM)) - return secure + var/secure = check_level_trait(z, STATION_LEVEL) + if(!secure) + // This is to allow further admin levels later, other than centcomm + secure = (z == level_name_to_num(CENTCOMM)) + return secure var/list/default_map_traits = MAP_TRANSITION_CONFIG + /proc/check_level_trait(z, trait) - if(!z) - return 0 // If you're nowhere, you have no traits - var/list/trait_list - if(space_manager.initialized) - var/datum/space_level/S = space_manager.get_zlev(z) - trait_list = S.flags - else - trait_list = default_map_traits[z] - trait_list = trait_list["attributes"] - return (trait in trait_list) + if(!z) + return 0 // If you're nowhere, you have no traits + var/list/trait_list + if(space_manager.initialized) + var/datum/space_level/S = space_manager.get_zlev(z) + trait_list = S.flags + else + trait_list = default_map_traits[z] + trait_list = trait_list["attributes"] + return (trait in trait_list) /proc/levels_by_trait(trait) - var/list/result = list() - for(var/A in space_manager.z_list) - var/datum/space_level/S = space_manager.z_list[A] - if(trait in S.flags) - result |= S - return result + var/list/result = list() + for(var/A in space_manager.z_list) + var/datum/space_level/S = space_manager.z_list[A] + if(trait in S.flags) + result |= S.zpos + return result /proc/level_name_to_num(name) - var/datum/space_level/S = space_manager.get_zlev_by_name(name) - return S.zpos + var/datum/space_level/S = space_manager.get_zlev_by_name(name) + return S.zpos \ No newline at end of file diff --git a/code/modules/space_management/zlevel_manager.dm b/code/modules/space_management/zlevel_manager.dm index 087a70657ed..acb1cf5c0a0 100644 --- a/code/modules/space_management/zlevel_manager.dm +++ b/code/modules/space_management/zlevel_manager.dm @@ -12,6 +12,8 @@ var/global/datum/zlev_manager/space_manager = new var/datum/spacewalk_grid/linkage_map var/initialized = 0 + var/list/areas_in_z = list() + // Populate our space level list // and prepare space transitions /datum/zlev_manager/proc/initialize() @@ -166,4 +168,4 @@ var/global/datum/zlev_manager/space_manager = new var/datum/space_level/heap/heap = z_list["[C.zpos]"] if(!istype(heap)) throw EXCEPTION("Attempted to free chunk at invalid z-level ([C.x],[C.y],[C.zpos]) [C.width]x[C.height]") - heap.free(C) + heap.free(C) \ No newline at end of file diff --git a/code/modules/spacepods/equipment.dm b/code/modules/spacepods/equipment.dm index b845404fa35..52273af71fe 100644 --- a/code/modules/spacepods/equipment.dm +++ b/code/modules/spacepods/equipment.dm @@ -2,6 +2,7 @@ if(my_atom.next_firetime > world.time) to_chat(usr, "Your weapons are recharging.") return + my_atom.next_firetime = world.time + fire_delay var/turf/firstloc var/turf/secondloc if(!my_atom.equipment_system || !my_atom.equipment_system.weapon_system) @@ -41,7 +42,6 @@ projone.dumbfire(my_atom.dir) projtwo.dumbfire(my_atom.dir) sleep(2) - my_atom.next_firetime = world.time + fire_delay /datum/spacepod/equipment var/obj/spacepod/my_atom diff --git a/code/modules/spacepods/spacepod.dm b/code/modules/spacepods/spacepod.dm index 794e5f69bfe..24123d52fc0 100644 --- a/code/modules/spacepods/spacepod.dm +++ b/code/modules/spacepods/spacepod.dm @@ -1,6 +1,6 @@ #define DAMAGE 1 #define FIRE 2 -#define LIGHT 1 +#define POD_LIGHT 1 #define WINDOW 2 #define RIM 3 #define PAINT 4 @@ -78,7 +78,7 @@ var/part = input(user, "Choose part", null) as null|anything in list("Lights","Rim","Paint","Windows") switch(part) if("Lights") - part_type = LIGHT + part_type = POD_LIGHT if("Rim") part_type = RIM if("Paint") @@ -101,7 +101,7 @@ pod_overlays[FIRE] = image(icon, icon_state="pod_fire") if(!pod_paint_effect) pod_paint_effect = new/list(4) - pod_paint_effect[LIGHT] = image(icon,icon_state = "LIGHTS") + pod_paint_effect[POD_LIGHT] = image(icon,icon_state = "LIGHTS") pod_paint_effect[WINDOW] = image(icon,icon_state = "Windows") pod_paint_effect[RIM] = image(icon,icon_state = "RIM") pod_paint_effect[PAINT] = image(icon,icon_state = "PAINT") @@ -162,7 +162,7 @@ if(!pod_paint_effect) pod_paint_effect = new/list(4) - pod_paint_effect[LIGHT] = image(icon,icon_state = "LIGHTS") + pod_paint_effect[POD_LIGHT] = image(icon,icon_state = "LIGHTS") pod_paint_effect[WINDOW] = image(icon,icon_state = "Windows") pod_paint_effect[RIM] = image(icon,icon_state = "RIM") pod_paint_effect[PAINT] = image(icon,icon_state = "PAINT") @@ -170,9 +170,9 @@ if(has_paint) var/image/to_add - if(!isnull(pod_paint_effect[LIGHT])) - to_add = pod_paint_effect[LIGHT] - to_add.color = colors[LIGHT] + if(!isnull(pod_paint_effect[POD_LIGHT])) + to_add = pod_paint_effect[POD_LIGHT] + to_add.color = colors[POD_LIGHT] overlays += to_add if(!isnull(pod_paint_effect[WINDOW])) to_add = pod_paint_effect[WINDOW] @@ -812,11 +812,18 @@ obj/spacepod/proc/add_equipment(mob/user, var/obj/item/spacepod_equipment/SPE, v if(!istype(user)) return - if(usr.incapacitated()) // unconscious and restrained people can't let themselves out + if(usr.stat != CONSCIOUS) // unconscious people can't let themselves out return occupant_sanity_check() + if(usr.restrained()) + to_chat(usr, "You attempt to stumble out of the [src]. This will take two minutes.") + if(pilot) + to_chat(pilot, "[usr] is trying to escape the [src].") + if(!do_after(usr, 1200, target = src)) + return + if(user == pilot) user.forceMove(get_turf(src)) pilot = null @@ -1077,6 +1084,6 @@ obj/spacepod/proc/add_equipment(mob/user, var/obj/item/spacepod_equipment/SPE, v #undef DAMAGE #undef FIRE #undef WINDOW -#undef LIGHT +#undef POD_LIGHT #undef RIM #undef PAINT diff --git a/code/modules/surgery/bones.dm b/code/modules/surgery/bones.dm index dfe2c0feb8c..fb45bddb9ba 100644 --- a/code/modules/surgery/bones.dm +++ b/code/modules/surgery/bones.dm @@ -19,7 +19,7 @@ var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 if(affected.cannot_break) return 0 @@ -43,13 +43,13 @@ /datum/surgery_step/glue_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - return affected && !(affected.status & ORGAN_ROBOT) && !(affected.cannot_break) + return affected && !affected.is_robotic() && !(affected.cannot_break) /datum/surgery_step/glue_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts applying medication to the damaged bones in [target]'s [affected.name] with \the [tool]." , \ "You start applying medication to the damaged bones in [target]'s [affected.name] with \the [tool].") - target.custom_pain("Something in your [affected.name] is causing you a lot of pain!",1) + target.custom_pain("Something in your [affected.name] is causing you a lot of pain!") ..() /datum/surgery_step/glue_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -77,13 +77,13 @@ /datum/surgery_step/set_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - return affected && !(affected.status & ORGAN_ROBOT) + return affected && !affected.is_robotic() /datum/surgery_step/set_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] is beginning to set the bone in [target]'s [affected.name] in place with \the [tool]." , \ "You are beginning to set the bone in [target]'s [affected.name] in place with \the [tool].") - target.custom_pain("The pain in your [affected.name] is going to make you pass out!",1) + target.custom_pain("The pain in your [affected.name] is going to make you pass out!") ..() /datum/surgery_step/set_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -116,7 +116,7 @@ /datum/surgery_step/mend_skull/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - return affected && !(affected.status & ORGAN_ROBOT) && affected.limb_name == "head" + return affected && !affected.is_robotic() && affected.limb_name == "head" /datum/surgery_step/mend_skull/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] is beginning piece together [target]'s skull with \the [tool]." , \ @@ -136,7 +136,7 @@ "Your hand slips, damaging [target]'s face with \the [tool]!") var/obj/item/organ/external/head/h = affected h.receive_damage(10) - h.disfigured = 1 + h.disfigure() return 0 /datum/surgery_step/finish_bone @@ -153,7 +153,7 @@ /datum/surgery_step/finish_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - return affected && !(affected.status & ORGAN_ROBOT) + return affected && !affected.is_robotic() /datum/surgery_step/finish_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) diff --git a/code/modules/surgery/cavity_implant.dm b/code/modules/surgery/cavity_implant.dm index 0e88927e1a2..16d1b18dc1b 100644 --- a/code/modules/surgery/cavity_implant.dm +++ b/code/modules/surgery/cavity_implant.dm @@ -23,7 +23,7 @@ var/obj/item/organ/external/affected = target.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 return 1 @@ -33,7 +33,7 @@ var/obj/item/organ/external/affected = target.get_organ(user.zone_sel.selecting) if(!affected) return 0 - return (affected.status & ORGAN_ROBOT) + return affected.is_robotic() /datum/surgery_step/cavity priority = 1 @@ -78,7 +78,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts making some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].", \ "You start making some space inside [target]'s [get_cavity(affected)] cavity with \the [tool]." ) - target.custom_pain("The pain in your chest is living hell!",1) + target.custom_pain("The pain in your chest is living hell!") ..() /datum/surgery_step/cavity/make_space/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -104,7 +104,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts mending [target]'s [get_cavity(affected)] cavity wall with \the [tool].", \ "You start mending [target]'s [get_cavity(affected)] cavity wall with \the [tool]." ) - target.custom_pain("The pain in your chest is living hell!",1) + target.custom_pain("The pain in your chest is living hell!") ..() /datum/surgery_step/cavity/close_space/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -155,7 +155,7 @@ else //no internal items..but we still need a message! user.visible_message("[user] checks for items in [target]'s [target_zone].", "You check for items in [target]'s [target_zone]...") - target.custom_pain("The pain in your [target_zone] is living hell!",1) + target.custom_pain("The pain in your [target_zone] is living hell!") ..() /datum/surgery_step/cavity/place_item/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -187,10 +187,10 @@ else user.visible_message(" [user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.", \ " You put \the [tool] inside [target]'s [get_cavity(affected)] cavity." ) - if((tool.w_class > get_max_wclass(affected)/2 && prob(50) && !(affected.status & ORGAN_ROBOT))) + if((tool.w_class > get_max_wclass(affected) / 2 && prob(50) && !affected.is_robotic())) to_chat(user, " You tear some vessels trying to fit the object in the cavity.") affected.internal_bleeding = TRUE - affected.owner.custom_pain("You feel something rip in your [affected.name]!", 1) + affected.owner.custom_pain("You feel something rip in your [affected.name]!") user.drop_item() affected.hidden = tool tool.forceMove(affected) diff --git a/code/modules/surgery/encased.dm b/code/modules/surgery/encased.dm index eddf116a45d..e1402083dbd 100644 --- a/code/modules/surgery/encased.dm +++ b/code/modules/surgery/encased.dm @@ -15,7 +15,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) if(!affected) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 return 1 @@ -38,7 +38,7 @@ user.visible_message("[user] begins to cut through [target]'s [affected.encased] with \the [tool].", \ "You begin to cut through [target]'s [affected.encased] with \the [tool].") - target.custom_pain("Something hurts horribly in your [affected.name]!",1) + target.custom_pain("Something hurts horribly in your [affected.name]!") ..() /datum/surgery_step/open_encased/saw/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -86,7 +86,7 @@ var/msg = "[user] starts to force open the [affected.encased] in [target]'s [affected.name] with \the [tool]." var/self_msg = "You start to force open the [affected.encased] in [target]'s [affected.name] with \the [tool]." user.visible_message(msg, self_msg) - target.custom_pain("Something hurts horribly in your [affected.name]!",1) + target.custom_pain("Something hurts horribly in your [affected.name]!") ..() /datum/surgery_step/open_encased/retract/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -137,7 +137,7 @@ var/msg = "[user] starts bending [target]'s [affected.encased] back into place with \the [tool]." var/self_msg = "You start bending [target]'s [affected.encased] back into place with \the [tool]." user.visible_message(msg, self_msg) - target.custom_pain("Something hurts horribly in your [affected.name]!",1) + target.custom_pain("Something hurts horribly in your [affected.name]!") ..() /datum/surgery_step/open_encased/close/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -187,7 +187,7 @@ var/msg = "[user] starts applying \the [tool] to [target]'s [affected.encased]." var/self_msg = "You start applying \the [tool] to [target]'s [affected.encased]." user.visible_message(msg, self_msg) - target.custom_pain("Something hurts horribly in your [affected.name]!",1) + target.custom_pain("Something hurts horribly in your [affected.name]!") ..() /datum/surgery_step/open_encased/mend/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) diff --git a/code/modules/surgery/face.dm b/code/modules/surgery/face.dm deleted file mode 100644 index d96db814b78..00000000000 --- a/code/modules/surgery/face.dm +++ /dev/null @@ -1,147 +0,0 @@ -//Procedures in this file: Facial reconstruction surgery -////////////////////////////////////////////////////////////////// -// FACE SURGERY // -////////////////////////////////////////////////////////////////// -/datum/surgery/plastic_surgery - name = "Face Repair" - steps = list(/datum/surgery_step/generic/cut_face, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/face/mend_vocal, /datum/surgery_step/face/fix_face,/datum/surgery_step/face/cauterize) - possible_locs = list("head") - - - -/datum/surgery/plastic_surgery/can_start(mob/user, mob/living/carbon/target) - if(istype(target,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = target - var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) - if(!affected) - return 0 - if(affected.status & ORGAN_ROBOT) - return 0 - if(!affected.disfigured) - return 0 - return 1 - -/datum/surgery_step/face - priority = 2 - can_infect = 0 - -/datum/surgery_step/generic/cut_face - name = "make incision" - allowed_tools = list( - /obj/item/scalpel = 100, \ - /obj/item/kitchen/knife = 90, \ - /obj/item/shard = 60, \ - ) - - time = 16 - -/datum/surgery_step/generic/cut_face/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message("[user] starts to cut open [target]'s face and neck with \the [tool].", \ - "You start to cut open [target]'s face and neck with \the [tool].") - ..() - -/datum/surgery_step/generic/cut_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message(" [user] has cut open [target]'s face and neck with \the [tool]." , \ - " You have cut open [target]'s face and neck with \the [tool].",) - - return 1 - -/datum/surgery_step/generic/cut_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message(" [user]'s hand slips, slicing [target]'s throat wth \the [tool]!" , \ - " Your hand slips, slicing [target]'s throat wth \the [tool]!" ) - affected.receive_damage(60) - target.AdjustLoseBreath(4) - - return 0 - -/datum/surgery_step/face/mend_vocal - name = "mend vocal cords" - allowed_tools = list( - /obj/item/scalpel/laser/manager = 100, \ - /obj/item/hemostat = 100, \ - /obj/item/stack/cable_coil = 90, \ - /obj/item/assembly/mousetrap = 12 //I don't know. Don't ask me. But I'm leaving it because hilarity. - ) - - time = 24 - -/datum/surgery_step/face/mend_vocal/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message("[user] starts mending [target]'s vocal cords with \the [tool].", \ - "You start mending [target]'s vocal cords with \the [tool].") - ..() - -/datum/surgery_step/face/mend_vocal/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message(" [user] mends [target]'s vocal cords with \the [tool].", \ - " You mend [target]'s vocal cords with \the [tool].") - return 1 - -/datum/surgery_step/face/mend_vocal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message(" [user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!", \ - " Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!") - target.AdjustLoseBreath(4) - return 0 - -/datum/surgery_step/face/fix_face - name = "reshape face" - allowed_tools = list( - /obj/item/scalpel/laser/manager = 100, \ - /obj/item/retractor = 100, \ - /obj/item/crowbar = 65, \ - /obj/item/kitchen/utensil/fork = 90) - - time = 64 - -/datum/surgery_step/face/fix_face/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message("[user] starts pulling skin on [target]'s face back in place with \the [tool].", \ - "You start pulling skin on [target]'s face back in place with \the [tool].") - ..() - -/datum/surgery_step/face/fix_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message(" [user] pulls skin on [target]'s face back in place with \the [tool].", \ - " You pull skin on [target]'s face back in place with \the [tool].") - return 1 - -/datum/surgery_step/face/fix_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message(" [user]'s hand slips, tearing skin on [target]'s face with \the [tool]!", \ - " Your hand slips, tearing skin on [target]'s face with \the [tool]!") - target.apply_damage(10, BRUTE, affected, sharp = 1) - return 0 - -/datum/surgery_step/face/cauterize - name = "close incision" - allowed_tools = list( - /obj/item/scalpel/laser = 100, \ - /obj/item/cautery = 100, \ - /obj/item/clothing/mask/cigarette = 90, \ - /obj/item/lighter = 60, \ - /obj/item/weldingtool = 30 - ) - - time = 24 - -/datum/surgery_step/face/cauterize/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message("[user] is beginning to cauterize the incision on [target]'s face and neck with \the [tool]." , \ - "You are beginning to cauterize the incision on [target]'s face and neck with \the [tool].") - ..() - -/datum/surgery_step/face/cauterize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message(" [user] cauterizes the incision on [target]'s face and neck with \the [tool].", \ - " You cauterize the incision on [target]'s face and neck with \the [tool].") - affected.open = 0 - var/obj/item/organ/external/head/h = affected - h.disfigured = 0 - h.update_icon() - target.regenerate_icons() - - return 1 - -/datum/surgery_step/face/cauterize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message(" [user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!", \ - " Your hand slips, leaving a small burn on [target]'s face with \the [tool]!") - target.apply_damage(4, BURN, affected) - - return 0 diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index 158656f8c01..c66d95df899 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -12,7 +12,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) if(affected == null) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 return 1 @@ -37,7 +37,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts the incision on [target]'s [affected.name] with \the [tool].", \ "You start the incision on [target]'s [affected.name] with \the [tool].") - target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.name]!",1) + target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.name]!") ..() /datum/surgery_step/generic/cut_open/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -71,7 +71,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts clamping bleeders in [target]'s [affected.name] with \the [tool].", \ "You start clamping bleeders in [target]'s [affected.name] with \the [tool].") - target.custom_pain("The pain in your [affected.name] is maddening!",1) + target.custom_pain("The pain in your [affected.name] is maddening!") ..() /datum/surgery_step/generic/clamp_bleeders/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -111,7 +111,7 @@ msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]." self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]." user.visible_message(msg, self_msg) - target.custom_pain("It feels like the skin on your [affected.name] is on fire!",1) + target.custom_pain("It feels like the skin on your [affected.name] is on fire!") ..() /datum/surgery_step/generic/retract_skin/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -160,7 +160,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] is beginning to cauterize the incision on [target]'s [affected.name] with \the [tool]." , \ "You are beginning to cauterize the incision on [target]'s [affected.name] with \the [tool].") - target.custom_pain("Your [affected.name] is being burned!",1) + target.custom_pain("Your [affected.name] is being burned!") ..() /datum/surgery_step/generic/cauterize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -219,7 +219,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] is beginning to amputate [target]'s [affected.name] with \the [tool]." , \ "You are beginning to cut through [target]'s [affected.amputation_point] with \the [tool].") - target.custom_pain("Your [affected.amputation_point] is being ripped apart!",1) + target.custom_pain("Your [affected.amputation_point] is being ripped apart!") ..() /datum/surgery_step/generic/amputate/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) diff --git a/code/modules/surgery/helpers.dm b/code/modules/surgery/helpers.dm index 986ce671860..715f3e9837b 100644 --- a/code/modules/surgery/helpers.dm +++ b/code/modules/surgery/helpers.dm @@ -21,7 +21,7 @@ for(var/datum/surgery/S in all_surgeries) if(!S.possible_locs.Find(selected_zone)) continue - if(affecting && S.requires_organic_bodypart && affecting.status == ORGAN_ROBOT) + if(affecting && S.requires_organic_bodypart && affecting.is_robotic()) continue if(!S.can_start(user, M)) continue @@ -39,7 +39,7 @@ S = available_surgeries["Apply Robotic Prosthetic"] if(istype(I,/obj/item/organ/external)) var/obj/item/organ/external/E = I - if(E.robotic == 2) + if(E.is_robotic()) S = available_surgeries["Synthetic Limb Reattachment"] if(S) var/datum/surgery/procedure = new S.type diff --git a/code/modules/surgery/implant_removal.dm b/code/modules/surgery/implant_removal.dm index 7518cc701af..435ce92b94e 100644 --- a/code/modules/surgery/implant_removal.dm +++ b/code/modules/surgery/implant_removal.dm @@ -19,7 +19,7 @@ var/obj/item/organ/external/affected = target.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 return 1 @@ -29,7 +29,7 @@ var/obj/item/organ/external/affected = target.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return 0 return 1 @@ -45,7 +45,7 @@ I = locate(/obj/item/implant) in target user.visible_message("[user] starts poking around inside [target]'s [affected.name] with \the [tool].", \ "You start poking around inside [target]'s [affected.name] with \the [tool]." ) - target.custom_pain("The pain in your [affected.name] is living hell!",1) + target.custom_pain("The pain in your [affected.name] is living hell!") ..() /datum/surgery_step/extract_implant/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) diff --git a/code/modules/surgery/limb_augmentation.dm b/code/modules/surgery/limb_augmentation.dm index 9674f4aec49..d2f11364cfe 100644 --- a/code/modules/surgery/limb_augmentation.dm +++ b/code/modules/surgery/limb_augmentation.dm @@ -1,7 +1,7 @@ /datum/surgery/limb_augmentation name = "Augment Limb" steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/augment) - possible_locs = list("chest","l_arm","r_arm","r_leg","l_leg") + possible_locs = list("head", "chest","l_arm","r_arm","r_leg","l_leg") /datum/surgery/limb_augmentation/can_start(mob/user, mob/living/carbon/target) if(ishuman(target)) @@ -11,7 +11,7 @@ return 0 if(affected.status & ORGAN_BROKEN) //The arm has to be in prime condition to augment it. return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 return 1 diff --git a/code/modules/surgery/limb_reattach.dm b/code/modules/surgery/limb_reattach.dm index d64d00c34bb..2e8a3b85300 100644 --- a/code/modules/surgery/limb_reattach.dm +++ b/code/modules/surgery/limb_reattach.dm @@ -15,7 +15,7 @@ var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 if(affected.cannot_amputate) return 0 @@ -131,7 +131,7 @@ /datum/surgery_step/limb/attach/proc/is_correct_limb(obj/item/organ/external/E) - if(E.status & ORGAN_ROBOT) + if(E.is_robotic()) return 0 return 1 @@ -149,13 +149,13 @@ name = "attach robotic limb" /datum/surgery_step/limb/attach/robo/is_correct_limb(obj/item/organ/external/E) - if(!(E.status & ORGAN_ROBOT)) + if(!E.is_robotic()) return 0 return 1 /datum/surgery_step/limb/attach/robo/attach_limb(mob/living/user, mob/living/carbon/human/target, obj/item/organ/external/E) // Fixes fabricator IPC heads - if(!(E.dna) && E.robotic == 2 && target.dna) + if(!(E.dna) && E.is_robotic() && target.dna) E.set_dna(target.dna) ..() if(E.limb_name == "head") diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index d98e40700df..bdc5f763442 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -66,7 +66,7 @@ if(!holder || (holder in src)) return - owner.visible_message("[owner] retracts [holder] back into \his [parent_organ == "r_arm" ? "right" : "left"] arm.", + owner.visible_message("[owner] retracts [holder] back into [owner.p_their()] [parent_organ == "r_arm" ? "right" : "left"] arm.", "[holder] snaps back into your [parent_organ == "r_arm" ? "right" : "left"] arm.", "You hear a short mechanical noise.") @@ -114,7 +114,7 @@ if(parent_organ == "r_arm" ? owner.hand : !owner.hand) owner.swap_hand() - owner.visible_message("[owner] extends [holder] from \his [parent_organ == "r_arm" ? "right" : "left"] arm.", + owner.visible_message("[owner] extends [holder] from [owner.p_their()] [parent_organ == "r_arm" ? "right" : "left"] arm.", "You extend [holder] from your [parent_organ == "r_arm" ? "right" : "left"] arm.", "You hear a short mechanical noise.") playsound(get_turf(owner), 'sound/mecha/mechmove03.ogg', 50, 1) @@ -242,7 +242,7 @@ /obj/item/organ/internal/cyberimp/arm/surgery name = "surgical toolset implant" desc = "A set of surgical tools hidden behind a concealed panel on the user's arm" - contents = newlist(/obj/item/retractor, /obj/item/hemostat, /obj/item/cautery, /obj/item/surgicaldrill, /obj/item/scalpel, /obj/item/circular_saw, /obj/item/bonegel, /obj/item/FixOVein, /obj/item/bonesetter) + contents = newlist(/obj/item/retractor/augment, /obj/item/hemostat/augment, /obj/item/cautery/augment, /obj/item/surgicaldrill/augment, /obj/item/scalpel/augment, /obj/item/circular_saw/augment, /obj/item/bonegel/augment, /obj/item/FixOVein/augment, /obj/item/bonesetter/augment) origin_tech = "materials=3;engineering=3;biotech=3;programming=2;magnets=3" // lets make IPCs even *more* vulnerable to EMPs! diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 64d62d3f6b4..f0b05ad0659 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -7,8 +7,6 @@ var/implant_color = "#FFFFFF" var/implant_overlay tough = TRUE // Immune to damage - sterile = TRUE // Doesn't accumulate germs - robotic = 2 // these are cybernetic after all /obj/item/organ/internal/cyberimp/New(var/mob/M = null) . = ..() diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm index 9f732fdef4d..fecbdb05287 100644 --- a/code/modules/surgery/organs/blood.dm +++ b/code/modules/surgery/organs/blood.dm @@ -64,7 +64,7 @@ var/obj/item/organ/external/BP = X var/brutedamage = BP.brute_dam - if(BP.status & ORGAN_ROBOT) + if(BP.is_robotic()) continue //We want an accurate reading of .len diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm new file mode 100644 index 00000000000..bce0f0f8046 --- /dev/null +++ b/code/modules/surgery/organs/eyes.dm @@ -0,0 +1,80 @@ +/obj/item/organ/internal/eyes + name = "eyeballs" + icon_state = "eyes" + gender = PLURAL + organ_tag = "eyes" + parent_organ = "head" + slot = "eyes" + var/eye_colour = "#000000" + var/list/colourmatrix = null + var/list/colourblind_matrix = MATRIX_GREYSCALE //Special colourblindness parameters. By default, it's black-and-white. + var/list/replace_colours = LIST_GREYSCALE_REPLACE + var/dependent_disabilities = null //Gets set by eye-dependent disabilities such as colourblindness so the eyes can transfer the disability during transplantation. + var/dark_view = 2 //Default dark_view for Humans. + var/weld_proof = null //If set, the eyes will not take damage during welding. eg. IPC optical sensors do not take damage when they weld things while all other eyes will. + +/obj/item/organ/internal/eyes/proc/update_colour() + dna.write_eyes_attributes(src) + +/obj/item/organ/internal/eyes/proc/generate_icon(var/mob/living/carbon/human/HA) + var/mob/living/carbon/human/H = HA + if(!istype(H)) + H = owner + var/icon/eyes_icon = new /icon('icons/mob/human_face.dmi', H.species.eyes) + eyes_icon.Blend(eye_colour, ICON_ADD) + + return eyes_icon + +/obj/item/organ/internal/eyes/proc/get_colourmatrix() //Returns a special colour matrix if the eyes are organic and the mob is colourblind, otherwise it uses the current one. + if(!is_robotic() && owner.disabilities & COLOURBLIND) + return colourblind_matrix + else + return colourmatrix + +/obj/item/organ/internal/eyes/proc/get_dark_view() //Returns dark_view (if the eyes are organic) for see_invisible handling in species.dm to be autoprocessed by life(). + return dark_view + +/obj/item/organ/internal/eyes/proc/shine() + if(is_robotic() || (dark_view > EYE_SHINE_THRESHOLD)) + return TRUE + +/obj/item/organ/internal/eyes/insert(mob/living/carbon/human/M, special = 0) + ..() + if(istype(M) && eye_colour) + M.update_body() //Apply our eye colour to the target. + + if(!(M.disabilities & COLOURBLIND) && (dependent_disabilities & COLOURBLIND)) //If the eyes are colourblind and we're not, carry over the gene. + dependent_disabilities &= ~COLOURBLIND + M.dna.SetSEState(COLOURBLINDBLOCK,1) + genemutcheck(M,COLOURBLINDBLOCK,null,MUTCHK_FORCED) + else + M.update_client_colour() //If we're here, that means the mob acquired the colourblindness gene while they didn't have eyes. Better handle it. + +/obj/item/organ/internal/eyes/remove(mob/living/carbon/human/M, special = 0) + if(!special && (M.disabilities & COLOURBLIND)) //If special is set, that means these eyes are getting deleted (i.e. during set_species()) + if(!(dependent_disabilities & COLOURBLIND)) //We only want to change COLOURBLINDBLOCK and such it the eyes are being surgically removed. + dependent_disabilities |= COLOURBLIND + M.dna.SetSEState(COLOURBLINDBLOCK,0) + genemutcheck(M,COLOURBLINDBLOCK,null,MUTCHK_FORCED) + . = ..() + +/obj/item/organ/internal/eyes/surgeryize() + if(!owner) + return + owner.CureNearsighted() + owner.CureBlind() + owner.SetEyeBlurry(0) + owner.SetEyeBlind(0) + +/obj/item/organ/internal/eyes/robotize() + colourmatrix = null + ..() //Make sure the organ's got the robotic status indicators before updating the client colour. + if(owner) + owner.update_client_colour(0) //Since mechanical eyes give dark_view of 2 and full colour vision atm, just having this here is fine. + +/obj/item/organ/internal/eyes/cybernetic + name = "cybernetic eyes" + icon_state = "eyes-prosthetic" + desc = "An electronic device designed to mimic the functions of a pair of human eyes. It has no benefits over organic eyes, but is easy to produce." + origin_tech = "biotech=4" + status = ORGAN_ROBOT \ No newline at end of file diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm new file mode 100644 index 00000000000..59643723d78 --- /dev/null +++ b/code/modules/surgery/organs/heart.dm @@ -0,0 +1,150 @@ +/obj/item/organ/internal/heart + name = "heart" + icon_state = "heart-on" + organ_tag = "heart" + parent_organ = "chest" + slot = "heart" + origin_tech = "biotech=5" + var/beating = TRUE + dead_icon = "heart-off" + var/icon_base = "heart" + +/obj/item/organ/internal/heart/update_icon() + if(beating) + icon_state = "[icon_base]-on" + else + icon_state = "[icon_base]-off" + +/obj/item/organ/internal/heart/remove(mob/living/carbon/M, special = 0) + . = ..() + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.stat == DEAD) + Stop() + return + + spawn(120) + if(!owner) + Stop() + +/obj/item/organ/internal/heart/emp_act(intensity) + if(!is_robotic() || emp_proof) + return + Stop() + +/obj/item/organ/internal/heart/necrotize() + ..() + Stop() + +/obj/item/organ/internal/heart/attack_self(mob/user) + ..() + if(status & ORGAN_DEAD) + to_chat(user, "You can't restart a dead heart.") + return + if(!beating) + Restart() + spawn(80) + if(!owner) + Stop() + +/obj/item/organ/internal/heart/safe_replace(mob/living/carbon/human/target) + Restart() + ..() + +/obj/item/organ/internal/heart/proc/Stop() + beating = FALSE + update_icon() + return TRUE + +/obj/item/organ/internal/heart/proc/Restart() + beating = TRUE + update_icon() + return TRUE + +/obj/item/organ/internal/heart/prepare_eat() + var/obj/S = ..() + S.icon_state = dead_icon + return S + +/obj/item/organ/internal/heart/cursed + name = "cursed heart" + desc = "it needs to be pumped..." + icon_state = "cursedheart-off" + icon_base = "cursedheart" + origin_tech = "biotech=6" + actions_types = list(/datum/action/item_action/organ_action/cursed_heart) + var/last_pump = 0 + var/pump_delay = 30 //you can pump 1 second early, for lag, but no more (otherwise you could spam heal) + var/blood_loss = 100 //600 blood is human default, so 5 failures (below 122 blood is where humans die because reasons?) + + //How much to heal per pump, negative numbers would HURT the player + var/heal_brute = 0 + var/heal_burn = 0 + var/heal_oxy = 0 + + +/obj/item/organ/internal/heart/cursed/attack(mob/living/carbon/human/H, mob/living/carbon/human/user, obj/target) + if(H == user && istype(H)) + if(NO_BLOOD in H.species.species_traits) + to_chat(H, "\The [src] is not compatible with your form!") + return + playsound(user,'sound/effects/singlebeat.ogg', 40, 1) + user.drop_item() + insert(user) + else + return ..() + +/obj/item/organ/internal/heart/cursed/on_life() + if(world.time > (last_pump + pump_delay)) + if(ishuman(owner) && owner.client) //While this entire item exists to make people suffer, they can't control disconnects. + var/mob/living/carbon/human/H = owner + if(!(NO_BLOOD in H.species.species_traits)) + H.blood_volume = max(H.blood_volume - blood_loss, 0) + to_chat(H, "You have to keep pumping your blood!") + if(H.client) + H.client.color = "red" //bloody screen so real + else + last_pump = world.time //lets be extra fair *sigh* + +/obj/item/organ/internal/heart/cursed/insert(mob/living/carbon/M, special = 0) + ..() + if(owner) + to_chat(owner, "Your heart has been replaced with a cursed one, you have to pump this one manually otherwise you'll die!") + + +/datum/action/item_action/organ_action/cursed_heart + name = "pump your blood" + +//You are now brea- pumping blood manually +/datum/action/item_action/organ_action/cursed_heart/Trigger() + . = ..() + if(. && istype(target,/obj/item/organ/internal/heart/cursed)) + var/obj/item/organ/internal/heart/cursed/cursed_heart = target + + if(world.time < (cursed_heart.last_pump + (cursed_heart.pump_delay-10))) //no spam + to_chat(owner, "Too soon!") + return + + cursed_heart.last_pump = world.time + playsound(owner,'sound/effects/singlebeat.ogg',40,1) + to_chat(owner, "Your heart beats.") + + var/mob/living/carbon/human/H = owner + if(istype(H)) + if(!(NO_BLOOD in H.species.species_traits)) + H.blood_volume = min(H.blood_volume + cursed_heart.blood_loss*0.5, BLOOD_VOLUME_NORMAL) + if(owner.client) + owner.client.color = "" + + H.adjustBruteLoss(-cursed_heart.heal_brute) + H.adjustFireLoss(-cursed_heart.heal_burn) + H.adjustOxyLoss(-cursed_heart.heal_oxy) + +/obj/item/organ/internal/heart/cybernetic + name = "cybernetic heart" + desc = "An electronic device designed to mimic the functions of an organic human heart. Offers no benefit over an organic heart other than being easy to make." + icon_state = "heart-c-on" + icon_base = "heart-c" + dead_icon = "heart-c-off" + origin_tech = "biotech=5" + status = ORGAN_ROBOT \ No newline at end of file diff --git a/code/modules/surgery/organs/kidneys.dm b/code/modules/surgery/organs/kidneys.dm new file mode 100644 index 00000000000..26b59191a7c --- /dev/null +++ b/code/modules/surgery/organs/kidneys.dm @@ -0,0 +1,25 @@ +/obj/item/organ/internal/kidneys + name = "kidneys" + icon_state = "kidneys" + gender = PLURAL + organ_tag = "kidneys" + parent_organ = "groin" + slot = "kidneys" + +/obj/item/organ/internal/kidneys/on_life() + // Coffee is really bad for you with busted kidneys. + // This should probably be expanded in some way, but fucked if I know + // what else kidneys can process in our reagent list. + var/datum/reagent/coffee = locate(/datum/reagent/consumable/drink/coffee) in owner.reagents.reagent_list + if(coffee) + if(is_bruised()) + owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) + else if(is_broken()) + owner.adjustToxLoss(0.3 * PROCESS_ACCURACY) + +/obj/item/organ/internal/kidneys/cybernetic + name = "cybernetic kidneys" + icon_state = "kidneys-c" + desc = "An electronic device designed to mimic the functions of human kidneys. It has no benefits over a pair of organic kidneys, but is easy to produce." + origin_tech = "biotech=4" + status = ORGAN_ROBOT \ No newline at end of file diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm new file mode 100644 index 00000000000..bf6f085275b --- /dev/null +++ b/code/modules/surgery/organs/liver.dm @@ -0,0 +1,58 @@ +/obj/item/organ/internal/liver + name = "liver" + icon_state = "liver" + organ_tag = "liver" + parent_organ = "groin" + slot = "liver" + var/alcohol_intensity = 1 + +/obj/item/organ/internal/liver/on_life() + if(germ_level > INFECTION_LEVEL_ONE) + if(prob(1)) + to_chat(owner, " Your skin itches.") + if(germ_level > INFECTION_LEVEL_TWO) + if(prob(1)) + owner.vomit() + + if(owner.life_tick % PROCESS_ACCURACY == 0) + + //High toxins levels are dangerous + if(owner.getToxLoss() >= 60 && !owner.reagents.has_reagent("charcoal")) + //Healthy liver suffers on its own + if(damage < min_broken_damage) + receive_damage(0.2 * PROCESS_ACCURACY) + //Damaged one shares the fun + else + var/obj/item/organ/internal/O = pick(owner.internal_organs) + if(O) + O.receive_damage(0.2 * PROCESS_ACCURACY) + + //Detox can heal small amounts of damage + if(damage && damage < min_bruised_damage && owner.reagents.has_reagent("charcoal")) + receive_damage(-0.2 * PROCESS_ACCURACY) + + // Get the effectiveness of the liver. + var/filter_effect = 3 + if(is_bruised()) + filter_effect -= 1 + if(is_broken()) + filter_effect -= 2 + + // Damaged liver means some chemicals are very dangerous + if(damage >= min_bruised_damage) + for(var/datum/reagent/R in owner.reagents.reagent_list) + // Ethanol and all drinks are bad + if(istype(R, /datum/reagent/consumable/ethanol)) + owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) + + // Can't cope with toxins at all + for(var/toxin in list("toxin", "plasma", "sacid", "facid", "cyanide", "amanitin", "carpotoxin")) + if(owner.reagents.has_reagent(toxin)) + owner.adjustToxLoss(0.3 * PROCESS_ACCURACY) + +/obj/item/organ/internal/liver/cybernetic + name = "cybernetic liver" + icon_state = "liver-c" + desc = "An electronic device designed to mimic the functions of a human liver. It has no benefits over an organic liver, but is easy to produce." + origin_tech = "biotech=4" + status = ORGAN_ROBOT \ No newline at end of file diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index 39c79865b62..99bc996dce2 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -51,6 +51,12 @@ var/heat_level_3_damage = HEAT_GAS_DAMAGE_LEVEL_3 var/heat_damage_types = list(BURN = 1) +/obj/item/organ/internal/lungs/emp_act() + if(!is_robotic() || emp_proof) + return + if(owner) + owner.LoseBreath(20) + /obj/item/organ/internal/lungs/insert(mob/living/carbon/M, special = 0, dont_remove_slot = 0) ..() for(var/thing in list("oxy", "tox", "co2", "nitro")) @@ -334,4 +340,24 @@ cold_level_1_damage = -COLD_GAS_DAMAGE_LEVEL_1 //They heal when the air is cold cold_level_2_damage = -COLD_GAS_DAMAGE_LEVEL_2 cold_level_3_damage = -COLD_GAS_DAMAGE_LEVEL_3 - cold_damage_types = list(BRUTE = 1, BURN = 0.5) \ No newline at end of file + cold_damage_types = list(BRUTE = 1, BURN = 0.5) + +/obj/item/organ/internal/lungs/cybernetic + name = "cybernetic lungs" + desc = "A cybernetic version of the lungs found in traditional humanoid entities. It functions the same as an organic lung and is merely meant as a replacement." + icon_state = "lungs-c" + origin_tech = "biotech=4" + status = ORGAN_ROBOT + +/obj/item/organ/internal/lungs/cybernetic/upgraded + name = "upgraded cybernetic lungs" + desc = "A more advanced version of the stock cybernetic lungs. They are capable of filtering out lower levels of toxins and carbon dioxide." + icon_state = "lungs-c-u" + origin_tech = "biotech=5" + + safe_toxins_max = 20 + safe_co2_max = 20 + + cold_level_1_threshold = 200 + cold_level_2_threshold = 140 + cold_level_3_threshold = 100 \ No newline at end of file diff --git a/code/modules/surgery/organs/mmi_holder.dm b/code/modules/surgery/organs/mmi_holder.dm new file mode 100644 index 00000000000..8b5834bd8fc --- /dev/null +++ b/code/modules/surgery/organs/mmi_holder.dm @@ -0,0 +1,36 @@ +// Used for an MMI or robotic brain being installed into a human. +/obj/item/organ/internal/brain/mmi_holder + name = "Man-Machine Interface" + parent_organ = "chest" + status = ORGAN_ROBOT + var/obj/item/mmi/stored_mmi + +/obj/item/organ/internal/brain/mmi_holder/Destroy() + QDEL_NULL(stored_mmi) + return ..() + +/obj/item/organ/internal/brain/mmi_holder/insert(mob/living/target, special = 0) + ..() + // To supersede the over-writing of the MMI's name from `insert` + update_from_mmi() + +/obj/item/organ/internal/brain/mmi_holder/remove(mob/living/user, special = 0) + if(!special) + if(stored_mmi) + . = stored_mmi + if(owner.mind) + owner.mind.transfer_to(stored_mmi.brainmob) + stored_mmi.forceMove(get_turf(owner)) + stored_mmi = null + ..() + if(!QDELETED(src)) + qdel(src) + +/obj/item/organ/internal/brain/mmi_holder/proc/update_from_mmi() + if(!stored_mmi) + return + name = stored_mmi.name + desc = stored_mmi.desc + icon = stored_mmi.icon + icon_state = stored_mmi.icon_state + set_dna(stored_mmi.brainmob.dna) \ No newline at end of file diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm index 0af7781eee4..c2487503bfa 100644 --- a/code/modules/surgery/organs/organ.dm +++ b/code/modules/surgery/organs/organ.dm @@ -4,7 +4,7 @@ var/dead_icon var/mob/living/carbon/human/owner = null var/status = 0 - var/vital //Lose a vital limb, die immediately. + var/vital = FALSE //Lose a vital limb, die immediately. var/damage = 0 // amount of damage to the organ var/min_bruised_damage = 10 @@ -13,7 +13,6 @@ var/organ_tag = "organ" var/parent_organ = "chest" - var/robotic = 0 //For being a robot var/list/datum/autopsy_data/autopsy_data = list() var/list/trace_chemicals = list() // traces of chemicals in the organ, @@ -30,6 +29,8 @@ var/sterile = FALSE //can the organ be infected by germs? var/tough = FALSE //can organ be easily damaged? var/emp_proof = FALSE //is the organ immune to EMPs? + var/hidden_pain = FALSE //will it skip pain messages? + var/requires_robotic_bodypart = FALSE /obj/item/organ/Destroy() @@ -73,13 +74,11 @@ blood_DNA = list() blood_DNA[dna.unique_enzymes] = dna.b_type -/obj/item/organ/proc/necrotize(update_sprite=TRUE) - if(status & ORGAN_ROBOT) - return +/obj/item/organ/proc/necrotize(update_sprite = TRUE) damage = max_damage status |= ORGAN_DEAD processing_objects -= src - if(dead_icon) + if(dead_icon && !is_robotic()) icon_state = dead_icon if(owner && vital) owner.death() @@ -94,7 +93,7 @@ return //Process infections - if((status & ORGAN_ROBOT) || sterile || (owner && (IS_PLANT in owner.species.species_traits))) + if(is_robotic() || sterile || (owner && (IS_PLANT in owner.species.species_traits))) germ_level = 0 return @@ -174,10 +173,8 @@ /obj/item/organ/proc/rejuvenate() damage = 0 germ_level = 0 - if(status & ORGAN_ROBOT) //Robotic organs stay robotic. + if(is_robotic()) //Robotic organs stay robotic. status = ORGAN_ROBOT - else if(status & ORGAN_ASSISTED) //Assisted organs stay assisted. - status = ORGAN_ASSISTED else status = 0 if(!owner) @@ -223,37 +220,30 @@ /obj/item/organ/proc/receive_damage(amount, silent = 0) if(tough) return - if(status & ORGAN_ROBOT) - damage = between(0, damage + (amount * 0.8), max_damage) - else - damage = between(0, damage + amount, max_damage) + damage = between(0, damage + amount, max_damage) - //only show this if the organ is not robotic - if(owner && parent_organ && amount > 0) - var/obj/item/organ/external/parent = owner.get_organ(parent_organ) - if(parent && !silent) - owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1) + //only show this if the organ is not robotic + if(owner && parent_organ && amount > 0) + var/obj/item/organ/external/parent = owner.get_organ(parent_organ) + if(parent && !silent) + owner.custom_pain("Something inside your [parent.name] hurts a lot.") //check if we've hit max_damage if(damage >= max_damage) necrotize() +/obj/item/organ/proc/heal_internal_damage(amount, robo_repair = FALSE) + if(is_robotic() && !robo_repair) + return + damage = max(damage - amount, 0) + /obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc - robotic = 2 status &= ~ORGAN_BROKEN status &= ~ORGAN_SPLINTED status |= ORGAN_ROBOT -/obj/item/organ/proc/mechassist() //Used to add things like pacemakers, etc - robotize(1) //Skip the icon/name setting that occurs in robotize to avoid having to reset the icon file. - status &= ~ORGAN_ROBOT - status |= ORGAN_ASSISTED - robotic = 1 - min_bruised_damage = 15 - min_broken_damage = 35 - /obj/item/organ/external/emp_act(severity) - if(!(status & ORGAN_ROBOT) || emp_proof) + if(!is_robotic() || emp_proof) return if(tough) switch(severity) @@ -273,25 +263,13 @@ receive_damage(0, 7) /obj/item/organ/internal/emp_act(severity) - if(!robotic || emp_proof) + if(!is_robotic() || emp_proof) return - if(robotic == 2) - switch(severity) - if(1.0) - receive_damage(20, 1) - if(2.0) - receive_damage(7, 1) - else if(robotic == 1) - receive_damage(11, 1) - -/obj/item/organ/internal/heart/emp_act(intensity) - if(emp_proof) - return - if(owner && robotic == 2) - Stop() // In the name of looooove~! - owner.visible_message("[owner] clutches their chest and gasps!","You clutch your chest in pain!") - else if(owner && robotic == 1) - receive_damage(11,1) + switch(severity) + if(1) + receive_damage(20, 1) + if(2) + receive_damage(7, 1) /obj/item/organ/proc/remove(var/mob/living/user,special = 0) if(!istype(owner)) @@ -306,7 +284,7 @@ processing_objects |= src if(owner && vital && is_primary_organ()) // I'd do another check for species or whatever so that you couldn't "kill" an IPC by removing a human head from them, but it doesn't matter since they'll come right back from the dead - add_attack_logs(user, owner, "Removed vital organ ([src])", !!user) + add_attack_logs(user, owner, "Removed vital organ ([src])", !!user ? ATKLOG_FEW : ATKLOG_ALL) owner.death() owner = null return src @@ -334,20 +312,15 @@ I use this so that this can be made better once the organ overhaul rolls out -- return 0 return src == O.get_int_organ(organ_tag) -/obj/item/organ/proc/is_robotic(var/purist = FALSE) - if(purist && (robotic > 1 || status & (ORGAN_ROBOT))) //Only the robotiest. +/obj/item/organ/proc/is_robotic() + if(status & ORGAN_ROBOT) return TRUE - if(robotic || status & (ORGAN_ROBOT|ORGAN_ASSISTED)) //Any tech will do. - return TRUE - return FALSE /obj/item/organ/serialize() var/data = ..() if(status != 0) data["status"] = status - if(robotic > 0) - data["robotic"] = robotic // Save the DNA datum if: The owner doesn't exist, or the dna doesn't match // the owner @@ -355,15 +328,10 @@ I use this so that this can be made better once the organ overhaul rolls out -- data["dna"] = dna.serialize() return data -/obj/item/organ/deserialize(var/data) - switch(data["robotic"]) - if(1) - mechassist() - if(2) - robotize() - else - // Nothing +/obj/item/organ/deserialize(data) if(isnum(data["status"])) + if(data["status"] & ORGAN_ROBOT) + robotize() status = data["status"] if(islist(data["dna"])) // The only thing the official proc does is diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index 0ebf08c225c..bd064a7d062 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -172,7 +172,7 @@ owner.emote("scream") //getting hit on broken hand hurts if(status & ORGAN_SPLINTED && prob((brute + burn)*4)) //taking damage to splinted limbs removes the splints status &= ~ORGAN_SPLINTED - owner.visible_message("The splint on [owner]'s left arm unravels from their [name]!","The splint on your [name] unravels!") + owner.visible_message("The splint on [owner]'s left arm unravels from [owner.p_their()] [name]!","The splint on your [name] unravels!") owner.handle_splints() if(used_weapon) add_autopsy_data("[used_weapon]", brute + burn) @@ -239,10 +239,9 @@ #undef LIMB_SHARP_THRESH_INT_DMG #undef LIMB_THRESH_INT_DMG #undef LIMB_DMG_PROB -#undef LIMB_NO_BONE_DMG_PROB /obj/item/organ/external/proc/heal_damage(brute, burn, internal = 0, robo_repair = 0) - if(status & ORGAN_ROBOT && !robo_repair) + if(is_robotic() && !robo_repair) return brute_dam = max(brute_dam - brute, 0) @@ -261,10 +260,8 @@ This function completely restores a damaged organ to perfect condition. */ /obj/item/organ/external/rejuvenate() damage_state = "00" - if(status & ORGAN_ROBOT) //Robotic organs stay robotic. + if(is_robotic()) //Robotic organs stay robotic. status = ORGAN_ROBOT - else if(status & ORGAN_ASSISTED) //Assisted organs stay assisted. - status = ORGAN_ASSISTED else status = 0 germ_level = 0 @@ -273,8 +270,7 @@ This function completely restores a damaged organ to perfect condition. burn_dam = 0 open = 0 //Closing all wounds. internal_bleeding = FALSE - if(istype(src, /obj/item/organ/external/head) && disfigured) //If their head's disfigured, refigure it. - disfigured = 0 + disfigured = FALSE // handle internal organs for(var/obj/item/organ/internal/current_organ in internal_organs) @@ -332,7 +328,7 @@ Note that amputating the affected organ does in fact remove the infection from t */ /obj/item/organ/external/proc/update_germs() - if((status & ORGAN_ROBOT) || (IS_PLANT in owner.species.species_traits)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs. + if(is_robotic() || (IS_PLANT in owner.species.species_traits)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs. germ_level = 0 return @@ -383,12 +379,12 @@ Note that amputating the affected organ does in fact remove the infection from t //spread the infection to child and parent organs if(children) for(var/obj/item/organ/external/child in children) - if(child.germ_level < germ_level && !(child.status & ORGAN_ROBOT)) + if(child.germ_level < germ_level && !child.is_robotic()) if(child.germ_level < INFECTION_LEVEL_ONE*2 || prob(30)) child.germ_level++ if(parent) - if(parent.germ_level < germ_level && !(parent.status & ORGAN_ROBOT)) + if(parent.germ_level < germ_level && !parent.is_robotic()) if(parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30)) parent.germ_level++ @@ -400,16 +396,16 @@ Note that amputating the affected organ does in fact remove the infection from t //Updates brute_damn and burn_damn from wound damages. Updates BLEEDING status. /obj/item/organ/external/proc/check_fracture() - if(config.bones_can_break && brute_dam > min_broken_damage && !(status & ORGAN_ROBOT)) + if(config.bones_can_break && brute_dam > min_broken_damage && !is_robotic()) fracture() /obj/item/organ/external/proc/check_for_internal_bleeding(damage) if(NO_BLOOD in owner.species.species_traits) return var/local_damage = brute_dam + damage - if(damage > 15 && local_damage > 30 && prob(damage) && !(status & ORGAN_ROBOT)) + if(damage > 15 && local_damage > 30 && prob(damage) && !is_robotic()) internal_bleeding = TRUE - owner.custom_pain("You feel something rip in your [name]!", 1) + owner.custom_pain("You feel something rip in your [name]!") // new damage icon system // returns just the brute/burn damage code @@ -442,7 +438,7 @@ Note that amputating the affected organ does in fact remove the infection from t return if(owner.step_count >= splinted_count + SPLINT_LIFE) status &= ~ORGAN_SPLINTED //oh no, we actually need surgery now! - owner.visible_message("[owner] screams in pain as their splint pops off their [name]!","You scream in pain as your splint pops off your [name]!") + owner.visible_message("[owner] screams in pain as [owner.p_their()] splint pops off their [name]!","You scream in pain as your splint pops off your [name]!") owner.emote("scream") owner.Stun(2) owner.handle_splints() @@ -464,20 +460,20 @@ Note that amputating the affected organ does in fact remove the infection from t switch(disintegrate) if(DROPLIMB_SHARP) if(!clean) - var/gore_sound = "[(status & ORGAN_ROBOT) ? "tortured metal" : "ripping tendons and flesh"]" + var/gore_sound = "[is_robotic() ? "tortured metal" : "ripping tendons and flesh"]" owner.visible_message( "\The [owner]'s [src.name] flies off in an arc!",\ "Your [src.name] goes flying off!",\ "You hear a terrible sound of [gore_sound].") if(DROPLIMB_BURN) - var/gore = "[(status & ORGAN_ROBOT) ? "": " of burning flesh"]" + var/gore = "[is_robotic() ? "" : " of burning flesh"]" owner.visible_message( "\The [owner]'s [src.name] flashes away into ashes!",\ "Your [src.name] flashes away into ashes!",\ "You hear a crackling sound[gore].") if(DROPLIMB_BLUNT) - var/gore = "[(status & ORGAN_ROBOT) ? "": " in shower of gore"]" - var/gore_sound = "[(status & ORGAN_ROBOT) ? "rending sound of tortured metal" : "sickening splatter of gore"]" + var/gore = "[is_robotic() ? "": " in shower of gore"]" + var/gore_sound = "[is_robotic() ? "rending sound of tortured metal" : "sickening splatter of gore"]" owner.visible_message( "\The [owner]'s [src.name] explodes[gore]!",\ "Your [src.name] explodes[gore]!",\ @@ -575,7 +571,7 @@ Note that amputating the affected organ does in fact remove the infection from t //empties the bodypart from its organs and other things inside it /obj/item/organ/external/proc/drop_organs(mob/user) var/turf/T = get_turf(src) - if(status != ORGAN_ROBOT) + if(!is_robotic()) playsound(T, 'sound/effects/splat.ogg', 25, 1) for(var/obj/item/I in src) I.forceMove(T) @@ -600,7 +596,7 @@ Note that amputating the affected organ does in fact remove the infection from t holder.unEquip(holder.legcuffed) /obj/item/organ/external/proc/fracture() - if(status & ORGAN_ROBOT) + if(is_robotic()) return //ORGAN_BROKEN doesn't have the same meaning for robot limbs if((status & ORGAN_BROKEN) || cannot_break) @@ -622,7 +618,7 @@ Note that amputating the affected organ does in fact remove the infection from t release_restraints() /obj/item/organ/external/proc/mend_fracture() - if(status & ORGAN_ROBOT) + if(is_robotic()) return 0 //ORGAN_BROKEN doesn't have the same meaning for robot limbs if(brute_dam > min_broken_damage) return 0 //will just immediately fracture again @@ -681,12 +677,12 @@ Note that amputating the affected organ does in fact remove the infection from t return FALSE /obj/item/organ/external/proc/is_usable() - if(((status & ORGAN_ROBOT) && get_damage() >= max_damage) && !tough) //robot limbs just become inoperable at max damage + if((is_robotic() && get_damage() >= max_damage) && !tough) //robot limbs just become inoperable at max damage return return !(status & (ORGAN_MUTATED|ORGAN_DEAD)) /obj/item/organ/external/proc/is_malfunctioning() - return ((status & ORGAN_ROBOT) && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam) && !tough) + return (is_robotic() && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam) && !tough) /obj/item/organ/external/remove(var/mob/living/user, var/ignore_children) @@ -737,19 +733,14 @@ Note that amputating the affected organ does in fact remove the infection from t qdel(spark_system) qdel(src) -/obj/item/organ/external/proc/disfigure(var/type = "brute") +/obj/item/organ/external/proc/disfigure() if(disfigured) return if(owner) - if(type == "brute") - owner.visible_message("You hear a sickening cracking sound coming from \the [owner]'s [name].", \ - "Your [name] becomes a mangled mess!", \ - "You hear a sickening crack.") - else - owner.visible_message("\The [owner]'s [name] melts away, turning into mangled mess!", \ - "Your [name] melts away!", \ - "You hear a sickening sizzle.") - disfigured = 1 + owner.visible_message("You hear a sickening sound coming from \the [owner]'s [name] as it turns into a mangled mess!", \ + "Your [name] becomes a mangled mess!", \ + "You hear a sickening sound.") + disfigured = TRUE /obj/item/organ/external/is_primary_organ(var/mob/living/carbon/human/O = null) if(isnull(O)) @@ -773,7 +764,7 @@ Note that amputating the affected organ does in fact remove the infection from t /obj/item/organ/external/serialize() var/list/data = ..() - if(robotic == 2) + if(is_robotic()) data["company"] = model // If we wanted to store wound information, here is where it would go return data diff --git a/code/modules/surgery/organs/organ_icon.dm b/code/modules/surgery/organs/organ_icon.dm index e1be25758b5..d1c1070b19d 100644 --- a/code/modules/surgery/organs/organ_icon.dm +++ b/code/modules/surgery/organs/organ_icon.dm @@ -25,7 +25,7 @@ var/global/list/limb_icon_cache = list() deform = new_deform ? new_deform : deform /obj/item/organ/external/proc/sync_colour_to_human(var/mob/living/carbon/human/H) - if(status & ORGAN_ROBOT && !(species && species.name == "Machine")) //machine people get skin color + if(is_robotic() && !(species && species.name == "Machine")) //machine people get skin color return if(species && H.species && species.name != H.species.name) return @@ -44,7 +44,7 @@ var/global/list/limb_icon_cache = list() change_organ_icobase(C.icobase, C.deform) /obj/item/organ/external/proc/sync_colour_to_dna() - if(status & ORGAN_ROBOT) + if(is_robotic()) return if(!isnull(dna.GetUIValue(DNA_UI_SKIN_TONE)) && ((species.bodyflags & HAS_SKIN_TONE) || (species.bodyflags & HAS_ICON_SKIN_TONE))) s_col = null @@ -76,7 +76,7 @@ var/global/list/limb_icon_cache = list() var/icon_file = new_icons[1] var/new_icon_state = new_icons[2] mob_icon = new /icon(icon_file, new_icon_state) - if(!skeletal && !(status & ORGAN_ROBOT)) + if(!skeletal && !is_robotic()) if(status & ORGAN_DEAD) mob_icon.ColorTone(rgb(10,50,0)) mob_icon.SetIntensity(0.7) @@ -172,7 +172,7 @@ var/global/list/limb_icon_cache = list() if(skeletal) icon_file = 'icons/mob/human_races/r_skeleton.dmi' - else if(status & ORGAN_ROBOT) + else if(is_robotic()) icon_file = 'icons/mob/human_races/robotic.dmi' else if(status & ORGAN_MUTATED) @@ -184,7 +184,7 @@ var/global/list/limb_icon_cache = list() /obj/item/organ/external/chest/get_icon_state(skeletal) var/result = ..() - if(fat && !skeletal && !(status & ORGAN_ROBOT) && (CAN_BE_FAT in species.species_traits)) + if(fat && !skeletal && !is_robotic() && (CAN_BE_FAT in species.species_traits)) result[2] += "_fat" return result diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 42d2c98a66d..4858435cc5f 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -1,5 +1,3 @@ -#define PROCESS_ACCURACY 10 - /obj/item/organ/internal origin_tech = "biotech=3" force = 1 @@ -7,7 +5,6 @@ throwforce = 0 var/slot // DO NOT add slots with matching names to different zones - it will break internal_organs_slot list! - vital = 0 var/non_primary = 0 var/unremovable = FALSE //Whether it shows up as an option to remove during surgery. @@ -90,7 +87,7 @@ return /obj/item/organ/internal/proc/prepare_eat() - if(status == ORGAN_ROBOT) + if(is_robotic()) return //no eating cybernetic implants! var/obj/item/reagent_containers/food/snacks/organ/S = new S.name = name @@ -137,310 +134,21 @@ // Brain is defined in brain_item.dm. -/obj/item/organ/internal/heart - name = "heart" - icon_state = "heart-on" - organ_tag = "heart" - parent_organ = "chest" - slot = "heart" - origin_tech = "biotech=5" - var/beating = 1 - dead_icon = "heart-off" - var/icon_base = "heart" - -/obj/item/organ/internal/heart/update_icon() - if(beating) - icon_state = "[icon_base]-on" - else - icon_state = "[icon_base]-off" - -/obj/item/organ/internal/heart/remove(mob/living/carbon/M, special = 0) - . = ..() - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.stat == DEAD) - Stop() - return - - spawn(120) - if(!owner) - Stop() - -/obj/item/organ/internal/heart/attack_self(mob/user) - ..() - if(!beating) - Restart() - spawn(80) - if(!owner) - Stop() - -/obj/item/organ/internal/heart/safe_replace(mob/living/carbon/human/target) - Restart() - ..() - -/obj/item/organ/internal/heart/proc/Stop() - beating = 0 - update_icon() - return 1 - -/obj/item/organ/internal/heart/proc/Restart() - beating = 1 - update_icon() - return 1 - -/obj/item/organ/internal/heart/prepare_eat() - var/obj/S = ..() - S.icon_state = dead_icon - return S - -/obj/item/organ/internal/heart/cursed - name = "cursed heart" - desc = "it needs to be pumped..." - icon_state = "cursedheart-off" - icon_base = "cursedheart" - origin_tech = "biotech=6" - actions_types = list(/datum/action/item_action/organ_action/cursed_heart) - var/last_pump = 0 - var/pump_delay = 30 //you can pump 1 second early, for lag, but no more (otherwise you could spam heal) - var/blood_loss = 100 //600 blood is human default, so 5 failures (below 122 blood is where humans die because reasons?) - - //How much to heal per pump, negative numbers would HURT the player - var/heal_brute = 0 - var/heal_burn = 0 - var/heal_oxy = 0 - - -/obj/item/organ/internal/heart/cursed/attack(mob/living/carbon/human/H, mob/living/carbon/human/user, obj/target) - if(H == user && istype(H)) - if(NO_BLOOD in H.species.species_traits) - to_chat(H, "\The [src] is not compatible with your form!") - return - playsound(user,'sound/effects/singlebeat.ogg', 40, 1) - user.drop_item() - insert(user) - else - return ..() - -/obj/item/organ/internal/heart/cursed/on_life() - if(world.time > (last_pump + pump_delay)) - if(ishuman(owner) && owner.client) //While this entire item exists to make people suffer, they can't control disconnects. - var/mob/living/carbon/human/H = owner - if(!(NO_BLOOD in H.species.species_traits)) - H.blood_volume = max(H.blood_volume - blood_loss, 0) - to_chat(H, "You have to keep pumping your blood!") - if(H.client) - H.client.color = "red" //bloody screen so real - else - last_pump = world.time //lets be extra fair *sigh* - -/obj/item/organ/internal/heart/cursed/insert(mob/living/carbon/M, special = 0) - ..() - if(owner) - to_chat(owner, "Your heart has been replaced with a cursed one, you have to pump this one manually otherwise you'll die!") - - -/datum/action/item_action/organ_action/cursed_heart - name = "pump your blood" - -//You are now brea- pumping blood manually -/datum/action/item_action/organ_action/cursed_heart/Trigger() - . = ..() - if(. && istype(target,/obj/item/organ/internal/heart/cursed)) - var/obj/item/organ/internal/heart/cursed/cursed_heart = target - - if(world.time < (cursed_heart.last_pump + (cursed_heart.pump_delay-10))) //no spam - to_chat(owner, "Too soon!") - return - - cursed_heart.last_pump = world.time - playsound(owner,'sound/effects/singlebeat.ogg',40,1) - to_chat(owner, "Your heart beats.") - - var/mob/living/carbon/human/H = owner - if(istype(H)) - if(!(NO_BLOOD in H.species.species_traits)) - H.blood_volume = min(H.blood_volume + cursed_heart.blood_loss*0.5, BLOOD_VOLUME_NORMAL) - if(owner.client) - owner.client.color = "" - - H.adjustBruteLoss(-cursed_heart.heal_brute) - H.adjustFireLoss(-cursed_heart.heal_burn) - H.adjustOxyLoss(-cursed_heart.heal_oxy) - -/obj/item/organ/internal/kidneys - name = "kidneys" - icon_state = "kidneys" - gender = PLURAL - organ_tag = "kidneys" - parent_organ = "groin" - slot = "kidneys" - -/obj/item/organ/internal/kidneys/on_life() - // Coffee is really bad for you with busted kidneys. - // This should probably be expanded in some way, but fucked if I know - // what else kidneys can process in our reagent list. - var/datum/reagent/coffee = locate(/datum/reagent/consumable/drink/coffee) in owner.reagents.reagent_list - if(coffee) - if(is_bruised()) - owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) - else if(is_broken()) - owner.adjustToxLoss(0.3 * PROCESS_ACCURACY) - - -/obj/item/organ/internal/eyes - name = "eyeballs" - icon_state = "eyes" - gender = PLURAL - organ_tag = "eyes" - parent_organ = "head" - slot = "eyes" - var/eye_colour = "#000000" - var/list/colourmatrix = null - var/list/colourblind_matrix = MATRIX_GREYSCALE //Special colourblindness parameters. By default, it's black-and-white. - var/list/replace_colours = LIST_GREYSCALE_REPLACE - var/dependent_disabilities = null //Gets set by eye-dependent disabilities such as colourblindness so the eyes can transfer the disability during transplantation. - var/dark_view = 2 //Default dark_view for Humans. - var/weld_proof = null //If set, the eyes will not take damage during welding. eg. IPC optical sensors do not take damage when they weld things while all other eyes will. - -/obj/item/organ/internal/eyes/proc/update_colour() - dna.write_eyes_attributes(src) - -/obj/item/organ/internal/eyes/proc/generate_icon(var/mob/living/carbon/human/HA) - var/mob/living/carbon/human/H = HA - if(!istype(H)) - H = owner - var/icon/eyes_icon = new /icon('icons/mob/human_face.dmi', H.species.eyes) - eyes_icon.Blend(eye_colour, ICON_ADD) - - return eyes_icon - -/obj/item/organ/internal/eyes/proc/get_colourmatrix() //Returns a special colour matrix if the eyes are organic and the mob is colourblind, otherwise it uses the current one. - if(!robotic && owner.disabilities & COLOURBLIND) - return colourblind_matrix - else - return colourmatrix - -/obj/item/organ/internal/eyes/proc/get_dark_view() //Returns dark_view (if the eyes are organic) for see_invisible handling in species.dm to be autoprocessed by life(). - return dark_view - -/obj/item/organ/internal/eyes/proc/shine() - if(is_robotic() || (dark_view > EYE_SHINE_THRESHOLD)) - return TRUE - -/obj/item/organ/internal/eyes/insert(mob/living/carbon/human/M, special = 0) - ..() - if(istype(M) && eye_colour) - M.update_body() //Apply our eye colour to the target. - - if(!(M.disabilities & COLOURBLIND) && (dependent_disabilities & COLOURBLIND)) //If the eyes are colourblind and we're not, carry over the gene. - dependent_disabilities &= ~COLOURBLIND - M.dna.SetSEState(COLOURBLINDBLOCK,1) - genemutcheck(M,COLOURBLINDBLOCK,null,MUTCHK_FORCED) - else - M.update_client_colour() //If we're here, that means the mob acquired the colourblindness gene while they didn't have eyes. Better handle it. - -/obj/item/organ/internal/eyes/remove(mob/living/carbon/human/M, special = 0) - if(!special && (M.disabilities & COLOURBLIND)) //If special is set, that means these eyes are getting deleted (i.e. during set_species()) - if(!(dependent_disabilities & COLOURBLIND)) //We only want to change COLOURBLINDBLOCK and such it the eyes are being surgically removed. - dependent_disabilities |= COLOURBLIND - M.dna.SetSEState(COLOURBLINDBLOCK,0) - genemutcheck(M,COLOURBLINDBLOCK,null,MUTCHK_FORCED) - . = ..() - -/obj/item/organ/internal/eyes/surgeryize() - if(!owner) - return - owner.CureNearsighted() - owner.CureBlind() - owner.SetEyeBlurry(0) - owner.SetEyeBlind(0) - -/obj/item/organ/internal/robotize(var/icon_bypass) //If icon bypass isn't null, skip the processing here and go straight to the parent call. - if(!icon_bypass && !(status & ORGAN_ROBOT)) //Don't override the icons for the already-mechanical IPC organs. +/obj/item/organ/internal/robotize() + if(!is_robotic()) var/list/states = icon_states('icons/obj/surgery.dmi') //Insensitive to specially-defined icon files for species like the Drask or whomever else. Everyone gets the same robotic heart. - if(slot == "heart" && ("[slot]-prosthetic-on" in states) && ("[slot]-prosthetic-off" in states)) //Give the robotic heart its robotic heart icons if they exist. + if(slot == "heart" && ("[slot]-c-on" in states) && ("[slot]-c-off" in states)) //Give the robotic heart its robotic heart icons if they exist. var/obj/item/organ/internal/heart/H = src H.icon = icon('icons/obj/surgery.dmi') - H.icon_base = "[slot]-prosthetic" - H.dead_icon = "[slot]-prosthetic-off" + H.icon_base = "[slot]-c" + H.dead_icon = "[slot]-c-off" H.update_icon() - else if("[slot]-prosthetic" in states) //Give the robotic organ its robotic organ icons if they exist. + else if("[slot]-c" in states) //Give the robotic organ its robotic organ icons if they exist. icon = icon('icons/obj/surgery.dmi') - icon_state = "[slot]-prosthetic" - name = "mechanical [slot]" + icon_state = "[slot]-c" + name = "cybernetic [slot]" ..() //Go apply all the organ flags/robotic statuses. -/obj/item/organ/internal/eyes/robotize() - colourmatrix = null - dark_view = 2 - ..() //Make sure the organ's got the robotic status indicators before updating the client colour. - if(owner) - owner.update_client_colour(0) //Since both mechassisted and mechanical eyes give dark_view of 2 and full colour vision atm, just having this here is fine as mechassist() will call it anyway. - -/obj/item/organ/internal/mechassist() - ..() //Go back, call robotize(), adjust the robotic status indicators and the organ damage parameters. - var/list/states = icon_states(icon) //Sensitive to specially-defined icon files since the organs are not fully synthetic. - if(slot == "heart" && ("[organ_tag]-assisted-on" in states) && ("[organ_tag]-assisted-off" in states)) //Give the mechassisted heart its mechassisted heart icons if they exist. - var/obj/item/organ/internal/heart/H = src - H.icon_base = "[organ_tag]-assisted" - H.dead_icon = "[organ_tag]-assisted-off" - H.update_icon() - else if("[organ_tag]-assisted" in states) //Give the mechassisted organ its mechassisted organ icons if they exist. - icon_state = "[organ_tag]-assisted" - name = "mechanically assisted [initial(name)]" //Avoid setting the organ's name to something like "mechanically assisted mechanical eyes". - -/obj/item/organ/internal/liver - name = "liver" - icon_state = "liver" - organ_tag = "liver" - parent_organ = "groin" - slot = "liver" - var/alcohol_intensity = 1 - -/obj/item/organ/internal/liver/on_life() - if(germ_level > INFECTION_LEVEL_ONE) - if(prob(1)) - to_chat(owner, " Your skin itches.") - if(germ_level > INFECTION_LEVEL_TWO) - if(prob(1)) - spawn owner.vomit() - - if(owner.life_tick % PROCESS_ACCURACY == 0) - - //High toxins levels are dangerous - if(owner.getToxLoss() >= 60 && !owner.reagents.has_reagent("charcoal")) - //Healthy liver suffers on its own - if(damage < min_broken_damage) - receive_damage(0.2 * PROCESS_ACCURACY) - //Damaged one shares the fun - else - var/obj/item/organ/internal/O = pick(owner.internal_organs) - if(O) - O.receive_damage(0.2 * PROCESS_ACCURACY) - - //Detox can heal small amounts of damage - if(damage && damage < min_bruised_damage && owner.reagents.has_reagent("charcoal")) - receive_damage(-0.2 * PROCESS_ACCURACY) - - // Get the effectiveness of the liver. - var/filter_effect = 3 - if(is_bruised()) - filter_effect -= 1 - if(is_broken()) - filter_effect -= 2 - - // Damaged liver means some chemicals are very dangerous - if(damage >= min_bruised_damage) - for(var/datum/reagent/R in owner.reagents.reagent_list) - // Ethanol and all drinks are bad - if(istype(R, /datum/reagent/consumable/ethanol)) - owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) - - // Can't cope with toxins at all - for(var/toxin in list("toxin", "plasma", "sacid", "facid", "cyanide", "amanitin", "carpotoxin")) - if(owner.reagents.has_reagent(toxin)) - owner.adjustToxLoss(0.3 * PROCESS_ACCURACY) - /obj/item/organ/internal/appendix name = "appendix" icon_state = "appendix" diff --git a/code/modules/surgery/organs/pain.dm b/code/modules/surgery/organs/pain.dm index d107c7439c6..e3386aef1b3 100644 --- a/code/modules/surgery/organs/pain.dm +++ b/code/modules/surgery/organs/pain.dm @@ -1,41 +1,28 @@ -mob/var/list/pain_stored = list() -mob/var/last_pain_message = "" -mob/var/next_pain_time = 0 +/mob/living/carbon/human + var/last_pain_message = "" + var/next_pain_time = 0 // partname is the name of a body part // amount is a num from 1 to 100 -mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0) - if(stat >= 2) return +/mob/living/carbon/human/proc/pain(partname, amount) + if(stat >= UNCONSCIOUS) + return if(reagents.has_reagent("sal_acid")) return if(reagents.has_reagent("morphine")) return if(reagents.has_reagent("hydrocodone")) return - if(world.time < next_pain_time && !force) + if(world.time < next_pain_time) return - if(amount > 10 && istype(src,/mob/living/carbon/human)) - if(paralysis) - AdjustParalysis(-round(amount/10)) - if(amount > 50 && prob(amount / 5)) - src:drop_item() var/msg - if(burning) - switch(amount) - if(1 to 10) - msg = "Your [partname] burns." - if(11 to 90) - msg = "Your [partname] burns badly!" - if(91 to 10000) - msg = "OH GOD! Your [partname] is on fire!" - else - switch(amount) - if(1 to 10) - msg = "Your [partname] hurts." - if(11 to 90) - msg = "Your [partname] hurts badly." - if(91 to 10000) - msg = "OH GOD! Your [partname] is hurting terribly!" + switch(amount) + if(1 to 10) + msg = "Your [partname] hurts." + if(11 to 90) + msg = "Your [partname] hurts badly." + if(91 to INFINITY) + msg = "OH GOD! Your [partname] is hurting terribly!" if(msg && (msg != last_pain_message || prob(10))) last_pain_message = msg to_chat(src, msg) @@ -43,20 +30,18 @@ mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0 // message is the custom message to be displayed -// flash_strength is 0 for weak pain flash, 1 for strong pain flash -mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength) - if(stat >= 1) return +mob/living/carbon/human/proc/custom_pain(message) + if(stat >= UNCONSCIOUS) + return if(NO_PAIN in species.species_traits) return - if(reagents.has_reagent("morphine")) return if(reagents.has_reagent("hydrocodone")) return - var/msg = "[message]" - if(flash_strength >= 1) - msg = "[message]" + + var/msg = "[message]" // Anti message spam checks if(msg && ((msg != last_pain_message) || (world.time >= next_pain_time))) @@ -67,70 +52,33 @@ mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength) mob/living/carbon/human/proc/handle_pain() // not when sleeping - if(NO_PAIN in species.species_traits) - //While synthetics don't feel pain, they will notice their gears gunking up with residue (toxins) - if(isSynthetic()) - var/toxDamageMessage = null - var/toxMessageProb = 1 - switch(getToxLoss()) - if(25 to 50) - toxMessageProb = 1 - toxDamageMessage = "Your servos seem to be working harder." - if(50 to 75) - toxMessageProb = 2 - toxDamageMessage = "Your joints seem to stick randomly." - if(75 to INFINITY) - toxMessageProb = 5 - toxDamageMessage = "Your motors seem to slip; it really grinds your gears!" - if(toxDamageMessage && prob(toxMessageProb)) - src.custom_pain(toxDamageMessage, getToxLoss() >= 15) + if(stat >= UNCONSCIOUS) + return + if(NO_PAIN in species.species_traits) return - - if(stat >= 2) return if(reagents.has_reagent("morphine")) return if(reagents.has_reagent("hydrocodone")) return + var/maxdam = 0 var/obj/item/organ/external/damaged_organ = null for(var/obj/item/organ/external/E in bodyparts) - if(E.status & ORGAN_DEAD|ORGAN_ROBOT) continue + if((E.status & ORGAN_DEAD|ORGAN_ROBOT) || E.hidden_pain) + continue 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)) ) + if(dam > maxdam && (maxdam == 0 || prob(70))) damaged_organ = E maxdam = dam if(damaged_organ) - pain(damaged_organ.name, maxdam, 0) - + pain(damaged_organ.name, maxdam) // Damage to internal organs hurts a lot. for(var/obj/item/organ/internal/I in internal_organs) - if(istype(I, /obj/item/organ/internal/brain)) //the brain has no pain receptors, and brain damage is meant to be a stealthy damage type. + if(I.hidden_pain) continue - if(I.damage > 2) if(prob(2)) + if(I.damage > 2 && prob(2)) var/obj/item/organ/external/parent = get_organ(I.parent_organ) - src.custom_pain("You feel a sharp pain in your [parent.limb_name]", 1) - - var/toxDamageMessage = null - var/toxMessageProb = 1 - switch(getToxLoss()) - if(1 to 5) - toxMessageProb = 1 - toxDamageMessage = "Your body stings slightly." - if(6 to 10) - toxMessageProb = 2 - toxDamageMessage = "Your whole body hurts a little." - if(11 to 15) - toxMessageProb = 2 - toxDamageMessage = "Your whole body hurts." - if(15 to 25) - toxMessageProb = 3 - toxDamageMessage = "Your whole body hurts badly." - if(26 to INFINITY) - toxMessageProb = 5 - toxDamageMessage = "Your body aches all over, it's driving you mad." - - if(toxDamageMessage && prob(toxMessageProb)) - src.custom_pain(toxDamageMessage, getToxLoss() >= 15) + custom_pain("You feel a sharp pain in your [parent.limb_name]") \ No newline at end of file diff --git a/code/modules/surgery/organs/parasites.dm b/code/modules/surgery/organs/parasites.dm index 0adca48bfd0..bea8d37ae38 100644 --- a/code/modules/surgery/organs/parasites.dm +++ b/code/modules/surgery/organs/parasites.dm @@ -35,7 +35,8 @@ /obj/item/organ/internal/body_egg/spider_eggs/remove(var/mob/living/carbon/M, var/special = 0) ..() M.reagents.del_reagent("spidereggs") //purge all remaining spider eggs reagent if caught, in time. - qdel(src) //We don't want people re-implanting these for near instant gibbings. + if(!QDELETED(src)) + qdel(src) // prevent people re-implanting them into others return null @@ -82,7 +83,7 @@ // Actually, let's make it slightly worse... just to discourage people from bringing back infections. alternate_ending = 1 to_chat(owner,"The shapes extend tendrils out of your wound... no... those are legs! SPIDER LEGS! You have spiderlings growing inside you! You scratch at the wound, but it just aggrivates them - they swarm out of the wound, biting you all over!") - owner.visible_message("[owner] flails around on the floor as spiderlings erupt from their skin and swarm all over them! ") + owner.visible_message("[owner] flails around on the floor as spiderlings erupt from [owner.p_their()] skin and swarm all over them! ") owner.Stun(20) owner.Weaken(20) // yes, this is a long stun - that's intentional. Gotta give the spiderlings time to escape. @@ -114,5 +115,6 @@ /obj/item/organ/internal/body_egg/terror_eggs/remove(var/mob/living/carbon/M, var/special = 0) ..() - qdel(src) // prevent people re-implanting them into others + if(!QDELETED(src)) + qdel(src) // prevent people re-implanting them into others return null diff --git a/code/modules/surgery/organs/subtypes/machine.dm b/code/modules/surgery/organs/subtypes/machine.dm index 2be14a91f14..589ade0e7de 100644 --- a/code/modules/surgery/organs/subtypes/machine.dm +++ b/code/modules/surgery/organs/subtypes/machine.dm @@ -1,7 +1,6 @@ // IPC limbs. /obj/item/organ/external/head/ipc can_intake_reagents = 0 - vital = 0 max_damage = 50 //made same as arm, since it is not vital min_broken_damage = 30 encased = null @@ -109,7 +108,7 @@ organ_tag = "heart" parent_organ = "chest" slot = "heart" - vital = 1 + vital = TRUE status = ORGAN_ROBOT species = "Machine" @@ -137,58 +136,17 @@ . = ..() -// Used for an MMI or posibrain being installed into a human. -/obj/item/organ/internal/brain/mmi_holder - name = "brain" - organ_tag = "brain" - parent_organ = "chest" - vital = 1 - max_damage = 200 - slot = "brain" - status = ORGAN_ROBOT - species = "Machine" - var/obj/item/mmi/stored_mmi - -/obj/item/organ/internal/brain/mmi_holder/Destroy() - QDEL_NULL(stored_mmi) - return ..() - -/obj/item/organ/internal/brain/mmi_holder/insert(var/mob/living/target,special = 0) - ..() - // To supersede the over-writing of the MMI's name from `insert` - update_from_mmi() - -/obj/item/organ/internal/brain/mmi_holder/remove(var/mob/living/user,special = 0) - if(!special) - if(stored_mmi) - . = stored_mmi - if(owner.mind) - owner.mind.transfer_to(stored_mmi.brainmob) - stored_mmi.forceMove(get_turf(owner)) - stored_mmi = null - ..() - qdel(src) - -/obj/item/organ/internal/brain/mmi_holder/proc/update_from_mmi() - if(!stored_mmi) - return - name = stored_mmi.name - desc = stored_mmi.desc - icon = stored_mmi.icon - icon_state = stored_mmi.icon_state - set_dna(stored_mmi.brainmob.dna) - /obj/item/organ/internal/brain/mmi_holder/posibrain/New() - robotize() - stored_mmi = new /obj/item/mmi/posibrain/ipc(src) + stored_mmi = new /obj/item/mmi/robotic_brain/positronic(src) ..() spawn(1) - if(owner) - stored_mmi.name = "positronic brain ([owner.real_name])" - stored_mmi.brainmob.real_name = owner.real_name - stored_mmi.brainmob.name = stored_mmi.brainmob.real_name - stored_mmi.icon_state = "posibrain-occupied" - update_from_mmi() - else - stored_mmi.loc = get_turf(src) - qdel(src) + if(!QDELETED(src)) + if(owner) + stored_mmi.name = "positronic brain ([owner.real_name])" + stored_mmi.brainmob.real_name = owner.real_name + stored_mmi.brainmob.name = stored_mmi.brainmob.real_name + stored_mmi.icon_state = "posibrain-occupied" + update_from_mmi() + else + stored_mmi.loc = get_turf(src) + qdel(src) \ No newline at end of file diff --git a/code/modules/surgery/organs/subtypes/standard.dm b/code/modules/surgery/organs/subtypes/standard.dm index 3fd8effd56a..1a548de7d0a 100644 --- a/code/modules/surgery/organs/subtypes/standard.dm +++ b/code/modules/surgery/organs/subtypes/standard.dm @@ -10,7 +10,7 @@ min_broken_damage = 35 w_class = WEIGHT_CLASS_HUGE body_part = UPPER_TORSO - vital = 1 + vital = TRUE amputation_point = "spine" gendered_icon = 1 parent_organ = null @@ -44,7 +44,7 @@ min_broken_damage = 35 w_class = WEIGHT_CLASS_BULKY // if you know what I mean ;) body_part = LOWER_TORSO - vital = 1 + vital = TRUE parent_organ = "chest" amputation_point = "lumbar" gendered_icon = 1 @@ -158,7 +158,6 @@ min_broken_damage = 35 w_class = WEIGHT_CLASS_NORMAL body_part = HEAD - vital = 1 parent_organ = "chest" amputation_point = "neck" gendered_icon = 1 @@ -211,11 +210,8 @@ /obj/item/organ/external/head/receive_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE) ..(brute, burn, sharp, used_weapon, forbidden_limbs, ignore_resists) if(!disfigured) - if(brute_dam > 40) - if(prob(50)) - disfigure("brute") - if(burn_dam > 40) - disfigure("burn") + if(brute_dam + burn_dam > 50) + disfigure() /obj/item/organ/external/head/proc/handle_alt_icon() if(alt_head && alt_heads_list[alt_head]) diff --git a/code/modules/surgery/organs/subtypes/vox.dm b/code/modules/surgery/organs/subtypes/vox.dm index bb56c41030d..f5b4b4edc07 100644 --- a/code/modules/surgery/organs/subtypes/vox.dm +++ b/code/modules/surgery/organs/subtypes/vox.dm @@ -9,8 +9,8 @@ parent_organ = "head" organ_tag = "stack" slot = "vox_stack" - robotic = 2 - vital = 1 + status = ORGAN_ROBOT + vital = TRUE /obj/item/organ/internal/stack/vox name = "vox cortical stack" \ No newline at end of file diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 1af925c3166..32270c329c2 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -32,7 +32,7 @@ if(!affected) // I'd like to see you do surgery on LITERALLY NOTHING return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 if(!affected.encased) //no bone, problem. return 0 @@ -43,7 +43,7 @@ var/mob/living/carbon/human/H = target var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) - if(affected && (affected.status & ORGAN_ROBOT)) + if(affected && affected.is_robotic()) return 0//no operating on robotic limbs in an organic surgery if(!affected) // I'd like to see you do surgery on LITERALLY NOTHING @@ -101,6 +101,9 @@ if(is_int_organ(tool)) current_type = "insert" I = tool + if(I.requires_robotic_bodypart) + to_chat(user, "[I] is an organ that requires a robotic interface[target].") + return -1 if(target_zone != I.parent_organ || target.get_organ_slot(I.slot)) to_chat(user, "There is no room for [I] in [target]'s [parse_zone(target_zone)]!") return -1 @@ -116,7 +119,7 @@ if(affected) user.visible_message("[user] starts transplanting [tool] into [target]'s [affected.name].", \ "You start transplanting [tool] into [target]'s [affected.name].") - H.custom_pain("Someone's rooting around in your [affected.name]!",1) + H.custom_pain("Someone's rooting around in your [affected.name]!") else user.visible_message("[user] starts transplanting [tool] into [target]'s [parse_zone(target_zone)].", \ "You start transplanting [tool] into [target]'s [parse_zone(target_zone)].") @@ -143,7 +146,7 @@ self_msg = "You begin injecting [tool] into [target]'s [I.name]." user.visible_message(msg, self_msg) if(H && affected) - H.custom_pain("Something burns horribly in your [affected.name]!",1) + H.custom_pain("Something burns horribly in your [affected.name]!") else if(implement_type in implements_finsh) //same as surgery step /datum/surgery_step/open_encased/close/ @@ -159,7 +162,7 @@ user.visible_message(msg, self_msg) if(H && affected) - H.custom_pain("Something hurts horribly in your [affected.name]!",1) + H.custom_pain("Something hurts horribly in your [affected.name]!") else if(implement_type in implements_extract) current_type = "extract" @@ -188,7 +191,7 @@ user.visible_message("[user] starts to separate [target]'s [I] with [tool].", \ "You start to separate [target]'s [I] with [tool] for removal." ) if(H && affected) - H.custom_pain("The pain in your [affected.name] is living hell!",1) + H.custom_pain("The pain in your [affected.name] is living hell!") else return -1 @@ -208,12 +211,12 @@ for(var/obj/item/organ/internal/I in affected.internal_organs) if(I && I.damage) - if(I.robotic < 2 && !istype (tool, /obj/item/stack/nanopaste)) + if(!I.is_robotic() && !istype (tool, /obj/item/stack/nanopaste)) if(!(I.sterile)) spread_germs_to_organ(I, user, tool) user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \ "You start treating damage to [target]'s [I.name] with [tool_name]." ) - else if(I.robotic >= 2 && istype(tool, /obj/item/stack/nanopaste)) + else if(I.is_robotic() && istype(tool, /obj/item/stack/nanopaste)) user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \ "You start treating damage to [target]'s [I.name] with [tool_name]." ) @@ -221,7 +224,7 @@ to_chat(user, "[I] does not appear to be damaged.") if(affected) - H.custom_pain("The pain in your [affected.name] is living hell!", 1) + H.custom_pain("The pain in your [affected.name] is living hell!") else if(istype(tool, /obj/item/reagent_containers/food/snacks/organ)) to_chat(user, "[tool] was bitten by someone! It's too damaged to use!") @@ -246,23 +249,25 @@ if(I) I.surgeryize() if(I && I.damage) - if(I.robotic < 2 && !istype (tool, /obj/item/stack/nanopaste)) + if(!I.is_robotic() && !istype (tool, /obj/item/stack/nanopaste)) user.visible_message(" [user] treats damage to [target]'s [I.name] with [tool_name].", \ " You treat damage to [target]'s [I.name] with [tool_name]." ) I.damage = 0 - else if(I.robotic >= 2 && istype (tool, /obj/item/stack/nanopaste)) + else if(I.is_robotic() && istype (tool, /obj/item/stack/nanopaste)) user.visible_message(" [user] treats damage to [target]'s [I.name] with [tool_name].", \ " You treat damage to [target]'s [I.name] with [tool_name]." ) I.damage = 0 else if(current_type == "insert") I = tool - user.drop_item() - I.insert(target) - spread_germs_to_organ(I, user, tool) - if(!user.canUnEquip(I, 0)) + if(I.requires_robotic_bodypart) + to_chat(user, "[I] is an organ that requires a robotic interface[target].") + return FALSE + if(!user.drop_item()) to_chat(user, "[I] is stuck to your hand, you can't put it in [target]!") return 0 + I.insert(target) + spread_germs_to_organ(I, user, tool) if(affected) user.visible_message(" [user] has transplanted [tool] into [target]'s [affected.name].", diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index 012f7ad3c5b..467f1e64a00 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -24,7 +24,7 @@ var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 return 1 return 0 @@ -80,7 +80,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts patching the damaged vein in [target]'s [affected.name] with \the [tool]." , \ "You start patching the damaged vein in [target]'s [affected.name] with \the [tool].") - target.custom_pain("The pain in [affected.name] is unbearable!",1) + target.custom_pain("The pain in [affected.name] is unbearable!") ..() /datum/surgery_step/fix_vein/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -133,7 +133,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts cutting away necrotic tissue in [target]'s [affected.name] with \the [tool]." , \ "You start cutting away necrotic tissue in [target]'s [affected.name] with \the [tool].") - target.custom_pain("The pain in [affected.name] is unbearable!",1) + target.custom_pain("The pain in [affected.name] is unbearable!") ..() /datum/surgery_step/fix_dead_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -191,7 +191,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts applying medication to the affected tissue in [target]'s [affected.name] with \the [tool]." , \ "You start applying medication to the affected tissue in [target]'s [affected.name] with \the [tool].") - target.custom_pain("Something in your [affected.name] is causing you a lot of pain!",1) + target.custom_pain("Something in your [affected.name] is causing you a lot of pain!") ..() /datum/surgery_step/treat_necrosis/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -241,7 +241,7 @@ ////////////////////////////////////////////////////////////////// /datum/surgery/remove_thrall name = "Remove Shadow Tumor" - steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw,/datum/surgery_step/open_encased/retract, /datum/surgery_step/internal/dethrall, /datum/surgery_step/glue_bone, /datum/surgery_step/set_bone,/datum/surgery_step/finish_bone,/datum/surgery_step/generic/cauterize) + steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/internal/dethrall, /datum/surgery_step/generic/cauterize) possible_locs = list("head", "chest", "groin") /datum/surgery/remove_thrall/synth @@ -260,7 +260,7 @@ if(!B) // No brain to remove the tumor from return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 if(!(B in affected.internal_organs)) return 0 @@ -276,7 +276,7 @@ if(!B) // No brain to remove the tumor from return 0 - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return 0 if(!(B in affected.internal_organs)) return 0 diff --git a/code/modules/surgery/plastic_surgery.dm b/code/modules/surgery/plastic_surgery.dm new file mode 100644 index 00000000000..a0e4c2a3976 --- /dev/null +++ b/code/modules/surgery/plastic_surgery.dm @@ -0,0 +1,56 @@ +/datum/surgery/plastic_surgery + name = "Plastic Surgery" + steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/reshape_face, /datum/surgery_step/generic/cauterize) + possible_locs = list("head") + +/datum/surgery/plastic_surgery/can_start(mob/user, mob/living/carbon/target) + if(ishuman(target)) + var/mob/living/carbon/human/H = target + var/obj/item/organ/external/head/head = H.get_organ(user.zone_sel.selecting) + if(!head) + return FALSE + if(head.is_robotic()) + return FALSE + return TRUE + + +/datum/surgery_step/reshape_face + name = "reshape face" + allowed_tools = list(/obj/item/scalpel = 100, /obj/item/kitchen/knife = 50, /obj/item/wirecutters = 35) + time = 64 + +/datum/surgery_step/reshape_face/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery) + user.visible_message("[user] begins to alter [target]'s appearance.", "You begin to alter [target]'s appearance...") + +/datum/surgery_step/reshape_face/end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery) + var/obj/item/organ/external/head/head = target.get_organ(target_zone) + var/species_names = target.get_species() + if(head.disfigured) + head.disfigured = FALSE + user.visible_message("[user] successfully restores [target]'s appearance!", "You successfully restore [target]'s appearance.") + else + var/list/names = list() + if(!isabductor(user)) + for(var/i in 1 to 10) + names += random_name(target.gender, species_names) + else + for(var/_i in 1 to 9) + names += "Subject [target.gender == MALE ? "i" : "o"]-[pick("a", "b", "c", "d", "e")]-[rand(10000, 99999)]" + names += random_name(target.gender, species_names) //give one normal name in case they want to do regular plastic surgery + var/chosen_name = input(user, "Choose a new name to assign.", "Plastic Surgery") as null|anything in names + if(!chosen_name) + return + var/oldname = target.real_name + target.real_name = chosen_name + var/newname = target.real_name //something about how the code handles names required that I use this instead of target.real_name + user.visible_message("[user] alters [oldname]'s appearance completely, [target.p_they()] [target.p_are()] now [newname]!", "You alter [oldname]'s appearance completely, [target.p_they()] [target.p_are()] now [newname].") + target.sec_hud_set_ID() + return TRUE + + +/datum/surgery_step/reshape_face/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery) + var/obj/item/organ/external/head/head = target.get_organ(target_zone) + user.visible_message(" [user]'s hand slips, tearing skin on [target]'s face with [tool]!", \ + " Your hand slips, tearing skin on [target]'s face with [tool]!") + target.apply_damage(10, BRUTE, head, sharp = TRUE) + return FALSE \ No newline at end of file diff --git a/code/modules/surgery/remove_embedded_object.dm b/code/modules/surgery/remove_embedded_object.dm index 56162dcabc8..3dde9ce1a09 100644 --- a/code/modules/surgery/remove_embedded_object.dm +++ b/code/modules/surgery/remove_embedded_object.dm @@ -13,7 +13,7 @@ var/obj/item/organ/external/affected = target.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 return 1 @@ -23,7 +23,7 @@ var/obj/item/organ/external/affected = target.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return 0 return 1 diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index 58b570eb5e3..3de2d350ee0 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -28,7 +28,7 @@ var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return 0 return 1 @@ -38,7 +38,7 @@ var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return 0 if(affected.cannot_amputate) return 0 @@ -64,7 +64,7 @@ if(!..()) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return 0 return 1 @@ -248,10 +248,7 @@ user.visible_message(" [user] finishes patching damage to [target]'s [affected.name] with \the [tool].", \ " You finish patching damage to [target]'s [affected.name] with \the [tool].") affected.heal_damage(rand(30,50),0,1,1) - if(affected.disfigured) - affected.disfigured = 0 - affected.update_icon() - target.regenerate_icons() + affected.disfigured = FALSE if("burn") user.visible_message(" [user] finishes splicing cable into [target]'s [affected.name].", \ " You finishes splicing new cable into [target]'s [affected.name].") @@ -308,7 +305,7 @@ current_type = "insert" var/obj/item/organ/internal/I = tool - if(I.status != ORGAN_ROBOT || I.robotic != 2) + if(!I.is_robotic()) to_chat(user, "You can only implant cybernetic organs.") if(target_zone != I.parent_organ || target.get_organ_slot(I.slot)) @@ -325,7 +322,7 @@ user.visible_message("[user] begins reattaching [target]'s [tool].", \ "You start reattaching [target]'s [tool].") - target.custom_pain("Someone's rooting around in your [affected.name]!",1) + target.custom_pain("Someone's rooting around in your [affected.name]!") else if(istype(tool,/obj/item/mmi)) current_type = "install" @@ -346,7 +343,7 @@ to_chat(user, "That brain is not usable.") return -1 - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) to_chat(user, "You cannot install a computer brain into a meat enclosure.") return -1 @@ -368,7 +365,7 @@ else if(implement_type in implements_extract) current_type = "extract" var/list/organs = target.get_organs_zone(target_zone) - if(!(affected && (affected.status & ORGAN_ROBOT))) + if(!(affected && affected.is_robotic())) return -1 if(!organs.len) to_chat(user, "There is no removeable organs in [target]'s [parse_zone(target_zone)]!") @@ -386,7 +383,7 @@ user.visible_message("[user] starts to decouple [target]'s [I] with \the [tool].", \ "You start to decouple [target]'s [I] with \the [tool]." ) - target.custom_pain("The pain in your [affected.name] is living hell!",1) + target.custom_pain("The pain in your [affected.name] is living hell!") else return -1 @@ -398,7 +395,7 @@ var/found_damaged_organ = FALSE for(var/obj/item/organ/internal/I in affected.internal_organs) - if(I && I.damage && I.robotic >= 2) + if(I && I.damage && I.is_robotic()) user.visible_message("[user] starts mending the damage to [target]'s [I.name]'s mechanisms.", \ "You start mending the damage to [target]'s [I.name]'s mechanisms.") found_damaged_organ = TRUE @@ -407,7 +404,7 @@ to_chat(user, "There are no damaged components in [affected].") return -1 - target.custom_pain("The pain in your [affected.name] is living hell!",1) + target.custom_pain("The pain in your [affected.name] is living hell!") else if(implement_type in implements_finish) current_type = "finish" @@ -424,7 +421,7 @@ return for(var/obj/item/organ/internal/I in affected.internal_organs) if(I && I.damage) - if(I.robotic >= 2) + if(I.is_robotic()) user.visible_message(" [user] repairs [target]'s [I.name] with [tool].", \ " You repair [target]'s [I.name] with [tool]." ) I.damage = 0 @@ -522,7 +519,7 @@ user.visible_message("[user] starts to decouple [target]'s [affected.name] with \the [tool].", \ "You start to decouple [target]'s [affected.name] with \the [tool]." ) - target.custom_pain("Your [affected.amputation_point] is being ripped apart!",1) + target.custom_pain("Your [affected.amputation_point] is being ripped apart!") ..() /datum/surgery_step/robotics/external/amputate/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -544,3 +541,59 @@ user.visible_message(" [user]'s hand slips!", \ " Your hand slips!") return 0 + +/datum/surgery/cybernetic_customization + name = "Cybernetic Appearance Customization" + steps = list(/datum/surgery_step/robotics/external/unscrew_hatch, /datum/surgery_step/robotics/external/customize_appearance) + possible_locs = list("head", "chest", "l_arm", "r_arm", "r_leg", "l_leg") + requires_organic_bodypart = FALSE + +/datum/surgery/cybernetic_customization/can_start(mob/user, mob/living/carbon/human/target) + if(ishuman(target)) + var/obj/item/organ/external/affected = target.get_organ(user.zone_sel.selecting) + if(!affected) + return FALSE + if(!(affected.status & ORGAN_ROBOT)) + return FALSE + return TRUE + +/datum/surgery_step/robotics/external/customize_appearance + name = "reprogram limb" + allowed_tools = list(/obj/item/multitool = 100) + time = 48 + +/datum/surgery_step/robotics/external/customize_appearance/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) + if(..()) + var/obj/item/organ/external/affected = target.get_organ(target_zone) + if(!affected) + return FALSE + return TRUE + +/datum/surgery_step/robotics/external/customize_appearance/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) + var/obj/item/organ/external/affected = target.get_organ(target_zone) + user.visible_message("[user] begins to reprogram the appearance of [target]'s [affected.name] with [tool]." , \ + "You begin to reprogram the appearance of [target]'s [affected.name] with [tool].") + ..() + +/datum/surgery_step/robotics/external/customize_appearance/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) + var/chosen_appearance = input(user, "Select the company appearance for this limb.", "Limb Company Selection") as null|anything in selectable_robolimbs + if(!chosen_appearance) + return FALSE + var/obj/item/organ/external/affected = target.get_organ(target_zone) + affected.robotize(chosen_appearance, convert_all = FALSE) + if(istype(affected, /obj/item/organ/external/head)) + var/obj/item/organ/external/head/head = affected + head.h_style = "Bald" // nearly all the appearance changes for heads are non-monitors; we want to get rid of a floating screen + target.update_hair() + target.update_body() + target.updatehealth() + target.UpdateDamageIcon() + user.visible_message(" [user] reprograms the appearance of [target]'s [affected.name] with [tool].", \ + " You reprogram the appearance of [target]'s [affected.name] with [tool].") + return TRUE + +/datum/surgery_step/robotics/external/customize_appearance/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) + var/obj/item/organ/external/affected = target.get_organ(target_zone) + user.visible_message(" [user]'s [tool.name] slips, failing to reprogram [target]'s [affected.name].", + " Your [tool.name] slips, failing to reprogram [target]'s [affected.name].") + return FALSE \ No newline at end of file diff --git a/code/modules/surgery/slime.dm b/code/modules/surgery/slime.dm index ced21be08b4..77614d41430 100644 --- a/code/modules/surgery/slime.dm +++ b/code/modules/surgery/slime.dm @@ -98,6 +98,6 @@ return 1 /datum/surgery_step/slime/saw_core/fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool) - user.visible_message(" [user]'s hand slips, causing \him to miss the core!", \ + user.visible_message(" [user]'s hand slips, causing [user.p_them()] to miss the core!", \ " Your hand slips, causing you to miss the core!") - return 0 \ No newline at end of file + return 0 diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 56da8f031e3..8007c40749b 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -187,7 +187,7 @@ return null /proc/spread_germs_to_organ(obj/item/organ/E, mob/living/carbon/human/user, obj/item/tool) - if(!istype(user) || !istype(E) || !(E.status & ORGAN_ROBOT) || E.sterile) + if(!istype(user) || !istype(E) || E.is_robotic() || E.sterile) return var/germ_level = user.germ_level @@ -195,7 +195,7 @@ //germ spread from surgeon touching the patient if(user.gloves) germ_level = user.gloves.germ_level - E.germ_level += germ_level + E.germ_level = max(germ_level, E.germ_level) spread_germs_by_incision(E, tool) //germ spread from environement to patient /proc/spread_germs_by_incision(obj/item/organ/external/E,obj/item/tool) @@ -220,7 +220,7 @@ if(E.internal_organs.len) germs = germs / (E.internal_organs.len + 1) // +1 for the external limb this eventually applies to; let's not multiply germs now. for(var/obj/item/organ/internal/O in E.internal_organs) - if(!(O.status & ORGAN_ROBOT)) + if(!O.is_robotic()) O.germ_level += germs E.germ_level += germs diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index 85880048f9b..53691dd0264 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -8,6 +8,10 @@ w_class = WEIGHT_CLASS_SMALL origin_tech = "materials=1;biotech=1" +/obj/item/retractor/augment + desc = "Micro-mechanical manipulator for retracting stuff." + w_class = WEIGHT_CLASS_TINY + toolspeed = 0.5 /obj/item/hemostat name = "hemostat" @@ -20,6 +24,9 @@ origin_tech = "materials=1;biotech=1" attack_verb = list("attacked", "pinched") +/obj/item/hemostat/augment + desc = "Tiny servos power a pair of pincers to stop bleeding." + toolspeed = 0.5 /obj/item/cautery name = "cautery" @@ -32,6 +39,9 @@ origin_tech = "materials=1;biotech=1" attack_verb = list("burnt") +/obj/item/cautery/augment + desc = "A heated element that cauterizes wounds." + toolspeed = 0.5 /obj/item/surgicaldrill name = "surgical drill" @@ -48,10 +58,16 @@ attack_verb = list("drilled") suicide_act(mob/user) - to_chat(viewers(user), pick("[user] is pressing [src] to \his temple and activating it! It looks like \he's trying to commit suicide.", - "[user] is pressing [src] to \his chest and activating it! It looks like \he's trying to commit suicide.")) + to_chat(viewers(user), pick("[user] is pressing [src] to [user.p_their()] temple and activating it! It looks like [user.p_theyre()] trying to commit suicide.", + "[user] is pressing [src] to [user.p_their()] chest and activating it! It looks like [user.p_theyre()] trying to commit suicide.")) return (BRUTELOSS) +/obj/item/surgicaldrill/augment + desc = "Effectively a small power drill contained within your arm, edges dulled to prevent tissue damage. May or may not pierce the heavens." + hitsound = 'sound/weapons/circsawhit.ogg' + force = 10 + w_class = WEIGHT_CLASS_SMALL + toolspeed = 0.5 /obj/item/scalpel name = "scalpel" @@ -72,12 +88,16 @@ hitsound = 'sound/weapons/bladeslice.ogg' suicide_act(mob/user) - to_chat(viewers(user), pick("[user] is slitting \his wrists with [src]! It looks like \he's trying to commit suicide.", - "[user] is slitting \his throat with [src]! It looks like \he's trying to commit suicide.", - "[user] is slitting \his stomach open with [src]! It looks like \he's trying to commit seppuku.")) + to_chat(viewers(user), pick("[user] is slitting [user.p_their()] wrists with [src]! It looks like [user.p_theyre()] trying to commit suicide.", + "[user] is slitting [user.p_their()] throat with [src]! It looks like [user.p_theyre()] trying to commit suicide.", + "[user] is slitting [user.p_their()] stomach open with [src]! It looks like [user.p_theyre()] trying to commit seppuku.")) return (BRUTELOSS) +/obj/item/scalpel/augment + desc = "Ultra-sharp blade attached directly to your bone for extra-accuracy." + toolspeed = 0.5 + /* * Researchable Scalpels */ @@ -129,6 +149,12 @@ origin_tech = "biotech=1;combat=1" attack_verb = list("attacked", "slashed", "sawed", "cut") +/obj/item/circular_saw/augment + desc = "A small but very fast spinning saw. Edges dulled to prevent accidental cutting inside of the surgeon." + force = 10 + w_class = WEIGHT_CLASS_SMALL + toolspeed = 0.5 + //misc, formerly from code/defines/weapons.dm /obj/item/bonegel name = "bone gel" @@ -139,6 +165,9 @@ throwforce = 1.0 origin_tech = "materials=1;biotech=1" +/obj/item/bonegel/augment + toolspeed = 0.5 + /obj/item/FixOVein name = "FixOVein" icon = 'icons/obj/surgery.dmi' @@ -148,6 +177,9 @@ origin_tech = "materials=1;biotech=1" w_class = WEIGHT_CLASS_SMALL +/obj/item/FixOVein/augment + toolspeed = 0.5 + /obj/item/bonesetter name = "bone setter" icon = 'icons/obj/surgery.dmi' @@ -160,6 +192,9 @@ attack_verb = list("attacked", "hit", "bludgeoned") origin_tech = "materials=1;biotech=1" +/obj/item/bonesetter/augment + toolspeed = 0.5 + /obj/item/surgical_drapes name = "surgical drapes" desc = "Nanotrasen brand surgical drapes provide optimal safety and infection control." diff --git a/config/example/config.txt b/config/example/config.txt index 46d03c48aaa..84e67d5f127 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -37,6 +37,9 @@ LOG_SAY ## log admin actions LOG_ADMIN +## log admin chat +LOG_ADMINCHAT + ## log client access (logon/logoff) LOG_ACCESS diff --git a/config/example/dbconfig.txt b/config/example/dbconfig.txt index a962b4b685c..563768b69bc 100644 --- a/config/example/dbconfig.txt +++ b/config/example/dbconfig.txt @@ -9,7 +9,7 @@ ## This value must be set to the version of the paradise schema in use. ## If this value does not match, the SQL database will not be loaded and an error will be generated. ## Roundstart will be delayed. -DB_VERSION 2 +DB_VERSION 4 ## Server the MySQL database can be found at. # Examples: localhost, 200.135.5.43, www.mysqldb.com, etc. @@ -26,11 +26,11 @@ FEEDBACK_DATABASE feedback ## Note, this does not change the table names in the database, you will have to do that yourself. ## IE: ## FEEDBACK_TABLEPREFIX erro_ -## FEEDBACK_TABLEPREFIX +## FEEDBACK_TABLEPREFIX ## FEEDBACK_TABLEPREFIX SS13_ ## ## Leave as is if you are using the standard schema file. -FEEDBACK_TABLEPREFIX +FEEDBACK_TABLEPREFIX ## Username/Login used to access the database. FEEDBACK_LOGIN username diff --git a/config/example/jobs_highpop.txt b/config/example/jobs_highpop.txt new file mode 100644 index 00000000000..962803ab886 --- /dev/null +++ b/config/example/jobs_highpop.txt @@ -0,0 +1,37 @@ +Captain=1 +Head of Personnel=1 +Head of Security=1 +Chief Engineer=1 +Research Director=1 +Chief Medical Officer=1 + +Station Engineer=5 +Roboticist=1 + +Medical Doctor=5 +Geneticist=2 +Virologist=1 + +Scientist=3 +Chemist=2 + +Bartender=1 +Botanist=2 +Chef=1 +Janitor=1 +Quartermaster=1 +Shaft Miner=3 + +Warden=1 +Detective=1 +Security Officer=7 + +Assistant=-1 +Atmospheric Technician=4 +Cargo Technician=3 +Chaplain=1 +Lawyer=2 +Librarian=1 + +AI=1 +Cyborg=1 \ No newline at end of file diff --git a/config/example/tos.txt b/config/example/tos.txt new file mode 100644 index 00000000000..eb43c50a083 --- /dev/null +++ b/config/example/tos.txt @@ -0,0 +1,3 @@ +

Welcome to Space Station 13!

+ +Terms of service goes here. \ No newline at end of file diff --git a/html/changelog.html b/html/changelog.html index 0a6ad665b97..d3996a85a40 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,314 @@ -->
+

14 July 2018

+

Anasari updated:

+
    +
  • Assuming there is heal left, bandages and ointments used on limbs now heal both the limb and the hand / foot. Bandages and ointments used on the torso now heal head, arms, and lower body. The one on lower body heals the legs too.
  • +
+

Aurorablade updated:

+
    +
  • Adds Spess Koi and related event.
  • +
+

Citinited updated:

+
    +
  • The tachyon-doppler array now has a logging interface, and can print off stored explosive logs. Brag to your friends about your bomb-making skills!
  • +
+

Fox McCloud updated:

+
    +
  • Robotic brains have their own unique sprite and full flavortext's now
  • +
  • Fixed a bug where IRC's would have IPC names
  • +
+ +

11 July 2018

+

Alffd updated:

+
    +
  • Updates SM engine to modern standards
  • +
  • Ports SM monitoring system from Bay and TG
  • +
  • Adds station wide radiation alarm when crystal/shard goes critical
  • +
  • Tesla zapping
  • +
+

Citinited updated:

+
    +
  • Fortune cookies now drop random fortunes if cooked with a blank piece of paper.
  • +
+

Fox McCloud updated:

+
    +
  • Adds constructable Integrated Robotic Chassis
  • +
  • Adds surgery to customize existing robotic limb appearances
  • +
  • Positronic brains renamed to robotic brains
  • +
+

FreeStylaLT updated:

+
    +
  • Added a Harmonica to Perma Brig
  • +
+

datlo updated:

+
    +
  • Replaced instances of "Human" in ion laws by "Crew".
  • +
  • Fixed the ability of Service Borgs to spawn items on floors. Dosh!
  • +
+ +

10 July 2018

+

Fox McCloud updated:

+
    +
  • Can no longer take assisted organs at round-start (mechanical organs are still a go, but renamed to cybernetic organs)
  • +
  • Can now start the round with cybernetic lungs, liver, and kidneys
  • +
  • Can produce cybernetic eyes at R&D and mechfabs
  • +
  • Cybernetic internal organs no longer take reduced damage (this does not apply to augments)
  • +
  • Cybernetic internal organs can be rendered inoperable (this does not apply to augments)
  • +
  • Fixes mitocholide/oculine healing damage on cybernetic organs
  • +
  • Fixes being able to restart a dead heart in your hands or with a defib
  • +
+ +

09 July 2018

+

Fox McCloud updated:

+
    +
  • Enabled augmentation of the head
  • +
  • Adds cybernetic heart, lungs, liver, and kidneys to R&D and Robotics; also adds cybernetic upgraded lungs
  • +
  • Heads are no longer vital organs, but brains still are
  • +
+ +

07 July 2018

+

Fox McCloud updated:

+
    +
  • Stechkin pistols in maintenance no longer spawn with a broken magazine
  • +
+

Kyep updated:

+
    +
  • Removed PDA chatrooms. NTNet Relay Chatrooms, part of modular computers, still exist.
  • +
+ +

06 July 2018

+

Fox McCloud updated:

+
    +
  • removes explosive lances
  • +
+

datlo updated:

+
    +
  • Replaced duplicate labor shuttle console on the bridge by a mining shuttle console.
  • +
+ +

04 July 2018

+

Citinited updated:

+
    +
  • Spelling error in agent IDs
  • +
+ +

03 July 2018

+

MINIMAN10000 updated:

+
    +
  • Restrained spacepod passanger can now exit pending a 2 minute wait time without moving.
  • +
+ +

02 July 2018

+

Citinited updated:

+
    +
  • Canisters obey melee cooldown now
  • +
+

Crazylemon64 updated:

+
    +
  • All MMI variants can now install an "MMI radio upgrade" in order to acquire radio capability when outside of any other chassis. It can be installed either directly on the MMI, or through an opened cyborg chassis. This radio can later be removed if desired by using a screwdriver on the MMI.
  • +
  • MMIs can now pull up the direct interface of the radio instead of a single-toggle verb
  • +
  • MMI radio control is now done via action button instead of via verb
  • +
  • The radio MMI no longer exists as a distinct item
  • +
+ +

01 July 2018

+

Anasari updated:

+
    +
  • Shuttle can be called at 30:00 instead of 25:00 during War Ops.
  • +
+

Citinited updated:

+
    +
  • The chef can now process spaghetti into macaroni, and can make several derivative foodstuffs.
  • +
+

datlo updated:

+
    +
  • Syndicate clowns can now purchase Clown Magboots. Keep honking through slips and atmos!
  • +
+

monster860 updated:

+
    +
  • Adds the mining podbay (again)
  • +
+ +

30 June 2018

+

Citinited updated:

+
    +
  • Adds the conveyor belt placer and bluespace conveyor belt placer, allowing you to much more easily create conveyor belts. The former can be gotten at any autolathe, the latter must be researched first.
  • +
  • Use a conveyor belt lever on aforementioned item to link all belts inside the placer with that lever.
  • +
+ +

27 June 2018

+

MINIMAN10000 updated:

+
    +
  • Containment emitters
  • +
  • deferred processing of SMES
  • +
+ +

26 June 2018

+

Alffd updated:

+
    +
  • Additional logic to atmos throwing.
  • +
+ +

23 June 2018

+

matt81093 updated:

+
    +
  • death squid hitbox position
  • +
+ +

19 June 2018

+

Anasari updated:

+
    +
  • Gloves of the north star is now categorized under highly visible and dangerous weapon instead of pointless badassery. (Because it's actually good)
  • +
+

Fox McCloud updated:

+
    +
  • Can cast spells on CentComm z-level during ragin' mages
  • +
+

MINIMAN10000 updated:

+
    +
  • Cardboard drop counts
  • +
+ +

17 June 2018

+

Fox McCloud updated:

+
    +
  • Fixes wizards not spawning with their clothes and backpack
  • +
  • It no longer snows on away missions
  • +
+

variableundefined updated:

+
    +
  • Nuclear challenge time limit now depends on round start time.
  • +
+ +

13 June 2018

+

Aurorablade updated:

+
    +
  • Fluff for Panzerskull
  • +
+

Fox McCloud updated:

+
    +
  • Medibots now actually talk, like beepsky
  • +
  • Adds Plastic surgery; fix someone's face or give them a new identity!
  • +
  • Having more than 50 cloneloss will render you "Unknown"
  • +
  • head disfigurement requires you to have more than 50 combined brute and burn damage, rather than tracking it separately
  • +
  • Fixes Cryoxadone and Rezadone not fixing disfigurement, Fixes fluorosulfuric acid not causing disfigurement at proper thresholds
  • +
  • Fixes syndicate medibot not being constructable from tactical medkits
  • +
  • Syndicate medibot and the mysterious medibot are better at treating brute and burn damage
  • +
  • Radiation event reworked; graphics updated--effects may be a bit more deadly
  • +
  • Buffed DIY chainsaws damage slightly
  • +
  • You now flip about when you spin with a double e-sword
  • +
  • Adds surgical augment to R&D
  • +
  • Tools on surgical augment are slightly faster at surgery
  • +
  • Wishgranter grants "Avatar of the Wishgranter" instead of making you a superhero
  • +
  • Toxin damage is stealthier and will no longer cause stinging spam message
  • +
+

Kyep updated:

+
    +
  • Additional job slots are now available at 80+ server population.
  • +
+

MINIMAN10000 updated:

+
    +
  • Airlock electronics lock
  • +
  • Airlock electronics close button
  • +
+

Piccione updated:

+
    +
  • Added Magboots to the Paramedic's EVA gear closet
  • +
+

Tayyyyyyy updated:

+
    +
  • Shadowling dethrall has been shortened to scalpel, hemostat, retractor, shine light, cautery
  • +
+ +

11 June 2018

+

FalseIncarnate updated:

+
    +
  • Food on utensils now properly inherits the name of the source dish.
  • +
  • Joined Souls rune can now properly can summon restrained targets with 3+ invokers.
  • +
+ +

09 June 2018

+

Fox McCloud updated:

+
    +
  • Fixes holobarrier icons being missing
  • +
+ +

08 June 2018

+

Alffd updated:

+
    +
  • Adds an automated emergency var on air alarms for mappers
  • +
+

Anasari updated:

+
    +
  • Fixes admin log for spray displaying (0,0,0) all the time.
  • +
+

Desolate updated:

+
    +
  • ED-209 code corrected to work properly. Floorbot code corrected to work properly.
  • +
+

and Dumbdumb updated:

+
    +
  • Unathi and Vox Sec Hardsuit update
  • +
+ +

05 June 2018

+

Kyep updated:

+
    +
  • The Terror Spider away mission now has spiders colonizing the west side of the map. Only the gateway room is safe.
  • +
+ +

04 June 2018

+

Fox McCloud updated:

+
    +
  • Hulk mutation no longer works at range (ie: punching/breaking windows/walls at range)
  • +
  • You must be on harm intent to damage things if you have hulk
  • +
  • Having hulk allows you to punch and damage just about anything
  • +
+

uraniummeltdown updated:

+
    +
  • You can smelt titanium and glass together to form titanium glass for building shuttle windows
  • +
  • You can smelt titanium, plasma and glass together to form plastitanium glass for building plastitanium windows
  • +
  • Fulltile windows now smooth, windows crack as they get damaged and can be repaired with help intent welder
  • +
  • Windows have deconstruction hints and show whether they can be rotated or not
  • +
  • Plasma glass no longer gets auto-colored
  • +
  • RCDs can deconstruct airlocks again, they have no force now though
  • +
  • Wielded fireaxe does a lot of damage to windows and grilles instead of just deleting them
  • +
  • Glass stacks now use stack recipes instead of a custom menu
  • +
+ +

31 May 2018

+

FalseIncarnate updated:

+
    +
  • The singulo no longer feeds on attention.
  • +
+ +

26 May 2018

+

Birdtalon updated:

+
    +
  • Holoparasite guide updated to include newer models. Small tooltip added for charger models.
  • +
  • laser tag gun projectiles now play appropriate sound when striking.
  • +
+

Citinited updated:

+
    +
  • Hopefully fixes all issues with disposals sending you to nullspace.
  • +
+

Fox McCloud updated:

+
    +
  • Fixes not being able to propel yourself through space by farting if you possessed both superfart and toxic farts
  • +
+

Kyep and Bxil updated:

+
    +
  • Prevents everyone and their mother from seeing through closed poddoors.
  • +
+

Tayyyyyyy updated:

+
    +
  • Most things will now use the correct pronouns.
  • +
  • Newscasters properly check for feed channel creation and wanted issue creation
  • +
  • ERT should deploy properly without admins now.
  • +
+

19 May 2018

Aurorablade updated:

    diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index f3142451491..e72e7dfc891 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -6420,3 +6420,219 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. - rscadd: Unarmed attacks now have their own icons, as does disarming. - rscadd: Various mobs have their own custom icon attacks - tweak: Monkies now bite! +2018-05-26: + Birdtalon: + - tweak: Holoparasite guide updated to include newer models. Small tooltip added + for charger models. + - bugfix: laser tag gun projectiles now play appropriate sound when striking. + Citinited: + - bugfix: Hopefully fixes all issues with disposals sending you to nullspace. + Fox McCloud: + - bugfix: Fixes not being able to propel yourself through space by farting if you + possessed both superfart and toxic farts + Kyep and Bxil: + - bugfix: Prevents everyone and their mother from seeing through closed poddoors. + Tayyyyyyy: + - rscadd: Most things will now use the correct pronouns. + - bugfix: Newscasters properly check for feed channel creation and wanted issue + creation + - bugfix: ERT should deploy properly without admins now. +2018-05-31: + FalseIncarnate: + - bugfix: The singulo no longer feeds on attention. +2018-06-04: + Fox McCloud: + - bugfix: 'Hulk mutation no longer works at range (ie: punching/breaking windows/walls + at range)' + - tweak: You must be on harm intent to damage things if you have hulk + - rscadd: Having hulk allows you to punch and damage just about anything + uraniummeltdown: + - rscadd: You can smelt titanium and glass together to form titanium glass for building + shuttle windows + - rscadd: You can smelt titanium, plasma and glass together to form plastitanium + glass for building plastitanium windows + - rscadd: Fulltile windows now smooth, windows crack as they get damaged and can + be repaired with help intent welder + - rscadd: Windows have deconstruction hints and show whether they can be rotated + or not + - bugfix: Plasma glass no longer gets auto-colored + - bugfix: RCDs can deconstruct airlocks again, they have no force now though + - tweak: Wielded fireaxe does a lot of damage to windows and grilles instead of + just deleting them + - tweak: Glass stacks now use stack recipes instead of a custom menu +2018-06-05: + Kyep: + - bugfix: The Terror Spider away mission now has spiders colonizing the west side + of the map. Only the gateway room is safe. +2018-06-08: + Alffd: + - rscadd: Adds an automated emergency var on air alarms for mappers + Anasari: + - bugfix: Fixes admin log for spray displaying (0,0,0) all the time. + Desolate: + - bugfix: ED-209 code corrected to work properly. Floorbot code corrected to work + properly. + and Dumbdumb: + - rscadd: Unathi and Vox Sec Hardsuit update +2018-06-09: + Fox McCloud: + - bugfix: Fixes holobarrier icons being missing +2018-06-11: + FalseIncarnate: + - bugfix: Food on utensils now properly inherits the name of the source dish. + - bugfix: Joined Souls rune can now properly can summon restrained targets with + 3+ invokers. +2018-06-13: + Aurorablade: + - rscadd: Fluff for Panzerskull + Fox McCloud: + - rscadd: Medibots now actually talk, like beepsky + - rscadd: Adds Plastic surgery; fix someone's face or give them a new identity! + - tweak: Having more than 50 cloneloss will render you "Unknown" + - tweak: head disfigurement requires you to have more than 50 combined brute and + burn damage, rather than tracking it separately + - bugfix: Fixes Cryoxadone and Rezadone not fixing disfigurement, Fixes fluorosulfuric + acid not causing disfigurement at proper thresholds + - bugfix: Fixes syndicate medibot not being constructable from tactical medkits + - tweak: Syndicate medibot and the mysterious medibot are better at treating brute + and burn damage + - tweak: Radiation event reworked; graphics updated--effects may be a bit more deadly + - tweak: Buffed DIY chainsaws damage slightly + - tweak: You now flip about when you spin with a double e-sword + - rscadd: Adds surgical augment to R&D + - tweak: Tools on surgical augment are slightly faster at surgery + - rscadd: Wishgranter grants "Avatar of the Wishgranter" instead of making you a + superhero + - tweak: Toxin damage is stealthier and will no longer cause stinging spam message + Kyep: + - rscadd: Additional job slots are now available at 80+ server population. + MINIMAN10000: + - rscdel: Airlock electronics lock + - bugfix: Airlock electronics close button + Piccione: + - rscadd: Added Magboots to the Paramedic's EVA gear closet + Tayyyyyyy: + - tweak: Shadowling dethrall has been shortened to scalpel, hemostat, retractor, + shine light, cautery +2018-06-17: + Fox McCloud: + - bugfix: Fixes wizards not spawning with their clothes and backpack + - bugfix: It no longer snows on away missions + variableundefined: + - tweak: Nuclear challenge time limit now depends on round start time. +2018-06-19: + Anasari: + - tweak: Gloves of the north star is now categorized under highly visible and dangerous + weapon instead of pointless badassery. (Because it's actually good) + Fox McCloud: + - tweak: Can cast spells on CentComm z-level during ragin' mages + MINIMAN10000: + - bugfix: Cardboard drop counts +2018-06-23: + matt81093: + - bugfix: death squid hitbox position +2018-06-26: + Alffd: + - rscadd: Additional logic to atmos throwing. +2018-06-27: + MINIMAN10000: + - bugfix: Containment emitters + - rscadd: deferred processing of SMES +2018-06-30: + Citinited: + - rscadd: Adds the conveyor belt placer and bluespace conveyor belt placer, allowing + you to much more easily create conveyor belts. The former can be gotten at any + autolathe, the latter must be researched first. + - rscadd: Use a conveyor belt lever on aforementioned item to link all belts inside + the placer with that lever. +2018-07-01: + Anasari: + - tweak: Shuttle can be called at 30:00 instead of 25:00 during War Ops. + Citinited: + - rscadd: The chef can now process spaghetti into macaroni, and can make several + derivative foodstuffs. + datlo: + - rscadd: Syndicate clowns can now purchase Clown Magboots. Keep honking through + slips and atmos! + monster860: + - rscadd: Adds the mining podbay (again) +2018-07-02: + Citinited: + - tweak: Canisters obey melee cooldown now + Crazylemon64: + - rscadd: All MMI variants can now install an "MMI radio upgrade" in order to acquire + radio capability when outside of any other chassis. It can be installed either + directly on the MMI, or through an opened cyborg chassis. This radio can later + be removed if desired by using a screwdriver on the MMI. + - rscadd: MMIs can now pull up the direct interface of the radio instead of a single-toggle + verb + - rscadd: MMI radio control is now done via action button instead of via verb + - rscdel: The radio MMI no longer exists as a distinct item +2018-07-03: + MINIMAN10000: + - tweak: Restrained spacepod passanger can now exit pending a 2 minute wait time + without moving. +2018-07-04: + Citinited: + - bugfix: Spelling error in agent IDs +2018-07-06: + Fox McCloud: + - rscdel: removes explosive lances + datlo: + - bugfix: Replaced duplicate labor shuttle console on the bridge by a mining shuttle + console. +2018-07-07: + Fox McCloud: + - tweak: Stechkin pistols in maintenance no longer spawn with a broken magazine + Kyep: + - rscdel: Removed PDA chatrooms. NTNet Relay Chatrooms, part of modular computers, + still exist. +2018-07-09: + Fox McCloud: + - tweak: Enabled augmentation of the head + - rscadd: Adds cybernetic heart, lungs, liver, and kidneys to R&D and Robotics; + also adds cybernetic upgraded lungs + - tweak: Heads are no longer vital organs, but brains still are +2018-07-10: + Fox McCloud: + - rscdel: Can no longer take assisted organs at round-start (mechanical organs are + still a go, but renamed to cybernetic organs) + - rscadd: Can now start the round with cybernetic lungs, liver, and kidneys + - rscadd: Can produce cybernetic eyes at R&D and mechfabs + - tweak: Cybernetic internal organs no longer take reduced damage (this does not + apply to augments) + - tweak: Cybernetic internal organs can be rendered inoperable (this does not apply + to augments) + - bugfix: Fixes mitocholide/oculine healing damage on cybernetic organs + - bugfix: Fixes being able to restart a dead heart in your hands or with a defib +2018-07-11: + Alffd: + - bugfix: Updates SM engine to modern standards + - rscadd: Ports SM monitoring system from Bay and TG + - rscadd: Adds station wide radiation alarm when crystal/shard goes critical + - rscadd: Tesla zapping + Citinited: + - rscadd: Fortune cookies now drop random fortunes if cooked with a blank piece + of paper. + Fox McCloud: + - rscadd: Adds constructable Integrated Robotic Chassis + - rscadd: Adds surgery to customize existing robotic limb appearances + - tweak: Positronic brains renamed to robotic brains + FreeStylaLT: + - rscadd: Added a Harmonica to Perma Brig + datlo: + - bugfix: Replaced instances of "Human" in ion laws by "Crew". + - bugfix: Fixed the ability of Service Borgs to spawn items on floors. Dosh! +2018-07-14: + Anasari: + - tweak: Assuming there is heal left, bandages and ointments used on limbs now heal + both the limb and the hand / foot. Bandages and ointments used on the torso + now heal head, arms, and lower body. The one on lower body heals the legs too. + Aurorablade: + - rscadd: Adds Spess Koi and related event. + Citinited: + - tweak: The tachyon-doppler array now has a logging interface, and can print off + stored explosive logs. Brag to your friends about your bomb-making skills! + Fox McCloud: + - tweak: Robotic brains have their own unique sprite and full flavortext's now + - bugfix: Fixed a bug where IRC's would have IPC names diff --git a/icons/effects/96x96.dmi b/icons/effects/96x96.dmi index 2fdc968ebd6..a5195cc0167 100644 Binary files a/icons/effects/96x96.dmi and b/icons/effects/96x96.dmi differ diff --git a/icons/effects/effects.dmi b/icons/effects/effects.dmi index fa6f26fefe6..060d8b77a27 100644 Binary files a/icons/effects/effects.dmi and b/icons/effects/effects.dmi differ diff --git a/icons/effects/weather_effects.dmi b/icons/effects/weather_effects.dmi index 215cf53556f..da1523706e2 100644 Binary files a/icons/effects/weather_effects.dmi and b/icons/effects/weather_effects.dmi differ diff --git a/icons/mob/feet.dmi b/icons/mob/feet.dmi index 7fc4aa0a9ba..b1a26763fbd 100644 Binary files a/icons/mob/feet.dmi and b/icons/mob/feet.dmi differ diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi index bc282c185d8..1455fa9ab0e 100644 Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi index 8b41a0ec07d..e9d610d754d 100644 Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ diff --git a/icons/mob/species/unathi/helmet.dmi b/icons/mob/species/unathi/helmet.dmi index f969705ec83..14b099f3f45 100644 Binary files a/icons/mob/species/unathi/helmet.dmi and b/icons/mob/species/unathi/helmet.dmi differ diff --git a/icons/mob/species/unathi/suit.dmi b/icons/mob/species/unathi/suit.dmi index ebbfa5f9c73..1d0bcf81f27 100644 Binary files a/icons/mob/species/unathi/suit.dmi and b/icons/mob/species/unathi/suit.dmi differ diff --git a/icons/mob/species/vox/collar.dmi b/icons/mob/species/vox/collar.dmi index c0b8c6ba936..6c442c62f77 100644 Binary files a/icons/mob/species/vox/collar.dmi and b/icons/mob/species/vox/collar.dmi differ diff --git a/icons/mob/species/vox/helmet.dmi b/icons/mob/species/vox/helmet.dmi index c9227ce2119..a7186d611b6 100644 Binary files a/icons/mob/species/vox/helmet.dmi and b/icons/mob/species/vox/helmet.dmi differ diff --git a/icons/mob/species/vox/suit.dmi b/icons/mob/species/vox/suit.dmi index ca8289a3ccb..3af770d719a 100644 Binary files a/icons/mob/species/vox/suit.dmi and b/icons/mob/species/vox/suit.dmi differ diff --git a/icons/mob/ties.dmi b/icons/mob/ties.dmi index b3f92a3b57f..db92d8c21a6 100644 Binary files a/icons/mob/ties.dmi and b/icons/mob/ties.dmi differ diff --git a/icons/obj/ammo.dmi b/icons/obj/ammo.dmi index a63ff4f5daa..d1aa0e9805a 100644 Binary files a/icons/obj/ammo.dmi and b/icons/obj/ammo.dmi differ diff --git a/icons/obj/bureaucracy.dmi b/icons/obj/bureaucracy.dmi index 720fafd8847..8593012e528 100644 Binary files a/icons/obj/bureaucracy.dmi and b/icons/obj/bureaucracy.dmi differ diff --git a/icons/obj/clothing/shoes.dmi b/icons/obj/clothing/shoes.dmi index c3942e015de..7143a55ab59 100644 Binary files a/icons/obj/clothing/shoes.dmi and b/icons/obj/clothing/shoes.dmi differ diff --git a/icons/obj/clothing/species/unathi/hats.dmi b/icons/obj/clothing/species/unathi/hats.dmi index be2fb4f62aa..1ee46571f66 100644 Binary files a/icons/obj/clothing/species/unathi/hats.dmi and b/icons/obj/clothing/species/unathi/hats.dmi differ diff --git a/icons/obj/clothing/species/unathi/suits.dmi b/icons/obj/clothing/species/unathi/suits.dmi index 34c3ea75105..30b590cc7ed 100644 Binary files a/icons/obj/clothing/species/unathi/suits.dmi and b/icons/obj/clothing/species/unathi/suits.dmi differ diff --git a/icons/obj/clothing/ties_overlay.dmi b/icons/obj/clothing/ties_overlay.dmi index a17fed4818c..37bbfbf5d25 100644 Binary files a/icons/obj/clothing/ties_overlay.dmi and b/icons/obj/clothing/ties_overlay.dmi differ diff --git a/icons/obj/custom_items.dmi b/icons/obj/custom_items.dmi index 940f2ba25da..c27c19ac3aa 100644 Binary files a/icons/obj/custom_items.dmi and b/icons/obj/custom_items.dmi differ diff --git a/icons/obj/doors/windoor.dmi b/icons/obj/doors/windoor.dmi index 8104686b483..9bf105faaf6 100644 Binary files a/icons/obj/doors/windoor.dmi and b/icons/obj/doors/windoor.dmi differ diff --git a/icons/obj/fish_items.dmi b/icons/obj/fish_items.dmi index fd8eea36540..76a9486fee6 100644 Binary files a/icons/obj/fish_items.dmi and b/icons/obj/fish_items.dmi differ diff --git a/icons/obj/food/food.dmi b/icons/obj/food/food.dmi index 3395b112947..3a0ec216714 100644 Binary files a/icons/obj/food/food.dmi and b/icons/obj/food/food.dmi differ diff --git a/icons/obj/guns/projectile.dmi b/icons/obj/guns/projectile.dmi index 22dc1384904..288785052cd 100644 Binary files a/icons/obj/guns/projectile.dmi and b/icons/obj/guns/projectile.dmi differ diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index d828f2ee9de..5714fcf4c9f 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ diff --git a/icons/obj/modular_console.dmi b/icons/obj/modular_console.dmi index 85d6026617f..fba8ad59431 100644 Binary files a/icons/obj/modular_console.dmi and b/icons/obj/modular_console.dmi differ diff --git a/icons/obj/modular_laptop.dmi b/icons/obj/modular_laptop.dmi index 2daeee0c7a4..d04e68c2041 100644 Binary files a/icons/obj/modular_laptop.dmi and b/icons/obj/modular_laptop.dmi differ diff --git a/icons/obj/modular_tablet.dmi b/icons/obj/modular_tablet.dmi index 2438f375f65..a6e3223a8d0 100644 Binary files a/icons/obj/modular_tablet.dmi and b/icons/obj/modular_tablet.dmi differ diff --git a/icons/obj/module.dmi b/icons/obj/module.dmi index 0a269e0d8b7..ab76789a0f0 100644 Binary files a/icons/obj/module.dmi and b/icons/obj/module.dmi differ diff --git a/icons/obj/smooth_structures/clockwork_window.dmi b/icons/obj/smooth_structures/clockwork_window.dmi new file mode 100644 index 00000000000..90309ac3d52 Binary files /dev/null and b/icons/obj/smooth_structures/clockwork_window.dmi differ diff --git a/icons/obj/smooth_structures/plasma_window.dmi b/icons/obj/smooth_structures/plasma_window.dmi new file mode 100644 index 00000000000..3d57d156f01 Binary files /dev/null and b/icons/obj/smooth_structures/plasma_window.dmi differ diff --git a/icons/obj/smooth_structures/plastitanium_window.dmi b/icons/obj/smooth_structures/plastitanium_window.dmi new file mode 100644 index 00000000000..82ac0306159 Binary files /dev/null and b/icons/obj/smooth_structures/plastitanium_window.dmi differ diff --git a/icons/obj/smooth_structures/pod_window.dmi b/icons/obj/smooth_structures/pod_window.dmi new file mode 100644 index 00000000000..0fe7501225c Binary files /dev/null and b/icons/obj/smooth_structures/pod_window.dmi differ diff --git a/icons/obj/smooth_structures/reinforced_window.dmi b/icons/obj/smooth_structures/reinforced_window.dmi index b5f24ebbd30..ed9a2a143e6 100644 Binary files a/icons/obj/smooth_structures/reinforced_window.dmi and b/icons/obj/smooth_structures/reinforced_window.dmi differ diff --git a/icons/obj/smooth_structures/rice_window.dmi b/icons/obj/smooth_structures/rice_window.dmi index e3a82935cf2..f5e7a6dd57a 100644 Binary files a/icons/obj/smooth_structures/rice_window.dmi and b/icons/obj/smooth_structures/rice_window.dmi differ diff --git a/icons/obj/smooth_structures/rplasma_window.dmi b/icons/obj/smooth_structures/rplasma_window.dmi new file mode 100644 index 00000000000..c64f42c7f5a Binary files /dev/null and b/icons/obj/smooth_structures/rplasma_window.dmi differ diff --git a/icons/obj/smooth_structures/shuttle_window.dmi b/icons/obj/smooth_structures/shuttle_window.dmi index 3db34cf1ba1..85924dc449b 100644 Binary files a/icons/obj/smooth_structures/shuttle_window.dmi and b/icons/obj/smooth_structures/shuttle_window.dmi differ diff --git a/icons/obj/smooth_structures/tinted_window.dmi b/icons/obj/smooth_structures/tinted_window.dmi index ab992353275..be9affafeea 100644 Binary files a/icons/obj/smooth_structures/tinted_window.dmi and b/icons/obj/smooth_structures/tinted_window.dmi differ diff --git a/icons/obj/smooth_structures/window.dmi b/icons/obj/smooth_structures/window.dmi index 0197f5b20a7..670713bcfe0 100644 Binary files a/icons/obj/smooth_structures/window.dmi and b/icons/obj/smooth_structures/window.dmi differ diff --git a/icons/obj/stationobjs.dmi b/icons/obj/stationobjs.dmi index 997642dcf29..d4b8e837db6 100755 Binary files a/icons/obj/stationobjs.dmi and b/icons/obj/stationobjs.dmi differ diff --git a/icons/obj/status_display.dmi b/icons/obj/status_display.dmi index b131da89349..81ccc415de1 100644 Binary files a/icons/obj/status_display.dmi and b/icons/obj/status_display.dmi differ diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi index 39df3590359..f388b9384fb 100644 Binary files a/icons/obj/storage.dmi and b/icons/obj/storage.dmi differ diff --git a/icons/obj/structures.dmi b/icons/obj/structures.dmi index 0b17038ade5..838503bbda1 100644 Binary files a/icons/obj/structures.dmi and b/icons/obj/structures.dmi differ diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index a47c56cba87..b3723f9a53d 100644 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ diff --git a/icons/program_icons/smmon_0.gif b/icons/program_icons/smmon_0.gif new file mode 100644 index 00000000000..7b716c4e1c5 Binary files /dev/null and b/icons/program_icons/smmon_0.gif differ diff --git a/icons/program_icons/smmon_1.gif b/icons/program_icons/smmon_1.gif new file mode 100644 index 00000000000..bbe319b820f Binary files /dev/null and b/icons/program_icons/smmon_1.gif differ diff --git a/icons/program_icons/smmon_2.gif b/icons/program_icons/smmon_2.gif new file mode 100644 index 00000000000..9c58edd340e Binary files /dev/null and b/icons/program_icons/smmon_2.gif differ diff --git a/icons/program_icons/smmon_3.gif b/icons/program_icons/smmon_3.gif new file mode 100644 index 00000000000..dc7c8734eed Binary files /dev/null and b/icons/program_icons/smmon_3.gif differ diff --git a/icons/program_icons/smmon_4.gif b/icons/program_icons/smmon_4.gif new file mode 100644 index 00000000000..8a75e6e1184 Binary files /dev/null and b/icons/program_icons/smmon_4.gif differ diff --git a/icons/program_icons/smmon_5.gif b/icons/program_icons/smmon_5.gif new file mode 100644 index 00000000000..59356beda0a Binary files /dev/null and b/icons/program_icons/smmon_5.gif differ diff --git a/icons/program_icons/smmon_6.gif b/icons/program_icons/smmon_6.gif new file mode 100644 index 00000000000..aea2f87921d Binary files /dev/null and b/icons/program_icons/smmon_6.gif differ diff --git a/nano/templates/doppler_array.tmpl b/nano/templates/doppler_array.tmpl new file mode 100644 index 00000000000..d3bb40744b2 --- /dev/null +++ b/nano/templates/doppler_array.tmpl @@ -0,0 +1,25 @@ +

    Logged explosions:

    +{{if data.explosion_data == 0}} +

    No explosions logged this shift.

    +{{else}} +
    + Time logged + Epicenter + Actual size + Theoretical size +
    +
    + {{for data.explosion_data}} +
    + + {{:value.logged_time}} + {{:value.epicenter}} + {{:value.actual_size_message}} + {{:value.theoretical_size_message}} + {{:helper.link("Delete", "trash", {"log_to_delete": value.unique_datum_id})}} + +
    + {{/for}} +
    + {{:helper.link("Print all logs", "print", {"print_logs": 'yes'}, data.printing ? 'disabled' : null)}} +{{/if}} diff --git a/nano/templates/pda_chatroom.tmpl b/nano/templates/pda_chatroom.tmpl deleted file mode 100644 index ae0d8e7f35b..00000000000 --- a/nano/templates/pda_chatroom.tmpl +++ /dev/null @@ -1,85 +0,0 @@ - -
    -
    - Chat Functions: -
    -
    - {{:helper.link(data.silent == 1 ? 'Ringer: Off' : 'Ringer: On', data.silent == 1 ? 'volume-off' : 'volume-up', {'choice' : "Toggle Ringer"}, null, 'pdalink fixedLeftWide')}} - {{:helper.link(data.toff == 1 ? 'Notifications: Off' : 'Notifications: On',data.toff == 1 ? 'close' : 'check', {'choice' : "Toggle Chatroom"}, null, 'pdalink fixedLeftWide')}} - {{:helper.link('Set Ringtone', 'bell-o', {'choice' : "Ringtone"}, null, 'pdalink fixedLeftWide')}} - {{:helper.link('New Room', 'plus', {'choice' : "New Room"}, null, 'pdalink fixedLeftWide')}} -
    -
    - -
    - {{if data.no_server}} -

    ERROR: Messaging server is not responding.

    - {{:helper.link('Reconnect', 'refresh', {'choice' : "Reconnect"}, null, 'pdalink fixedLeftWidest')}} - {{else data.room}} - {{if data.inviting}} -

    Invite whom to #{{:data.room}}?

    - {{for data.people}} - {{:helper.link(value.name, 'user-plus', {'choice': "Invite PDA", 'user': value.ref}, null, 'pdalink fixedLeftWidest')}} - {{empty}} - No other people found. - {{/for}} - {{else}} -

    #{{:data.room}} – {{:data.topic}}

    -
    -
    - Room Functions: -
    -
    - {{:helper.link('Invite', 'user-plus', {'choice' : "Invite"}, null, 'pdalink fixedLeftWide')}} - {{:helper.link('Change Topic', 'tag', {'choice' : "Topic"}, null, 'pdalink fixedLeftWide')}} - {{:helper.link('Leave Channel', 'user-times', {'choice' : "Leave"}, null, 'pdalink fixedLeftWide')}} - {{:helper.link(data.auto_scroll ? 'Autoscroll: On' : 'Autoscroll: Off', 'level-down', {'choice' : "Autoscroll"}, null, 'pdalink fixedLeftWide')}} -
    -
    -
    -
    - {{var prevName = "";}} - {{for data.history}} -
    -
    {{:value.username!=prevName ? value.username : " "}}
    -
    - {{:value.message}} -
    -
    - {{prevName = value.username;}} - {{/for}} -
    -
    - {{:helper.link('Post', 'comment', {'choice' : "Post"}, null, 'pdalink fixedLeftWidest')}} -
    -
    -
    - {{for data.users}} -
    -
    {{:value}}
    -
    - {{/for}} -
    - - {{/if}} - {{else}} -

    Rooms

    - {{for data.rooms}} -
    - {{:helper.link(value.name, 'arrow-circle-down', {'choice' : "Join", 'room' : value.ref}, null, 'pdalink fixedLeftWidest')}} -
    - {{empty}} - No rooms located. - {{/for}} - {{/if}} -
    \ No newline at end of file diff --git a/nano/templates/supermatter_monitor.tmpl b/nano/templates/supermatter_monitor.tmpl new file mode 100644 index 00000000000..3bc87984d79 --- /dev/null +++ b/nano/templates/supermatter_monitor.tmpl @@ -0,0 +1,111 @@ +{{if data.active}} + {{:helper.link('Back to Menu', null, {'clear' : 1})}}
    +
    +
    + Core Integrity: +
    +
    + {{:helper.displayBar(data.SM_integrity, 0, 100, (data.SM_integrity == 100) ? 'good' : (data.SM_integrity >= 50) ? 'average' : 'bad')}} {{:data.SM_integrity}}% +
    +
    + Relative EER: +
    +
    + {{if data.SM_power > 300}} + {{:data.SM_power}} MeV/cm3 + {{else data.SM_power > 150}} + {{:data.SM_power}} MeV/cm3 + {{else}} + {{:data.SM_power}} MeV/cm3 + {{/if}} +
    +
    + Temperature: +
    +
    + {{if data.SM_ambienttemp > 5000}} + {{:data.SM_ambienttemp}} K + {{else data.SM_ambienttemp > 4000}} + {{:data.SM_ambienttemp}} K + {{else}} + {{:data.SM_ambienttemp}} K + {{/if}} +
    +
    + Pressure: +
    +
    + {{if data.SM_ambientpressure > 10000}} + {{:data.SM_ambientpressure}} kPa + {{else data.SM_ambientpressure > 5000}} + {{:data.SM_ambientpressure}} kPa + {{else}} + {{:data.SM_ambientpressure}} kPa + {{/if}} +
    +
    +

    +
    + Gas Composition: +
    +
    +
    +
    + O2: +
    +
    + {{:data.SM_gas_O2}} % +
    +
    + CO2: +
    +
    + {{:data.SM_gas_CO2}} % +
    +
    + N2: +
    +
    + {{:data.SM_gas_N2}} % +
    +
    + PL: +
    +
    + {{:data.SM_gas_PL}} % +
    +
    + OTHER: +
    +
    + {{:data.SM_gas_OTHER}} % +
    +
    +
    +
+{{else}} + {{:helper.link('Refresh', null, {'refresh' : 1})}}
+ {{for data.supermatters}} +
+
+ Area: +
+
+ {{:value.area_name}} +
+
+ Integrity: +
+
+ {{:value.integrity}} % +
+
+ Options: +
+
+ {{:helper.link('View Details', null, {'set' : value.uid})}} +
+
+ {{/for}} +{{/if}} diff --git a/paradise.dme b/paradise.dme index 6cf47e457f5..402b6bd167f 100644 --- a/paradise.dme +++ b/paradise.dme @@ -77,6 +77,7 @@ #include "code\__HELPERS\matrices.dm" #include "code\__HELPERS\mobs.dm" #include "code\__HELPERS\names.dm" +#include "code\__HELPERS\pronouns.dm" #include "code\__HELPERS\qdel.dm" #include "code\__HELPERS\sanitize_values.dm" #include "code\__HELPERS\text.dm" @@ -100,6 +101,7 @@ #include "code\_globalvars\station.dm" #include "code\_globalvars\unused.dm" #include "code\_globalvars\lists\flavor_misc.dm" +#include "code\_globalvars\lists\fortunes.dm" #include "code\_globalvars\lists\misc.dm" #include "code\_globalvars\lists\mobs.dm" #include "code\_globalvars\lists\names.dm" @@ -197,7 +199,6 @@ #include "code\controllers\Processes\obj.dm" #include "code\controllers\Processes\shuttles.dm" #include "code\controllers\Processes\ticker.dm" -#include "code\controllers\Processes\weather.dm" #include "code\controllers\ProcessScheduler\core\process.dm" #include "code\controllers\ProcessScheduler\core\processScheduler.dm" #include "code\controllers\subsystem\air.dm" @@ -212,6 +213,7 @@ #include "code\controllers\subsystem\sun.dm" #include "code\controllers\subsystem\throwing.dm" #include "code\controllers\subsystem\timer.dm" +#include "code\controllers\subsystem\weather.dm" #include "code\controllers\subsystem\processing\processing.dm" #include "code\datums\action.dm" #include "code\datums\ai_law_sets.dm" @@ -223,6 +225,7 @@ #include "code\datums\datum.dm" #include "code\datums\datumvars.dm" #include "code\datums\gas_mixture.dm" +#include "code\datums\holocall.dm" #include "code\datums\hud.dm" #include "code\datums\mind.dm" #include "code\datums\mixed.dm" @@ -239,11 +242,6 @@ #include "code\datums\uplink_item.dm" #include "code\datums\vision_override.dm" #include "code\datums\vr.dm" -#include "code\datums\antagonists\antag_datum.dm" -#include "code\datums\antagonists\antag_helpers.dm" -#include "code\datums\antagonists\antag_hud.dm" -#include "code\datums\antagonists\antag_spawner.dm" -#include "code\datums\antagonists\antag_team.dm" #include "code\datums\cache\air_alarm.dm" #include "code\datums\cache\apc.dm" #include "code\datums\cache\cache.dm" @@ -316,6 +314,7 @@ #include "code\datums\helper_datums\topic_input.dm" #include "code\datums\looping_sounds\looping_sound.dm" #include "code\datums\looping_sounds\machinery_sounds.dm" +#include "code\datums\looping_sounds\weather.dm" #include "code\datums\outfits\outfit.dm" #include "code\datums\outfits\outfit_admin.dm" #include "code\datums\ruins\space.dm" @@ -355,7 +354,10 @@ #include "code\datums\status_effects\status_effect.dm" #include "code\datums\vr\level.dm" #include "code\datums\weather\weather.dm" -#include "code\datums\weather\weather_types.dm" +#include "code\datums\weather\weather_types\ash_storm.dm" +#include "code\datums\weather\weather_types\floor_is_lava.dm" +#include "code\datums\weather\weather_types\radiation_storm.dm" +#include "code\datums\weather\weather_types\snow_storm.dm" #include "code\datums\wires\airlock.dm" #include "code\datums\wires\alarm.dm" #include "code\datums\wires\apc.dm" @@ -528,6 +530,7 @@ #include "code\game\jobs\job_controller.dm" #include "code\game\jobs\job_exp.dm" #include "code\game\jobs\job_objective.dm" +#include "code\game\jobs\job_scaling.dm" #include "code\game\jobs\jobs.dm" #include "code\game\jobs\whitelist.dm" #include "code\game\jobs\job\central.dm" @@ -629,7 +632,6 @@ #include "code\game\machinery\computer\computer.dm" #include "code\game\machinery\computer\crew.dm" #include "code\game\machinery\computer\HolodeckControl.dm" -#include "code\game\machinery\computer\hologram.dm" #include "code\game\machinery\computer\honkputer.dm" #include "code\game\machinery\computer\law.dm" #include "code\game\machinery\computer\medical.dm" @@ -959,7 +961,6 @@ #include "code\game\objects\structures\false_walls.dm" #include "code\game\objects\structures\flora.dm" #include "code\game\objects\structures\foodcart.dm" -#include "code\game\objects\structures\fullwindow.dm" #include "code\game\objects\structures\girders.dm" #include "code\game\objects\structures\grille.dm" #include "code\game\objects\structures\guillotine.dm" @@ -1135,6 +1136,12 @@ #include "code\modules\alarm\fire_alarm.dm" #include "code\modules\alarm\motion_alarm.dm" #include "code\modules\alarm\power_alarm.dm" +#include "code\modules\antagonists\_common\antag_datum.dm" +#include "code\modules\antagonists\_common\antag_helpers.dm" +#include "code\modules\antagonists\_common\antag_hud.dm" +#include "code\modules\antagonists\_common\antag_spawner.dm" +#include "code\modules\antagonists\_common\antag_team.dm" +#include "code\modules\antagonists\wishgranter\wishgranter.dm" #include "code\modules\arcade\arcade_base.dm" #include "code\modules\arcade\arcade_prize.dm" #include "code\modules\arcade\claw_game.dm" @@ -1339,6 +1346,7 @@ #include "code\modules\events\immovable_rod.dm" #include "code\modules\events\infestation.dm" #include "code\modules\events\ion_storm.dm" +#include "code\modules\events\koi_mirgration.dm" #include "code\modules\events\mass_hallucination.dm" #include "code\modules\events\meaty_gore.dm" #include "code\modules\events\meaty_ops.dm" @@ -1613,7 +1621,8 @@ #include "code\modules\mob\living\carbon\brain\life.dm" #include "code\modules\mob\living\carbon\brain\login.dm" #include "code\modules\mob\living\carbon\brain\MMI.dm" -#include "code\modules\mob\living\carbon\brain\posibrain.dm" +#include "code\modules\mob\living\carbon\brain\MMI_radio.dm" +#include "code\modules\mob\living\carbon\brain\robotic_brain.dm" #include "code\modules\mob\living\carbon\brain\say.dm" #include "code\modules\mob\living\carbon\brain\update_status.dm" #include "code\modules\mob\living\carbon\human\appearance.dm" @@ -1846,6 +1855,7 @@ #include "code\modules\modular_computers\file_system\programs\command\comms.dm" #include "code\modules\modular_computers\file_system\programs\engineering\alarm.dm" #include "code\modules\modular_computers\file_system\programs\engineering\power_monitor.dm" +#include "code\modules\modular_computers\file_system\programs\engineering\sm_monitor.dm" #include "code\modules\modular_computers\file_system\programs\generic\configurator.dm" #include "code\modules\modular_computers\file_system\programs\generic\file_browser.dm" #include "code\modules\modular_computers\file_system\programs\generic\ntdownloader.dm" @@ -1917,7 +1927,6 @@ #include "code\modules\pda\app.dm" #include "code\modules\pda\cart.dm" #include "code\modules\pda\cart_apps.dm" -#include "code\modules\pda\chatroom.dm" #include "code\modules\pda\core_apps.dm" #include "code\modules\pda\messenger.dm" #include "code\modules\pda\messenger_plugins.dm" @@ -2067,6 +2076,7 @@ #include "code\modules\reagents\reagent_containers\pill.dm" #include "code\modules\reagents\reagent_containers\spray.dm" #include "code\modules\reagents\reagent_containers\syringes.dm" +#include "code\modules\recycling\belt-placer.dm" #include "code\modules\recycling\conveyor2.dm" #include "code\modules\recycling\disposal-construction.dm" #include "code\modules\recycling\disposal.dm" @@ -2105,6 +2115,7 @@ #include "code\modules\research\xenobiology\xenobio_camera.dm" #include "code\modules\research\xenobiology\xenobiology.dm" #include "code\modules\ruins\ruin_areas.dm" +#include "code\modules\scripting\__defines.dm" #include "code\modules\scripting\Errors.dm" #include "code\modules\scripting\Options.dm" #include "code\modules\scripting\AST\AST Nodes.dm" @@ -2155,7 +2166,6 @@ #include "code\modules\surgery\cavity_implant.dm" #include "code\modules\surgery\dental_implant.dm" #include "code\modules\surgery\encased.dm" -#include "code\modules\surgery\face.dm" #include "code\modules\surgery\generic.dm" #include "code\modules\surgery\helpers.dm" #include "code\modules\surgery\implant_removal.dm" @@ -2163,6 +2173,7 @@ #include "code\modules\surgery\limb_reattach.dm" #include "code\modules\surgery\organs_internal.dm" #include "code\modules\surgery\other.dm" +#include "code\modules\surgery\plastic_surgery.dm" #include "code\modules\surgery\remove_embedded_object.dm" #include "code\modules\surgery\rig_removal.dm" #include "code\modules\surgery\robotics.dm" @@ -2175,8 +2186,13 @@ #include "code\modules\surgery\organs\autoimplanter.dm" #include "code\modules\surgery\organs\blood.dm" #include "code\modules\surgery\organs\body_egg.dm" +#include "code\modules\surgery\organs\eyes.dm" +#include "code\modules\surgery\organs\heart.dm" #include "code\modules\surgery\organs\helpers.dm" +#include "code\modules\surgery\organs\kidneys.dm" +#include "code\modules\surgery\organs\liver.dm" #include "code\modules\surgery\organs\lungs.dm" +#include "code\modules\surgery\organs\mmi_holder.dm" #include "code\modules\surgery\organs\organ.dm" #include "code\modules\surgery\organs\organ_external.dm" #include "code\modules\surgery\organs\organ_icon.dm" diff --git a/sound/lavaland/ash_storm_end.ogg b/sound/lavaland/ash_storm_end.ogg deleted file mode 100644 index f9b01453dda..00000000000 Binary files a/sound/lavaland/ash_storm_end.ogg and /dev/null differ diff --git a/sound/lavaland/ash_storm_start.ogg b/sound/lavaland/ash_storm_start.ogg deleted file mode 100644 index 4b9bebffd08..00000000000 Binary files a/sound/lavaland/ash_storm_start.ogg and /dev/null differ diff --git a/sound/lavaland/ash_storm_windup.ogg b/sound/lavaland/ash_storm_windup.ogg deleted file mode 100644 index a9f0fa3270e..00000000000 Binary files a/sound/lavaland/ash_storm_windup.ogg and /dev/null differ diff --git a/sound/machines/engine_alert2.ogg b/sound/machines/engine_alert2.ogg new file mode 100644 index 00000000000..83f693617a7 Binary files /dev/null and b/sound/machines/engine_alert2.ogg differ diff --git a/sound/voice/mapple.ogg b/sound/voice/mapple.ogg new file mode 100644 index 00000000000..21e26742ca1 Binary files /dev/null and b/sound/voice/mapple.ogg differ diff --git a/sound/voice/mcatch.ogg b/sound/voice/mcatch.ogg new file mode 100644 index 00000000000..07b8aaab75c Binary files /dev/null and b/sound/voice/mcatch.ogg differ diff --git a/sound/voice/mcoming.ogg b/sound/voice/mcoming.ogg new file mode 100644 index 00000000000..d3eb9e467f4 Binary files /dev/null and b/sound/voice/mcoming.ogg differ diff --git a/sound/voice/mdelicious.ogg b/sound/voice/mdelicious.ogg new file mode 100644 index 00000000000..5158538580e Binary files /dev/null and b/sound/voice/mdelicious.ogg differ diff --git a/sound/voice/mfeelbetter.ogg b/sound/voice/mfeelbetter.ogg new file mode 100644 index 00000000000..fdbe57fd2e9 Binary files /dev/null and b/sound/voice/mfeelbetter.ogg differ diff --git a/sound/voice/mflies.ogg b/sound/voice/mflies.ogg new file mode 100644 index 00000000000..831281ebbee Binary files /dev/null and b/sound/voice/mflies.ogg differ diff --git a/sound/voice/mhelp.ogg b/sound/voice/mhelp.ogg new file mode 100644 index 00000000000..516d5db068d Binary files /dev/null and b/sound/voice/mhelp.ogg differ diff --git a/sound/voice/minjured.ogg b/sound/voice/minjured.ogg new file mode 100644 index 00000000000..0e968b3980c Binary files /dev/null and b/sound/voice/minjured.ogg differ diff --git a/sound/voice/minsult.ogg b/sound/voice/minsult.ogg new file mode 100644 index 00000000000..017292977a1 Binary files /dev/null and b/sound/voice/minsult.ogg differ diff --git a/sound/voice/mlive.ogg b/sound/voice/mlive.ogg new file mode 100644 index 00000000000..ceb0dec9a34 Binary files /dev/null and b/sound/voice/mlive.ogg differ diff --git a/sound/voice/mlost.ogg b/sound/voice/mlost.ogg new file mode 100644 index 00000000000..7b332ac346a Binary files /dev/null and b/sound/voice/mlost.ogg differ diff --git a/sound/voice/mno.ogg b/sound/voice/mno.ogg new file mode 100644 index 00000000000..030e43a0109 Binary files /dev/null and b/sound/voice/mno.ogg differ diff --git a/sound/voice/mpatchedup.ogg b/sound/voice/mpatchedup.ogg new file mode 100644 index 00000000000..1314f6ee471 Binary files /dev/null and b/sound/voice/mpatchedup.ogg differ diff --git a/sound/voice/mradar.ogg b/sound/voice/mradar.ogg new file mode 100644 index 00000000000..ad347a6d891 Binary files /dev/null and b/sound/voice/mradar.ogg differ diff --git a/sound/voice/msurgeon.ogg b/sound/voice/msurgeon.ogg new file mode 100644 index 00000000000..a300ee57ef6 Binary files /dev/null and b/sound/voice/msurgeon.ogg differ diff --git a/sound/weather/ashstorm/inside/active_end.ogg b/sound/weather/ashstorm/inside/active_end.ogg new file mode 100644 index 00000000000..959bf5773eb Binary files /dev/null and b/sound/weather/ashstorm/inside/active_end.ogg differ diff --git a/sound/weather/ashstorm/inside/active_mid1.ogg b/sound/weather/ashstorm/inside/active_mid1.ogg new file mode 100644 index 00000000000..95244cd2b7c Binary files /dev/null and b/sound/weather/ashstorm/inside/active_mid1.ogg differ diff --git a/sound/weather/ashstorm/inside/active_mid2.ogg b/sound/weather/ashstorm/inside/active_mid2.ogg new file mode 100644 index 00000000000..a45584b9f31 Binary files /dev/null and b/sound/weather/ashstorm/inside/active_mid2.ogg differ diff --git a/sound/weather/ashstorm/inside/active_mid3.ogg b/sound/weather/ashstorm/inside/active_mid3.ogg new file mode 100644 index 00000000000..be2e672fa0e Binary files /dev/null and b/sound/weather/ashstorm/inside/active_mid3.ogg differ diff --git a/sound/weather/ashstorm/inside/active_start.ogg b/sound/weather/ashstorm/inside/active_start.ogg new file mode 100644 index 00000000000..3efab12ef26 Binary files /dev/null and b/sound/weather/ashstorm/inside/active_start.ogg differ diff --git a/sound/weather/ashstorm/inside/weak_end.ogg b/sound/weather/ashstorm/inside/weak_end.ogg new file mode 100644 index 00000000000..416b75a9b84 Binary files /dev/null and b/sound/weather/ashstorm/inside/weak_end.ogg differ diff --git a/sound/weather/ashstorm/inside/weak_mid1.ogg b/sound/weather/ashstorm/inside/weak_mid1.ogg new file mode 100644 index 00000000000..d3211c6b5fc Binary files /dev/null and b/sound/weather/ashstorm/inside/weak_mid1.ogg differ diff --git a/sound/weather/ashstorm/inside/weak_mid2.ogg b/sound/weather/ashstorm/inside/weak_mid2.ogg new file mode 100644 index 00000000000..b6491a7afb8 Binary files /dev/null and b/sound/weather/ashstorm/inside/weak_mid2.ogg differ diff --git a/sound/weather/ashstorm/inside/weak_mid3.ogg b/sound/weather/ashstorm/inside/weak_mid3.ogg new file mode 100644 index 00000000000..95238c72d40 Binary files /dev/null and b/sound/weather/ashstorm/inside/weak_mid3.ogg differ diff --git a/sound/weather/ashstorm/inside/weak_start.ogg b/sound/weather/ashstorm/inside/weak_start.ogg new file mode 100644 index 00000000000..59abf1937dc Binary files /dev/null and b/sound/weather/ashstorm/inside/weak_start.ogg differ diff --git a/sound/weather/ashstorm/outside/active_end.ogg b/sound/weather/ashstorm/outside/active_end.ogg new file mode 100644 index 00000000000..95149d846cc Binary files /dev/null and b/sound/weather/ashstorm/outside/active_end.ogg differ diff --git a/sound/weather/ashstorm/outside/active_mid1.ogg b/sound/weather/ashstorm/outside/active_mid1.ogg new file mode 100644 index 00000000000..189528ab569 Binary files /dev/null and b/sound/weather/ashstorm/outside/active_mid1.ogg differ diff --git a/sound/weather/ashstorm/outside/active_mid2.ogg b/sound/weather/ashstorm/outside/active_mid2.ogg new file mode 100644 index 00000000000..92317f2e0a7 Binary files /dev/null and b/sound/weather/ashstorm/outside/active_mid2.ogg differ diff --git a/sound/weather/ashstorm/outside/active_mid3.ogg b/sound/weather/ashstorm/outside/active_mid3.ogg new file mode 100644 index 00000000000..34846bfd42c Binary files /dev/null and b/sound/weather/ashstorm/outside/active_mid3.ogg differ diff --git a/sound/weather/ashstorm/outside/active_start.ogg b/sound/weather/ashstorm/outside/active_start.ogg new file mode 100644 index 00000000000..8b3acf1a153 Binary files /dev/null and b/sound/weather/ashstorm/outside/active_start.ogg differ diff --git a/sound/weather/ashstorm/outside/weak_end.ogg b/sound/weather/ashstorm/outside/weak_end.ogg new file mode 100644 index 00000000000..55db2fc3565 Binary files /dev/null and b/sound/weather/ashstorm/outside/weak_end.ogg differ diff --git a/sound/weather/ashstorm/outside/weak_mid1.ogg b/sound/weather/ashstorm/outside/weak_mid1.ogg new file mode 100644 index 00000000000..56faa9ad26c Binary files /dev/null and b/sound/weather/ashstorm/outside/weak_mid1.ogg differ diff --git a/sound/weather/ashstorm/outside/weak_mid2.ogg b/sound/weather/ashstorm/outside/weak_mid2.ogg new file mode 100644 index 00000000000..0c836ad220a Binary files /dev/null and b/sound/weather/ashstorm/outside/weak_mid2.ogg differ diff --git a/sound/weather/ashstorm/outside/weak_mid3.ogg b/sound/weather/ashstorm/outside/weak_mid3.ogg new file mode 100644 index 00000000000..f2cbfb0f4b9 Binary files /dev/null and b/sound/weather/ashstorm/outside/weak_mid3.ogg differ diff --git a/sound/weather/ashstorm/outside/weak_start.ogg b/sound/weather/ashstorm/outside/weak_start.ogg new file mode 100644 index 00000000000..1ac59c36f05 Binary files /dev/null and b/sound/weather/ashstorm/outside/weak_start.ogg differ