diff --git a/baystation12.dme b/baystation12.dme index a7176e3b98a..112c747f103 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -819,6 +819,7 @@ #include "code\modules\clothing\spacesuits\rig\suits\combat.dm" #include "code\modules\clothing\spacesuits\rig\suits\ert.dm" #include "code\modules\clothing\spacesuits\rig\suits\light.dm" +#include "code\modules\clothing\spacesuits\rig\suits\merc.dm" #include "code\modules\clothing\spacesuits\rig\suits\station.dm" #include "code\modules\clothing\spacesuits\void\merc.dm" #include "code\modules\clothing\spacesuits\void\station.dm" diff --git a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm index aed8b2dc07e..649972297a3 100644 --- a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm +++ b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm @@ -1,5 +1,5 @@ obj/machinery/atmospherics/binary - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH|NORTH use_power = 1 diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm index b59c0281c19..2740966867c 100644 --- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm @@ -49,8 +49,6 @@ for(var/datum/omni_port/P in ports) P.air.volume = ATMOS_DEFAULT_VOLUME_MIXER - rebuild_mixing_inputs() - /obj/machinery/atmospherics/omni/mixer/Del() inputs.Cut() output = null @@ -77,6 +75,8 @@ if(output) output.air.volume = ATMOS_DEFAULT_VOLUME_MIXER * 0.75 * inputs.len output.concentration = 1 + + rebuild_mixing_inputs() /obj/machinery/atmospherics/omni/mixer/proc/mapper_set() return (tag_north_con || tag_south_con || tag_east_con || tag_west_con) @@ -108,7 +108,7 @@ var/power_draw = -1 if (transfer_moles > MINUMUM_MOLES_TO_FILTER) - power_draw = mix_gas(src, mixing_inputs, output, transfer_moles, active_power_usage) + power_draw = mix_gas(src, mixing_inputs, output.air, transfer_moles, active_power_usage) if (power_draw < 0) //update_use_power(0) diff --git a/code/ATMOSPHERICS/components/portables_connector.dm b/code/ATMOSPHERICS/components/portables_connector.dm index 488c1eeb915..4bfd61a0a2a 100644 --- a/code/ATMOSPHERICS/components/portables_connector.dm +++ b/code/ATMOSPHERICS/components/portables_connector.dm @@ -5,7 +5,7 @@ name = "Connector Port" desc = "For connecting portables devices related to atmospherics control." - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH var/obj/machinery/portable_atmospherics/connected_device diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index 4f5205687ed..145a1d61086 100755 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -5,7 +5,7 @@ level = 1 name = "Gas filter" - + use_power = 1 idle_power_usage = 150 //internal circuitry, friction losses and stuff active_power_usage = 7500 //This also doubles as a measure of how powerful the filter is, in Watts. 7500 W ~ 10 HP @@ -49,11 +49,11 @@ filtered_out = list("carbon_dioxide") if(4)//removing N2O filtered_out = list("sleeping_agent") - + air1.volume = ATMOS_DEFAULT_VOLUME_FILTER air2.volume = ATMOS_DEFAULT_VOLUME_FILTER air3.volume = ATMOS_DEFAULT_VOLUME_FILTER - + if(radio_controller) initialize() @@ -102,14 +102,14 @@ update_use_power(0) //usually we get here because a player turned a pump off - definitely want to update. last_flow_rate = 0 return - + //Figure out the amount of moles to transfer var/transfer_moles = (set_flow_rate/air1.volume)*air1.total_moles - + var/power_draw = -1 if (transfer_moles > MINUMUM_MOLES_TO_FILTER) power_draw = filter_gas(src, filtered_out, air1, air2, air3, transfer_moles, active_power_usage) - + if(network2) network2.update = 1 @@ -125,7 +125,7 @@ last_flow_rate = 0 else handle_power_draw(power_draw) - + return 1 /obj/machinery/atmospherics/trinary/filter/initialize() @@ -214,7 +214,7 @@ src.add_fingerprint(usr) if(href_list["filterset"]) filter_type = text2num(href_list["filterset"]) - + filtered_out.Cut() //no need to create new lists unnecessarily switch(filter_type) if(0) //removing hydrocarbons @@ -228,7 +228,7 @@ filtered_out += "carbon_dioxide" if(4)//removing N2O filtered_out += "sleeping_agent" - + if (href_list["temp"]) src.temp = null if(href_list["set_flow_rate"]) @@ -248,7 +248,7 @@ /obj/machinery/atmospherics/trinary/filter/m_filter icon_state = "mmap" - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH|NORTH|EAST obj/machinery/atmospherics/trinary/filter/m_filter/New() diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm index 9432518b539..c63c6208d36 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm @@ -12,7 +12,7 @@ var/set_flow_rate = ATMOS_DEFAULT_VOLUME_MIXER var/list/mixing_inputs - + //for mapping var/node1_concentration = 0.5 var/node2_concentration = 0.5 @@ -71,23 +71,23 @@ /obj/machinery/atmospherics/trinary/mixer/process() ..() - + //For some reason this doesn't work even in initialize(), so it goes here. if (!mixing_inputs) mixing_inputs = list(src.air1 = node1_concentration, src.air2 = node2_concentration) - + if((stat & (NOPOWER|BROKEN)) || !on) update_use_power(0) //usually we get here because a player turned a pump off - definitely want to update. last_flow_rate = 0 return - + //Figure out the amount of moles to transfer var/transfer_moles = (set_flow_rate*mixing_inputs[air1]/air1.volume)*air1.total_moles + (set_flow_rate*mixing_inputs[air1]/air2.volume)*air2.total_moles - + var/power_draw = -1 if (transfer_moles > MINUMUM_MOLES_TO_FILTER) power_draw = mix_gas(src, mixing_inputs, air3, transfer_moles, active_power_usage) - + if(network1 && mixing_inputs[air1]) network1.update = 1 @@ -103,7 +103,7 @@ last_flow_rate = 0 else handle_power_draw(power_draw) - + return 1 /obj/machinery/atmospherics/trinary/mixer/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) @@ -181,7 +181,7 @@ obj/machinery/atmospherics/trinary/mixer/t_mixer icon_state = "tmap" - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH|EAST|WEST //node 3 is the outlet, nodes 1 & 2 are intakes @@ -227,7 +227,7 @@ obj/machinery/atmospherics/trinary/mixer/t_mixer/initialize() obj/machinery/atmospherics/trinary/mixer/m_mixer icon_state = "mmap" - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH|NORTH|EAST //node 3 is the outlet, nodes 1 & 2 are intakes diff --git a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm index ce3aafc9536..822c9a4d6dc 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm @@ -1,5 +1,5 @@ obj/machinery/atmospherics/trinary - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH|NORTH|WEST use_power = 1 diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm index 4d931bd3249..39ca1e25fd8 100644 --- a/code/ATMOSPHERICS/components/tvalve.dm +++ b/code/ATMOSPHERICS/components/tvalve.dm @@ -6,7 +6,7 @@ desc = "A pipe valve" level = 1 - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH|NORTH|WEST var/state = 0 // 0 = go straight, 1 = go to side diff --git a/code/ATMOSPHERICS/components/unary/oxygen_generator.dm b/code/ATMOSPHERICS/components/unary/oxygen_generator.dm index c3ccdbc574b..14bbb46bbaa 100644 --- a/code/ATMOSPHERICS/components/unary/oxygen_generator.dm +++ b/code/ATMOSPHERICS/components/unary/oxygen_generator.dm @@ -6,7 +6,7 @@ obj/machinery/atmospherics/unary/oxygen_generator name = "Oxygen Generator" desc = "" - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH var/on = 0 diff --git a/code/ATMOSPHERICS/components/unary/unary_base.dm b/code/ATMOSPHERICS/components/unary/unary_base.dm index 8d850cc74fa..8af26e51eb3 100644 --- a/code/ATMOSPHERICS/components/unary/unary_base.dm +++ b/code/ATMOSPHERICS/components/unary/unary_base.dm @@ -1,5 +1,5 @@ /obj/machinery/atmospherics/unary - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH //layer = TURF_LAYER+0.1 diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm index 4633c06511f..036ed920316 100644 --- a/code/ATMOSPHERICS/components/valve.dm +++ b/code/ATMOSPHERICS/components/valve.dm @@ -6,7 +6,7 @@ desc = "A pipe valve" level = 1 - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH|NORTH var/open = 0 @@ -316,4 +316,8 @@ "\blue You have unfastened \the [src].", \ "You hear ratchet.") new /obj/item/pipe(loc, make_from=src) - del(src) \ No newline at end of file + del(src) + +/obj/machinery/atmospherics/valve/examine(mob/user) + ..() + user << "It is [open ? "open" : "closed"]." diff --git a/code/ATMOSPHERICS/mainspipe.dm b/code/ATMOSPHERICS/mainspipe.dm index ce23f7bfba3..d70d2bc53e5 100644 --- a/code/ATMOSPHERICS/mainspipe.dm +++ b/code/ATMOSPHERICS/mainspipe.dm @@ -37,7 +37,7 @@ obj/machinery/atmospherics/mains_pipe layer = 2.4 //under wires with their 2.5 force = 20 - + var/volume = 0 var/alert_pressure = 80*ONE_ATMOSPHERE @@ -115,7 +115,7 @@ obj/machinery/atmospherics/mains_pipe/simple name = "mains pipe" desc = "A one meter section of 3-line mains pipe" - set_dir(SOUTH) + dir = SOUTH initialize_mains_directions = SOUTH|NORTH New() @@ -196,7 +196,7 @@ obj/machinery/atmospherics/mains_pipe/manifold name = "manifold pipe" desc = "A manifold composed of mains pipes" - set_dir(SOUTH) + dir = SOUTH initialize_mains_directions = EAST|NORTH|WEST volume = 105 @@ -261,7 +261,7 @@ obj/machinery/atmospherics/mains_pipe/manifold4w name = "manifold pipe" desc = "A manifold composed of mains pipes" - set_dir(SOUTH) + dir = SOUTH initialize_mains_directions = EAST|NORTH|WEST|SOUTH volume = 105 @@ -504,7 +504,7 @@ obj/machinery/atmospherics/mains_pipe/cap name = "pipe cap" desc = "A cap for the end of a mains pipe" - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH volume = 35 @@ -546,7 +546,7 @@ obj/machinery/atmospherics/mains_pipe/valve var/open = 1 - set_dir(SOUTH) + dir = SOUTH initialize_mains_directions = SOUTH|NORTH New() diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index 037d39218ae..34ece52777a 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -143,7 +143,7 @@ volume = ATMOS_DEFAULT_VOLUME_PIPE - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH|NORTH var/obj/machinery/atmospherics/node1 @@ -406,7 +406,7 @@ volume = ATMOS_DEFAULT_VOLUME_PIPE * 1.5 - set_dir(SOUTH) + dir = SOUTH initialize_directions = EAST|NORTH|WEST var/obj/machinery/atmospherics/node1 @@ -658,7 +658,7 @@ volume = ATMOS_DEFAULT_VOLUME_PIPE * 2 - set_dir(SOUTH) + dir = SOUTH initialize_directions = NORTH|SOUTH|EAST|WEST var/obj/machinery/atmospherics/node1 @@ -918,7 +918,7 @@ volume = 35 - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH var/obj/machinery/atmospherics/node @@ -1042,7 +1042,7 @@ var/start_pressure = 25*ONE_ATMOSPHERE level = 1 - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH density = 1 @@ -1220,7 +1220,7 @@ volume = 250 - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH var/build_killswitch = 1 diff --git a/code/TriDimension/Pipes.dm b/code/TriDimension/Pipes.dm index 4f38444e988..776716f567a 100644 --- a/code/TriDimension/Pipes.dm +++ b/code/TriDimension/Pipes.dm @@ -10,7 +10,7 @@ obj/machinery/atmospherics/pipe/zpipe volume = 70 - set_dir(SOUTH) + dir = SOUTH initialize_directions = SOUTH var/obj/machinery/atmospherics/node1 //connection on the same Z diff --git a/code/WorkInProgress/Chinsky/overmap/ships/computers/shuttle.dm b/code/WorkInProgress/Chinsky/overmap/ships/computers/shuttle.dm index 4ebc9469da3..dbfa94043ec 100644 --- a/code/WorkInProgress/Chinsky/overmap/ships/computers/shuttle.dm +++ b/code/WorkInProgress/Chinsky/overmap/ships/computers/shuttle.dm @@ -83,7 +83,7 @@ shuttle_status = "Standing-by at station." else shuttle_status = "Standing-by at offsite location." - if(WAIT_LAUNCH) + if(WAIT_LAUNCH, FORCE_LAUNCH) shuttle_status = "Shuttle has recieved command and will depart shortly." if(WAIT_ARRIVE) shuttle_status = "Proceeding to destination." diff --git a/code/WorkInProgress/computer3/component.dm b/code/WorkInProgress/computer3/component.dm index 18cf2de1c76..f484e04c645 100644 --- a/code/WorkInProgress/computer3/component.dm +++ b/code/WorkInProgress/computer3/component.dm @@ -215,9 +215,12 @@ if(reader) reader.loc = loc if(istype(L) && !L.get_active_hand()) - L.put_in_hands(reader) + if(istype(L,/mob/living/carbon/human)) + L.put_in_hands(reader) + else + reader.loc = get_turf(computer) else - reader.loc = computer.loc + reader.loc = get_turf(computer) reader = null return 1 return 0 @@ -226,16 +229,16 @@ if(writer && dualslot) writer.loc = loc if(istype(L) && !L.get_active_hand()) - L.put_in_hands(writer) + if(istype(L,/mob/living/carbon/human)) + L.put_in_hands(writer) + else + writer.loc = get_turf(computer) else - writer.loc = computer.loc + writer.loc = get_turf(computer) writer = null return 1 return 0 - - - // Authorizes the user based on the computer's requirements proc/authenticate() return computer.check_access(reader) diff --git a/code/WorkInProgress/computer3/computers/camera.dm b/code/WorkInProgress/computer3/computers/camera.dm index 193070ce3e3..b3a0c7fcfa7 100644 --- a/code/WorkInProgress/computer3/computers/camera.dm +++ b/code/WorkInProgress/computer3/computers/camera.dm @@ -147,7 +147,7 @@ if(temp.len) L.Add(C) - //camera_sort(L) + camera_sort(L) return L verify_machine(var/obj/machinery/camera/C,var/datum/file/camnet_key/key = null) diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 8bde73c238e..c16aac30f7f 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -26,7 +26,7 @@ var/global/list/language_keys[0] //table of say codes for all languages var/global/list/whitelisted_species = list("Human") // Posters -var/global/list/datum/poster/poster_designs = typesof(/datum/poster) - /datum/poster +var/global/list/poster_designs = list() // Uplinks var/list/obj/item/device/uplink/world_uplinks = list() @@ -106,9 +106,10 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al for (var/language_name in all_languages) var/datum/language/L = all_languages[language_name] - language_keys[":[lowertext(L.key)]"] = L - language_keys[".[lowertext(L.key)]"] = L - language_keys["#[lowertext(L.key)]"] = L + if(!(L.flags & NONGLOBAL)) + language_keys[":[lowertext(L.key)]"] = L + language_keys[".[lowertext(L.key)]"] = L + language_keys["#[lowertext(L.key)]"] = L var/rkey = 0 paths = typesof(/datum/species)-/datum/species @@ -121,6 +122,12 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al if(S.flags & IS_WHITELISTED) whitelisted_species += S.name + //Posters + paths = typesof(/datum/poster) - /datum/poster + for(var/T in paths) + var/datum/poster/P = new T + poster_designs += P + return 1 /* // Uncomment to debug chemical reaction list. diff --git a/code/__HELPERS/turfs.dm b/code/__HELPERS/turfs.dm index 57d4b865557..3e26d117b2d 100644 --- a/code/__HELPERS/turfs.dm +++ b/code/__HELPERS/turfs.dm @@ -5,3 +5,6 @@ while(mloc && mloc.loc && !istype(mloc.loc, /turf/)) mloc = mloc.loc return mloc + +/proc/iswall(turf/T) + return (istype(T, /turf/simulated/wall) || istype(T, /turf/unsimulated/wall) || istype(T, /turf/simulated/shuttle/wall)) \ No newline at end of file diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index e69ed4b5ddd..3df48454de7 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -794,6 +794,9 @@ client var/new_language = input("Please choose a language to add.","Language",null) as null|anything in all_languages + if(!new_language) + return + if(!H) usr << "Mob doesn't exist anymore" return @@ -817,6 +820,9 @@ client var/datum/language/rem_language = input("Please choose a language to remove.","Language",null) as null|anything in H.languages + if(!rem_language) + return + if(!H) usr << "Mob doesn't exist anymore" return diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 6de75c2b9df..79074cfbe68 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -634,4 +634,4 @@ icon = 'icons/obj/stock_parts.dmi' icon_state = "capacitor" desc = "A debug item for research." - origin_tech = "materials=8;programming=8;magnets=8;powerstorage=8;bluespace=8;combat=8;biotech=8;syndicate=8" + origin_tech = "materials=8;programming=8;magnets=8;powerstorage=8;bluespace=8;combat=8;biotech=8;syndicate=8;phorontech=8;engineering=8" diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 7f115404b3d..3f7ddbceb2a 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -1040,6 +1040,7 @@ var/list/ghostteleportlocs = list() /area/holodeck/source_space name = "\improper Holodeck - Space" + has_gravity = 0 diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index 1f7b8a6510c..e1ce51997d4 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -161,7 +161,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" var/text = "The changelings were:" for(var/datum/mind/changeling in changelings) var/changelingwin = changeling.current - text += printplayer(changeling) + text += print_player_full(changeling) //Removed sanity if(changeling) because we -want- a runtime to inform us that the changelings list is incorrect and needs to be fixed. text += "
Changeling ID: [changeling.changeling.changelingID]." diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index 0309eccee0b..d353c77ad06 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -457,7 +457,7 @@ changeling.chem_charges -= 20 // restore us to health - C.rejuvenate() + C.revive() // remove our fake death flag C.status_flags &= ~(FAKEDEATH) diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index e6e70ff35f7..4c4226e4ea2 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -334,7 +334,7 @@ if( cult.len || (ticker && istype(ticker.mode,/datum/game_mode/cult)) ) var/text = "The cultists were:" for(var/datum/mind/cultist in cult) - text += printplayer(cultist) + text += print_player_full(cultist) text += "
" world << text diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index aeafddb0152..88e16dbe46b 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -414,12 +414,12 @@ var/list/sacrificed = list() else ticker.mode.cult+=D.mind - D.mind.assigned_role = pick("Anguished", "Blasphemous", "Corrupt", "Cruel", "Depraved", "Despicable", "Disturbed", "Exacerbated", "Foul", "Hateful", "Inexorable", "Implacable", "Impure", "Malevolent", "Malignant", "Malicious", "Pained", "Profane", "Profligate", "Relentless", "Resentful", "Restless", "Spiteful", "Tormented", "Unclean", "Unforgiving", "Vengeful", "Vindictive", "Wicked", "Wronged") - D.mind.assigned_role += " " - D.mind.assigned_role += pick("Apparition", "Aptrgangr", "Dis", "Draugr", "Dybbuk", "Eidolon", "Fetch", "Fylgja", "Ghast", "Ghost", "Gjenganger", "Haint", "Phantom", "Phantasm", "Poltergeist", "Revenant", "Shade", "Shadow", "Soul", "Spectre", "Spirit", "Spook", "Visitant", "Wraith") + D.mind.assigned_role = "Manifest Ghost" D.mind.special_role = "Cultist" if(!chose_name) - D.real_name = D.mind.assigned_role + D.real_name = pick("Anguished", "Blasphemous", "Corrupt", "Cruel", "Depraved", "Despicable", "Disturbed", "Exacerbated", "Foul", "Hateful", "Inexorable", "Implacable", "Impure", "Malevolent", "Malignant", "Malicious", "Pained", "Profane", "Profligate", "Relentless", "Resentful", "Restless", "Spiteful", "Tormented", "Unclean", "Unforgiving", "Vengeful", "Vindictive", "Wicked", "Wronged") + D.real_name += " " + D.real_name += pick("Apparition", "Aptrgangr", "Dis", "Draugr", "Dybbuk", "Eidolon", "Fetch", "Fylgja", "Ghast", "Ghost", "Gjenganger", "Haint", "Phantom", "Phantasm", "Poltergeist", "Revenant", "Shade", "Shadow", "Soul", "Spectre", "Spirit", "Spook", "Visitant", "Wraith") D << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." D << "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back." diff --git a/code/game/gamemodes/cult/talisman.dm b/code/game/gamemodes/cult/talisman.dm index 52f1ff6286e..0f5ab245d1f 100644 --- a/code/game/gamemodes/cult/talisman.dm +++ b/code/game/gamemodes/cult/talisman.dm @@ -2,7 +2,7 @@ icon_state = "paper_talisman" var/imbue = null var/uses = 0 - info = "

" + info = "


" attack_self(mob/living/user as mob) if(iscultist(user)) diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm index 1bf2406db5b..3dac9f21488 100644 --- a/code/game/gamemodes/events/space_ninja.dm +++ b/code/game/gamemodes/events/space_ninja.dm @@ -531,20 +531,31 @@ As such, it's hard-coded for now. No reason for it not to be, really. else 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/mask/gas/voice/space_ninja(src), slot_wear_mask) + equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_belt) + var/obj/item/weapon/rig/light/ninja/ninjasuit = new(src) // Make sure the ninja can actually equip the suit. if(src.dna && src.dna.unique_enzymes) - src << "Suit hardware locked to your DNA hash." ninjasuit.locked_dna = src.dna.unique_enzymes + spawn(10) + src << "Suit hardware locked to your DNA hash." else ninjasuit.req_access = list() equip_to_slot_or_del(ninjasuit,slot_back) + + if(istype(wear_suit,/obj/item/weapon/rig)) + var/obj/item/weapon/rig/rig = wear_suit + if(rig.air_supply) + internal = rig.air_supply + if(!internal && s_store) + internal = s_store + if(internal) + internals.icon_state = "internal1" + spawn(10) ninjasuit.toggle_seals(src,1) - equip_to_slot_or_del(new /obj/item/clothing/mask/gas/voice/space_ninja(src), slot_wear_mask) - equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_belt) - equip_to_slot_or_del(new /obj/item/weapon/tank/oxygen(src), slot_s_store) - return 1 + return 1 \ No newline at end of file diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 12d9278205a..68bf3935d86 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -155,7 +155,7 @@ for(var/mob/M in player_list) if(M.mind) - pltext += printplayer(M.mind) + pltext += print_player_lite(M.mind) if(M.client) clients++ if(ishuman(M)) @@ -183,7 +183,7 @@ if(isobserver(M)) ghosts++ - var/text = "A round of [src.name] has ended." + var/text = "" if(surviving_total > 0) text += "
There [surviving_total>1 ? "were [surviving_total] survivors" : "was one survivor"]" text += " ([escaped_total>0 ? escaped_total : "none"] [emergency_shuttle.evac ? "escaped" : "transferred"]) and [ghosts] ghosts.
" @@ -526,7 +526,7 @@ proc/get_nt_opposed() player.current << "Objective #[obj_count]: [objective.explanation_text]" obj_count++ -/datum/game_mode/proc/printplayer(var/datum/mind/ply) +/datum/game_mode/proc/print_player_lite(var/datum/mind/ply) var/role = ply.assigned_role == "MODE" ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]" var/text = "
[ply.name] ([ply.key]) as \a [role] (" if(ply.current) @@ -540,6 +540,11 @@ proc/get_nt_opposed() text += "body destroyed" text += ")" + return text + +/datum/game_mode/proc/print_player_full(var/datum/mind/ply) + var/text = print_player_lite(ply) + var/TC_uses = 0 var/uplink_true = 0 var/purchases = "" @@ -547,9 +552,15 @@ proc/get_nt_opposed() if(H && H.uplink_owner && H.uplink_owner == ply) TC_uses += H.used_TC uplink_true = 1 - for(var/log in H.purchase_log) - purchases += "[log]" + var/list/refined_log = new() + for(var/datum/uplink_item/UI in H.purchase_log) + var/obj/I = new UI.path + refined_log.Add("[H.purchase_log[UI]]x\icon[I][I.name]") + del(I) + purchases = english_list(refined_log, nothing_text = "") if(uplink_true) - text += " (used [TC_uses] TC) [purchases]" + text += " (used [TC_uses] TC)" + if(purchases) + text += "
[purchases]" return text diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index d4d14c9120e..6f782176493 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -376,7 +376,7 @@ var/global/datum/controller/gameticker/ticker /datum/controller/gameticker/proc/declare_completion() - world << "


The round has ended." + world << "


A round of [mode.name] has ended!

" for(var/mob/Player in player_list) if(Player.mind && !isnewplayer(Player)) if(Player.stat != DEAD) diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 980b7862003..8fd46fc8970 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -313,7 +313,7 @@ var/global/list/turf/synd_spawn = list() var/text = "The mercenaries were:" for(var/datum/mind/syndicate in syndicates) - text += printplayer(syndicate) + text += print_player_full(syndicate) world << text return 1 diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 7ac8ffd671f..2e0f8b91fa3 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -180,7 +180,7 @@ var/text = "The traitors were:" for(var/datum/mind/traitor in traitors) var/traitorwin = 1 - text += printplayer(traitor) + text += print_player_full(traitor) if(traitor.objectives.len)//If the traitor had no objectives, don't need to process this. var/count = 1 diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index 085ca17a80b..a63363f779c 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -27,16 +27,14 @@ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_medical_officer(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/device/pda/heads/cmo(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/cmo(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand) - H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store) if(H.backbag == 1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) else H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) return 1 - - + H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/cmo(H), slot_wear_suit) + H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store) /datum/job/doctor title = "Medical Doctor" @@ -54,6 +52,8 @@ equip(var/mob/living/carbon/human/H) if(!H) return 0 H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear) + H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes) + H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back) @@ -68,8 +68,8 @@ H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/head/surgery/blue(H), slot_head) if("Virologist") - H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/virologist(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform) + H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/virologist(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(H), slot_wear_mask) switch(H.backbag) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/virology(H), slot_back) @@ -90,14 +90,12 @@ else H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit) - H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes) - H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand) - H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store) if(H.backbag == 1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) else H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) + H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt) + H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store) return 1 @@ -123,13 +121,13 @@ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chemist(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/chemist(H), slot_wear_suit) switch(H.backbag) if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/chemistry(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_chem(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) + H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/chemist(H), slot_wear_suit) return 1 @@ -153,48 +151,15 @@ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/geneticist(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/genetics(H), slot_wear_suit) - H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store) switch(H.backbag) if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/genetics(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_gen(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) - return 1 - -/*/datum/job/virologist - title = "Virologist" - flag = VIROLOGIST - department_flag = MEDSCI - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the chief medical officer" - selection_color = "#ffeef0" - access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics) - minimal_access = list(access_medical, access_virology) - alt_titles = list("Pathologist","Microbiologist") - - - equip(var/mob/living/carbon/human/H) - if(!H) return 0 - H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear) - switch(H.backbag) - if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back) - if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back) - if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) - H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform) - H.equip_to_slot_or_del(new /obj/item/device/pda/viro(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(H), slot_wear_mask) - H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/virologist(H), slot_wear_suit) + H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/genetics(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store) - if(H.backbag == 1) - H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) - else - H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) - return 1*/ + return 1 /datum/job/psychiatrist title = "Psychiatrist" @@ -224,10 +189,10 @@ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych/turtleneck(H), slot_w_uniform) else H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt) if(H.backbag == 1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) else H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) + H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit) diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm index b18e8b8ec16..e387e0d4be0 100644 --- a/code/game/jobs/job/science.dm +++ b/code/game/jobs/job/science.dm @@ -25,7 +25,6 @@ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/research_director(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand) switch(H.backbag) if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) @@ -33,6 +32,7 @@ if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) + H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit) return 1 @@ -58,13 +58,13 @@ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit) switch(H.backbag) if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) + H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit) return 1 @@ -89,16 +89,15 @@ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit) switch(H.backbag) if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back) if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back) if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) + H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit) return 1 - /datum/job/roboticist title = "Roboticist" flag = ROBOTICIST @@ -122,11 +121,10 @@ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/roboticist(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/device/pda/roboticist(H), slot_belt) - H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit) -// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves) H.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(H), slot_l_hand) if(H.backbag == 1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) else H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) - return 1 + H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit) + return 1 \ No newline at end of file diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index cc0628c2849..6d25f7fe58b 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -106,17 +106,8 @@ H.equip_to_slot_or_del(new /obj/item/clothing/under/det(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/device/pda/detective(H), slot_belt) -/* var/obj/item/clothing/mask/cigarette/CIG = new /obj/item/clothing/mask/cigarette(H) - CIG.light("") - H.equip_to_slot_or_del(CIG, slot_wear_mask) */ H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves) - if(H.mind.role_alt_title && H.mind.role_alt_title == "Forensic Technician") - H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/forensics/blue(H), slot_wear_suit) - else - H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/det_suit(H), slot_wear_suit) - H.equip_to_slot_or_del(new /obj/item/clothing/head/det_hat(H), slot_head) H.equip_to_slot_or_del(new /obj/item/weapon/flame/lighter/zippo(H), slot_l_store) - if(H.backbag == 1)//Why cant some of these things spawn in his office? H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_l_hand) @@ -125,7 +116,11 @@ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack) H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack) - + if(H.mind.role_alt_title && H.mind.role_alt_title == "Forensic Technician") + H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/forensics/blue(H), slot_wear_suit) + else + H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/det_suit(H), slot_wear_suit) + H.equip_to_slot_or_del(new /obj/item/clothing/head/det_hat(H), slot_head) return 1 diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 326f705a5da..b3918713e79 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -379,16 +379,17 @@ var/global/datum/controller/occupations/job_master continue if(G.slot && !(G.slot in custom_equip_slots)) - if(H.equip_to_slot_or_del(new G.path(H), G.slot)) + // This is a miserable way to fix the loadout overwrite bug, but the alternative requires + // adding an arg to a bunch of different procs. Will look into it after this merge. ~ Z + if(G.slot == slot_wear_mask || G.slot == slot_wear_suit || G.slot == slot_head) + custom_equip_leftovers += thing + else if(H.equip_to_slot_or_del(new G.path(H), G.slot)) H << "\blue Equipping you with [thing]!" custom_equip_slots.Add(G.slot) else custom_equip_leftovers.Add(thing) - else spawn_in_storage += thing - - //Equip job items. job.equip(H) job.apply_fingerprints(H) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index e70875941e6..6f9a2c4b959 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -31,7 +31,7 @@ var/dat = "

Autolathe Control Panel


" - if(!panel_open) + if(panel_open == 0) dat += "" var/material_top = "" var/material_bottom = "" @@ -48,41 +48,36 @@ index++ if(R.hidden && !hacked || (show_category != "All" && show_category != R.category)) continue + var/can_make = 1 + var/material_string = "" + var/multiplier_string = "" + var/max_sheets + var/comma + if(!R.resources || !R.resources.len) + material_string = "No resources required." + else + //Make sure it's buildable and list requires resources. + for(var/material in R.resources) + var/sheets = round(stored_material[material]/R.resources[material]) + if(isnull(max_sheets) || max_sheets > sheets) + max_sheets = sheets + if(!isnull(stored_material[material]) && stored_material[material] < R.resources[material]) + can_make = 0 + if(!comma) + comma = 1 + else + material_string += ", " + material_string += "[R.resources[material]] [material]" + material_string += ".
" + //Build list of multipliers for sheets. + if(R.is_stack) + if(max_sheets && max_sheets > 0) + multiplier_string += "
" + for(var/i = 5;i sheets) - max_sheets = sheets - - if(!isnull(stored_material[material]) && stored_material[material] < R.resources[material]) - can_make = 0 - if(!comma) - comma = 1 - else - material_string += ", " - material_string += "[R.resources[material]] [material]" - material_string += ".
" - - //Build list of multipliers for sheets. - if(R.is_stack) - if(max_sheets && max_sheets > 0) - multiplier_string += "
" - for(var/i = 5;i*" : ""][can_make ? "" : ""][R.name][can_make ? "" : ""][R.hidden ? "*" : ""][multiplier_string]
" + dat += "" dat += "
[material_string]
[R.hidden ? "*" : ""][can_make ? "" : ""][R.name][can_make ? "" : ""][R.hidden ? "*" : ""][multiplier_string][material_string]

