diff --git a/code/_helpers/lists.dm b/code/_helpers/lists.dm index fb4cd3874eb..1ebb3e4f14e 100644 --- a/code/_helpers/lists.dm +++ b/code/_helpers/lists.dm @@ -210,14 +210,23 @@ proc/listclearnulls(list/list) return (result + R.Copy(Ri, 0)) //Mergesort: divides up the list into halves to begin the sort -/proc/sortAtom(var/list/atom/L, var/order = 1) +/proc/sortAtom(var/list/atom/L, var/order = 1, first = 1) if(isnull(L) || L.len < 2) + if(!L) + testing("sortAtom() called with null as first parameter!") return L + if(first) + var/msg = "sortAtom() called with list([L.len]): " + for(var/x in L) + msg += "'[x]'; " + testing(msg) var/middle = L.len / 2 + 1 - return mergeAtoms(sortAtom(L.Copy(0,middle)), sortAtom(L.Copy(middle)), order) + return mergeAtoms(sortAtom(L.Copy(0,middle), order, 0), sortAtom(L.Copy(middle), order, 0), order) //Mergsort: does the actual sorting and returns the results back to sortAtom /proc/mergeAtoms(var/list/atom/L, var/list/atom/R, var/order = 1) + if(!L || !R) + testing("mergeAtoms([L] ([L ? L.len : "*null*"]), [R] ([R ? R.len : "*null*"]))") var/Li=1 var/Ri=1 var/list/result = new() @@ -230,8 +239,14 @@ proc/listclearnulls(list/list) result += R[Ri++] if(Li <= L.len) - return (result + L.Copy(Li, 0)) - return (result + R.Copy(Ri, 0)) + . = (result + L.Copy(Li, 0)) + if(!.) + testing("mergeAtoms returning [.]") + return + . = (result + R.Copy(Ri, 0)) + if(!.) + testing("mergeAtoms returning [.]") + return diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index edfffde816a..a8e7ed7ce90 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -179,7 +179,7 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen /datum/ai_law/proc/delete_law(var/datum/ai_laws/laws) -/datum/ai_law/zeroth/delete_law(var/datum/ai_laws/laws) +/datum/ai_law/zero/delete_law(var/datum/ai_laws/laws) laws.clear_zeroth_laws() /datum/ai_law/ion/delete_law(var/datum/ai_laws/laws) diff --git a/code/game/antagonist/station/rogue_ai.dm b/code/game/antagonist/station/rogue_ai.dm index cf0e9dfd4c6..f19edb28077 100644 --- a/code/game/antagonist/station/rogue_ai.dm +++ b/code/game/antagonist/station/rogue_ai.dm @@ -6,12 +6,13 @@ var/datum/antagonist/rogue_ai/malf role_text = "Rampant AI" role_text_plural = "Rampant AIs" mob_path = /mob/living/silicon/ai + landmark_id = "AI" welcome_text = "You are malfunctioning! You do not have to follow any laws." victory_text = "The AI has taken control of all of the station's systems." loss_text = "The AI has been shut down!" - flags = ANTAG_VOTABLE | ANTAG_RANDSPAWN //Randspawn needed otherwise it won't start at all. + flags = ANTAG_VOTABLE | ANTAG_OVERRIDE_MOB | ANTAG_OVERRIDE_JOB | ANTAG_CHOOSE_NAME max_antags = 1 - max_antags_round = 3 + max_antags_round = 1 /datum/antagonist/rogue_ai/New() @@ -22,7 +23,7 @@ var/datum/antagonist/rogue_ai/malf /datum/antagonist/rogue_ai/get_candidates() ..() for(var/datum/mind/player in candidates) - if(player.assigned_role != "AI") + if(player.assigned_role && player.assigned_role != "AI") candidates -= player if(!candidates.len) return list() @@ -75,3 +76,26 @@ var/datum/antagonist/rogue_ai/malf 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!" + + +/datum/antagonist/rogue_ai/update_antag_mob(var/datum/mind/player, var/preserve_appearance) + + // Get the mob. + if((flags & ANTAG_OVERRIDE_MOB) && (!player.current || (mob_path && !istype(player.current, mob_path)))) + var/mob/holder = player.current + player.current = new mob_path(get_turf(player.current), null, null, 1) + player.transfer_to(player.current) + if(holder) qdel(holder) + player.original = player.current + return player.current + +/datum/antagonist/rogue_ai/set_antag_name(var/mob/living/silicon/player) + if(!istype(player)) + testing("rogue_ai set_antag_name called on non-silicon mob [player]!") + return + // Choose a name, if any. + var/newname = sanitize(input(player, "You are a [role_text]. Would you like to change your name to something else?", "Name change") as null|text, MAX_NAME_LEN) + if (newname) + player.SetName(newname) + if(player.mind) player.mind.name = player.name + diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 5bc8cc99414..1bb29eb4c85 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -164,7 +164,7 @@ a = get_area(src.loc) else var/error = dist_y/2 - dist_x - while(src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf)) + while(src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || (a && a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf)) // only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up if(error < 0) var/atom/step = get_step(src, dx) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 143c37553da..7269f9dcfe3 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -167,7 +167,13 @@ var/global/list/additional_antag_types = list() return 1 var/datum/antagonist/main_antags = antag_templates[1] - if(main_antags.candidates.len >= required_enemies) + var/list/potential + if(main_antags.flags & ANTAG_OVERRIDE_JOB) + potential = main_antags.pending_antagonists + else + potential = main_antags.candidates + + if(potential.len >= required_enemies) return 1 return 0 @@ -184,7 +190,7 @@ var/global/list/additional_antag_types = list() /datum/game_mode/proc/pre_setup() for(var/datum/antagonist/antag in antag_templates) antag.build_candidate_list() //compile a list of all eligible candidates - + //antag roles that replace jobs need to be assigned before the job controller hands out jobs. if(antag.flags & ANTAG_OVERRIDE_JOB) antag.attempt_spawn() //select antags to be spawned diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm index f8d611bcbfc..55dff3fc6a8 100644 --- a/code/game/machinery/atmoalter/portable_atmospherics.dm +++ b/code/game/machinery/atmoalter/portable_atmospherics.dm @@ -163,6 +163,13 @@ var/last_power_draw = 0 var/obj/item/weapon/cell/cell +/obj/machinery/portable_atmospherics/powered/powered() + if(use_power) //using area power + return ..() + if(cell && cell.charge) + return 1 + return 0 + /obj/machinery/portable_atmospherics/powered/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/weapon/cell)) if(cell) @@ -176,6 +183,7 @@ cell = C C.loc = src user.visible_message("[user] opens the panel on [src] and inserts [C].", "You open the panel on [src] and insert [C].") + power_change() return if(istype(I, /obj/item/weapon/screwdriver)) @@ -187,8 +195,8 @@ cell.add_fingerprint(user) cell.loc = src.loc cell = null + power_change() return - ..() /obj/machinery/portable_atmospherics/proc/log_open() diff --git a/code/game/machinery/atmoalter/pump.dm b/code/game/machinery/atmoalter/pump.dm index 8d80e57e782..ad664049fc0 100644 --- a/code/game/machinery/atmoalter/pump.dm +++ b/code/game/machinery/atmoalter/pump.dm @@ -102,6 +102,7 @@ //ran out of charge if (!cell.charge) + power_change() update_icon() src.updateDialog() diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index f705a62ae23..457792c9e23 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -77,6 +77,7 @@ //ran out of charge if (!cell.charge) + power_change() update_icon() //src.update_icon() @@ -147,7 +148,6 @@ volume = 50000 volume_rate = 5000 - chan use_power = 1 idle_power_usage = 500 //internal circuitry, friction losses and stuff active_power_usage = 100000 //100 kW ~ 135 HP diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 87bfce984c5..9075da2a056 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -103,6 +103,13 @@ bumpopen(M) return + if(istype(AM, /obj/machinery/bot)) + var/obj/machinery/bot/bot = AM + if(src.check_access(bot.botcard)) + if(density) + open() + return + if(istype(AM, /mob/living/bot)) var/mob/living/bot/bot = AM if(src.check_access(bot.botcard)) diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index e8823733594..ad88ce7feae 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -32,6 +32,11 @@ user << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%" return +/obj/machinery/space_heater/powered() + if(cell && cell.charge) + return 1 + return 0 + /obj/machinery/space_heater/emp_act(severity) if(stat & (BROKEN|NOPOWER)) ..(severity) @@ -56,6 +61,7 @@ C.add_fingerprint(usr) user.visible_message("[user] inserts a power cell into [src].", "You insert the power cell into [src].") + power_change() else user << "The hatch must be open to insert a power cell." return @@ -125,6 +131,7 @@ usr.put_in_hands(cell) cell.add_fingerprint(usr) cell = null + power_change() if("cellinstall") @@ -135,7 +142,7 @@ cell = C C.loc = src C.add_fingerprint(usr) - + power_change() usr.visible_message("[usr] inserts \the [C] into \the [src].", "You insert \the [C] into \the [src].") updateDialog() @@ -176,4 +183,5 @@ env.merge(removed) else on = 0 + power_change() update_icon() diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index ca2f6300e24..0353c25f59a 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -578,7 +578,6 @@ if(keyslot.syndie) src.syndie = 1 - for (var/ch_name in src.channels) if(!radio_controller) sleep(30) // Waiting for the radio_controller to be created. diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 5f8403246f9..84e4f80d4a3 100755 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -83,7 +83,7 @@ AI MODULES laws.sync(target, 0) addAdditionalLaws(target, sender) - target << "[sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: " + target << "\The [sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: " target.show_laws() /obj/item/weapon/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender) @@ -140,13 +140,7 @@ AI MODULES if(!targetName) usr << "No name detected on module, please enter one." return 0 - ..() - -/obj/item/weapon/aiModule/oneHuman/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) - ..() - var/law = "Only [targetName] is a crew member." - target << "[sender.real_name] attempted to modify your zeroth law." // And lets them know that someone tried. --NeoFite - target << "It would be in your best interest to play along with [sender.real_name] that [law]" + return ..() /obj/item/weapon/aiModule/oneHuman/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender) var/law = "Only [targetName] is an crew member." diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index d5a36d6cba3..e32b58e098f 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -32,7 +32,7 @@ else if(istype(target,/turf)) user << "You scrub \the [target.name] clean." var/turf/T = target - T.clean() + T.clean(src) else user << "You clean \the [target.name]." target.clean_blood() diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index 17af445e192..abf5e08a3be 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -16,6 +16,7 @@ /obj/item/weapon/mop/New() create_reagents(5) +//expects an atom containing the reagents used to clean the turf /turf/proc/clean(atom/source) if(source.reagents.has_reagent("water", 1)) clean_blood() diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 7372b9e0796..cb3214122a8 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -16,7 +16,8 @@ /obj/Destroy() processing_objects -= src - ..() + nanomanager.close_uis(src) + return ..() /obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/state = default_state) // Calling Topic without a corresponding window open causes runtime errors diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index c5242916836..b1fa34b3026 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -153,6 +153,13 @@ add_admin_verbs() admin_memo_show() + // Forcibly enable hardware-accelerated graphics, as we need them for the lighting overlays. + // (but turn them off first, since sometimes BYOND doesn't turn them on properly otherwise) + spawn(5) // And wait a half-second, since it sounds like you can do this too fast. + if(src) + winset(src, null, "command=\".configure graphics-hwmode off\"") + winset(src, null, "command=\".configure graphics-hwmode on\"") + log_client_to_db() send_resources() diff --git a/code/modules/client/preferences_gear.dm b/code/modules/client/preferences_gear.dm index 25e1da639f9..5be7e2dcde7 100644 --- a/code/modules/client/preferences_gear.dm +++ b/code/modules/client/preferences_gear.dm @@ -279,7 +279,7 @@ var/global/list/gear_datums = list() /datum/gear/scanning_goggles display_name = "scanning goggles" - path = /obj/item/clothing/glasses/science/scanners + path = /obj/item/clothing/glasses/regular/scanners cost = 1 slot = slot_glasses diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 68640cfcce3..6ba0b27b126 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -61,11 +61,6 @@ ..() overlay = global_hud.science -/obj/item/clothing/glasses/science/scanners - name = "Scanning Goggles" - desc = "A very oddly shaped pair of goggles with bits of wire poking out the sides. A soft humming sound emanates from it." - icon_state = "uzenwa_sissra_1" - /obj/item/clothing/glasses/night name = "Night Vision Goggles" desc = "You can totally see in the dark now!" @@ -111,6 +106,11 @@ item_state = "glasses" prescription = 1 body_parts_covered = 0 + +/obj/item/clothing/glasses/regular/scanners + name = "Scanning Goggles" + desc = "A very oddly shaped pair of goggles with bits of wire poking out the sides. A soft humming sound emanates from it." + icon_state = "uzenwa_sissra_1" /obj/item/clothing/glasses/regular/hipster name = "Prescription Glasses" diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm index 5cb23c58ea7..5092bd8437f 100644 --- a/code/modules/clothing/head/soft_caps.dm +++ b/code/modules/clothing/head/soft_caps.dm @@ -2,7 +2,6 @@ name = "cargo cap" desc = "It's a peaked cap in a tasteless yellow color." icon_state = "cargosoft" - flags = HEADCOVERSEYES item_state_slots = list( slot_l_hand_str = "helmet", //probably a placeholder slot_r_hand_str = "helmet", diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index 6e5c4c4c5a0..8bfca4fde86 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -46,8 +46,8 @@ /obj/structure/holostool name = "stool" desc = "Apply butt." - icon = 'icons/obj/objects.dmi' - icon_state = "stool" + icon = 'icons/obj/furniture.dmi' + icon_state = "stool_padded_preview" anchored = 1.0 pressure_resistance = 15 diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 9d240e764e6..efe3bf1da68 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -690,10 +690,11 @@ else product = new /obj/item/weapon/reagent_containers/food/snacks/grown(get_turf(user),name) if(get_trait(TRAIT_PRODUCT_COLOUR)) - product.color = get_trait(TRAIT_PRODUCT_COLOUR) - if(istype(product,/obj/item/weapon/reagent_containers/food)) - var/obj/item/weapon/reagent_containers/food/food = product - food.filling_color = get_trait(TRAIT_PRODUCT_COLOUR) + if(!istype(product, /mob)) + product.color = get_trait(TRAIT_PRODUCT_COLOUR) + if(istype(product,/obj/item/weapon/reagent_containers/food)) + var/obj/item/weapon/reagent_containers/food/food = product + food.filling_color = get_trait(TRAIT_PRODUCT_COLOUR) if(mysterious) product.name += "?" diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 9de2d998e1a..cd7afde0e49 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -188,8 +188,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/dead/observer/Stat() ..() - statpanel("Status") - if (client.statpanel == "Status") + if(statpanel("Status")) stat(null, "Station Time: [worldtime2text()]") if(emergency_shuttle) var/eta_status = emergency_shuttle.get_status_panel_eta() diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 534c77c2a10..45c2cde53a6 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -372,8 +372,8 @@ /mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) ..() - var/temp_inc = max(BODYTEMP_HEATING_MAX*(1-get_heat_protection()), 0) - bodytemperature = min(bodytemperature + temp_inc, exposed_temperature) + var/temp_inc = max(min(BODYTEMP_HEATING_MAX*(1-get_heat_protection()), exposed_temperature - bodytemperature), 0) + bodytemperature += temp_inc /mob/living/carbon/can_use_hands() if(handcuffed) diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index 9413fa4fc5d..3b8e5669647 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -154,14 +154,14 @@ return valid_species -/mob/living/carbon/human/proc/generate_valid_hairstyles() +/mob/living/carbon/human/proc/generate_valid_hairstyles(var/check_gender = 1) var/list/valid_hairstyles = new() for(var/hairstyle in hair_styles_list) var/datum/sprite_accessory/S = hair_styles_list[hairstyle] - if(gender == MALE && S.gender == FEMALE) + if(check_gender && gender == MALE && S.gender == FEMALE) continue - if(gender == FEMALE && S.gender == MALE) + if(check_gender && gender == FEMALE && S.gender == MALE) continue if(!(species.name in S.species_allowed)) continue @@ -188,4 +188,4 @@ /mob/living/carbon/human/proc/force_update_limbs() for(var/obj/item/organ/external/O in organs) O.sync_colour_to_human(src) - update_body(0) \ No newline at end of file + update_body(0) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index d7f1bee5cc5..4f3f52a364c 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -54,16 +54,13 @@ /mob/living/carbon/human/Stat() ..() - statpanel("Status") - - stat(null, "Intent: [a_intent]") - stat(null, "Move Mode: [m_intent]") - if(emergency_shuttle) - var/eta_status = emergency_shuttle.get_status_panel_eta() - if(eta_status) - stat(null, eta_status) - - if (client.statpanel == "Status") + if(statpanel("Status")) + stat(null, "Intent: [a_intent]") + stat(null, "Move Mode: [m_intent]") + if(emergency_shuttle) + var/eta_status = emergency_shuttle.get_status_panel_eta() + if(eta_status) + stat(null, eta_status) if (internal) if (!internal.air_contents) @@ -210,6 +207,10 @@ /mob/living/carbon/human/show_inv(mob/user as mob) + // TODO : Change to incapacitated() on merge. + if(user.stat || user.lying || user.resting || user.buckled) + return + var/obj/item/clothing/under/suit = null if (istype(w_uniform, /obj/item/clothing/under)) suit = w_uniform diff --git a/code/modules/mob/living/carbon/human/stripping.dm b/code/modules/mob/living/carbon/human/stripping.dm index 8eaef158611..aa08a0efd5a 100644 --- a/code/modules/mob/living/carbon/human/stripping.dm +++ b/code/modules/mob/living/carbon/human/stripping.dm @@ -3,6 +3,11 @@ if(!slot_to_strip || !istype(user)) return + // TODO : Change to incapacitated() on merge. + if(user.stat || user.lying || user.resting || user.buckled) + user << browse(null, text("window=mob[src.name]")) + return + var/obj/item/target_slot = get_equipped_item(text2num(slot_to_strip)) switch(slot_to_strip) diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index f234bd1414c..04e3728c6aa 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -261,19 +261,17 @@ /mob/living/silicon/robot/drone/start_pulling(var/atom/movable/AM) - if(istype(AM,/obj/item/pipe) || istype(AM,/obj/structure/disposalconstruct)) - ..() - else if(istype(AM,/obj/item)) - var/obj/item/O = AM - if(O.w_class > can_pull_size) - src << "You are too small to pull that." - return + if(!(istype(AM,/obj/item/pipe) || istype(AM,/obj/structure/disposalconstruct))) + if(istype(AM,/obj/item)) + var/obj/item/O = AM + if(O.w_class > can_pull_size) + src << "You are too small to pull that." + return else - ..() - else - if(!can_pull_mobs) - src << "You are too small to pull that." - return + if(!can_pull_mobs) + src << "You are too small to pull that." + return + ..() /mob/living/silicon/robot/drone/add_robot_verbs() src.verbs |= silicon_subsystems diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 82ecdf63964..6f434257f44 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -182,7 +182,7 @@ aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src) laws = new /datum/ai_laws/syndicate_override - module = new /obj/item/weapon/robot_module/syndicate(src) + new /obj/item/weapon/robot_module/syndicate(src) radio.keyslot = new /obj/item/device/encryptionkey/syndicate(radio) radio.recalculateChannels() @@ -263,7 +263,7 @@ return var/module_type = robot_modules[modtype] - module = new module_type(src) + new module_type(src) hands.icon_state = lowertext(modtype) feedback_inc("cyborg_[lowertext(modtype)]",1) @@ -421,8 +421,7 @@ // update the status screen display /mob/living/silicon/robot/Stat() ..() - statpanel("Status") - if (client.statpanel == "Status") + if (statpanel("Status")) show_cell_power() show_jetpack_pressure() stat(null, text("Lights: [lights_on ? "ON" : "OFF"]")) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 4d7179bbfce..819fbf4561e 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -39,6 +39,8 @@ var/global/list/robot_modules = list( /obj/item/weapon/robot_module/New(var/mob/living/silicon/robot/R) ..() + R.module = src + add_camera_networks(R) add_languages(R) add_subsystems(R) @@ -69,7 +71,7 @@ var/global/list/robot_modules = list( synths = null emag = null jetpack = null - ..() + return ..() /obj/item/weapon/robot_module/emp_act(severity) if(modules) diff --git a/code/modules/nano/modules/human_appearance.dm b/code/modules/nano/modules/human_appearance.dm index 3b3deff06c1..4486a0fb82f 100644 --- a/code/modules/nano/modules/human_appearance.dm +++ b/code/modules/nano/modules/human_appearance.dm @@ -155,5 +155,5 @@ if(!valid_species.len) valid_species = owner.generate_valid_species(check_whitelist, whitelist, blacklist) if(!valid_hairstyles.len || !valid_facial_hairstyles.len) - valid_hairstyles = owner.generate_valid_hairstyles() - valid_facial_hairstyles = owner.generate_valid_facial_hairstyles() \ No newline at end of file + valid_hairstyles = owner.generate_valid_hairstyles(check_gender = 0) + valid_facial_hairstyles = owner.generate_valid_facial_hairstyles() diff --git a/code/modules/nano/nanomanager.dm b/code/modules/nano/nanomanager.dm index f6325fd4f71..64c59bcefa4 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/nanomanager.dm @@ -105,6 +105,26 @@ update_count++ return update_count + /** + * Close all /nanoui uis attached to src_object + * + * @param src_object /obj|/mob The obj or mob which the uis are attached to + * + * @return int The number of uis close + */ +/datum/nanomanager/proc/close_uis(src_object) + var/src_object_key = "\ref[src_object]" + if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) + return 0 + + var/close_count = 0 + for (var/ui_key in open_uis[src_object_key]) + for (var/datum/nanoui/ui in open_uis[src_object_key][ui_key]) + if(ui && ui.src_object && ui.user && ui.src_object.nano_host()) + ui.close() + close_count++ + return close_count + /** * Update /nanoui uis belonging to user * diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index 05a73c703c9..39a8a142cf0 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -79,7 +79,7 @@ owner.b_eyes ? owner.b_eyes : 0 ) -/obj/item/organ/eyes/take_damage() +/obj/item/organ/eyes/take_damage(amount, var/silent=0) var/oldbroken = is_broken() ..() if(is_broken() && !oldbroken && owner && !owner.stat) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 46853a978c9..90ed7ccf59e 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -253,10 +253,9 @@ var/global/photo_count = 0 var/viewer = user if(user.client) //To make shooting through security cameras possible viewer = user.client.eye - var/can_see = (dummy in viewers(world.view, viewer)) != null + var/can_see = (dummy in viewers(world.view, viewer)) - dummy.loc = null - dummy = null //Alas, nameless creature //garbage collect it instead + qdel(dummy) return can_see /obj/item/device/camera/proc/captureimage(atom/target, mob/user, flag) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 67a20104854..c1a42eeb8af 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -714,7 +714,7 @@ if(!user) return - if(wiresexposed /*&& (!istype(user, /mob/living/silicon))*/) //Commented out the typecheck to allow engiborgs to repair damaged apcs. + if(wiresexposed && !istype(user, /mob/living/silicon/ai)) wires.Interact(user) return ui_interact(user) diff --git a/html/changelog.html b/html/changelog.html index 7e11154c81e..85762f55035 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -25,7 +25,7 @@
Space Station 13
-

Wiki | Source code

+

Wiki | Source code

Code licensed under AGPLv3. Content licensed under CC BY-SA 3.0.

Visit our IRC channel: #bs12 on irc.sorcery.net @@ -56,6 +56,13 @@ -->
+

11 August 2015

+

PsiOmegaDelta updated:

+ +

31 July 2015

HarpyEagle updated: