From fe4490a295f17c922a1e16aa8f4627c87526203f Mon Sep 17 00:00:00 2001 From: Mloc Date: Sun, 26 Jul 2015 20:53:13 +0100 Subject: [PATCH 01/49] fixes #10316 Signed-off-by: Mloc --- code/game/objects/items/weapons/tools.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 5f83f325818..aa2a8734a6b 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -211,8 +211,12 @@ /obj/item/weapon/weldingtool/process() - if(welding && prob(5) && !remove_fuel(1)) - setWelding(0) + if(welding) + if(prob(5)) + remove_fuel(1) + + if(get_fuel() == 0) + setWelding(0) //I'm not sure what this does. I assume it has to do with starting fires... //...but it doesnt check to see if the welder is on or not. From 1d8e015334db1077a1607af9f4e88d51c6adcdd8 Mon Sep 17 00:00:00 2001 From: Mloc Date: Mon, 27 Jul 2015 10:49:51 +0100 Subject: [PATCH 02/49] fixes #10141 also clean up alloy_data handling Signed-off-by: Mloc --- code/modules/mining/alloys.dm | 4 ++-- code/modules/mining/machine_processing.dm | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/code/modules/mining/alloys.dm b/code/modules/mining/alloys.dm index 9461c1e6b92..dac05badd02 100644 --- a/code/modules/mining/alloys.dm +++ b/code/modules/mining/alloys.dm @@ -12,7 +12,7 @@ metaltag = "plasteel" requires = list( "platinum" = 1, - "coal" = 2, + "carbon" = 2, "hematite" = 2 ) product_mod = 0.3 @@ -21,7 +21,7 @@ /datum/alloy/steel metaltag = DEFAULT_WALL_MATERIAL requires = list( - "coal" = 1, + "carbon" = 1, "hematite" = 1 ) product = /obj/item/stack/material/steel \ No newline at end of file diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 649dee1e1e5..0eb8bdaa1f8 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -112,16 +112,17 @@ var/sheets_per_tick = 10 var/list/ores_processing[0] var/list/ores_stored[0] - var/list/alloy_data[0] + var/static/list/alloy_data var/active = 0 /obj/machinery/mineral/processing_unit/New() - ..() - //TODO: Ore and alloy global storage datum. - for(var/alloytype in typesof(/datum/alloy)-/datum/alloy) - alloy_data += new alloytype() + // initialize static alloy_data list + if(!alloy_data) + alloy_data = list() + for(var/alloytype in typesof(/datum/alloy)-/datum/alloy) + alloy_data += new alloytype() if(!ore_data || !ore_data.len) for(var/oretype in typesof(/ore)-/ore) From aab326e05f3089783d4c287de571933499c6fcfe Mon Sep 17 00:00:00 2001 From: Mloc Date: Mon, 27 Jul 2015 11:40:37 +0100 Subject: [PATCH 03/49] fixes #10232 makes lights trigger on forceMove using a vg change Signed-off-by: Mloc --- code/modules/lighting/lighting_atom.dm | 14 +++----------- code/modules/lighting/lighting_overlay.dm | 2 ++ code/modules/lighting/lighting_turf.dm | 10 ++++++++++ 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm index 92500ecc1d9..6968a4ed63f 100644 --- a/code/modules/lighting/lighting_atom.dm +++ b/code/modules/lighting/lighting_atom.dm @@ -46,21 +46,13 @@ T.reconsider_lights() return ..() -/atom/movable/Move() - var/turf/old_loc = loc +/atom/Entered(atom/movable/obj, atom/prev_loc) . = ..() - if(loc != old_loc) - for(var/datum/light_source/L in light_sources) + if(obj && prev_loc != src) + for(var/datum/light_source/L in obj.light_sources) L.source_atom.update_light() - var/turf/new_loc = loc - if(istype(old_loc) && opacity) - old_loc.reconsider_lights() - - if(istype(new_loc) && opacity) - new_loc.reconsider_lights() - /atom/proc/set_opacity(new_opacity) var/old_opacity = opacity opacity = new_opacity diff --git a/code/modules/lighting/lighting_overlay.dm b/code/modules/lighting/lighting_overlay.dm index ca9d9b391f5..2dd3889e4e9 100644 --- a/code/modules/lighting/lighting_overlay.dm +++ b/code/modules/lighting/lighting_overlay.dm @@ -98,3 +98,5 @@ var/turf/T = loc if(istype(T)) T.lighting_overlay = null + + ..() diff --git a/code/modules/lighting/lighting_turf.dm b/code/modules/lighting/lighting_turf.dm index a7a59907097..e261931c41c 100644 --- a/code/modules/lighting/lighting_turf.dm +++ b/code/modules/lighting/lighting_turf.dm @@ -16,3 +16,13 @@ if(A.lighting_use_dynamic) var/atom/movable/lighting_overlay/O = PoolOrNew(/atom/movable/lighting_overlay, src) lighting_overlay = O + +/turf/Entered(atom/movable/obj) + . = ..() + if(obj && obj.opacity) + reconsider_lights() + +/turf/Exited(atom/movable/obj) + . = ..() + if(obj && obj.opacity) + reconsider_lights() From e10a1f3e0137c0d345da0d7a2e24ca547da40de6 Mon Sep 17 00:00:00 2001 From: Atlantis Date: Tue, 28 Jul 2015 10:48:22 +0200 Subject: [PATCH 04/49] Mercenaries/Raiders should now have proper headset again - This should fix #10313 --- code/game/antagonist/antagonist_create.dm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/game/antagonist/antagonist_create.dm b/code/game/antagonist/antagonist_create.dm index 3e6585f6b9e..502f1366839 100644 --- a/code/game/antagonist/antagonist_create.dm +++ b/code/game/antagonist/antagonist_create.dm @@ -42,7 +42,13 @@ return W /datum/antagonist/proc/create_radio(var/freq, var/mob/living/carbon/human/player) - var/obj/item/device/radio/R = new /obj/item/device/radio/headset(player) + var/obj/item/device/radio/R + + if(freq == SYND_FREQ) + R = new/obj/item/device/radio/headset/syndicate(player) + else + R = new/obj/item/device/radio/headset(player) + R.set_frequency(freq) player.equip_to_slot_or_del(R, slot_l_ear) return R From 09a8f37d6c086573601adb04ac41dc8dffa0fbaf Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Tue, 28 Jul 2015 10:59:51 +0100 Subject: [PATCH 05/49] Changes show_player_info_irc to properly escape '%' --- code/modules/admin/player_notes.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/player_notes.dm b/code/modules/admin/player_notes.dm index 25f6638ee08..790b12b06b5 100644 --- a/code/modules/admin/player_notes.dm +++ b/code/modules/admin/player_notes.dm @@ -134,7 +134,7 @@ datum/admins/proc/notes_gethtml(var/ckey) del info /proc/show_player_info_irc(var/key as text) - var/dat = " Info on [key]%0D%0A" + var/dat = " Info on [key]\n" var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav") var/list/infos info >> infos @@ -142,6 +142,6 @@ datum/admins/proc/notes_gethtml(var/ckey) dat = "No information found on the given key." else for(var/datum/player_info/I in infos) - dat += "[I.content]%0D%0Aby [I.author] ([I.rank]) on [I.timestamp]%0D%0A%0D%0A" + dat += "[I.content]\nby [I.author] ([I.rank]) on [I.timestamp]\n\n" - return dat + return list2params(list(dat)) From 2fb1d74444a7ea741c6009ed4ef110b11feb39e3 Mon Sep 17 00:00:00 2001 From: Atlantis Date: Tue, 28 Jul 2015 12:34:57 +0200 Subject: [PATCH 06/49] Telecommunications adjustment - This commit attempts to resolve #7294 - Common and AI Private channels are now separate from other non-department frequencies. I hope this will reduce load on Common server, therefore mitigating the overload? problems that may cause duplication of messages. - Another server has been added, which handles all non-department non-common frequencies. This server is likely to be under minimal load so i hope the duplication bug shouldn't happen again. - Unmaps one broadcaster and receiver from telecomms in another attempt to remove duplication --- code/game/machinery/telecomms/presets.dm | 45 +++++++++--------------- maps/exodus-3.dmm | 15 ++++---- 2 files changed, 24 insertions(+), 36 deletions(-) diff --git a/code/game/machinery/telecomms/presets.dm b/code/game/machinery/telecomms/presets.dm index 35c2ecdc1f5..18b5d849af8 100644 --- a/code/game/machinery/telecomms/presets.dm +++ b/code/game/machinery/telecomms/presets.dm @@ -40,8 +40,8 @@ id = "Hub" network = "tcommsat" autolinkers = list("hub", "relay", "c_relay", "s_relay", "m_relay", "r_relay", "science", "medical", - "supply", "service", "common", "command", "engineering", "security", - "receiverA", "receiverB", "broadcasterA", "broadcasterB") + "supply", "service", "common", "command", "engineering", "security", "unused", + "receiverA", "broadcasterA") /obj/machinery/telecomms/hub/preset_cent id = "CentComm Hub" @@ -52,22 +52,11 @@ //Receivers -//--PRESET LEFT--// - -/obj/machinery/telecomms/receiver/preset_left +/obj/machinery/telecomms/receiver/preset_right id = "Receiver A" network = "tcommsat" autolinkers = list("receiverA") // link to relay - freq_listening = list(SCI_FREQ, MED_FREQ, SUP_FREQ, SRV_FREQ) // science, medical, supply, service - - -//--PRESET RIGHT--// - -/obj/machinery/telecomms/receiver/preset_right - id = "Receiver B" - network = "tcommsat" - autolinkers = list("receiverB") // link to relay - freq_listening = list(COMM_FREQ, ENG_FREQ, SEC_FREQ) //command, engineering, security + freq_listening = list(SCI_FREQ, MED_FREQ, SUP_FREQ, SRV_FREQ, COMM_FREQ, ENG_FREQ, SEC_FREQ) //Common and other radio frequencies for people to freely use New() @@ -95,7 +84,7 @@ id = "Bus 2" network = "tcommsat" freq_listening = list(SUP_FREQ, SRV_FREQ) - autolinkers = list("processor2", "supply", "service") + autolinkers = list("processor2", "supply", "service", "unused") /obj/machinery/telecomms/bus/preset_three id = "Bus 3" @@ -169,7 +158,7 @@ id = "Supply Server" freq_listening = list(SUP_FREQ) autolinkers = list("supply") - + /obj/machinery/telecomms/server/presets/service id = "Service Server" freq_listening = list(SRV_FREQ) @@ -177,14 +166,19 @@ /obj/machinery/telecomms/server/presets/common id = "Common Server" - freq_listening = list() + freq_listening = list(1447, 1459) // AI Private and Common autolinkers = list("common") - //Common and other radio frequencies for people to freely use - // 1441 to 1489 -/obj/machinery/telecomms/server/presets/common/New() +// "Unused" channels, AKA all others. +/obj/machinery/telecomms/server/presets/unused + id = "Unused Server" + freq_listening = list() + autolinkers = list("unused") + +/obj/machinery/telecomms/server/presets/unused/New() for(var/i = 1441, i < 1489, i += 2) freq_listening |= i + freq_listening -= list(1447, 1459) ..() /obj/machinery/telecomms/server/presets/command @@ -213,18 +207,11 @@ //--PRESET LEFT--// -/obj/machinery/telecomms/broadcaster/preset_left +/obj/machinery/telecomms/broadcaster/preset_right id = "Broadcaster A" network = "tcommsat" autolinkers = list("broadcasterA") -//--PRESET RIGHT--// - -/obj/machinery/telecomms/broadcaster/preset_right - id = "Broadcaster B" - network = "tcommsat" - autolinkers = list("broadcasterB") - /obj/machinery/telecomms/broadcaster/preset_cent id = "CentComm Broadcaster" network = "tcommsat" diff --git a/maps/exodus-3.dmm b/maps/exodus-3.dmm index f747f6627b4..7154dd56a3e 100644 --- a/maps/exodus-3.dmm +++ b/maps/exodus-3.dmm @@ -240,8 +240,8 @@ "eF" = (/obj/structure/table/rack,/obj/item/weapon/circuitboard/telecomms/processor,/obj/item/weapon/circuitboard/telecomms/processor,/obj/item/weapon/circuitboard/telecomms/receiver,/obj/item/weapon/circuitboard/telecomms/server,/obj/item/weapon/circuitboard/telecomms/server,/obj/item/weapon/circuitboard/telecomms/bus,/obj/item/weapon/circuitboard/telecomms/bus,/obj/item/weapon/circuitboard/telecomms/broadcaster,/turf/simulated/floor,/area/turret_protected/tcomsat) "eG" = (/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/light{dir = 1},/obj/machinery/camera/network/telecom{c_tag = "Telecoms Central Compartment North"},/turf/simulated/floor/bluegrid{name = "Mainframe Base"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) "eH" = (/obj/machinery/atmospherics/unary/vent_pump/on,/obj/machinery/camera/network/telecom{c_tag = "Telecoms Storage"},/turf/simulated/floor,/area/turret_protected/tcomsat) -"eI" = (/obj/machinery/telecomms/broadcaster/preset_left,/turf/simulated/floor{dir = 1; icon_state = "vault"; name = "Mainframe floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) -"eJ" = (/obj/machinery/telecomms/broadcaster/preset_right,/turf/simulated/floor{dir = 4; icon_state = "vault"; name = "Mainframe floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) +"eI" = (/obj/machinery/telecomms/server/presets/unused,/turf/simulated/floor/bluegrid{icon_state = "dark"; name = "Mainframe Floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) +"eJ" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/telecomms/broadcaster/preset_right,/turf/simulated/floor/bluegrid{name = "Mainframe Base"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) "eK" = (/obj/structure/window/reinforced{dir = 4},/obj/structure/lattice,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 8},/turf/space,/area/turret_protected/tcomsat) "eL" = (/obj/machinery/airlock_sensor/airlock_interior{frequency = 1381; id_tag = "server_access_in_sensor"; master_tag = "server_access_airlock"; name = "interior sensor"; pixel_x = 8; pixel_y = 25},/turf/simulated/floor/bluegrid{name = "Mainframe Base"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) "eM" = (/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 8},/turf/space,/area/turret_protected/tcomsat) @@ -270,8 +270,8 @@ "fj" = (/obj/machinery/telecomms/bus/preset_one,/turf/simulated/floor{dir = 1; icon_state = "vault"; name = "Mainframe floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) "fk" = (/obj/machinery/telecomms/processor/preset_one,/turf/simulated/floor{dir = 1; icon_state = "vault"; name = "Mainframe floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) "fl" = (/obj/machinery/bluespacerelay,/turf/simulated/floor/bluegrid{icon_state = "dark"; name = "Mainframe Floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) -"fm" = (/obj/machinery/telecomms/receiver/preset_left,/turf/simulated/floor{dir = 1; icon_state = "vault"; name = "Mainframe floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) -"fn" = (/obj/machinery/telecomms/receiver/preset_right,/turf/simulated/floor{dir = 4; icon_state = "vault"; name = "Mainframe floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) +"fm" = (/turf/simulated/floor{dir = 1; icon_state = "vault"; name = "Mainframe floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) +"fn" = (/turf/simulated/floor{dir = 4; icon_state = "vault"; name = "Mainframe floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) "fo" = (/obj/machinery/telecomms/processor/preset_three,/turf/simulated/floor{dir = 4; icon_state = "vault"; name = "Mainframe floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) "fp" = (/obj/machinery/telecomms/bus/preset_three,/turf/simulated/floor{dir = 4; icon_state = "vault"; name = "Mainframe floor"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) "fq" = (/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/turf/space,/area/turret_protected/tcomsat) @@ -400,6 +400,7 @@ "hJ" = (/obj/machinery/door/airlock/hatch{name = "Telecoms East Wing"; req_access = list(61)},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor{icon_state = "vault"; dir = 5},/area/turret_protected/tcomfoyer) "hK" = (/obj/structure/grille/broken,/turf/simulated/floor/plating/airless,/area/AIsattele) "hL" = (/obj/structure/grille/broken,/turf/space,/area/AIsattele) +"hM" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/telecomms/receiver/preset_right,/turf/simulated/floor/bluegrid{name = "Mainframe Base"; nitrogen = 100; oxygen = 0; temperature = 80},/area/tcommsat/chamber) (1,1,1) = {" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaa From 57e8d07085d340557a299c180a928271c0ce2346 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Tue, 28 Jul 2015 13:29:50 +0100 Subject: [PATCH 07/49] Adds a log_and_message_admins call to cult communication rune --- code/game/gamemodes/cult/runes.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index f7c638be9b3..f79c5ce88fa 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -598,6 +598,7 @@ var/list/sacrificed = list() usr.say("[input]") else usr.whisper("[input]") + log_and_message_admins("used a communicate rune to say '[input]'") for(var/datum/mind/H in ticker.mode.cult) if (H.current) H.current << "\red \b [input]" From 74f04671f850ed2246926ea864153823b346363d Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Tue, 28 Jul 2015 13:37:15 +0100 Subject: [PATCH 08/49] His book? Her book. --- code/modules/mob/dead/observer/observer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index c7dea3bb9d1..ecea7745dce 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -567,7 +567,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp toggle_visibility(1) else user.visible_message ( \ - "[user] just tried to smash his book into that ghost! It's not very effective.", \ + "[user] just tried to smash \his book into that ghost! It's not very effective.", \ "You get the feeling that the ghost can't become any more visible." \ ) From 9c4a0a91c0ee2d73a735bb5612a487b7047a0b29 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Tue, 28 Jul 2015 21:31:49 +0200 Subject: [PATCH 09/49] Fixes crew monitor runtime and removes dead code. The crew monitor used src instead of nano_host(). Also removes unneeded Topic() href. --- code/modules/nano/modules/crew_monitor.dm | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/code/modules/nano/modules/crew_monitor.dm b/code/modules/nano/modules/crew_monitor.dm index 340e0497632..a0a9280653e 100644 --- a/code/modules/nano/modules/crew_monitor.dm +++ b/code/modules/nano/modules/crew_monitor.dm @@ -3,17 +3,11 @@ var/list/tracked = new /datum/nano_module/crew_monitor/Topic(href, href_list) - if(..()) return - var/turf/T = get_turf(src) + if(..()) return 1 + var/turf/T = get_turf(nano_host()) // TODO: Allow setting any config.contact_levels from the interface. if (!T || !(T.z in config.player_levels)) usr << "Unable to establish a connection: You're too far away from the station!" return 0 - if(href_list["close"] ) - var/mob/user = usr - var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main") - usr.unset_machine() - ui.close() - return 0 if(href_list["track"]) if(usr.isMobAI()) var/mob/living/silicon/ai/AI = usr @@ -23,11 +17,11 @@ return 1 /datum/nano_module/crew_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - user.set_machine(src) + // TODO: Move this to a singleton instance that does the scan every X seconds (if the info is being requested), to offer some antag balance and to reduce load in the case of multiple viewers. src.scan() var/data[0] - var/turf/T = get_turf(src) + var/turf/T = get_turf(nano_host()) var/list/crewmembers = list() for(var/obj/item/clothing/under/C in src.tracked) From d203362d38317ff27ae58c0b8ba31aa2e8e54613 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Mon, 27 Jul 2015 17:45:27 -0400 Subject: [PATCH 10/49] Fixes #10258 Turrets now aim at the chest/groin unless the target has a neck grab on someone, otherwise they aim elsewhere. Projectiles are now able to miss targets that are lying or buckled, except when the target is at point blank range and is the original target for the projectile. --- code/game/machinery/portable_turret.dm | 8 ++++++++ code/game/machinery/turrets.dm | 9 +++++++++ code/modules/mob/mob_helpers.dm | 8 ++++---- code/modules/projectiles/projectile.dm | 2 +- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 934aeec09c3..7f7a02b5f0b 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -624,6 +624,14 @@ var/list/turret_icons // Emagged turrets again use twice as much power due to higher firing rates use_power(reqpower * (2 * (emagged || lethal)) * (2 * emagged)) + //Turrets aim for the center of mass by default. + //If the target is grabbing someone then the turret smartly aims for extremities + var/obj/item/weapon/grab/G = locate() in target + if(G && G.state >= GRAB_NECK) //works because mobs are currently not allowed to upgrade to NECK if they are grabbing two people. + A.def_zone = pick("head", "l_hand", "r_hand", "l_foot", "r_foot", "l_arm", "r_arm", "l_leg", "r_leg") + else + A.def_zone = pick("chest", "groin") + //Shooting Code: A.current = T A.starting = T diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm index 3581c51e182..87edc01204c 100644 --- a/code/game/machinery/turrets.dm +++ b/code/game/machinery/turrets.dm @@ -266,6 +266,15 @@ else A = new /obj/item/projectile/energy/electrode( loc ) use_power(200) + + //Turrets aim for the center of mass by default. + //If the target is grabbing someone then the turret smartly aims for extremities + var/obj/item/weapon/grab/G = locate() in target + if(G && G.state >= GRAB_NECK) //works because mobs are currently not allowed to upgrade to NECK if they are grabbing two people. + A.def_zone = pick("head", "l_hand", "r_hand", "l_foot", "r_foot", "l_arm", "r_arm", "l_leg", "r_leg") + else + A.def_zone = pick("chest", "groin") + A.current = T A.starting = T A.yo = U.y - T.y diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 0a716ded345..0911a225934 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -264,11 +264,11 @@ var/list/global/organ_rel_size = list( /proc/get_zone_with_miss_chance(zone, var/mob/target, var/miss_chance_mod = 0, var/ranged_attack=0) zone = check_zone(zone) - // you cannot miss if your target is prone or restrained - if(target.buckled || target.lying) - return zone - // if your target is being grabbed aggressively by someone you cannot miss either if(!ranged_attack) + // you cannot miss if your target is prone or restrained + if(target.buckled || target.lying) + return zone + // if your target is being grabbed aggressively by someone you cannot miss either for(var/obj/item/weapon/grab/G in target.grabbed_by) if(G.state >= GRAB_AGGRESSIVE) return zone diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index f13ad242873..4b5b1aab7ea 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -165,7 +165,7 @@ //roll to-hit miss_modifier = max(15*(distance-2) - round(15*accuracy) + miss_modifier, 0) - var/hit_zone = get_zone_with_miss_chance(def_zone, target_mob, miss_modifier, ranged_attack=(distance > 1)) + var/hit_zone = get_zone_with_miss_chance(def_zone, target_mob, miss_modifier, ranged_attack=(distance > 1 || original != target_mob)) //if the projectile hits a target we weren't originally aiming at then retain the chance to miss if(!hit_zone) visible_message("\The [src] misses [target_mob] narrowly!") return 0 From 6df770cab3cb795341ab8ae84535ff49dc6429d3 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Mon, 27 Jul 2015 19:04:47 -0400 Subject: [PATCH 11/49] Fixes projectiles being able to hit humans in organs they do not have. Will also prevent body shields blocking bullets with non-existant limbs. Expands on the special return values for bullet_act(), adds defines for them. --- code/game/machinery/alarm.dm | 2 +- code/game/objects/items/shooting_range.dm | 2 +- code/game/objects/structures/girders.dm | 2 +- code/game/objects/structures/grille.dm | 2 +- .../mob/living/carbon/human/human_defense.dm | 10 ++++++---- code/modules/projectiles/projectile.dm | 15 +++++++++------ code/setup.dm | 4 ++++ html/changelogs/HarpyEagle-dev-freeze.yml | 3 ++- 8 files changed, 25 insertions(+), 15 deletions(-) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index a5106be41ea..9c4d3009e42 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -919,7 +919,7 @@ FIRE ALARM /obj/machinery/firealarm/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/firealarm/bullet_act(BLAH) +/obj/machinery/firealarm/bullet_act() return src.alarm() /obj/machinery/firealarm/emp_act(severity) diff --git a/code/game/objects/items/shooting_range.dm b/code/game/objects/items/shooting_range.dm index 2893b4f3a10..8f24a93c10d 100644 --- a/code/game/objects/items/shooting_range.dm +++ b/code/game/objects/items/shooting_range.dm @@ -146,7 +146,7 @@ return - return -1 // the bullet/projectile goes through the target! Ie, you missed + return PROJECTILE_CONTINUE // the bullet/projectile goes through the target! // Small memory holder entity for transparent bullet holes diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 38caaa3230b..67bf484f39c 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -25,7 +25,7 @@ /obj/structure/girder/bullet_act(var/obj/item/projectile/Proj) //Girders only provide partial cover. There's a chance that the projectiles will just pass through. (unless you are trying to shoot the girder) if(Proj.original != src && !prob(cover)) - return -1 //pass through + return PROJECTILE_CONTINUE //pass through //Tasers and the like should not damage girders. if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 569a4eb3b95..5f5dcaa48ab 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -94,7 +94,7 @@ passthrough = 1 if(passthrough) - . = -1 + . = PROJECTILE_CONTINUE damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage src.health -= damage*0.2 diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 29832ae1ecd..0de5729ec99 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -10,9 +10,11 @@ emp_act /mob/living/carbon/human/bullet_act(var/obj/item/projectile/P, var/def_zone) - var/obj/item/organ/external/organ = get_organ(check_zone(def_zone)) - if(!organ) - return + def_zone = check_zone(def_zone) + if(!has_organ(def_zone)) + return PROJECTILE_FORCE_MISS //if they don't have the organ in question then the projectile just passes by. + + var/obj/item/organ/external/organ = get_organ() //Shields if(check_shields(P.damage, "the [P.name]")) @@ -37,7 +39,7 @@ emp_act // redirect the projectile P.redirect(new_x, new_y, curloc, src) - return -1 // complete projectile permutation + return PROJECTILE_CONTINUE // complete projectile permutation //Shrapnel if(P.can_embed()) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 4b5b1aab7ea..6d8c40c16c2 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -166,13 +166,16 @@ //roll to-hit miss_modifier = max(15*(distance-2) - round(15*accuracy) + miss_modifier, 0) var/hit_zone = get_zone_with_miss_chance(def_zone, target_mob, miss_modifier, ranged_attack=(distance > 1 || original != target_mob)) //if the projectile hits a target we weren't originally aiming at then retain the chance to miss - if(!hit_zone) + + var/result = PROJECTILE_FORCE_MISS + if(hit_zone) + def_zone = hit_zone //set def_zone, so if the projectile ends up hitting someone else later (to be implemented), it is more likely to hit the same part + result = target_mob.bullet_act(src, def_zone) + + if(result == PROJECTILE_FORCE_MISS) visible_message("\The [src] misses [target_mob] narrowly!") return 0 - //set def_zone, so if the projectile ends up hitting someone else later (to be implemented), it is more likely to hit the same part - def_zone = hit_zone - //hit messages if(silenced) target_mob << "You've been hit in the [parse_zone(def_zone)] by \the [src]!" @@ -193,7 +196,7 @@ msg_admin_attack("UNKNOWN shot [target_mob] ([target_mob.ckey]) with \a [src] (JMP)") //sometimes bullet_act() will want the projectile to continue flying - if (target_mob.bullet_act(src, def_zone) == -1) + if (result == PROJECTILE_CONTINUE) return 0 return 1 @@ -227,7 +230,7 @@ else passthrough = 1 //so ghosts don't stop bullets else - passthrough = (A.bullet_act(src, def_zone) == -1) //backwards compatibility + passthrough = (A.bullet_act(src, def_zone) == PROJECTILE_CONTINUE) //backwards compatibility if(isturf(A)) for(var/obj/O in A) O.bullet_act(src) diff --git a/code/setup.dm b/code/setup.dm index 62fe99ac67f..73d0f1611ab 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -720,6 +720,10 @@ var/list/be_special_flags = list( #define FILE_DRM 16 // Some files want to not be copied/moved. This is them complaining that you tried. #define NETWORK_FAILURE 32 +// Special return values from bullet_act(). Positive return values are already used to indicate the blocked level of the projectile. +#define PROJECTILE_CONTINUE -1 //if the projectile should continue flying after calling bullet_act() +#define PROJECTILE_FORCE_MISS -2 //if the projectile should treat the attack as a miss (suppresses attack and admin logs) - only applies to mobs. + // Some on_mob_life() procs check for alien races. #define IS_DIONA 1 #define IS_VOX 2 diff --git a/html/changelogs/HarpyEagle-dev-freeze.yml b/html/changelogs/HarpyEagle-dev-freeze.yml index a999f1236dc..d7bf101a08f 100644 --- a/html/changelogs/HarpyEagle-dev-freeze.yml +++ b/html/changelogs/HarpyEagle-dev-freeze.yml @@ -1,3 +1,4 @@ author: HarpyEagle -changes: [] delete-after: false +changes: + - bugfix: "Fixed projectiles being able to hit people in body parts that they don't have. This will also mean that the less limbs someone has the less effective they will be as a body shield." \ No newline at end of file From 2cf4f6e4db593b740d71bbd941f580e66e36880e Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Wed, 29 Jul 2015 06:39:03 +0100 Subject: [PATCH 12/49] Change Topic() 'status' command to make more sense --- code/world.dm | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/code/world.dm b/code/world.dm index 8737f69b0dc..14cfbe6196b 100644 --- a/code/world.dm +++ b/code/world.dm @@ -104,7 +104,8 @@ var/world_topic_spam_protect_time = world.timeofday n++ return n - else if (T == "status") + else if (copytext(T,1,7) == "status") + var/input[] = params2list(T) var/list/s = list() s["version"] = game_version s["mode"] = master_mode @@ -113,21 +114,37 @@ var/world_topic_spam_protect_time = world.timeofday s["vote"] = config.allow_vote_mode s["ai"] = config.allow_ai s["host"] = host ? host : null - s["players"] = list() s["stationtime"] = worldtime2text() - var/n = 0 - var/admins = 0 - for(var/client/C in clients) - if(C.holder) - if(C.holder.fakekey) - continue //so stealthmins aren't revealed by the hub - admins++ - s["player[n]"] = C.key - n++ - s["players"] = n + if(input["status"] == "2") + var/list/players = list() + var/list/admins = list() - s["admins"] = admins + for(var/client/C in clients) + if(C.holder) + if(C.holder.fakekey) + continue + admins[C.key] = C.holder.rank + players += C.key + + s["players"] = players.len + s["playerlist"] = list2params(players) + s["admins"] = admins.len + s["adminlist"] = list2params(admins) + else + var/n = 0 + var/admins = 0 + + for(var/client/C in clients) + if(C.holder) + if(C.holder.fakekey) + continue //so stealthmins aren't revealed by the hub + admins++ + s["player[n]"] = C.key + n++ + + s["players"] = n + s["admins"] = admins return list2params(s) From 84c76254903837940ac6ede58399ddc57dd3894d Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Wed, 29 Jul 2015 07:55:30 +0100 Subject: [PATCH 13/49] Chemical logging improvements --- baystation12.dme | 1 + code/modules/admin/admin_verbs.dm | 3 +- code/modules/reagents/Chemistry-Holder.dm | 1 + code/modules/reagents/Chemistry-Logging.dm | 28 +++++++++++++++++++ code/modules/reagents/Chemistry-Recipes.dm | 4 +++ .../reagents/reagent_containers/syringes.dm | 14 ++++++---- 6 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 code/modules/reagents/Chemistry-Logging.dm diff --git a/baystation12.dme b/baystation12.dme index dbed3c8fc38..e286a177bc9 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1383,6 +1383,7 @@ #include "code\modules\random_map\random_map.dm" #include "code\modules\reagents\Chemistry-Colours.dm" #include "code\modules\reagents\Chemistry-Holder.dm" +#include "code\modules\reagents\Chemistry-Logging.dm" #include "code\modules\reagents\Chemistry-Machinery.dm" #include "code\modules\reagents\Chemistry-Readme.dm" #include "code\modules\reagents\Chemistry-Reagents-Antidepressants.dm" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index a07b05dec2b..c0c92a81c7e 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -79,7 +79,8 @@ var/list/admin_verbs_admin = list( /client/proc/toggle_antagHUD_restrictions, /client/proc/allow_character_respawn, /* Allows a ghost to respawn */ /client/proc/event_manager_panel, - /client/proc/empty_ai_core_toggle_latejoin + /client/proc/empty_ai_core_toggle_latejoin, + /client/proc/view_chemical_reaction_logs ) var/list/admin_verbs_ban = list( /client/proc/unban_panel, diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 6c6c194af58..14d3f4e6547 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -363,6 +363,7 @@ datum for(var/S in C.secondary_results) add_reagent(S, C.result_amount * C.secondary_results[S] * multiplier) + log_chemical_reaction(my_atom, C, multiplier) var/list/seen = viewers(4, get_turf(my_atom)) for(var/mob/M in seen) M << "\blue \icon[my_atom] The solution begins to bubble." diff --git a/code/modules/reagents/Chemistry-Logging.dm b/code/modules/reagents/Chemistry-Logging.dm new file mode 100644 index 00000000000..1432b18a2e8 --- /dev/null +++ b/code/modules/reagents/Chemistry-Logging.dm @@ -0,0 +1,28 @@ + +/var/list/chemical_reaction_logs = list() + +/proc/log_chemical_reaction(atom/A, datum/chemical_reaction/R, multiplier) + if(!A || !R) + return + + var/turf/T = get_turf(A) + var/logstr = "[usr ? key_name(usr) : "EVENT"] mixed [R.name] ([R.result]) (x[multiplier]) in \the [A] at [T ? "[T.x],[T.y],[T.z]" : "*null*"]" + + chemical_reaction_logs += "\[[time_stamp()]\] [logstr]" + + if(R.log_is_important) + message_admins(logstr) + log_admin(logstr) + +/client/proc/view_chemical_reaction_logs() + set name = "Show Chemical Reactions" + set category = "Admin" + + if(!check_rights(R_ADMIN)) + return + + var/html = "" + for(var/entry in chemical_reaction_logs) + html += "[entry]
" + + usr << browse(html, "window=chemlogs") diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 96730fb25b0..6f17798c81a 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -17,6 +17,8 @@ datum var/list/secondary_results = list() //additional reagents produced by the reaction var/requires_heating = 0 + var/log_is_important = 0 // If this reaction should be considered important for logging. Important recipes message admins when mixed, non-important ones just log to file. + proc on_reaction(var/datum/reagents/holder, var/created_volume) return @@ -169,6 +171,7 @@ datum result = "pacid" required_reagents = list("sacid" = 1, "chlorine" = 1, "potassium" = 1) result_amount = 3 + log_is_important = 1 synaptizine name = "Synaptizine" @@ -456,6 +459,7 @@ datum result = "chloralhydrate" required_reagents = list("ethanol" = 1, "chlorine" = 3, "water" = 1) result_amount = 1 + log_is_important = 1 potassium_chloride name = "Potassium Chloride" diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 8aa34a7dcab..191dd5834ae 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -170,10 +170,7 @@ if(istype(target,/mob/living)) var/mob/living/M = target - var/list/injected = list() - for(var/datum/reagent/R in src.reagents.reagent_list) - injected += R.name - var/contained = english_list(injected) + var/contained = reagents.get_reagents() M.attack_log += text("\[[time_stamp()]\] Has been injected with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [M.name] ([M.key]). Reagents: [contained]") msg_admin_attack("[user.name] ([user.ckey]) injected [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") @@ -181,6 +178,13 @@ src.reagents.reaction(target, INGEST) if(ismob(target) && target == user) src.reagents.reaction(target, INGEST) + + if(!ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/glass)) // It's not a mob (which is logged above) and it's not a beaker or similar (which is a fairly normal thing to inject into) + usr = user + var/contained = reagents.get_reagents() + user.attack_log += "\[[time_stamp()]\] Injected \the [target] with \the [src]. Reagents: [contained]" + log_and_message_admins("injected \the [target] with \the [src]. Reagents: [contained]") + spawn(5) var/datum/reagent/blood/B for(var/datum/reagent/blood/d in src.reagents.reagent_list) @@ -472,4 +476,4 @@ reagents.add_reagent("inaprovaline", 7) reagents.add_reagent("anti_toxin", 8) mode = SYRINGE_INJECT - update_icon() \ No newline at end of file + update_icon() From aa899b832130b0969f5790cc556482028f02437f Mon Sep 17 00:00:00 2001 From: Karolis2011 Date: Wed, 29 Jul 2015 10:20:29 +0300 Subject: [PATCH 14/49] Added changelog for #9673 and #9308. --- html/changelogs/Karolis2011-pipe-dipensers.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/Karolis2011-pipe-dipensers.yml diff --git a/html/changelogs/Karolis2011-pipe-dipensers.yml b/html/changelogs/Karolis2011-pipe-dipensers.yml new file mode 100644 index 00000000000..f705d74c8df --- /dev/null +++ b/html/changelogs/Karolis2011-pipe-dipensers.yml @@ -0,0 +1,5 @@ +author: Karolis2011 +delete-after: True +changes: + - rscadd: "Made tagger and sorting pipes dispensible." + - bugfix: "Unwelding and welding sorting/tagger pipes, no longer delete data about them." From 07daa25de950c5f20160446ddeca56168f044d70 Mon Sep 17 00:00:00 2001 From: Atlantis Date: Wed, 29 Jul 2015 11:17:42 +0200 Subject: [PATCH 15/49] Updates telecommunications presets - Changes some hardcoded frequency numbers i used to use proper constants. - Fixes non-common channels not working due to signal not getting to the server. --- code/game/machinery/telecomms/presets.dm | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/code/game/machinery/telecomms/presets.dm b/code/game/machinery/telecomms/presets.dm index 18b5d849af8..f91fd2d40c5 100644 --- a/code/game/machinery/telecomms/presets.dm +++ b/code/game/machinery/telecomms/presets.dm @@ -86,6 +86,13 @@ freq_listening = list(SUP_FREQ, SRV_FREQ) autolinkers = list("processor2", "supply", "service", "unused") +/obj/machinery/telecomms/bus/preset_two/New() + for(var/i = 1441, i < 1489, i += 2) + if(i == AI_FREQ || i == PUB_FREQ) + continue + freq_listening |= i + ..() + /obj/machinery/telecomms/bus/preset_three id = "Bus 3" network = "tcommsat" @@ -95,14 +102,9 @@ /obj/machinery/telecomms/bus/preset_four id = "Bus 4" network = "tcommsat" - freq_listening = list(ENG_FREQ) + freq_listening = list(ENG_FREQ, AI_FREQ, PUB_FREQ) autolinkers = list("processor4", "engineering", "common") -/obj/machinery/telecomms/bus/preset_four/New() - for(var/i = 1441, i < 1489, i += 2) - freq_listening |= i - ..() - /obj/machinery/telecomms/bus/preset_cent id = "CentComm Bus" network = "tcommsat" @@ -166,7 +168,7 @@ /obj/machinery/telecomms/server/presets/common id = "Common Server" - freq_listening = list(1447, 1459) // AI Private and Common + freq_listening = list(PUB_FREQ, AI_FREQ) // AI Private and Common autolinkers = list("common") // "Unused" channels, AKA all others. @@ -177,8 +179,9 @@ /obj/machinery/telecomms/server/presets/unused/New() for(var/i = 1441, i < 1489, i += 2) + if(i == AI_FREQ || i == PUB_FREQ) + continue freq_listening |= i - freq_listening -= list(1447, 1459) ..() /obj/machinery/telecomms/server/presets/command From ee69db6ae9c8bd866660f86b983aeb6a2985e0cd Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Wed, 29 Jul 2015 11:57:55 +0200 Subject: [PATCH 16/49] Updates changelog. --- html/changelog.html | 7 +++++++ html/changelogs/.all_changelog.yml | 5 +++++ html/changelogs/Karolis2011-pipe-dipensers.yml | 5 ----- 3 files changed, 12 insertions(+), 5 deletions(-) delete mode 100644 html/changelogs/Karolis2011-pipe-dipensers.yml diff --git a/html/changelog.html b/html/changelog.html index d6b531d013b..08fec2e3048 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,13 @@ -->
+

29 July 2015

+

Karolis2011 updated:

+
    +
  • Made tagger and sorting pipes dispensible.
  • +
  • Unwelding and welding sorting/tagger pipes, no longer delete data about them.
  • +
+

27 July 2015

Kelenius updated: