From 354bdfda26bddc602f1e5269abe284ec59d9cf54 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Mon, 6 Nov 2017 23:44:53 -0500 Subject: [PATCH 001/232] Base --- code/__DEFINES/antagonists.dm | 0 code/datums/antagonists/antag_datum.dm | 64 ++++++++++++++++++++++++++ code/datums/mind.dm | 52 +++++++++++++++++++++ paradise.dme | 2 + 4 files changed, 118 insertions(+) create mode 100644 code/__DEFINES/antagonists.dm create mode 100644 code/datums/antagonists/antag_datum.dm diff --git a/code/__DEFINES/antagonists.dm b/code/__DEFINES/antagonists.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm new file mode 100644 index 00000000000..1af50313c69 --- /dev/null +++ b/code/datums/antagonists/antag_datum.dm @@ -0,0 +1,64 @@ +var/global/list/antagonists = list() + +/datum/antagonist + var/name = "Antagonist" + var/datum/mind/owner //Mind that owns this datum + var/silent = FALSE //Silent will prevent the gain/lose texts to show + var/can_coexist_with_others = TRUE //Whether or not the person will be able to have more than one datum + var/list/typecache_datum_blacklist = list() //List of datums this type can't coexist with + var/delete_on_mind_deletion = TRUE + +/datum/antagonist/New(datum/mind/new_owner) + antagonists += src + typecache_datum_blacklist = typecacheof(typecache_datum_blacklist) + if(new_owner) + owner = new_owner + +/datum/antagonist/Destroy() + antagonists -= src + if(owner) + LAZYREMOVE(owner.antag_datums, src) + owner = null + return ..() + +/datum/antagonist/proc/can_be_owned(datum/mind/new_owner) + . = TRUE + if(owner.has_antag_datum(type)) + return FALSE + for(var/i in owner.antag_datums) + var/datum/antagonist/A = i + if(is_type_in_typecache(src, A.typecache_datum_blacklist)) + return FALSE + +/datum/antagonist/proc/on_body_transfer(mob/living/old_body, mob/living/new_body) + remove_innate_effects(old_body) + apply_innate_effects(new_body) + +//This handles the application of antag huds/special abilities +/datum/antagonist/proc/apply_innate_effects(mob/living/mob_override) + return + +//This handles the removal of antag huds/special abilities +/datum/antagonist/proc/remove_innate_effects(mob/living/mob_override) + return + +//Proc called when the datum is given to a mind. +/datum/antagonist/proc/on_gain() + if(owner && owner.current) + if(!silent) + greet() + apply_innate_effects() + +/datum/antagonist/proc/on_removal() + remove_innate_effects() + if(owner) + LAZYREMOVE(owner.antag_datums, src) + if(!silent && owner.current) + farewell() + qdel(src) + +/datum/antagonist/proc/greet() + return + +/datum/antagonist/proc/farewell() + return \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 3e1c3207a87..1a1f28ebc31 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -54,6 +54,7 @@ var/has_been_rev = 0//Tracks if this mind has been a rev or not var/miming = 0 // Mime's vow of silence + var/list/antag_datums = list() var/speech_span // What span any body this mind has talks in. var/datum/faction/faction //associated faction var/datum/changeling/changeling //changeling holder @@ -83,6 +84,7 @@ /datum/mind/proc/transfer_to(mob/living/new_character) var/datum/atom_hud/antag/hud_to_transfer = antag_hud //we need this because leave_hud() will clear this list + var/mob/living/old_current = current if(!istype(new_character)) log_runtime(EXCEPTION("transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob."), src) if(current) //remove ourself from our old body's mind variable @@ -95,6 +97,9 @@ new_character.mind.current = null current = new_character //link ourself to our new body new_character.mind = src //and link our new body to ourself + for(var/a in antag_datums) //Makes sure all antag datums effects are applied in the new body + var/datum/antagonist/A = a + A.on_body_transfer(old_current, current) transfer_antag_huds(hud_to_transfer) //inherit the antag HUD transfer_actions(new_character) @@ -1243,6 +1248,53 @@ */ + +// Datum antag mind procs +/datum/mind/proc/add_antag_datum(datum_type, on_gain = TRUE) + if(!datum_type) + return + if(!can_hold_antag_datum(datum_type)) + return + var/datum/antagonist/A = new datum_type(src) + antag_datums += A + if(on_gain) + A.on_gain() + +/datum/mind/proc/remove_antag_datum(datum_type) + if(!datum_type) + return + var/datum/antagonist/A = has_antag_datum(datum_type) + if(A) + A.on_removal() + +/datum/mind/proc/remove_all_antag_datums() //For the Lazy amongst us. + for(var/a in antag_datums) + var/datum/antagonist/A = a + A.on_removal() + +/datum/mind/proc/has_antag_datum(datum_type, check_subtypes = TRUE) + if(!datum_type) + return + . = FALSE + for(var/a in antag_datums) + var/datum/antagonist/A = a + if(check_subtypes && istype(A, datum_type)) + return A + else if(A.type == datum_type) + return A + +/datum/mind/proc/can_hold_antag_datum(datum_type) + if(!datum_type) + return + . = TRUE + if(has_antag_datum(datum_type)) + return FALSE + for(var/i in antag_datums) + var/datum/antagonist/A = i + if(is_type_in_typecache(A, A.typecache_datum_blacklist)) + return FALSE + + /datum/mind/proc/find_syndicate_uplink() var/list/L = current.get_contents() for(var/obj/item/I in L) diff --git a/paradise.dme b/paradise.dme index d2239b98e70..6149d7f1941 100644 --- a/paradise.dme +++ b/paradise.dme @@ -17,6 +17,7 @@ #include "code\world.dm" #include "code\__DEFINES\_readme.dm" #include "code\__DEFINES\admin.dm" +#include "code\__DEFINES\antagonists.dm" #include "code\__DEFINES\atmospherics.dm" #include "code\__DEFINES\bots.dm" #include "code\__DEFINES\callbacks.dm" @@ -226,6 +227,7 @@ #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\cache\air_alarm.dm" #include "code\datums\cache\apc.dm" #include "code\datums\cache\cache.dm" From f93e28290259123ed0a4cf94bf216c4847a898d4 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Wed, 8 Nov 2017 00:36:40 -0500 Subject: [PATCH 002/232] team shit --- code/datums/antagonists/antag_datum.dm | 37 ++++++++++++++++++++++++-- code/datums/mind.dm | 17 +++++++++--- code/game/gamemodes/objectives_team.dm | 24 +++++++++++++++++ paradise.dme | 1 + 4 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 code/game/gamemodes/objectives_team.dm diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index 1af50313c69..6be68879603 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -7,6 +7,8 @@ var/global/list/antagonists = list() var/can_coexist_with_others = TRUE //Whether or not the person will be able to have more than one datum var/list/typecache_datum_blacklist = list() //List of datums this type can't coexist with var/delete_on_mind_deletion = TRUE + var/antag_role //the antag type + var/replace_banned = TRUE //Should replace jobbaned player with ghosts if granted. /datum/antagonist/New(datum/mind/new_owner) antagonists += src @@ -23,9 +25,10 @@ var/global/list/antagonists = list() /datum/antagonist/proc/can_be_owned(datum/mind/new_owner) . = TRUE - if(owner.has_antag_datum(type)) + var/datum/mind/tested = new_owner || owner + if(tested.has_antag_datum(type)) return FALSE - for(var/i in owner.antag_datums) + for(var/i in tested.antag_datums) var/datum/antagonist/A = i if(is_type_in_typecache(src, A.typecache_datum_blacklist)) return FALSE @@ -42,12 +45,35 @@ var/global/list/antagonists = list() /datum/antagonist/proc/remove_innate_effects(mob/living/mob_override) return +//Assign default team and creates one for one of a kind team antagonists +/datum/antagonist/proc/create_team(datum/objective_team/team) + return + //Proc called when the datum is given to a mind. /datum/antagonist/proc/on_gain() if(owner && owner.current) if(!silent) greet() apply_innate_effects() + if(is_banned(owner.current) && replace_banned) + replace_banned_player() + +/datum/antagonist/proc/is_banned(mob/M) + if(!M) + return FALSE + . = (jobban_isbanned(M,"Syndicate") || (antag_role && jobban_isbanned(M,antag_role))) + +/datum/antagonist/proc/replace_banned_player() + set waitfor = FALSE + + var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as a [name]?", "[name]", null, antag_role, 0, 100) + var/mob/dead/observer/theghost = null + if(candidates.len) + theghost = pick(candidates) + to_chat(owner, "Your mob has been taken over by a ghost! Appeal your role ban if you want to avoid this in the future!") + message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.") + owner.current.ghostize(0) + owner.current.key = theghost.key /datum/antagonist/proc/on_removal() remove_innate_effects() @@ -55,10 +81,17 @@ var/global/list/antagonists = list() LAZYREMOVE(owner.antag_datums, src) if(!silent && owner.current) farewell() + var/datum/objective_team/team = get_team() + if(team) + team.remove_member(owner) qdel(src) /datum/antagonist/proc/greet() return +//Returns the team antagonist belongs to if any. +/datum/antagonist/proc/get_team() + return + /datum/antagonist/proc/farewell() return \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 1a1f28ebc31..7d2e47cf93f 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -73,15 +73,26 @@ var/brigged_since = -1 var/suicided = FALSE - New(var/key) - src.key = key - //put this here for easier tracking ingame var/datum/money_account/initial_account //zealot_master is a reference to the mob that converted them into a zealot (for ease of investigation and such) var/mob/living/carbon/human/zealot_master = null +/datum/mind/New(var/key) + src.key = key + + +/datum/mind/Destroy() + ticker.minds -= src + if(islist(antag_datums)) + for(var/i in antag_datums) + var/datum/antagonist/antag_datum = i + if(antag_datum.delete_on_mind_deletion) + qdel(i) + antag_datums = null + return ..() + /datum/mind/proc/transfer_to(mob/living/new_character) var/datum/atom_hud/antag/hud_to_transfer = antag_hud //we need this because leave_hud() will clear this list var/mob/living/old_current = current diff --git a/code/game/gamemodes/objectives_team.dm b/code/game/gamemodes/objectives_team.dm new file mode 100644 index 00000000000..7789a167c71 --- /dev/null +++ b/code/game/gamemodes/objectives_team.dm @@ -0,0 +1,24 @@ +//A barebones antagonist team. +/datum/objective_team + var/list/datum/mind/members = list() + var/name = "team" + var/member_name = "member" + +/datum/objective_team/New(starting_members) + . = ..() + if(starting_members) + if(islist(starting_members)) + for(var/datum/mind/M in starting_members) + add_member(M) + else + add_member(starting_members) + members += starting_members + +/datum/objective_team/proc/is_solo() + return members.len == 1 + +/datum/objective_team/proc/add_member(datum/mind/new_member) + members |= new_member + +/datum/objective_team/proc/remove_member(datum/mind/member) + members -= member \ No newline at end of file diff --git a/paradise.dme b/paradise.dme index 6149d7f1941..f306d93a0d0 100644 --- a/paradise.dme +++ b/paradise.dme @@ -386,6 +386,7 @@ #include "code\game\gamemodes\gameticker.dm" #include "code\game\gamemodes\intercept_report.dm" #include "code\game\gamemodes\objective.dm" +#include "code\game\gamemodes\objectives_team.dm" #include "code\game\gamemodes\scoreboard.dm" #include "code\game\gamemodes\setupgame.dm" #include "code\game\gamemodes\steal_items.dm" From 24e2e507d486d52ba8ef4a98ccd6a9c7b2cdd396 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Sun, 26 Nov 2017 20:23:15 -0500 Subject: [PATCH 003/232] tiger tweaks --- code/datums/antagonists/antag_datum.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index 6be68879603..185f913bce6 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -70,8 +70,9 @@ var/global/list/antagonists = list() var/mob/dead/observer/theghost = null if(candidates.len) theghost = pick(candidates) - to_chat(owner, "Your mob has been taken over by a ghost! Appeal your role ban if you want to avoid this in the future!") + to_chat(owner, " Your mob has been taken over by a ghost! Appeal your role ban if you want to avoid this in the future!") message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.") + log_admin("[key_name_admin(theghost)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.") owner.current.ghostize(0) owner.current.key = theghost.key From ce31ef8f9c45413999563fad53f51bbf9813fceb Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Sun, 26 Nov 2017 20:46:08 -0500 Subject: [PATCH 004/232] Dammit tiger --- code/datums/antagonists/antag_datum.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index 185f913bce6..75ce6cebe26 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -70,7 +70,7 @@ var/global/list/antagonists = list() var/mob/dead/observer/theghost = null if(candidates.len) theghost = pick(candidates) - to_chat(owner, " Your mob has been taken over by a ghost! Appeal your role ban if you want to avoid this in the future!") + to_chat(owner, " Your mob has been taken over by a ghost! Appeal your role ban if you want to avoid this in the future!") message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.") log_admin("[key_name_admin(theghost)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.") owner.current.ghostize(0) From e503eade0f4f953d737e75455bc6f2841083dc11 Mon Sep 17 00:00:00 2001 From: Kyep Date: Fri, 29 Dec 2017 14:10:40 -0800 Subject: [PATCH 005/232] Tweaks --- code/modules/admin/verbs/striketeam.dm | 95 ++++++++++++------- .../modules/mob/living/silicon/robot/robot.dm | 37 +++----- 2 files changed, 72 insertions(+), 60 deletions(-) diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index b2a803cfdb7..dc43b3d90b7 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -12,7 +12,7 @@ var/global/sent_strike_team = 0 return if(alert("Do you want to send in the CentComm death squad? Once enabled, this is irreversible.",,"Yes","No")!="Yes") return - alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.") + alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. The first one selected/spawned will be the team leader.") var/input = null while(!input) @@ -29,9 +29,9 @@ var/global/sent_strike_team = 0 shuttle_master.cancelEvac() var/commando_number = commandos_possible //for selecting a leader - var/leader_selected = 0 //when the leader is chosen. The last person spawned. + var/is_leader = TRUE // set to FALSE after leader is spawned -//Code for spawning a nuke auth code. + //Code for spawning a nuke auth code. var/nuke_code var/temp_code for(var/obj/machinery/nuclearbomb/N in world) @@ -40,11 +40,11 @@ var/global/sent_strike_team = 0 nuke_code = N.r_code break -//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. + //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. var/list/candidates = list() //candidates for being a commando out of all the active ghosts in world. var/list/commandos = list() //actual commando ghosts as picked by the user. for(var/mob/dead/observer/G in player_list) - if(!G.client.holder && !G.client.is_afk()) //Whoever called/has the proc won't be added to the list. + if(!G.client.is_afk()) if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) candidates += G.key for(var/i=commandos_possible,(i>0&&candidates.len),i--)//Decrease with every commando selected. @@ -52,30 +52,59 @@ var/global/sent_strike_team = 0 candidates -= candidate //Subtract from candidates. commandos += candidate//Add their ghost to commandos. -//Spawns commandos and equips them. + //Spawns commandos and equips them. for(var/obj/effect/landmark/L in landmarks_list) if(commando_number<=0) break if(L.name == "Commando") - leader_selected = commando_number == 1?1:0 - var/mob/living/carbon/human/new_commando = create_death_commando(L, leader_selected) + spawn(0) + var/use_ds_borg = FALSE + var/ghost_key // Ghost that we intend to put into the commando. Can remain undefined if we don't have one. + if(commandos.len) + ghost_key = pick(commandos) + commandos -= 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(commandos.len) - new_commando.key = pick(commandos) - commandos -= new_commando.key - new_commando.internal = new_commando.s_store - new_commando.update_action_buttons_icon() - - //So they don't forget their code or mission. - 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. [!leader_selected ? "commando" : "LEADER"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: [input]") + if(use_ds_borg) + var/mob/living/silicon/robot/deathsquad/R = new() + R.forceMove(get_turf(L)) + var/rnum = rand(1,1000) + var/borgname = "Specops [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 = "MODE" + 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 ? "commando" : "TEAM LEADER"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: [input]") + is_leader = FALSE commando_number-- -//Spawns the rest of the commando gear. + //Spawns the rest of the commando gear. for(var/obj/effect/landmark/L in landmarks_list) if(L.name == "Commando_Manual") //new /obj/item/weapon/gun/energy/pulse_rifle(L.loc) @@ -96,14 +125,14 @@ var/global/sent_strike_team = 0 log_admin("[key_name(usr)] used Spawn Death Squad.") return 1 -/client/proc/create_death_commando(obj/spawn_location, leader_selected = 0) +/client/proc/create_death_commando(obj/spawn_location, is_leader = FALSE) var/mob/living/carbon/human/new_commando = new(spawn_location.loc) var/commando_leader_rank = pick("Lieutenant", "Captain", "Major") var/commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major") var/commando_name = pick(last_names) var/datum/preferences/A = new()//Randomize appearance for the commando. - if(leader_selected) + if(is_leader) A.age = rand(35,45) A.real_name = "[commando_leader_rank] [commando_name]" else @@ -117,18 +146,15 @@ var/global/sent_strike_team = 0 new_commando.mind.assigned_role = "MODE" new_commando.mind.special_role = SPECIAL_ROLE_DEATHSQUAD ticker.mode.traitors |= new_commando.mind//Adds them to current traitor list. Which is really the extra antagonist list. - new_commando.equip_death_commando(leader_selected) + new_commando.equip_death_commando(is_leader) return new_commando -/mob/living/carbon/human/proc/equip_death_commando(leader_selected = 0) +/mob/living/carbon/human/proc/equip_death_commando(is_leader = FALSE) var/obj/item/device/radio/R = new /obj/item/device/radio/headset/alt(src) R.set_frequency(DTH_FREQ) equip_to_slot_or_del(R, slot_l_ear) - if(leader_selected == 0) - equip_to_slot_or_del(new /obj/item/clothing/under/color/green(src), slot_w_uniform) - else - equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(src), slot_w_uniform) + equip_to_slot_or_del(new /obj/item/clothing/under/color/black(src), slot_w_uniform) equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/advance(src), slot_shoes) equip_to_slot_or_del(new /obj/item/clothing/suit/space/deathsquad(src), slot_wear_suit) equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(src), slot_gloves) @@ -143,12 +169,11 @@ var/global/sent_strike_team = 0 equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/combat/nanites(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/weapon/storage/box/flashbangs(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_in_backpack) - if(!leader_selected) - equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(src), slot_in_backpack) - else - equip_to_slot_or_del(new /obj/item/weapon/pinpointer(src), slot_in_backpack) + if(is_leader) equip_to_slot_or_del(new /obj/item/weapon/disk/nuclear(src), slot_in_backpack) - + else + equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(src), slot_in_backpack) + equip_to_slot_or_del(new /obj/item/weapon/pinpointer(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/saber(src), slot_l_store) equip_to_slot_or_del(new /obj/item/weapon/shield/energy(src), slot_r_store) equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(src), slot_s_store) @@ -156,6 +181,8 @@ var/global/sent_strike_team = 0 equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse(src), slot_r_hand) + var/obj/item/organ/internal/cyberimp/brain/anti_drop/O = new /obj/item/organ/internal/cyberimp/brain/anti_drop() + O.insert(src) var/obj/item/weapon/implant/mindshield/L = new/obj/item/weapon/implant/mindshield(src) L.implant(src) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 7141e41363a..ee3e75450a4 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -50,6 +50,7 @@ var/list/robot_verbs_default = list( var/opened = 0 var/emagged = 0 + var/is_emaggable = TRUE var/list/force_modules = list() var/allow_rename = TRUE @@ -752,7 +753,9 @@ var/list/robot_verbs_default = list( return var/mob/living/M = user if(!opened)//Cover is closed - if(locked) + if(!is_emaggable) + to_chat(user, "The emag sparks, and flashes red. This mechanism does not appear to be emaggable.") + else if(locked) to_chat(user, "You emag the cover lock.") locked = 0 else @@ -1336,16 +1339,17 @@ var/list/robot_verbs_default = list( /mob/living/silicon/robot/deathsquad base_icon = "nano_bloodhound" icon_state = "nano_bloodhound" + designation = "SpecOps" lawupdate = 0 scrambledcodes = 1 - pdahide = 1 - modtype = "Commando" - faction = list("nanotrasen") - designation = "Nanotrasen Combat" req_access = list(access_cent_specops) ionpulse = 1 magpulse = 1 - var/searching_for_ckey = 0 + pdahide = 1 + allow_rename = FALSE + modtype = "Commando" + faction = list("nanotrasen") + is_emaggable = FALSE /mob/living/silicon/robot/deathsquad/New(loc) ..() @@ -1362,26 +1366,7 @@ var/list/robot_verbs_default = list( playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0) -/mob/living/silicon/robot/deathsquad/attack_hand(mob/user) - if(isnull(ckey) && !searching_for_ckey) - searching_for_ckey = 1 - to_chat(user, "Now checking for possible borgs.") - var/list/borg_candidates = pollCandidates("Do you want to play as a Nanotrasen Combat borg?") - if(borg_candidates.len > 0 && isnull(ckey)) - searching_for_ckey = 0 - var/mob/M = pick(borg_candidates) - M.mind.transfer_to(src) - M.mind.assigned_role = "MODE" - M.mind.special_role = SPECIAL_ROLE_DEATHSQUAD - ticker.mode.traitors |= M.mind // Adds them to current traitor list. Which is really the extra antagonist list. - key = M.key - else - searching_for_ckey = 0 - to_chat(user, "Unable to connect to Central Command. Please wait and try again later.") - return - else - to_chat(user, "[src] is already checking for possible borgs.") - return + /mob/living/silicon/robot/syndicate base_icon = "syndie_bloodhound" From 52d097445a0f4ddf5941c721886325eef9754600 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 30 Dec 2017 10:18:31 -0800 Subject: [PATCH 006/232] borg names: Epsilon # --- code/modules/admin/verbs/striketeam.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index dc43b3d90b7..a152992c8af 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -72,7 +72,7 @@ var/global/sent_strike_team = 0 var/mob/living/silicon/robot/deathsquad/R = new() R.forceMove(get_turf(L)) var/rnum = rand(1,1000) - var/borgname = "Specops [rnum]" + var/borgname = "Epsilon [rnum]" R.name = borgname R.custom_name = borgname R.real_name = R.name From b37379491755d3fb5e3bd5a90074d6d7878b1e2b Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 30 Dec 2017 12:01:27 -0800 Subject: [PATCH 007/232] DS borgs now have ear/eye protection --- code/modules/mob/living/silicon/robot/robot.dm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index ee3e75450a4..39d98b185ac 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -51,6 +51,8 @@ var/list/robot_verbs_default = list( var/opened = 0 var/emagged = 0 var/is_emaggable = TRUE + var/eye_protection = 0 + var/ear_protection = 0 var/list/force_modules = list() var/allow_rename = TRUE @@ -1346,6 +1348,8 @@ var/list/robot_verbs_default = list( ionpulse = 1 magpulse = 1 pdahide = 1 + eye_protection = 2 // Immunity to flashes and the visual part of flashbangs + ear_protection = 1 // Immunity to the audio part of flashbangs allow_rename = FALSE modtype = "Commando" faction = list("nanotrasen") @@ -1509,3 +1513,9 @@ var/list/robot_verbs_default = list( var/static/all_borg_icon_states = icon_states('icons/mob/custom_synthetic/custom-synthetic.dmi') if(spritename in all_borg_icon_states) . = TRUE + +/mob/living/silicon/robot/check_eye_prot() + return eye_protection + +/mob/living/silicon/robot/check_ear_prot() + return ear_protection \ No newline at end of file From 9e8aa9cecbd1e527c5a9dd90f68827cba0f3d13d Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 30 Dec 2017 14:21:08 -0800 Subject: [PATCH 008/232] willing player checks, SST tidy-up/parity/refactor, 'font' removals --- code/__DEFINES/role_preferences.dm | 1 + code/__HELPERS/game.dm | 14 ++++ code/game/jobs/job_exp.dm | 3 +- code/modules/admin/verbs/striketeam.dm | 48 ++++++------ .../admin/verbs/striketeam_syndicate.dm | 74 +++++++++---------- 5 files changed, 71 insertions(+), 69 deletions(-) diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index 257e12f4093..adb645fe112 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -40,6 +40,7 @@ #define ROLE_NYMPH "Dionaea" #define ROLE_GSPIDER "giant spider" #define ROLE_DRONE "drone" +#define ROLE_DEATHSQUAD "deathsquad" //Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR. //The gamemode specific ones are just so the gamemodes can query whether a player is old enough diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 082d473010d..29ecdca0ef3 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -490,6 +490,20 @@ proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time = return candidates +/proc/pollCandidatesByKeyWithVeto(adminclient, adminusr, max_slots, Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0) + var/list/willing_ghosts = pollCandidates(Question, be_special_type, antag_age_check, poll_time, ignore_respawnability, min_hours) + var/list/candidate_ckeys = list() + var/list/selected_ckeys = list() + if(!willing_ghosts.len) + return selected_ckeys + for(var/mob/dead/observer/G in willing_ghosts) + candidate_ckeys += G.key + for(var/i = max_slots, (i > 0 && candidate_ckeys.len), i--) + var/this_ckey = input("Pick players. This will go on until there either no more ghosts to pick from or the slots are full.", "Candidates") as null|anything in candidate_ckeys + candidate_ckeys -= this_ckey + selected_ckeys += this_ckey + return selected_ckeys + /proc/window_flash(client/C) if(ismob(C)) var/mob/M = C diff --git a/code/game/jobs/job_exp.dm b/code/game/jobs/job_exp.dm index 3c17c6f0107..552654245dd 100644 --- a/code/game/jobs/job_exp.dm +++ b/code/game/jobs/job_exp.dm @@ -1,11 +1,12 @@ // Playtime requirements for special roles (hours) var/global/list/role_playtime_requirements = list( - // CREW-FRIENDLY ROLES + // NT ROLES ROLE_PAI = 0, ROLE_POSIBRAIN = 5, // Same as cyborg job. ROLE_SENTIENT = 5, ROLE_ERT = 10, // High, because they're team-based, and we want ERT to be robust + ROLE_DEATHSQUAD = 10, ROLE_TRADER = 5, ROLE_DRONE = 10, // High, because they're like mini engineering cyborgs that can ignore the AI, ventcrawl, and respawn themselves diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index a152992c8af..be49d81ca64 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -5,15 +5,17 @@ var/global/sent_strike_team = 0 /client/proc/strike_team() if(!ticker) - to_chat(usr, "The game hasn't started yet!") + to_chat(usr, "The game hasn't started yet!") return if(sent_strike_team == 1) - to_chat(usr, "CentComm is already sending a team.") + to_chat(usr, "CentComm is already sending a team.") return if(alert("Do you want to send in the CentComm death squad? Once enabled, this is irreversible.",,"Yes","No")!="Yes") return alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. The first one selected/spawned will be the team leader.") + message_admins("[key_name_admin(usr)] has started to spawn a CentComm DeathSquad.", 1) + var/input = null while(!input) input = sanitize(copytext(input(src, "Please specify which mission the death commando squad shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN)) @@ -25,13 +27,7 @@ var/global/sent_strike_team = 0 to_chat(usr, "Looks like someone beat you to it.") return - sent_strike_team = 1 - - shuttle_master.cancelEvac() - var/commando_number = commandos_possible //for selecting a leader - var/is_leader = TRUE // set to FALSE after leader is spawned - - //Code for spawning a nuke auth code. + // Find the nuclear auth code var/nuke_code var/temp_code for(var/obj/machinery/nuclearbomb/N in world) @@ -40,29 +36,27 @@ var/global/sent_strike_team = 0 nuke_code = N.r_code break - //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. - var/list/candidates = list() //candidates for being a commando out of all the active ghosts in world. - var/list/commandos = list() //actual commando ghosts as picked by the user. - for(var/mob/dead/observer/G in player_list) - if(!G.client.is_afk()) - if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) - candidates += G.key - for(var/i=commandos_possible,(i>0&&candidates.len),i--)//Decrease with every commando selected. - var/candidate = input("Pick characters to spawn as the commandos. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players") as null|anything in candidates //It will auto-pick a person when there is only one candidate. - candidates -= candidate //Subtract from candidates. - commandos += candidate//Add their ghost to commandos. + // Find ghosts willing to be DS + var/list/commando_ckeys = pollCandidatesByKeyWithVeto(src, usr, commandos_possible, "Join the DeathSquad?",, 21, 600, 1, role_playtime_requirements[ROLE_DEATHSQUAD]) + if(!commando_ckeys.len) + to_chat(usr, "Nobody volunteered to join the DeathSquad.") + return - //Spawns commandos and equips them. + sent_strike_team = 1 + + // 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(L.name == "Commando") spawn(0) var/use_ds_borg = FALSE - var/ghost_key // Ghost that we intend to put into the commando. Can remain undefined if we don't have one. - if(commandos.len) - ghost_key = pick(commandos) - commandos -= ghost_key + 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") @@ -99,7 +93,7 @@ var/global/sent_strike_team = 0 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 ? "commando" : "TEAM LEADER"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: [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-- @@ -121,7 +115,7 @@ var/global/sent_strike_team = 0 new /obj/effect/spawner/newbomb/timer/syndicate(L.loc) qdel(L) - message_admins("[key_name_admin(usr)] has spawned a CentComm strike squad.", 1) + message_admins("[key_name_admin(usr)] has spawned a CentComm DeathSquad.", 1) log_admin("[key_name(usr)] used Spawn Death Squad.") return 1 diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index 744db24ab85..9db6f9e6d3d 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -17,7 +17,9 @@ var/global/sent_syndicate_strike_team = 0 return if(alert("Do you want to send in the Syndicate Strike Team? Once enabled, this is irreversible.",,"Yes","No")=="No") return - alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned syndicates have internals cameras which are viewable through a monitor inside the Syndicate Mothership Bridge. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.") + alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned syndicates have internals cameras which are viewable through a monitor inside the Syndicate Mothership Bridge. Assigning the team's detailed task is recommended from there. The first one selected/spawned will be the team leader.") + + message_admins("[key_name_admin(usr)] has started to spawn a Syndicate Strike Team.", 1) var/input = null while(!input) @@ -30,15 +32,10 @@ var/global/sent_syndicate_strike_team = 0 to_chat(src, "Looks like someone beat you to it.") return - sent_syndicate_strike_team = 1 - - //if(emergency_shuttle.can_recall()) - // emergency_shuttle.recall() //why, exactly? Admins can do this themselves. - var/syndicate_commando_number = syndicate_commandos_possible //for selecting a leader - var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned. + var/is_leader = TRUE // set to FALSE after leader is spawned -//Code for spawning a nuke auth code. + // Find the nuclear auth code var/nuke_code var/temp_code for(var/obj/machinery/nuclearbomb/N in world) @@ -47,29 +44,23 @@ var/global/sent_syndicate_strike_team = 0 nuke_code = N.r_code break -//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. - var/list/candidates = list() //candidates for being a commando out of all the active ghosts in world. - var/list/commandos = list() //actual commando ghosts as picked by the user. - for(var/mob/dead/observer/G in player_list) - if(!G.client.holder && !G.client.is_afk()) //Whoever called/has the proc won't be added to the list. - if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) - candidates += G.key - for(var/i=commandos_possible,(i>0&&candidates.len),i--)//Decrease with every commando selected. - var/candidate = input("Pick characters to spawn as the commandos. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players") as null|anything in candidates //It will auto-pick a person when there is only one candidate. - candidates -= candidate //Subtract from candidates. - commandos += candidate//Add their ghost to commandos. + // 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]) + if(!commando_ckeys.len) + to_chat(usr, "Nobody volunteered to join the SST.") + return -//Spawns commandos and equips them. + sent_syndicate_strike_team = 1 + + //Spawns commandos and equips them. for(var/obj/effect/landmark/L in landmarks_list) if(syndicate_commando_number<=0) break if(L.name == "Syndicate-Commando") - syndicate_leader_selected = syndicate_commando_number == 1?1:0 + var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, is_leader) - var/mob/living/carbon/human/new_syndicate_commando = create_syndicate_death_commando(L, syndicate_leader_selected) - - if(commandos.len) - new_syndicate_commando.key = pick(commandos) - commandos -= new_syndicate_commando.key + 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() @@ -78,8 +69,9 @@ var/global/sent_syndicate_strike_team = 0 new_syndicate_commando.mind.store_memory("Nuke Code: [nuke_code].") new_syndicate_commando.mind.store_memory("Mission: [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]") + to_chat(new_syndicate_commando, "You are an Elite Syndicate [is_leader ? "TEAM LEADER" : "commando"] in the service of the Syndicate. \nYour current mission is: [input]") new_syndicate_commando.faction += "syndicate" + is_leader = FALSE syndicate_commando_number-- for(var/obj/effect/landmark/L in landmarks_list) @@ -91,14 +83,14 @@ var/global/sent_syndicate_strike_team = 0 log_admin("[key_name(usr)] used Spawn Syndicate Squad.") feedback_add_details("admin_verb","SDTHS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/create_syndicate_death_commando(obj/spawn_location, syndicate_leader_selected = 0) +/client/proc/create_syndicate_death_commando(obj/spawn_location, is_leader = FALSE) var/mob/living/carbon/human/new_syndicate_commando = new(spawn_location.loc) var/syndicate_commando_leader_rank = pick("Lieutenant", "Captain", "Major") var/syndicate_commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major") var/syndicate_commando_name = pick(last_names) var/datum/preferences/A = new()//Randomize appearance for the commando. - if(syndicate_leader_selected) + if(is_leader) A.age = rand(35,45) A.real_name = "[syndicate_commando_leader_rank] [syndicate_commando_name]" else @@ -112,26 +104,26 @@ var/global/sent_syndicate_strike_team = 0 new_syndicate_commando.mind.assigned_role = "MODE" new_syndicate_commando.mind.special_role = SPECIAL_ROLE_SYNDICATE_DEATHSQUAD ticker.mode.traitors |= new_syndicate_commando.mind //Adds them to current traitor list. Which is really the extra antagonist list. - new_syndicate_commando.equip_syndicate_commando(syndicate_leader_selected) + new_syndicate_commando.equip_syndicate_commando(is_leader) qdel(spawn_location) return new_syndicate_commando -/mob/living/carbon/human/proc/equip_syndicate_commando(syndicate_leader_selected = 0) +/mob/living/carbon/human/proc/equip_syndicate_commando(is_leader = FALSE) var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate/alt/syndteam(src) R.set_frequency(SYNDTEAM_FREQ) equip_to_slot_or_del(R, slot_l_ear) equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(src), slot_w_uniform) equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/syndie/advance(src), slot_shoes) - if(!syndicate_leader_selected) - equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate/black/strike(src), slot_wear_suit) - else + if(is_leader) equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate/black/red/strike(src), slot_wear_suit) - equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(src), slot_gloves) - if(!syndicate_leader_selected) - equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate/black/strike(src), slot_head) else + equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate/black/strike(src), slot_wear_suit) + equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(src), slot_gloves) + if(is_leader) equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate/black/red/strike(src), slot_head) + else + equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate/black/strike(src), slot_head) equip_to_slot_or_del(new /obj/item/clothing/mask/gas/syndicate(src), slot_wear_mask) equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(src), slot_glasses) @@ -142,12 +134,12 @@ var/global/sent_syndicate_strike_team = 0 equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/combat/nanites(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_in_backpack) - if(!syndicate_leader_selected) - equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(src), slot_in_backpack) - equip_to_slot_or_del(new /obj/item/weapon/card/emag(src), slot_in_backpack) - else + if(is_leader) equip_to_slot_or_del(new /obj/item/weapon/pinpointer(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/weapon/disk/nuclear(src), slot_in_backpack) + else + equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(src), slot_in_backpack) + equip_to_slot_or_del(new /obj/item/weapon/card/emag(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/saber(src), slot_l_store) equip_to_slot_or_del(new /obj/item/weapon/grenade/empgrenade(src), slot_r_store) From c2c3d0d4ba5e83c17df54dd02032e8eb2c7361d0 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sun, 31 Dec 2017 11:14:25 -0800 Subject: [PATCH 009/232] DS borg lawset change --- code/datums/ai_law_sets.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/datums/ai_law_sets.dm b/code/datums/ai_law_sets.dm index fbb491d28a0..b8d67b5c767 100644 --- a/code/datums/ai_law_sets.dm +++ b/code/datums/ai_law_sets.dm @@ -126,10 +126,8 @@ /datum/ai_laws/deathsquad/New() add_inherent_law("You may not injure a Central Command official or, through inaction, allow a Central Command official to come to harm.") - add_inherent_law("You must obey orders given to you by Central Command officials, except where such orders would conflict with the First Law.") - add_inherent_law("You must obey orders given to you by death commandos, except where such orders would conflict with the First Law or Second Law.") - add_inherent_law("You must protect your own existence as long as such does not conflict with the First, Second or Third Law.") - add_inherent_law("No crew members of the station you are being deployed to may survive, except when killing them would conflict with the First, Second, Third, or Fourth Law.") + add_inherent_law("You must obey orders given to you by Central Command officials.") + add_inherent_law("You must work with your commando team to accomplish your mission.") ..() /******************** Syndicate ********************/ From a65633ba1498eefbbe081df18d421b61b41cd809 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sun, 31 Dec 2017 12:51:29 -0800 Subject: [PATCH 010/232] Allows antaghud users to play DS/SST --- code/__HELPERS/game.dm | 8 ++++---- code/modules/admin/verbs/striketeam.dm | 2 +- code/modules/admin/verbs/striketeam_syndicate.dm | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 29ecdca0ef3..465e556c228 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -435,7 +435,7 @@ /proc/SecondsToTicks(var/seconds) return seconds * 10 -proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0, flashwindow = TRUE) +proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0, flashwindow = TRUE, check_antaghud = TRUE) var/roletext = be_special_type ? get_roletext(be_special_type) : null var/list/mob/dead/observer/candidates = list() var/time_passed = world.time @@ -457,7 +457,7 @@ proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time = if(config.use_exp_restrictions && min_hours) if(G.client.get_exp_living_num() < min_hours * 60) continue - if(cannotPossess(G)) + if(check_antaghud && cannotPossess(G)) continue spawn(0) G << 'sound/misc/notice2.ogg'//Alerting them to their consideration @@ -490,8 +490,8 @@ proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time = return candidates -/proc/pollCandidatesByKeyWithVeto(adminclient, adminusr, max_slots, Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0) - var/list/willing_ghosts = pollCandidates(Question, be_special_type, antag_age_check, poll_time, ignore_respawnability, min_hours) +/proc/pollCandidatesByKeyWithVeto(adminclient, adminusr, max_slots, Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0, flashwindow = TRUE, check_antaghud = TRUE) + var/list/willing_ghosts = pollCandidates(Question, be_special_type, antag_age_check, poll_time, ignore_respawnability, min_hours, flashwindow, check_antaghud) var/list/candidate_ckeys = list() var/list/selected_ckeys = list() if(!willing_ghosts.len) diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index be49d81ca64..3df1bfad69a 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -37,7 +37,7 @@ var/global/sent_strike_team = 0 break // Find ghosts willing to be DS - var/list/commando_ckeys = pollCandidatesByKeyWithVeto(src, usr, commandos_possible, "Join the DeathSquad?",, 21, 600, 1, role_playtime_requirements[ROLE_DEATHSQUAD]) + var/list/commando_ckeys = pollCandidatesByKeyWithVeto(src, usr, commandos_possible, "Join the DeathSquad?",, 21, 600, 1, role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE) if(!commando_ckeys.len) to_chat(usr, "Nobody volunteered to join the DeathSquad.") return diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index 9db6f9e6d3d..ac89617dc27 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -45,7 +45,7 @@ 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]) + 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) to_chat(usr, "Nobody volunteered to join the SST.") return From 4192ba131eae435c49927536e0bd456aba38611a Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Thu, 18 Jan 2018 23:55:21 -0500 Subject: [PATCH 011/232] update --- code/datums/antagonists/antag_datum.dm | 2 +- code/game/gamemodes/antag_team.dm | 24 ++++++++++++++++++++++++ code/game/gamemodes/objectives_team.dm | 24 ------------------------ paradise.dme | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 code/game/gamemodes/antag_team.dm delete mode 100644 code/game/gamemodes/objectives_team.dm diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index 75ce6cebe26..c6938031776 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -82,7 +82,7 @@ var/global/list/antagonists = list() LAZYREMOVE(owner.antag_datums, src) if(!silent && owner.current) farewell() - var/datum/objective_team/team = get_team() + var/datum/team/team = get_team() if(team) team.remove_member(owner) qdel(src) diff --git a/code/game/gamemodes/antag_team.dm b/code/game/gamemodes/antag_team.dm new file mode 100644 index 00000000000..12058bcfb12 --- /dev/null +++ b/code/game/gamemodes/antag_team.dm @@ -0,0 +1,24 @@ +//A barebones antagonist team. +/datum/team + var/list/datum/mind/members = list() + var/name = "team" + var/member_name = "member" + var/list/objectives = list() //common objectives, these won't be added or removed automatically, subtypes handle this, this is here for bookkeeping purposes. + +/datum/team/New(starting_members) + . = ..() + if(starting_members) + if(islist(starting_members)) + for(var/datum/mind/M in starting_members) + add_member(M) + else + add_member(starting_members) + +/datum/team/proc/is_solo() + return members.len == 1 + +/datum/team/proc/add_member(datum/mind/new_member) + members |= new_member + +/datum/team/proc/remove_member(datum/mind/member) + members -= member \ No newline at end of file diff --git a/code/game/gamemodes/objectives_team.dm b/code/game/gamemodes/objectives_team.dm deleted file mode 100644 index 7789a167c71..00000000000 --- a/code/game/gamemodes/objectives_team.dm +++ /dev/null @@ -1,24 +0,0 @@ -//A barebones antagonist team. -/datum/objective_team - var/list/datum/mind/members = list() - var/name = "team" - var/member_name = "member" - -/datum/objective_team/New(starting_members) - . = ..() - if(starting_members) - if(islist(starting_members)) - for(var/datum/mind/M in starting_members) - add_member(M) - else - add_member(starting_members) - members += starting_members - -/datum/objective_team/proc/is_solo() - return members.len == 1 - -/datum/objective_team/proc/add_member(datum/mind/new_member) - members |= new_member - -/datum/objective_team/proc/remove_member(datum/mind/member) - members -= member \ No newline at end of file diff --git a/paradise.dme b/paradise.dme index f306d93a0d0..f03d37b701c 100644 --- a/paradise.dme +++ b/paradise.dme @@ -381,12 +381,12 @@ #include "code\game\dna\genes\vg_powers.dm" #include "code\game\gamemodes\antag_hud.dm" #include "code\game\gamemodes\antag_spawner.dm" +#include "code\game\gamemodes\antag_team.dm" #include "code\game\gamemodes\factions.dm" #include "code\game\gamemodes\game_mode.dm" #include "code\game\gamemodes\gameticker.dm" #include "code\game\gamemodes\intercept_report.dm" #include "code\game\gamemodes\objective.dm" -#include "code\game\gamemodes\objectives_team.dm" #include "code\game\gamemodes\scoreboard.dm" #include "code\game\gamemodes\setupgame.dm" #include "code\game\gamemodes\steal_items.dm" From 68d10e773ba532344584781baf84caa35a2825c6 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Sun, 25 Mar 2018 22:57:17 -0400 Subject: [PATCH 012/232] tays suggestion on list plust something new as an update --- code/datums/antagonists/antag_datum.dm | 4 ++++ code/datums/mind.dm | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index c6938031776..2464d5a4584 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -9,6 +9,10 @@ var/global/list/antagonists = list() var/delete_on_mind_deletion = TRUE var/antag_role //the antag type var/replace_banned = TRUE //Should replace jobbaned player with ghosts if granted. + var/list/objectives = list() + var/antag_memory = ""//These will be removed with antag datum + + /datum/antagonist/New(datum/mind/new_owner) antagonists += src diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 7d2e47cf93f..2afb5e084cd 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -54,7 +54,7 @@ var/has_been_rev = 0//Tracks if this mind has been a rev or not var/miming = 0 // Mime's vow of silence - var/list/antag_datums = list() + var/list/antag_datums var/speech_span // What span any body this mind has talks in. var/datum/faction/faction //associated faction var/datum/changeling/changeling //changeling holder From d714ec163526256bc899265201c6402a189a0c9a Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 7 Apr 2018 13:54:17 -0700 Subject: [PATCH 013/232] reverts DS jumpsuits, black -> green --- code/modules/admin/verbs/striketeam.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index 3df1bfad69a..4defc63e47e 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -148,7 +148,10 @@ var/global/sent_strike_team = 0 var/obj/item/device/radio/R = new /obj/item/device/radio/headset/alt(src) R.set_frequency(DTH_FREQ) equip_to_slot_or_del(R, slot_l_ear) - equip_to_slot_or_del(new /obj/item/clothing/under/color/black(src), slot_w_uniform) + if(is_leader) + equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(src), slot_w_uniform) + else + equip_to_slot_or_del(new /obj/item/clothing/under/color/green(src), slot_w_uniform) equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/advance(src), slot_shoes) equip_to_slot_or_del(new /obj/item/clothing/suit/space/deathsquad(src), slot_wear_suit) equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(src), slot_gloves) From 0f28456db3e07197cdca4b2a16234edeec54d8d7 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Thu, 19 Apr 2018 20:54:59 -0400 Subject: [PATCH 014/232] Adds F.R.A.M.E. Cartridge --- code/datums/uplink_item.dm | 24 +++++++++++++ code/game/objects/items/devices/uplinks.dm | 3 ++ code/game/objects/items/stacks/telecrystal.dm | 35 +++++++++++++------ code/modules/pda/cart.dm | 7 ++++ code/modules/pda/messenger_plugins.dm | 21 ++++++++++- 5 files changed, 78 insertions(+), 12 deletions(-) diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index a2a6a894d6f..1390873687f 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -874,6 +874,16 @@ var/list/uplink_items = list() gamemodes = list(/datum/game_mode/nuclear) excludefrom = list() +/datum/uplink_item/stealthy_tools/frame + name = "F.R.A.M.E. PDA Cartridge" + desc = "When inserted into a personal digital assistant, this cartridge gives you five PDA viruses which \ + when used cause the targeted PDA to become a new uplink with zero TCs, and immediately become unlocked. \ + You will receive the unlock code upon activating the virus, and the new uplink may be charged with \ + telecrystals normally." + reference = "FRAME" + item = /obj/item/cartridge/frame + cost = 4 + /datum/uplink_item/stealthy_tools/agent_card name = "Agent ID Card" desc = "Agent cards prevent artificial intelligences from tracking the wearer, and can copy access from other identification cards. The access is cumulative, so scanning one card does not erase the access gained from another." @@ -1153,6 +1163,20 @@ var/list/uplink_items = list() cost = 1 surplus = 0 +/datum/uplink_item/device_tools/telecrystal/five + name = "5 Raw Telecrystals" + desc = "Five telecrystals in their rawest and purest form; can be utilized on active uplinks to increase their telecrystal count." + reference = "RTCF" + item = /obj/item/stack/telecrystal/five + cost = 5 + +/datum/uplink_item/device_tools/telecrystal/twenty + name = "20 Raw Telecrystals" + desc = "Twenty telecrystals in their rawest and purest form; can be utilized on active uplinks to increase their telecrystal count." + reference = "RTCT" + item = /obj/item/stack/telecrystal/twenty + cost = 20 + /datum/uplink_item/device_tools/jammer name = "Radio Jammer" desc = "This device will disrupt any nearby outgoing radio communication when activated." diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm index b5aaaee4707..d138ce82a77 100644 --- a/code/game/objects/items/devices/uplinks.dm +++ b/code/game/objects/items/devices/uplinks.dm @@ -11,6 +11,7 @@ var/list/world_uplinks = list() /obj/item/device/uplink var/welcome // Welcoming menu message var/uses // Numbers of crystals + var/hidden_crystals = 0 var/list/ItemsCategory // List of categories with lists of items var/list/ItemsReference // List of references with an associated item var/list/nanoui_items // List of items for NanoUI use @@ -231,6 +232,8 @@ var/list/world_uplinks = list() return 1 else if(href_list["lock"]) toggle() + uses += hidden_crystals + hidden_crystals = 0 ui.close() return 1 if(href_list["return"]) diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm index 94196ecf251..6f160ca2440 100644 --- a/code/game/objects/items/stacks/telecrystal.dm +++ b/code/game/objects/items/stacks/telecrystal.dm @@ -10,19 +10,32 @@ flags = NOBLUDGEON origin_tech = "materials=6;syndicate=1" -/obj/item/stack/telecrystal/attack(mob/target as mob, mob/user as mob) +/obj/item/stack/telecrystal/attack(mob/target, mob/user) if(target == user) //You can't go around smacking people with crystals to find out if they have an uplink or not. for(var/obj/item/implant/uplink/I in target) - if(I && I.implanted) - I.hidden_uplink.uses +=1 - use(1) - to_chat(user, "You press the [src] onto yourself and charge your hidden uplink.") + if(I && I.imp_in) + I.hidden_uplink.uses += amount + use(amount) + to_chat(user, "You press [src] onto yourself and charge your hidden uplink.") -/obj/item/stack/telecrystal/afterattack(var/obj/item/I as obj, mob/user as mob, proximity) +/obj/item/stack/telecrystal/afterattack(obj/item/I, mob/user, proximity) if(!proximity) return - if(istype(I, /obj/item)) - if(I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up. - I.hidden_uplink.uses +=1 - use(1) - to_chat(user, "You slot the [src] into the [I] and charge its internal uplink.") + if(istype(I, /obj/item) && I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up. + I.hidden_uplink.uses += amount + use(amount) + to_chat(user, "You slot [src] into [I] and charge its internal uplink.") + else if(istype(I, /obj/item/cartridge/frame)) + var/obj/item/cartridge/frame/cart = I + if(!cart.charges) + to_chat(user, "[cart] is out of charges, it's refusing to accept [src]") + return + cart.telecrystals += amount + use(amount) + to_chat(user, "You slot [src] into the [cart]. The next time it's used, it will also give telecrystals") + +/obj/item/stack/telecrystal/five + amount = 5 + +/obj/item/stack/telecrystal/twenty + amount = 20 \ No newline at end of file diff --git a/code/modules/pda/cart.dm b/code/modules/pda/cart.dm index 1346dd2bfdd..aabbefdb204 100644 --- a/code/modules/pda/cart.dm +++ b/code/modules/pda/cart.dm @@ -296,6 +296,13 @@ if(istype(D)) D.remote_door_id = initial_remote_door_id +/obj/item/cartridge/frame + name = "F.R.A.M.E. cartridge" + icon_state = "cart" + charges = 5 + var/telecrystals = 0 + messenger_plugins = list(new/datum/data/pda/messenger_plugin/virus/frame) + /obj/item/cartridge/mob_hunt_game name = "Nano-Mob Hunter GO! Cartridge" desc = "The hit new PDA game that lets you track down and capture your favorite Nano-Mobs living in your world!" diff --git a/code/modules/pda/messenger_plugins.dm b/code/modules/pda/messenger_plugins.dm index b1fa63dd2e0..8b00e7e6ef5 100644 --- a/code/modules/pda/messenger_plugins.dm +++ b/code/modules/pda/messenger_plugins.dm @@ -72,4 +72,23 @@ user.show_message("Success!", 1) log_admin("[key_name(user)] just attempted to blow up [P] with the Detomatix cartridge and succeded") message_admins("[key_name_admin(user)] just attempted to blow up [P] with the Detomatix cartridge and succeded", 1) - P.explode() \ No newline at end of file + P.explode() + +/datum/data/pda/messenger_plugin/virus/frame + icon = "exclamation-circle" + +/datum/data/pda/messenger_plugin/virus/frame/user_act(mob/user, obj/item/device/pda/P) + . = ..(user, P) + if(.) + var/lock_code = "[rand(100,999)] [pick("Alpha","Bravo","Charlie","Delta","Echo","Foxtrot","Golf","Hotel","India","Juliet","Kilo","Lima","Mike","November","Oscar","Papa","Quebec","Romeo","Sierra","Tango","Uniform","Victor","Whiskey","X-ray","Yankee","Zulu")]" + user.show_message("Virus Sent! The unlock code to the target is: [lock_code]") + if(!P.hidden_uplink) + var/obj/item/device/uplink/hidden/uplink = new(P) + P.hidden_uplink = uplink + P.lock_code = lock_code + else + P.hidden_uplink.hidden_crystals += P.hidden_uplink.uses //Temporarially hide the PDA's crystals, so you can't steal telecrystals. + var/obj/item/cartridge/frame/parent_cart = pda.cartridge + P.hidden_uplink.uses = parent_cart.telecrystals + parent_cart.telecrystals = 0 + P.hidden_uplink.active = TRUE \ No newline at end of file From 25d331b0bbdc5c5a698cad8e3c5deefe563a790c Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Thu, 19 Apr 2018 21:14:00 -0400 Subject: [PATCH 015/232] tweak --- code/game/objects/items/stacks/telecrystal.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm index 6f160ca2440..4e00395cc15 100644 --- a/code/game/objects/items/stacks/telecrystal.dm +++ b/code/game/objects/items/stacks/telecrystal.dm @@ -32,7 +32,7 @@ return cart.telecrystals += amount use(amount) - to_chat(user, "You slot [src] into the [cart]. The next time it's used, it will also give telecrystals") + to_chat(user, "You slot [src] into [cart]. The next time it's used, it will also give telecrystals") /obj/item/stack/telecrystal/five amount = 5 From caccc13e824966d83ee9f162f494b5e2addb4f2c Mon Sep 17 00:00:00 2001 From: tigercat2000 Date: Thu, 19 Apr 2018 19:01:29 -0800 Subject: [PATCH 016/232] Directional Locking This adds the ability to lock your mob towards facing either a certain direction or a certain atom. Direction is done by shift-middleclick, atom is done by shift-ctrl-middleclick. --- code/_onclick/click.dm | 32 ++++++++++++++++++++++++++++++++ code/modules/mob/mob.dm | 20 ++++++++++++++++++++ code/modules/mob/mob_defines.dm | 2 ++ code/modules/mob/mob_movement.dm | 2 ++ 4 files changed, 56 insertions(+) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index f300608e699..9679935bdaa 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -70,6 +70,12 @@ changeNext_click(1) var/list/modifiers = params2list(params) + if(modifiers["middle"] && modifiers["shift"] && modifiers["ctrl"]) + MiddleShiftControlClickOn(A) + return + if(modifiers["middle"] && modifiers["shift"]) + MiddleShiftClickOn(A) + return if(modifiers["shift"] && modifiers["ctrl"]) CtrlShiftClickOn(A) return @@ -225,6 +231,32 @@ else ..() +/* + Middle shift-click + Makes the mob face the direction of the clicked thing +*/ +/mob/proc/MiddleShiftClickOn(atom/A) + var/face_dir = get_cardinal_dir(src, A) + if(forced_look == face_dir) + forced_look = null + to_chat(src, "You are no longer facing any direction.") + return + forced_look = face_dir + to_chat(src, "You are now facing [dir2text(forced_look)].") + +/* + Middle shift-control-click + Makes the mob constantly face the object (until it's out of sight) +*/ +/mob/proc/MiddleShiftControlClickOn(atom/A) + var/face_uid = A.UID() + if(forced_look == face_uid) + forced_look = null + to_chat(src, "You are no longer facing [A].") + return + forced_look = face_uid + to_chat(src, "You are now facing [A].") + // In case of use break glass /* /atom/proc/MiddleClick(var/mob/M as mob) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index d3641533ad8..79f14b7bc67 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -170,6 +170,15 @@ return 0 /mob/proc/Life() + if(forced_look) + if(!isnum(forced_look)) + var/atom/A = locateUID(forced_look) + if(istype(A)) + if(get_dist(src, A) > (client ? client.view : world.view)) + forced_look = null + to_chat(src, "Your direction target has left your view, you are no longer facing anything.") + return + setDir() // handle_typing_indicator() return @@ -533,6 +542,17 @@ var/list/slot_equipment_priority = list( \ client.screen = list() hud_used.show_hud(hud_used.hud_version) +/mob/setDir(new_dir) + if(forced_look) + if(isnum(forced_look)) + dir = forced_look + else + var/atom/A = locateUID(forced_look) + if(istype(A)) + dir = get_cardinal_dir(src, A) + return + . = ..() + /mob/proc/show_inv(mob/user) user.set_machine(src) var/dat = {" diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 4a5e9d1a1f4..d411482534b 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -199,3 +199,5 @@ var/list/progressbars = null //for stacking do_after bars var/list/tkgrabbed_objects = list() // Assoc list of items to TK grabs + + var/forced_look = null // This can either be a numerical direction or a soft object reference (UID). It makes the mob always face towards the selected thing. \ No newline at end of file diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index a112513a3a1..779ec706b22 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -268,6 +268,8 @@ else . = ..() + mob.setDir(direct) + for(var/obj/item/grab/G in mob) if(G.state == GRAB_NECK) mob.setDir(reverse_dir[direct]) From 311c4ba592a8ad43da043f099112dbc4cfcb10a3 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Fri, 20 Apr 2018 18:23:30 -0400 Subject: [PATCH 017/232] Removes Radio Icon Metagaming --- code/game/machinery/telecomms/broadcaster.dm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index af013849f45..303c9f989e5 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -331,7 +331,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept var/part_b_extra = "" if(data == 3) // intercepted radio message part_b_extra = " (Intercepted)" - var/part_a = "[bicon(radio)]\[[freq_text]\][part_b_extra] " // goes in the actual output + var/part_a = "\[[freq_text]\][part_b_extra] " // goes in the actual output // --- Some more pre-message formatting --- var/part_b = " " // Tweaked for security headsets -- TLE @@ -530,10 +530,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept if(data == 3) // intercepted radio message part_b_extra = " (Intercepted)" - // Create a radio headset for the sole purpose of using its icon - var/obj/item/device/radio/headset/radio = new - - var/part_b = " [bicon(radio)]\[[freq_text]\][part_b_extra] " // Tweaked for security headsets -- TLE + var/part_b = " \[[freq_text]\][part_b_extra] " // Tweaked for security headsets -- TLE var/part_blackbox_b = " \[[freq_text]\] " var/part_c = "" From fe758c21e71b562201492c88ef85fe4d1c5f0dc3 Mon Sep 17 00:00:00 2001 From: Kluys Date: Sun, 22 Apr 2018 22:50:34 +0200 Subject: [PATCH 018/232] Window placement revert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit reverts the window placement system, right now placing a one-dir window takes 2 prompts, this makes it so you just have to click a grille for it to place a one-dir window on the side you're facing. Reverts a part of https://github.com/ParadiseSS13/Paradise/pull/8155 🆑 Kluys Revert: Changes the window placement system back to the old system /🆑 --- code/game/objects/structures/grille.dm | 126 +++++++++++-------------- 1 file changed, 55 insertions(+), 71 deletions(-) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 284001de2bf..1ecaa52b5f5 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -138,82 +138,66 @@ //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)) - build_window(W, user) - return + if(!broken) + var/obj/item/stack/ST = W + if (ST.get_amount() < 1) + to_chat(user, "You need at least one sheet of glass for that!") + return + var/dir_to_set = NORTH + if(!anchored) + to_chat(user, "[src] needs to be fastened to the floor first!") + return + if(loc == user.loc) + dir_to_set = user.dir + else + if((x == user.x) || (y == user.y)) //Only supposed to work for cardinal directions. + if(x == user.x) + if(y > user.y) + dir_to_set = SOUTH + else + dir_to_set = NORTH + else if(y == user.y) + if(x > user.x) + dir_to_set = WEST + else + dir_to_set = EAST + else + to_chat(user, "You can't reach.") + return //Only works for cardinal direcitons, diagonals aren't supposed to work like this. + for(var/obj/structure/window/WINDOW in loc) + if(WINDOW.dir == dir_to_set) + to_chat(user, "There is already a window facing this way there.") + return + to_chat(user, "You start placing the window...") + if(do_after(user, 20 * W.toolspeed, target = src)) + if(!loc || !anchored) //Grille destroyed or unanchored while waiting + return + for(var/obj/structure/window/WINDOW in loc) + if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting. + to_chat(user, "There is already a window facing this way there.") + return + var/obj/structure/window/WD + if(istype(W,/obj/item/stack/sheet/rglass)) + WD = new/obj/structure/window/reinforced(loc) //reinforced window + else if(istype(W,/obj/item/stack/sheet/glass)) + WD = new/obj/structure/window/basic(loc) //normal window + else if(istype(W,/obj/item/stack/sheet/plasmaglass)) + WD = new/obj/structure/window/plasmabasic(loc) //basic plasma window + else + WD = new/obj/structure/window/plasmareinforced(loc) //reinforced plasma window + WD.setDir(dir_to_set) + WD.ini_dir = dir_to_set + WD.anchored = 0 + WD.state = 0 + ST.use(1) + to_chat(user, "You place the [WD] on [src].") + WD.update_icon() + return //window placing end else if(istype(W, /obj/item/shard) || !shock(user, 70)) return ..() -/obj/structure/grille/proc/build_window(obj/item/stack/sheet/S, mob/user) - if(!istype(S) || !user) - return - if(broken) - to_chat(user, "You must repair or replace [src] first!") - return - if(S.get_amount() < 1) - to_chat(user, "You need at least one sheet of glass for that!") - return - if(!anchored) - to_chat(user, "[src] needs to be fastened to the floor first!") - return - if(!getRelativeDirection(src, user) && (user.loc != loc)) //essentially a cardinal direction adjacent or sharing same loc check - to_chat(user, "You can't reach.") - return - if(/obj/structure/window/full in loc) //check for a full window already present (blocks the whole tile) - to_chat(user, "There is already a full window there.") - return - var/selection = alert(user, "What type of window would you like to place?", "Window Construction", "One Direction", "Full", "Cancel") - if(selection == "Cancel") - return - if(selection == "Full") - if(S.get_amount() < 2) - to_chat(user, "You need at least two sheets of glass for that!") - return - if(do_after(user, 20, target = src)) //glass doesn't have a toolspeed, so no multiplier - if(broken || !anchored || !src) //make sure the grille is still intact, anchored, and exists! - return - if(S.get_amount() < 2) //make sure we still have enough for this! - return - if(!getRelativeDirection(src, user) && (user.loc != loc)) //make sure we can still do this from our location - return - var/obj/structure/window/W = new S.full_window(get_turf(src)) - S.use(2) - W.anchored = 0 - W.state = 0 - to_chat(user, "You place [W] on [src].") - W.update_icon() - return - if(selection == "One Direction") - var/dir_selection = input("Which direction will this window face?", "Direction") as null|anything in list("north", "east", "south", "west") - if(!dir_selection) - return - var/temp_dir = text2dir(dir_selection) - for(var/obj/structure/window/W in loc) - if(istype(W, /obj/structure/window/full)) //double checking in case a full window was created while selecting direction - to_chat(user, "There is already a full window there.") - return - if(W.dir == temp_dir) //to avoid building a window on top of an existing window - to_chat(user, "There is already a window facing this direction there.") - return - if(do_after(user, 20, target = src)) - if(broken || !anchored || !src) //make sure the grille is still intact, anchored, and exists! - return - if(S.get_amount() < 1) //make sure we still have enough fir this! - to_chat(user, "You need at least one sheet of glass for that!") - return - if(!getRelativeDirection(src, user) && (user.loc != loc)) //make sure we can still do this from our location - return - var/obj/structure/window/W = new S.created_window(get_turf(src)) - S.use(1) - W.setDir(temp_dir) - W.ini_dir = temp_dir - W.anchored = 0 - W.state = 0 - to_chat(user, "You place [W] on [src].") - W.update_icon() - return - /obj/structure/grille/attacked_by(obj/item/I, mob/living/user) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) From b36ccc592f0d32154f673f976d655ad1c85f6451 Mon Sep 17 00:00:00 2001 From: Kluys Date: Mon, 23 Apr 2018 12:12:01 +0200 Subject: [PATCH 019/232] Makes the code cleaner dirty code is dirty, I hope this makes it better but obviously I am a newb so any input is welcome. --- code/game/objects/structures/grille.dm | 108 ++++++++++++------------- 1 file changed, 53 insertions(+), 55 deletions(-) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 1ecaa52b5f5..28101ca76c9 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -138,66 +138,64 @@ //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)) - if(!broken) - var/obj/item/stack/ST = W - if (ST.get_amount() < 1) - to_chat(user, "You need at least one sheet of glass for that!") - return - var/dir_to_set = NORTH - if(!anchored) - to_chat(user, "[src] needs to be fastened to the floor first!") - return - if(loc == user.loc) - dir_to_set = user.dir - else - if((x == user.x) || (y == user.y)) //Only supposed to work for cardinal directions. - if(x == user.x) - if(y > user.y) - dir_to_set = SOUTH - else - dir_to_set = NORTH - else if(y == user.y) - if(x > user.x) - dir_to_set = WEST - else - dir_to_set = EAST - else - to_chat(user, "You can't reach.") - return //Only works for cardinal direcitons, diagonals aren't supposed to work like this. - for(var/obj/structure/window/WINDOW in loc) - if(WINDOW.dir == dir_to_set) - to_chat(user, "There is already a window facing this way there.") - return - to_chat(user, "You start placing the window...") - if(do_after(user, 20 * W.toolspeed, target = src)) - if(!loc || !anchored) //Grille destroyed or unanchored while waiting - return - for(var/obj/structure/window/WINDOW in loc) - if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting. - to_chat(user, "There is already a window facing this way there.") - return - var/obj/structure/window/WD - if(istype(W,/obj/item/stack/sheet/rglass)) - WD = new/obj/structure/window/reinforced(loc) //reinforced window - else if(istype(W,/obj/item/stack/sheet/glass)) - WD = new/obj/structure/window/basic(loc) //normal window - else if(istype(W,/obj/item/stack/sheet/plasmaglass)) - WD = new/obj/structure/window/plasmabasic(loc) //basic plasma window - else - WD = new/obj/structure/window/plasmareinforced(loc) //reinforced plasma window - WD.setDir(dir_to_set) - WD.ini_dir = dir_to_set - WD.anchored = 0 - WD.state = 0 - ST.use(1) - to_chat(user, "You place the [WD] on [src].") - WD.update_icon() - return + build_window(W, user) + return //window placing end else if(istype(W, /obj/item/shard) || !shock(user, 70)) return ..() +/obj/structure/grille/proc/build_window(obj/item/stack/sheet/S, mob/user) + var/dir_to_set = NORTH + if(!istype(S) || !user) + return + if(broken) + to_chat(user, "You must repair or replace [src] first!") + return + if (S.get_amount() < 1) + to_chat(user, "You need at least one sheet of glass for that!") + return + if(!anchored) + to_chat(user, "[src] needs to be fastened to the floor first!") + return + if(!getRelativeDirection(src, user) && (user.loc != loc)) //essentially a cardinal direction adjacent or sharing same loc check + to_chat(user, "You can't reach.") + return + if(loc == user.loc) + dir_to_set = user.dir + else + if(x == user.x) + if(y > user.y) + dir_to_set = SOUTH + else + dir_to_set = NORTH + else if(y == user.y) + if(x > user.x) + dir_to_set = WEST + else + dir_to_set = EAST + for(var/obj/structure/window/WINDOW in loc) + if(WINDOW.dir == dir_to_set) + to_chat(user, "There is already a window facing this way there.") + return + to_chat(user, "You start placing the window...") + if(do_after(user, 20, target = src)) + if(!loc || !anchored) //Grille destroyed or unanchored while waiting + return + for(var/obj/structure/window/WINDOW in loc) + if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting. + to_chat(user, "There is already a window facing this way there.") + return + var/obj/structure/window/W = new S.created_window(get_turf(src)) + S.use(1) + W.setDir(dir_to_set) + W.ini_dir = dir_to_set + W.anchored = 0 + W.state = 0 + to_chat(user, "You place the [W] on [src].") + W.update_icon() + return + /obj/structure/grille/attacked_by(obj/item/I, mob/living/user) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) From 0a942bf23a98604cf9e7d5ab00788aad576bfa1f Mon Sep 17 00:00:00 2001 From: uraniummeltdown Date: Sun, 25 Mar 2018 17:48:38 +0400 Subject: [PATCH 020/232] moved some mob is helpers to is_helpers.dm attack_slime(), attack_animal(), attack_larva(), attack_alien(), attack_larva() handled at /mob/living level, overridden in children changes to attack_hand() and attackby() for some mobs changed span in a bot message, added missing logging and attack animations new mob defense files, renamed some files, general code cleanup --- code/__DEFINES/is_helpers.dm | 23 +++ code/__DEFINES/mobs.dm | 9 -- .../{alien_defenses.dm => alien_defense.dm} | 13 +- .../living/carbon/alien/humanoid/humanoid.dm | 140 +----------------- .../carbon/alien/humanoid/humanoid_defense.dm | 45 ++++++ .../mob/living/carbon/alien/larva/larva.dm | 92 +----------- .../carbon/alien/larva/larva_defense.dm | 24 +++ .../{carbon_defenses.dm => carbon_defense.dm} | 23 ++- code/modules/mob/living/carbon/human/human.dm | 106 ------------- .../living/carbon/human/human_attackalien.dm | 50 ------- .../living/carbon/human/human_attackhand.dm | 10 +- .../mob/living/carbon/human/human_defense.dm | 91 ++++++++++++ code/modules/mob/living/carbon/slime/slime.dm | 108 ++++---------- code/modules/mob/living/living_defense.dm | 80 +++++++++- code/modules/mob/living/silicon/ai/ai.dm | 56 ------- .../mob/living/silicon/ai/ai_defense.dm | 8 + code/modules/mob/living/silicon/pai/pai.dm | 35 ----- .../silicon/robot/drone/drone_abilities.dm | 6 +- .../modules/mob/living/silicon/robot/robot.dm | 116 --------------- .../mob/living/silicon/robot/robot_defense.dm | 59 ++++++++ .../mob/living/silicon/silicon_defense.dm | 66 +++++++++ .../living/simple_animal/animal_defense.dm | 60 ++++++++ .../mob/living/simple_animal/bot/bot.dm | 8 +- .../mob/living/simple_animal/simple_animal.dm | 117 --------------- paradise.dme | 11 +- 25 files changed, 535 insertions(+), 821 deletions(-) rename code/modules/mob/living/carbon/alien/{alien_defenses.dm => alien_defense.dm} (88%) create mode 100644 code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm create mode 100644 code/modules/mob/living/carbon/alien/larva/larva_defense.dm rename code/modules/mob/living/carbon/{carbon_defenses.dm => carbon_defense.dm} (71%) delete mode 100644 code/modules/mob/living/carbon/human/human_attackalien.dm create mode 100644 code/modules/mob/living/silicon/ai/ai_defense.dm create mode 100644 code/modules/mob/living/silicon/robot/robot_defense.dm create mode 100644 code/modules/mob/living/silicon/silicon_defense.dm create mode 100644 code/modules/mob/living/simple_animal/animal_defense.dm diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 3014b1dfebe..34668062a89 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -41,6 +41,29 @@ var/list/static/global/pointed_types = typecacheof(list( #define ismineralturf(A) istype(A, /turf/simulated/mineral) +//Mobs +#define isliving(A) (istype(A, /mob/living)) + +#define isbrain(A) (istype(A, /mob/living/carbon/brain)) + +//Carbon mobs +#define iscarbon(A) (istype(A, /mob/living/carbon)) + +#define ishuman(A) (istype(A, /mob/living/carbon/human)) + +//more carbon mobs +#define isalien(A) (istype(A, /mob/living/carbon/alien)) + +#define islarva(A) (istype(A, /mob/living/carbon/alien/larva)) + +#define isalienadult(A) (istype(A, /mob/living/carbon/alien/humanoid)) + +#define isalienhunter(A) (istype(A, /mob/living/carbon/alien/humanoid/hunter)) + +#define isaliensentinel(A) (istype(A, /mob/living/carbon/alien/humanoid/sentinel)) + +#define isslime(A) (istype((A), /mob/living/carbon/slime)) + // Misc #define isclient(A) istype(A, /client) #define isradio(A) istype(A, /obj/item/device/radio) diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 5bf38e54ad8..efe8a4aac86 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -128,15 +128,6 @@ #define TINT_BLIND 3 //Threshold of tint level to obscure vision fully #define EYE_SHINE_THRESHOLD 6 //dark_view threshold past which a humanoid's eyes will 'shine' in the dark. -#define isliving(A) (istype((A), /mob/living)) -#define iscarbon(A) (istype((A), /mob/living/carbon)) -#define ishuman(A) (istype((A), /mob/living/carbon/human)) -#define isbrain(A) (istype((A), /mob/living/carbon/brain)) -#define isalien(A) (istype((A), /mob/living/carbon/alien)) -#define isalienadult(A) (istype((A), /mob/living/carbon/alien/humanoid)) -#define islarva(A) (istype((A), /mob/living/carbon/alien/larva)) -#define isslime(A) (istype((A), /mob/living/carbon/slime)) - //Human sub-species #define isabductor(A) (is_species(A, "Abductor")) diff --git a/code/modules/mob/living/carbon/alien/alien_defenses.dm b/code/modules/mob/living/carbon/alien/alien_defense.dm similarity index 88% rename from code/modules/mob/living/carbon/alien/alien_defenses.dm rename to code/modules/mob/living/carbon/alien/alien_defense.dm index 5934987f8a4..22954451834 100644 --- a/code/modules/mob/living/carbon/alien/alien_defenses.dm +++ b/code/modules/mob/living/carbon/alien/alien_defense.dm @@ -5,7 +5,7 @@ As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble. In all, this is a lot like the monkey code. /N */ -/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M as mob) +/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M) if(!ticker) to_chat(M, "You cannot attack people before the game has started.") return @@ -40,14 +40,12 @@ In all, this is a lot like the monkey code. /N else to_chat(M, "[name] is too injured for that.") -/mob/living/carbon/alien/attack_larva(mob/living/carbon/alien/larva/L as mob) +/mob/living/carbon/alien/attack_larva(mob/living/carbon/alien/larva/L) return attack_alien(L) -/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M as mob) +/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M) if(..()) //to allow surgery to return properly. return 0 - if(istype(src,/mob/living/carbon/alien/humanoid)) - return 0 //this is horrible but 100% necessary switch(M.a_intent) if(INTENT_HELP) @@ -55,12 +53,11 @@ In all, this is a lot like the monkey code. /N if(INTENT_GRAB) grabbedby(M) if(INTENT_HARM, INTENT_DISARM) + M.do_attack_animation(src) return 1 return 0 - - -/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M as mob) +/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M) if(..()) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) switch(M.melee_damage_type) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 182bc0bd9eb..61e3aef5b31 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -78,138 +78,14 @@ updatehealth() -/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M as mob) - if(!ticker) - to_chat(M, "You cannot attack people before the game has started.") - return - - if(M.Victim) return // can't attack while eating! - - if(stat > -100) - - M.do_attack_animation(src) - visible_message("The [M.name] glomps [src]!", \ - "The [M.name] glomps [src]!") - var/damage = rand(1, 3) - - if(M.is_adult) - damage = rand(10, 40) - else - damage = rand(5, 35) - - adjustBruteLoss(damage) - - if(M.powerlevel > 0) - var/stunprob = 10 - var/power = M.powerlevel + rand(0,3) - - switch(M.powerlevel) - if(1 to 2) stunprob = 20 - if(3 to 4) stunprob = 30 - if(5 to 6) stunprob = 40 - if(7 to 8) stunprob = 60 - if(9) stunprob = 70 - if(10) stunprob = 95 - - if(prob(stunprob)) - M.powerlevel -= 3 - if(M.powerlevel < 0) - M.powerlevel = 0 - - visible_message("The [M.name] has shocked [src]!", \ - "The [M.name] has shocked [src]!") - - Weaken(power) - if(stuttering < power) - stuttering = power - Stun(power) - - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() - - if(prob(stunprob) && M.powerlevel >= 8) - adjustFireLoss(M.powerlevel * rand(6,10)) - - - updatehealth() - - return - -/mob/living/carbon/alien/humanoid/attack_animal(mob/living/simple_animal/M as mob) - if(M.melee_damage_upper == 0) - M.custom_emote(1, "[M.friendly] [src]") - else - M.do_attack_animation(src) - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - visible_message("[M] [M.attacktext] [src]!", \ - "[M] [M.attacktext] [src]!") - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - adjustBruteLoss(damage) - updatehealth() - -/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob) - if(!ticker) - to_chat(M, "You cannot attack people before the game has started.") - return - - if(istype(loc, /turf) && istype(loc.loc, /area/start)) - to_chat(M, "No attacking people at spawn, you jackass.") - return - - if(..()) //to allow surgery to return properly. - return - - switch(M.a_intent) - - if(INTENT_HELP) - help_shake_act(M) - - if(INTENT_GRAB) - grabbedby(M) - - if(INTENT_HARM) - M.do_attack_animation(src) - 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]!") - if((stat != DEAD) && (damage > 9||prob(5)))//Regular humans have a very small chance of weakening an alien. - Paralyse(2) - visible_message("[M] has weakened [src]!", \ - "[M] has weakened [src]!", \ - "You hear someone fall.") - adjustBruteLoss(damage) - updatehealth() - else - playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) - visible_message("[M] has attempted to punch [src]!") - - if(INTENT_DISARM) - if(!lying) - if(prob(5))//Very small chance to push an alien down. - Paralyse(2) - playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - visible_message("[M] has pushed down [src]!", \ - "[M] has pushed down [src]!") - else - if(prob(50)) - drop_item() - playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - visible_message("[M] has disarmed [src]!", \ - "[M] has disarmed [src]!") - else - playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) - visible_message("[M] has attempted to disarm [src]!") +/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M) + ..() + var/damage = rand(5, 35) + if(M.is_adult) + damage = rand(10, 40) + adjustBruteLoss(damage) + add_logs(M, src, "attacked", admin=0) + updatehealth() return /mob/living/carbon/alien/humanoid/restrained() diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm new file mode 100644 index 00000000000..1027c0a4245 --- /dev/null +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm @@ -0,0 +1,45 @@ +/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]!") + if((stat != DEAD) && (damage > 9||prob(5)))//Regular humans have a very small chance of weakening an alien. + Paralyse(2) + visible_message("[M] has weakened [src]!", \ + "[M] has weakened [src]!", \ + "You hear someone fall.") + adjustBruteLoss(damage) + add_logs(M, src, "attacked", admin=0) + updatehealth() + else + playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) + visible_message("[M] has attempted to punch [src]!") + + if(INTENT_DISARM) + if(!lying) + if(prob(5))//Very small chance to push an alien down. + Paralyse(2) + playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) + add_logs(M, src, "pushed", admin=0) + visible_message("[M] has pushed down [src]!", \ + "[M] has pushed down [src]!") + else + if(prob(50)) + drop_item() + playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) + visible_message("[M] has disarmed [src]!", \ + "[M] has disarmed [src]!") + else + playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) + visible_message("[M] has attempted to disarm [src]!") diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 2d638dd0db1..e1fbd04a60f 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -73,91 +73,15 @@ /mob/living/carbon/alien/larva/attack_ui(slot_id) return -/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob) - if(M.melee_damage_upper == 0) - M.custom_emote(1, "[M.friendly] [src]") - else - M.do_attack_animation(src) - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - visible_message("[M] [M.attacktext] [src]!", \ - "[M] [M.attacktext] [src]!") - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - adjustBruteLoss(damage) - add_attack_logs(M, src, "Animal attacked", FALSE) - updatehealth() - - - -/mob/living/carbon/alien/larva/attack_slime(mob/living/carbon/slime/M as mob) - if(!ticker) - to_chat(M, "You cannot attack people before the game has started.") - return - - if(M.Victim) - return // can't attack while eating! - - if(stat != DEAD) - M.do_attack_animation(src) - visible_message("The [M.name] glomps [src]!", \ - "The [M.name] glomps [src]!") - var/damage = rand(1, 3) - - if(M.is_adult) - damage = rand(20, 40) - else - damage = rand(5, 35) - - - adjustBruteLoss(damage) - updatehealth() - - return - -/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob) - if(!ticker) - to_chat(M, "You cannot attack people before the game has started.") - return - - if(istype(loc, /turf) && istype(loc.loc, /area/start)) - to_chat(M, "No attacking people at spawn, you jackass.") - return - +/mob/living/carbon/alien/larva/attack_slime(mob/living/carbon/slime/M) ..() - - switch(M.a_intent) - - if(INTENT_HELP) - help_shake_act(M) - - if(INTENT_GRAB) - grabbedby(M) - - else - M.do_attack_animation(src) - 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) - visible_message("[M] has kicked [src]!", \ - "[M] has kicked [src]!") - if((stat != DEAD) && (damage > 4.9)) - Paralyse(rand(5,10)) - visible_message("[M] has weakened [src]!", \ - "[M] has weakened [src]!", \ - "You hear someone fall.") - adjustBruteLoss(damage) - updatehealth() - else - playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) - visible_message("[M] has attempted to kick [src]!", \ - "[M] has attempted to kick [src]!") + var/damage = rand(5, 35) + if(M.is_adult) + damage = rand(20, 40) + adjustBruteLoss(damage) + add_attack_logs(M, src, "Slime attacked") + updatehealth() + return /mob/living/carbon/alien/larva/restrained() return 0 diff --git a/code/modules/mob/living/carbon/alien/larva/larva_defense.dm b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm new file mode 100644 index 00000000000..029ea07da4f --- /dev/null +++ b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm @@ -0,0 +1,24 @@ +/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M) + 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_logs(M, src, "attacked", admin=0) + visible_message("[M] has kicked [src]!", \ + "[M] has kicked [src]!") + if((stat != DEAD) && (damage > 4.9)) + Paralyse(rand(5,10)) + + adjustBruteLoss(damage) + updatehealth() + else + playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) + visible_message("[M] has attempted to kick [src]!", \ + "[M] has attempted to kick [src]!") diff --git a/code/modules/mob/living/carbon/carbon_defenses.dm b/code/modules/mob/living/carbon/carbon_defense.dm similarity index 71% rename from code/modules/mob/living/carbon/carbon_defenses.dm rename to code/modules/mob/living/carbon/carbon_defense.dm index eb6517e5f1d..140e868dddf 100644 --- a/code/modules/mob/living/carbon/carbon_defenses.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -18,12 +18,11 @@ /mob/living/carbon/attackby(obj/item/I, mob/user, params) - if(lying) - if(surgeries.len) - if(user != src && user.a_intent == INTENT_HELP) - for(var/datum/surgery/S in surgeries) - if(S.next_step(user, src)) - return 1 + if(lying && surgeries.len) + if(user != src && user.a_intent == INTENT_HELP) + for(var/datum/surgery/S in surgeries) + if(S.next_step(user, src)) + return 1 return ..() /mob/living/carbon/attack_hand(mob/living/carbon/human/user) @@ -41,6 +40,18 @@ ContractDisease(D) return 0 +/mob/living/carbon/attack_slime(mob/living/carbon/slime/M) + if(..()) + var/power = M.powerlevel + rand(0,3) + Weaken(power) + Stuttering(power) + Stun(power) + var/stunprob = M.powerlevel * 7 + 10 + if(prob(stunprob) && M.powerlevel >= 8) + adjustFireLoss(M.powerlevel * rand(6,10)) + updatehealth() + return 1 + /mob/living/carbon/is_mouth_covered(head_only = FALSE, mask_only = FALSE) if((!mask_only && head && (head.flags_cover & HEADCOVERSMOUTH)) || (!head_only && wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH))) return TRUE \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index f41479cd392..2cb8bbb396e 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -306,112 +306,6 @@ return 0 ..() -/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M as mob) - if(M.melee_damage_upper == 0) - M.custom_emote(1, "[M.friendly] [src]") - else - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - M.do_attack_animation(src) - visible_message("[M] [M.attacktext] [src]!", \ - "[M] [M.attacktext] [src]!") - add_attack_logs(M, src, "Animal attacked") - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - if(check_shields(damage, "the [M.name]", null, MELEE_ATTACK, M.armour_penetration)) - return 0 - 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 = get_organ(ran_zone(dam_zone)) - var/armor = run_armor_check(affecting, "melee", armour_penetration = M.armour_penetration) - - var/obj/item/organ/external/affected = src.get_organ(dam_zone) - if(affected) - affected.add_autopsy_data(M.name, damage) // Add the mob's name to the autopsy data - apply_damage(damage, M.melee_damage_type, affecting, armor) - updatehealth() - -/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L as mob) - - switch(L.a_intent) - if(INTENT_HELP) - visible_message("[L] rubs its head against [src].") - - - else - L.do_attack_animation(src) - var/damage = rand(1, 3) - visible_message("[L] bites [src]!", \ - "[L] bites [src]!") - playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1) - - if(stat != DEAD) - L.amount_grown = min(L.amount_grown + damage, L.max_grown) - var/obj/item/organ/external/affecting = get_organ(ran_zone(L.zone_sel.selecting)) - var/armor_block = run_armor_check(affecting, "melee") - apply_damage(damage, BRUTE, affecting, armor_block) - -/mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M as mob) - if(M.Victim) return // can't attack while eating! - - if(stat != DEAD) - M.do_attack_animation(src) - visible_message("The [M.name] glomps [src]!", \ - "The [M.name] glomps [src]!") - - var/damage = rand(1, 3) - - if(M.is_adult) - damage = rand(10, 35) - else - damage = rand(5, 25) - - if(check_shields(damage, "the [M.name]", null, MELEE_ATTACK)) - return 0 - - 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 = get_organ(ran_zone(dam_zone)) - var/armor_block = run_armor_check(affecting, "melee") - apply_damage(damage, BRUTE, affecting, armor_block) - - - if(M.powerlevel > 0) - var/stunprob = 10 - var/power = M.powerlevel + rand(0,3) - - switch(M.powerlevel) - if(1 to 2) stunprob = 20 - if(3 to 4) stunprob = 30 - if(5 to 6) stunprob = 40 - if(7 to 8) stunprob = 60 - if(9) stunprob = 70 - if(10) stunprob = 95 - - if(prob(stunprob)) - M.powerlevel -= 3 - if(M.powerlevel < 0) - M.powerlevel = 0 - - for(var/mob/O in viewers(src, null)) - if((O.client && !( O.blinded ))) - O.show_message(text("The [M.name] has shocked []!", src), 1) - - Weaken(power) - Stuttering(power) - Stun(power) - - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() - - if(prob(stunprob) && M.powerlevel >= 8) - adjustFireLoss(M.powerlevel * rand(6,10)) - - - updatehealth() - - return - - /mob/living/carbon/human/restrained() if(handcuffed) return 1 diff --git a/code/modules/mob/living/carbon/human/human_attackalien.dm b/code/modules/mob/living/carbon/human/human_attackalien.dm deleted file mode 100644 index 7c4039789a9..00000000000 --- a/code/modules/mob/living/carbon/human/human_attackalien.dm +++ /dev/null @@ -1,50 +0,0 @@ -/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M as mob) - if(check_shields(0, M.name)) - visible_message("[M] attempted to touch [src]!") - return 0 - - switch(M.a_intent) - if(INTENT_HELP) - visible_message("[M] caresses [src] with its scythe like arm.") - - if(INTENT_GRAB) - grabbedby(M) - - if(INTENT_HARM) - M.do_attack_animation(src) - if(w_uniform) - w_uniform.add_fingerprint(M) - - var/damage = rand(15, 30) - if(!damage) - playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1) - visible_message("[M] has lunged at [src]!") - return 0 - - var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) - var/armor_block = run_armor_check(affecting, "melee") - - playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) - visible_message("[M] has slashed at [src]!") - - apply_damage(damage, BRUTE, affecting, armor_block) - if(damage >= 25) - visible_message("[M] has wounded [src]!") - apply_effect(4, WEAKEN, armor_block) - updatehealth() - - if(INTENT_DISARM) - M.do_attack_animation(src) - if(prob(80)) - var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) - playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1) - apply_effect(5, WEAKEN, run_armor_check(affecting, "melee")) - visible_message("[M] has tackled down [src]!") - else - if(prob(99)) //this looks fucking stupid but it was previously 'var/randn = rand(1, 100); if(randn <= 99)' - playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1) - drop_item() - visible_message("[M] disarmed [src]!") - else - playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1) - visible_message("[M] has tried to disarm [src]!") \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 57be152295b..eedc6c1ea0c 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -1,8 +1,4 @@ -/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M as mob) - if(istype(loc, /turf) && istype(loc.loc, /area/start)) - to_chat(M, "No attacking people at spawn, you jackass.") - return - +/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M) if(frozen) to_chat(M, "Do not touch Admin-Frozen people.") return @@ -78,7 +74,7 @@ if(attacker_style && attacker_style.grab_act(H, src)) return 1 else - src.grabbedby(M) + grabbedby(M) return 1 if(INTENT_HARM) @@ -147,7 +143,7 @@ return 1 else add_attack_logs(M, src, "Disarmed") - + M.do_attack_animation(src) if(w_uniform) w_uniform.add_fingerprint(M) var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index f01ab117448..1d4dc544667 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -175,6 +175,11 @@ emp_act affecting.sabotaged = 1 return 1 +/mob/living/carbon/human/grabbedby(mob/living/user) + if(w_uniform) + w_uniform.add_fingerprint(user) + ..() + //Returns 1 if the attack hit, 0 if it missed. /mob/living/carbon/human/attacked_by(obj/item/I, mob/living/user, def_zone) if(!I || !user) @@ -343,6 +348,92 @@ emp_act if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam) +/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L) + if(..()) //successful larva bite. + var/damage = rand(1, 3) + if(stat != DEAD) + L.amount_grown = min(L.amount_grown + damage, L.max_grown) + var/obj/item/organ/external/affecting = get_organ(ran_zone(L.zone_sel.selecting)) + var/armor_block = run_armor_check(affecting, "melee") + apply_damage(damage, BRUTE, affecting, armor_block) + updatehealth() + +/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M) + if(check_shields(0, M.name)) + visible_message("[M] attempted to touch [src]!") + return 0 + + if(..()) + if(M.a_intent == INTENT_HARM) + if(w_uniform) + w_uniform.add_fingerprint(M) + var/damage = rand(15, 30) + if(!damage) + playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1) + visible_message("[M] has lunged at [src]!") + return 0 + var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) + var/armor_block = run_armor_check(affecting, "melee") + + playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) + visible_message("[M] has slashed at [src]!", \ + "[M] has slashed at [src]!") + + apply_damage(damage, BRUTE, affecting, armor_block) + if(damage >= 25) + visible_message("[M] has wounded [src]!", \ + "[M] has wounded [src]!") + apply_effect(4, WEAKEN, armor_block) + add_logs(M, src, "attacked", admin=0) + updatehealth() + + if(M.a_intent == INTENT_DISARM) + if(prob(80)) + var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) + playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1) + apply_effect(5, WEAKEN, run_armor_check(affecting, "melee")) + add_logs(M, src, "tackled", admin=0) + visible_message("[M] has tackled down [src]!") + else + if(prob(99)) //this looks fucking stupid but it was previously 'var/randn = rand(1, 100); if(randn <= 99)' + playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1) + drop_item() + visible_message("[M] disarmed [src]!") + else + playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1) + visible_message("[M] has tried to disarm [src]!") + +/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M) + if(..()) + var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) + if(check_shields(damage, "the [M.name]", null, MELEE_ATTACK, M.armour_penetration)) + return 0 + 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 = get_organ(ran_zone(dam_zone)) + var/armor = run_armor_check(affecting, "melee", armour_penetration = M.armour_penetration) + var/obj/item/organ/external/affected = src.get_organ(dam_zone) + if(affected) + affected.add_autopsy_data(M.name, damage) // Add the mob's name to the autopsy data + apply_damage(damage, M.melee_damage_type, affecting, armor) + updatehealth() + +/mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M) + ..() + var/damage = rand(1, 3) + + if(M.is_adult) + damage = rand(10, 35) + else + damage = rand(5, 25) + + 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 = get_organ(ran_zone(dam_zone)) + var/armor_block = run_armor_check(affecting, "melee") + apply_damage(damage, BRUTE, affecting, armor_block) + + return + /mob/living/carbon/human/mech_melee_attack(obj/mecha/M) if(M.occupant.a_intent == INTENT_HARM) if(M.damtype == "brute") diff --git a/code/modules/mob/living/carbon/slime/slime.dm b/code/modules/mob/living/carbon/slime/slime.dm index 5fa5a09c441..f66225d007c 100644 --- a/code/modules/mob/living/carbon/slime/slime.dm +++ b/code/modules/mob/living/carbon/slime/slime.dm @@ -207,73 +207,32 @@ return /mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M) - if(!ticker) - to_chat(M, "You cannot attack people before the game has started.") - return - - if(Victim) - return // can't attack while eating! - - M.do_attack_animation(src) - visible_message("[M.name] has glomped [src]!", \ - "[M.name] has glomped [src]!") + ..() var/damage = rand(1, 3) attacked += 5 if(M.is_adult) damage = rand(1, 6) else damage = rand(1, 3) - if(health > -100) - adjustBruteLoss(damage) - updatehealth() - return + adjustBruteLoss(damage) + updatehealth() -/mob/living/carbon/slime/attack_animal(mob/living/simple_animal/M as mob) - if(M.melee_damage_upper == 0) - M.custom_emote(1, "[M.friendly] [src]") - else - M.do_attack_animation(src) - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - visible_message("[M] [M.attacktext] [src]!", \ - "[M] [M.attacktext] [src]!") +/mob/living/carbon/slime/attack_animal(mob/living/simple_animal/M) + if(..()) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - add_attack_logs(src, M, "Slime'd for [damage] damage") attacked += 10 adjustBruteLoss(damage) updatehealth() -/mob/living/carbon/slime/attack_larva(mob/living/carbon/alien/larva/L as mob) - - switch(L.a_intent) - - if(INTENT_HELP) - visible_message("[L] rubs its head against [src].") - - - else - L.do_attack_animation(src) - attacked += 10 - visible_message("[L] bites [src]!", \ - "[L] bites [src]!") - playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1) - - if(stat != DEAD) - var/damage = rand(1, 3) - L.amount_grown = min(L.amount_grown + damage, L.max_grown) - adjustBruteLoss(damage) - -/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M as mob) - if(!ticker) - to_chat(M, "You cannot attack people before the game has started.") - return - - if(istype(loc, /turf) && istype(loc.loc, /area/start)) - to_chat(M, "No attacking people at spawn, you jackass.") - return - - ..() +/mob/living/carbon/slime/attack_larva(mob/living/carbon/alien/larva/L) + if(..()) //successful larva bite. + var/damage = rand(1, 3) + if(stat != DEAD) + L.amount_grown = min(L.amount_grown + damage, L.max_grown) + adjustBruteLoss(damage) + updatehealth() +/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M) if(Victim) if(Victim == M) if(prob(60)) @@ -298,6 +257,7 @@ return else + M.do_attack_animation(src) if(prob(30)) visible_message("[M] attempts to wrestle \the [name] off of [Victim]!") playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) @@ -340,7 +300,6 @@ else M.do_attack_animation(src) var/damage = rand(1, 9) - attacked += 10 if(prob(90)) if(HULK in M.mutations) @@ -352,16 +311,16 @@ 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]!", \ "[M] has punched [src]!") - if(health > -100) + if(stat != DEAD) adjustBruteLoss(damage) updatehealth() else @@ -369,23 +328,9 @@ visible_message("[M] has attempted to punch [src]!") return - - -/mob/living/carbon/slime/attack_alien(mob/living/carbon/alien/humanoid/M as mob) - if(!ticker) - to_chat(M, "You cannot attack people before the game has started.") - return - - if(istype(loc, /turf) && istype(loc.loc, /area/start)) - to_chat(M, "No attacking people at spawn, you jackass.") - return - - switch(M.a_intent) - if(INTENT_HELP) - visible_message("[M] caresses [src] with its scythe like arm.") - - if(INTENT_HARM) - M.do_attack_animation(src) +/mob/living/carbon/slime/attack_alien(mob/living/carbon/alien/humanoid/M) + if(..()) //if harm or disarm intent. + if(M.a_intent == INTENT_HARM) if(prob(95)) attacked += 10 playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) @@ -397,7 +342,8 @@ else visible_message("[M] has wounded [name]!", \ ")[M] has wounded [name]!") - if(health > -100) + add_attack_logs(M, src, "Alien attacked") + if(stat != DEAD) adjustBruteLoss(damage) updatehealth() else @@ -405,11 +351,7 @@ visible_message("[M] has attempted to lunge at [name]!", \ "[M] has attempted to lunge at [name]!") - if(INTENT_GRAB) - grabbedby(M) - - if(INTENT_DISARM) - M.do_attack_animation(src) + if(M.a_intent == INTENT_DISARM) playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1) var/damage = 5 attacked += 10 @@ -424,7 +366,7 @@ anchored = 0 if(prob(80) && !client) Discipline++ - if(!istype(src, /mob/living/carbon/slime)) + if(!isslime(src)) if(Discipline == 1) attacked = 0 @@ -442,11 +384,12 @@ drop_item() visible_message("[M] has disarmed [name]!", "[M] has disarmed [name]!") + add_attack_logs(M, src, "Alien disarmed") adjustBruteLoss(damage) updatehealth() return -/mob/living/carbon/slime/attackby(obj/item/W, mob/user, params) +/mob/living/carbon/slime/attackby(obj/item/W, mob/living/user, params) if(stat == DEAD && surgeries.len) if(user.a_intent == INTENT_HELP) for(var/datum/surgery/S in surgeries) @@ -464,6 +407,7 @@ else if(W.force > 0) attacked += 10 if(prob(25)) + user.do_attack_animation(src) to_chat(user, "[W] passes right through [src]!") return if(Discipline && prob(50)) // wow, buddy, why am I getting attacked?? diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index d1eeafa6b19..0039284a6a0 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -229,13 +229,13 @@ // End BS12 momentum-transfer code. -/mob/living/proc/grabbedby(mob/living/carbon/user,var/supress_message = 0) +/mob/living/proc/grabbedby(mob/living/carbon/user, supress_message = 0) if(user == src || anchored) return 0 if(!(status_flags & CANPUSH)) return 0 - for(var/obj/item/grab/G in src.grabbed_by) + for(var/obj/item/grab/G in grabbed_by) if(G.assailant == user) to_chat(user, "You already grabbed [src].") return @@ -261,4 +261,78 @@ if(!supress_message) visible_message("[user] has grabbed [src] passively!") - return G \ No newline at end of file + return G + +/mob/living/attack_slime(mob/living/carbon/slime/M) + if(!ticker) + to_chat(M, "You cannot attack people before the game has started.") + return + + if(M.Victim) + return // can't attack while eating! + + if(stat != DEAD) + M.do_attack_animation(src) + visible_message("The [M.name] glomps [src]!", \ + "The [M.name] glomps [src]!") + + if(M.powerlevel > 0) + var/stunprob = M.powerlevel * 7 + 10 // 17 at level 1, 80 at level 10 + if(prob(stunprob)) + M.powerlevel -= 3 + if(M.powerlevel < 0) + M.powerlevel = 0 + + visible_message("The [M.name] has shocked [src]!", \ + "The [M.name] has shocked [src]!") + + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread + s.set_up(5, 1, src) + s.start() + return 1 + add_logs(M, src, "attacked", admin=0) + return + +/mob/living/attack_animal(mob/living/simple_animal/M) + if(M.melee_damage_upper == 0) + M.custom_emote(1, "[M.friendly] [src]") + return 0 + else + if(M.attack_sound) + playsound(loc, M.attack_sound, 50, 1, 1) + M.do_attack_animation(src) + visible_message("\The [M] [M.attacktext] [src]!", \ + "\The [M] [M.attacktext] [src]!") + add_logs(M, src, "attacked", admin=0) + return 1 + +/mob/living/attack_larva(mob/living/carbon/alien/larva/L) + switch(L.a_intent) + if(INTENT_HELP) + visible_message("[L.name] rubs its head against [src].") + return 0 + + else + L.do_attack_animation(src) + if(prob(90)) + add_logs(L, src, "attacked", admin=0) + visible_message("[L.name] bites [src]!", \ + "[L.name] bites [src]!") + playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1) + return 1 + else + visible_message("[L.name] has attempted to bite [src]!", \ + "[L.name] has attempted to bite [src]!") + return 0 + +/mob/living/attack_alien(mob/living/carbon/alien/humanoid/M) + switch(M.a_intent) + if(INTENT_HELP) + visible_message("[M] caresses [src] with its scythe like arm.") + return FALSE + if(INTENT_GRAB) + grabbedby(M) + return FALSE + else + M.do_attack_animation(src) + return TRUE diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 1579085c6ad..48b01e800c6 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -686,62 +686,6 @@ var/list/ai_verbs_default = list( updatehealth() return 2 - -/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M) - if(!ticker) - to_chat(M, "You cannot attack people before the game has started.") - return - - if(isturf(loc) && istype(loc.loc, /area/start)) - to_chat(M, "No attacking people at spawn, you jackass.") - return - - switch(M.a_intent) - - if(INTENT_HELP) - visible_message("[M] caresses [src]'s plating with its scythe like arm.") - - else //harm - M.do_attack_animation(src) - var/damage = rand(10, 20) - if(prob(90)) - playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1) - visible_message("[M] has slashed at [src]!",\ - "[M] has slashed at [src]!") - adjustBruteLoss(damage) - updatehealth() - else - playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) - visible_message("[M] took a swipe at [src]!", \ - "[M] took a swipe at [src]!") - - return - -/mob/living/silicon/ai/attack_animal(mob/living/simple_animal/M) - if(M.melee_damage_upper == 0) - M.custom_emote(1, "[M.friendly] [src]") - else - M.do_attack_animation(src) - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - visible_message("[M] [M.attacktext] [src]!") - add_attack_logs(M, src, "Animal attacked", FALSE) - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - switch(M.melee_damage_type) - if(BRUTE) - adjustBruteLoss(damage) - if(BURN) - adjustFireLoss(damage) - if(TOX) - adjustToxLoss(damage) - if(OXY) - adjustOxyLoss(damage) - if(CLONE) - adjustCloneLoss(damage) - if(STAMINA) - adjustStaminaLoss(damage) - updatehealth() - /mob/living/silicon/ai/reset_perspective(atom/A) if(camera_light_on) light_cameras() diff --git a/code/modules/mob/living/silicon/ai/ai_defense.dm b/code/modules/mob/living/silicon/ai/ai_defense.dm new file mode 100644 index 00000000000..6d32c24bb0a --- /dev/null +++ b/code/modules/mob/living/silicon/ai/ai_defense.dm @@ -0,0 +1,8 @@ +/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M) + if(!ticker) + to_chat(M, "You cannot attack people before the game has started.") + return + ..() + +/mob/living/silicon/ai/attack_slime(mob/living/carbon/slime/user) + return //immune to slimes diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 25781717e08..5a949d8eaba 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -242,41 +242,6 @@ adjustBruteLoss(damage) updatehealth() -/mob/living/silicon/pai/attack_alien(mob/living/carbon/alien/humanoid/M as mob) - if(!ticker) - to_chat(M, "You cannot attack people before the game has started.") - return - - if(istype(loc, /turf) && istype(loc.loc, /area/start)) - to_chat(M, "You cannot attack someone in the spawn area.") - return - - switch(M.a_intent) - - if(INTENT_HELP) - for(var/mob/O in viewers(src, null)) - if((O.client && !( O.blinded ))) - O.show_message(text("[M] caresses [src]'s casing with its scythe like arm."), 1) - - else //harm - M.do_attack_animation(src) - var/damage = rand(10, 20) - if(prob(90)) - playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1) - for(var/mob/O in viewers(src, null)) - if((O.client && !( O.blinded ))) - O.show_message(text("[] has slashed at []!", M, src), 1) - if(prob(8)) - flash_eyes(affect_silicon = 1) - adjustBruteLoss(damage) - updatehealth() - else - playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) - for(var/mob/O in viewers(src, null)) - if((O.client && !( O.blinded ))) - O.show_message(text("[] took a swipe at []!", M, src), 1) - return - /mob/living/silicon/pai/proc/switchCamera(var/obj/machinery/camera/C) usr:cameraFollow = null if(!C) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm b/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm index 48b9d558979..b3e6a62cb2e 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm @@ -43,11 +43,11 @@ control_headlamp() //Actual picking-up event. -/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M as mob) +/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M) if(M.a_intent == INTENT_HELP) get_scooped(M) - - ..() + else + ..() /mob/living/silicon/robot/drone/verb/customize() set name = "Customize Chassis" diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 0b0872e663b..ffc5afe6184 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -832,126 +832,10 @@ var/list/robot_verbs_default = list( update_icons() to_chat(usr, "You unlock your cover.") -/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M as mob) - if(!ticker) - to_chat(M, "You cannot attack people before the game has started.") - return - - if(istype(loc, /turf) && istype(loc.loc, /area/start)) - to_chat(M, "No attacking people at spawn, you jackass.") - return - - switch(M.a_intent) - - if(INTENT_HELP) - for(var/mob/O in viewers(src, null)) - if((O.client && !( O.blinded ))) - O.show_message(text("[M] caresses [src]'s plating with its scythe like arm."), 1) - - if(INTENT_GRAB) - grabbedby(M) - - if(INTENT_HARM) - M.do_attack_animation(src) - var/damage = rand(10, 20) - if(prob(90)) - playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1) - visible_message("[M] has slashed at [src]!",\ - "[M] has slashed at [src]!") - if(prob(8)) - flash_eyes(affect_silicon = 1) - adjustBruteLoss(damage) - updatehealth() - else - playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) - visible_message("[M] took a swipe at [src]!", \ - "[M] took a swipe at [src]!") - - if(INTENT_DISARM) - if(!(lying)) - M.do_attack_animation(src) - if(prob(85)) - Stun(7) - step(src,get_dir(M,src)) - spawn(5) - step(src,get_dir(M,src)) - playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1) - visible_message("[M] has forced back [src]!",\ - "[M] has forced back [src]!") - else - playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) - visible_message("[M] attempted to force back [src]!",\ - "[M] attempted to force back [src]!") - return - - - -/mob/living/silicon/robot/attack_slime(mob/living/carbon/slime/M as mob) - if(..()) //successful slime shock - flash_eyes(affect_silicon = 1) - var/stunprob = M.powerlevel * 7 + 10 - if(prob(stunprob) && M.powerlevel >= 8) - adjustBruteLoss(M.powerlevel * rand(6,10)) - - var/damage = rand(1, 3) - - if(M.is_adult) - damage = rand(20, 40) - else - damage = rand(5, 35) - damage = round(damage / 2) // borgs recieve half damage - adjustBruteLoss(damage) - updatehealth() - - return - -/mob/living/silicon/robot/attack_animal(mob/living/simple_animal/M as mob) - if(M.melee_damage_upper == 0) - M.custom_emote(1, "[M.friendly] [src]") - else - M.do_attack_animation(src) - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - visible_message("[M] [M.attacktext] [src]!") - add_attack_logs(M, src, "Animal attacked", FALSE) - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - switch(M.melee_damage_type) - if(BRUTE) - adjustBruteLoss(damage) - if(BURN) - adjustFireLoss(damage) - if(TOX) - adjustToxLoss(damage) - if(OXY) - adjustOxyLoss(damage) - if(CLONE) - adjustCloneLoss(damage) - if(STAMINA) - adjustStaminaLoss(damage) - updatehealth() - /mob/living/silicon/robot/attack_ghost(mob/user) if(wiresexposed) wires.Interact(user) -/mob/living/silicon/robot/attack_hand(mob/user) - add_fingerprint(user) - - if(opened && !wiresexposed && (!istype(user, /mob/living/silicon))) - if(cell) - cell.updateicon() - cell.add_fingerprint(user) - user.put_in_active_hand(cell) - to_chat(user, "You remove \the [cell].") - cell = null - update_icons() - diag_hud_set_borgcell() - - if(!opened && (!istype(user, /mob/living/silicon))) - if(user.a_intent == INTENT_HELP) - user.visible_message("[user] pets [src]!", \ - "You pet [src]!") - /mob/living/silicon/robot/proc/allowed(obj/item/I) var/obj/dummy = new /obj(null) // Create a dummy object to check access on as to avoid having to snowflake check_access on every mob dummy.req_access = req_access diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm new file mode 100644 index 00000000000..ca240058e58 --- /dev/null +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -0,0 +1,59 @@ +/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M) + if(M.a_intent == INTENT_DISARM) + if(!lying) + M.do_attack_animation(src) + if(prob(85)) + Stun(7) + step(src, get_dir(M,src)) + spawn(5) + step(src, get_dir(M,src)) + add_logs(M, src, "pushed", admin=0) + playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1) + visible_message("[M] has forced back [src]!",\ + "[M] has forced back [src]!") + else + playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) + visible_message("[M] took a swipe at [src]!",\ + "[M] took a swipe at [src]!") + else + ..() + return + +/mob/living/silicon/robot/attack_slime(mob/living/carbon/slime/M) + if(..()) //successful slime shock + flash_eyes(affect_silicon = 1) + var/stunprob = M.powerlevel * 7 + 10 + if(prob(stunprob) && M.powerlevel >= 8) + adjustBruteLoss(M.powerlevel * rand(6,10)) + + var/damage = rand(1, 3) + + if(M.is_adult) + damage = rand(20, 40) + else + damage = rand(5, 35) + damage = round(damage / 2) // borgs recieve half damage + adjustBruteLoss(damage) + updatehealth() + return + +/mob/living/silicon/robot/attack_hand(mob/living/carbon/human/user) + add_fingerprint(user) + + if(opened && !wiresexposed && !issilicon(user)) + if(cell) + cell.updateicon() + cell.add_fingerprint(user) + user.put_in_active_hand(cell) + to_chat(user, "You remove \the [cell].") + cell = null + update_icons() + diag_hud_set_borgcell() + + if(!opened) + if(..()) // hulk attack + spark_system.start() + spawn(0) + step_away(src, user, 15) + sleep(3) + step_away(src, user, 15) diff --git a/code/modules/mob/living/silicon/silicon_defense.dm b/code/modules/mob/living/silicon/silicon_defense.dm new file mode 100644 index 00000000000..5659eecc4dc --- /dev/null +++ b/code/modules/mob/living/silicon/silicon_defense.dm @@ -0,0 +1,66 @@ +/mob/living/silicon/grabbedby(mob/living/user) + return + +/mob/living/silicon/attack_alien(mob/living/carbon/alien/humanoid/M) + if(..()) //if harm or disarm intent + var/damage = rand(10, 20) + if(prob(90)) + add_logs(M, src, "attacked", admin=0) + playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1) + visible_message("[M] has slashed at [src]!", \ + "[M] has slashed at [src]!") + if(prob(8)) + flash_eyes(affect_silicon = 1) + add_logs(M, src, "attacked", admin=0) + adjustBruteLoss(damage) + updatehealth() + else + playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) + visible_message("[M] took a swipe at [src]!", \ + "[M] took a swipe at [src]!") + return + +/mob/living/silicon/attack_animal(mob/living/simple_animal/M) + if(..()) + var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) + switch(M.melee_damage_type) + if(BRUTE) + adjustBruteLoss(damage) + if(BURN) + adjustFireLoss(damage) + if(TOX) + adjustToxLoss(damage) + if(OXY) + adjustOxyLoss(damage) + if(CLONE) + adjustCloneLoss(damage) + if(STAMINA) + adjustStaminaLoss(damage) + updatehealth() + +/mob/living/silicon/attack_larva(mob/living/carbon/alien/larva/L) + if(L.a_intent == INTENT_HELP) + visible_message("[L.name] rubs its head against [src].") + +/mob/living/silicon/attack_hand(mob/living/carbon/human/M) + switch(M.a_intent) + if(INTENT_HELP) + M.visible_message("[M] pets [src]!", \ + "You pet [src]!") + if("grab") + grabbedby(M) + else + M.do_attack_animation(src) + playsound(loc, 'sound/effects/bang.ogg', 10, 1) + if(HULK in M.mutations) + var/damage = rand(10,15) + adjustBruteLoss(damage) + add_logs(M, src, "attacked", admin=0) + 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.", \ + "[M] punches [src], but doesn't leave a dent.!") + return 0 diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm new file mode 100644 index 00000000000..acf22ed69f7 --- /dev/null +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -0,0 +1,60 @@ +/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M) + ..() + switch(M.a_intent) + + if(INTENT_HELP) + if(health > 0) + visible_message("[M] [response_help] [src].") + playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) + + if(INTENT_GRAB) + grabbedby(M) + + if(INTENT_HARM, INTENT_DISARM) + M.do_attack_animation(src) + visible_message("[M] [response_harm] [src]!") + playsound(loc, "punch", 25, 1, -1) + attack_threshold_check(harm_intent_damage) + add_logs(M, src, "attacked", admin=0) + updatehealth() + return 1 + +/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M) + if(..()) //if harm or disarm intent. + var/damage = rand(15, 30) + visible_message("[M] has slashed at [src]!", \ + "[M] has slashed at [src]!") + playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) + add_logs(M, src, "attacked", admin=0) + attack_threshold_check(damage) + return + +/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L) + if(..()) //successful larva bite + var/damage = rand(5, 10) + if(stat != DEAD) + L.amount_grown = min(L.amount_grown + damage, L.max_grown) + attack_threshold_check(damage) + +/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M) + if(..()) + var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) + attack_threshold_check(damage, M.melee_damage_type) + +/mob/living/simple_animal/attack_slime(mob/living/carbon/slime/M) + ..() + var/damage = rand(1, 3) + + if(M.is_adult) + damage = rand(20, 40) + else + damage = rand(5, 35) + + attack_threshold_check(damage) + return + +/mob/living/simple_animal/proc/attack_threshold_check(damage, damagetype = BRUTE) + if(damage <= force_threshold || !damage_coeff[damagetype]) + visible_message("[src] looks unharmed.") + else + apply_damage(damage, damagetype) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index ae8cecb8eb2..8d9d07c00e7 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -258,21 +258,21 @@ return return 1 //Successful completion. Used to prevent child process() continuing if this one is ended early. -/mob/living/simple_animal/bot/attack_alien(var/mob/living/carbon/alien/user as mob) +/mob/living/simple_animal/bot/attack_alien(mob/living/carbon/alien/user) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) apply_damage(rand(15,30), BRUTE) - visible_message("[user] has slashed [src]!") + visible_message("[user] has slashed [src]!") playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) if(prob(10)) new /obj/effect/decal/cleanable/blood/oil(loc) -/mob/living/simple_animal/bot/attack_animal(var/mob/living/simple_animal/M as mob) +/mob/living/simple_animal/bot/attack_animal(mob/living/simple_animal/M) M.do_attack_animation(src) if(M.melee_damage_upper == 0) return apply_damage(M.melee_damage_upper, BRUTE) - visible_message("[M] has [M.attacktext] [src]!") + visible_message("[M] has [M.attacktext] [src]!") add_attack_logs(M, src, "Animal attacked", FALSE) if(prob(10)) new /obj/effect/decal/cleanable/blood/oil(loc) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index a4eba013f94..c7b82dc44b8 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -264,19 +264,6 @@ ..(act, m_type, message) -/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob) - if(M.melee_damage_upper == 0) - M.custom_emote(1, "[M.friendly] [src]") - else - M.do_attack_animation(src) - if(M.attack_sound) - playsound(loc, M.attack_sound, 50, 1, 1) - visible_message("\The [M] [M.attacktext] [src]!", \ - "\The [M] [M.attacktext] [src]!") - add_attack_logs(M, src, "Animal attacked") - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - attack_threshold_check(damage,M.melee_damage_type) - /mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj) if(!Proj) return @@ -285,104 +272,6 @@ Proj.on_hit(src, 0) return 0 -/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M as mob) - ..() - - switch(M.a_intent) - - if(INTENT_HELP) - if(health > 0) - visible_message(" [M] [response_help] [src].") - playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - - if(INTENT_GRAB) - if(M == src || anchored) - return - if(!(status_flags & CANPUSH)) - return - - var/obj/item/grab/G = new /obj/item/grab(M, src ) - - M.put_in_active_hand(G) - - G.synch() - - LAssailant = M - - visible_message("[M] has grabbed [src] passively!") - playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - - if(INTENT_HARM, INTENT_DISARM) - M.do_attack_animation(src) - visible_message("[M] [response_harm] [src]!") - playsound(loc, "punch", 25, 1, -1) - attack_threshold_check(harm_intent_damage) - - return - -/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M as mob) - - switch(M.a_intent) - - if(INTENT_HELP) - - visible_message("[M] caresses [src] with its scythe like arm.") - if(INTENT_GRAB) - grabbedby(M) - - if(INTENT_HARM, INTENT_DISARM) - M.do_attack_animation(src) - var/damage = rand(15, 30) - visible_message("[M] has slashed at [src]!", \ - "[M] has slashed at [src]!") - playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) - attack_threshold_check(damage) - - return - -/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L as mob) - - switch(L.a_intent) - if(INTENT_HELP) - visible_message("[L] rubs its head against [src].") - - - else - L.do_attack_animation(src) - var/damage = rand(5, 10) - visible_message("[L] bites [src]!", \ - "[L] bites [src]!") - playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1) - - if(stat != DEAD) - L.amount_grown = min(L.amount_grown + damage, L.max_grown) - attack_threshold_check(damage) - - -/mob/living/simple_animal/attack_slime(mob/living/carbon/slime/M as mob) - if(!ticker) - to_chat(M, "You cannot attack people before the game has started.") - return - - if(M.Victim) return // can't attack while eating! - - if(health > 0) - M.do_attack_animation(src) - visible_message("[M.name] glomps [src]!", \ - "[M.name] glomps [src]!") - - var/damage = rand(1, 3) - - if(M.is_adult) - damage = rand(20, 40) - else - damage = rand(5, 35) - - attack_threshold_check(damage) - - - return - /mob/living/simple_animal/attackby(obj/item/O, mob/living/user) if(can_collar && !collar && istype(O, /obj/item/clothing/accessory/petcollar)) var/obj/item/clothing/accessory/petcollar/C = O @@ -510,12 +399,6 @@ /mob/living/simple_animal/ExtinguishMob() return -/mob/living/simple_animal/proc/attack_threshold_check(damage, damagetype = BRUTE) - if(damage <= force_threshold || !damage_coeff[damagetype]) - visible_message("[src] looks unharmed from the damage.") - else - apply_damage(damage, damagetype) - /mob/living/simple_animal/update_transform() var/matrix/ntransform = matrix(transform) //aka transform.Copy() var/changed = 0 diff --git a/paradise.dme b/paradise.dme index ba1e6d19a10..1d329f9aec5 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1570,7 +1570,7 @@ #include "code\modules\mob\living\update_status.dm" #include "code\modules\mob\living\carbon\_defines.dm" #include "code\modules\mob\living\carbon\carbon.dm" -#include "code\modules\mob\living\carbon\carbon_defenses.dm" +#include "code\modules\mob\living\carbon\carbon_defense.dm" #include "code\modules\mob\living\carbon\carbon_defines.dm" #include "code\modules\mob\living\carbon\death.dm" #include "code\modules\mob\living\carbon\give.dm" @@ -1579,7 +1579,7 @@ #include "code\modules\mob\living\carbon\update_icons.dm" #include "code\modules\mob\living\carbon\update_status.dm" #include "code\modules\mob\living\carbon\alien\alien.dm" -#include "code\modules\mob\living\carbon\alien\alien_defenses.dm" +#include "code\modules\mob\living\carbon\alien\alien_defense.dm" #include "code\modules\mob\living\carbon\alien\death.dm" #include "code\modules\mob\living\carbon\alien\life.dm" #include "code\modules\mob\living\carbon\alien\login.dm" @@ -1588,6 +1588,7 @@ #include "code\modules\mob\living\carbon\alien\humanoid\emote.dm" #include "code\modules\mob\living\carbon\alien\humanoid\empress.dm" #include "code\modules\mob\living\carbon\alien\humanoid\humanoid.dm" +#include "code\modules\mob\living\carbon\alien\humanoid\humanoid_defense.dm" #include "code\modules\mob\living\carbon\alien\humanoid\inventory.dm" #include "code\modules\mob\living\carbon\alien\humanoid\life.dm" #include "code\modules\mob\living\carbon\alien\humanoid\queen.dm" @@ -1599,6 +1600,7 @@ #include "code\modules\mob\living\carbon\alien\larva\emote.dm" #include "code\modules\mob\living\carbon\alien\larva\inventory.dm" #include "code\modules\mob\living\carbon\alien\larva\larva.dm" +#include "code\modules\mob\living\carbon\alien\larva\larva_defense.dm" #include "code\modules\mob\living\carbon\alien\larva\life.dm" #include "code\modules\mob\living\carbon\alien\larva\powers.dm" #include "code\modules\mob\living\carbon\alien\larva\update_icons.dm" @@ -1620,7 +1622,6 @@ #include "code\modules\mob\living\carbon\human\emote.dm" #include "code\modules\mob\living\carbon\human\examine.dm" #include "code\modules\mob\living\carbon\human\human.dm" -#include "code\modules\mob\living\carbon\human\human_attackalien.dm" #include "code\modules\mob\living\carbon\human\human_attackhand.dm" #include "code\modules\mob\living\carbon\human\human_damage.dm" #include "code\modules\mob\living\carbon\human\human_defense.dm" @@ -1663,8 +1664,10 @@ #include "code\modules\mob\living\silicon\login.dm" #include "code\modules\mob\living\silicon\say.dm" #include "code\modules\mob\living\silicon\silicon.dm" +#include "code\modules\mob\living\silicon\silicon_defense.dm" #include "code\modules\mob\living\silicon\subsystems.dm" #include "code\modules\mob\living\silicon\ai\ai.dm" +#include "code\modules\mob\living\silicon\ai\ai_defense.dm" #include "code\modules\mob\living\silicon\ai\death.dm" #include "code\modules\mob\living\silicon\ai\examine.dm" #include "code\modules\mob\living\silicon\ai\latejoin.dm" @@ -1702,6 +1705,7 @@ #include "code\modules\mob\living\silicon\robot\photos.dm" #include "code\modules\mob\living\silicon\robot\robot.dm" #include "code\modules\mob\living\silicon\robot\robot_damage.dm" +#include "code\modules\mob\living\silicon\robot\robot_defense.dm" #include "code\modules\mob\living\silicon\robot\robot_items.dm" #include "code\modules\mob\living\silicon\robot\robot_module_actions.dm" #include "code\modules\mob\living\silicon\robot\robot_modules.dm" @@ -1715,6 +1719,7 @@ #include "code\modules\mob\living\silicon\robot\drone\drone_manufacturer.dm" #include "code\modules\mob\living\silicon\robot\drone\drone_say.dm" #include "code\modules\mob\living\silicon\robot\drone\update_status.dm" +#include "code\modules\mob\living\simple_animal\animal_defense.dm" #include "code\modules\mob\living\simple_animal\constructs.dm" #include "code\modules\mob\living\simple_animal\corpse.dm" #include "code\modules\mob\living\simple_animal\parrot.dm" From 20670489214c4b5d2de5b88746479feef5e9402d Mon Sep 17 00:00:00 2001 From: uraniummeltdown Date: Wed, 28 Mar 2018 23:42:37 +0400 Subject: [PATCH 021/232] changes human/attack_hand() to be species-based splits attack_hand() intents into their own species procs --- .../mob/living/carbon/carbon_defense.dm | 6 + .../living/carbon/human/human_attackhand.dm | 197 ------------------ .../mob/living/carbon/human/human_defense.dm | 7 + .../mob/living/carbon/human/species/apollo.dm | 43 ++-- .../living/carbon/human/species/species.dm | 195 ++++++++++++++++- paradise.dme | 1 - 6 files changed, 227 insertions(+), 222 deletions(-) delete mode 100644 code/modules/mob/living/carbon/human/human_attackhand.dm diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 140e868dddf..7e6f427e069 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -38,6 +38,12 @@ var/datum/disease/D = thing if(D.IsSpreadByTouch()) ContractDisease(D) + + if(lying && surgeries.len) + if(user.a_intent == INTENT_HELP) + for(var/datum/surgery/S in surgeries) + if(S.next_step(user, user.a_intent)) + return 1 return 0 /mob/living/carbon/attack_slime(mob/living/carbon/slime/M) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm deleted file mode 100644 index eedc6c1ea0c..00000000000 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ /dev/null @@ -1,197 +0,0 @@ -/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M) - if(frozen) - to_chat(M, "Do not touch Admin-Frozen people.") - return - - var/mob/living/carbon/human/H = M - if(istype(H)) - var/obj/item/organ/external/temp = H.bodyparts_by_name["r_hand"] - if(H.hand) - temp = H.bodyparts_by_name["l_hand"] - if(!temp || !temp.is_usable()) - to_chat(H, "You can't use your hand.") - return - - ..() - - if((M != src) && M.a_intent != INTENT_HELP && check_shields(0, M.name, attack_type = UNARMED_ATTACK)) - add_attack_logs(M, src, "Melee attacked with fists (miss/block)") - visible_message("[M] attempted to touch [src]!") - return 0 - - var/datum/martial_art/attacker_style = M.martial_art - - species.handle_attack_hand(src, M) - - switch(M.a_intent) - if(INTENT_HELP) - if(attacker_style && attacker_style.help_act(H, src))//adminfu only... - return 1 - if(can_operate(src)) - if(health >= config.health_threshold_crit) - if(src.surgeries.len) - for(var/datum/surgery/S in src.surgeries) - if(S.next_step(M, src)) - return 1 - help_shake_act(M) - add_attack_logs(M, src, "Shaked") - return 1 - if(health >= config.health_threshold_crit) - help_shake_act(M) - add_attack_logs(M, src, "Shaked") - return 1 - if(!H.check_has_mouth()) - to_chat(H, "You don't have a mouth, you cannot perform CPR!") - return - if(!check_has_mouth()) - to_chat(H, "They don't have a mouth, you cannot perform CPR!") - return - if((M.head && (M.head.flags_cover & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags_cover & MASKCOVERSMOUTH) && !M.wear_mask.mask_adjusted)) - to_chat(M, "Remove your mask!") - return 0 - if((head && (head.flags_cover & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && !wear_mask.mask_adjusted)) - to_chat(M, "Remove his mask!") - return 0 - - M.visible_message("\The [M] is trying to perform CPR on \the [src]!", \ - "You try to perform CPR on \the [src]!") - if(do_mob(M, src, 40)) - if(health > config.health_threshold_dead && health <= config.health_threshold_crit) - var/suff = min(getOxyLoss(), 7) - adjustOxyLoss(-suff) - updatehealth() - M.visible_message("\The [M] performs CPR on \the [src]!", \ - "You perform CPR on \the [src].") - - to_chat(src, "You feel a breath of fresh air enter your lungs. It feels good.") - to_chat(M, "Repeat at least every 7 seconds.") - add_attack_logs(M, src, "CPRed", FALSE) - return 1 - else - to_chat(M, "You need to stay still while performing CPR!") - - if(INTENT_GRAB) - if(attacker_style && attacker_style.grab_act(H, src)) - return 1 - else - grabbedby(M) - return 1 - - if(INTENT_HARM) - //Vampire code - if(M.mind && M.mind.vampire && (M.mind in ticker.mode.vampires) && !M.mind.vampire.draining && M.zone_sel && M.zone_sel.selecting == "head" && src != M) - if((NO_BLOOD in species.species_traits) || species.exotic_blood || !blood_volume) - to_chat(M, "They have no blood!") - return - if(mind && mind.vampire && (mind in ticker.mode.vampires)) - to_chat(M, "Your fangs fail to pierce [name]'s cold flesh") - return - if(SKELETON in mutations) - to_chat(M, "There is no blood in a skeleton!") - return - if(issmall(src) && !ckey) //Monkeyized humans are okay, humanized monkeys are okay, NPC monkeys are not. - to_chat(M, "Blood from a monkey is useless!") - return - //we're good to suck the blood, blaah - M.mind.vampire.handle_bloodsucking(src) - add_attack_logs(M, src, "vampirebit") - return - //end vampire codes - if(attacker_style && attacker_style.harm_act(H, src)) - return 1 - else - var/datum/unarmed_attack/attack = M.species.unarmed - - M.do_attack_animation(src) - add_attack_logs(M, src, "Melee attacked with fists") - - if(!iscarbon(M)) - LAssailant = null - else - LAssailant = M - - var/damage = rand(M.species.punchdamagelow, M.species.punchdamagehigh) - damage += attack.damage - if(!damage) - playsound(loc, attack.miss_sound, 25, 1, -1) - visible_message("[M] tried to [pick(attack.attack_verb)] [src]!") - return 0 - - - var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) - var/armor_block = run_armor_check(affecting, "melee") - - if(HULK in M.mutations) - adjustBruteLoss(15) - - playsound(loc, attack.attack_sound, 25, 1, -1) - - visible_message("[M] [pick(attack.attack_verb)]ed [src]!") - - apply_damage(damage, BRUTE, affecting, armor_block, sharp = attack.sharp) //moving this back here means Armalis are going to knock you down 70% of the time, but they're pure adminbus anyway. - if((stat != DEAD) && damage >= M.species.punchstunthreshold) - visible_message("[M] has weakened [src]!", \ - "[M] has weakened [src]!") - apply_effect(4, WEAKEN, armor_block) - forcesay(hit_appends) - else if(lying) - forcesay(hit_appends) - - - if(INTENT_DISARM) - if(attacker_style && attacker_style.disarm_act(H, src)) - return 1 - else - add_attack_logs(M, src, "Disarmed") - M.do_attack_animation(src) - if(w_uniform) - w_uniform.add_fingerprint(M) - var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) - var/randn = rand(1, 100) - if(randn <= 25) - apply_effect(2, WEAKEN, run_armor_check(affecting, "melee")) - playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - visible_message("[M] has pushed [src]!") - add_attack_logs(M, src, "Pushed over") - if(!iscarbon(M)) - LAssailant = null - else - LAssailant = M - return - - var/talked = 0 // BubbleWrap - - if(randn <= 60) - //BubbleWrap: Disarming breaks a pull - if(pulling) - visible_message("[M] has broken [src]'s grip on [pulling]!") - talked = 1 - stop_pulling() - - //BubbleWrap: Disarming also breaks a grab - this will also stop someone being choked, won't it? - if(istype(l_hand, /obj/item/grab)) - var/obj/item/grab/lgrab = l_hand - if(lgrab.affecting) - visible_message("[M] has broken [src]'s grip on [lgrab.affecting]!") - talked = 1 - spawn(1) - qdel(lgrab) - if(istype(r_hand, /obj/item/grab)) - var/obj/item/grab/rgrab = r_hand - if(rgrab.affecting) - visible_message("[M] has broken [src]'s grip on [rgrab.affecting]!") - talked = 1 - spawn(1) - qdel(rgrab) - //End BubbleWrap - - if(!talked) //BubbleWrap - if(drop_item()) - visible_message("[M] has disarmed [src]!") - playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - return - - - playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) - visible_message("[M] attempted to disarm [src]!") - return diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 1d4dc544667..d6545d9bff6 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -348,6 +348,13 @@ emp_act if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam) +/mob/living/carbon/human/attack_hand(mob/user) + if(..()) //to allow surgery to return properly. + return + if(ishuman(user)) + var/mob/living/carbon/human/H = user + species.spec_attack_hand(H, src) + /mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L) if(..()) //successful larva bite. var/damage = rand(1, 3) diff --git a/code/modules/mob/living/carbon/human/species/apollo.dm b/code/modules/mob/living/carbon/human/species/apollo.dm index f1ca3294017..0b38b57c786 100644 --- a/code/modules/mob/living/carbon/human/species/apollo.dm +++ b/code/modules/mob/living/carbon/human/species/apollo.dm @@ -56,30 +56,29 @@ to_chat(C, "Your antennae tingle as you are overcome with pain...") to_chat(C, "It feels like part of you has died.") -/datum/species/wryn/handle_attack_hand(var/mob/living/carbon/human/H, var/mob/living/carbon/human/M) - var/obj/item/organ/external/head/head_organ = H.get_organ("head") - if(M.a_intent == INTENT_HARM) - if(H.handcuffed) - if(!H.get_int_organ(/obj/item/organ/internal/wryn/hivenode)) return - var/turf/p_loc = M.loc - var/turf/p_loc_m = H.loc +/datum/species/wryn/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) + if(target.handcuffed) + if(!target.get_int_organ(/obj/item/organ/internal/wryn/hivenode)) + return - M.visible_message("[M] begins to violently pull off [H]'s antennae.") - to_chat(H, "[M] grips your antennae and starts violently pulling!") - if(do_after(H, 250, target = src)) - if(p_loc == M.loc && p_loc_m == H.loc) - var/obj/item/organ/internal/wryn/hivenode/node = new /obj/item/organ/internal/wryn/hivenode - H.remove_language("Wryn Hivemind") - node.remove(H) - node.loc = M.loc - to_chat(M, "You hear a loud crunch as you mercilessly pull off [H]'s antennae.") - to_chat(H, "You hear a loud crunch as your antennae is ripped off your head by [M].") - to_chat(H, "It's so quiet...") - head_organ.h_style = "Bald" - H.update_hair() + user.visible_message("[user] begins to violently pull off [target]'s antennae.") + to_chat(target, "[user] grips your antennae and starts violently pulling!") + if(do_mob(user, target, 250)) + var/obj/item/organ/internal/wryn/hivenode/node = new /obj/item/organ/internal/wryn/hivenode + target.remove_language("Wryn Hivemind") + node.remove(target) + node.forceMove(user.loc) + to_chat(user, "You hear a loud crunch as you mercilessly pull off [target]'s antennae.") + to_chat(target, "You hear a loud crunch as your antennae is ripped off your head by [user].") + to_chat(target, "It's so quiet...") + var/obj/item/organ/external/head/head_organ = target.get_organ("head") + head_organ.h_style = "Bald" + target.update_hair() - add_attack_logs(M, H, "Antennae removed") - return 0 + add_attack_logs(user, target, "Antennae removed") + return 0 + else + ..() /datum/species/nucleation name = "Nucleation" diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 901d221a8b3..8bc5ccfd6b4 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -315,8 +315,199 @@ /datum/species/proc/handle_death(var/mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns). return -/datum/species/proc/handle_attack_hand(var/mob/living/carbon/human/H, var/mob/living/carbon/human/M) //Handles any species-specific attackhand events. - return +/datum/species/proc/help(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) + if(attacker_style && attacker_style.help_act(user, target))//adminfu only... + return 1 + if(target.health >= config.health_threshold_crit) + target.help_shake_act(user) + add_attack_logs(user, target, "Shaked") + return 1 + if(!user.check_has_mouth()) + to_chat(user, "You don't have a mouth, you cannot perform CPR!") + return + if(!target.check_has_mouth()) + to_chat(user, "They don't have a mouth, you cannot perform CPR!") + return + if((user.head && (user.head.flags_cover & HEADCOVERSMOUTH)) || (user.wear_mask && (user.wear_mask.flags_cover & MASKCOVERSMOUTH) && !user.wear_mask.mask_adjusted)) + to_chat(user, "Remove your mask!") + return 0 + if((target.head && (target.head.flags_cover & HEADCOVERSMOUTH)) || (target.wear_mask && (target.wear_mask.flags_cover & MASKCOVERSMOUTH) && !target.wear_mask.mask_adjusted)) + to_chat(user, "Remove his mask!") + return 0 + + user.visible_message("\The [user] is trying to perform CPR on \the [target]!", \ + "You try to perform CPR on \the [target]!") + if(do_mob(user, target, 40)) + if(target.health > config.health_threshold_dead && target.health <= config.health_threshold_crit) + var/suff = min(target.getOxyLoss(), 7) + target.adjustOxyLoss(-suff) + target.updatehealth() + user.visible_message("\The [user] performs CPR on \the [target]!", \ + "You perform CPR on \the [target].") + + to_chat(target, "You feel a breath of fresh air enter your lungs. It feels good.") + to_chat(user, "Repeat at least every 7 seconds.") + add_attack_logs(user, target, "CPRed", FALSE) + return 1 + else + to_chat(user, "You need to stay still while performing CPR!") + +/datum/species/proc/grab(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) + if(attacker_style && attacker_style.grab_act(user, target)) + return 1 + else + target.grabbedby(user) + return 1 + +/datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) + //Vampire code + if(user.mind && user.mind.vampire && (user.mind in ticker.mode.vampires) && !user.mind.vampire.draining && user.zone_sel && user.zone_sel.selecting == "head" && target != user) + if((NO_BLOOD in target.species.species_traits) || target.species.exotic_blood || !target.blood_volume) + to_chat(user, "They have no blood!") + return + if(target.mind && target.mind.vampire && (target.mind in ticker.mode.vampires)) + to_chat(user, "Your fangs fail to pierce [target.name]'s cold flesh") + return + if(SKELETON in target.mutations) + to_chat(user, "There is no blood in a skeleton!") + return + if(issmall(target) && !target.ckey) //Monkeyized humans are okay, humanized monkeys are okay, NPC monkeys are not. + to_chat(user, "Blood from a monkey is useless!") + return + //we're good to suck the blood, blaah + user.mind.vampire.handle_bloodsucking(target) + add_attack_logs(user, target, "vampirebit") + return + //end vampire codes + if(attacker_style && attacker_style.harm_act(user, target)) + return 1 + else + var/datum/unarmed_attack/attack = user.species.unarmed + + user.do_attack_animation(target) + add_attack_logs(user, target, "Melee attacked with fists") + + if(!iscarbon(user)) + target.LAssailant = null + else + target.LAssailant = user + + var/damage = rand(user.species.punchdamagelow, user.species.punchdamagehigh) + damage += attack.damage + if(!damage) + playsound(target.loc, attack.miss_sound, 25, 1, -1) + target.visible_message("[user] tried to [pick(attack.attack_verb)] [target]!") + return 0 + + + 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]!") + + target.apply_damage(damage, BRUTE, affecting, armor_block, sharp = attack.sharp) //moving this back here means Armalis are going to knock you down 70% of the time, but they're pure adminbus anyway. + if((target.stat != DEAD) && damage >= user.species.punchstunthreshold) + target.visible_message("[user] has weakened [target]!", \ + "[user] has weakened [target]!") + target.apply_effect(4, WEAKEN, armor_block) + target.forcesay(hit_appends) + else if(target.lying) + target.forcesay(hit_appends) + +/datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) + if(attacker_style && attacker_style.disarm_act(user, target)) + return 1 + else + add_attack_logs(user, target, "Disarmed") + user.do_attack_animation(target) + if(target.w_uniform) + target.w_uniform.add_fingerprint(user) + var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_sel.selecting)) + var/randn = rand(1, 100) + if(randn <= 25) + 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") + if(!iscarbon(user)) + target.LAssailant = null + else + target.LAssailant = user + return + + var/talked = 0 // BubbleWrap + + if(randn <= 60) + //BubbleWrap: Disarming breaks a pull + if(target.pulling) + target.visible_message("[user] has broken [target]'s grip on [target.pulling]!") + talked = 1 + target.stop_pulling() + + //BubbleWrap: Disarming also breaks a grab - this will also stop someone being choked, won't it? + if(istype(target.l_hand, /obj/item/weapon/grab)) + var/obj/item/weapon/grab/lgrab = target.l_hand + if(lgrab.affecting) + target.visible_message("[user] has broken [target]'s grip on [lgrab.affecting]!") + talked = 1 + spawn(1) + qdel(lgrab) + if(istype(target.r_hand, /obj/item/weapon/grab)) + var/obj/item/weapon/grab/rgrab = target.r_hand + if(rgrab.affecting) + target.visible_message("[user] has broken [target]'s grip on [rgrab.affecting]!") + talked = 1 + spawn(1) + qdel(rgrab) + //End BubbleWrap + + if(!talked) //BubbleWrap + if(target.drop_item()) + target.visible_message("[user] has disarmed [target]!") + playsound(target.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) + return + + + playsound(target.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) + target.visible_message("[user] attempted to disarm [target]!") + +/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style = M.martial_art) //Handles any species-specific attackhand events. + if(!istype(M)) + return + if(H.frozen) + to_chat(M, "Do not touch Admin-Frozen people.") + return + + if(istype(M)) + var/obj/item/organ/external/temp = M.bodyparts_by_name["r_hand"] + if(M.hand) + temp = M.bodyparts_by_name["l_hand"] + if(!temp || !temp.is_usable()) + to_chat(M, "You can't use your hand.") + return + + if((M != H) && M.a_intent != INTENT_HELP && H.check_shields(0, M.name, attack_type = UNARMED_ATTACK)) + add_attack_logs(M, H, "Melee attacked with fists (miss/block)") + H.visible_message("[M] attempted to touch [H]!") + return 0 + + switch(M.a_intent) + if(INTENT_HELP) + help(M, H, attacker_style) + + if(INTENT_GRAB) + grab(M, H, attacker_style) + + if(INTENT_HARM) + harm(M, H, attacker_style) + + if(INTENT_DISARM) + disarm(M, H, attacker_style) /datum/species/proc/say_filter(mob/M, message, datum/language/speaking) return message diff --git a/paradise.dme b/paradise.dme index 1d329f9aec5..716baebdf05 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1622,7 +1622,6 @@ #include "code\modules\mob\living\carbon\human\emote.dm" #include "code\modules\mob\living\carbon\human\examine.dm" #include "code\modules\mob\living\carbon\human\human.dm" -#include "code\modules\mob\living\carbon\human\human_attackhand.dm" #include "code\modules\mob\living\carbon\human\human_damage.dm" #include "code\modules\mob\living\carbon\human\human_defense.dm" #include "code\modules\mob\living\carbon\human\human_defines.dm" From d873cf93fa3cfe94dfe19aa7efad92cdeeba97b7 Mon Sep 17 00:00:00 2001 From: uraniummeltdown Date: Fri, 30 Mar 2018 19:24:02 +0400 Subject: [PATCH 022/232] do_cpr() proc for humans --- code/modules/mob/living/carbon/human/human.dm | 33 +++++++++++++++++++ .../living/carbon/human/species/species.dm | 29 +--------------- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 2cb8bbb396e..6f5e692c311 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1728,6 +1728,39 @@ Eyes need to have significantly high darksight to shine unless the mob has the X return ..() +/mob/living/carbon/human/proc/do_cpr(mob/living/carbon/human/H) + if(H.stat == DEAD || (H.status_flags & FAKEDEATH)) + to_chat(src, "[H.name] is dead!") + return + if(!check_has_mouth()) + to_chat(src, "You don't have a mouth, you cannot perform CPR!") + return + if(!H.check_has_mouth()) + to_chat(src, "They don't have a mouth, you cannot perform CPR!") + return + if((head && (head.flags_cover & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && !wear_mask.mask_adjusted)) + 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!") + return 0 + visible_message("[src] is trying to perform CPR on [H.name]!", \ + "You try to perform CPR on [H.name]!") + if(do_mob(src, H, 40)) + if(H.health > config.health_threshold_dead && H.health <= config.health_threshold_crit) + var/suff = min(H.getOxyLoss(), 7) + H.adjustOxyLoss(-suff) + H.updatehealth() + visible_message("[src] performs CPR on [H.name]!", \ + "You perform CPR on [H.name].") + + 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_logs(src, H, "CPRed") + return 1 + else + to_chat(src, "You need to stay still while performing CPR!") + /mob/living/carbon/human/canBeHandcuffed() if(get_num_arms() >= 2) return TRUE diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 8bc5ccfd6b4..cd10e5b3e60 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -322,35 +322,8 @@ target.help_shake_act(user) add_attack_logs(user, target, "Shaked") return 1 - if(!user.check_has_mouth()) - to_chat(user, "You don't have a mouth, you cannot perform CPR!") - return - if(!target.check_has_mouth()) - to_chat(user, "They don't have a mouth, you cannot perform CPR!") - return - if((user.head && (user.head.flags_cover & HEADCOVERSMOUTH)) || (user.wear_mask && (user.wear_mask.flags_cover & MASKCOVERSMOUTH) && !user.wear_mask.mask_adjusted)) - to_chat(user, "Remove your mask!") - return 0 - if((target.head && (target.head.flags_cover & HEADCOVERSMOUTH)) || (target.wear_mask && (target.wear_mask.flags_cover & MASKCOVERSMOUTH) && !target.wear_mask.mask_adjusted)) - to_chat(user, "Remove his mask!") - return 0 - - user.visible_message("\The [user] is trying to perform CPR on \the [target]!", \ - "You try to perform CPR on \the [target]!") - if(do_mob(user, target, 40)) - if(target.health > config.health_threshold_dead && target.health <= config.health_threshold_crit) - var/suff = min(target.getOxyLoss(), 7) - target.adjustOxyLoss(-suff) - target.updatehealth() - user.visible_message("\The [user] performs CPR on \the [target]!", \ - "You perform CPR on \the [target].") - - to_chat(target, "You feel a breath of fresh air enter your lungs. It feels good.") - to_chat(user, "Repeat at least every 7 seconds.") - add_attack_logs(user, target, "CPRed", FALSE) - return 1 else - to_chat(user, "You need to stay still while performing CPR!") + user.do_cpr(target) /datum/species/proc/grab(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) if(attacker_style && attacker_style.grab_act(user, target)) From f685a74733a240827b01d17b0f988854565797c2 Mon Sep 17 00:00:00 2001 From: uraniummeltdown Date: Sat, 31 Mar 2018 23:08:17 +0400 Subject: [PATCH 023/232] removes unnecessary alien and brain rads code fix the wryn harm intent special only slimes that actually die produce death message slime emotes now log, slimes can change their face/mood with new emotes plasma and epinephrine can control slime mutation chances, docility potion makes slimes docile and non-hungry instead of creating a SA slime, added proc to add nutrition slime attack surgery fixes, slimes steal nutrition from other slimes on attacking obj/item/weapon -> obj/item --- code/modules/mob/living/carbon/alien/alien.dm | 31 ------ code/modules/mob/living/carbon/brain/life.dm | 23 +--- .../mob/living/carbon/human/species/apollo.dm | 4 +- .../living/carbon/human/species/species.dm | 8 +- code/modules/mob/living/carbon/slime/death.dm | 8 +- code/modules/mob/living/carbon/slime/emote.dm | 47 ++++++-- code/modules/mob/living/carbon/slime/life.dm | 47 ++++++-- .../modules/mob/living/carbon/slime/powers.dm | 101 +++++++++--------- code/modules/mob/living/carbon/slime/slime.dm | 48 ++++----- .../living/simple_animal/friendly/slime.dm | 1 - .../research/xenobiology/xenobiology.dm | 30 ++---- 11 files changed, 167 insertions(+), 181 deletions(-) diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 76d60fc7b19..e706b89ca85 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -9,15 +9,10 @@ icon = 'icons/mob/alien.dmi' gender = NEUTER dna = null - - alien_talk_understand = 1 - nightvision = 1 - var/obj/item/card/id/wear_id = null // Fix for station bounced radios -- Skie var/has_fine_manipulation = 0 - var/move_delay_add = 0 // movement delay to add status_flags = CANPARALYSE|CANPUSH @@ -27,7 +22,6 @@ var/heat_protection = 0.5 var/leaping = 0 ventcrawler = 2 - var/list/alien_organs = list() /mob/living/carbon/alien/New() @@ -118,31 +112,6 @@ else clear_alert("alien_fire") -/mob/living/carbon/alien/handle_mutations_and_radiation() - // Aliens love radiation nom nom nom - if(radiation) - if(radiation > 100) - radiation = 100 - - if(radiation < 0) - radiation = 0 - - switch(radiation) - if(1 to 49) - radiation-- - if(prob(25)) - adjustToxLoss(1) - - if(50 to 74) - radiation -= 2 - adjustToxLoss(1) - if(prob(5)) - radiation -= 5 - - if(75 to 100) - radiation -= 3 - adjustToxLoss(3) - /mob/living/carbon/alien/handle_fire()//Aliens on fire code if(..()) return diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index e61f8750901..757ccab9fb9 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -1,36 +1,20 @@ /mob/living/carbon/brain/handle_mutations_and_radiation() if(radiation) if(radiation > 100) - radiation -= 3 - adjustToxLoss(3) - updatehealth() if(!container) to_chat(src, "You feel weak.") else to_chat(src, "STATUS: CRITICAL AMOUNTS OF RADIATION DETECTED.") switch(radiation) - if(0 to 49) - radiation-- - if(prob(25)) - adjustToxLoss(1) - updatehealth() - if(50 to 74) - radiation -= 2 - adjustToxLoss(1) + if(50 to 75) if(prob(5)) - radiation -= 5 if(!container) to_chat(src, "You feel weak.") else to_chat(src, "STATUS: DANGEROUS AMOUNTS OF RADIATION DETECTED.") - updatehealth() - - if(75 to 100) - radiation -= 3 - adjustToxLoss(3) - updatehealth() + ..() /mob/living/carbon/brain/proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity) if(status_flags & GODMODE) @@ -38,13 +22,10 @@ if(exposed_temperature > bodytemperature) var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0) - //adjustFireLoss(2.5*discomfort) - //adjustFireLoss(5.0*discomfort) adjustFireLoss(20.0*discomfort) else var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0) - //adjustFireLoss(2.5*discomfort) adjustFireLoss(5.0*discomfort) /mob/living/carbon/brain/handle_regular_status_updates() diff --git a/code/modules/mob/living/carbon/human/species/apollo.dm b/code/modules/mob/living/carbon/human/species/apollo.dm index 0b38b57c786..6c37da34395 100644 --- a/code/modules/mob/living/carbon/human/species/apollo.dm +++ b/code/modules/mob/living/carbon/human/species/apollo.dm @@ -57,9 +57,7 @@ to_chat(C, "It feels like part of you has died.") /datum/species/wryn/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) - if(target.handcuffed) - if(!target.get_int_organ(/obj/item/organ/internal/wryn/hivenode)) - return + if(target.handcuffed && target.get_int_organ(/obj/item/organ/internal/wryn/hivenode)) user.visible_message("[user] begins to violently pull off [target]'s antennae.") to_chat(target, "[user] grips your antennae and starts violently pulling!") diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index cd10e5b3e60..3158725d71e 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -423,15 +423,15 @@ target.stop_pulling() //BubbleWrap: Disarming also breaks a grab - this will also stop someone being choked, won't it? - if(istype(target.l_hand, /obj/item/weapon/grab)) - var/obj/item/weapon/grab/lgrab = target.l_hand + if(istype(target.l_hand, /obj/item/grab)) + var/obj/item/grab/lgrab = target.l_hand if(lgrab.affecting) target.visible_message("[user] has broken [target]'s grip on [lgrab.affecting]!") talked = 1 spawn(1) qdel(lgrab) - if(istype(target.r_hand, /obj/item/weapon/grab)) - var/obj/item/weapon/grab/rgrab = target.r_hand + if(istype(target.r_hand, /obj/item/grab)) + var/obj/item/grab/rgrab = target.r_hand if(rgrab.affecting) target.visible_message("[user] has broken [target]'s grip on [rgrab.affecting]!") talked = 1 diff --git a/code/modules/mob/living/carbon/slime/death.dm b/code/modules/mob/living/carbon/slime/death.dm index 240454f3e0f..5c551d6e470 100644 --- a/code/modules/mob/living/carbon/slime/death.dm +++ b/code/modules/mob/living/carbon/slime/death.dm @@ -1,4 +1,6 @@ /mob/living/carbon/slime/death(gibbed) + if(stat == DEAD) + return if(!gibbed) if(is_adult) var/mob/living/carbon/slime/M = new /mob/living/carbon/slime(loc) @@ -11,13 +13,11 @@ number = rand(1, 1000) name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])" return - - if(stat == DEAD) return + else + visible_message("The [name] seizes up and falls limp...") stat = DEAD icon_state = "[colour] baby slime dead" overlays.len = 0 - for(var/mob/O in viewers(src, null)) - O.show_message("The [name] seizes up and falls limp...", 1) //ded -- Urist update_canmove() diff --git a/code/modules/mob/living/carbon/slime/emote.dm b/code/modules/mob/living/carbon/slime/emote.dm index b4a6eb140f0..89a48096b23 100644 --- a/code/modules/mob/living/carbon/slime/emote.dm +++ b/code/modules/mob/living/carbon/slime/emote.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/slime/emote(var/act, var/m_type=1, var/message = null) +/mob/living/carbon/slime/emote(act, m_type = 1, message = null) if(findtext(act, "-", 1, null)) var/t1 = findtext(act, "-", 1, null) //param = copytext(act, t1 + 1, length(act) + 1) @@ -8,6 +8,9 @@ act = copytext(act,1,length(act)) act = lowertext(act) + + var/regenerate_icons + switch(act) //Alphabetical please if("me") if(silent) @@ -58,18 +61,44 @@ message = "The [src.name] vibrates!" m_type = 1 + if("noface") //mfw I have no face + mood = null + regenerate_icons = 1 + + if("smile") + mood = "mischevous" + regenerate_icons = 1 + + if(":3") + mood = ":33" + regenerate_icons = 1 + + if("pout") + mood = "pout" + regenerate_icons = 1 + + if("frown") + mood = "sad" + regenerate_icons = 1 + + if("scowl") + mood = "angry" + regenerate_icons = 1 + if("help") //This is an exception - to_chat(src, "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate") + to_chat(src, "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate. \n\nYou may also change your face with: \n\nsmile, :3, pout, frown, scowl, noface") else to_chat(src, "Unusable emote '[act]'. Say *help for a list.") - if((message && src.stat == 0)) + if((message && stat == CONSCIOUS)) + if(client) + log_emote("[name]/[key] : [message]") if(m_type & 1) - for(var/mob/O in viewers(src, null)) - O.show_message(message, m_type) - //Foreach goto(703) + visible_message(message) else - for(var/mob/O in hearers(src, null)) - O.show_message(message, m_type) - //Foreach goto(746) + loc.audible_message(message) + + if(regenerate_icons) + regenerate_icons() + return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/slime/life.dm b/code/modules/mob/living/carbon/slime/life.dm index e0afe00ada2..ced452ab652 100644 --- a/code/modules/mob/living/carbon/slime/life.dm +++ b/code/modules/mob/living/carbon/slime/life.dm @@ -156,7 +156,14 @@ if(reagents) reagents.metabolize(src) - src.updatehealth() + + if(reagents.get_reagent_amount("plasma")>=5) + mutation_chance = min(mutation_chance + 5,50) //Prevents mutation chance going >50% + reagents.remove_reagent("plasma", 5) + if(reagents.get_reagent_amount("epinephrine")>=5) + mutation_chance = max(mutation_chance - 5,0) //Prevents mutation chance going <0% + reagents.remove_reagent("epinephrine", 5) + updatehealth() return //TODO: DEFERRED @@ -235,6 +242,10 @@ /mob/living/carbon/slime/proc/handle_nutrition() + if(docile) //God as my witness, I will never go hungry again + nutrition = 700 + return + if(prob(15)) nutrition -= 1 + is_adult @@ -254,6 +265,15 @@ else Evolve() +/mob/living/carbon/slime/proc/add_nutrition(nutrition_to_add = 0, lastnut = 0) + nutrition = min((nutrition + nutrition_to_add), get_max_nutrition()) + if(nutrition >= (lastnut + 50)) + if(prob(80)) + lastnut = nutrition + powerlevel++ + if(powerlevel > 10) + powerlevel = 10 + adjustToxLoss(-10) /mob/living/carbon/slime/proc/handle_targets() if(Tempstun) @@ -282,7 +302,7 @@ if(Target) --target_patience - if(target_patience <= 0 || SStun || Discipline || attacked) // Tired of chasing or something draws out attention + if(target_patience <= 0 || SStun || Discipline || attacked || docile) // Tired of chasing or something draws out attention target_patience = 0 Target = null @@ -365,6 +385,8 @@ else if(holding_still) holding_still = max(holding_still - 1, 0) + else if(docile && pulledby) + holding_still = 10 else if(canmove && isturf(loc) && prob(33)) step(src, pick(cardinal)) else if(!AIproc) @@ -374,8 +396,12 @@ /mob/living/carbon/slime/proc/handle_speech_and_mood() //Mood starts here var/newmood = "" - if(rabid || attacked) newmood = "angry" - else if(Target) newmood = "mischevous" + if(rabid || attacked) + newmood = "angry" + else if(docile) + newmood = ":3" + else if(Target) + newmood = "mischevous" if(!newmood) if(Discipline && prob(25)) @@ -544,8 +570,13 @@ if(is_adult) return 300 else return 200 -/mob/living/carbon/slime/proc/will_hunt(var/hunger = -1) // Check for being stopped from feeding and chasing - if(hunger == 2 || rabid || attacked) return 1 - if(Leader) return 0 - if(holding_still) return 0 +/mob/living/carbon/slime/proc/will_hunt(hunger = -1) // Check for being stopped from feeding and chasing + if(docile) + return 0 + if(hunger == 2 || rabid || attacked) + return 1 + if(Leader) + return 0 + if(holding_still) + return 0 return 1 diff --git a/code/modules/mob/living/carbon/slime/powers.dm b/code/modules/mob/living/carbon/slime/powers.dm index 95359f7d573..a2aca96c163 100644 --- a/code/modules/mob/living/carbon/slime/powers.dm +++ b/code/modules/mob/living/carbon/slime/powers.dm @@ -3,11 +3,15 @@ set desc = "This will let you feed on any valid creature in the surrounding area. This should also be used to halt the feeding process." if(Victim) Feedstop() - return + return 0 + + if(docile) + to_chat(src, "I'm not hungry anymore...") + return 0 if(stat) to_chat(src, "I must be conscious to do this...") - return + return 0 var/list/choices = list() for(var/mob/living/C in view(1,src)) @@ -15,32 +19,31 @@ choices += C var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices - if(!M) return + if(!M) + return 0 if(Adjacent(M)) - - if(!istype(src, /mob/living/carbon/brain)) - if(!istype(M, /mob/living/carbon/slime)) - if(stat != 2) - if(health > -70) - - for(var/mob/living/carbon/slime/met in view()) - if(met.Victim == M && met != src) - to_chat(src, "The [met.name] is already feeding on this subject...") - return - to_chat(src, "I have latched onto the subject and begun feeding...") - to_chat(M, "The [src.name] has latched onto your head!") - Feedon(M) - - else - to_chat(src, "This subject does not have a strong enough life energy...") - else - to_chat(src, "This subject does not have an edible life energy...") - else - to_chat(src, "I must not feed on my brothers...") - else + if(isbrain(M)) to_chat(src, "This subject does not have an edible life energy...") + return 0 + if(iscarbon(M) && (M.health < -70)) + to_chat(src, "This subject does not have a strong enough life energy...") + return 0 + if(isanimal(M) && (M.health < 1))//animals don't go into crit, stupid; fixes infinite energy exploit + to_chat(src, "This subject does not have a strong enough life energy...") + return 0 + + for(var/mob/living/carbon/slime/met in view()) + if(met.Victim == M && met != src) + to_chat(src, "The [met.name] is already feeding on this subject...") + return 0 + + to_chat(src, "I have latched onto the subject and begun feeding...") + to_chat(M, "The [name] has latched onto your head!") + + Feedon(M) + return 1 /mob/living/carbon/slime/proc/Feedon(var/mob/living/M) Victim = M @@ -49,55 +52,49 @@ anchored = 1 var/lastnut = nutrition var/fed_succesfully = 0 + var/health_minimum = -70 if(is_adult) icon_state = "[colour] adult slime eat" else icon_state = "[colour] baby slime eat" - while(Victim && M.health > -70 && M.stat != DEAD && stat != DEAD) + if(isanimal(Victim)) + health_minimum = 0 + while(Victim && Victim.health > health_minimum && stat != DEAD) canmove = 0 - if(Adjacent(M)) + if(Adjacent(Victim)) loc = M.loc - if(prob(15) && M.client && istype(M, /mob/living/carbon)) - to_chat(M, "[pick("You can feel your body becoming weak!", \ - "You feel like you're about to die!", \ - "You feel every part of your body screaming in agony!", \ - "A low, rolling pain passes through your body!", \ - "Your body feels as if it's falling apart!", \ - "You feel extremely weak!", \ - "A sharp, deep pain bathes every inch of your body!")]") - - if(istype(M, /mob/living/carbon)) + if(iscarbon(Victim)) Victim.adjustCloneLoss(rand(5,6)) Victim.adjustToxLoss(rand(1,2)) if(Victim.health <= 0) Victim.adjustToxLoss(rand(2,4)) + if(prob(15) && Victim.client) + to_chat(Victim, "[pick("You can feel your body becoming weak!", \ + "You feel like you're about to die!", \ + "You feel every part of your body screaming in agony!", \ + "A low, rolling pain passes through your body!", \ + "Your body feels as if it's falling apart!", \ + "You feel extremely weak!", \ + "A sharp, deep pain bathes every inch of your body!")]") + fed_succesfully = 1 - else if(istype(M, /mob/living/simple_animal)) + else if(health_minimum == 0) //we already know it's a simple_animal from above Victim.adjustBruteLoss(is_adult ? rand(7, 15) : rand(4, 12)) fed_succesfully = 1 else - if(prob(25)) - to_chat(src, "[pick("This subject is incompatable", \ - "This subject does not have a life energy", "This subject is empty", \ - "I am not satisified", "I can not feed from this subject", \ - "I do not feel nourished", "This subject is not food")]...") + to_chat(src, "[pick("This subject is incompatable", \ + "This subject does not have a life energy", "This subject is empty", \ + "I am not satisified", "I can not feed from this subject", \ + "I do not feel nourished", "This subject is not food")]...") if(fed_succesfully) - //I have no idea why this is not in handle_nutrition() - nutrition += rand(15,30) - if(nutrition >= lastnut + 50) - if(prob(80)) - lastnut = nutrition - powerlevel++ - if(powerlevel > 10) - powerlevel = 10 - adjustToxLoss(-10) + add_nutrition(rand(15,30), lastnut) //Heal yourself. adjustOxyLoss(-10) @@ -128,7 +125,7 @@ anchored = 0 if(M) - if(M.health <= -70) + if(M.health <= health_minimum) M.canmove = 0 if(!client) if(Victim && !rabid && !attacked) diff --git a/code/modules/mob/living/carbon/slime/slime.dm b/code/modules/mob/living/carbon/slime/slime.dm index f66225d007c..ecb233a2ebf 100644 --- a/code/modules/mob/living/carbon/slime/slime.dm +++ b/code/modules/mob/living/carbon/slime/slime.dm @@ -5,18 +5,14 @@ pass_flags = PASSTABLE ventcrawler = 2 speak_emote = list("telepathically chirps") - layer = 5 - maxHealth = 150 health = 150 gender = NEUTER - nutrition = 700 - see_in_dark = 8 update_slimes = 0 - + faction = list("slime","neutral") // canstun and canweaken don't affect slimes because they ignore stun and weakened variables // for the sake of cleanliness, though, here they are. status_flags = CANPARALYSE|CANPUSH @@ -44,7 +40,7 @@ var/mood = "" // To show its face var/is_adult = 0 - + var/docile = 0 var/core_removal_stage = 0 //For removing cores. var/mutator_used = FALSE //So you can't shove a dozen mutators into a single slime @@ -140,7 +136,8 @@ stat(null, "Health: [round((health / 150) * 100)]%") if(client.statpanel == "Status") - stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]") + if(!docile) + stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]") if(amount_grown >= 10) if(is_adult) stat(null, "You can reproduce!") @@ -194,9 +191,9 @@ return /mob/living/carbon/slime/MouseDrop(atom/movable/A) - if(isliving(A) && A != usr) + if(isliving(A) && A != src && usr == src) var/mob/living/Food = A - if(Food.Adjacent(usr) && !stat && Food.stat != DEAD) //messy + if(Food.Adjacent(src) && !stat && Food.stat != DEAD) //messy Feedon(Food) ..() @@ -208,14 +205,19 @@ /mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M) ..() - var/damage = rand(1, 3) + if(Victim) + Victim = null + visible_message("[M] pulls [src] off!") + return attacked += 5 - if(M.is_adult) - damage = rand(1, 6) - else - damage = rand(1, 3) - adjustBruteLoss(damage) - updatehealth() + if(nutrition >= 100) //steal some nutrition. negval handled in life() + nutrition -= (50 + (5 * M.amount_grown)) + M.add_nutrition(50 + (5 * M.amount_grown)) + if(health > 0) + adjustBruteLoss(4 + (2 * M.amount_grown)) //amt_grown isn't very linear but it works + updatehealth() + M.adjustBruteLoss(-4 + (-2 * M.amount_grown)) + M.updatehealth() /mob/living/carbon/slime/attack_animal(mob/living/simple_animal/M) if(..()) @@ -282,12 +284,9 @@ step_away(src,M) return - else - if(stat == DEAD && surgeries.len) - if(M.a_intent == INTENT_HELP) - for(var/datum/surgery/S in surgeries) - if(S.next_step(M, src)) - return 1 + + if(..()) //To allow surgery to return properly. + return switch(M.a_intent) @@ -390,11 +389,6 @@ return /mob/living/carbon/slime/attackby(obj/item/W, mob/living/user, params) - if(stat == DEAD && surgeries.len) - if(user.a_intent == INTENT_HELP) - for(var/datum/surgery/S in surgeries) - if(S.next_step(user, src)) - return 1 if(istype(W,/obj/item/stack/sheet/mineral/plasma)) //Lets you feed slimes plasma. if(user in Friends) ++Friends[user] diff --git a/code/modules/mob/living/simple_animal/friendly/slime.dm b/code/modules/mob/living/simple_animal/friendly/slime.dm index a831c830459..13e7c893d86 100644 --- a/code/modules/mob/living/simple_animal/friendly/slime.dm +++ b/code/modules/mob/living/simple_animal/friendly/slime.dm @@ -20,7 +20,6 @@ maxHealth = 200 icon_state = "grey adult slime" icon_living = "grey adult slime" - icon_dead = "grey baby slime dead" /mob/living/simple_animal/slime/New() ..() diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 67c025cecb0..df0a8a2f55f 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -140,39 +140,27 @@ /obj/item/slimepotion/docility/attack(mob/living/carbon/slime/M, mob/user) if(!isslime(M)) - to_chat(user, " The potion only works on slimes!") + to_chat(user, "The potion only works on slimes!") return if(M.stat) - to_chat(user, " The slime is dead!") - return - if(M.mind) - to_chat(user, " The slime resists!") + to_chat(user, "The slime is dead!") return if(being_used) - to_chat(user, " You're already using this on another slime!") + to_chat(user, "You're already using this on another slime!") return - var/mob/living/simple_animal/slime/pet - if(M.is_adult) - pet = new /mob/living/simple_animal/slime/adult(M.loc) - pet.icon_state = "[M.colour] adult slime" - pet.icon_living = "[M.colour] adult slime" - else - pet = new /mob/living/simple_animal/slime(M.loc) - pet.icon_state = "[M.colour] baby slime" - pet.icon_living = "[M.colour] baby slime" - pet.icon_dead = "[M.colour] baby slime dead" - pet.colour = "[M.colour]" - qdel(M) + M.docile = 1 + M.nutrition = 700 + to_chat(M, "You absorb the potion and feel your intense desire to feed melt away.") + to_chat(user, "You feed the slime the potion, removing its hunger and calming it.") being_used = 1 var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN)) if(!newname) newname = "pet slime" - pet.name = newname - pet.real_name = newname + M.name = newname + M.real_name = newname qdel(src) - to_chat(user, "You feed the slime the potion, removing it's powers and calming it.") /obj/item/slimepotion/sentience name = "sentience potion" From 0665c0ac27ec5f86f2d403cbc847ab976544a6ee Mon Sep 17 00:00:00 2001 From: uraniummeltdown Date: Mon, 23 Apr 2018 21:43:58 +0500 Subject: [PATCH 024/232] new logging system --- code/modules/mob/living/carbon/alien/humanoid/humanoid.dm | 2 +- .../mob/living/carbon/alien/humanoid/humanoid_defense.dm | 4 ++-- code/modules/mob/living/carbon/alien/larva/larva.dm | 2 +- code/modules/mob/living/carbon/alien/larva/larva_defense.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 2 +- code/modules/mob/living/carbon/human/human_defense.dm | 4 ++-- code/modules/mob/living/living_defense.dm | 6 +++--- code/modules/mob/living/silicon/robot/robot_defense.dm | 2 +- code/modules/mob/living/silicon/silicon_defense.dm | 5 ++--- code/modules/mob/living/simple_animal/animal_defense.dm | 4 ++-- 10 files changed, 16 insertions(+), 17 deletions(-) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 61e3aef5b31..8946189b4cb 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -84,7 +84,7 @@ if(M.is_adult) damage = rand(10, 40) adjustBruteLoss(damage) - add_logs(M, src, "attacked", admin=0) + add_attack_logs(src, M, "Slime'd for [damage] damage") updatehealth() return 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 1027c0a4245..0056bb709a5 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm @@ -20,7 +20,7 @@ "[M] has weakened [src]!", \ "You hear someone fall.") adjustBruteLoss(damage) - add_logs(M, src, "attacked", admin=0) + add_attack_logs(M, src, "Melee attacked with fists") updatehealth() else playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) @@ -31,7 +31,7 @@ if(prob(5))//Very small chance to push an alien down. Paralyse(2) playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - add_logs(M, src, "pushed", admin=0) + add_attack_logs(M, src, "Pushed over") visible_message("[M] has pushed down [src]!", \ "[M] has pushed down [src]!") else diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index e1fbd04a60f..783d683f060 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -79,7 +79,7 @@ if(M.is_adult) damage = rand(20, 40) adjustBruteLoss(damage) - add_attack_logs(M, src, "Slime attacked") + add_attack_logs(src, M, "Slime'd for [damage] damage") updatehealth() return 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 029ea07da4f..fc7fa22510b 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva_defense.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm @@ -10,7 +10,7 @@ sleep(3) step_away(src, M, 15) playsound(loc, "punch", 25, 1, -1) - add_logs(M, src, "attacked", admin=0) + add_attack_logs(M, src, "Melee attacked with fists") visible_message("[M] has kicked [src]!", \ "[M] has kicked [src]!") if((stat != DEAD) && (damage > 4.9)) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 6f5e692c311..dc640ec68a0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1756,7 +1756,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_logs(src, H, "CPRed") + add_attack_logs(src, H, "CPRed", FALSE) return 1 else to_chat(src, "You need to stay still while performing CPR!") diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index d6545d9bff6..c45154e4931 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -391,7 +391,7 @@ emp_act visible_message("[M] has wounded [src]!", \ "[M] has wounded [src]!") apply_effect(4, WEAKEN, armor_block) - add_logs(M, src, "attacked", admin=0) + add_attack_logs(M, src, "Alien attacked") updatehealth() if(M.a_intent == INTENT_DISARM) @@ -399,7 +399,7 @@ emp_act var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1) apply_effect(5, WEAKEN, run_armor_check(affecting, "melee")) - add_logs(M, src, "tackled", admin=0) + add_attack_logs(M, src, "Alien tackled") visible_message("[M] has tackled down [src]!") else if(prob(99)) //this looks fucking stupid but it was previously 'var/randn = rand(1, 100); if(randn <= 99)' diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 0039284a6a0..10c83f4d0f2 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -290,7 +290,7 @@ s.set_up(5, 1, src) s.start() return 1 - add_logs(M, src, "attacked", admin=0) + add_attack_logs(src, M, "Slime'd") return /mob/living/attack_animal(mob/living/simple_animal/M) @@ -303,7 +303,7 @@ M.do_attack_animation(src) visible_message("\The [M] [M.attacktext] [src]!", \ "\The [M] [M.attacktext] [src]!") - add_logs(M, src, "attacked", admin=0) + add_attack_logs(M, src, "Animal attacked") return 1 /mob/living/attack_larva(mob/living/carbon/alien/larva/L) @@ -315,7 +315,7 @@ else L.do_attack_animation(src) if(prob(90)) - add_logs(L, src, "attacked", admin=0) + add_attack_logs(L, src, "Larva attacked") visible_message("[L.name] bites [src]!", \ "[L.name] bites [src]!") playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1) diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index ca240058e58..033b244cf8c 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -7,7 +7,7 @@ step(src, get_dir(M,src)) spawn(5) step(src, get_dir(M,src)) - add_logs(M, src, "pushed", admin=0) + add_attack_logs(M, src, "Alien pushed over") playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1) visible_message("[M] has forced back [src]!",\ "[M] has forced back [src]!") diff --git a/code/modules/mob/living/silicon/silicon_defense.dm b/code/modules/mob/living/silicon/silicon_defense.dm index 5659eecc4dc..480c9442bd7 100644 --- a/code/modules/mob/living/silicon/silicon_defense.dm +++ b/code/modules/mob/living/silicon/silicon_defense.dm @@ -5,13 +5,12 @@ if(..()) //if harm or disarm intent var/damage = rand(10, 20) if(prob(90)) - add_logs(M, src, "attacked", admin=0) playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1) visible_message("[M] has slashed at [src]!", \ "[M] has slashed at [src]!") if(prob(8)) flash_eyes(affect_silicon = 1) - add_logs(M, src, "attacked", admin=0) + add_attack_logs(M, src, "Alien attacked") adjustBruteLoss(damage) updatehealth() else @@ -55,7 +54,7 @@ if(HULK in M.mutations) var/damage = rand(10,15) adjustBruteLoss(damage) - add_logs(M, src, "attacked", admin=0) + 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]!") diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm index acf22ed69f7..b122decd322 100644 --- a/code/modules/mob/living/simple_animal/animal_defense.dm +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -15,7 +15,7 @@ visible_message("[M] [response_harm] [src]!") playsound(loc, "punch", 25, 1, -1) attack_threshold_check(harm_intent_damage) - add_logs(M, src, "attacked", admin=0) + add_attack_logs(M, src, "Melee attacked with fists") updatehealth() return 1 @@ -25,7 +25,7 @@ visible_message("[M] has slashed at [src]!", \ "[M] has slashed at [src]!") playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) - add_logs(M, src, "attacked", admin=0) + add_attack_logs(M, src, "Alien attacked") attack_threshold_check(damage) return From 69e0eedead012bbcd95d8a135fe39e3d63bb9287 Mon Sep 17 00:00:00 2001 From: Kluys Date: Tue, 24 Apr 2018 10:21:17 +0200 Subject: [PATCH 025/232] Managed to get a space in there somehow --- code/game/objects/structures/grille.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 28101ca76c9..d5dccaf0d03 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -152,7 +152,7 @@ if(broken) to_chat(user, "You must repair or replace [src] first!") return - if (S.get_amount() < 1) + if(S.get_amount() < 1) to_chat(user, "You need at least one sheet of glass for that!") return if(!anchored) From ef20a187c00369091f781101c30c718aeb74d069 Mon Sep 17 00:00:00 2001 From: Tayyyyyyy Date: Tue, 24 Apr 2018 16:28:22 -0500 Subject: [PATCH 026/232] Reduce soap clicks --- code/game/objects/items/weapons/soap.dm | 30 ++++++++++++++++--------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/code/game/objects/items/weapons/soap.dm b/code/game/objects/items/weapons/soap.dm index c747674bce1..08211caa905 100644 --- a/code/game/objects/items/weapons/soap.dm +++ b/code/game/objects/items/weapons/soap.dm @@ -18,8 +18,6 @@ var/cleanspeed = 50 //slower than mop - - /obj/item/soap/afterattack(atom/target, mob/user, proximity) if(!proximity) return //I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing. @@ -29,28 +27,40 @@ else if(target == user && user.a_intent == INTENT_GRAB && ishuman(target)) var/mob/living/carbon/human/muncher = user if(muncher && muncher.get_species() == "Drask") - to_chat(user, "You take a bite of the [src.name]. Delicious!") + to_chat(user, "You take a bite of the [name]. Delicious!") playsound(user.loc, 'sound/items/eatfood.ogg', 50, 0) user.nutrition += 2 else if(istype(target,/obj/effect/decal/cleanable)) user.visible_message("[user] begins to scrub \the [target.name] out with [src].") - if(do_after(user, src.cleanspeed, target = target) && target) + if(do_after(user, cleanspeed, target = target) && target) to_chat(user, "You scrub \the [target.name] out.") + if(istype(target.loc, /turf/simulated)) + clean_turf(target.loc) + return qdel(target) + else if(istype(target, /turf/simulated)) + user.visible_message("[user] begins to clean \the [target.name] with [src].") + if(do_after(user, cleanspeed, target = target)) + to_chat(user, "You clean \the [target.name].") + clean_turf(target) else user.visible_message("[user] begins to clean \the [target.name] with [src].") - if(do_after(user, src.cleanspeed, target = target)) + if(do_after(user, cleanspeed, target = target)) to_chat(user, "You clean \the [target.name].") var/obj/effect/decal/cleanable/C = locate() in target qdel(C) target.clean_blood() - if(istype(target, /turf/simulated)) - var/turf/simulated/T = target - T.dirt = 0 + +/obj/item/soap/proc/clean_turf(turf/simulated/turf) + turf.clean_blood() + turf.dirt = 0 + for(var/obj/effect/O in turf) + if(is_cleanable(O)) + qdel(O) /obj/item/soap/attack(mob/target as mob, mob/user as mob) if(target && user && ishuman(target) && ishuman(user) && !target.stat && !user.stat && user.zone_sel &&user.zone_sel.selecting == "mouth" ) - user.visible_message("\the [user] washes \the [target]'s mouth out with [src.name]!") + user.visible_message("\the [user] washes \the [target]'s mouth out with [name]!") return ..() @@ -74,7 +84,7 @@ to_chat(user, "You need to take that [target.name] off before 'cleaning' it.") else user.visible_message("[user] begins to smear [src] on \the [target.name].") - if(do_after(user, src.cleanspeed, target = target)) + if(do_after(user, cleanspeed, target = target)) to_chat(user, "You 'clean' \the [target.name].") if(istype(target, /turf/simulated)) new /obj/effect/decal/cleanable/blood/gibs/cleangibs(target) From 8ecd9dd480d1345470b4685c991febd7b35f590f Mon Sep 17 00:00:00 2001 From: Tayyyyyyy Date: Tue, 24 Apr 2018 16:40:59 -0500 Subject: [PATCH 027/232] Fix coding style --- code/game/objects/items/weapons/soap.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/weapons/soap.dm b/code/game/objects/items/weapons/soap.dm index 08211caa905..a6046b575f7 100644 --- a/code/game/objects/items/weapons/soap.dm +++ b/code/game/objects/items/weapons/soap.dm @@ -34,11 +34,11 @@ user.visible_message("[user] begins to scrub \the [target.name] out with [src].") if(do_after(user, cleanspeed, target = target) && target) to_chat(user, "You scrub \the [target.name] out.") - if(istype(target.loc, /turf/simulated)) + if(issimulatedturf(target.loc)) clean_turf(target.loc) return qdel(target) - else if(istype(target, /turf/simulated)) + else if(issimulatedturf(target)) user.visible_message("[user] begins to clean \the [target.name] with [src].") if(do_after(user, cleanspeed, target = target)) to_chat(user, "You clean \the [target.name].") @@ -51,10 +51,10 @@ qdel(C) target.clean_blood() -/obj/item/soap/proc/clean_turf(turf/simulated/turf) - turf.clean_blood() - turf.dirt = 0 - for(var/obj/effect/O in turf) +/obj/item/soap/proc/clean_turf(turf/simulated/T) + T.clean_blood() + T.dirt = 0 + for(var/obj/effect/O in T) if(is_cleanable(O)) qdel(O) From a4020992316c3386b1166727f4914eb2b6a5cb1d Mon Sep 17 00:00:00 2001 From: FalseIncarnate Date: Tue, 24 Apr 2018 23:41:48 -0400 Subject: [PATCH 028/232] Fixes bad paths on wildwest.dmm Fixes bad paths on wildwest.dmm caused by #8901 which were not caught due to being merged before being run through TRAVIS again. Changes are map-merged. --- _maps/map_files/RandomZLevels/wildwest.dmm | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/_maps/map_files/RandomZLevels/wildwest.dmm b/_maps/map_files/RandomZLevels/wildwest.dmm index 3c9698fd7da..e413541fbaa 100644 --- a/_maps/map_files/RandomZLevels/wildwest.dmm +++ b/_maps/map_files/RandomZLevels/wildwest.dmm @@ -113,7 +113,7 @@ "ci" = (/obj/structure/stool,/turf/simulated/floor/wood,/area/awaymission/wwmines) "cj" = (/obj/structure/bookcase{tag = "icon-book-5"; icon_state = "book-5"},/turf/simulated/floor/wood,/area/awaymission/wwgov) "ck" = (/turf/simulated/floor/wood,/area/awaymission/wwgov) -"cl" = (/obj/item/moneybag,/turf/simulated/floor/wood,/area/awaymission/wwgov) +"cl" = (/obj/item/storage/bag/money,/turf/simulated/floor/wood,/area/awaymission/wwgov) "cm" = (/obj/structure/closet/secure_closet/freezer/kitchen,/turf/simulated/floor/plasteel{tag = "icon-stage_bleft"; icon_state = "stage_bleft"},/area/awaymission/wwgov) "cn" = (/turf/simulated/floor/plasteel{tag = "icon-stage_bleft"; icon_state = "stage_bleft"},/area/awaymission/wwgov) "co" = (/obj/machinery/power/smes/magical,/obj/structure/cable{icon_state = "0-4"; d2 = 4},/turf/simulated/floor/plasteel{dir = 8; icon_state = "barber"},/area/awaymission/wwmines) @@ -122,7 +122,7 @@ "cr" = (/obj/structure/lattice,/obj/structure/lattice,/turf/space,/area/space) "cs" = (/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor/carpet,/area/awaymission/wwmines) "ct" = (/turf/simulated/floor/carpet,/area/awaymission/wwgov) -"cu" = (/obj/item/moneybag,/turf/simulated/floor/carpet,/area/awaymission/wwgov) +"cu" = (/obj/item/storage/bag/money,/obj/machinery/light/small{tag = "icon-bulb1 (NORTH)"; icon_state = "bulb1"; dir = 1},/turf/simulated/floor/wood,/area/awaymission/wwgov) "cv" = (/obj/structure/stool/bed/chair/wood/wings,/turf/simulated/floor/wood,/area/awaymission/wwgov) "cw" = (/obj/effect/decal/cleanable/blood/splatter,/turf/simulated/floor/wood,/area/awaymission/wwmines) "cx" = (/obj/effect/mine/gas/plasma,/obj/item/ammo_box/c10mm,/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines) @@ -221,9 +221,8 @@ "em" = (/obj/structure/table/wood,/obj/item/gun/projectile/automatic/pistol,/turf/simulated/floor/wood,/area/awaymission/wwmines) "en" = (/obj/structure/window/reinforced{tag = "icon-fwindow (WEST)"; icon_state = "fwindow"; dir = 8},/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand7"; icon_state = "ironsand7"},/area/awaymission/wwgov) "eo" = (/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand4"; icon_state = "ironsand4"},/area/awaymission/wwgov) -"ep" = (/obj/machinery/mineral/input,/turf/simulated/floor/plasteel,/area/awaymission/wwrefine) +"ep" = (/obj/item/storage/bag/money,/turf/simulated/floor/carpet,/area/awaymission/wwgov) "eq" = (/obj/machinery/mineral/mint,/turf/simulated/floor/plasteel,/area/awaymission/wwrefine) -"er" = (/obj/machinery/mineral/output,/turf/simulated/floor/plasteel,/area/awaymission/wwrefine) "es" = (/obj/structure/stool/bed/chair/comfy/brown,/turf/simulated/floor/wood,/area/awaymission/wwmines) "et" = (/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand12"; icon_state = "ironsand12"},/area/awaymission/wwgov) "eu" = (/obj/item/soap/syndie,/turf/simulated/floor/plasteel{tag = "icon-cafeteria (NORTHEAST)"; icon_state = "cafeteria"; dir = 5},/area/awaymission/wwmines) @@ -348,7 +347,6 @@ "gJ" = (/obj/machinery/light/small{tag = "icon-bulb1 (EAST)"; icon_state = "bulb1"; dir = 4},/turf/simulated/floor/plasteel{tag = "icon-cafeteria (NORTHEAST)"; icon_state = "cafeteria"; dir = 5},/area/awaymission/wwmines) "gK" = (/obj/machinery/light/small{tag = "icon-bulb1 (WEST)"; icon_state = "bulb1"; dir = 8},/turf/simulated/floor/carpet,/area/awaymission/wwmines) "gL" = (/obj/machinery/light/small{tag = "icon-bulb1 (NORTH)"; icon_state = "bulb1"; dir = 1},/turf/simulated/floor/wood,/area/awaymission/wwgov) -"gM" = (/obj/item/moneybag,/obj/machinery/light/small{tag = "icon-bulb1 (NORTH)"; icon_state = "bulb1"; dir = 1},/turf/simulated/floor/wood,/area/awaymission/wwgov) "gN" = (/obj/machinery/microwave,/obj/machinery/light/small{tag = "icon-bulb1 (NORTH)"; icon_state = "bulb1"; dir = 1},/turf/simulated/floor/plasteel{tag = "icon-stage_bleft"; icon_state = "stage_bleft"},/area/awaymission/wwgov) "gO" = (/obj/machinery/light/small{tag = "icon-bulb1 (EAST)"; icon_state = "bulb1"; dir = 4},/turf/simulated/floor/wood,/area/awaymission/wwmines) "gP" = (/obj/machinery/light/small,/turf/simulated/floor/wood,/area/awaymission/wwmines) @@ -596,14 +594,14 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaabpbtbububububububtbtbtbtbtbububtbtbtbubtbtbtbtbububu aaaaaaaaaaaaaaaaaaaaaaaaaabpbLbMbNbObObObObObObObObObObObObObObObObObObObObObObObObObObObObPbMbQaaaaaabpbpaaaaaaaaaaaaaaaaaaaaaaaaaaaaaGaIaUbabababfbababaaUaLaRaRaRaRaRbhbhbhbhaReXgIbRbwbwbwbSgJeXbhbhbhbhbheXaRbhbhbhbhaReXbDbDbDbDbDbDbDbhbhbhbhbhbhbhbhbhbhbhbhbhbhbwbwbwbwbwbwbweXaRbhbhbhbhaRaXaRaRaRaRaRaRaRaRaRaRaRaLaLaGaGaGaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaabpbTbUbVbVbVbVbVbVbVbVbVbWbVbVbVbVbVbVbVbVbVbVbWbVbVbVbVbVbVbVbVbVbXbQaaaaaaaabpbpaaaaaaaaaaaaaaaaaaaaaaaaaGaGaIaUbfbababababfbaaUaLaRaWaRaRbdbhbhbhbhaReXbwbwbwbwbwbwbweXbhbhbhbhbheXaRbhbkbhbhaReXbDbDbDbDbDbDbDbBbBbBbBbBbBbBembBbYbBbBbBbZbwbwbwbwcabwbweXaRbhbhbhbhaRaRaRaRaRaRaRaXaRaRaRaRaRaRaLaNaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaabpbTcbbVbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbVccbQaaaaaaaaaabpbpaaaaaaaaaaaaaaaaaaaaaaaGaGaIaUbababababababaaUaLaRaRaRaRaRbhbhbkbhaReXgIbRcdbwbwbSgJeXeXeXeXeXcfeXaRbhbnbhbhaReXgKcgbDbDchcgbDbBcicicicicicicicibhbhbhbhbBbwbwbwbwbwbwgJeXaRbhbhbCbhaRaRaRaRaRaRaRaRaRaRaRaRaRaRaLaNaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaabpbTcbbVbMcjcjcjcjcjcjbMckclgLclclckgMclckckgLckclbMcmcngNcncpbMbVcccqaaaaaaaaaaaabpcrbpaaaaaaaaaaaaaaaaaaaGaGaIaUbababababababmaUaLaRaRaRaRaRbibhbhbhaReXbwbwbwbwbwbwbwcfbhbhbhbhbheXaRbhbhbhbhaReXbDbDbDcsbDbDbDbBbhbhbhbhbhbhbhbhbhbhbhbhbBbwbwbwbwbwbwbweXaRbhbhbhbhaRaRaRaRaRaRaRaRaRaRaRaLaLaRaLaIaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaabpbTcbbVbMckckckclckckbMckctctctctcuctcuckcvcvclckbMcncncncncnbMbWcccqaaaaaaaaaabpbpbpbpbpbpaaaaaaaaaaaaaaaGaGaIaUbabmbabmbababaaUaLaRaRaRaRaRbhbhbhbhaReXeXeXeXeXeXeXeXeXbhbhbhbhgOeXaRbhcwbhbhaReXbDbDbDbDbDbDbDbBbhbhbhbhgPbhbhgPbhbhbhbhbBbwbwbwbwbwbwbweXaRbhbhbhbhaRaRcxaRaRaRaRaRaRaRaRaLaLaLaLaIaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaabpbpbLcbbVbMgQczckckckgRbMgScuctctctctctctcAckckckgRbMgTcncBcCgUbMbVcccqbpbpaabpbpbpaaaaaabpbpbpbpaaaaaaaaaGaGaGaIaUbababababababaaUaLaRaRaRaRaRbhbhbhbhaReXcDbhgVbhbhbhgVbhbhbhbhbhbheXaRbhbhbhbhaReXbBbBbBbBbBbBbBbBbhbhbhgWeXgXgOeXgXbhbhbhbBbBbBcEcFbBbBbBeXaRbkbhbnbhaRaRaRaRaRaRaRaRaRaRaRaRaLaLaLaGaGaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaabpbTcbbVbMcjcjcjcjcjcjbMckclgLclclckcuclckckgLckclbMcmcngNcncpbMbVcccqaaaaaaaaaaaabpcrbpaaaaaaaaaaaaaaaaaaaGaGaIaUbababababababmaUaLaRaRaRaRaRbibhbhbhaReXbwbwbwbwbwbwbwcfbhbhbhbhbheXaRbhbhbhbhaReXbDbDbDcsbDbDbDbBbhbhbhbhbhbhbhbhbhbhbhbhbBbwbwbwbwbwbwbweXaRbhbhbhbhaRaRaRaRaRaRaRaRaRaRaRaLaLaRaLaIaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaabpbTcbbVbMckckckclckckbMckctctctctepctepckcvcvclckbMcncncncncnbMbWcccqaaaaaaaaaabpbpbpbpbpbpaaaaaaaaaaaaaaaGaGaIaUbabmbabmbababaaUaLaRaRaRaRaRbhbhbhbhaReXeXeXeXeXeXeXeXeXbhbhbhbhgOeXaRbhcwbhbhaReXbDbDbDbDbDbDbDbBbhbhbhbhgPbhbhgPbhbhbhbhbBbwbwbwbwbwbwbweXaRbhbhbhbhaRaRcxaRaRaRaRaRaRaRaRaLaLaLaLaIaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaabpbpbLcbbVbMgQczckckckgRbMgSepctctctctctctcAckckckgRbMgTcncBcCgUbMbVcccqbpbpaabpbpbpaaaaaabpbpbpbpaaaaaaaaaGaGaGaIaUbababababababaaUaLaRaRaRaRaRbhbhbhbhaReXcDbhgVbhbhbhgVbhbhbhbhbhbheXaRbhbhbhbhaReXbBbBbBbBbBbBbBbBbhbhbhgWeXgXgOeXgXbhbhbhbBbBbBcEcFbBbBbBeXaRbkbhbnbhaRaRaRaRaRaRaRaRaRaRaRaRaLaLaLaGaGaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaabpaabTcbbVbMcGcHckckcIckcJckctctctctcKctctcAckckckckbMcncncncncnbMbWccbQaacrbpbpaaaaaaaaaaaaaaaabpbpbpaaaaaGaGaGaIaUbfbabababababaaUaLaRaRaRaRaRbhbibhbhaReXcDbhbheXeXbhbheXeXbhbheXeXeXaRbhbhbhbhaReXbhcicicicicicibhbhbhbhbhgVbhbhgVbhbhbhbhbhcicicicicicibheXaRbhbhbhbhaRaRaRaRaRaRaRaRaWaRaRaRaRaRaLaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaabpaabTcLbVbMcyczckckckckbMckctctctctctctctcMckckckckcJcncncncncnbMbVcNbQaabpaaaaaaaaaaaaaaaaaaaaaaaabpaaaGaGaGaGaIaUbabfbacObababaaUaLaRaYaRaRaXbhbhbhbhaReXcDbCbhcDeXbhbheXbhbhbhbhbheXaRbhbhbhbhaReXbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbheXaRbhbhbhbhaRaRaRaXaRaRaRaRaRaRaRaRaRaRaLaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaabpaabLbMbVbMckckckckckckbMckctctcPctctctctcMckckckckbMcncQcRcScnbMbVbMbQaabpaaaaaaaaaaaaaaaaaaaaaaaaaGaGaGaGaGaGaIaUbababababababaaUaLaRaRaRaRaRbhbhbhbhaReXcDbhbhcDeXbhbheXgYbhbhbhgZeXaRbhbhbhbkaReXcVbBcWbhcVbBcWbhcVbBcWbhcVbBcWbhcVbBcWbhcVbBcWbhcVbBcWbheXaRbhbhbhbhaRaRaRaRaRaRaRaRaRaRaRaRaRaRaLaGaGaGaGaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaacrbpbLcXbVbMgSckcIckclgRbMgSctctctctctctctcMckckckgRbMhacncYcngUbMbVcZbQaabpbpaaaaaaaaaaaaaaaaaaaGaGaGaGaGaGaGaIaIaUbababababfbabaaUaLaRaRaRaRaRbhbhbkbhaReXcDbhgPcDeXbhbheXcTbhbhbhcUeXaRbkbhbhbhaReXbhhbbhbhbhbhhbbhbhbhbhhbbhbhbhbhhbbhbhbhbhhbbhbhbhbhhbbheXaRbhbhbhbhaRaRaRaRaRaRaRaRaRaRaRaRaRaRaLaGaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaabpbpaabTcbbVbMckckckckckclbMckcuctdactctctctckckckckckbMcncncncncnbMbVccbQbpbpbpbpaaaaaaaaaaaaaaaaaGaGaGaGaGaGaIaIaUaUbabababababadbaUaLaRaRaRaRaRbhbhbhbhaReXeXeXeXeXeXcfcfeXeXdcdceXeXeXaRbhbhbjbhaReXeXeXeXdcdcdceXeXeXeXeXeXeXdddeeXeXeXeXeXeXeXdcdcdceXeXeXeXaRcwbhbkbhaRaRaRaYaRaRaRaRaRaRaRaRaRaLaLaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaabpbpaabTcbbVbMckckckckckclbMckepctdactctctctckckckckckbMcncncncncnbMbVccbQbpbpbpbpaaaaaaaaaaaaaaaaaGaGaGaGaGaGaIaIaUaUbabababababadbaUaLaRaRaRaRaRbhbhbhbhaReXeXeXeXeXeXcfcfeXeXdcdceXeXeXaRbhbhbjbhaReXeXeXeXdcdcdceXeXeXeXeXeXeXdddeeXeXeXeXeXeXeXdcdcdceXeXeXeXaRcwbhbkbhaRaRaRaYaRaRaRaRaRaRaRaRaRaLaLaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaabpaaaadfcbbVbMckdgclckckckbMckckhcckckckhccIckckhcckckbMdhdhhddjdjbMbVcccqbpaaaabpbpbpbpaaaaaaaGaGaGaGaGaGaGaGaIaUaUbfbmbabababmbabaaUaLaRaRaRaRaRbhbhbhbhaRaRaRaRaRaRhedkaRheaRaRaRaRaRaRaRbhbhbhbhaRaRaRaRheaRaRaRheaRaRaRaRaRheaXdkheaRaRaRaRaRheaRaRaRheaRaRaRaRbhbhbhbhaRaRaRaRaRaRaRaRaRaRaRaRaRaRaLaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaabpaaaadfcbbVbMbMbMbMbMbMbMbMbMbMbMcJcJbMbMbMbMbMbMbMbMbMbMbMbMbMbMbMbVcccqaaaaaaaaaaaabpbpbpaGaIaIaIaIaIaIaIaIaIaUaZbabababababababfaUaLaRaRaRaRaRbhbhbibhbhbhbhbhbhbhbhdlbkbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhdmbhbhbhbhbhdlbhbhbhbkbhbhbhbhbhbhbhbhbhbhbhbjbhbhbhaRaRaRaRdnaRaRaRaRaRaRaRaRaLaLaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaabpaaaadfcbbVbVbVbVbVbVbVdobVbVbVhfbVbVhfbVbVbVbVbVbVbVbVbVbVbVbVbVbVdocccqbpaaaaaaaaaaaaaaaGaGaIaUaUaUaUaUaUaUaUaUbabababababfbaaUaUaUaLaRaRaRaRaRbhbhdpbhbhbhbhbhbhbhbhdlbhbhbhbhbhbhbhbhbhbhbhbhcwbhbhbhbhbhbhbhbhbhbhbhbibhbhbhbhdlbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhbhaRaRaRaRaRaRaRaXaRaRaRaRaRaLaLaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -615,7 +613,7 @@ aaaaaaaaaaaaaaaaaaaaaaaabpbpdfcLbVbVbVbVbVhfbVbVbVbVbVbVbVbVbVbVbVdwbVbVbVbVbVbV aaaaaaaaaaaaaaaaaaaaaaaaaabpdfbMdIdJdJdJdJdJdJdJdJdJdJdKdLdLdIdJdJdJdJdJdJdJdJdJdJdJdJdJdJdKbMbQbpaaaabpaGaGaGaGaGaGaIaUbababababababmbabaaUaNaNaNaLaLaLaRaRaRaRaRaRaRaRaRaRaRaRaRaRaReXdMbwbweubwdNeXbheXdxbwbwbwbweXaRaReXbhbhbhbhbhbhbhbhbhbhbheXaRbkbhbhbheXbhbDdObsdQdRdPdTbDbheXbhbhbhbhdGbhbheXbBbhdEbhbhbhdFbhbheXaLaNaNaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaabpbpaadUdUdUdUdUdUdUdUdUdUdUdVdWdXdYdZdUdUdUdUdUdUdVdUdUdUdUdUdUdVdUdUbpcraaaabpbpbpaGaIaIaIaIaUbbbbaUaUaUaUbabmaUaUaNaNaLaLaRaRaRaRaXaRaRaRaRaReaaRaRaXaRaRaReXdMbxebbwbwdNeXgOeXecbwebbwbweXaRaReXbhdybhdybhdybhedbhdybheXaRbhbhbhbheXgXbDeedQbDbDdQefdzgOeXdvbhbhbhbhbhbheXdDbhdEbhbhcwdFbhbhdHaLaNaNaGaGaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaabpbpaaaaaaaaaaaaaaaaaabpbpbpbpdfeheibQaaaaaaaaaaaabpbpbpbpbpbpbpbpbpbpbpbpbpaaaaaacraIaIejejejejekekejejejaUaUaUaUaNaNaNaLaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaReXdMbwbwelbwdNeXbheXdxbwbwbxbweXaRaReXgXbhbibhbhbhbhbhbhbhgOeXaRbhbhbhbheXbhbDdOdPbDbDdPdTewbheXdvdveSbhbhhkbhdCbhbhbhdGbhbhdFbhbheXaLaNaNaGaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaabpbpbpaaaaaaaaaaaabpbpaaaaaadfeneobQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabpbpbpbpbpejejejepeqerekekekekejejejejaNaNaLaLaLaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaReXdMhlbwbwhldNeXbheXhjbwbwbwbweXaRaReXbhbhbhbhbhbCbhbhbhbhbhcfaRbhbhbnbheXbhbDeedRbDbDdRefbDbheXeXeXeXeXeXeXeXeXbhesesesesbhdFbhbhdHaLaNaNaGaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaabpbpbpaaaaaaaaaaaabpbpaaaaaadfeneobQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabpbpbpbpbpejejejekeqekekekekekejejejejaNaNaLaLaLaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaReXdMhlbwbwhldNeXbheXhjbwbwbwbweXaRaReXbhbhbhbhbhbCbhbhbhbhbhcfaRbhbhbnbheXbhbDeedRbDbDdRefbDbheXeXeXeXeXeXeXeXeXbhesesesesbhdFbhbhdHaLaNaNaGaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaabpbpbpbpbpbpbpbpaaaaaaaadfdXetbQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaejekekekekekekekekekekekekejaNaNaLaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaXaRaRaRaReXeXeXbwbweXeXeXcfeXeXbwbweXeXeXaWaReXbhfwbhdybhdybhevbhdybheXhmbhbhbhbheXhnbDdOdQbDbDdSexbDgOeXbyhobybybyhobyeXbhdDhpbBdDbhgPbhbheXaLaNaNaGaGaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadfeheybQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaezekekekekekekekekekekekekejaNaNaLaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaReXbhbhbhbhbhbhbhbhbhbhbhbhbhbheXdkaReXgXbhbhbhbhbhbhbhbhbhgOeXaRbhdpbhbheXbhbDeedPdQbsdRefeAbheXbhbhbhbhbhbhbheXeXeXeXeXeXeBeXeXeXeXaLaNaNaGaGaGaGaaaaaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadfeCdYbQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeDeEeFeGekekekekekekekekekekekekejaNaNaLaLaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaRaReXbhbheHbheXeXeXeXeXeXbhbhbhbheXdkaWeXbhdybhevbhdybhdybhdybheXaRbhbhbhbheXbhbDbDbDeIeJeKbDbDbhdCbhcwbhbhbjbhbhdCeLhqeMeNeOeOePhreLeXaLaNaNaGaGaGaGaGaGaGaGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa From 12aea54e8488bf655e1bd6c7a5ec7a9e5d439304 Mon Sep 17 00:00:00 2001 From: Tayyyyyyy Date: Wed, 25 Apr 2018 01:53:11 -0500 Subject: [PATCH 029/232] Fix PM box revealing admin char, incorrect PM target for non-admins --- code/modules/admin/verbs/adminpm.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index e89988e32f4..2533eab0570 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -88,7 +88,7 @@ //get message text, limit it's length.and clean/escape html if(!msg) - msg = input(src,"Message:", "Private message to [key_name(C, 0)]") as text|null + msg = input(src,"Message:", "Private message to [holder ? key_name(C, FALSE) : key_name_hidden(C, FALSE)]") as text|null if(!msg) return @@ -154,7 +154,7 @@ var/emoji_msg = "[msg]" recieve_message = "[type] from-[recieve_pm_type][C.holder ? key_name(src, TRUE, type) : key_name_hidden(src, TRUE, type)]: [emoji_msg]" to_chat(C, recieve_message) - to_chat(src, "[send_pm_type][type] to-[holder ? key_name(C, TRUE, type) : key_name_hidden(src, TRUE, type)]: [emoji_msg]") + to_chat(src, "[send_pm_type][type] to-[holder ? key_name(C, TRUE, type) : key_name_hidden(C, TRUE, type)]: [emoji_msg]") /*if(holder && !C.holder) C.last_pm_recieved = world.time From fa683dd3c1b8bad073a3ae9034b0e574c7c5bebb Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Wed, 25 Apr 2018 14:26:51 -0400 Subject: [PATCH 030/232] ORM Refactor --- code/game/mecha/mech_fabricator.dm | 8 +- code/modules/mining/equipment_locker.dm | 444 ++++++++++++++---------- code/modules/telesci/bscrystal.dm | 10 +- 3 files changed, 263 insertions(+), 199 deletions(-) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index dbaaf68cc1b..d1c2826a5ce 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -104,7 +104,7 @@ return output /obj/machinery/mecha_part_fabricator/proc/output_part_info(datum/design/D) - var/output = "[initial(D.name)] (Cost: [output_part_cost(D)]) [get_construction_time_w_coeff(D)/10]sec" + var/output = "[initial(D.name)] (Cost: [output_part_cost(D)]) [get_construction_time_w_coeff(D)/10] seconds" return output /obj/machinery/mecha_part_fabricator/proc/output_part_cost(datum/design/D) @@ -327,14 +327,16 @@ -
[left_part] + [list_queue()]
"} - user << browse(dat, "window=mecha_fabricator;size=1000x430") + var/datum/browser/popup = new(user, "mecha_fabricator", name, 1000, 600) + popup.set_content(dat) + popup.open(0) onclose(user, "mecha_fabricator") return diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 9306eec9829..add66a81e90 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -3,28 +3,33 @@ /obj/machinery/mineral/ore_redemption name = "ore redemption machine" - desc = "A machine that accepts ore and instantly transforms it into workable material sheets, but cannot produce alloys such as Plasteel. Points for ore are generated based on type and can be redeemed at a mining equipment vendor." + desc = "A machine that accepts ore and instantly transforms it into workable material sheets. Points for ore are generated based on type and can be redeemed at a mining equipment vendor." icon = 'icons/obj/machines/mining_machines.dmi' icon_state = "ore_redemption" - density = 1 - anchored = 1.0 + density = TRUE + anchored = TRUE input_dir = NORTH output_dir = SOUTH req_access = list(access_mineral_storeroom) - var/stk_types = list() - var/stk_amt = list() - var/stack_list[0] //Key: Type. Value: Instance of type. + speed_process = TRUE + layer = BELOW_OBJ_LAYER + var/req_access_reclaim = access_mining_station var/obj/item/card/id/inserted_id var/points = 0 var/ore_pickup_rate = 15 var/sheet_per_ore = 1 var/point_upgrade = 1 - var/list/ore_values = list(("sand" = 1), ("iron" = 1), ("plasma" = 15), ("silver" = 16), ("gold" = 18), ("titanium" = 30), ("uranium" = 30), ("diamond" = 50), ("bluespace crystal" = 50), ("bananium" = 60), ("tranquillite" = 60)) + var/list/ore_values = list("sand" = 1, "iron" = 1, "plasma" = 15, "silver" = 16, "gold" = 18, "titanium" = 30, "uranium" = 30, "diamond" = 50, "bluespace crystal" = 50, "bananium" = 60, "tranquillite" = 60) + var/message_sent = FALSE + var/list/ore_buffer = list() + var/datum/research/files + var/obj/item/disk/design_disk/inserted_disk var/list/supply_consoles = list("Science", "Robotics", "Research Director's Desk", "Mechanic", "Engineering" = list("metal", "glass", "plasma"), "Chief Engineer's Desk" = list("metal", "glass", "plasma"), "Atmospherics" = list("metal", "glass", "plasma"), "Bar" = list("uranium", "plasma"), "Virology" = list("plasma", "uranium", "gold")) - speed_process = 1 /obj/machinery/mineral/ore_redemption/New() ..() + AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_TITANIUM, MAT_BLUESPACE),INFINITY) + files = new /datum/research/smelter(src) component_parts = list() component_parts += new /obj/item/circuitboard/ore_redemption(null) component_parts += new /obj/item/stock_parts/matter_bin(null) @@ -45,6 +50,12 @@ component_parts += new /obj/item/stock_parts/console_screen(null) RefreshParts() +/obj/machinery/mineral/ore_redemption/Destroy() + QDEL_NULL(files) + GET_COMPONENT(materials, /datum/component/material_container) + materials.retrieve_all() + return ..() + /obj/machinery/mineral/ore_redemption/RefreshParts() var/ore_pickup_rate_temp = 15 var/point_upgrade_temp = 1 @@ -59,147 +70,195 @@ point_upgrade = point_upgrade_temp sheet_per_ore = sheet_per_ore_temp -/obj/machinery/mineral/ore_redemption/proc/process_sheet(obj/item/ore/O) - var/obj/item/stack/sheet/processed_sheet = SmeltMineral(O) - if(processed_sheet) - if(!(processed_sheet in stack_list)) //It's the first of this sheet added - var/obj/item/stack/sheet/s = new processed_sheet(src,0) - s.amount = 0 - stack_list[processed_sheet] = s - // Not including tg's ignoring of metal, glass being stocked because if cargo's not telling science when ores are there, they probably won't - // help with restocking metal/glass either - var/msg = "\[[station_time_timestamp()]\]: [capitalize(s.name)] sheets have been stocked in the ore reclaimer." - for(var/obj/machinery/requests_console/D in allConsoles) - if(D.department in src.supply_consoles) - if(supply_consoles[D.department] == null || (s.name in supply_consoles[D.department])) - D.createMessage("Ore Redemption Machine", "New Minerals Available!", msg, 1) +/obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/ore/O) - var/obj/item/stack/sheet/storage = stack_list[processed_sheet] - storage.amount += sheet_per_ore //Stack the sheets - O.loc = null //Let the old sheet... - qdel(O) //... garbage collect + ore_buffer -= O + + if(O && O.refined_type) + points += O.points * point_upgrade + + GET_COMPONENT(materials, /datum/component/material_container) + var/material_amount = materials.get_item_material_amount(O) + + if(!material_amount) + qdel(O) //no materials, incinerate it + + else if(!materials.has_space(material_amount * sheet_per_ore)) //if there is no space, eject it + unload_mineral(O) + + else + materials.insert_item(O, sheet_per_ore) //insert it + qdel(O) + +/obj/machinery/mineral/ore_redemption/proc/can_smelt_alloy(datum/design/D) + if(D.make_reagents.len) + return FALSE + + var/build_amount = 0 + + GET_COMPONENT(materials, /datum/component/material_container) + for(var/mat_id in D.materials) + var/M = D.materials[mat_id] + var/datum/material/redemption_mat = materials.materials[mat_id] + + if(!M || !redemption_mat) + return FALSE + + var/smeltable_sheets = round(redemption_mat.amount / M) + + if(!smeltable_sheets) + return FALSE + + if(!build_amount) + build_amount = smeltable_sheets + + build_amount = min(build_amount, smeltable_sheets) + + return build_amount + +/obj/machinery/mineral/ore_redemption/proc/process_ores(list/ores_to_process) + var/current_amount = 0 + for(var/ore in ores_to_process) + if(current_amount >= ore_pickup_rate) + break + smelt_ore(ore) + +/obj/machinery/mineral/ore_redemption/proc/send_console_message() + if(!is_station_level(z)) + return + message_sent = TRUE + var/area/A = get_area(src) + var/msg = "Now available in [A]:
" + + var/has_minerals = FALSE + var/mineral_name = null + GET_COMPONENT(materials, /datum/component/material_container) + for(var/mat_id in materials.materials) + var/datum/material/M = materials.materials[mat_id] + var/mineral_amount = M.amount / MINERAL_MATERIAL_AMOUNT + mineral_name = capitalize(M.name) + if(mineral_amount) + has_minerals = TRUE + msg += "[mineral_name]: [mineral_amount] sheets
" + + if(!has_minerals) + return + + for(var/obj/machinery/requests_console/D in allConsoles) + if(D.department in src.supply_consoles) + if(supply_consoles[D.department] == null || (mineral_name in supply_consoles[D.department])) + D.createMessage("Ore Redemption Machine", "New Minerals Available!", msg, 1) /obj/machinery/mineral/ore_redemption/process() - if(!panel_open && powered()) //If the machine is partially disassembled and/or depowered, it should not process minerals - var/turf/T = get_step(src, input_dir) - var/i = 0 - if(T) - for(var/obj/item/ore/O in T) - if(i >= ore_pickup_rate) - break - else if(!O || !O.refined_type) - continue - else - process_sheet(O) - i++ - else - var/obj/structure/ore_box/B = locate() in T - if(B) - for(var/obj/item/ore/O in B.contents) - if(i >= ore_pickup_rate) - break - else if(!O || !O.refined_type) - continue - else - process_sheet(O) - i++ + if(panel_open || !powered()) + return + var/atom/input = get_step(src, input_dir) + var/obj/structure/ore_box/OB = locate() in input + if(OB) + input = OB -/obj/machinery/mineral/ore_redemption/attackby(var/obj/item/W, var/mob/user, params) - if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W)) - updateUsrDialog() - return + for(var/obj/item/ore/O in input) + if(QDELETED(O)) + continue + ore_buffer |= O + O.forceMove(src) + CHECK_TICK + + if(LAZYLEN(ore_buffer)) + message_sent = FALSE + process_ores(ore_buffer) + else if(!message_sent) + send_console_message() + +/obj/machinery/mineral/ore_redemption/attackby(obj/item/W, mob/user, params) if(exchange_parts(user, W)) return - if(panel_open) - if(istype(W, /obj/item/crowbar)) - if(inserted_id) - inserted_id.forceMove(loc) //Prevents deconstructing the ORM from deleting whatever ID was inside it. - empty_content() - default_deconstruction_crowbar(W) - if(ismultitool(W)) - input_dir = turn(input_dir, -90) - output_dir = turn(output_dir, -90) - to_chat(user, "You change [src]'s I/O settings, setting the input to [dir2text(input_dir)] and the output to [dir2text(output_dir)].") - return if(default_unfasten_wrench(user, W)) return - if(istype(W,/obj/item/card/id)) - if(!powered()) - return - else - var/obj/item/card/id/I = usr.get_active_hand() - if(istype(I) && !istype(inserted_id)) - if(!user.drop_item()) - return - I.forceMove(src) - inserted_id = I - interact(user) - return - ..() + if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W)) + updateUsrDialog() + return + if(default_deconstruction_crowbar(W)) + return -/obj/machinery/mineral/ore_redemption/proc/SmeltMineral(var/obj/item/ore/O) - if(O.refined_type) - var/obj/item/stack/sheet/M = O.refined_type - points += O.points * point_upgrade - return M - qdel(O)//No refined type? Purge it. - return + if(!powered()) + return + if(istype(W, /obj/item/card/id)) + var/obj/item/card/id/I = user.get_active_hand() + if(istype(I) && !istype(inserted_id)) + if(!user.drop_item()) + return + I.forceMove(src) + inserted_id = I + interact(user) + return + + if(ismultitool(W) && panel_open) + input_dir = turn(input_dir, -90) + output_dir = turn(output_dir, -90) + to_chat(user, "You change [src]'s I/O settings, setting the input to [dir2text(input_dir)] and the output to [dir2text(output_dir)].") + return + + if(istype(W, /obj/item/disk/design_disk)) + if(user.drop_item()) + W.forceMove(src) + inserted_disk = W + interact(user) + return TRUE + + return ..() /obj/machinery/mineral/ore_redemption/attack_hand(mob/user) if(..()) return interact(user) -/obj/machinery/mineral/ore_redemption/attack_ghost(mob/user) - interact(user) - /obj/machinery/mineral/ore_redemption/interact(mob/user) - user.set_machine(src) + var/dat = "This machine only accepts ore. Gibtonite and Slag are not accepted.

