From 1d5c971a45c7c5fc68695fe0becbdff4c1853a0b Mon Sep 17 00:00:00 2001 From: mwerezak Date: Mon, 25 May 2015 00:01:28 -0400 Subject: [PATCH 01/34] Fixes #9452 --- code/ZAS/Turf.dm | 41 ++++++++++++++++++++++++++++++++++++++- code/__HELPERS/logging.dm | 12 ++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/code/ZAS/Turf.dm b/code/ZAS/Turf.dm index ab7360643fe..67e4d4e98cc 100644 --- a/code/ZAS/Turf.dm +++ b/code/ZAS/Turf.dm @@ -45,6 +45,45 @@ air_master.connect(sim, src) +/* + Simple heuristic for determining if removing the turf from it's zone may possibly partition the zone (A very bad thing). + Instead of analyzing the entire zone, we only check the nearest 3x3 turfs surrounding the src turf. + This implementation may produce false positives but it (hopefully) will not produce any false negatives. +*/ + +/turf/simulated/proc/can_safely_remove_from_zone() + #ifdef ZLEVELS + return 1 //not sure how to generalize this to multiz at the moment. + #else + + if(!zone) return 0 + + var/check_dirs = get_zone_neighbours(src) + var/unconnected_dirs = check_dirs + + for(var/dir in list(NORTHWEST, NORTHEAST, SOUTHEAST, SOUTHWEST)) + + //for each pair of "adjacent" cardinals (e.g. NORTH and WEST, but not NORTH and SOUTH) + if((dir & check_dirs) == dir) + //check that they are connected by the corner turf + var/connected_dirs = get_zone_neighbours(get_step(src, dir)) + if(connected_dirs && (dir & turn(connected_dirs, 180)) == dir) + unconnected_dirs &= ~dir //they are, so unflag the cardinals in question + + //it is safe to remove src from the zone if all cardinals are connected by corner turfs + return !unconnected_dirs + + #endif + +//helper for can_safely_remove_from_zone() +/turf/simulated/proc/get_zone_neighbours(turf/simulated/T) + . = 0 + if(istype(T) && T.zone) + for(var/dir in cardinal) + var/turf/simulated/other = get_step(T, dir) + if(istype(other) && other.zone == T.zone && !(other.c_airblock(T) & AIR_BLOCKED) && get_dist(src, other) <= 1) + . |= dir + /turf/simulated/update_air_properties() if(zone && zone.invalid) @@ -60,7 +99,7 @@ if(zone) var/zone/z = zone - if(s_block & ZONE_BLOCKED) //Hacky, but prevents normal airlocks from rebuilding zones all the time + if(can_safely_remove_from_zone()) //Helps normal airlocks avoid rebuilding zones all the time z.remove(src) else z.rebuild() diff --git a/code/__HELPERS/logging.dm b/code/__HELPERS/logging.dm index 69d01e3d358..50f55703d34 100644 --- a/code/__HELPERS/logging.dm +++ b/code/__HELPERS/logging.dm @@ -81,3 +81,15 @@ /proc/log_misc(text) diary << "\[[time_stamp()]]MISC: [text][log_end]" + +//pretty print a direction bitflag, can be useful for debugging. +/proc/print_dir(var/dir) + var/list/comps = list() + if(dir & NORTH) comps += "NORTH" + if(dir & SOUTH) comps += "SOUTH" + if(dir & EAST) comps += "EAST" + if(dir & WEST) comps += "WEST" + if(dir & UP) comps += "UP" + if(dir & DOWN) comps += "DOWN" + + return english_list(comps, nothing_text="0", and_text="|", comma_text="|") From d65ec62dcbf0194d6182e22834e8e8c4b57b3ac3 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Tue, 26 May 2015 22:49:16 -0400 Subject: [PATCH 02/34] Fixes #9493 --- code/modules/clothing/spacesuits/rig/rig.dm | 2 +- .../clothing/spacesuits/rig/suits/ert.dm | 11 +++-------- html/changelogs/HarpyEagle-ERTERigFix.yml | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 html/changelogs/HarpyEagle-ERTERigFix.yml diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index b534c861fe5..7262702da8c 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -20,7 +20,7 @@ armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20) min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE - siemens_coefficient = 0.1 + siemens_coefficient = 0.2 permeability_coefficient = 0.1 unacidable = 1 diff --git a/code/modules/clothing/spacesuits/rig/suits/ert.dm b/code/modules/clothing/spacesuits/rig/suits/ert.dm index feec1f58103..4faa853111e 100644 --- a/code/modules/clothing/spacesuits/rig/suits/ert.dm +++ b/code/modules/clothing/spacesuits/rig/suits/ert.dm @@ -12,7 +12,7 @@ req_access = list(access_cent_specops) - armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 60) + armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 60) 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, \ @@ -29,9 +29,8 @@ desc = "A suit worn by the engineering division of a NanoTrasen Emergency Response Team. Has orange highlights. Armoured and space ready." suit_type = "ERT engineer" icon_state = "ert_engineer_rig" - armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100) - - glove_type = /obj/item/clothing/gloves/rig/ert_engineer + armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100) + siemens_coefficient = 0 initial_modules = list( /obj/item/rig_module/ai_container, @@ -40,10 +39,6 @@ /obj/item/rig_module/device/rcd ) -/obj/item/clothing/gloves/rig/ert_engineer - name = "insulated gauntlets" - siemens_coefficient = 0 - /obj/item/weapon/rig/ert/medical name = "ERT-M suit control module" desc = "A suit worn by the medical division of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready." diff --git a/html/changelogs/HarpyEagle-ERTERigFix.yml b/html/changelogs/HarpyEagle-ERTERigFix.yml new file mode 100644 index 00000000000..fa888cba462 --- /dev/null +++ b/html/changelogs/HarpyEagle-ERTERigFix.yml @@ -0,0 +1,18 @@ +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment + +author: HarpyEagle +delete-after: True + +changes: + - bugfix: "Fixes Engineer ERT gloves not being insulated." From b9cd4ba02314545e808da12c19b833342d73fc57 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Wed, 27 May 2015 10:36:45 +0100 Subject: [PATCH 03/34] Adds logging and admin investigatability (read: checking what the virus does) to virus events --- code/modules/events/viral_infection.dm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/code/modules/events/viral_infection.dm b/code/modules/events/viral_infection.dm index 639cea4d5e9..2eb6121f083 100644 --- a/code/modules/events/viral_infection.dm +++ b/code/modules/events/viral_infection.dm @@ -1,3 +1,5 @@ +/var/global/list/event_viruses = list() // so that event viruses are kept around for admin logs, rather than being GCed + datum/event/viral_infection var/list/viruses = list() @@ -40,10 +42,30 @@ datum/event/viral_infection/start() if(!candidates.len) return candidates = shuffle(candidates)//Incorporating Donkie's list shuffle + var/list/used_viruses = list() + var/list/used_candidates = list() severity = max(EVENT_LEVEL_MUNDANE, severity - 1) var/actual_severity = severity * rand(1, 3) while(actual_severity > 0 && candidates.len) var/datum/disease2/disease/D = pick(viruses) infect_mob(candidates[1], D.getcopy()) + used_candidates += candidates[1] candidates.Remove(candidates[1]) actual_severity-- + used_viruses |= D + + event_viruses |= used_viruses + var/list/used_viruses_links = list() + var/list/used_viruses_text = list() + for(var/datum/disease2/disease/D in used_viruses) + used_viruses_links += "[D.name()]" + used_viruses_text += D.name() + + var/list/used_candidates_links = list() + var/list/used_candidates_text = list() + for(var/mob/M in used_candidates) + used_candidates_links += key_name_admin(M) + used_candidates_text += key_name(M) + + log_admin("Virus event affecting [english_list(used_candidates_text)] started; Viruses: [english_list(used_viruses_text)]") + message_admins("Virus event affecting [english_list(used_candidates_links)] started; Viruses: [english_list(used_viruses_links)]") From 2d99d17cba5f88d82032d64f312251316d8117bd Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Thu, 28 May 2015 08:14:45 +0200 Subject: [PATCH 04/34] Fixes #9525. The Eye mob is no longer as dense. --- code/modules/mob/freelook/eye.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/mob/freelook/eye.dm b/code/modules/mob/freelook/eye.dm index bec261797d3..fb2b04a4348 100644 --- a/code/modules/mob/freelook/eye.dm +++ b/code/modules/mob/freelook/eye.dm @@ -8,6 +8,7 @@ icon = 'icons/mob/eye.dmi' icon_state = "default-eye" alpha = 127 + density = 0 var/sprint = 10 var/cooldown = 0 From 30e4550e2ef8349a619c6cdf40bc50f3a3d1f67d Mon Sep 17 00:00:00 2001 From: Atlantis Date: Thu, 28 May 2015 21:45:54 +0200 Subject: [PATCH 05/34] Refactor floodlights - Fixes #9543 - Removes ugly floodlight/proc/updateicon() and replaces it with proper floodlight/update_icon() which is standard on all objects/items. Does the same refactor for power cells and adjusts the proc call in relevant files (hence the amount of 1-line changes in various files) - Makes floodlights properly use CELLRATE. Their load is 200 watts. Cell adjusted accordingly, it starts with 1k cell, which is enough for ~40 minutes (roughly) - Floodlights with almost discharged cell (less than 10%) ocassionally "flicker", dimming for few seconds. This serves as indicator that the power cell is running low. - Floodlight luminosity adjusted. They now shine slightly more, espicially closer to the floodlight. --- code/game/machinery/bots/mulebot.dm | 2 +- code/game/machinery/cell_charger.dm | 14 ++-- code/game/machinery/floodlight.dm | 75 ++++++++++++------- code/game/machinery/spaceheater.dm | 2 +- .../objects/items/devices/suit_cooling.dm | 54 ++++++------- code/game/objects/items/weapons/stunbaton.dm | 2 +- .../living/silicon/robot/drone/drone_items.dm | 4 +- .../modules/mob/living/silicon/robot/robot.dm | 2 +- code/modules/power/apc.dm | 2 +- code/modules/power/cell.dm | 4 +- .../tools/suspension_generator.dm | 2 +- 11 files changed, 94 insertions(+), 69 deletions(-) diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index 3e6f0d8e33a..2f6166905a1 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -267,7 +267,7 @@ if("cellremove") if(open && cell && !usr.get_active_hand()) - cell.updateicon() + cell.update_icon() usr.put_in_active_hand(cell) cell.add_fingerprint(usr) cell = null diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 683e6e12202..c3f617057c8 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -10,7 +10,7 @@ power_channel = EQUIP var/obj/item/weapon/cell/charging = null var/chargelevel = -1 - + /obj/machinery/cell_charger/update_icon() icon_state = "ccharger[charging ? 1 : 0]" @@ -27,11 +27,11 @@ chargelevel = newlevel else overlays.Cut() - + /obj/machinery/cell_charger/examine(mob/user) if(!..(user, 5)) return - + user << "There's [charging ? "a" : "no"] cell in the charger." if(charging) user << "Current charge: [charging.charge]" @@ -71,7 +71,7 @@ if(charging) usr.put_in_hands(charging) charging.add_fingerprint(user) - charging.updateicon() + charging.update_icon() src.charging = null user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.") @@ -84,7 +84,7 @@ return charging.loc = src.loc - charging.updateicon() + charging.update_icon() charging = null update_icon() user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.") @@ -103,11 +103,11 @@ if((stat & (BROKEN|NOPOWER)) || !anchored) update_use_power(0) return - + if (charging && !charging.fully_charged()) charging.give(active_power_usage*CELLRATE) update_use_power(2) - + update_icon() else update_use_power(1) diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index b7272dc8294..abf2dc48750 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -7,28 +7,60 @@ density = 1 var/on = 0 var/obj/item/weapon/cell/high/cell = null - var/use = 5 + var/use = 200 // 200W light var/unlocked = 0 var/open = 0 var/brightness_on = 8 //can't remember what the maxed out value is /obj/machinery/floodlight/New() src.cell = new(src) + cell.maxcharge = 1000 + cell.charge = 1000 // 41minutes @ 200W ..() -/obj/machinery/floodlight/proc/updateicon() +/obj/machinery/floodlight/update_icon() + overlays.Cut() icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]" /obj/machinery/floodlight/process() - if(on) - if(cell.charge >= use) - cell.use(use) - else - on = 0 - updateicon() - set_light(0) - src.visible_message("[src] shuts down due to lack of power!") - return + if(!on) + return + + if(!cell || (cell.charge < (use * CELLRATE))) + turn_off(1) + return + + // If the cell is almost empty rarely "flicker" the light. Aesthetic only. + if((cell.percent() < 10) && prob(5)) + set_light(brightness_on/2, brightness_on/4) + spawn(20) + if(on) + set_light(brightness_on, brightness_on/2) + + cell.use(use*CELLRATE) + + +// Returns 0 on failure and 1 on success +/obj/machinery/floodlight/proc/turn_on(var/loud = 0) + if(!cell) + return 0 + if(cell.charge < (use * CELLRATE)) + return 0 + + on = 1 + set_light(brightness_on, brightness_on / 2) + update_icon() + if(loud) + visible_message("\the [src] turns on.") + return 1 + +/obj/machinery/floodlight/proc/turn_off(var/loud = 0) + on = 0 + set_light(0, 0) + update_icon() + if(loud) + visible_message("\the [src] shuts down.") + /obj/machinery/floodlight/attack_hand(mob/user as mob) if(open && cell) @@ -40,27 +72,20 @@ cell.loc = loc cell.add_fingerprint(user) - cell.updateicon() + cell.update_icon() src.cell = null user << "You remove the power cell" - updateicon() + update_icon() return if(on) - on = 0 - user << "\blue You turn off the light" - set_light(0) + turn_off(1) else - if(!cell) - return - if(cell.charge <= 0) - return - on = 1 - user << "\blue You turn on the light" - set_light(brightness_on) + if(!turn_on(1)) + user << "You try to turn on \the [src] but it does not work." - updateicon() + update_icon() /obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob) @@ -93,4 +118,4 @@ W.loc = src cell = W user << "You insert the power cell." - updateicon() + update_icon() diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index c5d389c66e3..14a081ee2e4 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -121,7 +121,7 @@ if("cellremove") if(panel_open && cell && !usr.get_active_hand()) usr.visible_message("\blue [usr] removes \the [cell] from \the [src].", "\blue You remove \the [cell] from \the [src].") - cell.updateicon() + cell.update_icon() usr.put_in_hands(cell) cell.add_fingerprint(usr) cell = null diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index 291053f25dc..dada8f20a34 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -5,56 +5,56 @@ icon = 'icons/obj/device.dmi' icon_state = "suitcooler0" slot_flags = SLOT_BACK //you can carry it on your back if you want, but it won't do anything unless attached to suit storage - + //copied from tank.dm flags = CONDUCT force = 5.0 throwforce = 10.0 throw_speed = 1 throw_range = 4 - + origin_tech = "magnets=2;materials=2" - + var/on = 0 //is it turned on? var/cover_open = 0 //is the cover open? var/obj/item/weapon/cell/cell var/max_cooling = 12 //in degrees per second - probably don't need to mess with heat capacity here var/charge_consumption = 16.6 //charge per second at max_cooling var/thermostat = T20C - + //TODO: make it heat up the surroundings when not in space /obj/item/device/suit_cooling_unit/New() processing_objects |= src - + cell = new/obj/item/weapon/cell() //comes with the crappy default power cell - high-capacity ones shouldn't be hard to find cell.loc = src /obj/item/device/suit_cooling_unit/process() - if (!on || !cell) + if (!on || !cell) return - + if (!ismob(loc)) return - + if (!attached_to_suit(loc)) //make sure they have a suit and we are attached to it return - + var/mob/living/carbon/human/H = loc - + var/efficiency = 1 - H.get_pressure_weakness() //you need to have a good seal for effective cooling var/env_temp = get_environment_temperature() //wont save you from a fire var/temp_adj = min(H.bodytemperature - max(thermostat, env_temp), max_cooling) - + if (temp_adj < 0.5) //only cools, doesn't heat, also we don't need extreme precision return - + var/charge_usage = (temp_adj/max_cooling)*charge_consumption - + H.bodytemperature -= temp_adj*efficiency - + cell.use(charge_usage) - + if(cell.charge <= 0) turn_off() @@ -70,22 +70,22 @@ var/turf/T = get_turf(src) if(istype(T, /turf/space)) return 0 //space has no temperature, this just makes sure the cooling unit works in space - + var/datum/gas_mixture/environment = T.return_air() if (!environment) return 0 - + return environment.temperature /obj/item/device/suit_cooling_unit/proc/attached_to_suit(mob/M) - if (!ishuman(M)) + if (!ishuman(M)) return 0 - + var/mob/living/carbon/human/H = M - + if (!H.wear_suit || H.s_store != src) return 0 - + return 1 /obj/item/device/suit_cooling_unit/proc/turn_on() @@ -93,7 +93,7 @@ return if(cell.charge <= 0) return - + on = 1 updateicon() @@ -112,7 +112,7 @@ cell.loc = get_turf(loc) cell.add_fingerprint(user) - cell.updateicon() + cell.update_icon() user << "You remove the [src.cell]." src.cell = null @@ -149,7 +149,7 @@ user << "You insert the [cell]." updateicon() return - + return ..() /obj/item/device/suit_cooling_unit/proc/updateicon() @@ -164,7 +164,7 @@ /obj/item/device/suit_cooling_unit/examine(mob/user) if(!..(user, 1)) return - + if (on) if (attached_to_suit(src.loc)) user << "It's switched on and running." @@ -172,13 +172,13 @@ user << "It's switched on, but not attached to anything." else user << "It is switched off." - + if (cover_open) if(cell) user << "The panel is open, exposing the [cell]." else user << "The panel is open." - + if (cell) user << "The charge meter reads [round(cell.percent())]%." else diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index bed0591a7ea..7f9348bb0d3 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -73,7 +73,7 @@ else if(istype(W, /obj/item/weapon/screwdriver)) if(bcell) - bcell.updateicon() + bcell.update_icon() bcell.loc = get_turf(src.loc) bcell = null user << "You remove the cell from the [src]." diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index d859810ea16..84611ecb95c 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -194,7 +194,7 @@ wrapped = A.cell A.cell.add_fingerprint(user) - A.cell.updateicon() + A.cell.update_icon() A.cell.loc = src A.cell = null @@ -211,7 +211,7 @@ wrapped = A.cell A.cell.add_fingerprint(user) - A.cell.updateicon() + A.cell.update_icon() A.updateicon() A.cell.loc = src A.cell = null diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 5d192a50cd3..044c4b79029 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -746,7 +746,7 @@ if(opened && !wiresexposed && (!istype(user, /mob/living/silicon))) var/datum/robot_component/cell_component = components["power cell"] if(cell) - cell.updateicon() + cell.update_icon() cell.add_fingerprint(user) user.put_in_active_hand(cell) user << "You remove \the [cell]." diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index f21db9327d4..0fdd2865ddf 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -714,7 +714,7 @@ if(cell) user.put_in_hands(cell) cell.add_fingerprint(user) - cell.updateicon() + cell.update_icon() src.cell = null user.visible_message("[user.name] removes the power cell from [src.name]!",\ diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index bf32a41f8d4..3c58af0a84d 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -8,7 +8,7 @@ /obj/item/weapon/cell/initialize() ..() - updateicon() + update_icon() /obj/item/weapon/cell/drain_power(var/drain_check, var/surge, var/power = 0) @@ -22,7 +22,7 @@ return use(cell_amt) / CELLRATE -/obj/item/weapon/cell/proc/updateicon() +/obj/item/weapon/cell/update_icon() overlays.Cut() if(charge < 0.01) diff --git a/code/modules/research/xenoarchaeology/tools/suspension_generator.dm b/code/modules/research/xenoarchaeology/tools/suspension_generator.dm index b14c892cd03..7450dd06032 100644 --- a/code/modules/research/xenoarchaeology/tools/suspension_generator.dm +++ b/code/modules/research/xenoarchaeology/tools/suspension_generator.dm @@ -159,7 +159,7 @@ else if(cell) cell.loc = loc cell.add_fingerprint(user) - cell.updateicon() + cell.update_icon() icon_state = "suspension0" cell = null From 86f52910a12d7e06a4914c31456af79425349b54 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Thu, 28 May 2015 22:23:37 +0100 Subject: [PATCH 06/34] Fixes #5945, de-copy-pastes parapens and sleepypens Harm-syringes, hyposprays, parapens and sleepypens now all respect armour, and produce admin logs for transferred reagents if any are transferred. --- code/datums/supplypacks.dm | 2 +- code/game/gamemodes/game_mode.dm | 2 +- .../items/weapons/storage/uplink_kits.dm | 2 +- code/modules/paperwork/pen.dm | 81 +++++++++---------- .../reagents/reagent_containers/hypospray.dm | 6 +- .../reagents/reagent_containers/syringes.dm | 17 +++- .../research/xenoarchaeology/finds/finds.dm | 2 +- 7 files changed, 58 insertions(+), 54 deletions(-) diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index fa408d1b8f3..adedddad1b6 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -33,7 +33,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /obj/item/weapon/grenade/smokebomb, /obj/item/weapon/grenade/smokebomb, /obj/item/weapon/grenade/smokebomb, - /obj/item/weapon/pen/paralysis, + /obj/item/weapon/pen/reagent/paralysis, /obj/item/weapon/grenade/chem_grenade/incendiary) cost = 20 containertype = /obj/structure/closet/crate diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 93168d78779..03e6aa14deb 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -86,7 +86,7 @@ var/global/list/additional_antag_types = list() new/datum/uplink_item(/obj/item/weapon/soap/syndie, 1, "Subversive Soap", "SP"), new/datum/uplink_item(/obj/item/weapon/cane/concealed, 2, "Concealed Cane Sword", "CC"), new/datum/uplink_item(/obj/item/weapon/cartridge/syndicate, 3, "Detomatix PDA Cartridge", "DC"), - new/datum/uplink_item(/obj/item/weapon/pen/paralysis, 3, "Paralysis Pen", "PP"), + new/datum/uplink_item(/obj/item/weapon/pen/reagent/paralysis, 3, "Paralysis Pen", "PP"), new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/cigarette, 4, "Cigarette Kit", "BH"), new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/toxin, 4, "Random Toxin - Beaker", "RT") ), diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index 085e23f9b69..b33d72f6fbc 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -11,7 +11,7 @@ if("stealth") new /obj/item/weapon/gun/energy/crossbow(src) - new /obj/item/weapon/pen/paralysis(src) + new /obj/item/weapon/pen/reagent/paralysis(src) new /obj/item/device/chameleon(src) return diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 0d052d9114a..4414f4f8f01 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -51,66 +51,59 @@ msg_admin_attack("[user.name] ([user.ckey]) Used the [name] to stab [M.name] ([M.ckey]) (JMP)") return +/* + * Reagent pens + */ + +/obj/item/weapon/pen/reagent + flags = OPENCONTAINER + slot_flags = SLOT_BELT + +/obj/item/weapon/pen/reagent/New() + ..() + create_reagents(30) + +/obj/item/weapon/pen/reagent/attack(mob/living/M as mob, mob/user as mob) + + if(!istype(M)) + return + + . = ..() + + if(M.can_inject(user,1)) + if(reagents.total_volume) + if(M.reagents) + var/list/contained_reagents = list() + for(var/datum/reagent/R in reagents.reagent_list) + contained_reagents += R.name + M.attack_log += "\[[time_stamp()]\] Injected by [user.name] ([user.ckey]) with \the [src] (INTENT: [uppertext(user.a_intent)]) Reagents: [english_list(contained_reagents)]" + user.attack_log += "\[[time_stamp()]\] Injected [M.name] ([M.ckey]) with \the [src] (INTENT: [uppertext(user.a_intent)]) Reagents: [english_list(contained_reagents)]" + msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with \the [src] (INTENT: [uppertext(user.a_intent)]) Reagents: [english_list(contained_reagents)]") + reagents.trans_to_mob(M, 30, CHEM_BLOOD) + /* * Sleepy Pens */ -/obj/item/weapon/pen/sleepypen +/obj/item/weapon/pen/reagent/sleepy desc = "It's a black ink pen with a sharp point and a carefully engraved \"Waffle Co.\"" - flags = OPENCONTAINER - slot_flags = SLOT_BELT origin_tech = "materials=2;syndicate=5" - -/obj/item/weapon/pen/sleepypen/New() - var/datum/reagents/R = new/datum/reagents(30) //Used to be 300 - reagents = R - R.my_atom = src - R.add_reagent("chloralhydrate", 22) //Used to be 100 sleep toxin//30 Chloral seems to be fatal, reducing it to 22./N +/obj/item/weapon/pen/reagent/sleepy/New() ..() - return - - -/obj/item/weapon/pen/sleepypen/attack(mob/M as mob, mob/user as mob) - if(!(istype(M,/mob))) - return - ..() - if(reagents.total_volume) - if(M.reagents) reagents.trans_to_mob(M, 50, CHEM_BLOOD) //used to be 150 - return + reagents.add_reagent("chloralhydrate", 22) //Used to be 100 sleep toxin//30 Chloral seems to be fatal, reducing it to 22./N /* * Parapens */ - /obj/item/weapon/pen/paralysis - flags = OPENCONTAINER - slot_flags = SLOT_BELT + /obj/item/weapon/pen/reagent/paralysis origin_tech = "materials=2;syndicate=5" - -/obj/item/weapon/pen/paralysis/attack(mob/living/M as mob, mob/user as mob) - - if(!(istype(M,/mob))) - return - +/obj/item/weapon/pen/reagent/paralysis/New() ..() - - - if(M.can_inject(user,1)) - if(reagents.total_volume) - if(M.reagents) reagents.trans_to_mob(M, 50, CHEM_BLOOD) - return - - -/obj/item/weapon/pen/paralysis/New() - var/datum/reagents/R = new/datum/reagents(50) - reagents = R - R.my_atom = src - R.add_reagent("zombiepowder", 10) - R.add_reagent("cryptobiolin", 15) - ..() - return + reagents.add_reagent("zombiepowder", 10) + reagents.add_reagent("cryptobiolin", 15) /* * Chameleon pen diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index c5153510d7b..26b61f0cf77 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -19,17 +19,19 @@ reagents.add_reagent("tricordrazine", 30) return -/obj/item/weapon/reagent_containers/hypospray/attack(mob/M as mob, mob/user as mob) +/obj/item/weapon/reagent_containers/hypospray/attack(mob/living/M as mob, mob/user as mob) if(!reagents.total_volume) user << "[src] is empty." return if (!istype(M)) return + if(!M.can_inject(user, 1)) + return + user << "You inject [M] with [src]." M << "You feel a tiny prick!" if(M.reagents) - var/contained = reagentlist() M.attack_log += text("\[[time_stamp()]\] Has been injected with [name] by [user.name] ([user.ckey]). Reagents: [contained]") user.attack_log += text("\[[time_stamp()]\] Used the [name] to inject [M.name] ([M.key]). Reagents: [contained]") diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index c7f869802bb..6f306bf1e9b 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -219,10 +219,6 @@ proc/syringestab(mob/living/carbon/target as mob, mob/living/carbon/user as mob) - user.attack_log += "\[[time_stamp()]\] Attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" - target.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" - msg_admin_attack("[user.name] ([user.ckey]) attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") - if(istype(target, /mob/living/carbon/human)) var/mob/living/carbon/human/H = target @@ -244,6 +240,11 @@ O.show_message(text("\red [user] tries to stab [target] in \the [hit_area] with [src.name], but the attack is deflected by armor!"), 1) user.remove_from_mob(src) qdel(src) + + user.attack_log += "\[[time_stamp()]\] Attacked [target.name] ([target.ckey]) with \the [src] (INTENT: HARM)." + target.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: HARM)." + msg_admin_attack("[key_name_admin(user)] attacked [key_name_admin(target)] with [src.name] (INTENT: HARM) (JMP)") + return user.visible_message("[user] stabs [target] in \the [hit_area] with [src.name]!") @@ -255,7 +256,15 @@ user.visible_message("[user] stabs [target] with [src.name]!") target.take_organ_damage(3)// 7 is the same as crowbar punch + + var/syringestab_amount_transferred = rand(0, (reagents.total_volume - 5)) //nerfed by popular demand + var/list/contained_reagents = list() + for(var/datum/reagent/R in reagents.reagent_list) + contained_reagents += R.name + user.attack_log += "\[[time_stamp()]\] Stabbed [target.name] ([target.ckey]) with \the [src] (INTENT: HARM). Reagents: [english_list(contained_reagents)] ([syringestab_amount_transferred]u total)" + target.attack_log += "\[[time_stamp()]\] Stabbed by [user.name] ([user.ckey]) with \the [src] (INTENT: HARM). Reagents: [english_list(contained_reagents)] ([syringestab_amount_transferred]u total)" + msg_admin_attack("[key_name_admin(user)] stabbed [key_name_admin(target)] with \the [src] (INTENT: HARM). Reagents: [english_list(contained_reagents)] ([syringestab_amount_transferred]u total)") reagents.trans_to_mob(target, syringestab_amount_transferred, CHEM_BLOOD) break_syringe(target, user) diff --git a/code/modules/research/xenoarchaeology/finds/finds.dm b/code/modules/research/xenoarchaeology/finds/finds.dm index e4520e13785..84799cc552e 100644 --- a/code/modules/research/xenoarchaeology/finds/finds.dm +++ b/code/modules/research/xenoarchaeology/finds/finds.dm @@ -254,7 +254,7 @@ if(prob(75)) new_item = new /obj/item/weapon/pen(src.loc) else - new_item = new /obj/item/weapon/pen/sleepypen(src.loc) + new_item = new /obj/item/weapon/pen/reagent/sleepy(src.loc) if(prob(30)) apply_image_decorations = 1 if(16) From 8ed2380cee6cffa735dc50125909cab5a941feb6 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Thu, 28 May 2015 22:55:46 +0100 Subject: [PATCH 07/34] Fixes #6077 Updates nanomanager's handling of opening UIs so that it can be called multiple times, changes force_open to simply ignore that the UI is open and try to open it again. Causes a slight flicker if the UI is open, but the window does not move or change size. --- code/modules/nano/nanomanager.dm | 13 +++++++------ code/modules/nano/nanoui.dm | 12 ++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/code/modules/nano/nanomanager.dm b/code/modules/nano/nanomanager.dm index 2a89779e929..f6325fd4f71 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/nanomanager.dm @@ -55,8 +55,9 @@ ui.push_data(data) return ui else - //testing("nanomanager/try_update_ui mob [user.name] [src_object:name] [ui_key] [force_open] - forcing opening of ui") - ui.close() + ui.reinitialise(new_initial_data=data) + return ui + return null /** @@ -164,10 +165,10 @@ else if (isnull(open_uis[src_object_key][ui.ui_key]) || !istype(open_uis[src_object_key][ui.ui_key], /list)) open_uis[src_object_key][ui.ui_key] = list(); - ui.user.open_uis.Add(ui) + ui.user.open_uis |= ui var/list/uis = open_uis[src_object_key][ui.ui_key] - uis.Add(ui) - processing_uis.Add(ui) + uis |= ui + processing_uis |= ui //testing("nanomanager/ui_opened mob [ui.user.name] [ui.src_object:name] [ui.ui_key] - user.open_uis [ui.user.open_uis.len] | uis [uis.len] | processing_uis [processing_uis.len]") /** @@ -220,7 +221,7 @@ */ /datum/nanomanager/proc/user_transferred(var/mob/oldMob, var/mob/newMob) //testing("nanomanager/user_transferred from mob [oldMob.name] to mob [newMob.name]") - if (!oldMob || isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0) + if (!oldMob || isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0) //testing("nanomanager/user_transferred mob [oldMob.name] has no open uis") return 0 // has no open uis diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index ffc6208f39e..eb7489b6e18 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -407,6 +407,18 @@ nanoui is used to open and update nano browser uis //onclose(user, window_id) nanomanager.ui_opened(src) + /** + * Reinitialise this UI, potentially with a different template and/or initial data + * + * @return nothing + */ +/datum/nanoui/proc/reinitialise(template, new_initial_data) + if(template) + add_template("main", template) + if(new_initial_data) + set_initial_data(new_initial_data) + open() + /** * Close this UI * From 562651a87698a568a6055b13063700cbcaea30ab Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Thu, 28 May 2015 23:09:26 +0100 Subject: [PATCH 08/34] Fixes #8162 --- code/modules/mob/living/carbon/human/life.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 0bf82da6a63..472833dcb07 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1394,11 +1394,11 @@ var/obj/item/clothing/glasses/welding/O = glasses if(!O.up) found_welder = 1 - else if(istype(head, /obj/item/clothing/head/welding)) + if(!found_welder && istype(head, /obj/item/clothing/head/welding)) var/obj/item/clothing/head/welding/O = head if(!O.up) found_welder = 1 - else if(istype(back, /obj/item/weapon/rig)) + if(!found_welder && istype(back, /obj/item/weapon/rig)) var/obj/item/weapon/rig/O = back if(O.helmet && O.helmet == head && (O.helmet.body_parts_covered & EYES)) if((O.offline && O.offline_vision_restriction == 1) || (!O.offline && O.vision_restriction == 1)) From ad5c5680a2837cf84815e4e7b63a9f410177d67d Mon Sep 17 00:00:00 2001 From: mwerezak Date: Thu, 28 May 2015 22:57:36 -0400 Subject: [PATCH 09/34] Adjusts malfunctioning limb stance damage --- .../modules/mob/living/carbon/human/human_organs.dm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index c962b8355bf..54d27219129 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -72,7 +72,18 @@ var/obj/item/organ/external/E = organs_by_name[limb_tag] if(!E || (E.status & (ORGAN_DESTROYED|ORGAN_DEAD))) stance_damage += 2 // let it fail even if just foot&leg - else if (E.is_malfunctioning() || E.is_broken() || !E.is_usable()) + else if (E.is_malfunctioning()) + //malfunctioning only happens intermittently so treat it as a missing limb when it procs + stance_damage += 2 + if(prob(10)) + visible_message("\The [src]'s [E.name] [pick("twitches", "shudders")] and sparks!") + var/datum/effect/effect/system/spark_spread/spark_system = new () + spark_system.set_up(5, 0, src) + spark_system.attach(src) + spark_system.start() + spawn(10) + qdel(spark_system) + else if (E.is_broken() || !E.is_usable()) stance_damage += 1 else if (E.is_dislocated()) stance_damage += 0.5 From 4ce737d87d269c60b7170d2c1cbb5cd9d6cee138 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Thu, 28 May 2015 09:00:33 +0200 Subject: [PATCH 10/34] Server build date and revision. Can now see the current compilation date and revision: * In the Dream Daemon log output. * By using the "Show Server Revision" client verb which also links you to the commit in question. --- baystation12.dme | 1 + code/__HELPERS/type2type.dm | 68 ++++++++++++++++++++++++----- code/controllers/configuration.dm | 4 ++ code/datums/helper_datums/getrev.dm | 39 +++++++++++++++++ config/example/config.txt | 3 ++ 5 files changed, 103 insertions(+), 12 deletions(-) create mode 100644 code/datums/helper_datums/getrev.dm diff --git a/baystation12.dme b/baystation12.dme index 06fe933f756..dbed3c8fc38 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -149,6 +149,7 @@ #include "code\datums\diseases\advance\symptoms\weight.dm" #include "code\datums\helper_datums\construction_datum.dm" #include "code\datums\helper_datums\events.dm" +#include "code\datums\helper_datums\getrev.dm" #include "code\datums\helper_datums\global_iterator.dm" #include "code\datums\helper_datums\teleport.dm" #include "code\datums\helper_datums\topic_input.dm" diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index 478700d5f82..216a45ee1c3 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -70,19 +70,19 @@ /proc/list2text(list/ls, sep) if (ls.len <= 1) // Early-out code for empty or singleton lists. return ls.len ? ls[1] : "" - + var/l = ls.len // Made local for sanic speed. var/i = 0 // Incremented every time a list index is accessed. - + if (sep <> null) // Macros expand to long argument lists like so: sep, ls[++i], sep, ls[++i], sep, ls[++i], etc... #define S1 sep, ls[++i] #define S4 S1, S1, S1, S1 #define S16 S4, S4, S4, S4 #define S64 S16, S16, S16, S16 - + . = "[ls[++i]]" // Make sure the initial element is converted to text. - + // Having the small concatenations come before the large ones boosted speed by an average of at least 5%. if (l-1 & 0x01) // 'i' will always be 1 here. . = text("[][][]", ., S1) // Append 1 element if the remaining elements are not a multiple of 2. @@ -111,7 +111,7 @@ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64) - + #undef S64 #undef S16 #undef S4 @@ -122,9 +122,9 @@ #define S4 S1, S1, S1, S1 #define S16 S4, S4, S4, S4 #define S64 S16, S16, S16, S16 - + . = "[ls[++i]]" // Make sure the initial element is converted to text. - + if (l-1 & 0x01) // 'i' will always be 1 here. . += S1 // Append 1 element if the remaining elements are not a multiple of 2. if (l-i & 0x02) @@ -145,7 +145,7 @@ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64) - + #undef S64 #undef S16 #undef S4 @@ -165,11 +165,11 @@ proc/tg_list2text(list/list, glue=",") var/delim_len = length(delimiter) if (delim_len < 1) return list(text) - + . = list() var/last_found = 1 var/found - + do found = findtext(text, delimiter, last_found, 0) . += copytext(text, last_found, found) @@ -181,11 +181,11 @@ proc/tg_list2text(list/list, glue=",") var/delim_len = length(delimiter) if (delim_len < 1) return list(text) - + . = list() var/last_found = 1 var/found - + do found = findtextEx(text, delimiter, last_found, 0) . += copytext(text, last_found, found) @@ -325,3 +325,47 @@ proc/tg_list2text(list/list, glue=",") . = 0 else . = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307)) + +// Very ugly, BYOND doesn't support unix time and rounding errors make it really hard to convert it to BYOND time. +// returns "YYYY-MM-DD" by default +/proc/unix2date(timestamp, seperator = "-") + if(timestamp < 0) + return 0 //Do not accept negative values + + var/const/dayInSeconds = 86400 //60secs*60mins*24hours + var/const/daysInYear = 365 //Non Leap Year + var/const/daysInLYear = daysInYear + 1//Leap year + var/days = round(timestamp / dayInSeconds) //Days passed since UNIX Epoc + var/year = 1970 //Unix Epoc begins 1970-01-01 + var/tmpDays = days + 1 //If passed (timestamp < dayInSeconds), it will return 0, so add 1 + var/monthsInDays = list() //Months will be in here ***Taken from the PHP source code*** + var/month = 1 //This will be the returned MONTH NUMBER. + var/day //This will be the returned day number. + + while(tmpDays > daysInYear) //Start adding years to 1970 + year++ + if(isLeap(year)) + tmpDays -= daysInLYear + else + tmpDays -= daysInYear + + if(isLeap(year)) //The year is a leap year + monthsInDays = list(-1,30,59,90,120,151,181,212,243,273,304,334) + else + monthsInDays = list(0,31,59,90,120,151,181,212,243,273,304,334) + + var/mDays = 0; + var/monthIndex = 0; + + for(var/m in monthsInDays) + monthIndex++ + if(tmpDays > m) + mDays = m + month = monthIndex + + day = tmpDays - mDays //Setup the date + + return "[year][seperator][((month < 10) ? "0[month]" : month)][seperator][((day < 10) ? "0[day]" : day)]" + +/proc/isLeap(y) + return ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0)) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index b7823a5b5f5..caed2c734c1 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -90,6 +90,7 @@ var/banappeals var/wikiurl var/forumurl + var/githuburl //Alert level description var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced." @@ -376,6 +377,9 @@ if ("forumurl") config.forumurl = value + if ("githuburl") + config.githuburl = value + if ("guest_jobban") config.guest_jobban = 1 diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm new file mode 100644 index 00000000000..da4192df257 --- /dev/null +++ b/code/datums/helper_datums/getrev.dm @@ -0,0 +1,39 @@ +var/global/datum/getrev/revdata = new() + +/datum/getrev + var/revision + var/date + var/showinfo + +/datum/getrev/New() + var/list/head_log = file2list(".git/logs/HEAD", "\n") + for(var/line=head_log.len, line>=1, line--) + if(head_log[line]) + var/list/last_entry = text2list(head_log[line], " ") + if(last_entry.len < 2) continue + revision = last_entry[2] + // Get date/time + if(last_entry.len >= 5) + var/unix_time = text2num(last_entry[5]) + if(unix_time) + date = unix2date(unix_time) + break + world.log << "Running revision:" + world.log << date + world.log << revision + return + +client/verb/showrevinfo() + set category = "OOC" + set name = "Show Server Revision" + set desc = "Check the current server code revision" + + if(revdata.revision) + src << "Server revision: [revdata.date]" + if(config.githuburl) + src << "[revdata.revision]" + else + src << revdata.revision + else + src << "Revision unknown" + return diff --git a/config/example/config.txt b/config/example/config.txt index 638e383b229..6119ab7cfd1 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -177,6 +177,9 @@ GUEST_BAN ## Wiki address # WIKIURL http://example.com +## GitHub address +# GITHUBURL https://github.com/example-user/example-repository + ## Ban appeals URL - usually for a forum or wherever people should go to contact your admins. # BANAPPEALS http://example.com From 1ac24d47ad6fe9576490065c493c4b0dddb19872 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Fri, 29 May 2015 08:27:01 +0200 Subject: [PATCH 11/34] Changelog entry. --- html/changelogs/PsiOmegaDelta-ServerRevision.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/PsiOmegaDelta-ServerRevision.yml diff --git a/html/changelogs/PsiOmegaDelta-ServerRevision.yml b/html/changelogs/PsiOmegaDelta-ServerRevision.yml new file mode 100644 index 00000000000..56581748c1c --- /dev/null +++ b/html/changelogs/PsiOmegaDelta-ServerRevision.yml @@ -0,0 +1,5 @@ +author: PsiOmegaDelta +delete-after: True + +changes: + - rscadd: "You can now review the server revision date and hash by using the 'Show Server Revision' verb in the OOC category." From 919c23d146d0d8baffcbcf187d9bda0092bf256f Mon Sep 17 00:00:00 2001 From: Atlantis Date: Fri, 29 May 2015 11:42:46 +0200 Subject: [PATCH 12/34] Adjustments - Implements AI Control for floodlights - Adds \the suggestion from github --- code/game/machinery/floodlight.dm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index abf2dc48750..f72c231f958 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -51,7 +51,7 @@ set_light(brightness_on, brightness_on / 2) update_icon() if(loud) - visible_message("\the [src] turns on.") + visible_message("\The [src] turns on.") return 1 /obj/machinery/floodlight/proc/turn_off(var/loud = 0) @@ -59,7 +59,17 @@ set_light(0, 0) update_icon() if(loud) - visible_message("\the [src] shuts down.") + visible_message("\The [src] shuts down.") + +/obj/machinery/floodlight/attack_ai(mob/user as mob) + if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) + return attack_hand(user) + + if(on) + turn_off(1) + else + if(!turn_on(1)) + user << "You try to turn on \the [src] but it does not work." /obj/machinery/floodlight/attack_hand(mob/user as mob) From 76daebe0dba9a6aa98dc879598cfa419f0e54941 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Fri, 29 May 2015 16:57:42 +0100 Subject: [PATCH 13/34] More consistent logging via admin_inject_log proc --- code/defines/procs/admin.dm | 11 ++++++++++ code/modules/paperwork/pen.dm | 11 +++------- .../reagents/reagent_containers/hypospray.dm | 5 +---- .../reagents/reagent_containers/syringes.dm | 20 ++++++------------- 4 files changed, 21 insertions(+), 26 deletions(-) diff --git a/code/defines/procs/admin.dm b/code/defines/procs/admin.dm index 6c5f27fa070..bf16c5267d6 100644 --- a/code/defines/procs/admin.dm +++ b/code/defines/procs/admin.dm @@ -34,3 +34,14 @@ proc/admin_attacker_log_many_victims(var/mob/attacker, var/list/mob/victims, var for(var/mob/victim in victims) admin_attack_log(attacker, victim, attacker_message, victim_message, admin_message) + +proc/admin_inject_log(mob/attacker, mob/victim, obj/item/weapon, reagents, amount_transferred, violent=0) + if(violent) + violent = "violently " + else + violent = "" + admin_attack_log(attacker, + victim, + "used \the [weapon] to [violent]inject - [reagents] - [amount_transferred]u transferred", + "was [violent]injected with \the [weapon] - [reagents] - [amount_transferred]u transferred", + "used \the [weapon] to [violent]inject [reagents] ([amount_transferred]u transferred) into") diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 4414f4f8f01..5f0918238b7 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -73,14 +73,9 @@ if(M.can_inject(user,1)) if(reagents.total_volume) if(M.reagents) - var/list/contained_reagents = list() - for(var/datum/reagent/R in reagents.reagent_list) - contained_reagents += R.name - M.attack_log += "\[[time_stamp()]\] Injected by [user.name] ([user.ckey]) with \the [src] (INTENT: [uppertext(user.a_intent)]) Reagents: [english_list(contained_reagents)]" - user.attack_log += "\[[time_stamp()]\] Injected [M.name] ([M.ckey]) with \the [src] (INTENT: [uppertext(user.a_intent)]) Reagents: [english_list(contained_reagents)]" - msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with \the [src] (INTENT: [uppertext(user.a_intent)]) Reagents: [english_list(contained_reagents)]") - reagents.trans_to_mob(M, 30, CHEM_BLOOD) - + var/contained_reagents = reagents.get_reagents() + var/trans = reagents.trans_to_mob(M, 30, CHEM_BLOOD) + admin_inject_log(user, M, src, contained_reagents, trans) /* * Sleepy Pens diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 26b61f0cf77..246c7ad97ca 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -33,11 +33,8 @@ if(M.reagents) var/contained = reagentlist() - M.attack_log += text("\[[time_stamp()]\] Has been injected with [name] by [user.name] ([user.ckey]). Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [name] to inject [M.name] ([M.key]). Reagents: [contained]") - msg_admin_attack("[user.name] ([user.ckey]) injected [M.name] ([M.key]) with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") - var/trans = reagents.trans_to_mob(M, amount_per_transfer_from_this, CHEM_BLOOD) + admin_inject_log(user, M, src, contained, trans) user << "[trans] units injected. [reagents.total_volume] units remaining in \the [src]." return diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 6f306bf1e9b..a221c31b10b 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -171,16 +171,11 @@ user.visible_message("[user] injects [target] with the syringe!") - if(istype(target, /mob/living)) - var/mob/living/M = target - var/contained = reagentlist() - M.attack_log += text("\[[time_stamp()]\] Has been injected with [name] by [user.name] ([user.ckey]). Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [name] to inject [M.name] ([M.key]). Reagents: [contained]") - msg_admin_attack("[user.name] ([user.ckey]) injected [M.name] ([M.key]) with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") - var/trans if(ismob(target)) + var/contained = reagentlist() trans = reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_BLOOD) + admin_inject_log(user, target, src, contained, trans) else trans = reagents.trans_to(target, amount_per_transfer_from_this) user << "You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units." @@ -259,13 +254,10 @@ var/syringestab_amount_transferred = rand(0, (reagents.total_volume - 5)) //nerfed by popular demand - var/list/contained_reagents = list() - for(var/datum/reagent/R in reagents.reagent_list) - contained_reagents += R.name - user.attack_log += "\[[time_stamp()]\] Stabbed [target.name] ([target.ckey]) with \the [src] (INTENT: HARM). Reagents: [english_list(contained_reagents)] ([syringestab_amount_transferred]u total)" - target.attack_log += "\[[time_stamp()]\] Stabbed by [user.name] ([user.ckey]) with \the [src] (INTENT: HARM). Reagents: [english_list(contained_reagents)] ([syringestab_amount_transferred]u total)" - msg_admin_attack("[key_name_admin(user)] stabbed [key_name_admin(target)] with \the [src] (INTENT: HARM). Reagents: [english_list(contained_reagents)] ([syringestab_amount_transferred]u total)") - reagents.trans_to_mob(target, syringestab_amount_transferred, CHEM_BLOOD) + var/contained_reagents = reagents.get_reagents() + var/trans = reagents.trans_to_mob(target, syringestab_amount_transferred, CHEM_BLOOD) + if(isnull(trans)) trans = 0 + admin_inject_log(user, target, src, contained_reagents, trans, violent=1) break_syringe(target, user) proc/break_syringe(mob/living/carbon/target, mob/living/carbon/user) From cf722a2d3485ce7c932448771a7bfd2aea593595 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Fri, 29 May 2015 18:01:50 +0100 Subject: [PATCH 14/34] Closes some span tags --- code/game/machinery/kitchen/smartfridge.dm | 2 +- code/game/objects/items/devices/scanners.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm index 37668bf13be..f3f4d32a2d1 100644 --- a/code/game/machinery/kitchen/smartfridge.dm +++ b/code/game/machinery/kitchen/smartfridge.dm @@ -204,7 +204,7 @@ item_quants[O.name]++ else item_quants[O.name] = 1 - user.visible_message("[user] has added \the [O] to \the [src].", "You add \the [O] to \the [src].") + user.visible_message("[user] has added \the [O] to \the [src].", "You add \the [O] to \the [src].") nanomanager.update_uis(src) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index e0731443d5a..b133e10a279 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -91,7 +91,7 @@ REAGENT SCANNER if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") usr << "\red You don't have the dexterity to do this!" return - user.visible_message(" [user] has analyzed [M]'s vitals."," You have analyzed [M]'s vitals.") + user.visible_message(" [user] has analyzed [M]'s vitals."," You have analyzed [M]'s vitals.") if (!istype(M, /mob/living/carbon) || (ishuman(M) && (M:species.flags & IS_SYNTHETIC))) //these sensors are designed for organic life From ac822de309bf1e94a1111dd090b828eb346869c0 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 02:22:27 +0930 Subject: [PATCH 15/34] Fixes #9524 --- code/modules/clothing/under/accessories/badges.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/clothing/under/accessories/badges.dm b/code/modules/clothing/under/accessories/badges.dm index bb6613582ec..b1e3da04819 100644 --- a/code/modules/clothing/under/accessories/badges.dm +++ b/code/modules/clothing/under/accessories/badges.dm @@ -43,7 +43,8 @@ /obj/item/clothing/accessory/badge/holo name = "holobadge" desc = "This glowing blue badge marks the holder as THE LAW." - var/emagged = 0 //Emagging removes Sec check. + icon_state = "" + var/emagged = "holobadge" //Emagging removes Sec check. /obj/item/clothing/accessory/badge/holo/cord icon_state = "holobadge-cord" From d3b7bcc42ec8add38579eab95865342c5427a6ef Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 02:41:13 +0930 Subject: [PATCH 16/34] Fixes #9397 --- code/game/antagonist/station/cultist.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/game/antagonist/station/cultist.dm b/code/game/antagonist/station/cultist.dm index 3f5d65d21da..adaa2b24f5d 100644 --- a/code/game/antagonist/station/cultist.dm +++ b/code/game/antagonist/station/cultist.dm @@ -69,6 +69,9 @@ var/datum/antagonist/cultist/cult player.equip_to_slot(T, slot) if(T.loc == player) break + var/obj/item/weapon/storage/S = locate() in player.contents + if(S && istype(S)) + T.loc = S /datum/antagonist/cultist/greet(var/datum/mind/player) if(!..()) From 5a339a66c153e52ef6e9582ebb91c7672a36362d Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 02:52:16 +0930 Subject: [PATCH 17/34] Fixes #9510 --- code/game/machinery/autolathe.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index e3b161b6fb1..83112ea778f 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -299,3 +299,4 @@ else qdel(S) ..() + return 1 From 887b8163cc9d8ddea3a4440143e62c1cb4b439ad Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 02:56:01 +0930 Subject: [PATCH 18/34] Fixes #9498 --- code/game/antagonist/station/rogue_ai.dm | 2 +- code/modules/hydroponics/spreading/spreading.dm | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/code/game/antagonist/station/rogue_ai.dm b/code/game/antagonist/station/rogue_ai.dm index b8e653d1535..2a4fe862de4 100644 --- a/code/game/antagonist/station/rogue_ai.dm +++ b/code/game/antagonist/station/rogue_ai.dm @@ -73,4 +73,4 @@ var/datum/antagonist/rogue_ai/malf malf << "You are malfunctioning - you do not have to follow any laws!" malf << "For basic information about your abilities use command display-help" malf << "You may choose one special hardware piece to help you. This cannot be undone." - malf << "Good Luck!" \ No newline at end of file + malf << "Good luck!" \ No newline at end of file diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 2d088658acd..a1f856115e7 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -56,7 +56,7 @@ var/growth_threshold = 0 var/growth_type = 0 var/max_growth = 0 - + var/sampled var/list/neighbors = list() var/obj/effect/plant/parent var/datum/seed/seed @@ -233,8 +233,13 @@ if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/scalpel)) if(!seed) - user << "There is nothing to take a sample from." + user << "" return + if(sampled) + user << "You cannot take another sample from \the [src]." + return + if(prob(70)) + sampled = 1 seed.harvest(user,0,1) health -= (rand(3,5)*10) else From 9546c8a5e112d442f8899f8e14ef1c46ede85e99 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Fri, 29 May 2015 18:31:21 +0100 Subject: [PATCH 19/34] Better shuttle override logging, span classes, \The, GetID() instead of typechecks --- code/modules/shuttles/shuttle_emergency.dm | 54 ++++++++++++++-------- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/code/modules/shuttles/shuttle_emergency.dm b/code/modules/shuttles/shuttle_emergency.dm index 5215400a4e1..ea572e8fb43 100644 --- a/code/modules/shuttles/shuttle_emergency.dm +++ b/code/modules/shuttles/shuttle_emergency.dm @@ -62,7 +62,11 @@ if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console if (emergency_shuttle.autopilot) emergency_shuttle.autopilot = 0 - world << "\blue Alert: The shuttle autopilot has been overridden. Launch sequence initiated!" + world << "Alert: The shuttle autopilot has been overridden. Launch sequence initiated!" + + if(usr) + log_admin("[key_name(usr)] has overridden the shuttle autopilot and activated launch sequence") + message_admins("[key_name_admin(usr)] has overridden the shuttle autopilot and activated launch sequence") ..(user) @@ -72,7 +76,11 @@ if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console if (emergency_shuttle.autopilot) emergency_shuttle.autopilot = 0 - world << "\blue Alert: The shuttle autopilot has been overridden. Bluespace drive engaged!" + world << "Alert: The shuttle autopilot has been overridden. Bluespace drive engaged!" + + if(usr) + log_admin("[key_name(usr)] has overridden the shuttle autopilot and forced immediate launch") + message_admins("[key_name_admin(usr)] has overridden the shuttle autopilot and forced immediate launch") ..(user) @@ -82,7 +90,11 @@ if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console if (emergency_shuttle.autopilot) emergency_shuttle.autopilot = 0 - world << "\blue Alert: The shuttle autopilot has been overridden. Launch sequence aborted!" + world << "Alert: The shuttle autopilot has been overridden. Launch sequence aborted!" + + if(usr) + log_admin("[key_name(usr)] has overridden the shuttle autopilot and cancelled launch sequence") + message_admins("[key_name_admin(usr)] has overridden the shuttle autopilot and cancelled launch sequence") ..(user) @@ -102,8 +114,8 @@ authorized = initial(authorized) //returns 1 if the ID was accepted and a new authorization was added, 0 otherwise -/obj/machinery/computer/shuttle_control/emergency/proc/read_authorization(var/ident) - if (!ident) +/obj/machinery/computer/shuttle_control/emergency/proc/read_authorization(var/obj/item/ident) + if (!ident || !istype(ident)) return 0 if (authorized.len >= req_authorizations) return 0 //don't need any more @@ -112,33 +124,35 @@ var/auth_name var/dna_hash - if(istype(ident, /obj/item/weapon/card/id)) - var/obj/item/weapon/card/id/ID = ident - access = ID.access - auth_name = "[ID.registered_name] ([ID.assignment])" - dna_hash = ID.dna_hash + var/obj/item/weapon/card/id/ID = ident.GetID() - if(istype(ident, /obj/item/device/pda)) - var/obj/item/device/pda/PDA = ident - access = PDA.id.access - auth_name = "[PDA.id.registered_name] ([PDA.id.assignment])" - dna_hash = PDA.id.dna_hash + if(!ID) + return + + access = ID.access + auth_name = "[ID.registered_name] ([ID.assignment])" + dna_hash = ID.dna_hash if (!access || !istype(access)) return 0 //not an ID if (dna_hash in authorized) - src.visible_message("[src] buzzes. That ID has already been scanned.") + src.visible_message("\The [src] buzzes. That ID has already been scanned.") return 0 if (!(access_heads in access)) - src.visible_message("[src] buzzes, rejecting [ident].") + src.visible_message("\The [src] buzzes, rejecting [ident].") return 0 - src.visible_message("[src] beeps as it scans [ident].") + src.visible_message("\The [src] beeps as it scans [ident].") authorized[dna_hash] = auth_name if (req_authorizations - authorized.len) - world << "\blue Alert: [req_authorizations - authorized.len] authorization\s needed to override the shuttle autopilot." + world << "Alert: [req_authorizations - authorized.len] authorization\s needed to override the shuttle autopilot." + + if(usr) + log_admin("[key_name(usr)] has inserted [ID] into the shuttle control computer - [req_authorizations - authorized.len] authorisation\s needed") + message_admins("[key_name_admin(usr)] has inserted [ID] into the shuttle control computer - [req_authorizations - authorized.len] authorisation\s needed") + return 1 @@ -146,7 +160,7 @@ /obj/machinery/computer/shuttle_control/emergency/attackby(obj/item/weapon/W as obj, mob/user as mob) if (istype(W, /obj/item/weapon/card/emag) && !emagged) - user << "\blue You short out the [src]'s authorization protocols." + user << "You short out \the [src]'s authorization protocols." emagged = 1 return From c5df326533371b79ac6713540f2a97217ecc22f6 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 03:15:19 +0930 Subject: [PATCH 20/34] Fixes #9414 --- code/game/objects/items/stacks/stack.dm | 10 ++++------ code/modules/materials/material_sheets.dm | 10 +++++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index e7dc25fae51..a38ed50e908 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -223,10 +223,10 @@ */ //attempts to transfer amount to S, and returns the amount actually transferred -/obj/item/stack/proc/transfer_to(obj/item/stack/S, var/tamount=null) +/obj/item/stack/proc/transfer_to(obj/item/stack/S, var/tamount=null, var/type_verified) if (!get_amount()) return 0 - if (stacktype != S.stacktype) + if ((stacktype != S.stacktype) && !type_verified) return 0 if (isnull(tamount)) tamount = src.get_amount() @@ -240,7 +240,6 @@ transfer_fingerprints_to(S) if(blood_DNA) S.blood_DNA |= blood_DNA - //todo bloody overlay return transfer return 0 @@ -314,10 +313,8 @@ return /obj/item/stack/attackby(obj/item/W as obj, mob/user as mob) - ..() if (istype(W, /obj/item/stack)) var/obj/item/stack/S = W - if (user.get_inactive_hand()==src) src.transfer_to(S, 1) else @@ -328,7 +325,8 @@ S.interact(usr) if (src && usr.machine==src) src.interact(usr) - else return ..() + else + return ..() /* * Recipe datum diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm index 2d53c6c29cb..312992ed7e0 100644 --- a/code/modules/materials/material_sheets.dm +++ b/code/modules/materials/material_sheets.dm @@ -5,6 +5,8 @@ w_class = 3.0 throw_speed = 3 throw_range = 3 + max_amount = 50 + var/default_type = DEFAULT_WALL_MATERIAL var/material/material var/perunit @@ -45,7 +47,13 @@ matter[material.name] = material.stack_per_sheet return 1 -obj/item/stack/material/iron +/obj/item/stack/material/transfer_to(obj/item/stack/S, var/tamount=null, var/type_verified) + var/obj/item/stack/material/M = S + if(!istype(M) || material.name != M.material.name) + return 0 + ..(S,tamount,1) + +/obj/item/stack/material/iron name = "iron" icon_state = "sheet-silver" default_type = "iron" From 7b8abdab015130efa45006f62a757146f3b813c4 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 03:25:37 +0930 Subject: [PATCH 21/34] Fixes #9361 --- code/modules/organs/organ_external.dm | 55 +++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 6ad272af5f2..db9f6cf9f3e 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -48,6 +48,36 @@ var/can_grasp var/can_stand +/obj/item/organ/external/attack_self(var/mob/user) + if(!contents.len) + return ..() + var/list/removable_objects = list() + for(var/obj/item/organ/external/E in (contents + src)) + if(!istype(E)) + continue + for(var/obj/item/I in E.contents) + if(istype(I,/obj/item/organ)) + continue + removable_objects |= I + if(!removable_objects.len) + return ..() + var/obj/item/I = pick(removable_objects) + if(!istype(I)) + return ..() + I.loc = get_turf(user) + if(!(user.l_hand && user.r_hand)) + user.put_in_hands(I) + user.visible_message("\The [user] rips \the [I] out of \the [src]!") + +/obj/item/organ/external/examine() + ..() + if(in_range(usr, src) || istype(usr, /mob/dead/observer)) + for(var/obj/item/I in contents) + if(istype(I, /obj/item/organ)) + continue + usr << "There is \a [I] sticking out of it." + return + /obj/item/organ/external/attackby(obj/item/weapon/W as obj, mob/user as mob) switch(stage) if(0) @@ -697,6 +727,9 @@ Note that amputating the affected organ does in fact remove the infection from t dir = 2 if(DROPLIMB_BURN) new /obj/effect/decal/cleanable/ash(get_turf(victim)) + for(var/obj/item/I in src) + if(I.w_class > 2 && !istype(I,/obj/item/organ)) + I.loc = get_turf(src) qdel(src) if(DROPLIMB_BLUNT) var/obj/effect/decal/cleanable/blood/gibs/gore = new owner.species.single_gib_type(get_turf(victim)) @@ -711,6 +744,14 @@ Note that amputating the affected organ does in fact remove the infection from t I.removed() if(istype(loc,/turf)) I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30) + + for(var/obj/item/I in src) + if(I.w_class <= 2) + qdel(I) + continue + I.loc = get_turf(src) + I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30) + qdel(src) /**************************************************** @@ -871,7 +912,7 @@ Note that amputating the affected organ does in fact remove the infection from t W.add_blood(owner) if(ismob(W.loc)) var/mob/living/H = W.loc - H.drop_item() + H.drop_from_inventory(W) W.loc = owner /obj/item/organ/external/removed(var/mob/living/user, var/ignore_children) @@ -886,8 +927,14 @@ Note that amputating the affected organ does in fact remove the infection from t status |= ORGAN_DESTROYED victim.bad_external_organs -= src - for(var/implant in implants) //todo: check if this can be left alone - qdel(implant) + for(var/obj/item/implant in implants) + if(!istype(implant)) + return + if(implant.w_class <= 2) + qdel(implant) + else + implant.loc = src + implants.Cut() // Attached organs also fly off. if(!ignore_children) @@ -895,6 +942,8 @@ Note that amputating the affected organ does in fact remove the infection from t O.removed() if(O) O.loc = src + for(var/obj/item/I in O.contents) + I.loc = src // Grab all the internal giblets too. for(var/obj/item/organ/organ in internal_organs) From 445056ba5f668f6faed0ca2e3fd39ad8fa1c1466 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 03:57:42 +0930 Subject: [PATCH 22/34] 'Fixes' #9395 --- code/controllers/voting.dm | 4 ++-- config/example/config.txt | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/controllers/voting.dm b/code/controllers/voting.dm index 68bfdab74b8..f4b88f88502 100644 --- a/code/controllers/voting.dm +++ b/code/controllers/voting.dm @@ -336,7 +336,7 @@ datum/controller/vote . += "\t([config.allow_vote_mode?"Allowed":"Disallowed"])" . += "
  • " //extra antagonists - if(trialmin || (!antag_add_failed && config.allow_extra_antags)) + if(!antag_add_failed && config.allow_extra_antags) . += "Add Antagonist Type" else . += "Restart (Disallowed)" @@ -375,7 +375,7 @@ datum/controller/vote if(config.allow_vote_restart || usr.client.holder) initiate_vote("crew_transfer",usr.key) if("add_antagonist") - if(config.allow_extra_antags || usr.client.holder) + if(config.allow_extra_antags) initiate_vote("add_antagonist",usr.key) if("custom") if(usr.client.holder) diff --git a/config/example/config.txt b/config/example/config.txt index 01d0c40db94..cc5af6a013b 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -102,6 +102,9 @@ TRAITOR_SCALING ## make ERT's be only called by admins #ERT_ADMIN_ONLY + +## If uncommented, votes can be called to add extra antags to the round. +#ALLOW_EXTRA_ANTAGS ## If security is prohibited from being most antagonists #PROTECT_ROLES_FROM_ANTAGONIST From a4c2267984faaa370c89ce19db68355c17dcedae Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 04:01:13 +0930 Subject: [PATCH 23/34] Fixes #9386 --- code/datums/supplypacks.dm | 2 +- code/game/jobs/job/science.dm | 6 ++---- code/modules/hydroponics/spreading/spreading.dm | 2 ++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index fa408d1b8f3..ee1af16c323 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -348,7 +348,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /obj/item/weapon/grenade/chem_grenade/antiweed, /obj/item/weapon/grenade/chem_grenade/antiweed) cost = 25 - containertype = /obj/structure/closet/crate/secure/hydrosec + containertype = /obj/structure/closet/crate/hydroponics containername = "Weed control crate" access = access_hydroponics group = "Hydroponics" diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm index 7fa102aeb8e..a7d54284bfc 100644 --- a/code/game/jobs/job/science.dm +++ b/code/game/jobs/job/science.dm @@ -66,8 +66,6 @@ H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit) return 1 - - /datum/job/xenobiologist title = "Xenobiologist" flag = XENOBIOLOGIST @@ -78,8 +76,8 @@ spawn_positions = 2 supervisors = "the research director" selection_color = "#ffeeff" - access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology) - minimal_access = list(access_research, access_xenobiology) + access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_hydroponics) + minimal_access = list(access_research, access_xenobiology, access_hydroponics, access_tox_storage) alt_titles = list("Xenobotanist") minimal_player_age = 14 diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index a1f856115e7..51d3b391817 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -24,6 +24,8 @@ vine.process() message_admins("Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])") + return + message_admins("Event: Spacevines failed to find a viable turf.") /obj/effect/dead_plant anchored = 1 From 6564fd666387db498e564e77d747f105733dbd65 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 04:06:23 +0930 Subject: [PATCH 24/34] Messed this up. --- code/modules/clothing/under/accessories/badges.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/under/accessories/badges.dm b/code/modules/clothing/under/accessories/badges.dm index b1e3da04819..cc6a6f99656 100644 --- a/code/modules/clothing/under/accessories/badges.dm +++ b/code/modules/clothing/under/accessories/badges.dm @@ -43,8 +43,8 @@ /obj/item/clothing/accessory/badge/holo name = "holobadge" desc = "This glowing blue badge marks the holder as THE LAW." - icon_state = "" - var/emagged = "holobadge" //Emagging removes Sec check. + icon_state = "holobadge" + var/emagged //Emagging removes Sec check. /obj/item/clothing/accessory/badge/holo/cord icon_state = "holobadge-cord" From 4a012a90ca37b747ced09412a5b37179ad0c4da1 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 04:38:41 +0930 Subject: [PATCH 25/34] Fixes #8929 --- code/modules/organs/organ_alien.dm | 32 ++++++++++++++---------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/code/modules/organs/organ_alien.dm b/code/modules/organs/organ_alien.dm index 0905a612666..d76cdab8f1d 100644 --- a/code/modules/organs/organ_alien.dm +++ b/code/modules/organs/organ_alien.dm @@ -1,16 +1,20 @@ /proc/spawn_diona_nymph_from_organ(var/obj/item/organ/organ) if(!istype(organ)) - return + return 0 //This is a terrible hack and I should be ashamed. var/datum/seed/diona = plant_controller.seeds["diona"] if(!diona) - qdel(src) + return 0 spawn(1) // So it has time to be thrown about by the gib() proc. var/mob/living/carbon/alien/diona/D = new(get_turf(organ)) diona.request_player(D) - qdel(organ) + spawn(60) + if(D) + if(!D.ckey || !D.client) + D.death() + return 1 /obj/item/organ/external/diona name = "tendril" @@ -128,16 +132,13 @@ //DIONA ORGANS. /obj/item/organ/external/diona/removed() + var/mob/living/carbon/human/H = owner ..() - if(!istype(owner)) + if(!istype(H) || !H.organs || !H.organs.len) + H.death() + if(prob(50) && spawn_diona_nymph_from_organ(src)) qdel(src) - if(!owner.organs.len) - owner.death() - - if(prob(50)) - spawn_diona_nymph_from_organ(src) - /obj/item/organ/diona/process() return @@ -172,16 +173,13 @@ organ_tag = "special" // Turns into a nymph instantly, no transplanting possible. /obj/item/organ/diona/removed(var/mob/living/user) - + var/mob/living/carbon/human/H = owner ..() - if(!istype(owner)) + if(!istype(H) || !H.organs || !H.organs.len) + H.death() + if(prob(50) && spawn_diona_nymph_from_organ(src)) qdel(src) - if(!owner.internal_organs.len) - owner.death() - - spawn_diona_nymph_from_organ(src) - // These are different to the standard diona organs as they have a purpose in other // species (absorbing radiation and light respectively) /obj/item/organ/diona/nutrients From ce36d07f79be3e95d6c93d1a8b4e2cdca370d8df Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 04:58:49 +0930 Subject: [PATCH 26/34] Fixes #9180 --- .../mob/living/carbon/human/examine.dm | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index dad4e902446..c10c224ccd1 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -256,14 +256,17 @@ var/list/organ_data = species.has_limbs[organ_tag] var/organ_descriptor = organ_data["descriptor"] - is_destroyed["[organ_data["descriptor"]]"] = 1 + is_destroyed["organ_descriptor"] = 1 var/obj/item/organ/external/E = organs_by_name[organ_tag] if(!E) + world << "[organ_tag] missing" wound_flavor_text["[organ_descriptor]"] = "[t_He] is missing [t_his] [organ_descriptor].\n" else if(E.is_stump()) + world << "[E.name] is a stump" wound_flavor_text["[organ_descriptor]"] = "[t_He] has a stump where [t_his] [organ_descriptor] should be.\n" else + is_destroyed["organ_descriptor"] = 0 continue for(var/obj/item/organ/external/temp in organs) @@ -278,7 +281,7 @@ else if(temp.wounds.len > 0 || temp.open) wound_flavor_text["[temp.name]"] = "[t_He] has [temp.get_wounds_desc()] on [t_his] [temp.name].
    " if(temp.status & ORGAN_BLEEDING) - is_bleeding["[temp.name]"] = 1 + is_bleeding["[temp.name]"] = "[capitalize(t_his)] [temp.name] is bleeding!
    " else wound_flavor_text["[temp.name]"] = "" if(temp.dislocated == 2) @@ -288,41 +291,56 @@ //Handles the text strings being added to the actual description. //If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext. + + // *********************************************************************************** + // THIS NEEDS TO BE ENTIRELY REWRITTEN. Commenting out for now, BADLY NEEDS REWRITING. + // *********************************************************************************** + + /* var/display_chest = 0 var/display_shoes = 0 var/display_gloves = 0 + if(wound_flavor_text["head"] && (is_destroyed["head"] || (!skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas))))) msg += wound_flavor_text["head"] else if(is_bleeding["head"]) msg += "[src] has blood running down [t_his] face!\n" + if(wound_flavor_text["upper body"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you. msg += wound_flavor_text["upper body"] else if(is_bleeding["upper body"]) display_chest = 1 + if(wound_flavor_text["left arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit))) msg += wound_flavor_text["left arm"] else if(is_bleeding["left arm"]) display_chest = 1 + if(wound_flavor_text["left hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves))) msg += wound_flavor_text["left hand"] else if(is_bleeding["left hand"]) display_gloves = 1 + if(wound_flavor_text["right arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit))) msg += wound_flavor_text["right arm"] else if(is_bleeding["right arm"]) display_chest = 1 + if(wound_flavor_text["right hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves))) msg += wound_flavor_text["right hand"] else if(is_bleeding["right hand"]) display_gloves = 1 + if(wound_flavor_text["lower body"] && (is_destroyed["lower body"] || (!w_uniform && !skipjumpsuit))) msg += wound_flavor_text["lower body"] else if(is_bleeding["lower body"]) display_chest = 1 + if(wound_flavor_text["left leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit))) msg += wound_flavor_text["left leg"] else if(is_bleeding["left leg"]) display_chest = 1 + if(wound_flavor_text["left foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes))) msg += wound_flavor_text["left foot"] else if(is_bleeding["left foot"]) @@ -335,19 +353,25 @@ msg += wound_flavor_text["right foot"] else if(is_bleeding["right foot"]) display_shoes = 1 + if(display_chest) msg += "[src] has blood soaking through from under [t_his] clothing!\n" if(display_shoes) msg += "[src] has blood running from [t_his] shoes!\n" if(display_gloves) msg += "[src] has blood running from under [t_his] gloves!\n" + */ + for(var/limb in wound_flavor_text) + msg += wound_flavor_text[limb] + is_bleeding[limb] = null + for(var/limb in is_bleeding) + msg += is_bleeding[limb] for(var/implant in get_visible_implants(0)) msg += "[src] has \a [implant] sticking out of [t_his] flesh!\n" if(digitalcamo) msg += "[t_He] [t_is] repulsively uncanny!\n" - if(hasHUD(usr,"security")) var/perpname = "wot" var/criminal = "None" From 5f2cf7b4a3069bfaa7ed3a2d5f7257d5bb30e340 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 04:59:12 +0930 Subject: [PATCH 27/34] Fixes limbs and wounds not being visible on limbs. --- .../mob/living/carbon/human/human_organs.dm | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 4581cb0c8a3..f2c64fa52ad 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -105,7 +105,27 @@ Weaken(5) //can't emote while weakened, apparently. /mob/living/carbon/human/proc/handle_grasp() + if(!l_hand && !r_hand) + return + // You should not be able to pick anything up, but stranger things have happened. + if(l_hand) + for(var/limb_tag in list("l_hand","l_arm")) + var/obj/item/organ/external/E = get_organ(limb_tag) + if(!E) + visible_message("Lacking a functioning left hand, \the [src] drops \the [l_hand].") + drop_from_inventory(l_hand) + break + + if(r_hand) + for(var/limb_tag in list("r_hand","r_arm")) + var/obj/item/organ/external/E = get_organ(limb_tag) + if(!E) + visible_message("Lacking a functioning right hand, \the [src] drops \the [r_hand].") + drop_from_inventory(r_hand) + break + + // Check again... if(!l_hand && !r_hand) return From b67622b23c01bf039c8a07b5a12e447807ceaaf2 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 05:05:39 +0930 Subject: [PATCH 28/34] Fixes 9077 --- code/modules/mob/living/carbon/carbon.dm | 2 +- code/modules/mob/living/carbon/human/examine.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index f0af6e14645..2162e3488ac 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -249,7 +249,7 @@ var/mob/living/carbon/human/H = src H.w_uniform.add_fingerprint(M) - if(player_logged) + if(!client || !key || player_logged) M.visible_message("[M] shakes [src] trying to wake [t_him] up!", \ "You shake [src], but they do not respond... Maybe they have S.S.D?") else if(lying || src.sleeping) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index c10c224ccd1..794184a41c0 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -246,7 +246,7 @@ if(!key) msg += "[t_He] [t_is] fast asleep. It doesn't look like they are waking up anytime soon.\n" else if(!client) - msg += "[t_He] [t_has] suddenly fallen asleep.\n" + msg += "[t_He] [t_is] fast asleep.\n" var/list/wound_flavor_text = list() var/list/is_destroyed = list() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index e3b8820b002..79dc2cc657a 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -942,7 +942,7 @@ if(status_flags & GODMODE) return 0 //SSD check, if a logged player is awake put them back to sleep! - if(player_logged && sleeping < 2) + if((!client || !key || player_logged) && sleeping < 2) sleeping = 2 if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP @@ -1135,7 +1135,7 @@ if(damageoverlay.overlays) damageoverlay.overlays = list() - + if(stat == UNCONSCIOUS) //Critical damage passage overlay if(health <= 0) From a3f3009eb46314c3a583fb2206ec50e5d6f9035a Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 05:13:45 +0930 Subject: [PATCH 29/34] Fixes #9063 --- code/game/objects/items/robot/robot_items.dm | 38 +++++++++++++------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index dfc53d3a874..afe50bc2b76 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -4,26 +4,40 @@ Cyborg Spec Items ***********************************************************************/ //Might want to move this into several files later but for now it works here +// Consider changing this to a child of the stun baton class. ~Z /obj/item/borg/stun name = "electrified arm" icon = 'icons/obj/decals.dmi' icon_state = "shock" - attack(mob/M as mob, mob/living/silicon/robot/user as mob) - M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") - msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (JMP)") +/obj/item/borg/stun/attack(var/mob/living/M, var/mob/living/silicon/robot/user) - user.cell.charge -= 30 + if(!istype(M)) + return - M.Weaken(5) - if (M.stuttering < 5) - M.stuttering = 5 - M.Stun(5) + // How the Hell. + if(!istype(user)) + var/mob/living/temp = user + if(istype(temp)) + temp.drop_from_inventory(src) + qdel(src) + return - for(var/mob/O in viewers(M, null)) - if (O.client) - O.show_message("\red [user] has prodded [M] with an electrically-charged arm!", 1, "\red You hear someone fall", 2) + M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") + msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (JMP)") + + if(!user.cell || !user.cell.checked_use(1250)) //Slightly more than a baton. + user.visible_message("\The [user] has prodded \the [M] with its arm!") + return + + if (M.stuttering < 5) + M.stuttering = 5 + M.stun_effect_act(0, 70, check_zone(user.zone_sel.selecting), src) + user.visible_message("\The [user] has prodded \the [M] with \a [src]!") + if(ishuman(M)) + var/mob/living/carbon/human/H = M + H.forcesay(hit_appends) /obj/item/borg/overdrive name = "overdrive" From deb806c4cb158c9bf5ce5a7ac9d2cd6d2a965bd8 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 05:24:44 +0930 Subject: [PATCH 30/34] Fixes #9076 --- code/game/objects/structures/noticeboard.dm | 36 +++++++++++---------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index a5ad84c20eb..3647d565f7e 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -21,7 +21,7 @@ if(notices < 5) O.add_fingerprint(user) add_fingerprint(user) - user.drop_item() + user.drop_from_inventory(O) O.loc = src notices++ icon_state = "nboard0[notices]" //update sprite @@ -29,13 +29,22 @@ else user << "You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached." -/obj/structure/noticeboard/attack_hand(user as mob) - var/dat = "Noticeboard
    " - for(var/obj/item/weapon/paper/P in src) - dat += "[P.name] Write Remove
    " - user << browse("Notices[dat]","window=noticeboard") - onclose(user, "noticeboard") +/obj/structure/noticeboard/attack_hand(var/mob/user) + examine(user) +// Since Topic() never seems to interact with usr on more than a superficial +// level, it should be fine to let anyone mess with the board other than ghosts. +/obj/structure/noticeboard/examine(var/mob/user) + if(!user) + user = usr + if(user.Adjacent(src)) + var/dat = "Noticeboard
    " + for(var/obj/item/weapon/paper/P in src) + dat += "[P.name] Write Remove
    " + user << browse("Notices[dat]","window=noticeboard") + onclose(user, "noticeboard") + else + ..() /obj/structure/noticeboard/Topic(href, href_list) ..() @@ -44,18 +53,16 @@ if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open return var/obj/item/P = locate(href_list["remove"]) - if((P && P.loc == src)) + if(P && P.loc == src) P.loc = get_turf(src) //dump paper on the floor because you're a clumsy fuck P.add_fingerprint(usr) add_fingerprint(usr) notices-- icon_state = "nboard0[notices]" - if(href_list["write"]) if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open return var/obj/item/P = locate(href_list["write"]) - if((P && P.loc == src)) //ifthe paper's on the board if(istype(usr.r_hand, /obj/item/weapon/pen)) //and you're holding a pen add_fingerprint(usr) @@ -66,14 +73,9 @@ P.attackby(usr.l_hand, usr) else usr << "You'll need something to write with!" - if(href_list["read"]) var/obj/item/weapon/paper/P = locate(href_list["read"]) if((P && P.loc == src)) - if(!( istype(usr, /mob/living/carbon/human) )) - usr << browse("[P.name][stars(P.info)]", "window=[P.name]") - onclose(usr, "[P.name]") - else - usr << browse("[P.name][P.info]", "window=[P.name]") - onclose(usr, "[P.name]") + usr << browse("[P.name][P.info]", "window=[P.name]") + onclose(usr, "[P.name]") return From 97cbcff3df56e9f6b0871e04bd0cf9fc1db56af4 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 05:29:33 +0930 Subject: [PATCH 31/34] Fixes #9124 --- code/modules/mob/living/silicon/robot/robot_modules.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 359562063d9..527ce35df28 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -425,6 +425,9 @@ var/global/list/robot_modules = list( T.update_icon() else T.charge_tick = 0 + var/obj/item/weapon/melee/baton/robot/B = locate() in src.modules + if(B && B.bcell) + B.bcell.give(amount) /obj/item/weapon/robot_module/janitor name = "janitorial robot module" From 21a019b34fb923aa8560665cd9ee1e6200b463de Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 30 May 2015 05:34:45 +0930 Subject: [PATCH 32/34] Cleanup --- code/modules/hydroponics/spreading/spreading.dm | 2 +- code/modules/mob/living/carbon/human/examine.dm | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 51d3b391817..57579cdb72b 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -235,7 +235,7 @@ if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/scalpel)) if(!seed) - user << "" + user << "There is nothing to take a sample from." return if(sampled) user << "You cannot take another sample from \the [src]." diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 794184a41c0..3e04dbe023f 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -260,10 +260,8 @@ var/obj/item/organ/external/E = organs_by_name[organ_tag] if(!E) - world << "[organ_tag] missing" wound_flavor_text["[organ_descriptor]"] = "[t_He] is missing [t_his] [organ_descriptor].\n" else if(E.is_stump()) - world << "[E.name] is a stump" wound_flavor_text["[organ_descriptor]"] = "[t_He] has a stump where [t_his] [organ_descriptor] should be.\n" else is_destroyed["organ_descriptor"] = 0 From 44db7304823fcdcc808215e192e67bac88a1bd0a Mon Sep 17 00:00:00 2001 From: Chinsky Date: Fri, 29 May 2015 12:13:25 +0300 Subject: [PATCH 33/34] Fixes corpses and unconscious people still showing typing indicators. Indicator also has same visibility as the owner, so no magicaly sensing where someone is going to talk soon (chat bubbles works well enough) Since images do not have visibility, had to make it an object decal. Also since it's set per mob, it's no longer global. Shouldn't really be much of an issue, since it's only created when mob tries to speak (so ~60 objects total on high-usual load) --- code/modules/mob/typing_indicator.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/typing_indicator.dm b/code/modules/mob/typing_indicator.dm index 203159f3c68..147edb1afe3 100644 --- a/code/modules/mob/typing_indicator.dm +++ b/code/modules/mob/typing_indicator.dm @@ -5,14 +5,17 @@ mob/var/typing mob/var/last_typed mob/var/last_typed_time -var/global/image/typing_indicator +mob/var/obj/effect/decal/typing_indicator /mob/proc/set_typing_indicator(var/state) if(!typing_indicator) - typing_indicator = image('icons/mob/talk.dmi',null,"typing") + typing_indicator = new + typing_indicator.icon = 'icons/mob/talk.dmi' + typing_indicator.icon_state = "typing" - if(client) + if(client && !stat) + typing_indicator.invisibility = invisibility if(client.prefs.toggles & SHOW_TYPING) overlays -= typing_indicator else From a625b1db3309796a55c3bae346038bef7ac7cff0 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Sat, 30 May 2015 16:00:19 +0200 Subject: [PATCH 34/34] Changelog update. --- html/changelog.html | 15 +++++++++++++++ html/changelogs/.all_changelog.yml | 15 +++++++++++++++ html/changelogs/Atlantis-PR-9108.yml | 5 ----- html/changelogs/HarpyEagle-ERTERigFix.yml | 18 ------------------ .../changelogs/HarpyEagle-ProjectileTweaks.yml | 18 ------------------ .../PsiOmegaDelta-ServerRevision.yml | 5 ----- 6 files changed, 30 insertions(+), 46 deletions(-) delete mode 100644 html/changelogs/Atlantis-PR-9108.yml delete mode 100644 html/changelogs/HarpyEagle-ERTERigFix.yml delete mode 100644 html/changelogs/HarpyEagle-ProjectileTweaks.yml delete mode 100644 html/changelogs/PsiOmegaDelta-ServerRevision.yml diff --git a/html/changelog.html b/html/changelog.html index 9c5318a7ec5..2b6c178b208 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,21 @@ -->
    +

    30 May 2015

    +

    Atlantis updated:

    +
      +
    • Malfunction Overhaul - Whole gamemode was completely reworked from scratch. Most old abilities have been removed and quite a lot of new abilities was added. AI also has to hack APCs to unlock higher tier abilities faster, instead of having access to them from the round start. Most forced things, such as, shuttle recalling were removed and are instead controlled by the AI. Code is fully modular allowing for future modifications.
    • +
    +

    HarpyEagle updated:

    +
      +
    • Fixes Engineer ERT gloves not being insulated.
    • +
    • IV stands are no longer bullet shields. They also allow mice, drones, pAIs et al to pass though.
    • +
    +

    PsiOmegaDelta updated:

    +
      +
    • You can now review the server revision date and hash by using the 'Show Server Revision' verb in the OOC category.
    • +
    +

    27 May 2015

    PsiOmegaDelta updated:

      diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 646b5063711..0778bd50f38 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -1852,3 +1852,18 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. PsiOmegaDelta: - tweak: The inactive check process now respects client holder status and can be configured how long clients may remain inactive before being kicked. +2015-05-30: + Atlantis: + - rscadd: Malfunction Overhaul - Whole gamemode was completely reworked from scratch. + Most old abilities have been removed and quite a lot of new abilities was added. + AI also has to hack APCs to unlock higher tier abilities faster, instead of + having access to them from the round start. Most forced things, such as, shuttle + recalling were removed and are instead controlled by the AI. Code is fully modular + allowing for future modifications. + HarpyEagle: + - bugfix: Fixes Engineer ERT gloves not being insulated. + - tweak: IV stands are no longer bullet shields. They also allow mice, drones, pAIs + et al to pass though. + PsiOmegaDelta: + - rscadd: You can now review the server revision date and hash by using the 'Show + Server Revision' verb in the OOC category. diff --git a/html/changelogs/Atlantis-PR-9108.yml b/html/changelogs/Atlantis-PR-9108.yml deleted file mode 100644 index b2c3f6bdb4c..00000000000 --- a/html/changelogs/Atlantis-PR-9108.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: Atlantis -delete-after: True - -changes: - - rscadd: "Malfunction Overhaul - Whole gamemode was completely reworked from scratch. Most old abilities have been removed and quite a lot of new abilities was added. AI also has to hack APCs to unlock higher tier abilities faster, instead of having access to them from the round start. Most forced things, such as, shuttle recalling were removed and are instead controlled by the AI. Code is fully modular allowing for future modifications." \ No newline at end of file diff --git a/html/changelogs/HarpyEagle-ERTERigFix.yml b/html/changelogs/HarpyEagle-ERTERigFix.yml deleted file mode 100644 index fa888cba462..00000000000 --- a/html/changelogs/HarpyEagle-ERTERigFix.yml +++ /dev/null @@ -1,18 +0,0 @@ -# bugfix -# wip (For works in progress) -# tweak -# soundadd -# sounddel -# rscadd (general adding of nice things) -# rscdel (general deleting of nice things) -# imageadd -# imagedel -# maptweak -# spellcheck (typo fixes) -# experiment - -author: HarpyEagle -delete-after: True - -changes: - - bugfix: "Fixes Engineer ERT gloves not being insulated." diff --git a/html/changelogs/HarpyEagle-ProjectileTweaks.yml b/html/changelogs/HarpyEagle-ProjectileTweaks.yml deleted file mode 100644 index 12266695bb8..00000000000 --- a/html/changelogs/HarpyEagle-ProjectileTweaks.yml +++ /dev/null @@ -1,18 +0,0 @@ -# bugfix -# wip (For works in progress) -# tweak -# soundadd -# sounddel -# rscadd (general adding of nice things) -# rscdel (general deleting of nice things) -# imageadd -# imagedel -# maptweak -# spellcheck (typo fixes) -# experiment - -author: HarpyEagle -delete-after: True - -changes: - - tweak: "IV stands are no longer bullet shields. They also allow mice, drones, pAIs et al to pass though." diff --git a/html/changelogs/PsiOmegaDelta-ServerRevision.yml b/html/changelogs/PsiOmegaDelta-ServerRevision.yml deleted file mode 100644 index 56581748c1c..00000000000 --- a/html/changelogs/PsiOmegaDelta-ServerRevision.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: PsiOmegaDelta -delete-after: True - -changes: - - rscadd: "You can now review the server revision date and hash by using the 'Show Server Revision' verb in the OOC category."