" //Hacking. diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 984d6816ce4..1c9fe7cfe5a 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -19,11 +19,19 @@ var/global/list/holodeck_programs = list( name = "Holodeck Control Computer" desc = "A computer used to control a nearby holodeck." icon_state = "holocontrol" + + use_power = 1 + active_power_usage = 8000 //8kW for the scenery + 500W per holoitem + var/item_power_usage = 500 + var/area/linkedholodeck = null var/area/target = null var/active = 0 var/list/holographic_items = list() + var/list/holographic_mobs = list() var/damaged = 0 + var/safety_disabled = 0 + var/mob/last_to_emag = null var/last_change = 0 var/list/supported_programs = list( \ "Empty Court" = "emptycourt", \ @@ -38,84 +46,111 @@ var/global/list/holodeck_programs = list( "Theatre" = "theatre", \ "Meeting Hall" = "meetinghall" \ ) - var/list/restricted_programs = list("Atmospheric Burn Simulation" = "burntest", "ildlife Simulation" = "wildlifecarp") + var/list/restricted_programs = list("Atmospheric Burn Simulation" = "burntest", "Wildlife Simulation" = "wildlifecarp") - attack_ai(var/mob/user as mob) - return src.attack_hand(user) +/obj/machinery/computer/HolodeckControl/attack_ai(var/mob/user as mob) + return src.attack_hand(user) - attack_hand(var/mob/user as mob) +/obj/machinery/computer/HolodeckControl/attack_hand(var/mob/user as mob) - if(..()) - return - user.set_machine(src) - var/dat + if(..()) + return + user.set_machine(src) + var/dat - dat += "Holodeck Control System
" - dat += "
Current Loaded Programs:
" - for(var/prog in supported_programs) - dat += "(([prog]))
" + dat += "Holodeck Control System
" + dat += "
Current Loaded Programs:
" + for(var/prog in supported_programs) + dat += "(([prog]))
" - dat += "Please ensure that only holographic weapons are used in the holodeck if a combat simulation has been loaded.
" + dat += "Please ensure that only holographic weapons are used in the holodeck if a combat simulation has been loaded.
" - if(issilicon(user)) - if(emagged) - dat += "(Re-Enable Safety Protocols?)
" + if(issilicon(user)) + if(safety_disabled) + if (emagged) + dat += "ERROR: Cannot re-enable Safety Protocols.
" else - dat += "(Override Safety Protocols?)
" - - if(emagged) - for(var/prog in restricted_programs) - dat += "(Begin [prog])
" - dat += "Ensure the holodeck is empty before testing.
" - dat += "
" - dat += "Safety Protocols are DISABLED
" + dat += "(Re-Enable Safety Protocols?)
" else - dat += "Safety Protocols are ENABLED
" + dat += "(Override Safety Protocols?)
" - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") + if(safety_disabled) + for(var/prog in restricted_programs) + dat += "(Begin [prog])
" + dat += "Ensure the holodeck is empty before testing.
" + dat += "
" + dat += "Safety Protocols are DISABLED
" + else + dat += "Safety Protocols are ENABLED
" + user << browse(dat, "window=computer;size=400x500") + onclose(user, "computer") + + return + + +/obj/machinery/computer/HolodeckControl/Topic(href, href_list) + if(..()) return + if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) + usr.set_machine(src) + if(href_list["program"]) + var/prog = href_list["program"] + if(prog in holodeck_programs) + target = locate(holodeck_programs[prog]) + if(target) + loadProgram(target) - Topic(href, href_list) - if(..()) - return - if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - usr.set_machine(src) + else if(href_list["AIoverride"]) + if(!issilicon(usr)) + return + + if(safety_disabled && emagged) + return //if a traitor has gone through the trouble to emag the thing, let them keep it. + + safety_disabled = !safety_disabled + update_projections() + if(safety_disabled) + message_admins("[key_name_admin(usr)] overrode the holodeck's safeties") + log_game("[key_name(usr)] overrided the holodeck's safeties") + else + message_admins("[key_name_admin(usr)] restored the holodeck's safeties") + log_game("[key_name(usr)] restored the holodeck's safeties") - if(href_list["program"]) - var/prog = href_list["program"] - if(prog in holodeck_programs) - target = locate(holodeck_programs[prog]) - if(target) - loadProgram(target) - - else if(href_list["AIoverride"]) - if(!issilicon(usr)) return - emagged = !emagged - if(emagged) - message_admins("[key_name_admin(usr)] overrode the holodeck's safeties") - log_game("[key_name(usr)] overrided the holodeck's safeties") - else - message_admins("[key_name_admin(usr)] restored the holodeck's safeties") - log_game("[key_name(usr)] restored the holodeck's safeties") - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - - -/obj/machinery/computer/HolodeckControl/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob) - if(istype(D, /obj/item/weapon/card/emag) && !emagged) - playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) - emagged = 1 - user << "\blue You vastly increase projector power and override the safety and security protocols." - user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator." - log_game("[key_name(usr)] emagged the Holodeck Control Computer") + src.add_fingerprint(usr) src.updateUsrDialog() return +/obj/machinery/computer/HolodeckControl/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob) + if(istype(D, /obj/item/weapon/card/emag)) + playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) + last_to_emag = user //emag again to change the owner + if (!emagged) + emagged = 1 + safety_disabled = 1 + update_projections() + user << "You vastly increase projector power and override the safety and security protocols." + user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator." + log_game("[key_name(usr)] emagged the Holodeck Control Computer") + src.updateUsrDialog() + return + +/obj/machinery/computer/HolodeckControl/proc/update_projections() + if (safety_disabled) + item_power_usage = 2500 + for(var/obj/item/weapon/holo/esword/H in linkedholodeck) + H.damtype = BRUTE + else + item_power_usage = initial(item_power_usage) + for(var/obj/item/weapon/holo/esword/H in linkedholodeck) + H.damtype = initial(H.damtype) + + for(var/mob/living/simple_animal/hostile/carp/holodeck/C in holographic_mobs) + C.set_safety(!safety_disabled) + if (last_to_emag) + C.friends = list(last_to_emag) + /obj/machinery/computer/HolodeckControl/New() ..() linkedholodeck = locate(/area/holodeck/alphadeck) @@ -148,14 +183,27 @@ var/global/list/holodeck_programs = list( emergencyShutdown() ..() +/obj/machinery/computer/HolodeckControl/power_change() + var/oldstat + ..() + if (stat != oldstat && active && (stat & NOPOWER)) + emergencyShutdown() + /obj/machinery/computer/HolodeckControl/process() for(var/item in holographic_items) // do this first, to make sure people don't take items out when power is down. if(!(get_turf(item) in linkedholodeck)) derez(item, 0) - + + if (!safety_disabled) + for(var/mob/living/simple_animal/hostile/carp/holodeck/C in holographic_mobs) + if (get_area(C.loc) != linkedholodeck) + holographic_mobs -= C + C.derez() + if(!..()) return if(active) + use_power(item_power_usage * (holographic_items.len + holographic_mobs.len)) if(!checkInteg(linkedholodeck)) damaged = 1 @@ -163,6 +211,7 @@ var/global/list/holodeck_programs = list( if(target) loadProgram(target) active = 0 + use_power = 1 for(var/mob/M in range(10,src)) M.show_message("The holodeck overloads!") @@ -199,6 +248,7 @@ var/global/list/holodeck_programs = list( return 1 +//Why is it called toggle if it doesn't toggle? /obj/machinery/computer/HolodeckControl/proc/togglePower(var/toggleOn = 0) if(toggleOn) @@ -218,12 +268,14 @@ var/global/list/holodeck_programs = list( T.hotspot_expose(50000,50000,1) active = 1 + use_power = 2 else for(var/item in holographic_items) derez(item) var/area/targetsource = locate(/area/holodeck/source_plating) targetsource.copy_contents_to(linkedholodeck , 1) active = 0 + use_power = 1 /obj/machinery/computer/HolodeckControl/proc/loadProgram(var/area/A) @@ -238,22 +290,20 @@ var/global/list/holodeck_programs = list( last_change = world.time active = 1 + use_power = 2 for(var/item in holographic_items) derez(item) + for(var/mob/living/simple_animal/hostile/carp/holodeck/C in holographic_mobs) + holographic_mobs -= C + C.derez() + for(var/obj/effect/decal/cleanable/blood/B in linkedholodeck) del(B) - for(var/mob/living/simple_animal/hostile/carp/C in linkedholodeck) - del(C) - holographic_items = A.copy_contents_to(linkedholodeck , 1) - if(emagged) - for(var/obj/item/weapon/holo/esword/H in linkedholodeck) - H.damtype = BRUTE - spawn(30) for(var/obj/effect/landmark/L in linkedholodeck) if(L.name=="Atmospheric Test Start") @@ -266,13 +316,22 @@ var/global/list/holodeck_programs = list( T.temperature = 5000 T.hotspot_expose(50000,50000,1) if(L.name=="Holocarp Spawn") - new /mob/living/simple_animal/hostile/carp(L.loc) + holographic_mobs += new /mob/living/simple_animal/hostile/carp/holodeck(L.loc) + + if(L.name=="Holocarp Spawn Random") + if (prob(4)) //With 4 spawn points, carp should only appear 15% of the time. + holographic_mobs += new /mob/living/simple_animal/hostile/carp/holodeck(L.loc) + + update_projections() /obj/machinery/computer/HolodeckControl/proc/emergencyShutdown() //Get rid of any items for(var/item in holographic_items) derez(item) + for(var/mob/living/simple_animal/hostile/carp/holodeck/C in holographic_mobs) + holographic_mobs -= C + C.derez() //Turn it back to the regular non-holographic room target = locate(/area/holodeck/source_plating) if(target) @@ -281,6 +340,7 @@ var/global/list/holodeck_programs = list( var/area/targetsource = locate(/area/holodeck/source_plating) targetsource.copy_contents_to(linkedholodeck , 1) active = 0 + use_power = 1 @@ -327,17 +387,6 @@ var/global/list/holodeck_programs = list( /obj/structure/table/holotable/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2) - var/obj/item/weapon/grab/G = W - if(G.state<2) - user << "\red You need a better grip to do that!" - return - G.affecting.loc = src.loc - G.affecting.Weaken(5) - visible_message("\red [G.assailant] puts [G.affecting] on the table.") - del(W) - return - if (istype(W, /obj/item/weapon/wrench)) user << "It's a holotable! There are no bolts!" return @@ -424,13 +473,13 @@ var/global/list/holodeck_programs = list( icon_state = "sword[item_color]" w_class = 4 playsound(user, 'sound/weapons/saberon.ogg', 50, 1) - user << "\blue [src] is now active." + user << "[src] is now active." else force = 3 icon_state = "sword0" w_class = 2 playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) - user << "\blue [src] can now be concealed." + user << "[src] can now be concealed." if(istype(user,/mob/living/carbon/human)) var/mob/living/carbon/human/H = user @@ -463,16 +512,16 @@ var/global/list/holodeck_programs = list( if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2) var/obj/item/weapon/grab/G = W if(G.state<2) - user << "\red You need a better grip to do that!" + user << "You need a better grip to do that!" return G.affecting.loc = src.loc G.affecting.Weaken(5) - visible_message("\red [G.assailant] dunks [G.affecting] into the [src]!", 3) + visible_message("[G.assailant] dunks [G.affecting] into the [src]!", 3) del(W) return else if (istype(W, /obj/item) && get_dist(src,user)<2) user.drop_item(src) - visible_message("\blue [user] dunks [W] into the [src]!", 3) + visible_message("[user] dunks [W] into the [src]!", 3) return /obj/structure/holohoop/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) @@ -482,9 +531,9 @@ var/global/list/holodeck_programs = list( return if(prob(50)) I.loc = src.loc - visible_message("\blue Swish! \the [I] lands in \the [src].", 3) + visible_message("Swish! \the [I] lands in \the [src].", 3) else - visible_message("\red \the [I] bounces off of \the [src]'s rim!", 3) + visible_message("\The [I] bounces off of \the [src]'s rim!", 3) return 0 else return ..(mover, target, height, air_group) @@ -577,4 +626,40 @@ var/global/list/holodeck_programs = list( /obj/structure/rack/holorack/attackby(obj/item/weapon/W as obj, mob/user as mob) if (istype(W, /obj/item/weapon/wrench)) user << "It's a holorack! You can't unwrench it!" - return \ No newline at end of file + return + +//Holocarp + +/mob/living/simple_animal/hostile/carp/holodeck + icon = 'icons/mob/AI.dmi' + icon_state = "holo4" + icon_living = "holo4" + icon_dead = "holo4" + icon_gib = null + meat_amount = 0 + meat_type = null + +/mob/living/simple_animal/hostile/carp/holodeck/proc/set_safety(var/safe) + if (safe) + faction = "neutral" + melee_damage_lower = 0 + melee_damage_upper = 0 + wall_smash = 0 + destroy_surroundings = 0 + else + faction = "carp" + melee_damage_lower = initial(melee_damage_lower) + melee_damage_upper = initial(melee_damage_upper) + wall_smash = initial(wall_smash) + destroy_surroundings = initial(destroy_surroundings) + +/mob/living/simple_animal/hostile/carp/holodeck/gib() + derez() //holograms can't gib + +/mob/living/simple_animal/hostile/carp/holodeck/death() + ..() + derez() + +/mob/living/simple_animal/hostile/carp/holodeck/proc/derez() + visible_message("\The [src] fades away!") + del(src) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 4342778f9af..76d1e0fb939 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -40,13 +40,13 @@ if(scan) usr << "You remove \the [scan] from \the [src]." scan.loc = get_turf(src) - if(!usr.get_active_hand()) + if(!usr.get_active_hand() && istype(usr,/mob/living/carbon/human)) usr.put_in_hands(scan) scan = null else if(modify) usr << "You remove \the [modify] from \the [src]." modify.loc = get_turf(src) - if(!usr.get_active_hand()) + if(!usr.get_active_hand() && istype(usr,/mob/living/carbon/human)) usr.put_in_hands(modify) modify = null else diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index a03edba52ad..1a7a8ea33a2 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -26,7 +26,7 @@ if(scan) usr << "You remove \the [scan] from \the [src]." scan.loc = get_turf(src) - if(!usr.get_active_hand()) + if(!usr.get_active_hand() && istype(usr,/mob/living/carbon/human)) usr.put_in_hands(scan) scan = null else diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index e97d9f6865d..5aed27cc564 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -32,7 +32,7 @@ if(scan) usr << "You remove \the [scan] from \the [src]." scan.loc = get_turf(src) - if(!usr.get_active_hand()) + if(!usr.get_active_hand() && istype(usr,/mob/living/carbon/human)) usr.put_in_hands(scan) scan = null else diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index c2a6d996a1e..d1e3887e4b9 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -15,6 +15,7 @@ icon = 'icons/obj/Cryogenic2.dmi' icon_state = "cellconsole" circuit = "/obj/item/weapon/circuitboard/cryopodcontrol" + density = 0 interact_offline = 1 var/mode = null diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index de38264cd3d..c3ab77d74a1 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -31,7 +31,7 @@ var/hitsound = 'sound/weapons/smash.ogg' //sound door makes when hit with a weapon //Multi-tile doors - set_dir(EAST) + dir = EAST var/width = 1 /obj/machinery/door/New() diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 66708db7f7b..dc98e0ce7e9 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -81,13 +81,17 @@ var/const/HOLOPAD_MODE = 0 /*This is the proc for special two-way communication between AI and holopad/people talking near holopad. For the other part of the code, check silicon say.dm. Particularly robot talk.*/ -/obj/machinery/hologram/holopad/hear_talk(mob/living/M, text, verb) +/obj/machinery/hologram/holopad/hear_talk(mob/living/M, text, verb, datum/language/speaking) if(M&&hologram&&master)//Master is mostly a safety in case lag hits or something. - if(!master.say_understands(M))//The AI will be able to understand most mobs talking through the holopad. + if(!master.say_understands(M, speaking))//The AI will be able to understand most mobs talking through the holopad. text = stars(text) var/name_used = M.GetVoice() //This communication is imperfect because the holopad "filters" voices and is only designed to connect to the master only. - var/rendered = "Holopad received, [name_used] [verb], \"[text]\"" + var/rendered + if(speaking) + rendered = "Holopad received, [name_used] [speaking.format_message(text, verb)]" + else + rendered = "Holopad received, [name_used] [verb], \"[text]\"" master.show_message(rendered, 2) return diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index 4bca09fdcc9..4301d344950 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -34,6 +34,7 @@ datum/track/New(var/title_name, var/audio) /obj/machinery/media/jukebox/Del() StopPlaying() + ..() /obj/machinery/media/jukebox/power_change() if(!powered(power_channel) || !anchored) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 33334ffe04d..8d4d4ac2df2 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -338,6 +338,10 @@ die() //the death process :( /obj/machinery/porta_turret/bullet_act(obj/item/projectile/Proj) + + if(Proj.damage_type == HALLOSS) + return + if(on) if(!attacked && !emagged) attacked = 1 @@ -358,7 +362,7 @@ check_records = prob(50) check_weapons = prob(50) check_access = prob(20) // check_access is a pretty big deal, so it's least likely to get turned on - check_anomalies = prob(50) + check_anomalies = prob(50) if(prob(5)) emagged = 1 diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm index 29811e1a18d..cb76c7921a7 100644 --- a/code/game/machinery/turrets.dm +++ b/code/game/machinery/turrets.dm @@ -89,6 +89,8 @@ return /obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj) + if(Proj.damage_type == HALLOSS) + return take_damage(Proj.damage) ..() return @@ -297,6 +299,8 @@ popping = 0 /obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj) + if(Proj.damage_type == HALLOSS) + return src.health -= Proj.damage ..() if(prob(45) && Proj.damage > 0) src.spark_system.start() @@ -376,6 +380,8 @@ bullet_act(var/obj/item/projectile/Proj) + if(Proj.damage_type == HALLOSS) + return take_damage(Proj.damage) ..() return diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 031077d2eab..d964529c02a 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -492,14 +492,17 @@ src.visible_message("The [src.name] armor deflects the projectile") src.log_append_to_last("Armor saved.") return - var/ignore_threshold - if(Proj.flag == "taser") - use_power(200) - return - if(istype(Proj, /obj/item/projectile/beam/pulse)) - ignore_threshold = 1 - src.take_damage(Proj.damage,Proj.flag) - src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),ignore_threshold) + + if(Proj.damage_type == HALLOSS) + use_power(Proj.agony * 5) + + if(!(Proj.nodamage)) + var/ignore_threshold + if(istype(Proj, /obj/item/projectile/beam/pulse)) + ignore_threshold = 1 + src.take_damage(Proj.damage,Proj.flag) + src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),ignore_threshold) + Proj.on_hit(src) return diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm index 68f60816fa7..121c4d16678 100644 --- a/code/game/objects/effects/decals/contraband.dm +++ b/code/game/objects/effects/decals/contraband.dm @@ -23,9 +23,63 @@ name += " - No. [serial_number]" ..(loc) +//Places the poster on a wall +/obj/item/weapon/contraband/poster/afterattack(var/atom/A, var/mob/user, var/adjacent, var/clickparams) + if (!adjacent) + return + + //must place on a wall and user must not be inside a closet/mecha/whatever + var/turf/W = A + if (!iswall(W) || !isturf(user.loc)) + user << "\red You can't place this here!" + return + + var/placement_dir = get_dir(user, W) + if (!(placement_dir in cardinal)) + user << "You must stand directly in front of the wall you wish to place that on." + return + + //just check if there is a poster on or adjacent to the wall + var/stuff_on_wall = 0 + if (locate(/obj/structure/sign/poster) in W) + stuff_on_wall = 1 + + //crude, but will cover most cases. We could do stuff like check pixel_x/y but it's not really worth it. + for (var/dir in cardinal) + var/turf/T = get_step(W, dir) + if (locate(/obj/structure/sign/poster) in T) + stuff_on_wall = 1 + break + + if (stuff_on_wall) + user << "There is already a poster there!" + return + + user << "You start placing the poster on the wall..." //Looks like it's uncluttered enough. Place the poster. + + var/obj/structure/sign/poster/P = new(user.loc, placement_dir=get_dir(user, W), serial=serial_number) + + flick("poster_being_set", P) + //playsound(W, 'sound/items/poster_being_created.ogg', 100, 1) //why the hell does placing a poster make printer sounds? + + var/oldsrc = src //get a reference to src so we can delete it after detaching ourselves + src = null + spawn(17) + if(!P) return + + if(iswall(W) && user && P.loc == user.loc) //Let's check if everything is still there + user << "You place the poster!" + else + P.roll_and_drop(P.loc) + + del(oldsrc) //delete it now to cut down on sanity checks afterwards. Agouri's code supports rerolling it anyway + +//I'm +/obj/structure/sign/poster/proc/placement_check() + //############################## THE ACTUAL DECALS ########################### -obj/structure/sign/poster +/obj/structure/sign/poster name = "poster" desc = "A large piece of space-resistant printed paper. " icon = 'icons/obj/contraband.dmi' @@ -34,22 +88,42 @@ obj/structure/sign/poster var/poster_type //So mappers can specify a desired poster var/ruined = 0 -obj/structure/sign/poster/New(var/serial) - var/designtype - if (poster_type) - designtype = text2path(poster_type) - else - if(serial_number == loc) - serial_number = rand(1, poster_designs.len) //This is for the mappers that want individual posters without having to use rolled posters. - designtype = poster_designs[serial_number] - - var/datum/poster/design=new designtype() - name += " - [design.name]" - desc += " [design.desc]" - icon_state = design.icon_state // poster[serial_number] - ..() +/obj/structure/sign/poster/New(var/newloc, var/placement_dir=null, var/serial=null) + ..(newloc) -obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(!serial) + serial = rand(1, poster_designs.len) //use a random serial if none is given + + serial_number = serial + var/datum/poster/design = poster_designs[serial_number] + set_poster(design) + + switch (placement_dir) + if (NORTH) + pixel_x = 0 + pixel_y = 32 + if (SOUTH) + pixel_x = 0 + pixel_y = -32 + if (EAST) + pixel_x = 32 + pixel_y = 0 + if (WEST) + pixel_x = -32 + pixel_y = 0 + +/obj/structure/sign/poster/initialize() + if (poster_type) + var/path = text2path(poster_type) + var/datum/poster/design = new path + set_poster(design) + +/obj/structure/sign/poster/proc/set_poster(var/datum/poster/design) + name = "[initial(name)] - [design.name]" + desc = "[initial(desc)] [design.desc]" + icon_state = design.icon_state // poster[serial_number] + +/obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/wirecutters)) playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1) if(ruined) diff --git a/code/game/objects/effects/decals/posters/bs12.dm b/code/game/objects/effects/decals/posters/bs12.dm index 73700472334..eef2b2e3bfc 100644 --- a/code/game/objects/effects/decals/posters/bs12.dm +++ b/code/game/objects/effects/decals/posters/bs12.dm @@ -234,12 +234,12 @@ name = "Security pinup" desc = "This is a pin-up poster. A dark skinned white haired girl poses in the sunlight wearing a tank top with her stomach exposed. The text on the poster states \"M, Succubus of Security.\" and a lipstick mark stains the top right corner, as if kissed by the model herself." - /datum/poster/bay_48 +/datum/poster/bay_48 icon_state="bsposter48" name = "Borg pinup?" desc = "This is a.. pin-up poster? It is a diagram on an old model of cyborg with a note scribbled in marker on the bottom, on the top there is a large XO written in red marker." - /datum/poster/bay_49 +/datum/poster/bay_49 icon_state="bsposter49" name = "Engineering recruitment" desc = "This is a poster showing an engineer relaxing by a computer, the text states \"Living the life! Join Engineering today!\"" diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 40a38621bef..98cc1a2f2fc 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -321,9 +321,7 @@ if(slot_l_ear) if(H.l_ear) return 0 - if( w_class < 2 ) - return 1 - if( !(slot_flags & SLOT_EARS) ) + if( (w_class > 1) && !(slot_flags & SLOT_EARS) ) return 0 if( (slot_flags & SLOT_TWOEARS) && H.r_ear ) return 0 @@ -331,9 +329,7 @@ if(slot_r_ear) if(H.r_ear) return 0 - if( w_class < 2 ) - return 1 - if( !(slot_flags & SLOT_EARS) ) + if( (w_class > 1) && !(slot_flags & SLOT_EARS) ) return 0 if( (slot_flags & SLOT_TWOEARS) && H.l_ear ) return 0 @@ -341,7 +337,7 @@ if(slot_w_uniform) if(H.w_uniform) return 0 - if(H.wear_suit) + if(H.wear_suit && (H.wear_suit.body_parts_covered & src.body_parts_covered)) if(!disable_warning) H << "\The [H.wear_suit] is in the way." return 0 diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 6071c4054f8..6a25b46444f 100755 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -1048,10 +1048,10 @@ var/global/list/obj/item/device/pda/PDAs = list() // Do nothing /obj/item/device/pda/proc/new_message_from_pda(var/obj/item/device/pda/sending_device, var/message) - new_message(sending_device.name, sending_device.owner, sending_device.ownjob, message) + new_message(sending_device, sending_device.owner, sending_device.ownjob, message) /obj/item/device/pda/proc/new_message(var/sending_unit, var/sender, var/sender_job, var/message) - var/reception_message = "\icon[src] Message from [sender] ([sender_job]), \"[message]\" (Reply)" + var/reception_message = "\icon[src] Message from [sender] ([sender_job]), \"[message]\" (Reply)" new_info(news_silent, newstone, reception_message) log_pda("[usr] (PDA: [sending_unit]) sent \"[message]\" to [name]") diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 6945729b5fe..7767ecd3074 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -67,7 +67,7 @@ /obj/item/device/aicard/Topic(href, href_list) var/mob/U = usr - if (!(get_turf(U) == get_turf(src)) || U.machine != src)//If they are not in range of 1 or less or their machine is not the card (ie, clicked on something else). + if (get_dist(get_turf(U),get_turf(src)) > 1 || U.machine != src)//If they are not in range of 1 or less or their machine is not the card (ie, clicked on something else). U << browse(null, "window=aicard") U.unset_machine() return diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index fc41725ef46..2f3a9c682ec 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -169,19 +169,13 @@ - - - - - - @@ -261,10 +255,11 @@ removePersonality() if(href_list["wires"]) var/t1 = text2num(href_list["wires"]) - if (radio.wires & t1) - radio.wires &= ~t1 - else - radio.wires |= t1 + switch(t1) + if(4) + radio.ToggleBroadcast() + if(2) + radio.ToggleReception() if(href_list["setlaws"]) var/newlaws = copytext(sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message),1,MAX_MESSAGE_LEN) if(newlaws) @@ -309,4 +304,10 @@ /obj/item/device/paicard/emp_act(severity) for(var/mob/M in src) M.emp_act(severity) - ..() \ No newline at end of file + ..() + +/obj/item/device/paicard/ex_act(severity) + if(pai) + pai.ex_act(severity) + else + del(src) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index dad292fd472..bb6f0d91f54 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -108,6 +108,12 @@ Speaker: [list ? "Engaged" : "Disengaged"]
"} +/obj/item/device/radio/proc/ToggleBroadcast() + broadcasting = !broadcasting && !(wires.IsIndexCut(WIRE_TRANSMIT) || wires.IsIndexCut(WIRE_SIGNAL)) + +/obj/item/device/radio/proc/ToggleReception() + listening = !listening && !(wires.IsIndexCut(WIRE_RECEIVE) || wires.IsIndexCut(WIRE_SIGNAL)) + /obj/item/device/radio/Topic(href, href_list) //..() if (usr.stat || !on) @@ -135,11 +141,11 @@ return else if (href_list["talk"]) - broadcasting = !(wires.IsIndexCut(WIRE_TRANSMIT) || wires.IsIndexCut(WIRE_SIGNAL)) && text2num(href_list["talk"]) + ToggleBroadcast() else if (href_list["listen"]) var/chan_name = href_list["ch_name"] if (!chan_name) - listening = !(wires.IsIndexCut(WIRE_RECEIVE) || wires.IsIndexCut(WIRE_SIGNAL)) && text2num(href_list["listen"]) + ToggleReception() else if (channels[chan_name] & FREQ_LISTENING) channels[chan_name] &= ~FREQ_LISTENING diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm index 35a80a1b4e1..9b58a812ce1 100644 --- a/code/game/objects/items/devices/uplinks.dm +++ b/code/game/objects/items/devices/uplinks.dm @@ -128,11 +128,7 @@ datum/nano_item_lists var/mob/living/carbon/human/A = usr A.put_in_any_hand_if_possible(I) - if(istype(I ,/obj/item/weapon/storage/box/) && I.contents.len>0) - for(var/atom/o in I) - purchase_log += "\icon[o]" - else - purchase_log += "\icon[I]" + purchase_log[UI] = purchase_log[UI] + 1 return 1 return 0 @@ -192,7 +188,7 @@ datum/nano_item_lists data["menu"] = nanoui_menu data["nano_items"] = nanoui_items data += nanoui_data - + // update the ui if it exists, returns null if no ui is passed/found ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 0427960398d..d08377a7042 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -59,7 +59,7 @@ if(!proximity) return if(disabled && !isrobot(user)) return 0 - if(istype(A,/area/shuttle)||istype(A,/turf/space/transit)) + if(istype(get_area(A),/area/shuttle)||istype(get_area(A),/turf/space/transit)) return 0 return alter_turf(A,user,(mode == 3)) diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index 3dc57db6549..03776c78ded 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -3,128 +3,159 @@ /obj/item/weapon/implantcase name = "Glass Case" desc = "A case containing an implant." + icon = 'icons/obj/items.dmi' icon_state = "implantcase-0" item_state = "implantcase" throw_speed = 1 throw_range = 5 w_class = 1.0 var/obj/item/weapon/implant/imp = null - proc - update() +/obj/item/weapon/implantcase/proc/update() + if (src.imp) + src.icon_state = text("implantcase-[]", src.imp.item_color) + else + src.icon_state = "implantcase-0" + return - update() - if (src.imp) - src.icon_state = text("implantcase-[]", src.imp.item_color) +/obj/item/weapon/implantcase/attackby(obj/item/weapon/I as obj, mob/user as mob) + ..() + if (istype(I, /obj/item/weapon/pen)) + var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text + if (user.get_active_hand() != I) + return + if((!in_range(src, usr) && src.loc != user)) + return + t = copytext(sanitize(t),1,MAX_MESSAGE_LEN) + if(t) + src.name = text("Glass Case - '[]'", t) else - src.icon_state = "implantcase-0" - return - - - attackby(obj/item/weapon/I as obj, mob/user as mob) - ..() - if (istype(I, /obj/item/weapon/pen)) - var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text - if (user.get_active_hand() != I) + src.name = "Glass Case" + else if(istype(I, /obj/item/weapon/reagent_containers/syringe)) + if(!src.imp) return + if(!src.imp.allow_reagents) return + if(src.imp.reagents.total_volume >= src.imp.reagents.maximum_volume) + user << "\red [src] is full." + else + spawn(5) + I.reagents.trans_to(src.imp, 5) + user << "\blue You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units." + else if (istype(I, /obj/item/weapon/implanter)) + var/obj/item/weapon/implanter/M = I + if (M.imp) + if ((src.imp || M.imp.implanted)) return - if((!in_range(src, usr) && src.loc != user)) - return - t = copytext(sanitize(t),1,MAX_MESSAGE_LEN) - if(t) - src.name = text("Glass Case- '[]'", t) - else - src.name = "Glass Case" - else if(istype(I, /obj/item/weapon/reagent_containers/syringe)) - if(!src.imp) return - if(!src.imp.allow_reagents) return - if(src.imp.reagents.total_volume >= src.imp.reagents.maximum_volume) - user << "\red [src] is full." - else - spawn(5) - I.reagents.trans_to(src.imp, 5) - user << "\blue You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units." - else if (istype(I, /obj/item/weapon/implanter)) - if (I:imp) - if ((src.imp || I:imp.implanted)) + M.imp.loc = src + src.imp = M.imp + M.imp = null + src.update() + M.update() + else + if (src.imp) + if (M.imp) return - I:imp.loc = src - src.imp = I:imp - I:imp = null - src.update() - I:update() - else - if (src.imp) - if (I:imp) - return - src.imp.loc = I - I:imp = src.imp - src.imp = null - update() - I:update() - return - + src.imp.loc = M + M.imp = src.imp + src.imp = null + update() + M.update() + return /obj/item/weapon/implantcase/tracking - name = "Glass Case- 'Tracking'" + name = "Glass Case - 'Tracking'" desc = "A case containing a tracking implant." - icon = 'icons/obj/items.dmi' icon_state = "implantcase-b" - - New() - src.imp = new /obj/item/weapon/implant/tracking( src ) - ..() - return - +/obj/item/weapon/implantcase/tracking/New() + src.imp = new /obj/item/weapon/implant/tracking( src ) + ..() + return /obj/item/weapon/implantcase/explosive - name = "Glass Case- 'Explosive'" + name = "Glass Case - 'Explosive'" desc = "A case containing an explosive implant." - icon = 'icons/obj/items.dmi' icon_state = "implantcase-r" - - New() - src.imp = new /obj/item/weapon/implant/explosive( src ) - ..() - return - +/obj/item/weapon/implantcase/explosive/New() + src.imp = new /obj/item/weapon/implant/explosive( src ) + ..() + return /obj/item/weapon/implantcase/chem - name = "Glass Case- 'Chem'" + name = "Glass Case - 'Chem'" desc = "A case containing a chemical implant." - icon = 'icons/obj/items.dmi' icon_state = "implantcase-b" -/obj/item/weapon/implantcase/chem/New() +/obj/item/weapon/implantcase/chem/New() src.imp = new /obj/item/weapon/implant/chem( src ) ..() return /obj/item/weapon/implantcase/loyalty - name = "Glass Case- 'Loyalty'" + name = "Glass Case - 'Loyalty'" desc = "A case containing a loyalty implant." - icon = 'icons/obj/items.dmi' icon_state = "implantcase-r" - - New() - src.imp = new /obj/item/weapon/implant/loyalty( src ) - ..() - return +/obj/item/weapon/implantcase/loyalty/New() + src.imp = new /obj/item/weapon/implant/loyalty( src ) + ..() + return /obj/item/weapon/implantcase/death_alarm - name = "Glass Case- 'Death Alarm'" + name = "Glass Case - 'Death Alarm'" desc = "A case containing a death alarm implant." - icon = 'icons/obj/items.dmi' icon_state = "implantcase-b" - New() - src.imp = new /obj/item/weapon/implant/death_alarm( src ) - ..() - return +/obj/item/weapon/implantcase/death_alarm/New() + src.imp = new /obj/item/weapon/implant/death_alarm( src ) + ..() + return + + +/obj/item/weapon/implantcase/freedom + name = "Glass Case - 'Freedom'" + desc = "A case containing a freedom implant." + icon_state = "implantcase-r" + +/obj/item/weapon/implantcase/freedom/New() + src.imp = new /obj/item/weapon/implant/freedom( src ) + ..() + return + + +/obj/item/weapon/implantcase/adrenalin + name = "Glass Case - 'Adrenalin'" + desc = "A case containing an adrenalin implant." + icon_state = "implantcase-b" + +/obj/item/weapon/implantcase/adrenalin/New() + src.imp = new /obj/item/weapon/implant/adrenalin( src ) + ..() + return + + +/obj/item/weapon/implantcase/dexplosive + name = "Glass Case - 'Explosive'" + desc = "A case containing an explosive." + icon_state = "implantcase-r" + +/obj/item/weapon/implantcase/dexplosive/New() + src.imp = new /obj/item/weapon/implant/dexplosive( src ) + ..() + return + + +/obj/item/weapon/implantcase/health + name = "Glass Case - 'Health'" + desc = "A case containing a health tracking implant." + icon_state = "implantcase-b" + +/obj/item/weapon/implantcase/health/New() + src.imp = new /obj/item/weapon/implant/health( src ) + ..() + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 291418f5108..12078e0addf 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -452,11 +452,11 @@ del(src) //BubbleWrap END -/obj/item/weapon/storage/hear_talk(mob/M as mob, text) +/obj/item/weapon/storage/hear_talk(mob/M as mob, text, verb, datum/language/speaking) for (var/atom/A in src) if(istype(A,/obj/)) var/obj/O = A - O.hear_talk(M, text) + O.hear_talk(M, text, verb, speaking) //Returns the storage depth of an atom. This is the number of storage items the atom is contained in before reaching toplevel (the area). //Returns -1 if the atom was not found on container. diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index 8177c746d70..0514e7d1d25 100644 --- a/code/game/objects/items/weapons/tape.dm +++ b/code/game/objects/items/weapons/tape.dm @@ -45,6 +45,7 @@ W.forceMove(src) icon_state = W.icon_state + "_taped" name = W.name + " (taped)" + overlays = W.overlays /obj/item/weapon/ducttape/attack_self(mob/user as mob) if(!stuck) @@ -56,6 +57,7 @@ stuck.forceMove(get_turf(src)) user.put_in_hands(stuck) stuck = null + overlays = null del(src) /obj/item/weapon/ducttape/afterattack(var/A, mob/user as mob, flag, params) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 44fc441926f..ba696b6850b 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -126,7 +126,7 @@ return -/obj/proc/hear_talk(mob/M as mob, text) +/obj/proc/hear_talk(mob/M as mob, text, verb, datum/language/speaking) if(talking_atom) talking_atom.catchMessage(text, M) /* diff --git a/code/game/objects/random/random.dm b/code/game/objects/random/random.dm index d9ed995845d..83923831506 100644 --- a/code/game/objects/random/random.dm +++ b/code/game/objects/random/random.dm @@ -102,4 +102,5 @@ prob(3);/obj/item/stack/cable_coil,\ prob(2);/obj/random/toolbox,\ prob(2);/obj/item/weapon/storage/belt/utility,\ - prob(5);/obj/random/tool) \ No newline at end of file + prob(5);/obj/random/tool,\ + prob(2);/obj/item/weapon/tape_roll) \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 44c2c3b9002..8ff522a8585 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -293,11 +293,11 @@ else icon_state = icon_opened -/obj/structure/closet/hear_talk(mob/M as mob, text) +/obj/structure/closet/hear_talk(mob/M as mob, text, verb, datum/language/speaking) for (var/atom/A in src) if(istype(A,/obj/)) var/obj/O = A - O.hear_talk(M, text) + O.hear_talk(M, text, verb, speaking) /obj/structure/closet/attack_generic(var/mob/user, var/damage, var/attack_message = "destroys", var/wallbreaker) if(!damage || !wallbreaker) diff --git a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm index 3d21575c749..e67fea38494 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm @@ -1,4 +1,5 @@ //Alium nests. Essentially beds with an unbuckle delay that only aliums can buckle mobs to. +#define NEST_RESIST_TIME 1200 /obj/structure/stool/bed/nest name = "alien nest" @@ -19,12 +20,16 @@ buckled_mob.old_y = 0 unbuckle() else + if(world.time <= buckled_mob.last_special+NEST_RESIST_TIME) + return + buckled_mob.last_special = world.time buckled_mob.visible_message(\ "[buckled_mob.name] struggles to break free of the gelatinous resin...",\ "You struggle to break free from the gelatinous resin...",\ "You hear squelching...") - spawn(1200) + spawn(NEST_RESIST_TIME) if(user && buckled_mob && user.buckled == src) + buckled_mob.last_special = world.time buckled_mob.pixel_y = 0 buckled_mob.old_y = 0 unbuckle() diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 4ac8aa6c465..608bd782dc7 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -163,31 +163,32 @@ /obj/structure/window/attackby(obj/item/W as obj, mob/user as mob) if(!istype(W)) return//I really wish I did not need this - if(W.flags & NOBLUDGEON) return - if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2) var/obj/item/weapon/grab/G = W - if (istype(G.affecting, /mob/living)) + if(istype(G.affecting,/mob/living)) var/mob/living/M = G.affecting var/state = G.state del(W) //gotta delete it here because if window breaks, it won't get deleted switch (state) if(1) + M.visible_message("[user] slams [M] against \the [src]!") M.apply_damage(7) hit(10) - visible_message("\red [user] slams [M] against \the [src]!") if(2) + M.visible_message("[user] bashes [M] against \the [src]!") if (prob(50)) M.Weaken(1) M.apply_damage(10) hit(25) - visible_message("\red [user] bashes [M] against \the [src]!") if(3) + M.visible_message("[user] crushes [M] against \the [src]!") M.Weaken(5) M.apply_damage(20) hit(50) - visible_message("\red [user] crushes [M] against \the [src]!") return + + if(W.flags & NOBLUDGEON) return + if(istype(W, /obj/item/weapon/screwdriver)) if(reinf && state >= 1) state = 3 - state diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 80a70d5c049..d2cd7a18d54 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -86,7 +86,7 @@ //Finally, check objects/mobs to block entry that are not on the border for(var/atom/movable/obstacle in src) - if(obstacle.flags & ~ON_BORDER) + if(!(obstacle.flags & ON_BORDER)) if(!obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != obstacle)) mover.Bump(obstacle, 1) return 0 diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 93b2824ebe1..07bca599952 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -169,17 +169,29 @@ var/global/floorIsLava = 0 Shade
"} - - if (M.client) - body += {"