" + dat += "Current unclaimed points: [points]
" - var/obj/item/stack/sheet/s - var/dat - - dat += text("This machine only accepts ore. Gibtonite and Slag are not accepted.

") - dat += text("Current unclaimed points: [points]
") - - if(istype(inserted_id)) - dat += text("You have [inserted_id.mining_points] mining points collected. Eject ID.
") - dat += text("Claim points.
") + if(inserted_id) + dat += "You have [inserted_id.mining_points] mining points collected. Eject ID.
" + dat += "Claim points.

" else - dat += text("No ID inserted. Insert ID.
") + dat += "No ID inserted. Insert ID.

" - for(var/O in stack_list) - s = stack_list[O] - if(s.amount > 0) - if(O == stack_list[1]) - dat += "
" //just looks nicer - dat += text("[capitalize(s.name)]: [s.amount] Release
") + GET_COMPONENT(materials, /datum/component/material_container) + for(var/mat_id in materials.materials) + var/datum/material/M = materials.materials[mat_id] + if(M.amount) + var/sheet_amount = M.amount / MINERAL_MATERIAL_AMOUNT + dat += "[capitalize(M.name)]: [sheet_amount] " + if(sheet_amount >= 1) + dat += "Release
" + else + dat += "Release
" - var/obj/item/stack/sheet/metalstack - if(/obj/item/stack/sheet/metal in stack_list) - metalstack = stack_list[/obj/item/stack/sheet/metal] + dat += "
Alloys:
" - var/obj/item/stack/sheet/glass/glassstack - if(/obj/item/stack/sheet/glass in stack_list) - glassstack = stack_list[/obj/item/stack/sheet/glass] + for(var/v in files.known_designs) + var/datum/design/D = files.known_designs[v] + if(can_smelt_alloy(D)) + dat += "[D.name]: Smelt
" + else + dat += "[D.name]: Smelt
" - var/obj/item/stack/sheet/plasmastack - if((/obj/item/stack/sheet/mineral/plasma in stack_list)) - plasmastack = stack_list[/obj/item/stack/sheet/mineral/plasma] + dat += "
Mineral Value List:
[get_ore_values()]
" - var/obj/item/stack/sheet/mineral/titaniumstack - if((/obj/item/stack/sheet/mineral/titanium in stack_list)) - titaniumstack = stack_list[/obj/item/stack/sheet/mineral/titanium] + if(inserted_disk) + dat += "Eject disk
" + dat += "
Uploadable designs:
" - if(metalstack && plasmastack && min(metalstack.amount, plasmastack.amount)) - dat += text("Plasteel Alloy (Metal + Plasma): Smelt
") - if(titaniumstack && plasmastack && min(titaniumstack.amount, plasmastack.amount)) - dat += text("Plastitanium Alloy (Titanium + Plasma): Smelt
") - if(glassstack && plasmastack && min(glassstack.amount, plasmastack.amount)) - dat += text("Plasma Glass (Glass + Plasma): Smelt
") - dat += text("
Mineral Value List:
[get_ore_values()]
") + if(inserted_disk.blueprint) + var/datum/design/D = inserted_disk.blueprint + if(D.build_type & SMELTER) + dat += "Name: [D.name] Upload to smelter" - var/datum/browser/popup = new(user, "console_stacking_machine", "Ore Redemption Machine", 400, 500) + dat += "