+ body += {"

Other actions:
- Forcesay | + Forcesay + "} + if (M.client) + body += {" | Thunderdome 1 | Thunderdome 2 | Thunderdome Admin | Thunderdome Observer | "} + // language toggles + body += "

Languages:
" + var/f = 1 + for(var/k in all_languages) + var/datum/language/L = all_languages[k] + if(!f) body += " | " + else f = 0 + if(L in M.languages) + body += "[k]" + else + body += "[k]" body += {"
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 6c417a35e12..134d0e0c8db 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1496,14 +1496,11 @@ //open a browse window listing the contents instead var/data = "" var/obj/item/weapon/paper_bundle/B = fax - + for (var/page = 1, page <= B.amount, page++) var/obj/pageobj = B.contents[page] data += "Page [page] - [pageobj.name]
" - - world << data - world << "usr = [usr]" - + usr << browse(data, "window=[B.name]") else usr << "\red The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]" @@ -1511,9 +1508,9 @@ else if (href_list["AdminFaxViewPage"]) var/page = text2num(href_list["AdminFaxViewPage"]) var/obj/item/weapon/paper_bundle/bundle = locate(href_list["paper_bundle"]) - + if (!bundle) return - + if (istype(bundle.contents[page], /obj/item/weapon/paper)) var/obj/item/weapon/paper/P = bundle.contents[page] P.show_content(src.owner, 1) @@ -1530,13 +1527,13 @@ if(!input) return var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null - + // Create the reply message var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( null ) //hopefully the null loc won't cause trouble for us P.name = "[command_name()]- [customname]" P.info = input P.update_icon() - + // Stamps var/image/stampoverlay = image('icons/obj/bureaucracy.dmi') stampoverlay.icon_state = "paper_stamp-cent" @@ -1552,7 +1549,7 @@ message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)]", 1) else src.owner << "\red Message reply failed." - + spawn(100) del(P) return @@ -2757,6 +2754,24 @@ if(href_list["vsc"] == "default") vsc.SetDefault(usr) + else if(href_list["toglang"]) + if(check_rights(R_SPAWN)) + var/mob/M = locate(href_list["toglang"]) + if(!istype(M)) + usr << "[M] is illegal type, must be /mob!" + return + var/lang2toggle = href_list["lang"] + var/datum/language/L = all_languages[lang2toggle] + + if(L in M.languages) + if(!M.remove_language(lang2toggle)) + usr << "Failed to remove language '[lang2toggle]' from \the [M]!" + else + if(!M.add_language(lang2toggle)) + usr << "Failed to add language '[lang2toggle]' from \the [M]!" + + show_player_panel(M) + // player info stuff if(href_list["add_player_info"]) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 8695dc2f470..39a5fa778cd 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -1,9 +1,18 @@ - +#define AHELP_ADMIN 1 +#define AHELP_MENTOR 2 +#define AHELP_DEV 3 //This is a list of words which are ignored by the parser when comparing message contents for names. MUST BE IN LOWER CASE! var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","alien","as") -/client/verb/adminhelp(msg as null|text) +var/list/adminhelp_categories = list("Mentor - Gameplay/Roleplay question" = AHELP_MENTOR,\ + "Admin - Rule/Gameplay issue" = AHELP_ADMIN,\ + "Dev - Bug report" = AHELP_DEV) + +/client/proc/adminhelp_admin(message) + adminhelp("Admin - Rule/Gameplay issue", message) + +/client/verb/adminhelp(selected_type in adminhelp_categories, msg as text) set category = "Admin" set name = "Adminhelp" @@ -24,12 +33,6 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," src.verbs += /client/verb/adminhelp // 2 minute cool-down for adminhelps src.verbs += /client/verb/adminhelp // 2 minute cool-down for adminhelps//Go to hell **/ - var/list/type = list ("Gameplay/Roleplay question", "Rule/Gameplay issue", "Bug report") - var/selected_type = input("Pick a category.", "Admin Help", null, null) as null|anything in type - if(!selected_type) - return - if(!msg) - msg = input("Please enter your message:", "Admin Help", null, null) as text if(!msg || alert("The following message will be sent to staff that administers\n the '[selected_type]' category:\n\n[msg]\n", "Admin Help", "Ok", "Cancel") == "Cancel") return @@ -130,8 +133,8 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," if(X.is_afk()) admin_number_afk++ - switch(selected_type) - if("Gameplay/Roleplay question") + switch(adminhelp_categories[selected_type]) + if(AHELP_MENTOR) if(mentorholders.len) for(var/client/X in mentorholders) // Mentors get a message without buttons and no character name if(X.prefs.toggles & SOUND_ADMINHELP) @@ -142,13 +145,13 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," if(X.prefs.toggles & SOUND_ADMINHELP) X << 'sound/effects/adminhelp.ogg' X << msg - if("Rule/Gameplay issue") + if(AHELP_ADMIN) if(adminholders.len) for(var/client/X in adminholders) // Admins of course get everything in their helps if(X.prefs.toggles & SOUND_ADMINHELP) X << 'sound/effects/adminhelp.ogg' X << msg - if("Bug report") + if(AHELP_DEV) if(debugholders.len) for(var/client/X in debugholders) if(R_ADMIN | R_MOD & X.holder.rights) // Admins get every button & special highlights in theirs @@ -183,3 +186,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," send2adminirc("[selected_upper] from [key_name(src)]: [html_decode(original_msg)]") feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return + +#undef AHELP_ADMIN +#undef AHELP_MENTOR +#undef AHELP_DEV \ No newline at end of file diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 1c358c8cf4e..0b3f82aaa1d 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -96,7 +96,7 @@ if(sender) C.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them else - adminhelp(reply) //sender has left, adminhelp instead + adminhelp_admin(reply) //sender has left, adminhelp instead return src << "" + create_text_tag("pm_out_alt", "PM", src) + " to [get_options_bar(C, holder ? 1 : 0, holder ? 1 : 0, 1)]: [msg]" C << "" + create_text_tag("pm_in", "", C) + " \[[recieve_pm_type] PM\] [get_options_bar(src, C.holder ? 1 : 0, C.holder ? 1 : 0, 1)]: [msg]" diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 9461b9477c4..721becf039f 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -460,8 +460,6 @@ Traitors and the like can also be revived with the previous role mostly intact. call(/datum/game_mode/proc/equip_syndicate)(new_character) if("Ninja") new_character.equip_space_ninja() - new_character.internal = new_character.s_store - new_character.internals.icon_state = "internal1" if(ninjastart.len == 0) new_character << "\red A proper starting location for you could not be found, please report this bug!" new_character << "\red Attempting to place at a carpspawn." diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index a9a4f2cc25b..82f74509813 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -211,11 +211,11 @@ return 1 -/obj/item/device/assembly_holder/hear_talk(mob/living/M as mob, msg) +/obj/item/device/assembly_holder/hear_talk(mob/living/M as mob, msg, verb, datum/language/speaking) if(a_right) - a_right.hear_talk(M,msg) + a_right.hear_talk(M,msg,verb,speaking) if(a_left) - a_left.hear_talk(M,msg) + a_left.hear_talk(M,msg,verb,speaking) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 833d99f9fd8..c913dcf5696 100755 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -507,6 +507,8 @@ datum/preferences HTML += " \[Yes]" else HTML += " \[No]" + if(job.alt_titles) //Blatantly cloned from a few lines down. + HTML += "" HTML += "" continue diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm index 7b7e2374d4c..71293ef4503 100644 --- a/code/modules/clothing/spacesuits/rig/modules/computer.dm +++ b/code/modules/clothing/spacesuits/rig/modules/computer.dm @@ -138,11 +138,15 @@ if(ai_card) if(istype(ai_card, /obj/item/device/aicard)) - if(integrated_ai && integrated_ai.client) + if(integrated_ai && !integrated_ai.stat) if(user) user << "You cannot eject your currently stored AI. Purge it manually." return 0 - del(ai_card) + user << "You purge the remaining scraps of data from your previous AI, freeing it for use." + if(integrated_ai) + integrated_ai.ghostize() + del(integrated_ai) + if(ai_card) del(ai_card) else if(user) user.put_in_hands(ai_card) else diff --git a/code/modules/clothing/spacesuits/rig/modules/utility.dm b/code/modules/clothing/spacesuits/rig/modules/utility.dm index 06a72bc3525..5a8063fd824 100644 --- a/code/modules/clothing/spacesuits/rig/modules/utility.dm +++ b/code/modules/clothing/spacesuits/rig/modules/utility.dm @@ -58,7 +58,9 @@ desc = "You think it's called an Elder Sarsparilla or something." interface_name = "Alden-Saraspova counter" interface_desc = "An exotic particle detector commonly used by xenoarchaeologists." - selectable = 1 + engage_string = "Begin Scan" + usable = 1 + selectable = 0 device_type = /obj/item/device/ano_scanner /obj/item/rig_module/device/orescanner @@ -66,12 +68,9 @@ desc = "A clunky old ore scanner." interface_name = "ore detector" interface_desc = "A sonar system for detecting large masses of ore." - engage_string = "Begin Scan" - usable = 1 selectable = 0 - device_type = /obj/item/weapon/mining_scanner /obj/item/rig_module/device/rcd @@ -97,6 +96,10 @@ device.attack_self(holder.wearer) return 1 + var/turf/T = get_turf(target) + if(istype(T) && !T.Adjacent(get_turf(src))) + return 0 + var/resolved = target.attackby(device,holder.wearer) if(!resolved && device && target) device.afterattack(target,holder.wearer,1) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 41c02cba100..1c10aa36ac5 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -76,7 +76,8 @@ var/datum/effect/effect/system/spark_spread/spark_system /obj/item/weapon/rig/examine() - ..() + usr << "This is \icon[src][src.name]." + usr << "[src.desc]" if(wearer) for(var/obj/item/piece in list(helmet,gloves,chest,boots)) if(!piece || piece.loc != wearer) @@ -90,6 +91,7 @@ /obj/item/weapon/rig/New() ..() + item_state = icon_state wires = new(src) if((!req_access || !req_access.len) && (!req_one_access || !req_one_access.len)) @@ -140,6 +142,8 @@ piece.siemens_coefficient = siemens_coefficient piece.permeability_coefficient = permeability_coefficient + update_icon(1) + /obj/item/weapon/rig/Del() for(var/obj/item/piece in list(gloves,boots,helmet,chest)) var/mob/living/M = piece.loc @@ -178,13 +182,13 @@ sealing = 1 if(!seal_target && !suit_is_deployed()) - M << "The suit flashes an error light. It can't function properly without being fully deployed." + M.visible_message("[M]'s suit flashes an error light.","Your suit flashes an error light. It can't function properly without being fully deployed.") failed_to_seal = 1 if(!failed_to_seal) if(!instant) - M << "With a quiet hum, the suit begins running checks and adjusting components." + M.visible_message("[M]'s suit emits a quiet hum as it begins to adjust its seals.","With a quiet hum, the suit begins running checks and adjusting components.") if(!do_after(M,SEAL_DELAY)) if(M) M << "You must remain still while the suit is adjusting the components." failed_to_seal = 1 @@ -203,12 +207,11 @@ continue if(!istype(M) || !istype(piece) || !istype(compare_piece) || !msg_type) - if(!failed_to_seal) - if(M) M << "You must remain still while the suit is adjusting the components." + if(M) M << "You must remain still while the suit is adjusting the components." failed_to_seal = 1 break - if(M.back == src && piece == compare_piece) + if(!failed_to_seal && M.back == src && piece == compare_piece) if(!instant) if(!do_after(M,SEAL_DELAY)) @@ -232,11 +235,11 @@ if(!seal_target) if(flags & AIRTIGHT) helmet.flags |= AIRTIGHT - helmet.flags_inv |= (HIDEEYES|HIDEFACE) + helmet.flags_inv |= (HIDEEYES|HIDEFACE|HIDEMASK) helmet.body_parts_covered |= (FACE|EYES) else helmet.flags &= ~AIRTIGHT - helmet.flags_inv &= ~(HIDEEYES|HIDEFACE) + helmet.flags_inv &= ~(HIDEEYES|HIDEFACE|HIDEMASK) helmet.body_parts_covered &= ~(FACE|EYES) helmet.update_light(wearer) else @@ -446,11 +449,8 @@ //TODO: Maybe consider a cache for this (use mob_icon as blank canvas, use suit icon overlay). overlays.Cut() - if(mob_icon) - mob_icon.overlays.Cut() - if(!mob_icon || update_mob_icon) - var/species_icon = 'icons/mob/back.dmi' + var/species_icon = 'icons/mob/rig_back.dmi' // Since setting mob_icon will override the species checks in // update_inv_wear_suit(), handle species checks here. if(wearer && sprite_sheets && sprite_sheets[wearer.species.name]) @@ -458,10 +458,8 @@ mob_icon = image("icon" = species_icon, "icon_state" = "[icon_state]") if(installed_modules.len) - for(var/obj/item/rig_module/module in installed_modules) if(module.suit_overlay) - mob_icon.overlays += image("icon" = 'icons/mob/rig_modules.dmi', "icon_state" = "[module.suit_overlay]") chest.overlays += image("icon" = 'icons/mob/rig_modules.dmi', "icon_state" = "[module.suit_overlay]", "dir" = SOUTH) if(wearer) @@ -488,10 +486,9 @@ user << "Unauthorized user. Access denied." return 0 - else if(user.loc && user.loc.loc && istype(user.loc.loc,/obj/item/rig_module/ai_container)) - if(!ai_override_enabled) - user << "Synthetic access disabled. Please consult hardware provider." - return 0 + else if(!ai_override_enabled) + user << "Synthetic access disabled. Please consult hardware provider." + return 0 return 1 diff --git a/code/modules/clothing/spacesuits/rig/suits/combat.dm b/code/modules/clothing/spacesuits/rig/suits/combat.dm index 8774a0310e7..55716179c6a 100644 --- a/code/modules/clothing/spacesuits/rig/suits/combat.dm +++ b/code/modules/clothing/spacesuits/rig/suits/combat.dm @@ -1,5 +1,5 @@ /obj/item/clothing/head/helmet/space/rig/combat - light_overlay = "helmet_light_green_dual" + light_overlay = "helmet_light_dual_green" /obj/item/weapon/rig/combat name = "combat hardsuit control module" @@ -22,22 +22,4 @@ /obj/item/rig_module/power_sink, /obj/item/rig_module/electrowarfare_suite, /obj/item/rig_module/chem_dispenser/combat - ) - -/obj/item/weapon/rig/combat/merc - name = "crimson hardsuit control module" - desc = "A blood-red hardsuit featuring some fairly illegal technology." - icon_state = "merc_rig" - suit_type = "crimson hardsuit" - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs) - - initial_modules = list( - /obj/item/rig_module/mounted, - /obj/item/rig_module/vision/thermal, - /obj/item/rig_module/grenade_launcher, - /obj/item/rig_module/ai_container, - /obj/item/rig_module/power_sink, - /obj/item/rig_module/electrowarfare_suite, - /obj/item/rig_module/chem_dispenser/combat, - /obj/item/rig_module/fabricator/energy_net ) \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/rig/suits/ert.dm b/code/modules/clothing/spacesuits/rig/suits/ert.dm index 499547918f6..f5d7a2f71e0 100644 --- a/code/modules/clothing/spacesuits/rig/suits/ert.dm +++ b/code/modules/clothing/spacesuits/rig/suits/ert.dm @@ -1,5 +1,6 @@ /obj/item/clothing/head/helmet/space/rig/ert light_overlay = "helmet_light_dual" + camera_networks = list("ERT","SS13") /obj/item/weapon/rig/ert name = "ERT-C hardsuit control module" @@ -17,7 +18,7 @@ allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \ /obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, \ /obj/item/device/radio, /obj/item/device/analyzer, /obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/pulse_rifle, \ - /obj/item/weapon/gun/energy/taser, /obj/item/weapon/melee/baton, /obj/item/weapon/gun/energy/gun) + /obj/item/weapon/gun/energy/taser, /obj/item/weapon/melee/baton, /obj/item/weapon/gun, /obj/item/weapon/storage/firstaid, /obj/item/weapon/reagent_containers/hypospray, /obj/item/roller) initial_modules = list( /obj/item/rig_module/ai_container, diff --git a/code/modules/clothing/spacesuits/rig/suits/merc.dm b/code/modules/clothing/spacesuits/rig/suits/merc.dm new file mode 100644 index 00000000000..7a0d95a4bda --- /dev/null +++ b/code/modules/clothing/spacesuits/rig/suits/merc.dm @@ -0,0 +1,27 @@ +/obj/item/clothing/head/helmet/space/rig/merc + light_overlay = "helmet_light_dual_green" + camera_networks = list("NUKE") + +/obj/item/weapon/rig/merc + name = "crimson hardsuit control module" + desc = "A blood-red hardsuit featuring some fairly illegal technology." + icon_state = "merc_rig" + suit_type = "crimson hardsuit" + armor = list(melee = 80, bullet = 65, laser = 50, energy = 15, bomb = 80, bio = 100, rad = 60) + slowdown = 1 + offline_slowdown = 3 + offline_vision_restriction = 1 + + helm_type = /obj/item/clothing/head/helmet/space/rig/merc + allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs) + + initial_modules = list( + /obj/item/rig_module/mounted, + /obj/item/rig_module/vision/thermal, + /obj/item/rig_module/grenade_launcher, + /obj/item/rig_module/ai_container, + /obj/item/rig_module/power_sink, + /obj/item/rig_module/electrowarfare_suite, + /obj/item/rig_module/chem_dispenser/combat, + /obj/item/rig_module/fabricator/energy_net + ) \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/rig/suits/station.dm b/code/modules/clothing/spacesuits/rig/suits/station.dm index 4a34ebd3092..44959068eb4 100644 --- a/code/modules/clothing/spacesuits/rig/suits/station.dm +++ b/code/modules/clothing/spacesuits/rig/suits/station.dm @@ -51,16 +51,17 @@ /obj/item/weapon/rig/hazmat name = "AMI control module" - suit_type = "hazmat" + suit_type = "hazmat hardsuit" desc = "An Anomalous Material Interaction hardsuit that protects against the strangest energies the universe can throw at it." - icon_state = "medical_rig" //placeholder + icon_state = "science_rig" armor = list(melee = 15, bullet = 15, laser = 80, energy = 80, bomb = 60, bio = 100, rad = 100) slowdown = 1 offline_slowdown = 3 offline_vision_restriction = 1 - //Todo: add xenoarch gear. - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical) + helm_type = /obj/item/clothing/head/helmet/space/rig/ert + + allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/stack/flag,/obj/item/weapon/storage/box/excavation,/obj/item/weapon/pickaxe,/obj/item/device/healthanalyzer,/obj/item/device/measuring_tape,/obj/item/device/ano_scanner,/obj/item/device/depth_scanner,/obj/item/device/core_sampler,/obj/item/device/gps,/obj/item/device/beacon_locator,/obj/item/device/radio/beacon,/obj/item/weapon/pickaxe/hand,/obj/item/weapon/storage/bag/fossils) req_access = list(access_rd) @@ -70,5 +71,42 @@ /obj/item/rig_module/device/anomaly_scanner ) - boot_type = null - glove_type = null \ No newline at end of file +/obj/item/weapon/rig/medical + + name = "rescue suit control module" + suit_type = "rescue hardsuit" + desc = "A durable suit designed for medical rescue in high risk areas." + icon_state = "medical_rig" + armor = list(melee = 30, bullet = 15, laser = 20, energy = 60, bomb = 30, bio = 100, rad = 100) + slowdown = 1 + offline_slowdown = 3 + offline_vision_restriction = 1 + + allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical,/obj/item/roller ) + + req_access = null + req_one_access = null + + initial_modules = list( + /obj/item/rig_module/chem_dispenser/injector, + /obj/item/rig_module/maneuvering_jets, + /obj/item/rig_module/device/healthscanner + ) + +/obj/item/weapon/rig/hazard + name = "hazard hardsuit control module" + suit_type = "hazard hardsuit" + desc = "A Nanotrasen security hardsuit designed for prolonged EVA in dangerous environments. The name HARPER is printed on the control unit." + icon_state = "hazard_rig" + armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10) + slowdown = 1 + offline_slowdown = 3 + offline_vision_restriction = 1 + + helm_type = /obj/item/clothing/head/helmet/space/rig/ert + + allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton) + + req_access = null + req_one_access = null + diff --git a/code/modules/clothing/suits/storage.dm b/code/modules/clothing/suits/storage.dm index 5e37fd240fe..f34c9f00c3e 100644 --- a/code/modules/clothing/suits/storage.dm +++ b/code/modules/clothing/suits/storage.dm @@ -24,8 +24,8 @@ pockets.emp_act(severity) ..() -/obj/item/clothing/suit/storage/hear_talk(mob/M, var/msg) - pockets.hear_talk(M, msg) +/obj/item/clothing/suit/storage/hear_talk(mob/M, var/msg, verb, datum/language/speaking) + pockets.hear_talk(M, msg, verb, speaking) ..() //Jackets with buttons, used for labcoats, IA jackets, First Responder jackets, and brown jackets. diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index 188790832b9..6daa9044531 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -395,9 +395,9 @@ /obj/item/clothing/under/sundress_white name = "white sundress" desc = "A white sundress decorated with purple lilies." - icon_state = "whitesundress" - item_state = "whitesundress" - item_color = "whitesundress" + icon_state = "sundress_white" + item_state = "sundress_white" + item_color = "sundress_white" body_parts_covered = UPPER_TORSO|LOWER_TORSO /obj/item/clothing/under/captainformal @@ -476,4 +476,4 @@ icon_state = "mai_yang" item_state = "mai_yang" item_color = "mai_yang" - body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS \ No newline at end of file + body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index 51290cf7773..b70df2c84b0 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -347,8 +347,8 @@ hold.emp_act(severity) ..() -/obj/item/clothing/tie/storage/hear_talk(mob/M, var/msg) - hold.hear_talk(M, msg) +/obj/item/clothing/tie/storage/hear_talk(mob/M, var/msg, verb, datum/language/speaking) + hold.hear_talk(M, msg, verb, speaking) ..() /obj/item/clothing/tie/storage/attack_self(mob/user as mob) diff --git a/code/modules/hydroponics/hydro_tray.dm b/code/modules/hydroponics/hydro_tray.dm index ba5f4dbc310..66cf4676574 100644 --- a/code/modules/hydroponics/hydro_tray.dm +++ b/code/modules/hydroponics/hydro_tray.dm @@ -122,6 +122,25 @@ "mutagen" = 15 ) +/obj/machinery/portable_atmospherics/hydroponics/attack_generic(var/mob/user) + if(istype(user,/mob/living/carbon/alien/diona)) + var/mob/living/carbon/alien/diona/nymph = user + + if(nymph.stat == DEAD || nymph.paralysis || nymph.weakened || nymph.stunned || nymph.restrained()) + return + + if(weedlevel > 0) + nymph.reagents.add_reagent("nutriment", weedlevel) + weedlevel = 0 + nymph.visible_message("[nymph] begins rooting through [src], ripping out weeds and eating them noisily.","You begin rooting through [src], ripping out weeds and eating them noisily.") + else if(nymph.nutrition > 100 && nutrilevel < 10) + nymph.nutrition -= ((10-nutrilevel)*5) + nutrilevel = 10 + nymph.visible_message("[nymph] secretes a trickle of green liquid, refilling [src].","You secrete a trickle of green liquid, refilling [src].") + else + nymph.visible_message("[nymph] rolls around in [src] for a bit.","You roll around in [src] for a bit.") + return + /obj/machinery/portable_atmospherics/hydroponics/New() ..() temp_chem_holder = new() @@ -129,8 +148,6 @@ create_reagents(200) connect() update_icon() - if(closed_system) - flags &= ~OPENCONTAINER /obj/machinery/portable_atmospherics/hydroponics/bullet_act(var/obj/item/projectile/Proj) @@ -777,11 +794,6 @@ closed_system = !closed_system usr << "You [closed_system ? "close" : "open"] the tray's lid." - if(closed_system) - flags &= ~OPENCONTAINER - else - flags |= OPENCONTAINER - update_icon() /obj/machinery/portable_atmospherics/hydroponics/soil diff --git a/code/modules/hydroponics/seed_mobs.dm b/code/modules/hydroponics/seed_mobs.dm index a08de942d01..9fe3702eac4 100644 --- a/code/modules/hydroponics/seed_mobs.dm +++ b/code/modules/hydroponics/seed_mobs.dm @@ -25,7 +25,7 @@ /datum/seed/proc/request_player(var/mob/living/host) if(!host) return for(var/mob/dead/observer/O in player_list) - if(jobban_isbanned(O, "Dionaea") || (!is_alien_whitelisted(O, "Diona") && config.usealienwhitelist)) + if(jobban_isbanned(O, "Dionaea")) continue if(O.client) if(O.client.prefs.be_special & BE_PLANT && !(O.client in currently_querying)) diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index dc1ca257276..ab9c64eebfe 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -1,31 +1,31 @@ //This is the proc for gibbing a mob. Cannot gib ghosts. //added different sort of gibs and animations. N -/mob/proc/gib() +/mob/proc/gib(anim="gibbed-m",do_gibs) death(1) - var/atom/movable/overlay/animation = null monkeyizing = 1 canmove = 0 icon = null invisibility = 101 + update_canmove() + dead_mob_list -= src + var/atom/movable/overlay/animation = null animation = new(loc) animation.icon_state = "blank" animation.icon = 'icons/mob/mob.dmi' animation.master = src -// flick("gibbed-m", animation) - gibs(loc, viruses, dna) + flick(anim, animation) + if(do_gibs) gibs(loc, viruses, dna) - dead_mob_list -= src spawn(15) if(animation) del(animation) if(src) del(src) - //This is the proc for turning a mob into ash. Mostly a copy of gib code (above). //Originally created for wizard disintegrate. I've removed the virus code since it's irrelevant here. //Dusting robots does not eject the MMI, so it's a bit more powerful than gib() /N -/mob/proc/dust() +/mob/proc/dust(anim="dust-m",remains=/obj/effect/decal/cleanable/ash) death(1) var/atom/movable/overlay/animation = null monkeyizing = 1 @@ -38,8 +38,8 @@ animation.icon = 'icons/mob/mob.dmi' animation.master = src -// flick("dust-m", animation) - new /obj/effect/decal/cleanable/ash(loc) + flick(anim, animation) + new remains(loc) dead_mob_list -= src spawn(15) @@ -47,17 +47,45 @@ if(src) del(src) -/mob/proc/death(gibbed) +/mob/proc/death(gibbed,deathmessage="seizes up and falls limp...") + + if(stat == DEAD) + return 0 + + if(!gibbed) + src.visible_message("\The [src.name] [deathmessage]") + + stat = DEAD + + update_canmove() + + dizziness = 0 + jitteriness = 0 + + layer = MOB_LAYER + + if(blind && client) + blind.layer = 0 + + sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS + see_in_dark = 8 + see_invisible = SEE_INVISIBLE_LEVEL_TWO - //Quick fix for corpses kept propped up in chairs. ~Z drop_r_hand() drop_l_hand() - //End of fix. + + if(healths) + healths.icon_state = "health6" timeofdeath = world.time - - var/tod = worldtime2text() //weasellos time of death patch - if(mind) mind.store_memory("Time of death: [tod]", 0) + if(mind) mind.store_memory("Time of death: [worldtime2text()]", 0) living_mob_list -= src - dead_mob_list += src - return ..(gibbed) + dead_mob_list |= src + + updateicon() + + if(ticker && ticker.mode) + ticker.mode.check_win() + + + return 1 diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 04fa4273a07..77f59c46047 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -8,7 +8,7 @@ //Does the speaker have a client? It's either random stuff that observers won't care about (Experiment 97B says, 'EHEHEHEHEHEHEHE') //Or someone snoring. So we make it where they won't hear it. return - + //make sure the air can transmit speech - hearer's side var/turf/T = get_turf(src) if (T) @@ -16,31 +16,27 @@ var/pressure = (environment)? environment.return_pressure() : 0 if(pressure < SOUND_MINIMUM_PRESSURE && get_dist(speaker, src) > 1) return - + if (pressure < ONE_ATMOSPHERE*0.4) //sound distortion pressure, to help clue people in that the air is thin, even if it isn't a vacuum yet italics = 1 sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact - + if(sleeping || stat == 1) hear_sleep(message) return - var/style = "body" - //non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet. if (language && (language.flags & NONVERBAL)) if (!speaker || (src.sdisabilities & BLIND || src.blinded) || !(speaker in view(src))) message = stars(message) - - if(!say_understands(speaker,language)) - if(istype(speaker,/mob/living/simple_animal)) - var/mob/living/simple_animal/S = speaker - message = pick(S.speak) - else - message = stars(message) - if(language) - style = language.colour + if(!(language && (language.flags & INNATE))) // skip understanding checks for INNATE languages + if(!say_understands(speaker,language)) + if(istype(speaker,/mob/living/simple_animal)) + var/mob/living/simple_animal/S = speaker + message = pick(S.speak) + else + message = stars(message) var/speaker_name = speaker.name if(istype(speaker, /mob/living/carbon/human)) @@ -61,12 +57,16 @@ message = "[message]" if(sdisabilities & DEAF || ear_deaf) - if(speaker == src) - src << "You cannot hear yourself speak!" - else - src << "[speaker_name][alt_name] talks but you cannot hear \him." + if(!language || !(language.flags & INNATE)) // INNATE is the flag for audible-emote-language, so we don't want to show an "x talks but you cannot hear them" message if it's set + if(speaker == src) + src << "You cannot hear yourself speak!" + else + src << "[speaker_name][alt_name] talks but you cannot hear \him." else - src << "[speaker_name][alt_name] [track][verb], \"[message]\"" + if(language) + src << "[speaker_name][alt_name] [track][language.format_message(message, verb)]" + else + src << "[speaker_name][alt_name] [track][verb], \"[message]\"" if (speech_sound && (get_dist(speaker, src) <= world.view && src.z == speaker.z)) var/turf/source = speaker? get_turf(speaker) : get_turf(src) src.playsound_local(source, speech_sound, sound_vol, 1) @@ -83,26 +83,25 @@ var/track = null - var/style = "body" - //non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet. if (language && (language.flags & NONVERBAL)) if (!speaker || (src.sdisabilities & BLIND || src.blinded) || !(speaker in view(src))) message = stars(message) - - if(!say_understands(speaker,language)) - if(istype(speaker,/mob/living/simple_animal)) - var/mob/living/simple_animal/S = speaker - message = pick(S.speak) - else + + if(!(language && (language.flags & INNATE))) // skip understanding checks for INNATE languages + if(!say_understands(speaker,language)) + if(istype(speaker,/mob/living/simple_animal)) + var/mob/living/simple_animal/S = speaker + if(S.speak && S.speak.len) + message = pick(S.speak) + else + return + else + message = stars(message) + + if(hard_to_hear) message = stars(message) - if(language) - style = language.colour - - if(hard_to_hear) - message = stars(message) - var/speaker_name = speaker.name if(vname) @@ -162,18 +161,23 @@ speaker_name = "[speaker.real_name] ([speaker_name])" track = "[speaker_name] (follow)" + var/formatted + if(language) + formatted = language.format_message_radio(message, verb) + else + formatted = "[verb], \"[message]\"" if(sdisabilities & DEAF || ear_deaf) if(prob(20)) src << "You feel your headset vibrate but can hear nothing from it!" else if(track) - src << "[part_a][track][part_b][verb], \"[message]\"" + src << "[part_a][track][part_b][formatted]" else - src << "[part_a][speaker_name][part_b][verb], \"[message]\"" + src << "[part_a][speaker_name][part_b][formatted]" /mob/proc/hear_signlang(var/message, var/verb = "gestures", var/datum/language/language, var/mob/speaker = null) if(!client) return - + if(say_understands(speaker, language)) message = "[src] [verb], \"[message]\"" else diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index d1adff7de2c..81e8137f04b 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -7,6 +7,7 @@ sprite_sheets = list("Vox" = 'icons/mob/species/vox/head.dmi') /obj/item/weapon/holder/New() + item_state = icon_state ..() processing_objects.Add(src) @@ -58,6 +59,7 @@ desc = "It's a tiny plant critter." icon_state = "nymph" origin_tech = "magnets=3;biotech=5" + slot_flags = SLOT_HEAD | SLOT_OCLOTHING /obj/item/weapon/holder/drone name = "maintenance drone" diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index 2e627330a06..5fee93197ce 100755 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -15,23 +15,25 @@ var/flags = 0 // Various language flags. var/native // If set, non-native speakers will have trouble speaking. -/datum/language/proc/broadcast(var/mob/living/speaker,var/message,var/speaker_mask) +/datum/language/proc/format_message(message, verb) + return "[verb], \"[capitalize(message)]\"" +/datum/language/proc/format_message_radio(message, verb) + return "[verb], \"[capitalize(message)]\"" + +/datum/language/proc/get_talkinto_msg_range(message) + // if you yell, you'll be heard from two tiles over instead of one + return (copytext(message, length(message)) == "!") ? 2 : 1 + +/datum/language/proc/broadcast(var/mob/living/speaker,var/message,var/speaker_mask) log_say("[key_name(speaker)] : ([name]) [message]") + if(!speaker_mask) speaker_mask = speaker.name + var/msg = "[name], [speaker_mask] [format_message(message, get_spoken_verb(message))]" + for(var/mob/player in player_list) - - var/understood = 0 - - if(istype(player,/mob/dead)) - understood = 1 - else if((src in player.languages) && check_special_condition(player)) - understood = 1 - - if(understood) - if(!speaker_mask) speaker_mask = speaker.name - var/msg = "[name], [speaker_mask] [speech_verb], \"[message]\"" - player << "[msg]" + if(istype(player,/mob/dead) || ((src in player.languages) && check_special_condition(player))) + player << msg /datum/language/proc/check_special_condition(var/mob/other) return 1 @@ -44,6 +46,23 @@ return ask_verb return speech_verb +// Noise "language", for audible emotes. +/datum/language/noise + name = "Noise" + desc = "Noises" + key = "" + flags = RESTRICTED|NONGLOBAL|INNATE|NO_TALK_MSG + +/datum/language/noise/format_message(message, verb) + return "[message]" + +/datum/language/noise/format_message_radio(message, verb) + return "[message]" + +/datum/language/noise/get_talkinto_msg_range(message) + // if you make a loud noise (screams etc), you'll be heard from 4 tiles over instead of two + return (copytext(message, length(message)) == "!") ? 4 : 2 + /datum/language/unathi name = "Sinta'unathi" desc = "The common language of Moghes, composed of sibilant hisses and rattles. Spoken natively by Unathi." @@ -81,7 +100,7 @@ ask_verb = "creels" exclaim_verb = "SHRIEKS" colour = "vox" - key = "v" + key = "5" flags = RESTRICTED /datum/language/diona @@ -286,15 +305,14 @@ return 1 /mob/proc/remove_language(var/rem_language) - - languages.Remove(all_languages[rem_language]) - - return 0 + var/datum/language/L = all_languages[rem_language] + . = (L in languages) + languages.Remove(L) // Can we speak this language, as opposed to just understanding it? /mob/proc/can_speak(datum/language/speaking) - return (universal_speak || speaking in src.languages) + return (universal_speak || (speaking && speaking.flags & INNATE) || speaking in src.languages) //TBD /mob/verb/check_languages() @@ -305,7 +323,8 @@ var/dat = "Known Languages

" for(var/datum/language/L in languages) - dat += "[L.name] (:[L.key])
[L.desc]

" + if(!(L.flags & NONGLOBAL)) + dat += "[L.name] (:[L.key])
[L.desc]

" src << browse(dat, "window=checklanguage") return \ No newline at end of file diff --git a/code/modules/mob/living/blob/blob.dm b/code/modules/mob/living/blob/blob.dm index ec90c4fb7ff..2b82ccbedbf 100644 --- a/code/modules/mob/living/blob/blob.dm +++ b/code/modules/mob/living/blob/blob.dm @@ -52,14 +52,8 @@ death(gibbed) - if(key) - var/mob/dead/observer/ghost = new(src) - ghost.name = ghost_name - ghost.real_name = ghost_name - ghost.key = key - if (ghost.client) - ghost.client.eye = ghost - return ..(gibbed) + ghostize() + ..(gibbed) blob_act() diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 1e1748e1cca..67a134ec9b7 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -11,7 +11,7 @@ var/adult_form var/dead_icon var/amount_grown = 0 - var/max_grown = 10 + var/max_grown = 200 var/time_of_birth var/language diff --git a/code/modules/mob/living/carbon/alien/death.dm b/code/modules/mob/living/carbon/alien/death.dm index 7dfd2cc0ebc..3c561652137 100644 --- a/code/modules/mob/living/carbon/alien/death.dm +++ b/code/modules/mob/living/carbon/alien/death.dm @@ -1,13 +1,4 @@ /mob/living/carbon/alien/death(gibbed) - - if(stat == DEAD) return - if(healths) healths.icon_state = "health6" - stat = DEAD - - if(dead_icon) icon_state = dead_icon - - if(!gibbed) - update_canmove() - if(client) blind.layer = 0 - - return ..(gibbed) \ No newline at end of file + if(!gibbed && dead_icon) + icon_state = dead_icon + return ..(gibbed,"lets out a waning guttural screech, green blood bubbling from its maw.") \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/diona/diona.dm b/code/modules/mob/living/carbon/alien/diona/diona.dm index a91f55d4b6b..fd5a80de667 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona.dm @@ -6,21 +6,12 @@ icon_state = "nymph" language = "Rootspeak" - amount_grown = 0 - max_grown = 5 // Target number of donors. - - var/list/donors = list() - var/last_checked_stage = 0 - - universal_understand = 0 // Dionaea do not need to speak to people - universal_speak = 0 // before becoming an adult. Use *chirp. + universal_understand = 1 + universal_speak = 0 // Dionaea do not need to speak to people other than other dionaea. holder_type = /obj/item/weapon/holder/diona /mob/living/carbon/alien/diona/New() ..() species = all_species["Diona"] - verbs += /mob/living/carbon/proc/eat_weeds - verbs += /mob/living/carbon/proc/fertilize_plant - verbs += /mob/living/carbon/alien/diona/proc/steal_blood verbs += /mob/living/carbon/alien/diona/proc/merge \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm b/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm index 82f7a78902c..a379af21c76 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm @@ -11,5 +11,6 @@ src.loc = M else get_scooped(M) + return ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/diona/diona_powers.dm b/code/modules/mob/living/carbon/alien/diona/diona_powers.dm index b8a47501a8f..65e1f6b1c00 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona_powers.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona_powers.dm @@ -5,6 +5,9 @@ set name = "Merge with gestalt" set desc = "Merge with another diona." + if(stat == DEAD || paralysis || weakened || stunned || restrained()) + return + if(istype(src.loc,/mob/living/carbon)) src.verbs -= /mob/living/carbon/alien/diona/proc/merge return @@ -40,6 +43,9 @@ set name = "Split from gestalt" set desc = "Split away from your gestalt as a lone nymph." + if(stat == DEAD || paralysis || weakened || stunned || restrained()) + return + if(!(istype(src.loc,/mob/living/carbon))) src.verbs -= /mob/living/carbon/alien/diona/proc/split return @@ -57,34 +63,4 @@ for(var/atom/A in M.contents) if(istype(A,/mob/living/simple_animal/borer) || istype(A,/obj/item/weapon/holder)) return - M.status_flags &= ~PASSEMOTES - -/mob/living/carbon/alien/diona/proc/steal_blood() - set category = "Abilities" - set name = "Steal Blood" - set desc = "Take a blood sample from a suitable donor." - - var/list/choices = list() - for(var/mob/living/carbon/human/H in oview(1,src)) - if(src.Adjacent(H)) - choices += H - - var/mob/living/carbon/human/M = input(src,"Who do you wish to take a sample from?") in null|choices - - if(!M || !src) return - - if(M.species.flags & NO_BLOOD) - src << "\red That donor has no blood to take." - return - - if(donors.Find(M.real_name)) - src << "\red That donor offers you nothing new." - return - - src.visible_message("\red [src] flicks out a feeler and neatly steals a sample of [M]'s blood.","\red You flick out a feeler and neatly steal a sample of [M]'s blood.") - donors += M.real_name - for(var/datum/language/L in M.languages) - languages |= L - - spawn(25) - update_progression() \ No newline at end of file + M.status_flags &= ~PASSEMOTES \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/diona/progression.dm b/code/modules/mob/living/carbon/alien/diona/progression.dm index b99f593a100..fa567cbb443 100644 --- a/code/modules/mob/living/carbon/alien/diona/progression.dm +++ b/code/modules/mob/living/carbon/alien/diona/progression.dm @@ -16,25 +16,4 @@ del(L) src.visible_message("\red [src] begins to shift and quiver, and erupts in a shower of shed bark as it splits into a tangle of nearly a dozen new dionaea.","\red You begin to shift and quiver, feeling your awareness splinter. All at once, we consume our stored nutrients to surge with growth, splitting into a tangle of at least a dozen new dionaea. We have attained our gestalt form.") - return "Diona" - -/mob/living/carbon/alien/diona/show_evolution_blurb() - //TODO - return - -/mob/living/carbon/alien/diona/update_progression() - - amount_grown = donors.len - - if(amount_grown <= last_checked_stage) - return - - // Only fire off these messages once. - last_checked_stage = amount_grown - if(amount_grown == max_grown) - src << "\green You feel ready to move on to your next stage of growth." - else if(amount_grown == 3) - universal_understand = 1 - src << "\green You feel your awareness expand, and realize you know how to understand the creatures around you." - else - src << "\green The blood seeps into your small form, and you draw out the echoes of memories and personality from it, working them into your budding mind." \ No newline at end of file + return "Diona" \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/emote.dm b/code/modules/mob/living/carbon/alien/emote.dm index 0efcae7c911..b3b0ae53c18 100644 --- a/code/modules/mob/living/carbon/alien/emote.dm +++ b/code/modules/mob/living/carbon/alien/emote.dm @@ -36,6 +36,9 @@ if (!muzzled) message = "[src] burps." m_type = 2 + if("deathgasp") + message = "The [src.name] lets out a waning guttural screech, green blood bubbling from its maw." + m_type = 2 if("scratch") if (!src.restrained()) message = "The [src.name] scratches." diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 8dd64654b7b..2369cb9fe58 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -5,10 +5,6 @@ speak_emote = list("hisses") icon_state = "larva" language = "Hivemind" - - amount_grown = 0 - max_grown = 200 - maxHealth = 25 health = 25 diff --git a/code/modules/mob/living/carbon/alien/larva/progression.dm b/code/modules/mob/living/carbon/alien/larva/progression.dm index 50d75af813f..05bab1bfde6 100644 --- a/code/modules/mob/living/carbon/alien/larva/progression.dm +++ b/code/modules/mob/living/carbon/alien/larva/progression.dm @@ -1,8 +1,3 @@ -/mob/living/carbon/alien/larva/update_progression() - if(amount_grown < max_grown) - amount_grown++ - return - /mob/living/carbon/alien/larva/confirm_evolution() src << "\blue You are growing into a beautiful alien! It is time to choose a caste." diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index 7a51069fe87..67488df9ebc 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -61,28 +61,28 @@ silent = 0 else updatehealth() - + handle_stunned() + handle_weakened() if(health <= 0) death() blinded = 1 silent = 0 return 1 - if(paralysis) - AdjustParalysis(-1) + if(paralysis && paralysis > 0) + handle_paralysed() blinded = 1 stat = UNCONSCIOUS if(halloss > 0) adjustHalLoss(-3) - else if(sleeping) + if(sleeping) adjustHalLoss(-3) if (mind) if((mind.active && client != null) || immune_to_ssd) sleeping = max(sleeping-1, 0) blinded = 1 stat = UNCONSCIOUS - else if(resting) if(halloss > 0) adjustHalLoss(-3) diff --git a/code/modules/mob/living/carbon/alien/progression.dm b/code/modules/mob/living/carbon/alien/progression.dm index fe3ec5d2d5d..b6306ed5e2a 100644 --- a/code/modules/mob/living/carbon/alien/progression.dm +++ b/code/modules/mob/living/carbon/alien/progression.dm @@ -41,6 +41,8 @@ del(src) /mob/living/carbon/alien/proc/update_progression() + if(amount_grown < max_grown) + amount_grown++ return /mob/living/carbon/alien/proc/confirm_evolution() diff --git a/code/modules/mob/living/carbon/alien/say.dm b/code/modules/mob/living/carbon/alien/say.dm index 8b13a07fdc2..038c77fcde3 100644 --- a/code/modules/mob/living/carbon/alien/say.dm +++ b/code/modules/mob/living/carbon/alien/say.dm @@ -15,21 +15,12 @@ if(copytext(message,1,2) == "*") return emote(copytext(message,2)) - var/datum/language/speaking = null - - if(length(message) >= 2) - var/channel_prefix = copytext(message, 1 ,3) - if(languages.len) - for(var/datum/language/L in languages) - if(lowertext(channel_prefix) == ":[L.key]") - verb = L.speech_verb - speaking = L - break + var/datum/language/speaking = parse_language(message) if(speaking) - message = trim(copytext(message,3)) + message = copytext(message, 2+length(speaking.key)) - message = capitalize(trim_left(message)) + message = trim(message) if(!message || stat) return diff --git a/code/modules/mob/living/carbon/brain/death.dm b/code/modules/mob/living/carbon/brain/death.dm index 897b03c8a14..ecb729ece90 100644 --- a/code/modules/mob/living/carbon/brain/death.dm +++ b/code/modules/mob/living/carbon/brain/death.dm @@ -1,43 +1,12 @@ /mob/living/carbon/brain/death(gibbed) - if(stat == DEAD) return - if(!gibbed && container && istype(container, /obj/item/device/mmi))//If not gibbed but in a container. - for(var/mob/O in viewers(container, null)) - O.show_message(text("\red []'s MMI flatlines!", src), 1, "\red You hear something flatline.", 2) + if(!gibbed && istype(container, /obj/item/device/mmi)) //If not gibbed but in a container. container.icon_state = "mmi_dead" - stat = DEAD - - if(blind) blind.layer = 0 - sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO - - tod = worldtime2text() //weasellos time of death patch - if(mind) mind.store_memory("Time of death: [tod]", 0) //mind. ? - - return ..(gibbed) + return ..(gibbed,"beeps shrilly as the MMI flatlines!") /mob/living/carbon/brain/gib() - death(1) - var/atom/movable/overlay/animation = null - monkeyizing = 1 - canmove = 0 - icon = null - invisibility = 101 - - animation = new(loc) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src - -// flick("gibbed-m", animation) - gibs(loc, viruses, dna) - - dead_mob_list -= src - if(container && istype(container, /obj/item/device/mmi)) + if(istype(container, /obj/item/device/mmi)) del(container)//Gets rid of the MMI if there is one if(loc) if(istype(loc,/obj/item/organ/brain)) del(loc)//Gets rid of the brain item - spawn(15) - if(animation) del(animation) - if(src) del(src) \ No newline at end of file + ..(null,1) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/brain/say.dm b/code/modules/mob/living/carbon/brain/say.dm index 6c2394eb614..ecfb8256848 100644 --- a/code/modules/mob/living/carbon/brain/say.dm +++ b/code/modules/mob/living/carbon/brain/say.dm @@ -2,10 +2,23 @@ /mob/living/carbon/brain/say(var/message) if (silent) return - - if(!(container && istype(container, /obj/item/device/mmi))) + + if(!(container && istype(container, /obj/item/device/mmi))) return //No MMI, can't speak, bucko./N else + var/datum/language/speaking = parse_language(message) + if(speaking) + message = copytext(message, 2+length(speaking.key)) + var/verb = "says" + var/ending = copytext(message, length(message)) + if (speaking) + verb = speaking.get_spoken_verb(ending) + else + if(ending=="!") + verb=pick("exclaims","shouts","yells") + if(ending=="?") + verb="asks" + if(prob(emp_damage*4)) if(prob(10))//10% chane to drop the message entirely return @@ -14,5 +27,5 @@ if(istype(container, /obj/item/device/mmi/radio_enabled)) var/obj/item/device/mmi/radio_enabled/R = container if(R.radio) - spawn(0) R.radio.hear_talk(src, sanitize(message)) + spawn(0) R.radio.hear_talk(src, trim(sanitize(message)), verb, speaking) ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 67197567440..e1e43926c31 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -57,7 +57,7 @@ for(var/mob/N in viewers(src, null)) if(N.client) N.show_message(text("\red [M] bursts out of [src]!"), 2) - . = ..() + . = ..(null,1) /mob/living/carbon/attack_hand(mob/M as mob) if(!istype(M, /mob/living/carbon)) return diff --git a/code/modules/mob/living/carbon/carbon_powers.dm b/code/modules/mob/living/carbon/carbon_powers.dm index 7dc0f45087a..65fcbc7b17e 100644 --- a/code/modules/mob/living/carbon/carbon_powers.dm +++ b/code/modules/mob/living/carbon/carbon_powers.dm @@ -1,43 +1,3 @@ -//TODO: Consider renaming carbon/monkey to carbon/small. - -/mob/living/carbon/proc/fertilize_plant() - - set category = "Abilities" - set name = "Fertilize plant" - set desc = "Turn your food into nutrients for plants." - - var/list/trays = list() - for(var/obj/machinery/portable_atmospherics/hydroponics/tray in range(1)) - if(tray.nutrilevel < 10 && src.Adjacent(tray)) - trays += tray - - var/obj/machinery/portable_atmospherics/hydroponics/target = input("Select a tray:") as null|anything in trays - - if(!src || !target || target.nutrilevel == 10) return //Sanity check. - - src.nutrition -= ((10-target.nutrilevel)*5) - target.nutrilevel = 10 - src.visible_message("\red [src] secretes a trickle of green liquid, refilling [target]'s nutrient tray.","\red You secrete a trickle of green liquid from your tail, refilling [target]'s nutrient tray.") - -/mob/living/carbon/proc/eat_weeds() - - set category = "Abilities" - set name = "Eat Weeds" - set desc = "Clean the weeds out of soil or a hydroponics tray." - - var/list/trays = list() - for(var/obj/machinery/portable_atmospherics/hydroponics/tray in range(1)) - if(tray.weedlevel > 0 && src.Adjacent(tray)) - trays += tray - - var/obj/machinery/portable_atmospherics/hydroponics/target = input("Select a tray:") as null|anything in trays - - if(!src || !target || target.weedlevel == 0) return //Sanity check. - - src.reagents.add_reagent("nutriment", target.weedlevel) - target.weedlevel = 0 - src.visible_message("\red [src] begins rooting through [target], ripping out weeds and eating them noisily.","\red You begin rooting through [target], ripping out weeds and eating them noisily.") - //Brain slug proc for voluntary removal of control. /mob/living/carbon/proc/release_control() diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index d8f4e313c6d..d71404e624a 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -1,15 +1,4 @@ /mob/living/carbon/human/gib() - death(1) - var/atom/movable/overlay/animation = null - monkeyizing = 1 - canmove = 0 - icon = null - invisibility = 101 - - animation = new(loc) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src for(var/datum/organ/external/E in src.organs) if(istype(E, /datum/organ/external/chest)) @@ -19,49 +8,25 @@ // Override the current limb status and don't cause an explosion E.droplimb(1,1) + ..(species ? species.gibbed_anim : "gibbed-h") + if(species) - flick(species.gibbed_anim, animation) hgibs(loc, viruses, dna, species.flesh_color, species.blood_color) else - flick("gibbed-h", animation) hgibs(loc, viruses, dna) - spawn(15) - if(animation) del(animation) - if(src) del(src) - /mob/living/carbon/human/dust() - death(1) - var/atom/movable/overlay/animation = null - monkeyizing = 1 - canmove = 0 - icon = null - invisibility = 101 - - animation = new(loc) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src - - flick(species.dusted_anim, animation) - new species.remains_type(loc) - - spawn(15) - if(animation) del(animation) - if(src) del(src) - + if(species) + ..(species.dusted_anim, species.remains_type) + else + ..() /mob/living/carbon/human/death(gibbed) - if(stat == DEAD) return - if(healths) healths.icon_state = "health5" - stat = DEAD - dizziness = 0 - jitteriness = 0 + if(stat == DEAD) return hud_updateflag |= 1 << HEALTH_HUD hud_updateflag |= 1 << STATUS_HUD - handle_hud_list() //Handle species-specific deaths. @@ -88,30 +53,17 @@ callHook("death", list(src, gibbed)) - //Check for heist mode kill count. - if(ticker.mode && ( istype( ticker.mode,/datum/game_mode/heist) ) ) - //Check for last assailant's mutantrace. - /*if( LAssailant && ( istype( LAssailant,/mob/living/carbon/human ) ) ) - var/mob/living/carbon/human/V = LAssailant - if (V.dna && (V.dna.mutantrace == "vox"))*/ //Not currently feasible due to terrible LAssailant tracking. - //world << "Vox kills: [vox_kills]" - vox_kills++ //Bad vox. Shouldn't be killing humans. + if(!gibbed && species.death_sound) + playsound(loc, species.death_sound, 80, 1, 1) - if(!gibbed) - emote("deathgasp") //let the world KNOW WE ARE DEAD // Doing this with the deathgasp emote seems odd. - if(species && species.death_sound) playsound(loc, species.death_sound, 80, 1, 1) - - update_canmove() - if(client) blind.layer = 0 - - tod = worldtime2text() //weasellos time of death patch - if(mind) mind.store_memory("Time of death: [tod]", 0) if(ticker && ticker.mode) -// world.log << "k" sql_report_death(src) - ticker.mode.check_win() //Calls the rounds wincheck, mainly for wizard, malf, and changeling now - return ..(gibbed) + ticker.mode.check_win() + if(istype(ticker.mode,/datum/game_mode/heist)) + vox_kills++ //Bad vox. Shouldn't be killing humans. + + return ..(gibbed,species.death_message) /mob/living/carbon/human/proc/makeSkeleton() if(SKELETON in src.mutations) return diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 086a1ef0aa4..361d47afc03 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -131,24 +131,26 @@ /* This is kind of convoluted, but it seems to break down like this: (note that the chance to miss is exaggerated here since ran_zone() might roll "chest" - + If aiming for chest: 80% chance you hit your target 17% chance you hit a random zone 3% chance you miss - + If aiming for something else: 68% chance you hit your target 17% chance you hit a random zone 15% chance you miss - + Why don't we just use get_zone_with_miss_chance() ??? */ if(prob(80)) hit_zone = ran_zone(hit_zone) if(prob(15) && hit_zone != "chest") // Missed! - attack_message = "[H] attempted to [pick(attack.attack_verb)] [src], but the [attack.attack_noun] missed!" + attack_message = "[H] attempted to strike [src], but missed!" miss_type = 1 + else + hit_zone = ran_zone(hit_zone) if(!miss_type && block) attack_message = "[H] went for [src]'s [affecting.display_name] but was blocked!" @@ -160,9 +162,9 @@ H.visible_message("[attack_message]") playsound(loc, ((miss_type) ? (miss_type == 1 ? attack.miss_sound : 'sound/weapons/thudswoosh.ogg') : attack.attack_sound), 25, 1, -1) - H.attack_log += text("\[[time_stamp()]\] [miss_type ? (miss_type == 1 ? "Missed" : "Blocked") : "[pick(attack.attack_verb)]ed"] [src.name] ([src.ckey])") + H.attack_log += text("\[[time_stamp()]\] [miss_type ? (miss_type == 1 ? "Missed" : "Blocked") : "[pick(attack.attack_verb)]"] [src.name] ([src.ckey])") src.attack_log += text("\[[time_stamp()]\] [miss_type ? (miss_type == 1 ? "Was missed by" : "Has blocked") : "Has Been [pick(attack.attack_verb)]ed"] by [H.name] ([H.ckey])") - msg_admin_attack("[key_name(H)] [miss_type ? (miss_type == 1 ? "has missed" : "was blocked by") : "has [pick(attack.attack_verb)]ed"] [key_name(src)]") + msg_admin_attack("[key_name(H)] [miss_type ? (miss_type == 1 ? "has missed" : "was blocked by") : "has [pick(attack.attack_verb)]"] [key_name(src)]") if(miss_type) return 0 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 058619cbc7e..997dac12127 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1245,7 +1245,7 @@ if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe client.images.Remove(hud) - client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask, global_hud.nvg, global_hud.thermal, global_hud.meson) + client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask, global_hud.nvg, global_hud.thermal, global_hud.meson, global_hud.science) update_action_buttons() diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 6b13e0b3a1c..7201cfc8e40 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -33,7 +33,7 @@ //parse the language code and consume it var/datum/language/speaking = parse_language(message) if(speaking) - message = copytext(message,3) + message = copytext(message,2+length(speaking.key)) else if(species.default_language) speaking = all_languages[species.default_language] @@ -55,7 +55,7 @@ if (istype(wear_mask, /obj/item/clothing/mask/muzzle)) return - message = capitalize(trim(message)) + message = trim(message) if(speech_problem_flag) var/list/handle_r = handle_speech_problems(message) @@ -132,10 +132,14 @@ if(used_radios.len) italics = 1 message_range = 1 - + if(speaking) + message_range = speaking.get_talkinto_msg_range(message) + var/msg + if(!speaking || !(speaking.flags & NO_TALK_MSG)) + msg = "\The [src] talks into \the [used_radios[1]]" for(var/mob/living/M in hearers(5, src)) - if(M != src) - M.show_message("[src] talks into [used_radios.len ? used_radios[1] : "the radio."]") + if((M != src) && msg) + M.show_message(msg) if (speech_sound) sound_vol *= 0.5 diff --git a/code/modules/mob/living/carbon/human/unarmed_attack.dm b/code/modules/mob/living/carbon/human/unarmed_attack.dm index b96d9b6fdb5..b80eb2b1fda 100644 --- a/code/modules/mob/living/carbon/human/unarmed_attack.dm +++ b/code/modules/mob/living/carbon/human/unarmed_attack.dm @@ -107,6 +107,7 @@ var/organ = affecting.display_name if(!skill) skill = 1 + attack_damage = Clamp(attack_damage, 1, 5) if(target == user) user.visible_message("[user] [pick(attack_verb)] \himself in the [organ]!") @@ -125,7 +126,7 @@ switch(attack_damage) if(1 to 2) user.visible_message("[user] slapped [target]'s [organ]!") if(3 to 4) user.visible_message("[user] [pick(attack_verb)] [target] in \his [organ]!") - if(5) user.visible_message("[user] slams \his [pick(attack_noun)] into [target]'s [organ]!") + if(5) user.visible_message("[user] slammed \his [pick(attack_noun)] into [target]'s [organ]!") if("groin", "l_leg", "r_leg") // -- LOWER BODY -- // switch(attack_damage) @@ -138,7 +139,7 @@ if(1 to 4) user.visible_message("[user] kicked [target] in \his [organ]!") if(5) user.visible_message("[user] stomped down hard on [target]'s [organ]!") else if (user.loc != target.loc) - user.visible_message("[user] [pick("stomped down hard on", "kicked against", "gave a strong kick against", "slams their foot into")] [target]'s [organ]!") + user.visible_message("[user] [pick("stomped down hard on", "kicked against", "gave a strong kick against", "slammed their foot into")] [target]'s [organ]!") else user.visible_message("[user] [pick("punched", "threw a punch", "struck", "slapped", "rammed their [pick(attack_noun)] into")] [target]'s [organ]!") @@ -171,13 +172,13 @@ switch(zone) if("head", "mouth", "eyes") // ----- HEAD ----- // - switch(damage) + switch(attack_damage) if(1 to 2) user.visible_message("[user] scratched [target] across \his cheek!") if(3 to 4) user.visible_message("[user] [pick(attack_verb)] [target]'s [pick("head", "neck")] [pick("", "", "", "with spread [pick(attack_noun)]")]!") if(5) user.visible_message("[pick("[user] [pick(attack_verb)] [target] across \his face!", "[user] rakes \his [pick(attack_noun)] across [target]'s face!")]") if("chest", "l_arm", "r_arm", "l_hand", "r_hand", "groin", "l_leg", "r_leg", "l_foot", "r_foot") // ----- BODY ----- // - switch(damage) + switch(attack_damage) if(1 to 2) user.visible_message("[user] scratched [target]'s [affecting.display_name]!") if(3 to 4) user.visible_message("[user] [pick(attack_verb)] [pick("", "", "the side of")] [target]'s [affecting.display_name]!") if(5) user.visible_message("[user] tears \his [pick(attack_noun)] deep into [target]'s [affecting.display_name]!") diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index cae4b354268..860f5a9a25f 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -760,8 +760,8 @@ proc/get_damage_icon_part(damage_state, body_part) /mob/living/carbon/human/update_inv_wear_suit(var/update_icons=1) - if( wear_suit && istype(wear_suit, /obj/item/clothing/suit) ) //TODO check this - wear_suit.screen_loc = ui_oclothing //TODO + if( wear_suit && istype(wear_suit, /obj/item/) ) + wear_suit.screen_loc = ui_oclothing var/image/standing @@ -831,7 +831,7 @@ proc/get_damage_icon_part(damage_state, body_part) if(back.icon_override) overlays_standing[BACK_LAYER] = image("icon" = back.icon_override, "icon_state" = "[back.icon_state]") //If this is a rig and a mob_icon is set, it will take species into account in the rig update_icon() proc. - else if(istype(rig) && !rig.offline && rig.mob_icon) + else if(istype(rig) && rig.mob_icon) overlays_standing[BACK_LAYER] = rig.mob_icon else if(back.sprite_sheets && back.sprite_sheets[species.name]) overlays_standing[BACK_LAYER] = image("icon" = back.sprite_sheets[species.name], "icon_state" = "[back.icon_state]") diff --git a/code/modules/mob/living/carbon/human/whisper.dm b/code/modules/mob/living/carbon/human/whisper.dm index dc81d3d1b5b..0c6b9e147f9 100644 --- a/code/modules/mob/living/carbon/human/whisper.dm +++ b/code/modules/mob/living/carbon/human/whisper.dm @@ -29,7 +29,7 @@ //parse the language code and consume it var/datum/language/speaking = parse_language(message) if (speaking) - message = copytext(message,3) + message = copytext(message,2+length(speaking.key)) whisper_say(message, speaking, alt_name) @@ -49,7 +49,7 @@ else var/adverb = pick("quietly", "softly") verb = "[speaking.speech_verb] [adverb]" - not_heard = "[verb] something [adverb]" + not_heard = "[speaking.speech_verb] something [adverb]" else not_heard = "[verb] something" //TODO get rid of the null language and just prevent speech if language is null @@ -126,7 +126,7 @@ for (var/obj/O in view(message_range, src)) spawn (0) if (O) - O.hear_talk(src, message) //O.hear_talk(src, message, verb, speaking) + O.hear_talk(src, message, verb, speaking) var/list/eavesdropping = hearers(eavesdropping_range, src) eavesdropping -= src diff --git a/code/modules/mob/living/carbon/metroid/death.dm b/code/modules/mob/living/carbon/metroid/death.dm index b8e004e2016..2ebc5c576b5 100644 --- a/code/modules/mob/living/carbon/metroid/death.dm +++ b/code/modules/mob/living/carbon/metroid/death.dm @@ -1,4 +1,8 @@ /mob/living/carbon/slime/death(gibbed) + + if(stat == DEAD) return + stat = DEAD + if(!gibbed) if(is_adult) var/mob/living/carbon/slime/M = new /mob/living/carbon/slime(loc) @@ -12,17 +16,7 @@ name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])" return - if(stat == DEAD) return - 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() - if(blind) blind.layer = 0 - - if(ticker && ticker.mode) - ticker.mode.check_win() + overlays.Cut() return ..(gibbed) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/death.dm b/code/modules/mob/living/carbon/monkey/death.dm index 8e982eb9356..6d0c48c804c 100644 --- a/code/modules/mob/living/carbon/monkey/death.dm +++ b/code/modules/mob/living/carbon/monkey/death.dm @@ -1,56 +1,8 @@ /mob/living/carbon/monkey/gib() - death(1) - var/atom/movable/overlay/animation = null - monkeyizing = 1 - canmove = 0 - icon = null - invisibility = 101 - - animation = new(loc) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src - - flick("gibbed-m", animation) - gibs(loc, viruses, dna) - - spawn(15) - if(animation) del(animation) - if(src) del(src) + ..(null,1) /mob/living/carbon/monkey/dust() - death(1) - var/atom/movable/overlay/animation = null - monkeyizing = 1 - canmove = 0 - icon = null - invisibility = 101 - - animation = new(loc) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src - - flick("dust-m", animation) - new /obj/effect/decal/cleanable/ash(loc) - - spawn(15) - if(animation) del(animation) - if(src) del(src) - + ..("dust-m") /mob/living/carbon/monkey/death(gibbed) - if(stat == DEAD) return - if(healths) healths.icon_state = "health5" - stat = DEAD - - if(!gibbed) - for(var/mob/O in viewers(src, null)) - O.show_message("The [name] lets out a faint chimper as it collapses and stops moving...", 1) //ded -- Urist - - update_canmove() - if(blind) blind.layer = 0 - - ticker.mode.check_win() - - return ..(gibbed) \ No newline at end of file + ..(gibbed,"lets out a faint chimper as it collapses and stops moving...") \ No newline at end of file diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index f883ce46ff1..5ca7d569dd3 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -457,8 +457,9 @@ set name = "Resist" set category = "IC" - if(!isliving(usr) || usr.next_move > world.time) + if(usr.stat || !isliving(usr) || usr.next_move > world.time) return + usr.next_move = world.time + 20 var/mob/living/L = usr diff --git a/code/modules/mob/living/living_powers.dm b/code/modules/mob/living/living_powers.dm index d2a8e35320e..da94c1abdef 100644 --- a/code/modules/mob/living/living_powers.dm +++ b/code/modules/mob/living/living_powers.dm @@ -2,14 +2,20 @@ set name = "Crawl through Vent" set desc = "Enter an air vent and crawl through the pipe system." set category = "Abilities" + + if(stat == DEAD || paralysis || weakened || stunned || restrained()) + return + handle_ventcrawl() - return /mob/living/proc/hide() set name = "Hide" set desc = "Allows to hide beneath tables or certain items. Toggled on or off." set category = "Abilities" + if(stat == DEAD || paralysis || weakened || stunned || restrained()) + return + if (layer != TURF_LAYER+0.2) layer = TURF_LAYER+0.2 src << text("\blue You are now hiding.") diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 28404b3d8a9..622ee23bc7b 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -13,7 +13,7 @@ var/list/department_radio_keys = list( ":t" = "Mercenary", "#t" = "Mercenary", ".t" = "Mercenary", ":u" = "Supply", "#u" = "Supply", ".u" = "Supply", ":v" = "Service", "#v" = "Service", ".v" = "Service", - ":o" = "AI Private", "#o" = "AI Private", ".o" = "AI Private", + ":p" = "AI Private", "#p" = "AI Private", ".p" = "AI Private", ":R" = "right ear", "#R" = "right ear", ".R" = "right ear", ":L" = "left ear", "#L" = "left ear", ".L" = "left ear", @@ -28,7 +28,7 @@ var/list/department_radio_keys = list( ":T" = "Mercenary", "#T" = "Mercenary", ".T" = "Mercenary", ":U" = "Supply", "#U" = "Supply", ".U" = "Supply", ":V" = "Service", "#V" = "Service", ".V" = "Service", - ":O" = "AI Private", "#O" = "AI Private", ".O" = "AI Private", + ":P" = "AI Private", "#P" = "AI Private", ".P" = "AI Private", //kinda localization -- rastaf0 //same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding. @@ -91,7 +91,7 @@ proc/get_radio_key_from_channel(var/channel) if (speaking.flags & SIGNLANG) return say_signlang(message, pick(speaking.signlang_verb), speaking) - + var/list/listening = list() var/list/listening_obj = list() @@ -101,11 +101,11 @@ proc/get_radio_key_from_channel(var/channel) var/pressure = (environment)? environment.return_pressure() : 0 if(pressure < SOUND_MINIMUM_PRESSURE) message_range = 1 - + if (pressure < ONE_ATMOSPHERE*0.4) //sound distortion pressure, to help clue people in that the air is thin, even if it isn't a vacuum yet italics = 1 sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact - + var/list/hear = hear(message_range, T) var/list/hearturfs = list() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 77aa73cb72b..12b6301c4bc 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -421,13 +421,6 @@ var/list/ai_verbs_default = list( user.reset_view(camera) return 1 -/mob/living/silicon/ai/blob_act() - if (stat != 2) - adjustBruteLoss(60) - updatehealth() - return 1 - return 0 - /mob/living/silicon/ai/restrained() return 0 @@ -440,26 +433,6 @@ var/list/ai_verbs_default = list( ai_call_shuttle() ..() -/mob/living/silicon/ai/ex_act(severity) - if(!blinded) - flick("flash", flash) - - switch(severity) - if(1.0) - if (stat != 2) - adjustBruteLoss(100) - adjustFireLoss(100) - if(2.0) - if (stat != 2) - adjustBruteLoss(60) - adjustFireLoss(60) - if(3.0) - if (stat != 2) - adjustBruteLoss(30) - - updatehealth() - - /mob/living/silicon/ai/Topic(href, href_list) if(usr != src) return @@ -525,11 +498,6 @@ var/list/ai_verbs_default = list( updatehealth() return -/mob/living/silicon/ai/bullet_act(var/obj/item/projectile/Proj) - ..(Proj) - updatehealth() - return 2 - /mob/living/silicon/ai/reset_view(atom/A) if(camera) camera.SetLuminosity(0) diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index 596b7c397c1..34281e8c0c0 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -1,20 +1,19 @@ /mob/living/silicon/ai/death(gibbed) - if(stat == DEAD) return - stat = DEAD + + if(stat == DEAD) + return + if (src.custom_sprite == 1)//check for custom AI sprite, defaulting to blue screen if no. icon_state = "[ckey]-ai-crash" - else icon_state = "ai-crash" - update_canmove() + else + icon_state = "ai-crash" + if(src.eyeobj) src.eyeobj.setLoc(get_turf(src)) - if(blind) blind.layer = 0 - sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO + remove_ai_verbs(src) var/callshuttle = 0 - for(var/obj/machinery/computer/communications/commconsole in world) if(commconsole.z == 2) continue @@ -48,14 +47,11 @@ spawn(10) explosion(src.loc, 3, 6, 12, 15) - for(var/obj/machinery/ai_status_display/O in world) //change status + for(var/obj/machinery/ai_status_display/O in world) spawn( 0 ) O.mode = 2 if (istype(loc, /obj/item/device/aicard)) var/obj/item/device/aicard/card = loc card.update_icon() - tod = worldtime2text() //weasellos time of death patch - if(mind) mind.store_memory("Time of death: [tod]", 0) - return ..(gibbed) diff --git a/code/modules/mob/living/silicon/death.dm b/code/modules/mob/living/silicon/death.dm index 45b0268437d..2b56af75378 100644 --- a/code/modules/mob/living/silicon/death.dm +++ b/code/modules/mob/living/silicon/death.dm @@ -1,41 +1,12 @@ /mob/living/silicon/gib() - death(1) - var/atom/movable/overlay/animation = null - monkeyizing = 1 - canmove = 0 - icon = null - invisibility = 101 - - animation = new(loc) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src - -// flick("gibbed-r", animation) + ..("gibbed-r") robogibs(loc, viruses) - dead_mob_list -= src - spawn(15) - if(animation) del(animation) - if(src) del(src) - /mob/living/silicon/dust() - death(1) - var/atom/movable/overlay/animation = null - monkeyizing = 1 - canmove = 0 - icon = null - invisibility = 101 + ..("dust-r", /obj/effect/decal/remains/robot) - animation = new(loc) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src - -// flick("dust-r", animation) - new /obj/effect/decal/remains/robot(loc) - - dead_mob_list -= src - spawn(15) - if(animation) del(animation) - if(src) del(src) +/mob/living/silicon/death(gibbed,deathmessage) + if(in_contents_of(/obj/machinery/recharge_station))//exit the recharge station + var/obj/machinery/recharge_station/RC = loc + RC.go_out() + return ..(gibbed,deathmessage) \ No newline at end of file diff --git a/code/modules/mob/living/silicon/decoy/death.dm b/code/modules/mob/living/silicon/decoy/death.dm index d3996e2fa70..b94a311ef7a 100644 --- a/code/modules/mob/living/silicon/decoy/death.dm +++ b/code/modules/mob/living/silicon/decoy/death.dm @@ -1,10 +1,8 @@ /mob/living/silicon/decoy/death(gibbed) if(stat == DEAD) return - stat = DEAD icon_state = "ai-crash" spawn(10) explosion(loc, 3, 6, 12, 15) - for(var/obj/machinery/ai_status_display/O in world) //change status O.mode = 2 return ..(gibbed) \ No newline at end of file diff --git a/code/modules/mob/living/silicon/pai/death.dm b/code/modules/mob/living/silicon/pai/death.dm index 127091a854c..87e70393d0f 100644 --- a/code/modules/mob/living/silicon/pai/death.dm +++ b/code/modules/mob/living/silicon/pai/death.dm @@ -1,18 +1,13 @@ /mob/living/silicon/pai/death(gibbed) - if(stat == DEAD) return - stat = DEAD - canmove = 0 - if(blind) blind.layer = 0 - sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO - - //var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch - //mind.store_memory("Time of death: [tod]", 0) - - //New pAI's get a brand new mind to prevent meta stuff from their previous life. This new mind causes problems down the line if it's not deleted here. - //Read as: I have no idea what I'm doing but asking for help got me nowhere so this is what you get. - Nodrak - if(mind) del(mind) - living_mob_list -= src + if(card) + card.removePersonality() + if(gibbed) + src.loc = get_turf(card) + del(card) + else + close_up() + if(mind) + del(mind) + ..(gibbed) ghostize() del(src) \ No newline at end of file diff --git a/code/modules/mob/living/silicon/pai/examine.dm b/code/modules/mob/living/silicon/pai/examine.dm index 7565c35844b..109e4ce43fe 100644 --- a/code/modules/mob/living/silicon/pai/examine.dm +++ b/code/modules/mob/living/silicon/pai/examine.dm @@ -1,26 +1,19 @@ -/mob/living/silicon/pai/examine(mob/user) //removed as it was pointless...moved to the pai-card instead. - /*..(user) +/mob/living/silicon/pai/examine(mob/user) + ..(user, infix = ", personal AI") var/msg = "" - if (src.stat == DEAD) - msg += "It appears to be offline.\n" - else - msg += "" - if (src.getBruteLoss()) - if (src.getBruteLoss() < 30) - msg += "It looks slightly dented.\n" - else - msg += "Its casing appears cracked and broken!\n" - if (src.getFireLoss()) - if (src.getFireLoss() < 30) - msg += "It looks slightly charred!\n" - else - msg += "Its casing is melted and heat-warped!\n" - if (src.stat == UNCONSCIOUS) - msg += "It doesn't seem to be responding and its text-output is lagging.\n" - msg += "" - msg += "*---------*" + switch(src.stat) + if(CONSCIOUS) + if(!src.client) msg += "\nIt appears to be in stand-by mode." //afk + if(UNCONSCIOUS) msg += "\nIt doesn't seem to be responding." + if(DEAD) msg += "\nIt looks completely unsalvageable." + msg += "\n*---------*" - user << msg - */ - return \ No newline at end of file + if(print_flavor_text()) msg += "\n[print_flavor_text()]\n" + + if (pose) + if( findtext(pose,".",lentext(pose)) == 0 && findtext(pose,"!",lentext(pose)) == 0 && findtext(pose,"?",lentext(pose)) == 0 ) + pose = addtext(pose,".") //Makes sure all emotes end with a period. + msg += "\nIt is [pose]" + + user << msg \ No newline at end of file diff --git a/code/modules/mob/living/silicon/pai/life.dm b/code/modules/mob/living/silicon/pai/life.dm index 423287f60c1..6c099af932a 100644 --- a/code/modules/mob/living/silicon/pai/life.dm +++ b/code/modules/mob/living/silicon/pai/life.dm @@ -1,6 +1,8 @@ /mob/living/silicon/pai/Life() + if (src.stat == 2) return + if(src.cable) if(get_dist(src, src.cable) > 1) var/turf/T = get_turf_or_move(src.loc) @@ -9,20 +11,26 @@ del(src.cable) regular_hud_updates() + if(src.secHUD == 1) process_sec_hud(src, 1) + if(src.medHUD == 1) process_med_hud(src, 1) + if(silence_time) if(world.timeofday >= silence_time) silence_time = null src << "Communication circuit reinitialized. Speech and messaging functionality restored." + handle_statuses() + if(health <= 0) + death(null,"gives one shrill beep before falling lifeless.") + /mob/living/silicon/pai/updatehealth() if(status_flags & GODMODE) health = 100 stat = CONSCIOUS else - health = 100 - getBruteLoss() - getFireLoss() - + health = 100 - getBruteLoss() - getFireLoss() \ No newline at end of file diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index d8bf9706fd8..10de649a79c 100755 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -169,28 +169,7 @@ if(3) src << "You feel an electric surge run through your circuitry and become acutely aware at how lucky you are that you can still feel at all." -/mob/living/silicon/pai/ex_act(severity) - if(!blinded) - flick("flash", src.flash) - - switch(severity) - if(1.0) - if (src.stat != 2) - adjustBruteLoss(100) - adjustFireLoss(100) - if(2.0) - if (src.stat != 2) - adjustBruteLoss(60) - adjustFireLoss(60) - if(3.0) - if (src.stat != 2) - adjustBruteLoss(30) - - src.updatehealth() - - // See software.dm for Topic() - /mob/living/silicon/pai/meteorhit(obj/O as obj) for(var/mob/M in viewers(src, null)) M.show_message(text("\red [] has been hit by []", src, O), 1) @@ -201,10 +180,6 @@ src.updatehealth() return -//mob/living/silicon/pai/bullet_act(var/obj/item/projectile/Proj) - -///mob/living/silicon/pai/attack_hand(mob/living/carbon/M as mob) - /mob/living/silicon/pai/proc/switchCamera(var/obj/machinery/camera/C) if(istype(usr, /mob/living)) var/mob/living/U = usr @@ -376,7 +351,8 @@ src.updatehealth() else visible_message("[user.name] bonks [src] harmlessly with [W].") - if(stat != 2) close_up() + spawn(1) + if(stat != 2) close_up() return /mob/living/silicon/pai/attack_hand(mob/user as mob) @@ -415,26 +391,6 @@ else src << "You are too small to pull that." -/mob/living/silicon/pai/examine(mob/user) - ..(user) - - var/msg = "" - switch(src.stat) - if(CONSCIOUS) - if(!src.client) msg += "\nIt appears to be in stand-by mode." //afk - if(UNCONSCIOUS) msg += "\nIt doesn't seem to be responding." - if(DEAD) msg += "\nIt looks completely unsalvageable." - msg += "\n*---------*" - - if(print_flavor_text()) msg += "\n[print_flavor_text()]\n" - - if (pose) - if( findtext(pose,".",lentext(pose)) == 0 && findtext(pose,"!",lentext(pose)) == 0 && findtext(pose,"?",lentext(pose)) == 0 ) - pose = addtext(pose,".") //Makes sure all emotes end with a period. - msg += "\nIt is [pose]" - - user << msg - // No binary for pAIs. /mob/living/silicon/pai/binarycheck() - return 0 + return 0 \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm index b16efbc34f7..ca3c80d3a74 100644 --- a/code/modules/mob/living/silicon/robot/death.dm +++ b/code/modules/mob/living/silicon/robot/death.dm @@ -1,72 +1,15 @@ -/mob/living/silicon/robot/gib() - //robots don't die when gibbed. instead they drop their MMI'd brain - var/atom/movable/overlay/animation = null - monkeyizing = 1 - canmove = 0 - icon = null - invisibility = 101 - - animation = new(loc) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src - - flick("gibbed-r", animation) - robogibs(loc, viruses) - - living_mob_list -= src - dead_mob_list -= src - spawn(15) - if(animation) del(animation) - if(src) del(src) - /mob/living/silicon/robot/dust() - death(1) - var/atom/movable/overlay/animation = null - monkeyizing = 1 - canmove = 0 - icon = null - invisibility = 101 - - animation = new(loc) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src - - flick("dust-r", animation) - new /obj/effect/decal/remains/robot(loc) - if(mmi) del(mmi) //Delete the MMI first so that it won't go popping out. - - dead_mob_list -= src - spawn(15) - if(animation) del(animation) - if(src) del(src) - + //Delete the MMI first so that it won't go popping out. + if(mmi) + del(mmi) + ..() /mob/living/silicon/robot/death(gibbed) - if(stat == DEAD) return - if(!gibbed) - emote("deathgasp") - stat = DEAD - update_canmove() if(camera) camera.status = 0 - - if(in_contents_of(/obj/machinery/recharge_station))//exit the recharge station - var/obj/machinery/recharge_station/RC = loc - RC.go_out() - + if(module) + var/obj/item/weapon/gripper/G = locate(/obj/item/weapon/gripper) in module + if(G) G.drop_item() remove_robot_verbs() - - if(blind) blind.layer = 0 - sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO - updateicon() - - tod = worldtime2text() //weasellos time of death patch - if(mind) mind.store_memory("Time of death: [tod]", 0) - sql_report_cyborg_death(src) - - return ..(gibbed) \ No newline at end of file + ..(gibbed,"shudders violently for a moment, then becomes motionless, its eyes slowly darkening.") diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 505b2e47ffb..7443bd7464d 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -200,14 +200,6 @@ return ..() -/mob/living/silicon/robot/drone/death(gibbed) - - if(module) - var/obj/item/weapon/gripper/G = locate(/obj/item/weapon/gripper) in module - if(G) G.drop_item() - - ..(gibbed) - //DRONE MOVEMENT. /mob/living/silicon/robot/drone/Process_Spaceslipping(var/prob_slip) //TODO: Consider making a magboot item for drones to equip. ~Z diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index f2aa919eb00..2d6685d8b21 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -515,13 +515,6 @@ var/list/robot_verbs_default = list( C.toggled = 1 src << "\red You enable [C.name]." -/mob/living/silicon/robot/blob_act() - if (stat != 2) - adjustBruteLoss(60) - updatehealth() - return 1 - return 0 - // this function shows information about the malf_ai gameplay type in the status screen /mob/living/silicon/robot/show_malf_ai() ..() @@ -575,29 +568,6 @@ var/list/robot_verbs_default = list( /mob/living/silicon/robot/restrained() return 0 - -/mob/living/silicon/robot/ex_act(severity) - if(!blinded) - flick("flash", flash) - - switch(severity) - if(1.0) - if (stat != 2) - adjustBruteLoss(100) - adjustFireLoss(100) - gib() - return - if(2.0) - if (stat != 2) - adjustBruteLoss(60) - adjustFireLoss(60) - if(3.0) - if (stat != 2) - adjustBruteLoss(30) - - updatehealth() - - /mob/living/silicon/robot/meteorhit(obj/O as obj) for(var/mob/M in viewers(src, null)) M.show_message(text("\red [src] has been hit by [O]"), 1) @@ -609,14 +579,11 @@ var/list/robot_verbs_default = list( updatehealth() return - /mob/living/silicon/robot/bullet_act(var/obj/item/projectile/Proj) ..(Proj) - updatehealth() if(prob(75) && Proj.damage > 0) spark_system.start() return 2 - /mob/living/silicon/robot/Bump(atom/movable/AM as mob|obj, yes) spawn( 0 ) if ((!( yes ) || now_pushing)) @@ -977,7 +944,7 @@ var/list/robot_verbs_default = list( return 1 return 0 -/mob/living/silicon/robot/proc/updateicon() +/mob/living/silicon/robot/updateicon() overlays.Cut() if(stat == 0) @@ -1322,9 +1289,9 @@ var/list/robot_verbs_default = list( if(!connected_ai) return switch(notifytype) - if(1) //New Cyborg - connected_ai << "