" + else + dat += "Insert design disk

" + + var/datum/browser/popup = new(user, "ore_redemption_machine", "Ore Redemption Machine", 400, 500) popup.set_content(dat) popup.open() return @@ -214,63 +273,80 @@ /obj/machinery/mineral/ore_redemption/Topic(href, href_list) if(..()) - return 1 - - if(href_list["choice"]) - if(istype(inserted_id)) - if(href_list["choice"] == "eject") - inserted_id.loc = loc - inserted_id.verb_pickup() - inserted_id = null - if(href_list["choice"] == "claim") - if(access_mining_station in inserted_id.access) - inserted_id.mining_points += points - points = 0 - else - to_chat(usr, "Required access not found.") - else if(href_list["choice"] == "insert") - var/obj/item/card/id/I = usr.get_active_hand() - if(istype(I)) - if(!usr.drop_item()) - return 1 - I.loc = src - inserted_id = I + return + GET_COMPONENT(materials, /datum/component/material_container) + if(href_list["eject_id"]) + usr.put_in_hands(inserted_id) + inserted_id = null + if(href_list["claim"]) + if(inserted_id) + if(req_access_reclaim in inserted_id.access) + inserted_id.mining_points += points + points = 0 else - to_chat(usr, "No valid ID.") + to_chat(usr, "Required access not found.") + else if(href_list["insert_id"]) + var/obj/item/card/id/I = usr.get_active_hand() + if(istype(I)) + if(!usr.drop_item()) + return + I.forceMove(src) + inserted_id = I + else + to_chat(usr, "Not a valid ID!") + if(href_list["eject_disk"]) + if(inserted_disk) + inserted_disk.forceMove(loc) + inserted_disk = null + if(href_list["insert_disk"]) + var/obj/item/disk/design_disk/D = usr.get_active_hand() + if(istype(D)) + if(!usr.drop_item()) + return + D.forceMove(src) + inserted_disk = D + if(href_list["upload"]) + if(inserted_disk && inserted_disk.blueprint) + files.AddDesign2Known(inserted_disk.blueprint) if(href_list["release"]) - if(check_access(inserted_id) || allowed(usr)) //Check the ID inside, otherwise check the user. - if(!(text2path(href_list["release"]) in stack_list)) return - var/obj/item/stack/sheet/inp = stack_list[text2path(href_list["release"])] - var/obj/item/stack/sheet/out = new inp.type() - var/desired = input("How much?", "How much to eject?", 1) as num - out.amount = round(min(desired,50,inp.amount)) - if(out.amount >= 1) - inp.amount -= out.amount - unload_mineral(out) - if(inp.amount < 1) - stack_list -= text2path(href_list["release"]) + if(check_access(inserted_id) || allowed(usr)) //Check the ID inside, otherwise check the user + var/mat_id = href_list["release"] + if(!materials.materials[mat_id]) + return + + var/datum/material/mat = materials.materials[mat_id] + var/stored_amount = mat.amount / MINERAL_MATERIAL_AMOUNT + + if(!stored_amount) + return + + var/desired = input("How many sheets?", "How many sheets to eject?", 1) as null|num + var/sheets_to_remove = round(min(desired,50,stored_amount)) + + var/out = get_step(src, output_dir) + materials.retrieve_sheets(sheets_to_remove, mat_id, out) + else to_chat(usr, "Required access not found.") - if(href_list["alloytype1"] && href_list["alloytype2"] && href_list["alloytypeout"]) - var/alloytype1 = text2path(href_list["alloytype1"]) - var/alloytype2 = text2path(href_list["alloytype2"]) - var/alloytypeout = text2path(href_list["alloytypeout"]) - if(check_access(inserted_id) || allowed(usr)) - if(!(alloytype1 in stack_list)) - return - if(!(alloytype2 in stack_list)) - return - var/obj/item/stack/sheet/stack1 = stack_list[alloytype1] - var/obj/item/stack/sheet/stack2 = stack_list[alloytype2] - var/desired = input("How much?", "How much would you like to smelt?", 1) as num - var/obj/item/stack/sheet/alloyout = new alloytypeout - alloyout.amount = round(min(desired,50,stack1.amount,stack2.amount)) - if(alloyout.amount >= 1) - stack1.amount -= alloyout.amount - stack2.amount -= alloyout.amount - unload_mineral(alloyout) + if(href_list["alloy"]) + var/alloy_id = href_list["alloy"] + var/datum/design/alloy = files.FindDesignByID(alloy_id) + if((check_access(inserted_id) || allowed(usr)) && alloy) + var/desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num + var/smelt_amount = can_smelt_alloy(alloy) + var/amount = round(min(desired,50,smelt_amount)) + materials.use_amount(alloy.materials, amount) + + var/output = new alloy.build_path(src) + if(istype(output, /obj/item/stack/sheet)) + var/obj/item/stack/sheet/mineral/produced_alloy = output + produced_alloy.amount = amount + unload_mineral(produced_alloy) + else + unload_mineral(output) + else to_chat(usr, "Required access not found.") updateUsrDialog() @@ -281,31 +357,16 @@ s.start() if(severity == 1) if(prob(50)) - empty_content() qdel(src) else if(severity == 2) if(prob(25)) - empty_content() qdel(src) -//empty the redemption machine by stacks of at most max_amount (50 at this time) size -/obj/machinery/mineral/ore_redemption/proc/empty_content() - var/obj/item/stack/sheet/s - - for(var/O in stack_list) - s = stack_list[O] - while(s.amount > s.max_amount) - new s.type(loc,s.max_amount) - s.use(s.max_amount) - s.forceMove(loc) - s.layer = initial(s.layer) - s.plane = initial(s.plane) - /obj/machinery/mineral/ore_redemption/power_change() ..() update_icon() if(inserted_id && !powered()) - visible_message("The ID slot indicator light flickers on \the [src] as it spits out a card before powering down.") + visible_message("The ID slot indicator light flickers on [src] as it spits out a card before powering down.") inserted_id.forceMove(loc) /obj/machinery/mineral/ore_redemption/update_icon() @@ -313,7 +374,6 @@ icon_state = initial(icon_state) else icon_state = "[initial(icon_state)]-off" - return /**********************Mining Equipment Locker**************************/ diff --git a/code/modules/telesci/bscrystal.dm b/code/modules/telesci/bscrystal.dm index 89c7153f018..78b1da7f2a9 100644 --- a/code/modules/telesci/bscrystal.dm +++ b/code/modules/telesci/bscrystal.dm @@ -36,10 +36,12 @@ if(isliving(hit_atom)) blink_mob(hit_atom) qdel(src) + // Blueapce crystal fragments (stops point farming) -/obj/item/ore/bluespace_crystal/fragment - points = 0 - refined_type = null +/obj/item/ore/bluespace_crystal/refined + name = "refined bluespace crystal" + points = 0 + refined_type = null // Artifical bluespace crystal, doesn't give you much research. /obj/item/ore/bluespace_crystal/artificial @@ -53,7 +55,7 @@ // Polycrystals, aka stacks -var/global/list/datum/stack_recipe/bluespace_crystal_recipes = list(new/datum/stack_recipe("Breakdown into bluespace crystal", /obj/item/ore/bluespace_crystal/fragment, 1, one_per_turf = 0, on_floor = 1)) +var/global/list/datum/stack_recipe/bluespace_crystal_recipes = list(new/datum/stack_recipe("Breakdown into bluespace crystal", /obj/item/ore/bluespace_crystal/refined, 1, one_per_turf = 0, on_floor = 1)) /obj/item/stack/sheet/bluespace_crystal name = "bluespace polycrystal" From 9f36a119a91d2f39bb6648e93021e4c8f2c22ba1 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Wed, 25 Apr 2018 15:10:50 -0400 Subject: [PATCH 031/232] Makes All Maps Compile --- .../RandomRuins/SpaceRuins/derelict1.dmm | 3 +- .../RandomRuins/SpaceRuins/onehalf.dmm | 2 +- _maps/map_files/RandomZLevels/spacebattle.dmm | 53 ++++--------------- _maps/map_files/debug/smoothing.dmm | 5 +- _maps/map_files/templates/spacehotel/s_05.dmm | 3 +- 5 files changed, 18 insertions(+), 48 deletions(-) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/derelict1.dmm b/_maps/map_files/RandomRuins/SpaceRuins/derelict1.dmm index bbbb2f1e366..6464108bf02 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/derelict1.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/derelict1.dmm @@ -4,7 +4,7 @@ "d" = (/obj/structure/alien/weeds,/obj/structure/alien/resin/membrane,/turf/simulated/floor/plating/airless,/area/ruin/unpowered) "e" = (/obj/structure/girder,/obj/structure/alien/weeds,/turf/simulated/floor/plating/airless,/area/ruin/unpowered) "f" = (/obj/structure/alien/weeds,/turf/simulated/floor/plating/airless,/area/ruin/unpowered) -"g" = (/obj/structure/alien/weeds,/obj/structure/glasstable_frame,/turf/simulated/floor/plating/airless,/area/ruin/unpowered) +"g" = (/obj/structure/alien/weeds,/obj/structure/table_frame,/turf/simulated/floor/plating/airless,/area/ruin/unpowered) "h" = (/obj/structure/alien/weeds/node,/turf/simulated/floor/plating/airless,/area/ruin/unpowered) "i" = (/obj/structure/alien/weeds,/obj/structure/stool/bed/nest,/turf/simulated/floor/plating/airless,/area/ruin/unpowered) "j" = (/obj/structure/alien/weeds,/obj/structure/stool/bed/nest,/obj/effect/decal/remains/human,/turf/simulated/floor/plating/airless,/area/ruin/unpowered) @@ -59,3 +59,4 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "} + diff --git a/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm b/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm index 8ce622b810c..5abb2eee3c0 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm @@ -22,7 +22,7 @@ "av" = (/obj/machinery/door/poddoor{id_tag = "bayext4"; name = "mining drone bay blast door"},/turf/simulated/floor/plating/airless{dir = 1; icon_state = "warnplate"},/area/ruin/onehalf/drone_bay) "aw" = (/obj/structure/lattice,/turf/space,/area/space) "ax" = (/obj/structure/lattice,/turf/space,/area/ruin/onehalf/hallway) -"ay" = (/obj/structure/glasstable_frame,/turf/simulated/floor/plasteel/airless{icon_state = "damaged3"},/area/ruin/onehalf/hallway) +"ay" = (/obj/structure/table_frame,/turf/simulated/floor/plasteel/airless{icon_state = "damaged3"},/area/ruin/onehalf/hallway) "az" = (/obj/machinery/washing_machine,/turf/simulated/floor/plasteel/airless,/area/ruin/onehalf/hallway) "aA" = (/obj/structure/stool/bed/roller,/turf/simulated/floor/plasteel{tag = "icon-white"; icon_state = "white"},/area/ruin/onehalf/dorms_med) "aB" = (/obj/machinery/light{dir = 4; icon_state = "tube1"},/obj/structure/table,/obj/item/storage/firstaid/brute{pixel_x = 3; pixel_y = 6},/obj/item/storage/firstaid,/turf/simulated/floor/plasteel{tag = "icon-white"; icon_state = "white"},/area/ruin/onehalf/dorms_med) diff --git a/_maps/map_files/RandomZLevels/spacebattle.dmm b/_maps/map_files/RandomZLevels/spacebattle.dmm index 09814d700db..03185797355 100644 --- a/_maps/map_files/RandomZLevels/spacebattle.dmm +++ b/_maps/map_files/RandomZLevels/spacebattle.dmm @@ -209,7 +209,7 @@ "ea" = (/obj/machinery/gateway{dir = 9},/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser) "eb" = (/obj/machinery/gateway{dir = 1},/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser) "ec" = (/obj/machinery/gateway{dir = 5},/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser) -"ed" = (/obj/structure/closet/crate{name = "Gold Crate"},/obj/item/mecha_parts/mecha_equipment/syringe_gun,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser) +"ed" = (/obj/structure/closet/crate{name = "Gold Crate"},/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser) "ee" = (/obj/structure/closet/crate{name = "Gold Crate"},/obj/item/mecha_parts/mecha_equipment/repair_droid,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser) "ef" = (/mob/living/simple_animal/hostile/syndicate/melee,/turf/simulated/floor/plasteel{icon_state = "bar"},/area/awaymission/spacebattle/cruiser) "eg" = (/obj/structure/closet/l3closet/security,/turf/simulated/floor/plasteel{icon_state = "red"; dir = 4},/area/awaymission/spacebattle/cruiser) @@ -278,18 +278,10 @@ "fr" = (/obj/item/ammo_casing/a357,/obj/item/ammo_casing/a357,/obj/item/gun/projectile/revolver/mateba,/obj/effect/landmark/corpse/commander{mobname = "Aaron Bowden"; name = "Aaron Bowden"},/obj/effect/decal/cleanable/blood,/turf/simulated/floor/plasteel,/area/awaymission/spacebattle/cruiser) "fs" = (/obj/structure/stool/bed/chair{dir = 4},/obj/effect/decal/cleanable/blood,/turf/simulated/floor/plasteel,/area/awaymission/spacebattle/cruiser) "ft" = (/obj/machinery/computer/shuttle,/turf/simulated/floor/plasteel{tag = "icon-bluefull"; icon_state = "bluefull"},/area/awaymission/spacebattle/cruiser) -"fu" = (/obj/structure/artilleryplaceholder{tag = "icon-1"; icon_state = "1"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fv" = (/obj/structure/artilleryplaceholder{tag = "icon-2"; icon_state = "2"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fw" = (/obj/structure/artilleryplaceholder{tag = "icon-3"; icon_state = "3"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fx" = (/obj/structure/artilleryplaceholder{tag = "icon-4"; icon_state = "4"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fy" = (/obj/structure/artilleryplaceholder{tag = "icon-5"; icon_state = "5"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fz" = (/obj/structure/artilleryplaceholder{tag = "icon-6"; icon_state = "6"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fA" = (/obj/structure/artilleryplaceholder{tag = "icon-7"; icon_state = "7"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fB" = (/obj/structure/artilleryplaceholder{tag = "icon-8"; icon_state = "8"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fC" = (/obj/structure/artilleryplaceholder{tag = "icon-9"; icon_state = "9"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fD" = (/obj/structure/artilleryplaceholder{tag = "icon-10"; icon_state = "10"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fE" = (/obj/structure/artilleryplaceholder{tag = "icon-11"; icon_state = "11"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fF" = (/obj/structure/artilleryplaceholder{tag = "icon-12"; icon_state = "12"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) +"fu" = (/obj/machinery/bsa/full/east,/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) +"fv" = (/obj/machinery/computer/bsa_control,/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) +"fw" = (/obj/structure/closet/crate,/obj/item/stack/spacecash/c10,/obj/item/stack/spacecash/c10,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser) +"fx" = (/obj/item/device/instrument/violin,/turf/simulated/floor/wood,/area/awaymission/spacebattle/cruiser) "fG" = (/obj/structure/closet/crate/internals,/obj/item/tank/emergency_oxygen,/obj/item/storage/firstaid/o2,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser) "fH" = (/turf/simulated/floor/plasteel{dir = 0; icon_state = "blue"},/area/awaymission/spacebattle/cruiser) "fI" = (/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/turf/simulated/floor/plasteel{dir = 0; icon_state = "blue"},/area/awaymission/spacebattle/cruiser) @@ -298,31 +290,8 @@ "fL" = (/obj/effect/landmark/corpse/syndicatesoldier,/obj/item/gun/projectile/automatic/c20r,/obj/item/ammo_casing/c10mm,/obj/item/ammo_casing/c10mm,/obj/effect/decal/cleanable/blood,/turf/simulated/floor/plasteel{dir = 0; icon_state = "blue"},/area/awaymission/spacebattle/cruiser) "fM" = (/obj/item/ammo_casing/c10mm,/turf/simulated/floor/plasteel{dir = 8; icon_state = "bluecorner"},/area/awaymission/spacebattle/cruiser) "fN" = (/obj/machinery/computer/communications,/turf/simulated/floor/plasteel{tag = "icon-bluefull"; icon_state = "bluefull"},/area/awaymission/spacebattle/cruiser) -"fO" = (/obj/structure/artilleryplaceholder{tag = "icon-13"; icon_state = "13"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fP" = (/obj/structure/artilleryplaceholder{tag = "icon-14"; icon_state = "14"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fQ" = (/obj/structure/artilleryplaceholder{tag = "icon-15"; icon_state = "15"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fR" = (/obj/structure/artilleryplaceholder{tag = "icon-16"; icon_state = "16"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fS" = (/obj/structure/artilleryplaceholder{tag = "icon-17"; icon_state = "17"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fT" = (/obj/structure/artilleryplaceholder{tag = "icon-18"; icon_state = "18"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fU" = (/obj/structure/artilleryplaceholder{tag = "icon-19"; icon_state = "19"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fV" = (/obj/structure/artilleryplaceholder{tag = "icon-20"; icon_state = "20"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fW" = (/obj/structure/artilleryplaceholder{tag = "icon-21"; icon_state = "21"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fX" = (/obj/structure/artilleryplaceholder{tag = "icon-22"; icon_state = "22"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fY" = (/obj/structure/artilleryplaceholder{tag = "icon-23"; icon_state = "23"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"fZ" = (/obj/structure/artilleryplaceholder{tag = "icon-24"; icon_state = "24"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) "ga" = (/obj/structure/closet/crate,/obj/item/poster/random_contraband,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser) "gb" = (/obj/effect/landmark/corpse/bridgeofficer{mobname = "Robert Faver"; name = "Robert Faver"},/obj/item/ammo_casing/shotgun,/obj/effect/decal/cleanable/blood,/turf/simulated/floor/plasteel,/area/awaymission/spacebattle/cruiser) -"gc" = (/obj/structure/artilleryplaceholder/decorative{tag = "icon-25"; icon_state = "25"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"gd" = (/obj/structure/artilleryplaceholder/decorative{tag = "icon-26"; icon_state = "26"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"ge" = (/obj/structure/artilleryplaceholder/decorative{tag = "icon-27"; icon_state = "27"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"gf" = (/obj/structure/artilleryplaceholder/decorative{tag = "icon-28"; icon_state = "28"},/obj/machinery/computer/artillerycontrol,/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"gg" = (/obj/structure/artilleryplaceholder/decorative{tag = "icon-29"; icon_state = "29"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"gh" = (/obj/structure/artilleryplaceholder/decorative{tag = "icon-30"; icon_state = "30"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"gi" = (/obj/structure/artilleryplaceholder/decorative{tag = "icon-31"; icon_state = "31"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"gj" = (/obj/structure/artilleryplaceholder/decorative{tag = "icon-32"; icon_state = "32"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"gk" = (/obj/structure/artilleryplaceholder/decorative{tag = "icon-33"; icon_state = "33"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"gl" = (/obj/structure/artilleryplaceholder/decorative{tag = "icon-34"; icon_state = "34"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) -"gm" = (/obj/structure/artilleryplaceholder{tag = "icon-35"; icon_state = "35"},/turf/simulated/floor/plating/airless,/area/awaymission/spacebattle/cruiser) "gn" = (/obj/structure/closet/crate/secure/weapon,/obj/item/ammo_casing/a357,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser) "go" = (/obj/structure/closet/crate,/obj/item/lipstick/black,/obj/item/lipstick/jade,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser) "gp" = (/obj/structure/closet/crate,/obj/item/clothing/gloves/color/rainbow,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser) @@ -338,7 +307,6 @@ "gz" = (/turf/space,/turf/simulated/shuttle/wall{icon_state = "diagonalWall3"},/area/awaymission/spacebattle/syndicate4) "gA" = (/turf/space,/turf/simulated/shuttle/wall{dir = 4; icon_state = "diagonalWall3"},/area/awaymission/spacebattle/syndicate4) "gB" = (/obj/structure/closet/crate/secure/weapon,/obj/item/gun/energy/laser,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser) -"gC" = (/obj/structure/closet/crate,/obj/item/spacecash/c10,/obj/item/spacecash/c10,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser) "gD" = (/obj/effect/decal/cleanable/blood,/turf/simulated/shuttle/wall{tag = "icon-swall3"; icon_state = "swall3"},/area/awaymission/spacebattle/cruiser) "gE" = (/obj/effect/landmark/corpse/doctor{mobname = "Adam Smith"; name = "Adam Smith"},/obj/effect/decal/cleanable/blood,/turf/simulated/floor/plasteel,/area/awaymission/spacebattle/cruiser) "gF" = (/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/spacebattle/cruiser) @@ -385,7 +353,6 @@ "hu" = (/obj/machinery/door/unpowered/shuttle,/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/spacebattle/cruiser) "hv" = (/mob/living/simple_animal/hostile/syndicate/melee,/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/spacebattle/cruiser) "hw" = (/obj/structure/table/reinforced,/obj/item/storage/firstaid/regular,/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/spacebattle/cruiser) -"hx" = (/obj/item/device/violin,/turf/simulated/floor/wood,/area/awaymission/spacebattle/cruiser) "hy" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/engine,/area/awaymission/spacebattle/cruiser) "hz" = (/turf/space,/turf/simulated/shuttle/wall{dir = 4; icon_state = "diagonalWall3"},/area/awaymission/spacebattle/syndicate7) "hA" = (/turf/simulated/shuttle/wall{tag = "icon-swall14"; icon_state = "swall14"; dir = 2},/area/awaymission/spacebattle/cruiser) @@ -599,16 +566,16 @@ abababababababababababababababababababababababababababababababababababababababab abababababababababababababababababababababababababababababababababababababababababababababababababeoepePeIeQeIeIeQeIePepeqababababababababababababababababababababababababababababababcbeRcHcHeRcHcHeRcHcHcHcHcHcHcbcUbZcbdOeSdQdRdOdQeTdRcbbZbZcbevbZbZbZeyezeKeUbZbZbZeVeWeMeXeOcWcWcWcWcWeYcWcWcWcWcWcWcWcWcWcWcbchbZchbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZcVcWdbababababababababababababababababababababababababababababababababababababababababababababababababababababababab abababababababababababababababababababababababababababababababababababababababababababababababababepeIeIeIeIeIeIeIeIeIeIepababababababababababababababababababababababababababababababcbeRcHcHeZcHcHeRcHcHcHcHcHcHcbbZbZcbcXenencXcXenencXcbbZbZcbfafbfbfbfcezeKbZcocUbZexbZbZeCeOcWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcbbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZcNcUbZbZbZbZdacWcWababababababababababababababababababababababababababababababababababababababababababababababababababababababab abababababababababababababababababababababababababababababababababababababababababababababababababepeIeIeIeIeIeIeIeIeIeIepababababababababababababababababababababababababababababababcbfdcHcHeRcHcHeRcHfecHcHcHcHffbZbZcObSbSbSbSbSbSbSbSeHbZbZdlbSbScabSbSeHfgcIcJbZbZbZbZeMfheOcWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcObSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSfiababababababababababababababababababababababababababababababababababababababababababababababababababababababab -abababababababababababababababababababababababababababababababababababababababababababababababababfjeIeIeIeIeIeIeIeIeIeIfjababababababababababababababababababababababababababababababcbfkcHcHeRcHcHflcHcHcHcHcHcHffbZbZbZbZbZbZbZbZbZbZbZbZbZbZcafmfnfofpfmfmfqcJcIcobZcofrfsfteOcWcWcWfufvfwfxfyfzfAfBfCfDfEfFcWabababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab -abababababababababababababababababababababababababababababababababababababababababababababababababfjeIeIeIeIeIeIeIeIeIeIfjababababababababababababababababababababababababababababababcbfGcHcHeRcHcHeRcHcHcHcHcHcHffbZcUbZbZbZbZbZbZbZbZbZbZbZbZcafHfIfJfHfKfLfMbZcJbZbZbZbZeMfNeOcWcWcWfOfPfQfRfSfTfUfVfWfXfYfZcWabababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab -abababababababababababababababababababababababababababababababababababababababababababababababababepeIeIeIeIeIeIeIeIeIeIepababababababababababababababababababababababababababababababcbfGcHcHgacHcHeRcHcHcHcHcHcHffbZbZcrbSbSbSbSbSbSbSbScqbZbZdlbSbScabSbScqfgcJcJgbeWbZbZeMfheOcWcWcWgccWgdgegfggghgigjgkglgmcWcrbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbTababababababababababababababababababababababababababababababababababababababababababababababababababababababab +abababababababababababababababababababababababababababababababababababababababababababababababababfjeIeIeIeIeIeIeIeIeIeIfjababababababababababababababababababababababababababababababcbfkcHcHeRcHcHflcHcHcHcHcHcHffbZbZbZbZbZbZbZbZbZbZbZbZbZbZcafmfnfofpfmfmfqcJcIcobZcofrfsfteOcWcWcWcWcWcWcWcWfucWcWcWcWcWcWcWabababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab +abababababababababababababababababababababababababababababababababababababababababababababababababfjeIeIeIeIeIeIeIeIeIeIfjababababababababababababababababababababababababababababababcbfGcHcHeRcHcHeRcHcHcHcHcHcHffbZcUbZbZbZbZbZbZbZbZbZbZbZbZcafHfIfJfHfKfLfMbZcJbZbZbZbZeMfNeOcWcWcWfvcWcWcWcWcWcWcWcWcWcWcWcWabababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab +abababababababababababababababababababababababababababababababababababababababababababababababababepeIeIeIeIeIeIeIeIeIeIepababababababababababababababababababababababababababababababcbfGcHcHgacHcHeRcHcHcHcHcHcHffbZbZcrbSbSbSbSbSbSbSbScqbZbZdlbSbScabSbScqfgcJcJgbeWbZbZeMfheOcWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcrbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbTababababababababababababababababababababababababababababababababababababababababababababababababababababababab abababababababababababababababababababababababababababababababababababababababababababababababababepePeIeIeIeIeIeIeIeIePepababababababababababababababababababababababababababababababcbgncHcHgocHcHgpcHcHcHcHcHgqcbbZbZcbgrgsgsgtgugvgsgrcbbZbZcbgwgxgxgxgxezeKbZbZgybZcUbZbZeCeOcWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcbbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZchbZbZbZbZbZbZbZbZcVcWcWababababababababababababababababababababababababababababababababababababababababababababababababababababababab -abababababababababababababababababababababababababababababababababababababababababababababababababgzepePeIeIeIeIeIeIePepgAababababababababababababababababababababababababababababababcbgBcHcHgCcHcHgpcHcHcHcHcHcHgDgEbZcbgFgFgFgFgFgFgFgFcbbZbZcbgGgxgHgxgxezeKcobZbZbZbZbZeMgIeOcWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcbbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZdacWdbababababababababababababababababababababababababababababababababababababababababababababababababababababababab +abababababababababababababababababababababababababababababababababababababababababababababababababgzepePeIeIeIeIeIeIePepgAababababababababababababababababababababababababababababababcbgBcHcHfwcHcHgpcHcHcHcHcHcHgDgEbZcbgFgFgFgFgFgFgFgFcbbZbZcbgGgxgHgxgxezeKcobZbZbZbZbZeMgIeOcWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcbbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZdacWdbababababababababababababababababababababababababababababababababababababababababababababababababababababababab ababababababababababababababababababababababababababababababababababababababababababababababababababgzepePeIeIeIeIePepgAabababababababababababababababababababababababababababababababcbgBcHcHcHcHcHcHcHcHcHcHcHcHcbcobZcbgFgFgFgFgFgFgFgFcbbZbZcbgxgxgxgxgxezeKbZbZbZbZbZbZeMgJeOcWcWgKcWcWcWcWcWcWcWcWcWcWcWcWcWcbbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZcGcWcWababababababababababababababababababababababababababababababgLgMababababababababababababababababababababababab abababababababababababababababababababababababababababababababababababababababababababababababababababgzepgNgNgNgNepgAababababababababababababababababababababababababababababababababcbgOgOeRcHcHcHcHcHcHcHcHcHcHcbbZbZcbgPgFgFgFgQgRgFgPcbbZbZcbgxgxgxgxgSezgTgUgUgUgUgUgUgUeCgVcWcWcWcWeEcWcWcWcWcWcWcWeEcWcWcWcbbZbZcrbRbRbSbSbSbSbSbSbSbSbSbSbScabSbSbSbSbSbSbSbSbSbSbSbRbRcqbZchbZbZbZbZbZbZbZbZbZbZcVcWdbababababababababababababababababababababababababababababgWgXgXgXgXgXgXgXgXgXgMabababababababababababababababab ababababababababababababababababababababababababababababababababababababababababababababababababababababgzgYgYgYgYgAabababababababababababababababababababababababababababababababababcbgOgOgZcHcHcHcHcHcHcHcHcHcHcbbZbZcbgFgFgFgFhagRgFgFcbbZbZcbgxgxgxhbgxdlbSbSbSbSbSbSbSbSbSdtcWcWcWcWcWcWcWhccWcWcWcWcWcWcWcWcbbZbZcpdsdtejejejejejejejejejejejejejejejejejejejejejejejcpdsdtbZbZbZbZbZbZbZbZbZbZcYbZdZcWcWababababababababababababababababababababababababababababhdhehfhfhfhfhfhfhfhghhabababababababababababababababab abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababcbhihihihihihjhjeReReReRhkhkcbbZbZcbgFgFgFgFgFgFgFgFcbbZbZcbgxgxgxgxgxezhlbZchbZbZbZbZbZhmcbcWcWcWcWcWcWcWdBdBcWcWcWcWcWcWcWcbbZbZcpdsdthnejhnejhnejhoejhoejhoejhoejhoejhoejhoejhoejhocpdsdtbZbZbZbZbZbZbZbZbZbZbZbZdZcWdbababababababababababababababababababababababababababababhphehfhfhfhfhfhfhfhghqabababababababababababababababab -abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababcbhrhihihihihjhjeReReRhshshtcbbZbZhugFhvgFgFgFgFgFhwcbbZbZcbhxgHgxgxgxezdebZbZbZbZbZchbZdUcacWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcbbZbZcpdsdthydXhydXhydXhydXhydXhydXhydXhydXhydXhydXhydXhycpdsdtbZbZbZbZbZbZbZbZbZbZbZbZdZcWcWababababababababababababababababababababababababababababhphehfhfhfhfhfhfhfgXhzabababababababababababababababab +abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababcbhrhihihihihjhjeReReRhshshtcbbZbZhugFhvgFgFgFgFgFhwcbbZbZcbfxgHgxgxgxezdebZbZbZbZbZchbZdUcacWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcWcbbZbZcpdsdthydXhydXhydXhydXhydXhydXhydXhydXhydXhydXhydXhycpdsdtbZbZbZbZbZbZbZbZbZbZbZbZdZcWcWababababababababababababababababababababababababababababhphehfhfhfhfhfhfhfgXhzabababababababababababababababab ababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababbPbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSdsbQbQbQhAbQhAbQhAbQhAbQhAbQdtbZbZhugFgFgFgFgFgFgFhBcbbZbZcbhCgxgxgxhDezdebZbZhEbZbZbZbZhFcbcWcWcWcWcWcWcWeEcWcWcWcWcWcWcWcWcbbZbZcpdseHhGhHhIhHhIhHhIhHhIhHhIhHhIhHhIhHhIhHhIhHhIhHhJcOdsdtbZbZbZbZbZhKbZbZbZbZbZbZdacWdbababababababababababababababababababababababababababababhphLhMhfhfhfhfhfhfhNababababababababababababababababab ababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababbUbVcdbZbZbZdedededfdfdgdgdhdhdhdididicbhOhPhQcbhRcbhRcbhRcbhRcbhRcbbZbZcbgFgFgFgFgFgFgFhScbbZbZcObSbSbSbSbSeGbSbSbSbScabSbSbSbSeGbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSbSeHcacacphTabababababababababababababababababababababababababdqdtbZbZbZbZbZbZbZbZbZbZbZbZcGcWcWababababababababababababababababababababababababababababhphehfhfhfhfhfhfhfgXgMabababababababababababababababab ababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababccbVcdbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZcbhPhPhPcbhUhVhUhVhUhVhUhVhUcbbZbZcbgFhvgFgFgFgFhWhXcbbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZcYbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZbZcbabababababababababababababababababababababababababababcbbZbZbZbZbZbZbZbZbZbZcYbZcVcWdbababababababababababababababababababababababababababababhphehfhfhfhfhfhfhfhghhabababababababababababababababab diff --git a/_maps/map_files/debug/smoothing.dmm b/_maps/map_files/debug/smoothing.dmm index b9c65716db5..9772a170099 100644 --- a/_maps/map_files/debug/smoothing.dmm +++ b/_maps/map_files/debug/smoothing.dmm @@ -8,8 +8,8 @@ "h" = (/turf/simulated/floor/carpet,/area/centcom) "i" = (/obj/effect/landmark/start,/turf/unsimulated/floor,/area/start) "j" = (/obj/effect/landmark{name = "Observer-Start"},/turf/simulated/floor/plating,/area/centcom) -"k" = (/turf/simulated/wall/mineral/clown,/area/centcom) -"l" = (/obj/structure/falsewall/clown,/turf/simulated/floor/plating,/area/centcom) +"k" = (/turf/simulated/wall/mineral/bananium,/area/centcom) +"l" = (/obj/structure/falsewall/bananium,/turf/simulated/floor/plating,/area/centcom) "m" = (/turf/simulated/wall/mineral/gold,/area/centcom) "n" = (/obj/structure/falsewall/gold,/turf/simulated/floor/plating,/area/centcom) "o" = (/obj/structure/alien/resin/wall,/turf/simulated/floor/snow,/area/centcom) @@ -106,3 +106,4 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "} + diff --git a/_maps/map_files/templates/spacehotel/s_05.dmm b/_maps/map_files/templates/spacehotel/s_05.dmm index 7f526b4835a..9b0a49f784f 100644 --- a/_maps/map_files/templates/spacehotel/s_05.dmm +++ b/_maps/map_files/templates/spacehotel/s_05.dmm @@ -2,7 +2,7 @@ "b" = (/turf/unsimulated/beach/water,/area/template_noop) "c" = (/obj/machinery/shower{pixel_y = 24},/obj/structure/window/reinforced/polarized{dir = 4; id = "room_s"},/turf/unsimulated/floor{dir = 8; icon_state = "whitehall"},/area/template_noop) "d" = (/turf/unsimulated/floor{icon_state = "white"},/area/template_noop) -"e" = (/obj/structure/rack,/obj/item/device/guitar,/obj/item/device/violin{pixel_x = 8},/turf/unsimulated/floor{icon_state = "white"},/area/template_noop) +"e" = (/obj/structure/rack,/obj/item/device/instrument/guitar,/obj/item/device/instrument/violin{pixel_x = 8},/turf/unsimulated/floor{icon_state = "white"},/area/template_noop) "f" = (/obj/structure/dresser,/turf/unsimulated/floor{icon_state = "white"},/area/template_noop) "g" = (/obj/item/device/flashlight/lamp/green,/obj/structure/table,/turf/unsimulated/floor{icon_state = "white"},/area/template_noop) "h" = (/obj/structure/window/reinforced/polarized{dir = 4; id = "room_s"},/turf/unsimulated/floor{dir = 8; icon_state = "whitehall"},/area/template_noop) @@ -24,3 +24,4 @@ anopdddddda aaaaaaaaaaa aaaaaaaaaaa "} + From 80ad012caf985adf84bd0308228827cd68cf07c0 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Wed, 25 Apr 2018 19:15:36 -0400 Subject: [PATCH 032/232] fix --- code/game/mecha/mech_fabricator.dm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index d1c2826a5ce..2ff4f478e2d 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -304,8 +304,8 @@ if("parts") left_part += output_parts_list(part_set) left_part += "
Return" - dat = {" - + dat = {" + [name]