NOTICE - New cyborg connection detected: [name]
" + if(1) //New Robot + connected_ai << "

NOTICE - New [lowertext(braintype)] connection detected: [name]
" if(2) //New Module - connected_ai << "

NOTICE - Cyborg module change detected: [name] has loaded the [module.name] module.
" + connected_ai << "

NOTICE - [braintype] module change detected: [name] has loaded the [module.name].
" if(3) //New Name - connected_ai << "

NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].
" + connected_ai << "

NOTICE - [braintype] reclassification detected: [oldname] is now designated as [newname].
" \ No newline at end of file diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index 22db25d6786..caf62e484f8 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -72,7 +72,7 @@ var/datum/language/speaking = parse_language(message) if (speaking) verb = speaking.speech_verb - message = copytext(message,3) + message = trim(copytext(message,2+length(speaking.key))) if(speaking.flags & HIVEMIND) speaking.broadcast(src,trim(message)) @@ -102,7 +102,7 @@ if("department") switch(bot_type) if(IS_AI) - return AI.holopad_talk(message) + return AI.holopad_talk(message, verb, speaking) if(IS_ROBOT) log_say("[key_name(src)] : [message]") return R.radio.talk_into(src,message,message_mode,verb,speaking) @@ -149,7 +149,7 @@ return ..(message,speaking,verb) //For holopads only. Usable by AI. -/mob/living/silicon/ai/proc/holopad_talk(var/message) +/mob/living/silicon/ai/proc/holopad_talk(var/message, verb, datum/language/speaking) log_say("[key_name(src)] : [message]") @@ -160,16 +160,22 @@ var/obj/machinery/hologram/holopad/T = src.holo if(T && T.hologram && T.master == src)//If there is a hologram and its master is the user. - var/verb = say_quote(message) //Human-like, sorta, heard by those who understand humans. - var/rendered_a = "[name] [verb], \"[message]\"" - + var/rendered_a //Speach distorted, heard by those who do not understand AIs. var/message_stars = stars(message) - var/rendered_b = "[voice_name] [verb], \"[message_stars]\"" + var/rendered_b + + if(speaking) + rendered_a = "[name] [speaking.format_message(message, verb)]" + rendered_b = "[voice_name] [speaking.format_message(message_stars, verb)]" + src << "Holopad transmitted, [real_name] [speaking.format_message(message, verb)]"//The AI can "hear" its own message. + else + rendered_a = "[name] [verb], \"[message]\"" + rendered_b = "[voice_name] [verb], \"[message_stars]\"" + src << "Holopad transmitted, [real_name] [verb], \"[message]\""//The AI can "hear" its own message. - src << "Holopad transmitted, [real_name] [verb], [message]"//The AI can "hear" its own message. for(var/mob/M in hearers(T.loc))//The location is the object, default distance. if(M.say_understands(src))//If they understand AI speak. Humans and the like will be able to. M.show_message(rendered_a, 2) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 93d4438d7b4..a22bcfd02d9 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -75,8 +75,14 @@ /mob/living/silicon/IsAdvancedToolUser() return 1 -/mob/living/silicon/bullet_act(var/obj/item/projectile/Proj) +/mob/living/silicon/blob_act() + if (src.stat != 2) + src.adjustBruteLoss(60) + src.updatehealth() + return 1 + return 0 +/mob/living/silicon/bullet_act(var/obj/item/projectile/Proj) if(!Proj.nodamage) switch(Proj.damage_type) @@ -86,7 +92,7 @@ adjustFireLoss(Proj.damage) Proj.on_hit(src,2) - + updatehealth() return 2 /mob/living/silicon/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0) @@ -197,7 +203,8 @@ var/dat = "Known Languages

" for(var/datum/language/L in languages) - dat += "[L.name] (:[L.key])
Speech Synthesizer: [(L in speech_synthesizer_langs)? "YES":"NOT SUPPORTED"]
[L.desc]

" + if(!(L.flags & NONGLOBAL)) + dat += "[L.name] (:[L.key])
Speech Synthesizer: [(L in speech_synthesizer_langs)? "YES":"NOT SUPPORTED"]
[L.desc]

" src << browse(dat, "window=checklanguage") return @@ -251,3 +258,24 @@ return 1 return 0 + +/mob/living/silicon/ex_act(severity) + if(!blinded) + flick("flash", flash) + + switch(severity) + if(1.0) + if (stat != 2) + adjustBruteLoss(100) + adjustFireLoss(100) + if(!anchored) + gib() + if(2.0) + if (stat != 2) + adjustBruteLoss(60) + adjustFireLoss(60) + if(3.0) + if (stat != 2) + adjustBruteLoss(30) + + updatehealth() diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 444c98ea387..24b556649a6 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -35,14 +35,10 @@ spell_list += new spell(src) /mob/living/simple_animal/construct/death() - ..() new /obj/item/weapon/ectoplasm (src.loc) - for(var/mob/M in viewers(src, null)) - if((M.client && !( M.blinded ))) - M.show_message("\red [src] collapses in a shattered heap. ") + ..(null,"collapses in a shattered heap.") ghostize() del src - return /mob/living/simple_animal/construct/examine(mob/user) ..(user) diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 9900249c34f..4cd203ee08a 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -43,11 +43,8 @@ /mob/living/simple_animal/hostile/mimic/death() ..() - visible_message("\red [src] stops moving!") del(src) - - // // Crate Mimic // diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm index 65f4e6f7874..c6d3052b5d0 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm @@ -158,8 +158,7 @@ walk(src,0) /mob/living/simple_animal/hostile/retaliate/malf_drone/death() - src.visible_message("\blue \icon[src] [src] suddenly breaks apart.") - ..() + ..(null,"suddenly breaks apart.") del(src) /mob/living/simple_animal/hostile/retaliate/malf_drone/Del() diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index 6a382021351..ebcdfc1194c 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -158,7 +158,5 @@ minbodytemp = 0 /mob/living/simple_animal/hostile/viscerator/death() - ..() - visible_message("\red [src] is smashed into pieces!") - del src - return \ No newline at end of file + ..(null,"is smashed into pieces!") + del src diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm index a908af98688..50b2191d3ed 100644 --- a/code/modules/mob/living/simple_animal/hostile/tree.dm +++ b/code/modules/mob/living/simple_animal/hostile/tree.dm @@ -51,7 +51,6 @@ L.visible_message("\the [src] knocks down \the [L]!") /mob/living/simple_animal/hostile/tree/death() - ..() - visible_message("\red [src] is hacked into pieces!") + ..(null,"is hacked into pieces!") new /obj/item/stack/sheet/wood(loc) del(src) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 8695741ed82..831f3aa83a4 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -198,12 +198,10 @@ ..() /mob/living/simple_animal/gib() - if(icon_gib) - flick(icon_gib, src) if(meat_amount && meat_type) for(var/i = 0; i < meat_amount; i++) new meat_type(src.loc) - ..() + ..(icon_gib,1) /mob/living/simple_animal/emote(var/act, var/type, var/desc) if(act) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 6bf10756d0f..aee673df096 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1157,3 +1157,6 @@ mob/proc/yank_out_object() return I return 0 + +/mob/proc/updateicon() + return diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 10e6c4266c0..8a7b7aa962c 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -79,6 +79,9 @@ return 1 return 0 + if(speaking.flags & INNATE) + return 1 + //Language check. for(var/datum/language/L in src.languages) if(speaking.name == L.name) @@ -142,6 +145,9 @@ //parses the language code (e.g. :j) from text, such as that supplied to say. //returns the language object only if the code corresponds to a language that src can speak, otherwise null. /mob/proc/parse_language(var/message) + if(length(message) >= 1 && copytext(message,1,2) == "!") + return all_languages["Noise"] + if(length(message) >= 2) var/language_prefix = lowertext(copytext(message, 1 ,3)) var/datum/language/L = language_keys[language_prefix] diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index b4d20155389..91e97c0cb5b 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -11,7 +11,7 @@ nanoui is used to open and update nano browser uis #define STATUS_UPDATE 1 // ORANGE Visability #define STATUS_DISABLED 0 // RED Visability -/datum/nanoui +/datum/nanoui // the user who opened this ui var/mob/user // the object this ui "belongs" to @@ -103,13 +103,13 @@ nanoui is used to open and update nano browser uis add_script("libraries.min.js") // A JS file comprising of jQuery, doT.js and jQuery Timer libraries (compressed together) add_script("nano_utility.js") // The NanoUtility JS, this is used to store utility functions. add_script("nano_template.js") // The NanoTemplate JS, this is used to render templates. - add_script("nano_state_manager.js") // The NanoStateManager JS, it handles updates from the server and passes data to the current state - add_script("nano_state.js") // The NanoState JS, this is the base state which all states must inherit from - add_script("nano_state_default.js") // The NanoStateDefault JS, this is the "default" state (used by all UIs by default), which inherits from NanoState + add_script("nano_state_manager.js") // The NanoStateManager JS, it handles updates from the server and passes data to the current state + add_script("nano_state.js") // The NanoState JS, this is the base state which all states must inherit from + add_script("nano_state_default.js") // The NanoStateDefault JS, this is the "default" state (used by all UIs by default), which inherits from NanoState add_script("nano_base_callbacks.js") // The NanoBaseCallbacks JS, this is used to set up (before and after update) callbacks which are common to all UIs add_script("nano_base_helpers.js") // The NanoBaseHelpers JS, this is used to set up template helpers which are common to all UIs add_stylesheet("shared.css") // this CSS sheet is common to all UIs - add_stylesheet("icons.css") // this CSS sheet is common to all UIs + add_stylesheet("icons.css") // this CSS sheet is common to all UIs /** * Set the current status (also known as visibility) of this ui. @@ -127,7 +127,7 @@ nanoui is used to open and update nano browser uis update() else status = state - if (push_update || status == 0) + if (push_update || status == 0) push_data(null, 1) // Update the UI, force the update in case the status is 0, data is null so that previous data is used /** @@ -138,7 +138,7 @@ nanoui is used to open and update nano browser uis * @return nothing */ /datum/nanoui/proc/update_status(var/push_update = 0) - if (istype(user, /mob/living/silicon/ai)) + if (istype(user, /mob/living/silicon/ai) || (get_dist(get_turf(user),get_turf(src_object)) <= 1)) set_status(STATUS_INTERACTIVE, push_update) // interactive (green visibility) else if (istype(user, /mob/living/silicon/robot)) if (src_object in view(7, user)) // robots can see and interact with things they can see within 7 tiles @@ -151,12 +151,12 @@ nanoui is used to open and update nano browser uis if (dist > 4) close() return - + if ((allowed_user_stat > -1) && (user.stat > allowed_user_stat)) set_status(STATUS_DISABLED, push_update) // no updates, completely disabled (red visibility) else if (user.restrained() || user.lying) set_status(STATUS_UPDATE, push_update) // update only (orange visibility) - else if (istype(src_object, /obj/item/device/uplink/hidden)) // You know what if they have the uplink open let them use the UI + else if (istype(src_object, /obj/item/device/uplink/hidden)) // You know what if they have the uplink open let them use the UI set_status(STATUS_INTERACTIVE, push_update) // Will build in distance checks on the topics for sanity. else if (!(src_object in view(4, user))) // If the src object is not in visable, set status to 0 set_status(STATUS_DISABLED, push_update) // interactive (green visibility) @@ -203,7 +203,7 @@ nanoui is used to open and update nano browser uis "showMap" = show_map, "mapZLevel" = map_z_level, "user" = list("name" = user.name) - ) + ) return config_data /** @@ -215,12 +215,12 @@ nanoui is used to open and update nano browser uis */ /datum/nanoui/proc/get_send_data(var/list/data) var/list/config_data = get_config_data() - + var/list/send_data = list("config" = config_data) - + if (!isnull(data)) send_data["data"] = data - + return send_data /** @@ -267,11 +267,11 @@ nanoui is used to open and update nano browser uis */ /datum/nanoui/proc/add_template(key, filename) templates[key] = filename - + /** * Set the layout key for use in the frontend Javascript * The layout key is the basic layout key for the page - * Two files are loaded on the client based on the layout key varable: + * Two files are loaded on the client based on the layout key varable: * -> a template in /nano/templates with the filename "layout_.tmpl * -> a CSS stylesheet in /nano/css with the filename "layout_.css * @@ -301,7 +301,7 @@ nanoui is used to open and update nano browser uis */ /datum/nanoui/proc/set_auto_update_content(nstate) auto_update_content = nstate - + /** * Set the state key for use in the frontend Javascript * @@ -310,8 +310,8 @@ nanoui is used to open and update nano browser uis * @return nothing */ /datum/nanoui/proc/set_state_key(nstate_key) - state_key = nstate_key - + state_key = nstate_key + /** * Toggle showing the map ui * @@ -321,7 +321,7 @@ nanoui is used to open and update nano browser uis */ /datum/nanoui/proc/set_show_map(nstate) show_map = nstate - + /** * Toggle showing the map ui * @@ -352,15 +352,15 @@ nanoui is used to open and update nano browser uis // before the UI opens, add the layout files based on the layout key add_stylesheet("layout_[layout_key].css") add_template("layout", "layout_[layout_key].tmpl") - + var/head_content = "" - + for (var/filename in scripts) head_content += " " - + for (var/filename in stylesheets) head_content += " " - + var/template_data_json = "{}" // An empty JSON object if (templates.len > 0) template_data_json = list2json(templates) @@ -378,7 +378,7 @@ nanoui is used to open and update nano browser uis [head_content] - +
Transmit:[(radio.wires & 4) ? "En" : "Dis" ]abled + [radio.broadcasting ? "En" : "Dis" ]abled
Receive:[(radio.wires & 2) ? "En" : "Dis" ]abled - -
Signal Pulser:[(radio.wires & 1) ? "En" : "Dis" ]abled + [radio.listening ? "En" : "Dis" ]abled
 \[[GetPlayerAltTitle(job)]\]