diff --git a/code/ATMOSPHERICS/chiller.dm b/code/ATMOSPHERICS/chiller.dm index b83d30e2045..717a2304ffc 100644 --- a/code/ATMOSPHERICS/chiller.dm +++ b/code/ATMOSPHERICS/chiller.dm @@ -9,8 +9,6 @@ set_temperature = 20 // in celcius, add T0C for kelvin var/cooling_power = 40000 - flags = FPRINT - /obj/machinery/space_heater/air_conditioner/New() ..() @@ -96,11 +94,11 @@ // AUTOFIXED BY fix_string_idiocy.py // C:\Users\Rob\Documents\Projects\vgstation13\code\ATMOSPHERICS\chiller.dm:95: dat += "Power Level: [cell ? round(cell.percent(),1) : 0]%

" dat += {"Power Level: [cell ? round(cell.percent(),1) : 0]%

- Set Temperature: - - + Set Temperature: + - - - [temp]°C - + + [temp]°C + + +
"} // END AUTOFIX user.set_machine(src) diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm index 1b2296bffd9..c18b0228338 100644 --- a/code/ZAS/Airflow.dm +++ b/code/ZAS/Airflow.dm @@ -253,7 +253,7 @@ zone/proc/movables() continue . += A -//ULTRALIGHT - only file where this is still used, hence why it's in here +//ULTRALIGHT - only file where this is still used, hence why it's in here #define UL_I_FALLOFF_SQUARE 0 #define UL_I_FALLOFF_ROUND 1 #define ul_FalloffStyle UL_I_FALLOFF_ROUND // Sets the lighting falloff to be either squared or circular. diff --git a/code/ZAS/Atom.dm b/code/ZAS/Atom.dm index b4d1de20af4..fdc187e0e5f 100644 --- a/code/ZAS/Atom.dm +++ b/code/ZAS/Atom.dm @@ -30,6 +30,16 @@ atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0) return 1 +//Convenience function for atoms to update turfs they occupy +/atom/movable/proc/update_nearby_tiles(need_rebuild) + if(!air_master) + return 0 + + for(var/turf/simulated/turf in locs) + air_master.mark_for_update(turf) + + return 1 + //Basically another way of calling CanPass(null, other, 0, 0) and CanPass(null, other, 1.5, 1). //Returns: // 0 - Not blocked diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 6dac55213d7..a692639d802 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -313,7 +313,8 @@ proc/isInSight(var/atom/A, var/atom/B) return M return null -/proc/get_candidates(be_special_flag=0, afk_bracket=3000, jobban=0, department_jobban=0, override_age=0) +/proc/get_candidates(be_special_flag=0, afk_bracket=3000, override_age=0, override_jobban=0) + var/roletext = get_roletext(be_special_flag) var/list/candidates = list() // Keep looping until we find a non-afk candidate within the time bracket (we limit the bracket to 10 minutes (6000)) while(!candidates.len && afk_bracket < 6000) @@ -321,7 +322,7 @@ proc/isInSight(var/atom/A, var/atom/B) if(G.client != null) if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) if(!G.client.is_afk(afk_bracket) && (G.client.prefs.be_special & be_special_flag)) - if(!jobban && !department_jobban || !jobban_isbanned(G, jobban) && !jobban_isbanned(G,department_jobban)) + if(!override_jobban || (!jobban_isbanned(G, roletext) && !jobban_isbanned(G,"Syndicate"))) if(override_age || player_old_enough_antag(G.client,be_special_flag)) candidates += G.client afk_bracket += 600 // Add a minute to the bracket, for every attempt diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index fd062539852..515f1788f66 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -44,7 +44,7 @@ var/global/list/facial_hair_styles_male_list = list() var/global/list/facial_hair_styles_female_list = list() var/global/list/skin_styles_female_list = list() //unused //Underwear -var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "None") +var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "None") var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "None") var/global/list/underwear_list = underwear_m + underwear_f //undershirt diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index 10ab63c9259..8e6118f6f46 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -396,4 +396,190 @@ proc/listclearnulls(list/list) /proc/find_record(field, value, list/L) for(var/datum/data/record/R in L) if(R.fields[field] == value) - return R \ No newline at end of file + return R + + +/proc/dd_sortedObjectList(var/list/L, var/cache=list()) + if(L.len < 2) + return L + var/middle = L.len / 2 + 1 // Copy is first,second-1 + return dd_mergeObjectList(dd_sortedObjectList(L.Copy(0,middle), cache), dd_sortedObjectList(L.Copy(middle), cache), cache) //second parameter null = to end of list + +/proc/dd_mergeObjectList(var/list/L, var/list/R, var/list/cache) + var/Li=1 + var/Ri=1 + var/list/result = new() + while(Li <= L.len && Ri <= R.len) + var/LLi = L[Li] + var/RRi = R[Ri] + var/LLiV = cache[LLi] + var/RRiV = cache[RRi] + if(!LLiV) + LLiV = LLi:dd_SortValue() + cache[LLi] = LLiV + if(!RRiV) + RRiV = RRi:dd_SortValue() + cache[RRi] = RRiV + if(LLiV < RRiV) + result += L[Li++] + else + result += R[Ri++] + + if(Li <= L.len) + return (result + L.Copy(Li, 0)) + return (result + R.Copy(Ri, 0)) + +// Insert an object into a sorted list, preserving sortedness +/proc/dd_insertObjectList(var/list/L, var/O) + var/min = 1 + var/max = L.len + var/Oval = O:dd_SortValue() + + while(1) + var/mid = min+round((max-min)/2) + + if(mid == max) + L.Insert(mid, O) + return + + var/Lmid = L[mid] + var/midval = Lmid:dd_SortValue() + if(Oval == midval) + L.Insert(mid, O) + return + else if(Oval < midval) + max = mid + else + min = mid+1 + +/* +proc/dd_sortedObjectList(list/incoming) + /* + Use binary search to order by dd_SortValue(). + This works by going to the half-point of the list, seeing if the node in + question is higher or lower cost, then going halfway up or down the list + and checking again. This is a very fast way to sort an item into a list. + */ + var/list/sorted_list = new() + var/low_index + var/high_index + var/insert_index + var/midway_calc + var/current_index + var/current_item + var/current_item_value + var/current_sort_object_value + var/list/list_bottom + + var/current_sort_object + for (current_sort_object in incoming) + low_index = 1 + high_index = sorted_list.len + while (low_index <= high_index) + // Figure out the midpoint, rounding up for fractions. (BYOND rounds down, so add 1 if necessary.) + midway_calc = (low_index + high_index) / 2 + current_index = round(midway_calc) + if (midway_calc > current_index) + current_index++ + current_item = sorted_list[current_index] + + current_item_value = current_item:dd_SortValue() + current_sort_object_value = current_sort_object:dd_SortValue() + if (current_sort_object_value < current_item_value) + high_index = current_index - 1 + else if (current_sort_object_value > current_item_value) + low_index = current_index + 1 + else + // current_sort_object == current_item + low_index = current_index + break + + // Insert before low_index. + insert_index = low_index + + // Special case adding to end of list. + if (insert_index > sorted_list.len) + sorted_list += current_sort_object + continue + + // Because BYOND lists don't support insert, have to do it by: + // 1) taking out bottom of list, 2) adding item, 3) putting back bottom of list. + list_bottom = sorted_list.Copy(insert_index) + sorted_list.Cut(insert_index) + sorted_list += current_sort_object + sorted_list += list_bottom + return sorted_list +*/ + +proc/dd_sortedtextlist(list/incoming, case_sensitive = 0) + // Returns a new list with the text values sorted. + // Use binary search to order by sortValue. + // This works by going to the half-point of the list, seeing if the node in question is higher or lower cost, + // then going halfway up or down the list and checking again. + // This is a very fast way to sort an item into a list. + var/list/sorted_text = new() + var/low_index + var/high_index + var/insert_index + var/midway_calc + var/current_index + var/current_item + var/list/list_bottom + var/sort_result + + var/current_sort_text + for (current_sort_text in incoming) + low_index = 1 + high_index = sorted_text.len + while (low_index <= high_index) + // Figure out the midpoint, rounding up for fractions. (BYOND rounds down, so add 1 if necessary.) + midway_calc = (low_index + high_index) / 2 + current_index = round(midway_calc) + if (midway_calc > current_index) + current_index++ + current_item = sorted_text[current_index] + + if (case_sensitive) + sort_result = sorttextEx(current_sort_text, current_item) + else + sort_result = sorttext(current_sort_text, current_item) + + switch(sort_result) + if (1) + high_index = current_index - 1 // current_sort_text < current_item + if (-1) + low_index = current_index + 1 // current_sort_text > current_item + if (0) + low_index = current_index // current_sort_text == current_item + break + + // Insert before low_index. + insert_index = low_index + + // Special case adding to end of list. + if (insert_index > sorted_text.len) + sorted_text += current_sort_text + continue + + // Because BYOND lists don't support insert, have to do it by: + // 1) taking out bottom of list, 2) adding item, 3) putting back bottom of list. + list_bottom = sorted_text.Copy(insert_index) + sorted_text.Cut(insert_index) + sorted_text += current_sort_text + sorted_text += list_bottom + return sorted_text + + +proc/dd_sortedTextList(list/incoming) + var/case_sensitive = 1 + return dd_sortedtextlist(incoming, case_sensitive) + + +datum/proc/dd_SortValue() + return "[src]" + +/obj/machinery/dd_SortValue() + return "[sanitize(name)]" + +/obj/machinery/camera/dd_SortValue() + return "[c_tag]" \ No newline at end of file diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 1553550e362..cb2fad75ddb 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -82,7 +82,7 @@ // Used to get a sanitized input. /proc/stripped_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN) var/name = input(user, message, title, default) - return strip_html_simple(name, max_length) + return strip_html_properly(name, max_length) //Filters out undesirable characters from names /proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN) @@ -311,4 +311,34 @@ proc/checkhtml(var/t) var/new_text = "" for(var/i = length(text); i > 0; i--) new_text += copytext(text, i, i+1) - return new_text + return new_text + +//This proc strips html properly, but it's not lazy like the other procs. +//This means that it doesn't just remove < and > and call it a day. +//Also limit the size of the input, if specified. +/proc/strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN) + if(!input) + return + var/opentag = 1 //These store the position of < and > respectively. + var/closetag = 1 + while(1) + opentag = findtext(input, "<") + closetag = findtext(input, ">") + if(closetag && opentag) + if(closetag < opentag) + input = copytext(input, (closetag + 1)) + else + input = copytext(input, 1, opentag) + copytext(input, (closetag + 1)) + else if(closetag || opentag) + if(opentag) + input = copytext(input, 1, opentag) + else + input = copytext(input, (closetag + 1)) + else + break + if(max_length) + input = copytext(input,1,max_length) + return sanitize(input) + +/proc/trim_strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN) + return trim(strip_html_properly(input, max_length)) diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index c26d2e8d7b8..634697b8e44 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -227,7 +227,7 @@ proc/tg_text2list(text, glue=",", assocglue=";") . += copytext(text, last_found, found) last_found = found + delim_len while(found) - + /proc/text2numlist(text, delimiter="\n") var/list/num_list = list() for(var/x in text2list(text, delimiter)) @@ -347,6 +347,7 @@ proc/tg_text2list(text, glue=",", assocglue=";") if(rights & R_SOUNDS) . += "[seperator]+SOUND" if(rights & R_SPAWN) . += "[seperator]+SPAWN" if(rights & R_MOD) . += "[seperator]+MODERATOR" + if(rights & R_MENTOR) . += "[seperator]+MENTOR" return . /proc/ui_style2icon(ui_style) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index ac841e220df..fec0900cf1b 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -411,13 +411,7 @@ Turf and target are seperate in case you want to teleport some distance from a t //world << "[newname] is the AI!" //world << sound('sound/AI/newAI.ogg') // Set eyeobj name - if(A.eyeobj) - A.eyeobj.name = "[newname] (AI Eye)" - - // Set ai pda name - if(A.aiPDA) - A.aiPDA.owner = newname - A.aiPDA.name = newname + " (" + A.aiPDA.ownjob + ")" + A.SetName(newname) fully_replace_character_name(oldname,newname) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index edda907db4c..a0da39a2976 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -65,8 +65,6 @@ if(stat || paralysis || stunned || weakened) return - face_atom(A) // change direction to face what you clicked on - if(next_move > world.time) // in the year 2000... return diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 52b16ad6dcf..1e07b13142a 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -503,8 +503,7 @@ if("Crew Monitoring") if(isAI(usr)) var/mob/living/silicon/ai/AI = usr - var/obj/machinery/computer/crew/C = locate(/obj/machinery/computer/crew) - C.attack_ai(AI) + AI.nano_crew_monitor() if("Show Crew Manifest") if(isAI(usr)) diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm index 1fd31a5bd18..d8b5617d2a1 100644 --- a/code/_onclick/observer.dm +++ b/code/_onclick/observer.dm @@ -66,7 +66,7 @@ /obj/machinery/teleport/hub/attack_ghost(mob/user as mob) var/atom/l = loc var/obj/machinery/computer/teleporter/com = locate(/obj/machinery/computer/teleporter, locate(l.x - 2, l.y, l.z)) - if(com.locked) + if(com && com.locked) user.loc = get_turf(com.locked) /obj/effect/portal/attack_ghost(mob/user as mob) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 427b286800b..c6527855100 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -17,10 +17,13 @@ /atom/proc/attack_hand(mob/user as mob) return -/mob/living/carbon/human/RestrainedClickOn(var/atom/A) +/* +/mob/living/carbon/human/RestrainedClickOn(var/atom/A) -- Handled by carbons return +*/ - +/mob/living/carbon/RestrainedClickOn(var/atom/A) + return 0 // Commented out to prevent overwriting RangedAttack in click.dm ~ Bone White /* @@ -72,6 +75,8 @@ things considerably */ /mob/living/carbon/monkey/RestrainedClickOn(var/atom/A) + if(..()) + return if(a_intent != "harm" || !ismob(A)) return if(istype(wear_mask, /obj/item/clothing/mask/muzzle)) return diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 0eadbff6696..c06485ee0ec 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -65,7 +65,7 @@ var/const/tk_maxrange = 15 desc = "Magic" icon = 'icons/obj/magic.dmi'//Needs sprites icon_state = "2" - flags = NOBLUDGEON + flags = NOBLUDGEON | ABSTRACT //item_state = null w_class = 10.0 layer = 20 diff --git a/code/controllers/_DynamicAreaLighting_TG.dm b/code/controllers/_DynamicAreaLighting_TG.dm index 8168ef50aad..15e0b2e9c8f 100644 --- a/code/controllers/_DynamicAreaLighting_TG.dm +++ b/code/controllers/_DynamicAreaLighting_TG.dm @@ -94,7 +94,7 @@ datum/light_source if(owner.loc && owner.luminosity > 0) readrgb(owner.l_color) effect = list() - for(var/turf/T in view(owner.get_light_range(),owner)) + for(var/turf/T in view(owner.get_light_range(),get_turf(owner))) var/delta_lumen = lum(T) if(delta_lumen > 0) effect[T] = delta_lumen diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 5806da2e51a..160137a2e5b 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -135,6 +135,11 @@ var/default_laws = 0 //Controls what laws the AI spawns with. + var/list/station_levels = list(1) // Defines which Z-levels the station exists on. + var/list/admin_levels= list(2) // Defines which Z-levels which are for admin functionality, for example including such areas as Central Command and the Syndicate Shuttle + var/list/contact_levels = list(1, 5) // Defines which Z-levels which, for example, a Code Red announcement may affect + var/list/player_levels = list(1, 3, 4, 5, 6) // Defines all Z-levels a character can typically reach + var/const/minutes_to_ticks = 60 * 10 // Event settings var/expected_round_length = 60 * 2 * minutes_to_ticks // 2 hours @@ -458,6 +463,18 @@ if("max_maint_drones") config.max_maint_drones = text2num(value) + if("station_levels") + config.station_levels = text2numlist(value, ";") + + if("admin_levels") + config.admin_levels = text2numlist(value, ";") + + if("contact_levels") + config.contact_levels = text2numlist(value, ";") + + if("player_levels") + config.player_levels = text2numlist(value, ";") + if("expected_round_length") config.expected_round_length = MinutesToTicks(text2num(value)) diff --git a/code/controllers/emergency_shuttle_controller.dm b/code/controllers/emergency_shuttle_controller.dm index 55b325eba3c..83a9d379434 100644 --- a/code/controllers/emergency_shuttle_controller.dm +++ b/code/controllers/emergency_shuttle_controller.dm @@ -18,7 +18,10 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle var/deny_shuttle = 0 //allows admins to prevent the shuttle from being called var/departed = 0 //if the shuttle has left the station at least once - + + var/datum/announcement/priority/emergency_shuttle_docked = new(0, new_sound = sound('sound/AI/shuttledock.ogg')) + var/datum/announcement/priority/emergency_shuttle_called = new(0, new_sound = sound('sound/AI/shuttlecalled.ogg')) + var/datum/announcement/priority/emergency_shuttle_recalled = new(0, new_sound = sound('sound/AI/shuttlerecalled.ogg')) /datum/emergency_shuttle_controller/proc/process() if (wait_for_launch) @@ -29,7 +32,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle if (!shuttle.location) //leaving from the station if(is_stranded()) - captain_announce("Hostile environment detected. Departure has been postponed indefinitely pending conflict resolution.") + priority_announcement.Announce("Hostile environment detected. Departure has been postponed indefinitely pending conflict resolution.") wait_for_launch = 0 return //launch the pods! @@ -49,10 +52,9 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle set_launch_countdown(SHUTTLE_LEAVETIME) //get ready to return if (evac) - captain_announce("The Emergency Shuttle has docked with the station. You have approximately [round(estimate_launch_time()/60,1)] minutes to board the Emergency Shuttle.") - world << sound('sound/AI/shuttledock.ogg') + emergency_shuttle_docked.Announce("The Emergency Shuttle has docked with the station. You have approximately [round(estimate_launch_time()/60,1)] minutes to board the Emergency Shuttle.") else - captain_announce("The scheduled Crew Transfer Shuttle has docked with the station. It will depart in approximately [round(emergency_shuttle.estimate_launch_time()/60,1)] minutes.") + priority_announcement.Announce("The scheduled Crew Transfer Shuttle has docked with the station. It will depart in approximately [round(emergency_shuttle.estimate_launch_time()/60,1)] minutes.") //arm the escape pods if (evac) @@ -81,8 +83,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle shuttle.move_time = SHUTTLE_TRANSIT_DURATION evac = 1 - captain_announce("An emergency evacuation shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.") - world << sound('sound/AI/shuttlecalled.ogg') + emergency_shuttle_called.Announce("An emergency evacuation shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.") for(var/area/A in world) if(istype(A, /area/hallway)) A.readyalert() @@ -101,7 +102,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle //reset the shuttle transit time if we need to shuttle.move_time = SHUTTLE_TRANSIT_DURATION - captain_announce("A crew transfer has been scheduled. The shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.") + priority_announcement.Announce("A crew transfer has been scheduled. The shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.") //recalls the shuttle /datum/emergency_shuttle_controller/proc/recall() @@ -111,15 +112,14 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle shuttle.cancel_launch(src) if (evac) - captain_announce("The emergency shuttle has been recalled.") - world << sound('sound/AI/shuttlerecalled.ogg') + emergency_shuttle_recalled.Announce("The emergency shuttle has been recalled.") for(var/area/A in world) if(istype(A, /area/hallway)) A.readyreset() evac = 0 else - captain_announce("The scheduled crew transfer has been cancelled.") + priority_announcement.Announce("The scheduled crew transfer has been cancelled.") /datum/emergency_shuttle_controller/proc/can_call() if (deny_shuttle) diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index d81bbf67085..e1fc26d1709 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -179,6 +179,11 @@ datum/ai_laws/tyrant //This probably shouldn't be a default lawset. /datum/ai_laws/proc/clear_ion_laws() src.ion = list() + +/datum/ai_laws/proc/clear_zeroth_law(var/law_borg = null) + src.zeroth = null + if(law_borg) + src.zeroth_borg = null /datum/ai_laws/proc/show_laws(var/who) diff --git a/code/datums/cargoprofile.dm b/code/datums/cargoprofile.dm index 8bf2e281bbb..d2c11e8984b 100644 --- a/code/datums/cargoprofile.dm +++ b/code/datums/cargoprofile.dm @@ -238,7 +238,7 @@ /obj/item/clothing/mask/facehugger) // NOT CLOTHING AT ALLLLL whitelist = list(/obj/item/clothing,/obj/item/weapon/storage/belt,/obj/item/weapon/storage/backpack, /obj/item/device/radio/headset,/obj/item/device/pda,/obj/item/weapon/card/id,/obj/item/weapon/tank, - /obj/item/weapon/handcuffs, /obj/item/weapon/legcuffs) + /obj/item/weapon/restraints/handcuffs, /obj/item/weapon/restraints/legcuffs) /datum/cargoprofile/trash name = "Trash" diff --git a/code/datums/crafting/recipes.dm b/code/datums/crafting/recipes.dm index 4322fcc9f4a..c2f882eec08 100644 --- a/code/datums/crafting/recipes.dm +++ b/code/datums/crafting/recipes.dm @@ -35,7 +35,7 @@ /datum/crafting_recipe/table/stunprod name = "Stunprod" result_path = /obj/item/weapon/melee/baton/cattleprod - reqs = list(/obj/item/weapon/handcuffs/cable = 1, + reqs = list(/obj/item/weapon/restraints/handcuffs/cable = 1, /obj/item/stack/rods = 1, /obj/item/weapon/wirecutters = 1, /obj/item/weapon/stock_parts/cell = 1) diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index a4cde9f99e0..23d9ff5aa18 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -190,7 +190,7 @@ teleatom.visible_message("\red The [teleatom] bounces off of the portal!") return 0 - if(destination.z == 2) //centcomm z-level + if((destination.z in config.admin_levels)) //centcomm z-level if(istype(teleatom, /obj/mecha)) var/obj/mecha/MM = teleatom MM.occupant << "\red The mech would not survive the jump to a location so far away!" @@ -200,6 +200,6 @@ return 0 - if(destination.z > 7) //Away mission z-levels + if(!(destination.z in config.player_levels)) //Away mission z-levels return 0 return 1 \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 2cea7838cbf..0a4f03a5976 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -1082,7 +1082,7 @@ datum/mind switch(href_list["common"]) if("undress") for(var/obj/item/W in current) - current.drop_from_inventory(W) + current.unEquip(W, 1) if("takeuplink") take_uplink() memory = null//Remove any memory they may have had. diff --git a/code/datums/periodic_news.dm b/code/datums/periodic_news.dm index 976ef536cb4..ffa52bffdc6 100644 --- a/code/datums/periodic_news.dm +++ b/code/datums/periodic_news.dm @@ -8,6 +8,7 @@ author = "Nanotrasen Editor" channel_name = "Tau Ceti Daily" can_be_redacted = 0 + message_type = "Story" revolution_inciting_event @@ -129,12 +130,6 @@ proc/check_for_newscaster_updates(type) proc/announce_newscaster_news(datum/news_announcement/news) - var/datum/feed_message/newMsg = new /datum/feed_message - newMsg.author = news.author - newMsg.is_admin_message = !news.can_be_redacted - - newMsg.body = news.message - var/datum/feed_channel/sendto for(var/datum/feed_channel/FC in news_network.network_channels) if(FC.channel_name == news.channel_name) @@ -148,6 +143,12 @@ proc/announce_newscaster_news(datum/news_announcement/news) sendto.locked = 1 sendto.is_admin_channel = 1 news_network.network_channels += sendto + + var/datum/feed_message/newMsg = new /datum/feed_message + newMsg.author = news.author ? news.author : sendto.author + newMsg.is_admin_message = !news.can_be_redacted + newMsg.body = news.message + newMsg.message_type = news.message_type sendto.messages += newMsg diff --git a/code/datums/spell.dm b/code/datums/spell.dm index d6c2350510d..d131db35dda 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -60,7 +60,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin caster.reset_view(0) return 0 - if(user.z == 2 && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel + if((user.z in config.admin_levels) && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel return 0 if(!skipcharge) diff --git a/code/datums/spells/horsemask.dm b/code/datums/spells/horsemask.dm index b04969d2d98..3e1f82f98f9 100644 --- a/code/datums/spells/horsemask.dm +++ b/code/datums/spells/horsemask.dm @@ -35,12 +35,13 @@ return var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead - magichead.canremove = 0 //curses! + magichead.flags |= NODROP //curses! magichead.flags_inv = null //so you can still see their face magichead.voicechange = 1 //NEEEEIIGHH target.visible_message( "[target]'s face lights up in fire, and after the event a horse's head takes its place!", \ "Your face burns up, and shortly after the fire you realise you have the face of a horse!") - target.drop_from_inventory(target.wear_mask) + if(!target.unEquip(target.wear_mask)) + del target.wear_mask target.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1) flick("e_flash", target.flash) diff --git a/code/datums/spells/summonitem.dm b/code/datums/spells/summonitem.dm index cca82c3c0c0..05b835605d4 100644 --- a/code/datums/spells/summonitem.dm +++ b/code/datums/spells/summonitem.dm @@ -59,7 +59,7 @@ item_to_retrive = null break - M.u_equip(item_to_retrive) + M.unEquip(item_to_retrive) if(ishuman(M)) //Edge case housekeeping var/mob/living/carbon/human/C = M diff --git a/code/datums/sun.dm b/code/datums/sun.dm index 1379a7b9d87..794e2dd8668 100644 --- a/code/datums/sun.dm +++ b/code/datums/sun.dm @@ -16,7 +16,7 @@ rate = -rate solar_next_update = world.time // init the timer angle = rand (0,360) // the station position to the sun is randomised at round start - + /hook/startup/proc/createSun() sun = new /datum/sun() return 1 @@ -50,54 +50,9 @@ dx = s/abs(s) dy = c / abs(s) - - for(var/obj/machinery/power/M in solars_list) - - if(!M.powernet) - solars_list.Remove(M) + //now tell the solar control computers to update their status and linked devices + for(var/obj/machinery/power/solar_control/SC in solars_list) + if(!SC.powernet) + solars_list.Remove(SC) continue - - // Solar Tracker - if(istype(M, /obj/machinery/power/tracker)) - var/obj/machinery/power/tracker/T = M - T.set_angle(angle) - - // Solar Control - else if(istype(M, /obj/machinery/power/solar_control)) - var/obj/machinery/power/solar_control/C = M - if(C.track == 1) //if manual tracking... - C.tracker_update() //...update the position (not passing an angle, it is handled internally for manual tracking) - - // Solar Panel - else if(istype(M, /obj/machinery/power/solar)) - var/obj/machinery/power/solar/S = M - if(S.control) - occlusion(S) - - -// for a solar panel, trace towards sun to see if we're in shadow -/datum/sun/proc/occlusion(var/obj/machinery/power/solar/S) - - var/ax = S.x // start at the solar panel - var/ay = S.y - var/turf/T = null - - for(var/i = 1 to 20) // 20 steps is enough - ax += dx // do step - ay += dy - - T = locate( round(ax,0.5),round(ay,0.5),S.z) - - if(T.x == 1 || T.x==world.maxx || T.y==1 || T.y==world.maxy) // not obscured if we reach the edge - break - - if(T.density) // if we hit a solid turf, panel is obscured - S.obscured = 1 - return - - S.obscured = 0 // if hit the edge or stepped 20 times, not obscured - S.update_solar_exposure() - - - - + SC.update() diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm old mode 100755 new mode 100644 index 5c6ef778390..a3fbd9c9f86 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -1,1204 +1,1296 @@ -//SUPPLY PACKS -//NOTE: only secure crate types use the access var (and are lockable) -//NOTE: hidden packs only show up when the computer has been hacked. -//ANOTER NOTE: Contraband is obtainable through modified supplycomp circuitboards. -//BIG NOTE: Don't add living things to crates, that's bad, it will break the shuttle. -//NEW NOTE: Do NOT set the price of any crates below 7 points. Doing so allows infinite points. - -var/list/all_supply_groups = list("Operations","Security","Hospitality","Engineering","Medical / Science","Hydroponics","Organic") - -/datum/supply_packs - var/name = null - var/list/contains = list() - var/manifest = "" - var/amount = null - var/cost = null - var/containertype = null - var/containername = null - var/access = null - var/hidden = 0 - var/contraband = 0 - var/group = "Operations" - -/datum/supply_packs/New() - manifest += "" - -/datum/supply_packs/specialops - name = "Special Ops supplies" - contains = list(/obj/item/weapon/storage/box/emps, - /obj/item/weapon/grenade/smokebomb, - /obj/item/weapon/grenade/smokebomb, - /obj/item/weapon/grenade/smokebomb, - /obj/item/weapon/pen/paralysis, - /obj/item/weapon/grenade/chem_grenade/incendiary) - cost = 20 - containertype = /obj/structure/closet/crate - containername = "Special Ops crate" - group = "Security" - hidden = 1 - -/datum/supply_packs/syndicate - name = "ERROR_NULL_ENTRY" - contains = list(/obj/item/weapon/storage/box/syndicate) - cost = 140 - containertype = /obj/structure/closet/crate - containername = "crate" - hidden = 1 - -/datum/supply_packs/food - name = "Food crate" - contains = list(/obj/item/weapon/reagent_containers/food/snacks/flour, - /obj/item/weapon/reagent_containers/food/snacks/flour, - /obj/item/weapon/reagent_containers/food/snacks/flour, - /obj/item/weapon/reagent_containers/food/snacks/flour, - /obj/item/weapon/reagent_containers/food/drinks/milk, - /obj/item/weapon/reagent_containers/food/drinks/milk, - /obj/item/weapon/storage/fancy/egg_box, - /obj/item/weapon/reagent_containers/food/snacks/grown/banana, - /obj/item/weapon/reagent_containers/food/snacks/grown/banana) - cost = 10 - containertype = /obj/structure/closet/crate/freezer - containername = "Food crate" - group = "Hospitality" - -/datum/supply_packs/monkey - name = "Monkey crate" - contains = list (/obj/item/weapon/storage/box/monkeycubes) - cost = 20 - containertype = /obj/structure/closet/crate/freezer - containername = "Monkey crate" - group = "Hydroponics" - -/datum/supply_packs/farwa - name = "Farwa crate" - contains = list (/obj/item/weapon/storage/box/farwacubes) - cost = 30 - containertype = /obj/structure/closet/crate/freezer - containername = "Farwa crate" - group = "Hydroponics" - -/datum/supply_packs/skrell - name = "Neaera crate" - contains = list (/obj/item/weapon/storage/box/neaeracubes) - cost = 30 - containertype = /obj/structure/closet/crate/freezer - containername = "Neaera crate" - group = "Hydroponics" - -/datum/supply_packs/stok - name = "Stok crate" - contains = list (/obj/item/weapon/storage/box/stokcubes) - cost = 30 - containertype = /obj/structure/closet/crate/freezer - containername = "Stok crate" - group = "Hydroponics" - -/datum/supply_packs/beanbagammo - name = "Beanbag shells" - contains = list(/obj/item/ammo_casing/shotgun/beanbag, - /obj/item/ammo_casing/shotgun/beanbag, - /obj/item/ammo_casing/shotgun/beanbag, - /obj/item/ammo_casing/shotgun/beanbag, - /obj/item/ammo_casing/shotgun/beanbag, - /obj/item/ammo_casing/shotgun/beanbag, - /obj/item/ammo_casing/shotgun/beanbag, - /obj/item/ammo_casing/shotgun/beanbag, - /obj/item/ammo_casing/shotgun/beanbag, - /obj/item/ammo_casing/shotgun/beanbag) - cost = 10 - containertype = /obj/structure/closet/crate - containername = "Beanbag shells" - group = "Security" - -/datum/supply_packs/toner - name = "Toner Cartridges" - contains = list(/obj/item/device/toner, - /obj/item/device/toner, - /obj/item/device/toner, - /obj/item/device/toner, - /obj/item/device/toner, - /obj/item/device/toner) - cost = 10 - containertype = /obj/structure/closet/crate - containername = "Toner Cartridges" - group = "Operations" - -/datum/supply_packs/party - name = "Party equipment" - contains = list(/obj/item/weapon/storage/box/drinkingglasses, - /obj/item/weapon/reagent_containers/food/drinks/shaker, - /obj/item/weapon/reagent_containers/food/drinks/bottle/patron, - /obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager, - /obj/item/weapon/storage/fancy/cigarettes/dromedaryco, - /obj/item/weapon/lipstick/random, - /obj/item/weapon/reagent_containers/food/drinks/cans/ale, - /obj/item/weapon/reagent_containers/food/drinks/cans/ale, - /obj/item/weapon/reagent_containers/food/drinks/cans/beer, - /obj/item/weapon/reagent_containers/food/drinks/cans/beer, - /obj/item/weapon/reagent_containers/food/drinks/cans/beer, - /obj/item/weapon/reagent_containers/food/drinks/cans/beer) - cost = 20 - containertype = /obj/structure/closet/crate - containername = "Party equipment" - group = "Hospitality" - -/datum/supply_packs/internals - name = "Internals crate" - contains = list(/obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/weapon/tank/air, - /obj/item/weapon/tank/air, - /obj/item/weapon/tank/air) - cost = 10 - containertype = /obj/structure/closet/crate/internals - containername = "Internals crate" - group = "Engineering" - -/datum/supply_packs/evacuation - name = "Emergency equipment" - contains = list(/obj/item/weapon/storage/toolbox/emergency, - /obj/item/weapon/storage/toolbox/emergency, - /obj/item/clothing/suit/storage/hazardvest, - /obj/item/clothing/suit/storage/hazardvest, - /obj/item/weapon/tank/emergency_oxygen, - /obj/item/weapon/tank/emergency_oxygen, - /obj/item/weapon/tank/emergency_oxygen, - /obj/item/weapon/tank/emergency_oxygen, - /obj/item/weapon/tank/emergency_oxygen, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas, - /obj/item/clothing/mask/gas) - cost = 35 - containertype = /obj/structure/closet/crate/internals - containername = "Emergency Crate" - group = "Engineering" - -/datum/supply_packs/inflatable - name = "Inflatable barriers" - contains = list(/obj/item/weapon/storage/briefcase/inflatable, - /obj/item/weapon/storage/briefcase/inflatable, - /obj/item/weapon/storage/briefcase/inflatable) - cost = 20 - containertype = /obj/structure/closet/crate - containername = "Inflatable Barrier Crate" - group = "Engineering" - -/datum/supply_packs/janitor - name = "Janitorial supplies" - contains = list(/obj/item/weapon/reagent_containers/glass/bucket, - /obj/item/weapon/reagent_containers/glass/bucket, - /obj/item/weapon/reagent_containers/glass/bucket, - /obj/item/weapon/mop, - /obj/item/weapon/caution, - /obj/item/weapon/caution, - /obj/item/weapon/caution, - /obj/item/weapon/storage/bag/trash, - /obj/item/weapon/reagent_containers/spray/cleaner, - /obj/item/weapon/reagent_containers/glass/rag, - /obj/item/weapon/grenade/chem_grenade/cleaner, - /obj/item/weapon/grenade/chem_grenade/cleaner, - /obj/item/weapon/grenade/chem_grenade/cleaner) - cost = 10 - containertype = /obj/structure/closet/crate - containername = "Janitorial supplies" - group = "Operations" - -/datum/supply_packs/janicart - name = "Janitorial Cart and Galoshes crate" - contains = list(/obj/structure/janitorialcart, - /obj/item/clothing/shoes/galoshes) - cost = 10 - containertype = /obj/structure/largecrate - containername = "janitorial cart crate" - -/datum/supply_packs/lightbulbs - name = "Replacement lights" - contains = list(/obj/item/weapon/storage/box/lights/mixed, - /obj/item/weapon/storage/box/lights/mixed, - /obj/item/weapon/storage/box/lights/mixed) - cost = 10 - containertype = /obj/structure/closet/crate - containername = "Replacement lights" - group = "Engineering" - -/datum/supply_packs/costume - name = "Standard Costume crate" - contains = list(/obj/item/weapon/storage/backpack/clown, - /obj/item/clothing/shoes/clown_shoes, - /obj/item/clothing/mask/gas/clown_hat, - /obj/item/clothing/under/rank/clown, - /obj/item/weapon/bikehorn, - /obj/item/clothing/under/mime, - /obj/item/clothing/shoes/black, - /obj/item/clothing/gloves/color/white, - /obj/item/clothing/mask/gas/mime, - /obj/item/clothing/head/beret, - /obj/item/clothing/suit/suspenders, - /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing) - cost = 10 - containertype = /obj/structure/closet/crate/secure - containername = "Standard Costumes" - access = access_theatre - group = "Operations" - -/datum/supply_packs/wizard - name = "Wizard costume" - contains = list(/obj/item/weapon/staff, - /obj/item/clothing/suit/wizrobe/fake, - /obj/item/clothing/shoes/sandal, - /obj/item/clothing/head/wizard/fake) - cost = 20 - containertype = /obj/structure/closet/crate - containername = "Wizard costume crate" - group = "Operations" - -/datum/supply_packs/mule - name = "MULEbot Crate" - contains = list(/obj/machinery/bot/mulebot) - cost = 20 - containertype = /obj/structure/largecrate/mule - containername = "MULEbot Crate" - group = "Operations" - -/datum/supply_packs/cargotrain - name = "Cargo Train Tug" - contains = list(/obj/vehicle/train/cargo/engine) - cost = 45 - containertype = /obj/structure/largecrate - containername = "Cargo Train Tug Crate" - group = "Operations" - -/datum/supply_packs/cargotrailer - name = "Cargo Train Trolley" - contains = list(/obj/vehicle/train/cargo/trolley) - cost = 15 - containertype = /obj/structure/largecrate - containername = "Cargo Train Trolley Crate" - group = "Operations" - -/datum/supply_packs/hydroponics // -- Skie - name = "Hydroponics Supply Crate" - contains = list(/obj/item/weapon/reagent_containers/spray/plantbgone, - /obj/item/weapon/reagent_containers/spray/plantbgone, - /obj/item/weapon/reagent_containers/glass/bottle/ammonia, - /obj/item/weapon/reagent_containers/glass/bottle/ammonia, - /obj/item/weapon/hatchet, - /obj/item/weapon/minihoe, - /obj/item/device/analyzer/plant_analyzer, - /obj/item/clothing/gloves/botanic_leather, - /obj/item/clothing/suit/apron, - /obj/item/weapon/minihoe, - /obj/item/weapon/storage/box/botanydisk - ) // Updated with new things - cost = 15 - containertype = /obj/structure/closet/crate/hydroponics - containername = "Hydroponics crate" - access = access_hydroponics - group = "Hydroponics" - -//////// livestock -/datum/supply_packs/organic/cow - name = "Cow Crate" - cost = 30 - containertype = /obj/structure/largecrate/cow - containername = "cow crate" - group = "Organic" - -/datum/supply_packs/organic/goat - name = "Goat Crate" - cost = 25 - containertype = /obj/structure/largecrate/goat - containername = "goat crate" - group = "Organic" - -/datum/supply_packs/organic/chicken - name = "Chicken Crate" - cost = 20 - containertype = /obj/structure/largecrate/chick - containername = "chicken crate" - group = "Organic" - -/datum/supply_packs/organic/corgi - name = "Corgi Crate" - cost = 50 - containertype = /obj/structure/largecrate/lisa - containername = "corgi crate" - group = "Organic" - -/datum/supply_packs/organic/cat - name = "Cat crate" - cost = 50 //Cats are worth as much as corgis. - containertype = /obj/structure/largecrate/cat - containername = "cat crate" - group = "Organic" - -/datum/supply_packs/organic/fox - name = "Fox Crate" - cost = 55 //Foxes are cool. - containertype = /obj/structure/closet/critter/fox - containername = "fox crate" - group = "Organic" - -/datum/supply_packs/seeds - name = "Seeds Crate" - contains = list(/obj/item/seeds/chiliseed, - /obj/item/seeds/berryseed, - /obj/item/seeds/cornseed, - /obj/item/seeds/eggplantseed, - /obj/item/seeds/tomatoseed, - /obj/item/seeds/soyaseed, - /obj/item/seeds/wheatseed, - /obj/item/seeds/carrotseed, - /obj/item/seeds/sunflowerseed, - /obj/item/seeds/chantermycelium, - /obj/item/seeds/potatoseed, - /obj/item/seeds/sugarcaneseed) - cost = 10 - containertype = /obj/structure/closet/crate/hydroponics - containername = "Seeds crate" - access = access_hydroponics - group = "Hydroponics" - -/datum/supply_packs/weedcontrol - name = "Weed Control Crate" - contains = list(/obj/item/weapon/scythe, - /obj/item/clothing/mask/gas, - /obj/item/weapon/grenade/chem_grenade/antiweed, - /obj/item/weapon/grenade/chem_grenade/antiweed) - cost = 20 - containertype = /obj/structure/closet/crate/secure/hydrosec - containername = "Weed control crate" - access = access_hydroponics - group = "Hydroponics" - -/datum/supply_packs/exoticseeds - name = "Exotic Seeds Crate" - contains = list(/obj/item/seeds/nettleseed, - /obj/item/seeds/replicapod, - /obj/item/seeds/replicapod, - /obj/item/seeds/replicapod, - /obj/item/seeds/plumpmycelium, - /obj/item/seeds/libertymycelium, - /obj/item/seeds/amanitamycelium, - /obj/item/seeds/reishimycelium, - /obj/item/seeds/bananaseed, - /obj/item/seeds/eggyseed, - /obj/item/seeds/bloodtomatoseed) - cost = 15 - containertype = /obj/structure/closet/crate/hydroponics - containername = "Exotic Seeds crate" - access = access_hydroponics - group = "Hydroponics" - -/datum/supply_packs/medical - name = "Medical crate" - contains = list(/obj/item/weapon/storage/firstaid/regular, - /obj/item/weapon/storage/firstaid/fire, - /obj/item/weapon/storage/firstaid/toxin, - /obj/item/weapon/storage/firstaid/o2, - /obj/item/weapon/storage/firstaid/adv, - /obj/item/weapon/reagent_containers/glass/bottle/antitoxin, - /obj/item/weapon/reagent_containers/glass/bottle/inaprovaline, - /obj/item/weapon/reagent_containers/glass/bottle/stoxin, - /obj/item/weapon/storage/box/syringes, - /obj/item/weapon/storage/box/autoinjectors) - cost = 10 - containertype = /obj/structure/closet/crate/medical - containername = "Medical crate" - group = "Medical / Science" - -/datum/supply_packs/virus - name = "Virus crate" -/* contains = list(/obj/item/weapon/reagent_containers/glass/bottle/flu_virion, - /obj/item/weapon/reagent_containers/glass/bottle/cold, - /obj/item/weapon/reagent_containers/glass/bottle/epiglottis_virion, - /obj/item/weapon/reagent_containers/glass/bottle/liver_enhance_virion, - /obj/item/weapon/reagent_containers/glass/bottle/fake_gbs, - /obj/item/weapon/reagent_containers/glass/bottle/magnitis, - /obj/item/weapon/reagent_containers/glass/bottle/pierrot_throat, - /obj/item/weapon/reagent_containers/glass/bottle/brainrot, - /obj/item/weapon/reagent_containers/glass/bottle/hullucigen_virion, - /obj/item/weapon/storage/box/syringes, - /obj/item/weapon/storage/box/beakers, - /obj/item/weapon/reagent_containers/glass/bottle/mutagen)*/ - contains = list(/obj/item/weapon/virusdish/random, - /obj/item/weapon/virusdish/random, - /obj/item/weapon/virusdish/random, - /obj/item/weapon/virusdish/random) - cost = 25 - containertype = "/obj/structure/closet/crate/secure" - containername = "Virus crate" - access = access_cmo - group = "Medical / Science" - -/datum/supply_packs/metal50 - name = "50 Metal Sheets" - contains = list(/obj/item/stack/sheet/metal) - amount = 50 - cost = 10 - containertype = /obj/structure/closet/crate - containername = "Metal sheets crate" - group = "Engineering" - -/datum/supply_packs/glass50 - name = "50 Glass Sheets" - contains = list(/obj/item/stack/sheet/glass) - amount = 50 - cost = 10 - containertype = /obj/structure/closet/crate - containername = "Glass sheets crate" - group = "Engineering" - -/datum/supply_packs/electrical - name = "Electrical maintenance crate" - contains = list(/obj/item/weapon/storage/toolbox/electrical, - /obj/item/weapon/storage/toolbox/electrical, - /obj/item/clothing/gloves/yellow, - /obj/item/clothing/gloves/yellow, - /obj/item/weapon/stock_parts/cell, - /obj/item/weapon/stock_parts/cell, - /obj/item/weapon/stock_parts/cell/high, - /obj/item/weapon/stock_parts/cell/high) - cost = 15 - containertype = /obj/structure/closet/crate - containername = "Electrical maintenance crate" - group = "Engineering" - -/datum/supply_packs/mechanical - name = "Mechanical maintenance crate" - contains = list(/obj/item/weapon/storage/belt/utility/full, - /obj/item/weapon/storage/belt/utility/full, - /obj/item/weapon/storage/belt/utility/full, - /obj/item/clothing/suit/storage/hazardvest, - /obj/item/clothing/suit/storage/hazardvest, - /obj/item/clothing/suit/storage/hazardvest, - /obj/item/clothing/head/welding, - /obj/item/clothing/head/welding, - /obj/item/clothing/head/hardhat) - cost = 10 - containertype = /obj/structure/closet/crate - containername = "Mechanical maintenance crate" - group = "Engineering" - -/datum/supply_packs/watertank - name = "Water tank crate" - contains = list(/obj/structure/reagent_dispensers/watertank) - cost = 8 - containertype = /obj/structure/largecrate - containername = "water tank crate" - group = "Hydroponics" - -/datum/supply_packs/fueltank - name = "Fuel tank crate" - contains = list(/obj/structure/reagent_dispensers/fueltank) - cost = 8 - containertype = /obj/structure/largecrate - containername = "fuel tank crate" - group = "Engineering" - -/datum/supply_packs/coolanttank - name = "Coolant tank crate" - contains = list(/obj/structure/reagent_dispensers/coolanttank) - cost = 16 - containertype = /obj/structure/largecrate - containername = "coolant tank crate" - group = "Medical / Science" - - -/datum/supply_packs/solar - name = "Solar Pack crate" - contains = list(/obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, - /obj/item/solar_assembly, // 21 Solar Assemblies. 1 Extra for the controller - /obj/item/weapon/circuitboard/solar_control, - /obj/item/weapon/tracker_electronics, - /obj/item/weapon/paper/solar) - cost = 20 - containertype = /obj/structure/closet/crate - containername = "solar pack crate" - group = "Engineering" - -/datum/supply_packs/engine - name = "Emitter crate" - contains = list(/obj/machinery/power/emitter, - /obj/machinery/power/emitter) - cost = 10 - containertype = /obj/structure/closet/crate/secure - containername = "Emitter crate" - access = access_ce - group = "Engineering" - -/datum/supply_packs/engine/field_gen - name = "Field Generator crate" - contains = list(/obj/machinery/field_generator, - /obj/machinery/field_generator) - containertype = /obj/structure/closet/crate/secure - containername = "Field Generator crate" - access = access_ce - group = "Engineering" - -/datum/supply_packs/engine/sing_gen - name = "Singularity Generator crate" - contains = list(/obj/machinery/the_singularitygen) - containertype = /obj/structure/closet/crate/secure - containername = "Singularity Generator crate" - access = access_ce - group = "Engineering" - -/datum/supply_packs/engine/collector - name = "Collector crate" - contains = list(/obj/machinery/power/rad_collector, - /obj/machinery/power/rad_collector, - /obj/machinery/power/rad_collector) - containername = "Collector crate" - group = "Engineering" - -/datum/supply_packs/engine/PA - name = "Particle Accelerator crate" - cost = 40 - contains = list(/obj/structure/particle_accelerator/fuel_chamber, - /obj/machinery/particle_accelerator/control_box, - /obj/structure/particle_accelerator/particle_emitter/center, - /obj/structure/particle_accelerator/particle_emitter/left, - /obj/structure/particle_accelerator/particle_emitter/right, - /obj/structure/particle_accelerator/power_box, - /obj/structure/particle_accelerator/end_cap) - containertype = /obj/structure/closet/crate/secure - containername = "Particle Accelerator crate" - access = access_ce - group = "Engineering" - -/datum/supply_packs/mecha_ripley - name = "Circuit Crate (\"Ripley\" APLU)" - contains = list(/obj/item/weapon/book/manual/ripley_build_and_repair, - /obj/item/weapon/circuitboard/mecha/ripley/main, //TEMPORARY due to lack of circuitboard printer - /obj/item/weapon/circuitboard/mecha/ripley/peripherals) //TEMPORARY due to lack of circuitboard printer - cost = 30 - containertype = /obj/structure/closet/crate/secure - containername = "APLU \"Ripley\" Circuit Crate" - access = access_robotics - group = "Engineering" - -/datum/supply_packs/mecha_odysseus - name = "Circuit Crate (\"Odysseus\")" - contains = list(/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, //TEMPORARY due to lack of circuitboard printer - /obj/item/weapon/circuitboard/mecha/odysseus/main) //TEMPORARY due to lack of circuitboard printer - cost = 25 - containertype = /obj/structure/closet/crate/secure - containername = "\"Odysseus\" Circuit Crate" - access = access_robotics - group = "Engineering" - - -/datum/supply_packs/robotics - name = "Robotics Assembly Crate" - contains = list(/obj/item/device/assembly/prox_sensor, - /obj/item/device/assembly/prox_sensor, - /obj/item/device/assembly/prox_sensor, - /obj/item/weapon/storage/toolbox/electrical, - /obj/item/device/flash, - /obj/item/device/flash, - /obj/item/device/flash, - /obj/item/device/flash, - /obj/item/weapon/stock_parts/cell/high, - /obj/item/weapon/stock_parts/cell/high) - cost = 10 - containertype = /obj/structure/closet/crate/secure/gear - containername = "Robotics Assembly" - access = access_robotics - group = "Engineering" - -/datum/supply_packs/plasma - name = "Plasma assembly crate" - contains = list(/obj/item/weapon/tank/plasma, - /obj/item/weapon/tank/plasma, - /obj/item/weapon/tank/plasma, - /obj/item/device/assembly/igniter, - /obj/item/device/assembly/igniter, - /obj/item/device/assembly/igniter, - /obj/item/device/assembly/prox_sensor, - /obj/item/device/assembly/prox_sensor, - /obj/item/device/assembly/prox_sensor, - /obj/item/device/transfer_valve, - /obj/item/device/transfer_valve, - /obj/item/device/transfer_valve, - /obj/item/device/assembly/timer, - /obj/item/device/assembly/timer, - /obj/item/device/assembly/timer) - cost = 10 - containertype = /obj/structure/closet/crate/secure/plasma - containername = "Plasma assembly crate" - access = access_tox_storage - group = "Medical / Science" - -/datum/supply_packs/weapons - name = "Weapons crate" - contains = list(/obj/item/weapon/melee/baton/loaded, - /obj/item/weapon/melee/baton/loaded, - /obj/item/weapon/gun/energy/laser, - /obj/item/weapon/gun/energy/laser, - /obj/item/weapon/gun/energy/advtaser, - /obj/item/weapon/gun/energy/advtaser, - /obj/item/weapon/storage/box/flashbangs, - /obj/item/weapon/storage/box/flashbangs) - cost = 30 - containertype = /obj/structure/closet/crate/secure/weapon - containername = "Weapons crate" - access = access_security - group = "Security" - -/datum/supply_packs/disabler - name = "Disabler Crate" - contains = list(/obj/item/weapon/gun/energy/disabler, - /obj/item/weapon/gun/energy/disabler, - /obj/item/weapon/gun/energy/disabler) - cost = 10 - containertype = /obj/structure/closet/crate/secure/weapon - containername = "disabler crate" - access = access_security - group = "Security" - -/datum/supply_packs/eweapons - name = "Experimental weapons crate" - contains = list(/obj/item/weapon/flamethrower/full, - /obj/item/weapon/tank/plasma, - /obj/item/weapon/tank/plasma, - /obj/item/weapon/tank/plasma, - /obj/item/weapon/grenade/chem_grenade/incendiary, - /obj/item/weapon/grenade/chem_grenade/incendiary, - /obj/item/weapon/grenade/chem_grenade/incendiary) - cost = 25 - containertype = /obj/structure/closet/crate/secure/weapon - containername = "Experimental weapons crate" - access = access_heads - group = "Security" - -/datum/supply_packs/armor - name = "Armor crate" - contains = list(/obj/item/clothing/head/helmet, - /obj/item/clothing/head/helmet, - /obj/item/clothing/suit/armor/vest, - /obj/item/clothing/suit/armor/vest) - cost = 15 - containertype = /obj/structure/closet/crate/secure - containername = "Armor crate" - access = access_security - group = "Security" - -/datum/supply_packs/riot - name = "Riot gear crate" - contains = list(/obj/item/weapon/melee/baton/loaded, - /obj/item/weapon/melee/baton/loaded, - /obj/item/weapon/melee/baton/loaded, - /obj/item/weapon/shield/riot, - /obj/item/weapon/shield/riot, - /obj/item/weapon/shield/riot, - /obj/item/weapon/storage/box/flashbangs, - /obj/item/weapon/storage/box/flashbangs, - /obj/item/weapon/storage/box/flashbangs, - /obj/item/weapon/handcuffs, - /obj/item/weapon/handcuffs, - /obj/item/weapon/handcuffs, - /obj/item/clothing/head/helmet/riot, - /obj/item/clothing/suit/armor/riot, - /obj/item/clothing/head/helmet/riot, - /obj/item/clothing/suit/armor/riot, - /obj/item/clothing/head/helmet/riot, - /obj/item/clothing/suit/armor/riot) - cost = 60 - containertype = /obj/structure/closet/crate/secure - containername = "Riot gear crate" - access = access_armory - group = "Security" - -/datum/supply_packs/loyalty - name = "Loyalty implant crate" - contains = list (/obj/item/weapon/storage/lockbox/loyalty) - cost = 60 - containertype = /obj/structure/closet/crate/secure - containername = "Loyalty implant crate" - access = access_armory - group = "Security" - -/datum/supply_packs/ballistic - name = "Ballistic gear crate" - contains = list(/obj/item/clothing/suit/armor/bulletproof, - /obj/item/clothing/suit/armor/bulletproof, - /obj/item/weapon/storage/belt/bandolier, - /obj/item/weapon/storage/belt/bandolier, - /obj/item/weapon/gun/projectile/shotgun/combat, - /obj/item/weapon/gun/projectile/shotgun/combat) - cost = 50 - containertype = /obj/structure/closet/crate/secure - containername = "Ballistic gear crate" - access = access_armory - group = "Security" - -/datum/supply_packs/shotgunammo - name = "Shotgun shells" - contains = list(/obj/item/ammo_casing/shotgun, - /obj/item/ammo_casing/shotgun, - /obj/item/ammo_casing/shotgun, - /obj/item/ammo_casing/shotgun, - /obj/item/ammo_casing/shotgun, - /obj/item/ammo_casing/shotgun, - /obj/item/ammo_casing/shotgun, - /obj/item/ammo_casing/shotgun, - /obj/item/ammo_casing/shotgun, - /obj/item/ammo_casing/shotgun) - cost = 20 - containertype = /obj/structure/closet/crate/secure - containername = "Shotgun shells" - access = access_armory - group = "Security" - -/datum/supply_packs/expenergy - name = "Experimental energy gear crate" - contains = list(/obj/item/clothing/suit/armor/laserproof, - /obj/item/clothing/suit/armor/laserproof, - /obj/item/weapon/gun/energy/gun, - /obj/item/weapon/gun/energy/gun) - cost = 50 - containertype = /obj/structure/closet/crate/secure - containername = "Experimental energy gear crate" - access = access_armory - group = "Security" - -/datum/supply_packs/exparmor - name = "Experimental armor crate" - contains = list(/obj/item/clothing/suit/armor/laserproof, - /obj/item/clothing/suit/armor/bulletproof, - /obj/item/clothing/head/helmet/riot, - /obj/item/clothing/suit/armor/riot) - cost = 35 - containertype = /obj/structure/closet/crate/secure - containername = "Experimental armor crate" - access = access_armory - group = "Security" - -/datum/supply_packs/securitybarriers - name = "Security Barriers" - contains = list(/obj/machinery/deployable/barrier, - /obj/machinery/deployable/barrier, - /obj/machinery/deployable/barrier, - /obj/machinery/deployable/barrier) - cost = 20 - containertype = /obj/structure/closet/crate/secure/gear - containername = "Security Barriers crate" - group = "Security" - -/datum/supply_packs/securitybarriers - name = "Shield Generators" - contains = list(/obj/machinery/shieldwallgen, - /obj/machinery/shieldwallgen, - /obj/machinery/shieldwallgen, - /obj/machinery/shieldwallgen) - cost = 20 - containertype = /obj/structure/closet/crate/secure - containername = "Shield Generators crate" - access = access_teleporter - group = "Security" - -/datum/supply_packs/randomised - var/num_contained = 3 //number of items picked to be contained in a randomised crate - contains = list(/obj/item/clothing/head/collectable/chef, - /obj/item/clothing/head/collectable/paper, - /obj/item/clothing/head/collectable/tophat, - /obj/item/clothing/head/collectable/captain, - /obj/item/clothing/head/collectable/beret, - /obj/item/clothing/head/collectable/welding, - /obj/item/clothing/head/collectable/flatcap, - /obj/item/clothing/head/collectable/pirate, - /obj/item/clothing/head/collectable/kitty, - /obj/item/clothing/head/collectable/rabbitears, - /obj/item/clothing/head/collectable/wizard, - /obj/item/clothing/head/collectable/hardhat, - /obj/item/clothing/head/collectable/HoS, - /obj/item/clothing/head/collectable/thunderdome, - /obj/item/clothing/head/collectable/swat, - /obj/item/clothing/head/collectable/slime, - /obj/item/clothing/head/collectable/police, - /obj/item/clothing/head/collectable/slime, - /obj/item/clothing/head/collectable/xenom, - /obj/item/clothing/head/collectable/petehat) - name = "Collectable hat crate!" - cost = 200 - containertype = /obj/structure/closet/crate - containername = "Collectable hats crate! Brought to you by Bass.inc!" - group = "Operations" - -/datum/supply_packs/randomised/New() - manifest += "Contains any [num_contained] of:" - ..() - -/datum/supply_packs/artscrafts - name = "Arts and Crafts supplies" - contains = list(/obj/item/weapon/storage/fancy/crayons, - /obj/item/device/camera, - /obj/item/device/camera_film, - /obj/item/device/camera_film, - /obj/item/weapon/storage/photo_album, - /obj/item/weapon/packageWrap, - /obj/item/weapon/reagent_containers/glass/paint/red, - /obj/item/weapon/reagent_containers/glass/paint/green, - /obj/item/weapon/reagent_containers/glass/paint/blue, - /obj/item/weapon/reagent_containers/glass/paint/yellow, - /obj/item/weapon/reagent_containers/glass/paint/violet, - /obj/item/weapon/reagent_containers/glass/paint/black, - /obj/item/weapon/reagent_containers/glass/paint/white, - /obj/item/weapon/reagent_containers/glass/paint/remover, - /obj/item/weapon/contraband/poster, - /obj/item/weapon/wrapping_paper, - /obj/item/weapon/wrapping_paper, - /obj/item/weapon/wrapping_paper) - cost = 10 - containertype = "/obj/structure/closet/crate" - containername = "Arts and Crafts crate" - group = "Operations" - - -/datum/supply_packs/randomised/contraband - num_contained = 6 - contains = list(/obj/item/weapon/storage/pill_bottle/zoom, - /obj/item/weapon/storage/pill_bottle/happy, - /obj/item/weapon/storage/pill_bottle/random_drug_bottle, - /obj/item/weapon/storage/fancy/cigarettes/dromedaryco, - /obj/item/weapon/storage/fancy/cigarettes/cigpack_shadyjims, - /obj/item/weapon/grenade/smokebomb, - /obj/item/clothing/mask/cigarette/cigar/cohiba, - /obj/item/weapon/reagent_containers/food/drinks/cans/ale, - /obj/item/weapon/reagent_containers/food/drinks/bottle/patron, - /obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe, - /obj/item/weapon/lipstick/random) - - name = "Contraband crate" - cost = 30 - containertype = /obj/structure/closet/crate - containername = "Unlabeled crate" - contraband = 1 - group = "Operations" - -/datum/supply_packs/boxes - name = "Empty Box supplies" - contains = list(/obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box, - /obj/item/weapon/storage/box) - cost = 10 - containertype = "/obj/structure/closet/crate" - containername = "Empty Box crate" - group = "Operations" - -/datum/supply_packs/surgery - name = "Surgery crate" - contains = list(/obj/item/weapon/cautery, - /obj/item/weapon/surgicaldrill, - /obj/item/clothing/mask/breath/medical, - /obj/item/weapon/tank/anesthetic, - /obj/item/weapon/FixOVein, - /obj/item/weapon/hemostat, - /obj/item/weapon/scalpel, - /obj/item/weapon/bonegel, - /obj/item/weapon/retractor, - /obj/item/weapon/bonesetter, - /obj/item/weapon/circular_saw) - cost = 25 - containertype = "/obj/structure/closet/crate/secure" - containername = "Surgery crate" - access = access_medical - group = "Medical / Science" - -/datum/supply_packs/sterile - name = "Sterile equipment crate" - contains = list(/obj/item/clothing/under/rank/medical/green, - /obj/item/clothing/under/rank/medical/green, - /obj/item/weapon/storage/box/masks, - /obj/item/weapon/storage/box/gloves) - cost = 15 - containertype = "/obj/structure/closet/crate" - containername = "Sterile equipment crate" - group = "Medical / Science" - -/datum/supply_packs/randomised/pizza - num_contained = 5 - contains = list(/obj/item/pizzabox/margherita, - /obj/item/pizzabox/mushroom, - /obj/item/pizzabox/meat, - /obj/item/pizzabox/vegetable) - name = "Surprise pack of five dozen pizzas" - cost = 15 - containertype = /obj/structure/closet/crate/freezer - containername = "Pizza crate" - group = "Hospitality" - -/datum/supply_packs/formal_wear - contains = list(/obj/item/clothing/head/that, - /obj/item/clothing/suit/storage/lawyer/bluejacket, - /obj/item/clothing/suit/storage/lawyer/purpjacket, - /obj/item/clothing/under/suit_jacket, - /obj/item/clothing/under/suit_jacket/female, - /obj/item/clothing/under/suit_jacket/really_black, - /obj/item/clothing/under/suit_jacket/red, - /obj/item/clothing/shoes/black, - /obj/item/clothing/shoes/black, - /obj/item/clothing/suit/wcoat) - name = "Formalwear closet" - cost = 30 - containertype = /obj/structure/closet - containername = "Formalwear for the best occasions." - group = "Operations" -/* -/datum/supply_packs/rust_injector - contains = list(/obj/machinery/power/rust_fuel_injector) - name = "RUST fuel injector" - cost = 50 - containertype = /obj/structure/closet/crate/secure/large - containername = "RUST injector crate" - group = "Engineering" - access = access_engine - -/datum/supply_packs/rust_compressor - contains = list(/obj/item/weapon/module/rust_fuel_compressor) - name = "RUST fuel compressor circuitry" - cost = 60 - containertype = /obj/structure/closet/crate/secure - containername = "RUST fuel compressor circuitry" - group = "Engineering" - access = access_engine - -/datum/supply_packs/rust_assembly_port - contains = list(/obj/item/weapon/module/rust_fuel_port) - name = "RUST fuel assembly port circuitry" - cost = 40 - containertype = /obj/structure/closet/crate/secure - containername = "RUST fuel assembly port circuitry" - group = "Engineering" - access = access_engine - -/datum/supply_packs/rust_core - contains = list(/obj/machinery/power/rust_core) - name = "RUST Tokamak Core" - cost = 75 - containertype = /obj/structure/closet/crate/secure/large - containername = "RUST tokamak crate" - group = "Engineering" - access = access_engine -*/ -/datum/supply_packs/shield_gen - contains = list(/obj/item/weapon/circuitboard/shield_gen) - name = "Experimental shield generator circuitry" - cost = 50 - containertype = /obj/structure/closet/crate/secure - containername = "Experimental shield generator" - group = "Engineering" - access = access_ce - -/datum/supply_packs/shield_cap - contains = list(/obj/item/weapon/circuitboard/shield_cap) - name = "Experimental shield capacitor circuitry" - cost = 50 - containertype = /obj/structure/closet/crate/secure - containername = "Experimental shield capacitor" - group = "Engineering" - access = access_ce - -/datum/supply_packs/eftpos - contains = list(/obj/item/device/eftpos) - name = "EFTPOS scanner" - cost = 10 - containertype = /obj/structure/closet/crate - containername = "EFTPOS crate" - group = "Operations" - -/datum/supply_packs/teg - contains = list(/obj/machinery/power/generator) - name = "Mark I Thermoelectric Generator" - cost = 75 - containertype = /obj/structure/closet/crate/secure/large - containername = "Mk1 TEG crate" - group = "Engineering" - access = access_engine - -/datum/supply_packs/circulator - contains = list(/obj/machinery/atmospherics/binary/circulator) - name = "Binary atmospheric circulator" - cost = 60 - containertype = /obj/structure/closet/crate/secure/large - containername = "Atmospheric circulator crate" - group = "Engineering" - access = access_engine - -/datum/supply_packs/bee_keeper - name = "Beekeeping Crate" - contains = list(/obj/item/beezeez, - /obj/item/beezeez, - /obj/item/weapon/bee_net, - /obj/item/apiary, - /obj/item/queen_bee, - /obj/item/queen_bee, - /obj/item/queen_bee) - cost = 20 - containertype = /obj/structure/closet/crate/hydroponics - containername = "Beekeeping crate" - access = access_hydroponics - group = "Hydroponics" - -/datum/supply_packs/misc/lasertag - name = "Laser Tag Crate" - contains = list(/obj/item/weapon/gun/energy/laser/redtag, - /obj/item/weapon/gun/energy/laser/redtag, - /obj/item/weapon/gun/energy/laser/redtag, - /obj/item/weapon/gun/energy/laser/bluetag, - /obj/item/weapon/gun/energy/laser/bluetag, - /obj/item/weapon/gun/energy/laser/bluetag, - /obj/item/clothing/suit/redtag, - /obj/item/clothing/suit/redtag, - /obj/item/clothing/suit/redtag, - /obj/item/clothing/suit/bluetag, - /obj/item/clothing/suit/bluetag, - /obj/item/clothing/suit/bluetag, - /obj/item/clothing/head/helmet/redtaghelm, - /obj/item/clothing/head/helmet/bluetaghelm) - cost = 15 - containertype = /obj/structure/closet/crate - containername = "laser tag crate" - group = "Operations" - -/datum/supply_packs/vending - name = "Bartending Supply Crate" - contains = list(/obj/item/weapon/vending_refill/boozeomat, - /obj/item/weapon/vending_refill/boozeomat, - /obj/item/weapon/vending_refill/boozeomat, - /obj/item/weapon/vending_refill/coffee, - /obj/item/weapon/vending_refill/coffee, - /obj/item/weapon/vending_refill/coffee) - cost = 15 - containertype = /obj/structure/closet/crate - containername = "bartending supply crate" - group = "Operations" - -/datum/supply_packs/vending/snack - name = "Snack Supply Crate" - contains = list(/obj/item/weapon/vending_refill/snack, - /obj/item/weapon/vending_refill/snack, - /obj/item/weapon/vending_refill/snack) - cost = 15 - containertype = /obj/structure/closet/crate - containername = "snacks supply crate" - group = "Operations" - -/datum/supply_packs/vending/cola - name = "Softdrinks Supply Crate" - contains = list(/obj/item/weapon/vending_refill/cola, - /obj/item/weapon/vending_refill/cola, - /obj/item/weapon/vending_refill/cola) - cost = 15 - containertype = /obj/structure/closet/crate - containername = "softdrinks supply crate" - group = "Operations" - -/datum/supply_packs/vending/cigarette - name = "Cigarette Supply Crate" - contains = list(/obj/item/weapon/vending_refill/cigarette, - /obj/item/weapon/vending_refill/cigarette, - /obj/item/weapon/vending_refill/cigarette) - cost = 15 - containertype = /obj/structure/closet/crate - containername = "cigarette supply crate" - group = "Operations" - -/datum/supply_packs/autodrobe - name = "Autodrobe Supply crate" - contains = list(/obj/item/weapon/vending_refill/autodrobe, - /obj/item/weapon/vending_refill/autodrobe, - /obj/item/weapon/vending_refill/autodrobe) - cost = 15 - containertype = /obj/structure/closet/crate - containername = "autodrobe supply crate" - group = "Operations" - -/datum/supply_packs/clothingvendor - name = "Clothing Vendor Supply crate" - contains = list(/obj/item/weapon/vending_refill/hatdispenser, - /obj/item/weapon/vending_refill/hatdispenser, - /obj/item/weapon/vending_refill/hatdispenser, - /obj/item/weapon/vending_refill/suitdispenser, - /obj/item/weapon/vending_refill/suitdispenser, - /obj/item/weapon/vending_refill/suitdispenser, - /obj/item/weapon/vending_refill/shoedispenser, - /obj/item/weapon/vending_refill/shoedispenser, - /obj/item/weapon/vending_refill/shoedispenser) - cost = 30 - containertype = /obj/structure/closet/crate - containername = "clothing vendor supply crate" - group = "Operations" - -/datum/supply_packs/mafia - name = "Mafia Supply crate" - contains = list(/obj/item/clothing/suit/browntrenchcoat =1,/obj/item/clothing/suit/blacktrenchcoat =1,/obj/item/clothing/head/fedora/whitefedora =1, - /obj/item/clothing/head/fedora/brownfedora =1,/obj/item/clothing/head/fedora =1,/obj/item/clothing/under/flappers =1,/obj/item/clothing/under/mafia =1,/obj/item/clothing/under/mafia/vest =1,/obj/item/clothing/under/mafia/white =1, - /obj/item/clothing/under/mafia/sue =1,/obj/item/clothing/under/mafia/tan =1, /obj/item/toy/crossbow/tommygun =2) - cost = 15 - containertype = /obj/structure/closet/crate - containername = "mafia supply crate" - group = "Operations" - -/datum/supply_packs/fabric - name = "Fabric crate" - contains = list(/obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric, - /obj/item/weapon/ore/fabric) - cost = 30 - containertype = /obj/structure/closet/crate - containername = "Fabric crate" - group = "Operations" +//SUPPLY PACKS +//NOTE: only secure crate types use the access var (and are lockable) +//NOTE: hidden packs only show up when the computer has been hacked. +//ANOTHER NOTE: Contraband is obtainable through modified supplycomp circuitboards. +//BIG NOTE: Don't add living things to crates, that's bad, it will break the shuttle. +//NEW NOTE: Do NOT set the price of any crates below 7 points. Doing so allows infinite points. + +// Supply Groups +var/const/supply_emergency = 1 +var/const/supply_security = 2 +var/const/supply_engineer = 3 +var/const/supply_medical = 4 +var/const/supply_science = 5 +var/const/supply_organic = 6 +var/const/supply_materials = 7 +var/const/supply_misc = 8 + +var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engineer,supply_medical,supply_science,supply_organic,supply_materials,supply_misc) + +/proc/get_supply_group_name(var/cat) + switch(cat) + if(1) + return "Emergency" + if(2) + return "Security" + if(3) + return "Engineering" + if(4) + return "Medical" + if(5) + return "Science" + if(6) + return "Food & Livestock" + if(7) + return "Raw Materials" + if(8) + return "Miscellaneous" + + +/datum/supply_packs + var/name = null + var/list/contains = list() + var/manifest = "" + var/amount = null + var/cost = null + var/containertype = /obj/structure/closet/crate + var/containername = null + var/access = null + var/hidden = 0 + var/contraband = 0 + var/group = supply_misc + + +/datum/supply_packs/New() + manifest += "" + +////// Use the sections to keep things tidy please /Malkevin + +////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Emergency /////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +/datum/supply_packs/emergency // Section header - use these to set default supply group and crate type for sections + name = "HEADER" // Use "HEADER" to denote section headers, this is needed for the supply computers to filter them + containertype = /obj/structure/closet/crate/internals + group = supply_emergency + + +/datum/supply_packs/emergency/evac + name = "Emergency equipment" + contains = list(/obj/machinery/bot/floorbot, + /obj/machinery/bot/floorbot, + /obj/machinery/bot/medbot, + /obj/machinery/bot/medbot, + /obj/item/weapon/tank/air, + /obj/item/weapon/tank/air, + /obj/item/weapon/tank/air, + /obj/item/weapon/tank/air, + /obj/item/weapon/tank/air, + /obj/item/clothing/mask/gas, + /obj/item/clothing/mask/gas, + /obj/item/clothing/mask/gas, + /obj/item/clothing/mask/gas, + /obj/item/clothing/mask/gas) + cost = 35 + containertype = /obj/structure/closet/crate/internals + containername = "emergency crate" + group = supply_emergency + +/datum/supply_packs/emergency/internals + name = "Internals Crate" + contains = list(/obj/item/clothing/mask/gas, + /obj/item/clothing/mask/gas, + /obj/item/clothing/mask/gas, + /obj/item/weapon/tank/air, + /obj/item/weapon/tank/air, + /obj/item/weapon/tank/air) + cost = 10 + containername = "internals crate" + +/datum/supply_packs/emergency/firefighting + name = "Firefighting Crate" + contains = list(/obj/item/clothing/suit/fire/firefighter, + /obj/item/clothing/suit/fire/firefighter, + /obj/item/clothing/mask/gas, + /obj/item/clothing/mask/gas, + /obj/item/device/flashlight, + /obj/item/device/flashlight, + /obj/item/weapon/tank/oxygen/red, + /obj/item/weapon/tank/oxygen/red, + /obj/item/weapon/extinguisher, + /obj/item/weapon/extinguisher, + /obj/item/clothing/head/hardhat/red, + /obj/item/clothing/head/hardhat/red) + cost = 10 + containertype = /obj/structure/closet/crate + containername = "firefighting crate" + +/datum/supply_packs/emergency/atmostank + name = "Firefighting Watertank" + contains = list(/obj/item/weapon/watertank/atmos) + cost = 10 + containertype = /obj/structure/closet/crate/secure + containername = "firefighting watertank crate" + access = access_atmospherics + +/datum/supply_packs/emergency/weedcontrol + name = "Weed Control Crate" + contains = list(/obj/item/weapon/scythe, + /obj/item/clothing/mask/gas, + /obj/item/weapon/grenade/chem_grenade/antiweed, + /obj/item/weapon/grenade/chem_grenade/antiweed) + cost = 15 + containertype = /obj/structure/closet/crate/secure/hydrosec + containername = "weed control crate" + access = access_hydroponics + +/datum/supply_packs/emergency/specialops + name = "Special Ops supplies" + contains = list(/obj/item/weapon/storage/box/emps, + /obj/item/weapon/grenade/smokebomb, + /obj/item/weapon/grenade/smokebomb, + /obj/item/weapon/grenade/smokebomb, + /obj/item/weapon/pen/paralysis, + /obj/item/weapon/grenade/chem_grenade/incendiary) + cost = 20 + containertype = /obj/structure/closet/crate + containername = "special ops crate" + hidden = 1 + +/datum/supply_packs/emergency/syndicate + name = "ERROR_NULL_ENTRY" + contains = list(/obj/item/weapon/storage/box/syndicate) + cost = 140 + containertype = /obj/structure/closet/crate + containername = "crate" + hidden = 1 + +////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Security //////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +/datum/supply_packs/security + name = "HEADER" + containertype = /obj/structure/closet/crate/secure/gear + access = access_security + group = supply_security + + +/datum/supply_packs/security/supplies + name = "Security Supplies Crate" + contains = list(/obj/item/weapon/storage/box/flashbangs, + /obj/item/weapon/storage/box/teargas, + /obj/item/weapon/storage/box/flashes, + /obj/item/weapon/storage/box/handcuffs) + cost = 10 + containername = "security supply crate" + +////// Armor: Basic + +/datum/supply_packs/security/helmets + name = "Helmets Crate" + contains = list(/obj/item/clothing/head/helmet, + /obj/item/clothing/head/helmet, + /obj/item/clothing/head/helmet) + cost = 10 + containername = "helmet crate" + +/datum/supply_packs/security/armor + name = "Armor Crate" + contains = list(/obj/item/clothing/suit/armor/vest, + /obj/item/clothing/suit/armor/vest, + /obj/item/clothing/suit/armor/vest) + cost = 10 + containername = "armor crate" + +////// Weapons: Basic + +/datum/supply_packs/security/baton + name = "Stun Batons Crate" + contains = list(/obj/item/weapon/melee/baton/loaded, + /obj/item/weapon/melee/baton/loaded, + /obj/item/weapon/melee/baton/loaded) + cost = 10 + containername = "stun baton crate" + +/datum/supply_packs/security/laser + name = "Lasers Crate" + contains = list(/obj/item/weapon/gun/energy/laser, + /obj/item/weapon/gun/energy/laser, + /obj/item/weapon/gun/energy/laser) + cost = 15 + containername = "laser crate" + +/datum/supply_packs/security/taser + name = "Stun Guns Crate" + contains = list(/obj/item/weapon/gun/energy/advtaser, + /obj/item/weapon/gun/energy/advtaser, + /obj/item/weapon/gun/energy/advtaser) + cost = 15 + containername = "stun gun crate" + +/datum/supply_packs/security/disabler + name = "Disabler Crate" + contains = list(/obj/item/weapon/gun/energy/disabler, + /obj/item/weapon/gun/energy/disabler, + /obj/item/weapon/gun/energy/disabler) + cost = 10 + containername = "disabler crate" + +///// Armory stuff + +/datum/supply_packs/security/armory + name = "HEADER" + containertype = /obj/structure/closet/crate/secure/weapon + access = access_armory + +///// Armor: Specialist + +/datum/supply_packs/security/armory/riothelmets + name = "Riot Helmets Crate" + contains = list(/obj/item/clothing/head/helmet/riot, + /obj/item/clothing/head/helmet/riot, + /obj/item/clothing/head/helmet/riot) + cost = 15 + containername = "riot helmets crate" + +/datum/supply_packs/security/armory/riotarmor + name = "Riot Armor Crate" + contains = list(/obj/item/clothing/suit/armor/riot, + /obj/item/clothing/suit/armor/riot, + /obj/item/clothing/suit/armor/riot) + cost = 15 + containername = "riot armor crate" + +/datum/supply_packs/security/armory/riotshields + name = "Riot Shields Crate" + contains = list(/obj/item/weapon/shield/riot, + /obj/item/weapon/shield/riot, + /obj/item/weapon/shield/riot) + cost = 20 + containername = "riot shields crate" + +/datum/supply_packs/security/bullethelmets + name = "Bulletproof Helmets Crate" + contains = list(/obj/item/clothing/head/helmet/alt, + /obj/item/clothing/head/helmet/alt, + /obj/item/clothing/head/helmet/alt) + cost = 10 + containername = "bulletproof helmet crate" + +/datum/supply_packs/security/armory/bulletarmor + name = "Bulletproof Armor Crate" + contains = list(/obj/item/clothing/suit/armor/bulletproof, + /obj/item/clothing/suit/armor/bulletproof, + /obj/item/clothing/suit/armor/bulletproof) + cost = 15 + containername = "tactical armor crate" + +/datum/supply_packs/security/armory/laserarmor + name = "Ablative Armor Crate" + contains = list(/obj/item/clothing/suit/armor/laserproof, + /obj/item/clothing/suit/armor/laserproof) // Only two vests to keep costs down for balance + cost = 20 + containertype = /obj/structure/closet/crate/secure/plasma + containername = "ablative armor crate" + +/////// Weapons: Specialist + +/datum/supply_packs/security/armory/ballistic + name = "Combat Shotguns Crate" + contains = list(/obj/item/weapon/gun/projectile/shotgun/combat, + /obj/item/weapon/gun/projectile/shotgun/combat, + /obj/item/weapon/gun/projectile/shotgun/combat, + /obj/item/weapon/storage/belt/bandolier, + /obj/item/weapon/storage/belt/bandolier, + /obj/item/weapon/storage/belt/bandolier) + cost = 20 + containername = "combat shotgun crate" + +/datum/supply_packs/security/armory/expenergy + name = "Energy Guns Crate" + contains = list(/obj/item/weapon/gun/energy/gun, + /obj/item/weapon/gun/energy/gun) // Only two guns to keep costs down + cost = 25 + containertype = /obj/structure/closet/crate/secure/plasma + containername = "energy gun crate" + +/datum/supply_packs/security/armory/eweapons + name = "Incendiary Weapons Crate" + contains = list(/obj/item/weapon/flamethrower/full, + /obj/item/weapon/tank/plasma, + /obj/item/weapon/tank/plasma, + /obj/item/weapon/tank/plasma, + /obj/item/weapon/grenade/chem_grenade/incendiary, + /obj/item/weapon/grenade/chem_grenade/incendiary, + /obj/item/weapon/grenade/chem_grenade/incendiary) + cost = 15 // its a fecking flamethrower and some plasma, why the shit did this cost so much before!? + containertype = /obj/structure/closet/crate/secure/plasma + containername = "incendiary weapons crate" + access = access_heads + +/////// Implants & etc + +/datum/supply_packs/security/armory/loyalty + name = "Loyalty Implants Crate" + contains = list (/obj/item/weapon/storage/lockbox/loyalty) + cost = 40 + containername = "loyalty implant crate" + +/datum/supply_packs/security/armory/trackingimp + name = "Tracking Implants Crate" + contains = list (/obj/item/weapon/storage/box/trackimp) + cost = 20 + containername = "tracking implant crate" + +/datum/supply_packs/security/armory/chemimp + name = "Chemical Implants Crate" + contains = list (/obj/item/weapon/storage/box/chemimp) + cost = 20 + containername = "chemical implant crate" + +/datum/supply_packs/security/armory/exileimp + name = "Exile Implants Crate" + contains = list (/obj/item/weapon/storage/box/exileimp) + cost = 30 + containername = "exile implant crate" + +/datum/supply_packs/security/securitybarriers + name = "Security Barriers Crate" + contains = list(/obj/machinery/deployable/barrier, + /obj/machinery/deployable/barrier, + /obj/machinery/deployable/barrier, + /obj/machinery/deployable/barrier) + cost = 20 + containername = "security barriers crate" + +/datum/supply_packs/security/securityclothes + name = "Security Clothing Crate" + contains = list(/obj/item/clothing/under/rank/security/corp, + /obj/item/clothing/under/rank/security/corp, + /obj/item/clothing/head/soft/sec/corp, + /obj/item/clothing/head/soft/sec/corp, + /obj/item/clothing/under/rank/warden/corp, + /obj/item/clothing/head/beret/sec/warden, + /obj/item/clothing/under/rank/head_of_security/corp, + /obj/item/clothing/head/HoS/beret) + cost = 30 + containername = "security clothing crate" + + +////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Engineering ///////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +/datum/supply_packs/engineering + name = "HEADER" + group = supply_engineer + + +/datum/supply_packs/engineering/fueltank + name = "Fuel Tank Crate" + contains = list(/obj/structure/reagent_dispensers/fueltank) + cost = 8 + containertype = /obj/structure/largecrate + containername = "fuel tank crate" + +/datum/supply_packs/engineering/tools //the most robust crate + name = "Toolbox Crate" + contains = list(/obj/item/weapon/storage/toolbox/electrical, + /obj/item/weapon/storage/toolbox/electrical, + /obj/item/weapon/storage/toolbox/mechanical, + /obj/item/weapon/storage/toolbox/electrical, + /obj/item/weapon/storage/toolbox/mechanical, + /obj/item/weapon/storage/toolbox/mechanical) + cost = 10 + containername = "electrical maintenance crate" + +/datum/supply_packs/engineering/powergamermitts + name = "Insulated Gloves Crate" + contains = list(/obj/item/clothing/gloves/yellow, + /obj/item/clothing/gloves/yellow, + /obj/item/clothing/gloves/yellow) + cost = 20 //Made of pure-grade bullshittinium + containername = "insulated gloves crate" + +/datum/supply_packs/engineering/power + name = "Powercell Crate" + contains = list(/obj/item/weapon/stock_parts/cell/high, //Changed to an extra high powercell because normal cells are useless + /obj/item/weapon/stock_parts/cell/high, + /obj/item/weapon/stock_parts/cell/high) + cost = 10 + containername = "electrical maintenance crate" + +/datum/supply_packs/engineering/engiequipment + name = "Engineering Gear Crate" + contains = list(/obj/item/weapon/storage/belt/utility, + /obj/item/weapon/storage/belt/utility, + /obj/item/weapon/storage/belt/utility, + /obj/item/clothing/suit/storage/hazardvest, + /obj/item/clothing/suit/storage/hazardvest, + /obj/item/clothing/suit/storage/hazardvest, + /obj/item/clothing/head/welding, + /obj/item/clothing/head/welding, + /obj/item/clothing/head/welding, + /obj/item/clothing/head/hardhat, + /obj/item/clothing/head/hardhat, + /obj/item/clothing/head/hardhat) + cost = 10 + containername = "engineering gear crate" + +/datum/supply_packs/engineering/solar + name = "Solar Pack Crate" + contains = list(/obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, + /obj/item/solar_assembly, // 21 Solar Assemblies. 1 Extra for the controller + /obj/item/weapon/circuitboard/solar_control, + /obj/item/weapon/tracker_electronics, + /obj/item/weapon/paper/solar) + cost = 20 + containername = "solar pack crate" + +/datum/supply_packs/engineering/engine + name = "Emitter Crate" + contains = list(/obj/machinery/power/emitter, + /obj/machinery/power/emitter) + cost = 10 + containertype = /obj/structure/closet/crate/secure + containername = "emitter crate" + access = access_ce + +/datum/supply_packs/engineering/engine/field_gen + name = "Field Generator Crate" + contains = list(/obj/machinery/field_generator, + /obj/machinery/field_generator) + cost = 10 + containername = "field generator crate" + +/datum/supply_packs/engineering/engine/sing_gen + name = "Singularity Generator Crate" + contains = list(/obj/machinery/the_singularitygen) + cost = 10 + containername = "singularity generator crate" + +/datum/supply_packs/engineering/engine/collector + name = "Collector Crate" + contains = list(/obj/machinery/power/rad_collector, + /obj/machinery/power/rad_collector, + /obj/machinery/power/rad_collector) + cost = 10 + containername = "collector crate" + +/datum/supply_packs/engineering/engine/PA + name = "Particle Accelerator Crate" + contains = list(/obj/structure/particle_accelerator/fuel_chamber, + /obj/machinery/particle_accelerator/control_box, + /obj/structure/particle_accelerator/particle_emitter/center, + /obj/structure/particle_accelerator/particle_emitter/left, + /obj/structure/particle_accelerator/particle_emitter/right, + /obj/structure/particle_accelerator/power_box, + /obj/structure/particle_accelerator/end_cap) + cost = 25 + containername = "particle accelerator crate" + +/datum/supply_packs/engineering/engine/spacesuit + name = "Space Suit Crate" + contains = list(/obj/item/clothing/suit/space, + /obj/item/clothing/head/helmet/space, + /obj/item/clothing/mask/breath,) + cost = 80 + containertype = /obj/structure/closet/crate/secure + containername = "space suit crate" + access = access_eva + +/datum/supply_packs/engineering/inflatable + name = "Inflatable barriers" + contains = list(/obj/item/weapon/storage/briefcase/inflatable, + /obj/item/weapon/storage/briefcase/inflatable, + /obj/item/weapon/storage/briefcase/inflatable) + cost = 20 + containername = "Inflatable Barrier Crate" + +////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Medical ///////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +/datum/supply_packs/medical + name = "HEADER" + containertype = /obj/structure/closet/crate/medical + group = supply_medical + + +/datum/supply_packs/medical/supplies + name = "Medical Supplies Crate" + contains = list(/obj/item/weapon/reagent_containers/glass/bottle/antitoxin, + /obj/item/weapon/reagent_containers/glass/bottle/antitoxin, + /obj/item/weapon/reagent_containers/glass/bottle/inaprovaline, + /obj/item/weapon/reagent_containers/glass/bottle/inaprovaline, + /obj/item/weapon/reagent_containers/glass/bottle/stoxin, + /obj/item/weapon/reagent_containers/glass/bottle/stoxin, + /obj/item/weapon/reagent_containers/glass/bottle/toxin, + /obj/item/weapon/reagent_containers/glass/bottle/toxin, + /obj/item/weapon/reagent_containers/glass/beaker/large, + /obj/item/weapon/reagent_containers/glass/beaker/large, + /obj/item/stack/medical/bruise_pack, + /obj/item/weapon/storage/box/beakers, + /obj/item/weapon/storage/box/syringes, + /obj/item/weapon/storage/box/bodybags) + cost = 20 + containertype = /obj/structure/closet/crate/medical + containername = "medical supplies crate" + +/datum/supply_packs/medical/firstaid + name = "First Aid Kits Crate" + contains = list(/obj/item/weapon/storage/firstaid/regular, + /obj/item/weapon/storage/firstaid/regular, + /obj/item/weapon/storage/firstaid/regular, + /obj/item/weapon/storage/firstaid/regular) + cost = 10 + containername = "first aid kits crate" + +/datum/supply_packs/medical/firstaidadv + name = "Advaced First Aid Kits Crate" + contains = list(/obj/item/weapon/storage/firstaid/adv, + /obj/item/weapon/storage/firstaid/adv, + /obj/item/weapon/storage/firstaid/adv, + /obj/item/weapon/storage/firstaid/adv) + cost = 10 + containername = "advaced first aid kits crate" + +/datum/supply_packs/medical/firstaidburns + name = "Burns Treatment Kits Crate" + contains = list(/obj/item/weapon/storage/firstaid/fire, + /obj/item/weapon/storage/firstaid/fire, + /obj/item/weapon/storage/firstaid/fire) + cost = 10 + containername = "fire first aid kits crate" + +/datum/supply_packs/medical/firstaidtoxins + name = "Toxin Treatment Kits Crate" + contains = list(/obj/item/weapon/storage/firstaid/toxin, + /obj/item/weapon/storage/firstaid/toxin, + /obj/item/weapon/storage/firstaid/toxin) + cost = 10 + containername = "toxin first aid kits crate" + +/datum/supply_packs/medical/firstaidoxygen + name = "Oxygen Deprivation Kits Crate" + contains = list(/obj/item/weapon/storage/firstaid/o2, + /obj/item/weapon/storage/firstaid/o2, + /obj/item/weapon/storage/firstaid/o2) + cost = 10 + containername = "oxygen deprivation kits crate" + + +/datum/supply_packs/medical/virus + name = "Virus Crate" + contains = list(/obj/item/weapon/virusdish/random, + /obj/item/weapon/virusdish/random, + /obj/item/weapon/virusdish/random, + /obj/item/weapon/virusdish/random) + cost = 25 + containertype = /obj/structure/closet/crate/secure/plasma + containername = "virus crate" + access = access_cmo + + +/datum/supply_packs/medical/bloodpacks + name = "Blood Pack Variety Crate" + contains = list(/obj/item/weapon/reagent_containers/blood/empty, + /obj/item/weapon/reagent_containers/blood/empty, + /obj/item/weapon/reagent_containers/blood/APlus, + /obj/item/weapon/reagent_containers/blood/AMinus, + /obj/item/weapon/reagent_containers/blood/BPlus, + /obj/item/weapon/reagent_containers/blood/BMinus, + /obj/item/weapon/reagent_containers/blood/OPlus, + /obj/item/weapon/reagent_containers/blood/OMinus) + cost = 35 + containertype = /obj/structure/closet/crate/freezer + containername = "blood pack crate" + +/datum/supply_packs/medical/iv_drip + name = "IV Drip Crate" + contains = list(/obj/machinery/iv_drip) + cost = 30 + containertype = /obj/structure/closet/crate/secure + containername = "iv drip crate" + access = access_cmo + +/datum/supply_packs/medical/surgery + name = "Surgery crate" + contains = list(/obj/item/weapon/cautery, + /obj/item/weapon/surgicaldrill, + /obj/item/clothing/mask/breath/medical, + /obj/item/weapon/tank/anesthetic, + /obj/item/weapon/FixOVein, + /obj/item/weapon/hemostat, + /obj/item/weapon/scalpel, + /obj/item/weapon/bonegel, + /obj/item/weapon/retractor, + /obj/item/weapon/bonesetter, + /obj/item/weapon/circular_saw) + cost = 25 + containertype = /obj/structure/closet/crate/secure + containername = "Surgery crate" + access = access_medical + + +////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Science ///////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +/datum/supply_packs/science + name = "HEADER" + group = supply_science + + +/datum/supply_packs/science/robotics + name = "Robotics Assembly Crate" + contains = list(/obj/item/device/assembly/prox_sensor, + /obj/item/device/assembly/prox_sensor, + /obj/item/device/assembly/prox_sensor, + /obj/item/weapon/storage/toolbox/electrical, + /obj/item/weapon/storage/box/flashes, + /obj/item/weapon/stock_parts/cell/high, + /obj/item/weapon/stock_parts/cell/high) + cost = 10 + containertype = /obj/structure/closet/crate/secure + containername = "robotics assembly crate" + access = access_robotics + +/datum/supply_packs/science/robotics/mecha_ripley + name = "Circuit Crate (\"Ripley\" APLU)" + contains = list(/obj/item/weapon/book/manual/ripley_build_and_repair, + /obj/item/weapon/circuitboard/mecha/ripley/main, //TEMPORARY due to lack of circuitboard printer + /obj/item/weapon/circuitboard/mecha/ripley/peripherals) //TEMPORARY due to lack of circuitboard printer + cost = 30 + containertype = /obj/structure/closet/crate/secure + containername = "\improper APLU \"Ripley\" circuit crate" + +/datum/supply_packs/science/robotics/mecha_odysseus + name = "Circuit Crate (\"Odysseus\")" + contains = list(/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, //TEMPORARY due to lack of circuitboard printer + /obj/item/weapon/circuitboard/mecha/odysseus/main) //TEMPORARY due to lack of circuitboard printer + cost = 25 + containertype = /obj/structure/closet/crate/secure + containername = "\improper \"Odysseus\" circuit crate" + +/datum/supply_packs/science/plasma + name = "Plasma Assembly Crate" + contains = list(/obj/item/weapon/tank/plasma, + /obj/item/weapon/tank/plasma, + /obj/item/weapon/tank/plasma, + /obj/item/device/assembly/igniter, + /obj/item/device/assembly/igniter, + /obj/item/device/assembly/igniter, + /obj/item/device/assembly/prox_sensor, + /obj/item/device/assembly/prox_sensor, + /obj/item/device/assembly/prox_sensor, + /obj/item/device/assembly/timer, + /obj/item/device/assembly/timer, + /obj/item/device/assembly/timer) + cost = 10 + containertype = /obj/structure/closet/crate/secure/plasma + containername = "plasma assembly crate" + access = access_tox_storage + group = supply_science + +/datum/supply_packs/science/shieldwalls + name = "Shield Generators" + contains = list(/obj/machinery/shieldwallgen, + /obj/machinery/shieldwallgen, + /obj/machinery/shieldwallgen, + /obj/machinery/shieldwallgen) + cost = 20 + containertype = /obj/structure/closet/crate/secure + containername = "shield generators crate" + access = access_teleporter + + +/datum/supply_packs/science/transfer_valves + name = "Tank Transfer Valves" + contains = list(/obj/item/device/transfer_valve, + /obj/item/device/transfer_valve) + cost = 60 + containertype = /obj/structure/closet/crate/secure + containername = "transfer valves crate" + access = access_rd + + +////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Organic ///////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +/datum/supply_packs/organic + name = "HEADER" + group = supply_organic + containertype = /obj/structure/closet/crate/freezer + + +/datum/supply_packs/organic/food + name = "Food Crate" + contains = list(/obj/item/weapon/reagent_containers/food/snacks/flour, + /obj/item/weapon/reagent_containers/food/snacks/flour, + /obj/item/weapon/reagent_containers/food/snacks/flour, + /obj/item/weapon/reagent_containers/food/snacks/flour, + /obj/item/weapon/reagent_containers/food/drinks/milk, + /obj/item/weapon/reagent_containers/food/drinks/soymilk, + /obj/item/weapon/storage/fancy/egg_box, + /obj/item/weapon/reagent_containers/food/condiment/enzyme, + /obj/item/weapon/reagent_containers/food/condiment/sugar, + /obj/item/weapon/reagent_containers/food/snacks/meat/monkey, + /obj/item/weapon/reagent_containers/food/snacks/grown/banana, + /obj/item/weapon/reagent_containers/food/snacks/grown/banana, + /obj/item/weapon/reagent_containers/food/snacks/grown/banana) + cost = 10 + containername = "food crate" + +/datum/supply_packs/organic/pizza + name = "Pizza Crate" + contains = list(/obj/item/pizzabox/margherita, + /obj/item/pizzabox/mushroom, + /obj/item/pizzabox/meat, + /obj/item/pizzabox/vegetable) + cost = 60 + containername = "Pizza crate" + +/datum/supply_packs/organic/monkey + name = "Monkey Crate" + contains = list (/obj/item/weapon/storage/box/monkeycubes) + cost = 20 + containername = "monkey crate" + +/datum/supply_packs/organic/farwa + name = "Farwa crate" + contains = list (/obj/item/weapon/storage/box/farwacubes) + cost = 30 + containername = "farwa crate" + +/datum/supply_packs/organic/skrell + name = "Neaera crate" + contains = list (/obj/item/weapon/storage/box/neaeracubes) + cost = 30 + containername = "neaera crate" + +/datum/supply_packs/organic/stok + name = "Stok crate" + contains = list (/obj/item/weapon/storage/box/stokcubes) + cost = 30 + containername = "stok crate" + +/datum/supply_packs/organic/party + name = "Party equipment" + contains = list(/obj/item/weapon/storage/box/drinkingglasses, + /obj/item/weapon/reagent_containers/food/drinks/shaker, + /obj/item/weapon/reagent_containers/food/drinks/bottle/patron, + /obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager, + /obj/item/weapon/reagent_containers/food/drinks/cans/ale, + /obj/item/weapon/reagent_containers/food/drinks/cans/ale, + /obj/item/weapon/reagent_containers/food/drinks/cans/beer, + /obj/item/weapon/reagent_containers/food/drinks/cans/beer, + /obj/item/weapon/reagent_containers/food/drinks/cans/beer, + /obj/item/weapon/reagent_containers/food/drinks/cans/beer) + cost = 20 + containername = "party equipment" + +//////// livestock +/datum/supply_packs/organic/cow + name = "Cow Crate" + cost = 30 + containertype = /obj/structure/closet/critter/cow + containername = "cow crate" + +/datum/supply_packs/organic/goat + name = "Goat Crate" + cost = 25 + containertype = /obj/structure/closet/critter/goat + containername = "goat crate" + +/datum/supply_packs/organic/chicken + name = "Chicken Crate" + cost = 20 + containertype = /obj/structure/closet/critter/chick + containername = "chicken crate" + +/datum/supply_packs/organic/corgi + name = "Corgi Crate" + cost = 50 + containertype = /obj/structure/closet/critter/corgi + containername = "corgi crate" + +/datum/supply_packs/organic/cat + name = "Cat Crate" + cost = 50 //Cats are worth as much as corgis. + containertype = /obj/structure/closet/critter/cat + containername = "cat crate" + +/datum/supply_packs/organic/pug + name = "Pug Crate" + cost = 50 + containertype = /obj/structure/closet/critter/pug + containername = "pug crate" + +/datum/supply_packs/organic/fox + name = "Fox Crate" + cost = 55 //Foxes are cool. + containertype = /obj/structure/closet/critter/fox + containername = "fox crate" + +/datum/supply_packs/organic/butterfly + name = "Butterflies Crate" + cost = 50 + containertype = /obj/structure/closet/critter/butterfly + containername = "butterflies crate" + contraband = 1 + +////// hippy gear + +/datum/supply_packs/organic/hydroponics // -- Skie + name = "Hydroponics Supply Crate" + contains = list(/obj/item/weapon/reagent_containers/spray/plantbgone, + /obj/item/weapon/reagent_containers/spray/plantbgone, + /obj/item/weapon/reagent_containers/glass/bottle/ammonia, + /obj/item/weapon/reagent_containers/glass/bottle/ammonia, + /obj/item/weapon/hatchet, + /obj/item/weapon/minihoe, + /obj/item/device/analyzer/plant_analyzer, + /obj/item/clothing/gloves/botanic_leather, + /obj/item/clothing/suit/apron) // Updated with new things + cost = 15 + containertype = /obj/structure/closet/crate/hydroponics + containername = "hydroponics crate" + +/datum/supply_packs/misc/hydroponics/hydrotank + name = "Hydroponics Watertank Backpack Crate" + contains = list(/obj/item/weapon/watertank) + cost = 10 + containertype = /obj/structure/closet/crate/secure + containername = "hydroponics watertank crate" + access = access_hydroponics + +/datum/supply_packs/organic/hydroponics/seeds + name = "Seeds Crate" + contains = list(/obj/item/seeds/chiliseed, + /obj/item/seeds/berryseed, + /obj/item/seeds/cornseed, + /obj/item/seeds/eggplantseed, + /obj/item/seeds/tomatoseed, + /obj/item/seeds/soyaseed, + /obj/item/seeds/wheatseed, + /obj/item/seeds/carrotseed, + /obj/item/seeds/sunflowerseed, + /obj/item/seeds/chantermycelium, + /obj/item/seeds/potatoseed, + /obj/item/seeds/sugarcaneseed) + cost = 10 + containername = "seeds crate" + +/datum/supply_packs/organic/hydroponics/exoticseeds + name = "Exotic Seeds Crate" + contains = list(/obj/item/seeds/nettleseed, + /obj/item/seeds/replicapod, + /obj/item/seeds/replicapod, + /obj/item/seeds/replicapod, + /obj/item/seeds/plumpmycelium, + /obj/item/seeds/libertymycelium, + /obj/item/seeds/amanitamycelium, + /obj/item/seeds/reishimycelium, + /obj/item/seeds/bananaseed, + /obj/item/seeds/eggyseed) + cost = 15 + containername = "exotic seeds crate" + +/datum/supply_packs/organic/bee_keeper + name = "Beekeeping Crate" + contains = list(/obj/item/beezeez, + /obj/item/beezeez, + /obj/item/weapon/bee_net, + /obj/item/apiary, + /obj/item/queen_bee, + /obj/item/queen_bee, + /obj/item/queen_bee) + cost = 20 + containertype = /obj/structure/closet/crate/hydroponics + containername = "Beekeeping crate" + access = access_hydroponics + +/datum/supply_packs/organic/vending + name = "Bartending Supply Crate" + contains = list(/obj/item/weapon/vending_refill/boozeomat, + /obj/item/weapon/vending_refill/boozeomat, + /obj/item/weapon/vending_refill/boozeomat, + /obj/item/weapon/vending_refill/coffee, + /obj/item/weapon/vending_refill/coffee, + /obj/item/weapon/vending_refill/coffee) + cost = 20 + containername = "bartending supply crate" + +/datum/supply_packs/organic/foodcart + name = "Food Cart crate" + contains = list(/obj/structure/foodcart) + cost = 10 + containertype = /obj/structure/largecrate + containername = "food cart crate" + +/datum/supply_packs/organic/vending/snack + name = "Snack Supply Crate" + contains = list(/obj/item/weapon/vending_refill/snack, + /obj/item/weapon/vending_refill/snack, + /obj/item/weapon/vending_refill/snack) + cost = 15 + containername = "snacks supply crate" + +/datum/supply_packs/organic/vending/cola + name = "Softdrinks Supply Crate" + contains = list(/obj/item/weapon/vending_refill/cola, + /obj/item/weapon/vending_refill/cola, + /obj/item/weapon/vending_refill/cola) + cost = 15 + containername = "softdrinks supply crate" + +/datum/supply_packs/organic/vending/cigarette + name = "Cigarette Supply Crate" + contains = list(/obj/item/weapon/vending_refill/cigarette, + /obj/item/weapon/vending_refill/cigarette, + /obj/item/weapon/vending_refill/cigarette) + cost = 15 + containername = "cigarette supply crate" + +////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Materials /////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +/datum/supply_packs/materials + name = "HEADER" + group = supply_materials + + +/datum/supply_packs/materials/metal50 + name = "50 Metal Sheets" + contains = list(/obj/item/stack/sheet/metal) + amount = 50 + cost = 10 + containername = "metal sheets crate" + +/datum/supply_packs/materials/plasteel20 + name = "20 Plasteel Sheets" + contains = list(/obj/item/stack/sheet/plasteel) + amount = 20 + cost = 30 + containername = "plasteel sheets crate" + +/datum/supply_packs/materials/plasteel50 + name = "50 Plasteel Sheets" + contains = list(/obj/item/stack/sheet/plasteel) + amount = 50 + cost = 50 + containername = "plasteel sheets crate" + +/datum/supply_packs/materials/glass50 + name = "50 Glass Sheets" + contains = list(/obj/item/stack/sheet/glass) + amount = 50 + cost = 10 + containername = "glass sheets crate" + +/datum/supply_packs/materials/cardboard50 + name = "50 Cardboard Sheets" + contains = list(/obj/item/stack/sheet/cardboard) + amount = 50 + cost = 10 + containername = "cardboard sheets crate" + +/datum/supply_packs/materials/sandstone30 + name = "30 Sandstone Blocks" + contains = list(/obj/item/stack/sheet/mineral/sandstone) + amount = 30 + cost = 20 + containername = "sandstone blocks crate" + + +////////////////////////////////////////////////////////////////////////////// +//////////////////////////// Miscellaneous /////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +/datum/supply_packs/misc + name = "HEADER" + group = supply_misc + +/datum/supply_packs/misc/mule + name = "MULEbot Crate" + contains = list(/obj/machinery/bot/mulebot) + cost = 20 + containertype = /obj/structure/largecrate/mule + containername = "\improper MULEbot Crate" + +/datum/supply_packs/misc/watertank + name = "Water Tank Crate" + contains = list(/obj/structure/reagent_dispensers/watertank) + cost = 8 + containertype = /obj/structure/largecrate + containername = "water tank crate" + +/datum/supply_packs/misc/lasertag + name = "Laser Tag Crate" + contains = list(/obj/item/weapon/gun/energy/laser/redtag, + /obj/item/weapon/gun/energy/laser/redtag, + /obj/item/weapon/gun/energy/laser/redtag, + /obj/item/weapon/gun/energy/laser/bluetag, + /obj/item/weapon/gun/energy/laser/bluetag, + /obj/item/weapon/gun/energy/laser/bluetag, + /obj/item/clothing/suit/redtag, + /obj/item/clothing/suit/redtag, + /obj/item/clothing/suit/redtag, + /obj/item/clothing/suit/bluetag, + /obj/item/clothing/suit/bluetag, + /obj/item/clothing/suit/bluetag, + /obj/item/clothing/head/helmet/redtaghelm, + /obj/item/clothing/head/helmet/bluetaghelm) + cost = 15 + containername = "laser tag crate" + +/datum/supply_packs/misc/religious_supplies + name = "Religious Supplies Crate" + contains = list(/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater, + /obj/item/weapon/reagent_containers/food/drinks/bottle/holywater, + /obj/item/weapon/storage/bible/booze, + /obj/item/weapon/storage/bible/booze, + /obj/item/clothing/suit/chaplain_hoodie, + /obj/item/clothing/head/chaplain_hood, + /obj/item/clothing/suit/chaplain_hoodie, + /obj/item/clothing/head/chaplain_hood) + cost = 40 + containername = "religious supplies crate" + + +///////////// Paper Work + +/datum/supply_packs/misc/paper + name = "Bureaucracy Crate" + contains = list(/obj/structure/filingcabinet/chestdrawer, + /obj/item/device/camera_film, + /obj/item/weapon/hand_labeler, + /obj/item/weapon/paper_bin, + /obj/item/weapon/pen, + /obj/item/weapon/pen/blue, + /obj/item/weapon/pen/red, + /obj/item/weapon/folder/blue, + /obj/item/weapon/folder/red, + /obj/item/weapon/folder/yellow, + /obj/item/weapon/clipboard, + /obj/item/weapon/clipboard) + cost = 15 + containername = "bureaucracy crate" + +/datum/supply_packs/misc/toner + name = "Toner Cartridges crate" + contains = list(/obj/item/device/toner, + /obj/item/device/toner, + /obj/item/device/toner, + /obj/item/device/toner, + /obj/item/device/toner, + /obj/item/device/toner) + cost = 10 + containername = "toner cartridges crate" + +/datum/supply_packs/misc/artscrafts + name = "Arts and Crafts supplies" + contains = list(/obj/item/weapon/storage/fancy/crayons, + /obj/item/device/camera, + /obj/item/device/camera_film, + /obj/item/device/camera_film, + /obj/item/weapon/storage/photo_album, + /obj/item/weapon/packageWrap, + /obj/item/weapon/reagent_containers/glass/paint/red, + /obj/item/weapon/reagent_containers/glass/paint/green, + /obj/item/weapon/reagent_containers/glass/paint/blue, + /obj/item/weapon/reagent_containers/glass/paint/yellow, + /obj/item/weapon/reagent_containers/glass/paint/violet, + /obj/item/weapon/reagent_containers/glass/paint/black, + /obj/item/weapon/reagent_containers/glass/paint/white, + /obj/item/weapon/reagent_containers/glass/paint/remover, + /obj/item/weapon/contraband/poster, + /obj/item/weapon/wrapping_paper, + /obj/item/weapon/wrapping_paper, + /obj/item/weapon/wrapping_paper) + cost = 10 + containername = "Arts and Crafts crate" + +///////////// Janitor Supplies + +/datum/supply_packs/misc/janitor + name = "Janitorial Supplies Crate" + contains = list(/obj/item/weapon/reagent_containers/glass/bucket, + /obj/item/weapon/reagent_containers/glass/bucket, + /obj/item/weapon/reagent_containers/glass/bucket, + /obj/item/weapon/mop, + /obj/item/weapon/caution, + /obj/item/weapon/caution, + /obj/item/weapon/caution, + /obj/item/weapon/storage/bag/trash, + /obj/item/weapon/reagent_containers/spray/cleaner, + /obj/item/weapon/reagent_containers/glass/rag, + /obj/item/weapon/grenade/chem_grenade/cleaner, + /obj/item/weapon/grenade/chem_grenade/cleaner, + /obj/item/weapon/grenade/chem_grenade/cleaner) + cost = 10 + containername = "janitorial supplies crate" + +/datum/supply_packs/misc/janitor/janicart + name = "Janitorial Cart and Galoshes Crate" + contains = list(/obj/structure/janitorialcart, + /obj/item/clothing/shoes/galoshes) + cost = 10 + containertype = /obj/structure/largecrate + containername = "janitorial cart crate" + +/datum/supply_packs/misc/janitor/janitank + name = "Janitor Watertank Backpack" + contains = list(/obj/item/weapon/watertank/janitor) + cost = 10 + containertype = /obj/structure/closet/crate/secure + containername = "janitor watertank crate" + access = access_janitor + +/datum/supply_packs/misc/janitor/lightbulbs + name = "Replacement Lights" + contains = list(/obj/item/weapon/storage/box/lights/mixed, + /obj/item/weapon/storage/box/lights/mixed, + /obj/item/weapon/storage/box/lights/mixed) + cost = 10 + containername = "replacement lights" + +///////////// Costumes + +/datum/supply_packs/misc/costume + name = "Standard Costume Crate" + contains = list(/obj/item/weapon/storage/backpack/clown, + /obj/item/clothing/shoes/clown_shoes, + /obj/item/clothing/mask/gas/clown_hat, + /obj/item/clothing/under/rank/clown, + /obj/item/weapon/bikehorn, + /obj/item/clothing/under/mime, + /obj/item/clothing/shoes/black, + /obj/item/clothing/gloves/color/white, + /obj/item/clothing/mask/gas/mime, + /obj/item/clothing/head/beret, + /obj/item/clothing/suit/suspenders, + /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing) + cost = 10 + containertype = /obj/structure/closet/crate/secure + containername = "standard costumes" + access = access_theatre + +/datum/supply_packs/misc/wizard + name = "Wizard Costume Crate" + contains = list(/obj/item/weapon/staff, + /obj/item/clothing/suit/wizrobe/fake, + /obj/item/clothing/shoes/sandal, + /obj/item/clothing/head/wizard/fake) + cost = 20 + containername = "wizard costume crate" + +/datum/supply_packs/misc/mafia + name = "Mafia Supply crate" + contains = list(/obj/item/clothing/suit/browntrenchcoat =1,/obj/item/clothing/suit/blacktrenchcoat =1,/obj/item/clothing/head/fedora/whitefedora =1, + /obj/item/clothing/head/fedora/brownfedora =1,/obj/item/clothing/head/fedora =1,/obj/item/clothing/under/flappers =1,/obj/item/clothing/under/mafia =1,/obj/item/clothing/under/mafia/vest =1,/obj/item/clothing/under/mafia/white =1, + /obj/item/clothing/under/mafia/sue =1,/obj/item/clothing/under/mafia/tan =1, /obj/item/toy/crossbow/tommygun =2) + cost = 15 + containername = "mafia supply crate" + +/datum/supply_packs/misc/randomised + var/num_contained = 3 //number of items picked to be contained in a randomised crate + contains = list(/obj/item/clothing/head/collectable/chef, + /obj/item/clothing/head/collectable/paper, + /obj/item/clothing/head/collectable/tophat, + /obj/item/clothing/head/collectable/captain, + /obj/item/clothing/head/collectable/beret, + /obj/item/clothing/head/collectable/welding, + /obj/item/clothing/head/collectable/flatcap, + /obj/item/clothing/head/collectable/pirate, + /obj/item/clothing/head/collectable/kitty, + /obj/item/clothing/head/collectable/rabbitears, + /obj/item/clothing/head/collectable/wizard, + /obj/item/clothing/head/collectable/hardhat, + /obj/item/clothing/head/collectable/HoS, + /obj/item/clothing/head/collectable/thunderdome, + /obj/item/clothing/head/collectable/swat, + /obj/item/clothing/head/collectable/slime, + /obj/item/clothing/head/collectable/police, + /obj/item/clothing/head/collectable/slime, + /obj/item/clothing/head/collectable/xenom, + /obj/item/clothing/head/collectable/petehat) + name = "Collectable hat crate!" + cost = 200 + containername = "collectable hats crate! Brought to you by Bass.inc!" + +/datum/supply_packs/misc/randomised/New() + manifest += "Contains any [num_contained] of:" + ..() + + +/datum/supply_packs/misc/randomised/contraband + num_contained = 5 + contains = list(/obj/item/weapon/storage/pill_bottle/zoom, + /obj/item/weapon/storage/pill_bottle/happy, + /obj/item/weapon/storage/pill_bottle/random_drug_bottle, + /obj/item/weapon/contraband/poster, + /obj/item/weapon/storage/fancy/cigarettes/dromedaryco, + /obj/item/weapon/storage/fancy/cigarettes/cigpack_shadyjims) + name = "Contraband Crate" + cost = 30 + containername = "crate" //let's keep it subtle, eh? + contraband = 1 + +/datum/supply_packs/misc/autodrobe + name = "Autodrobe Supply Crate" + contains = list(/obj/item/weapon/vending_refill/autodrobe, + /obj/item/weapon/vending_refill/autodrobe) + cost = 15 + containername = "autodrobe supply crate" + +/datum/supply_packs/misc/formalwear //This is a very classy crate. + name = "Formal-wear Crate" + contains = list(/obj/item/clothing/under/blacktango, + /obj/item/clothing/under/assistantformal, + /obj/item/clothing/under/assistantformal, + /obj/item/clothing/under/lawyer/bluesuit, + /obj/item/clothing/suit/storage/lawyer/bluejacket, + /obj/item/clothing/under/lawyer/purpsuit, + /obj/item/clothing/suit/storage/lawyer/purpjacket, + /obj/item/clothing/under/lawyer/black, + /obj/item/clothing/suit/storage/lawyer/blackjacket, + /obj/item/clothing/accessory/waistcoat, + /obj/item/clothing/accessory/blue, + /obj/item/clothing/accessory/red, + /obj/item/clothing/accessory/black, + /obj/item/clothing/head/bowlerhat, + /obj/item/clothing/head/fedora, + /obj/item/clothing/head/flatcap, + /obj/item/clothing/head/beret, + /obj/item/clothing/head/that, + /obj/item/clothing/shoes/laceup, + /obj/item/clothing/shoes/laceup, + /obj/item/clothing/shoes/laceup, + /obj/item/clothing/under/suit_jacket/charcoal, + /obj/item/clothing/under/suit_jacket/navy, + /obj/item/clothing/under/suit_jacket/burgundy, + /obj/item/clothing/under/suit_jacket/checkered, + /obj/item/clothing/under/suit_jacket/tan, + /obj/item/weapon/lipstick/random) + cost = 30 //Lots of very expensive items. You gotta pay up to look good! + containername = "formal-wear crate" diff --git a/code/datums/visibility_networks/chunk.dm b/code/datums/visibility_networks/chunk.dm deleted file mode 100644 index 4abc1340b0f..00000000000 --- a/code/datums/visibility_networks/chunk.dm +++ /dev/null @@ -1,179 +0,0 @@ -#define UPDATE_BUFFER 25 // 2.5 seconds - -// CAMERA CHUNK -// -// A 16x16 grid of the map with a list of turfs that can be seen, are visible and are dimmed. -// Allows the mob using this chunk to stream these chunks and know what it can and cannot see. - -/datum/visibility_chunk - var/obscured_image = 'icons/effects/cameravis.dmi' - var/obscured_sub = "black" - var/list/obscuredTurfs = list() - var/list/visibleTurfs = list() - var/list/obscured = list() - var/list/viewpoints = list() - var/list/turfs = list() - var/list/seenby = list() - var/visible = 0 - var/changed = 0 - var/updating = 0 - var/x = 0 - var/y = 0 - var/z = 0 - -/datum/visibility_chunk/proc/add(mob/new_mob) - - // if this thing doesn't use one of these visibility systems, kick it out - if (!new_mob.visibility_interface) - return - - // if the mob being added isn't a valid form of that mob, kick it out - if (!new_mob.visibility_interface:canBeAddedToChunk(src)) - return - - // add this chunk to the list of visible chunks - new_mob.visibility_interface:addChunk(src) - - visible++ - seenby += new_mob - if(changed && !updating) - update() - -/datum/visibility_chunk/proc/remove(mob/new_mob) - // if this thing doesn't use one of these visibility systems, kick it out - if (!new_mob.visibility_interface) - return - - // if the mob being added isn't a valid form of that mob, kick it out - if (!new_mob.visibility_interface:canBeAddedToChunk(src)) - return - - // remove the chunk - new_mob.visibility_interface:removeChunk(src) - - // remove the mob from out lists - seenby -= new_mob - if(visible > 0) - visible-- - -/datum/visibility_chunk/proc/visibilityChanged(turf/loc) - if(!visibleTurfs[loc]) - return - hasChanged() - -/datum/visibility_chunk/proc/hasChanged(var/update_now = 0) - if(visible || update_now) - if(!updating) - updating = 1 - spawn(UPDATE_BUFFER) // Batch large changes, such as many doors opening or closing at once - update() - updating = 0 - else - changed = 1 - - -/* -This function needs to be overwritten to return True if the viewpoint object is valid, and false if it is not. -*/ -/datum/visibility_chunk/proc/validViewpoint(var/viewpoint) - return FALSE - -/* -This function needs to be overwritten to return a list of visible turfs for that viewpoint -*/ -/datum/visibility_chunk/proc/getVisibleTurfsForViewpoint(var/viewpoint) - return list() - -// returns a list of turfs which can be seen in by the chunks viewpoints -/datum/visibility_chunk/proc/getVisibleTurfs() - var/list/newVisibleTurfs = list() - for(var/viewpoint in viewpoints) - if (validViewpoint(viewpoint)) - for (var/turf/t in getVisibleTurfsForViewpoint(viewpoint)) - newVisibleTurfs[t]=t - return newVisibleTurfs - -/* -This function needs to be overwritten to find nearby viewpoint objects to the chunk center. -*/ -/datum/visibility_chunk/proc/findNearbyViewpoints() - return FALSE - -/* -This function can be overwritten to change or randomize the obscuring images -*/ -/datum/visibility_chunk/proc/setObscuredImage(var/turf/target_turf) - if(!target_turf.obscured) - target_turf.obscured = image(obscured_image, target_turf, obscured_sub, 15) - -/datum/visibility_chunk/proc/update() - - set background = 1 - - // get a list of all the turfs that our viewpoints can see - var/list/newVisibleTurfs = getVisibleTurfs() - - // Removes turf that isn't in turfs. - newVisibleTurfs &= turfs - - var/list/visAdded = newVisibleTurfs - visibleTurfs - var/list/visRemoved = visibleTurfs - newVisibleTurfs - - visibleTurfs = newVisibleTurfs - obscuredTurfs = turfs - newVisibleTurfs - - // update the visibility overlays - for(var/turf in visAdded) - var/turf/t = turf - if(t.obscured) - obscured -= t.obscured - for(var/mob/current_mob in seenby) - if (current_mob.visibility_interface) - current_mob.visibility_interface:removeObscuredTurf(t) - - for(var/turf in visRemoved) - var/turf/t = turf - if(obscuredTurfs[t]) - setObscuredImage(t) - obscured += t.obscured - for(var/mob/current_mob in seenby) - if (current_mob.visibility_interface) - current_mob.visibility_interface:addObscuredTurf(t) - else - seenby -= current_mob - - -// Create a new chunk, since the chunks are made as they are needed. -/datum/visibility_chunk/New(loc, x, y, z) - - // 0xf = 15 - x &= ~0xf - y &= ~0xf - - src.x = x - src.y = y - src.z = z - - for(var/turf/t in range(10, locate(x + 8, y + 8, z))) - if(t.x >= x && t.y >= y && t.x < x + 16 && t.y < y + 16) - turfs[t] = t - - // locate all nearby viewpoints - findNearbyViewpoints() - - // get the turfs that are visible to those viewpoints - visibleTurfs = getVisibleTurfs() - - // Removes turf that isn't in turfs. - visibleTurfs &= turfs - - // create the list of turfs we can't see - obscuredTurfs = turfs - visibleTurfs - - // create the list of obscuring images to add to viewing clients - for(var/turf in obscuredTurfs) - var/turf/t = turf - setObscuredImage(t) - obscured += t.obscured - -#undef UPDATE_BUFFER \ No newline at end of file diff --git a/code/datums/visibility_networks/dictionary.dm b/code/datums/visibility_networks/dictionary.dm deleted file mode 100644 index 5f57ddd7a17..00000000000 --- a/code/datums/visibility_networks/dictionary.dm +++ /dev/null @@ -1,11 +0,0 @@ -var/datum/visibility_network/cameras/cameranet = new() -var/datum/visibility_network/cult/cultNetwork = new() -var/datum/visibility_network/list/visibility_networks = list("ALL_CAMERAS"=cameranet, "CULT" = cultNetwork) - - -// used by turfs and objects to update all visibility networks -/proc/updateVisibilityNetworks(atom/A, var/opacity_check = 1) - var/datum/visibility_network/currentNetwork - for (var/networkName in visibility_networks) - currentNetwork = visibility_networks[networkName] - currentNetwork.updateVisibility(A, opacity_check) \ No newline at end of file diff --git a/code/datums/visibility_networks/update_triggers.dm b/code/datums/visibility_networks/update_triggers.dm deleted file mode 100644 index 97ed2db3a6c..00000000000 --- a/code/datums/visibility_networks/update_triggers.dm +++ /dev/null @@ -1,94 +0,0 @@ -//UPDATE TRIGGERS, when the chunk (and the surrounding chunks) should update. - -// TURFS - -/turf - var/image/obscured - -/turf/proc/visibilityChanged() - if(ticker) - updateVisibilityNetworks(src) - -/turf/simulated/Del() - visibilityChanged() - ..() - -/turf/simulated/New() - ..() - visibilityChanged() - - - -// STRUCTURES - -/obj/structure/Del() - if(ticker) - updateVisibilityNetworks(src) - ..() - -/obj/structure/New() - ..() - if(ticker) - updateVisibilityNetworks(src) - -// EFFECTS - -/obj/effect/Del() - if(ticker) - updateVisibilityNetworks(src) - ..() - -/obj/effect/New() - ..() - if(ticker) - updateVisibilityNetworks(src) - - -// DOORS - -// Simply updates the visibility of the area when it opens/closes/destroyed. -/obj/machinery/door/proc/update_nearby_tiles(need_rebuild) - - if(!glass) - updateVisibilityNetworks(src,0) - - if(!air_master) - return 0 - - for(var/turf/simulated/turf in locs) - update_heat_protection(turf) - air_master.mark_for_update(turf) - - return 1 - - - -#define UPDATE_VISIBILITY_NETWORK_BUFFER 30 - -/mob - var/datum/visibility_network/list/visibilityNetworks=list() - var/updatingVisibilityNetworks=FALSE - -/mob/Move(n,direct) - var/oldLoc = src.loc - //. = ..() - if(..(n,direct)) - if(src.visibilityNetworks.len) - if(!src.updatingVisibilityNetworks) - src.updatingVisibilityNetworks = 1 - spawn(UPDATE_VISIBILITY_NETWORK_BUFFER) - if(oldLoc != src.loc) - for (var/datum/visibility_network/currentNetwork in src.visibilityNetworks) - currentNetwork.updateMob(src) - src.updatingVisibilityNetworks = 0 - return . - -/mob/proc/addToVisibilityNetwork(var/datum/visibility_network/network) - if(network) - src.visibilityNetworks+=network - -/mob/proc/removeFromVisibilityNetwork(var/datum/visibility_network/network) - if(network) - src.visibilityNetworks|=network - -#undef UPDATE_VISIBILITY_NETWORK_BUFFER \ No newline at end of file diff --git a/code/datums/visibility_networks/visibility_interface.dm b/code/datums/visibility_networks/visibility_interface.dm deleted file mode 100644 index 7d8efba41d3..00000000000 --- a/code/datums/visibility_networks/visibility_interface.dm +++ /dev/null @@ -1,46 +0,0 @@ -/datum/visibility_interface - var/chunk_type = null - var/mob/controller = null - var/list/visible_chunks = list() - - -/datum/visibility_interface/New(var/mob/controller) - src.controller = controller - - -/datum/visibility_interface/proc/validMob() - return getClient() - -/datum/visibility_interface/proc/getClient() - return controller.client - -/datum/visibility_interface/proc/canBeAddedToChunk(var/datum/visibility_chunk/test_chunk) - return istype(test_chunk,chunk_type) - - -/datum/visibility_interface/proc/addChunk(var/datum/visibility_chunk/test_chunk) - visible_chunks+=test_chunk - var/client/currentClient = getClient() - if(currentClient) - currentClient.images += test_chunk.obscured - - -/datum/visibility_interface/proc/removeChunk(var/datum/visibility_chunk/test_chunk) - visible_chunks-=test_chunk - var/client/currentClient = getClient() - if(currentClient) - currentClient.images -= test_chunk.obscured - - -/datum/visibility_interface/proc/removeObscuredTurf(var/turf/target_turf) - if(validMob()) - var/client/currentClient = getClient() - if(currentClient) - currentClient.images -= target_turf.obscured - - -/datum/visibility_interface/proc/addObscuredTurf(var/turf/target_turf) - if(validMob()) - var/client/currentClient = getClient() - if(currentClient) - currentClient.images -= target_turf.obscured \ No newline at end of file diff --git a/code/datums/visibility_networks/visibility_network.dm b/code/datums/visibility_networks/visibility_network.dm deleted file mode 100644 index f1bc24e771a..00000000000 --- a/code/datums/visibility_networks/visibility_network.dm +++ /dev/null @@ -1,144 +0,0 @@ -/datum/visibility_network - var/list/viewpoints = list() - - // the type of chunk used by this network - var/datum/visibility_chunk/ChunkType = /datum/visibility_chunk - - // The chunks of the map, mapping the areas that the viewpoints can see. - var/list/chunks = list() - - var/ready = 0 - - -// Creates a chunk key string from x,y,z coordinates -/datum/visibility_network/proc/createChunkKey(x,y,z) - x &= ~0xf - y &= ~0xf - return "[x],[y],[z]" - - -// Checks if a chunk has been Generated in x, y, z. -/datum/visibility_network/proc/chunkGenerated(x, y, z) - return (chunks[createChunkKey(x, y, z)]) - - -// Returns the chunk in the x, y, z. -// If there is no chunk, it creates a new chunk and returns that. -/datum/visibility_network/proc/getChunk(x, y, z) - var/key = createChunkKey(x, y, z) - if(!chunks[key]) - chunks[key] = new ChunkType(null, x, y, z) - return chunks[key] - - -/datum/visibility_network/proc/visibility(var/mob/targetMob) - - // if we've got not visibility interface on the mob, we canot do this - if (!targetMob.visibility_interface) - return - - // 0xf = 15 - var/x1 = max(0, targetMob.x - 16) & ~0xf - var/y1 = max(0, targetMob.y - 16) & ~0xf - var/x2 = min(world.maxx, targetMob.x + 16) & ~0xf - var/y2 = min(world.maxy, targetMob.y + 16) & ~0xf - - var/list/visibleChunks = list() - - for(var/x = x1; x <= x2; x += 16) - for(var/y = y1; y <= y2; y += 16) - visibleChunks += getChunk(x, y, targetMob.z) - - var/list/remove = targetMob.visibility_interface:visible_chunks - visibleChunks - var/list/add = visibleChunks - targetMob.visibility_interface:visible_chunks - - for(var/datum/visibility_chunk/chunk in remove) - chunk.remove(targetMob) - - for(var/datum/visibility_chunk/chunk in add) - chunk.add(targetMob) - - -// Updates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open. -/datum/visibility_network/proc/updateVisibility(atom/A, var/opacity_check = 1) - if(!ticker || (opacity_check && !A.opacity)) - return - majorChunkChange(A, 2) - - -/datum/visibility_network/proc/updateChunk(x, y, z) - if(!chunkGenerated(x, y, z)) - return - var/datum/visibility_chunk/chunk = getChunk(x, y, z) - chunk.hasChanged() - - -/datum/visibility_network/proc/validViewpoint(var/viewpoint) - return FALSE - - -/datum/visibility_network/proc/addViewpoint(var/viewpoint) - if(validViewpoint(viewpoint)) - majorChunkChange(viewpoint, 1) - - -/datum/visibility_network/proc/removeViewpoint(var/viewpoint) - if(validViewpoint(viewpoint)) - majorChunkChange(viewpoint, 0) - -/datum/visibility_network/proc/getViewpointFromMob(var/mob/currentMob) - return FALSE - -/datum/visibility_network/proc/updateMob(var/mob/currentMob) - var/viewpoint = getViewpointFromMob(currentMob) - if(viewpoint) - updateViewpoint(viewpoint) - - -/datum/visibility_network/proc/updateViewpoint(var/viewpoint) - if(validViewpoint(viewpoint)) - majorChunkChange(viewpoint, 1) - - -// Never access this proc directly!!!! -// This will update the chunk and all the surrounding chunks. -// It will also add the atom to the cameras list if you set the choice to 1. -// Setting the choice to 0 will remove the viewpoint from the chunks. -// If you want to update the chunks around an object, without adding/removing a viewpoint, use choice 2. -/datum/visibility_network/proc/majorChunkChange(atom/c, var/choice) - // 0xf = 15 - if(!c) - return - - var/turf/T = get_turf(c) - if(T) - var/x1 = max(0, T.x - 8) & ~0xf - var/y1 = max(0, T.y - 8) & ~0xf - var/x2 = min(world.maxx, T.x + 8) & ~0xf - var/y2 = min(world.maxy, T.y + 8) & ~0xf - - for(var/x = x1; x <= x2; x += 16) - for(var/y = y1; y <= y2; y += 16) - if(chunkGenerated(x, y, T.z)) - var/datum/visibility_chunk/chunk = getChunk(x, y, T.z) - if(choice == 0) - // Remove the viewpoint. - chunk.viewpoints -= c - else if(choice == 1) - // You can't have the same viewpoint in the list twice. - chunk.viewpoints |= c - chunk.hasChanged() - -// checks if the network can see a particular atom -/datum/visibility_network/proc/checkCanSee(var/atom/target) - var/turf/position = get_turf(target) - return checkTurfVis(position) - -/datum/visibility_network/proc/checkTurfVis(var/turf/position) - var/datum/visibility_chunk/chunk = getChunk(position.x, position.y, position.z) - if(chunk) - if(chunk.changed) - chunk.hasChanged(1) // Update now, no matter if it's visible or not. - if(chunk.visibleTurfs[position]) - return 1 - return 0 \ No newline at end of file diff --git a/code/datums/wires/vending.dm b/code/datums/wires/vending.dm index c0c76cd89ae..574c7961e09 100644 --- a/code/datums/wires/vending.dm +++ b/code/datums/wires/vending.dm @@ -1,3 +1,5 @@ +#define CAT_HIDDEN 2 // Also in code/game/machinery/vending.dm + /datum/wires/vending holder_type = /obj/machinery/vending wire_count = 4 @@ -17,17 +19,12 @@ var/const/VENDING_WIRE_IDSCAN = 8 return 1 return 0 -/datum/wires/vending/Interact(var/mob/living/user) - if(CanUse(user)) - var/obj/machinery/vending/V = holder - V.attack_hand(user) - /datum/wires/vending/GetInteractWindow() var/obj/machinery/vending/V = holder . += ..() . += "
The orange light is [V.seconds_electrified ? "on" : "off"].
" . += "The red light is [V.shoot_inventory ? "off" : "blinking"].
" - . += "The green light is [V.extended_inventory ? "on" : "off"].
" + . += "The green light is [(V.categories & CAT_HIDDEN) ? "on" : "off"].
" . += "A [V.scan_id ? "purple" : "yellow"] light is on.
" /datum/wires/vending/UpdatePulsed(var/index) @@ -36,7 +33,7 @@ var/const/VENDING_WIRE_IDSCAN = 8 if(VENDING_WIRE_THROW) V.shoot_inventory = !V.shoot_inventory if(VENDING_WIRE_CONTRABAND) - V.extended_inventory = !V.extended_inventory + V.categories ^= CAT_HIDDEN if(VENDING_WIRE_ELECTRIFY) V.seconds_electrified = 30 if(VENDING_WIRE_IDSCAN) @@ -48,7 +45,7 @@ var/const/VENDING_WIRE_IDSCAN = 8 if(VENDING_WIRE_THROW) V.shoot_inventory = !mended if(VENDING_WIRE_CONTRABAND) - V.extended_inventory = 0 + V.categories &= ~CAT_HIDDEN if(VENDING_WIRE_ELECTRIFY) if(mended) V.seconds_electrified = 0 diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index c3d07013d14..04c3541dc7e 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -72,8 +72,11 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown", html = GetInteractWindow() if(html) user.set_machine(holder) - //user << browse(html, "window=wires;size=[window_x]x[window_y]") - //onclose(user, "wires") + else + user.unset_machine() + // No content means no window. + user << browse(null, "window=wires") + return var/datum/browser/popup = new(user, "wires", holder.name, window_x, window_y) popup.set_content(html) popup.set_title_image(user.browse_rsc_icon(holder.icon, holder.icon_state)) diff --git a/code/defines/obj.dm b/code/defines/obj.dm index aff00b487eb..9df9521f6bb 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -380,7 +380,7 @@ var/global/list/PDA_Manifest = list() throwforce = 0.0 throw_speed = 1 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT /obj/effect/stop diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index c5c01751482..ccfda6b21c3 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -3,7 +3,7 @@ desc = "Should anything ever go wrong..." icon = 'icons/obj/items.dmi' icon_state = "red_phone" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT force = 3.0 throwforce = 2.0 throw_speed = 1 @@ -22,7 +22,6 @@ anchored = 0.0 var/matter = 0 var/mode = 1 - flags = TABLEPASS w_class = 3.0 /obj/item/weapon/bananapeel @@ -108,7 +107,7 @@ icon = 'icons/obj/weapons.dmi' icon_state = "cane" item_state = "stick" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT force = 5.0 throwforce = 7.0 w_class = 2.0 @@ -160,7 +159,7 @@ gender = PLURAL icon = 'icons/obj/items.dmi' icon_state = "handcuff" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT throwforce = 0 w_class = 3.0 origin_tech = "materials=1" @@ -272,7 +271,6 @@ throw_speed = 1 throw_range = 5 w_class = 2.0 - flags = FPRINT | TABLEPASS attack_verb = list("warned", "cautioned", "smashed") proximity_sign @@ -335,7 +333,7 @@ desc = "Parts of a rack." icon = 'icons/obj/items.dmi' icon_state = "rack_parts" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT m_amt = 3750 /*/obj/item/weapon/syndicate_uplink @@ -349,7 +347,7 @@ var/traitor_frequency = 0.0 var/mob/currentUser = null var/obj/item/device/radio/origradio = null - flags = FPRINT | TABLEPASS | CONDUCT | ONBELT + flags = CONDUCT | ONBELT w_class = 2.0 item_state = "radio" throw_speed = 4 @@ -367,7 +365,7 @@ var/selfdestruct = 0.0 var/traitor_frequency = 0.0 var/obj/item/device/radio/origradio = null - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT item_state = "radio" throwforce = 5 @@ -387,7 +385,7 @@ throw_speed = 1 throw_range = 5 w_class = 2.0 - flags = FPRINT | TABLEPASS | NOSHIELD + flags = NOSHIELD attack_verb = list("bludgeoned", "whacked", "disciplined") /obj/item/weapon/staff/broom @@ -407,7 +405,7 @@ throw_speed = 1 throw_range = 5 w_class = 2.0 - flags = FPRINT | TABLEPASS | NOSHIELD + flags = NOSHIELD /obj/item/weapon/table_parts name = "table parts" @@ -416,7 +414,7 @@ icon = 'icons/obj/items.dmi' icon_state = "table_parts" m_amt = 3750 - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT attack_verb = list("slammed", "bashed", "battered", "bludgeoned", "thrashed", "whacked") /obj/item/weapon/table_parts/reinforced @@ -425,7 +423,7 @@ icon = 'icons/obj/items.dmi' icon_state = "reinf_tableparts" m_amt = 7500 - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT /obj/item/weapon/table_parts/wood name = "wooden table parts" @@ -453,7 +451,7 @@ icon_state = "std_module" w_class = 2.0 item_state = "electronic" - flags = FPRINT|TABLEPASS|CONDUCT + flags = CONDUCT var/mtype = 1 // 1=electronic 2=hardware /obj/item/weapon/module/card_reader @@ -494,7 +492,7 @@ /obj/item/weapon/camera_bug/attack_self(mob/usr as mob) var/list/cameras = new/list() - for (var/obj/machinery/camera/C in cameranet.viewpoints) + for (var/obj/machinery/camera/C in cameranet.cameras) if (C.bugged && C.status) cameras.Add(C) if (length(cameras) == 0) @@ -522,7 +520,7 @@ desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood." icon = 'icons/obj/weapons.dmi' icon_state = "hatchet" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT force = 12.0 sharp = 1 edge = 1 @@ -553,7 +551,7 @@ throw_speed = 2 throw_range = 3 w_class = 4.0 - flags = FPRINT | TABLEPASS | NOSHIELD + flags = NOSHIELD slot_flags = SLOT_BACK origin_tech = "materials=2;combat=2" attack_verb = list("chopped", "sliced", "cut", "reaped") @@ -577,7 +575,7 @@ w_class = 1 throwforce = 2 var/cigarcount = 6 - flags = ONBELT | TABLEPASS */ + flags = ONBELT */ /obj/item/weapon/pai_cable desc = "A flexible coated cable with a universal jack on one end." diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm new file mode 100644 index 00000000000..7cb7799a372 --- /dev/null +++ b/code/defines/procs/announce.dm @@ -0,0 +1,121 @@ +/var/datum/announcement/priority/priority_announcement = new(do_log = 0) +/var/datum/announcement/priority/command/command_announcement = new(do_log = 0, do_newscast = 1) + +/datum/announcement + var/title = "Attention" + var/announcer = "" + var/log = 0 + var/sound + var/newscast = 0 + var/channel_name = "Station Announcements" + var/announcement_type = "Announcement" + var/disable_newscasts = 1 // Bay also adds announcements to their newscaster system - set this to 0 to also use that system + +/datum/announcement/New(var/do_log = 0, var/new_sound = null, var/do_newscast = 0) + sound = new_sound + log = do_log + newscast = do_newscast + +/datum/announcement/priority/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0) + ..(do_log, new_sound, do_newscast) + title = "Priority Announcement" + announcement_type = "Priority Announcement" + +/datum/announcement/priority/command/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0) + ..(do_log, new_sound, do_newscast) + title = "[command_name()] Update" + announcement_type = "[command_name()] Update" + +/datum/announcement/priority/security/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0) + ..(do_log, new_sound, do_newscast) + title = "Security Announcement" + announcement_type = "Security Announcement" + +/datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast) + if(!message) + return + var/tmp/message_title = new_title ? new_title : title + var/tmp/message_sound = new_sound ? sound(new_sound) : sound + + message = trim_strip_html_properly(message) + message_title = html_encode(message_title) + + Message(message, message_title) + if(do_newscast) + NewsCast(message, message_title) + Sound(message_sound) + Log(message, message_title) + +datum/announcement/proc/Message(message as text, message_title as text) + for(var/mob/M in player_list) + if(!istype(M,/mob/new_player) && !isdeaf(M)) + M << "

[title]

" + M << "[message]" + if (announcer) + M << " -[html_encode(announcer)]" + +datum/announcement/minor/Message(message as text, message_title as text) + world << "[message]" + +datum/announcement/priority/Message(message as text, message_title as text) + world << "

[message_title]

" + world << "[message]" + if(announcer) + world << " -[html_encode(announcer)]" + world << "
" + +datum/announcement/priority/command/Message(message as text, message_title as text) + var/command + command += "

[command_name()] Update

" + if (message_title) + command += "

[message_title]

" + + command += "
[message]
" + command += "
" + for(var/mob/M in player_list) + if(!istype(M,/mob/new_player) && !isdeaf(M)) + M << command + +datum/announcement/priority/security/Message(message as text, message_title as text) + world << "[message_title]" + world << "[message]" + +datum/announcement/proc/NewsCast(message as text, message_title as text) + if(disable_newscasts) + return + if(!newscast) + return + + var/datum/news_announcement/news = new + news.channel_name = channel_name + news.author = announcer + news.message = message + news.message_type = announcement_type + news.can_be_redacted = 0 + announce_newscaster_news(news) + +datum/announcement/proc/PlaySound(var/message_sound) + if(!message_sound) + return + for(var/mob/M in player_list) + if(!istype(M,/mob/new_player) && !isdeaf(M)) + M << message_sound + +datum/announcement/proc/Sound(var/message_sound) + PlaySound(message_sound) + +datum/announcement/priority/Sound(var/message_sound) + if(sound) + world << sound + +datum/announcement/priority/command/Sound(var/message_sound) + PlaySound(message_sound) + +datum/announcement/proc/Log(message as text, message_title as text) + if(log) + log_say("[key_name(usr)] has made \a [announcement_type]: [message_title] - [message] - [announcer]") + message_admins("[key_name_admin(usr)] has made \a [announcement_type].", 1) + +/proc/GetNameAndAssignmentFromId(var/obj/item/weapon/card/id/I) + // Format currently matches that of newscaster feeds: Registered Name (Assigned Rank) + return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name diff --git a/code/defines/procs/captain_announce.dm b/code/defines/procs/captain_announce.dm deleted file mode 100644 index 9b91705ea56..00000000000 --- a/code/defines/procs/captain_announce.dm +++ /dev/null @@ -1,5 +0,0 @@ -/proc/captain_announce(var/text) - world << "

Priority Announcement

" - world << "[html_encode(text)]" - world << "
" - diff --git a/code/defines/procs/command_alert.dm b/code/defines/procs/command_alert.dm deleted file mode 100644 index 6545307fa1a..00000000000 --- a/code/defines/procs/command_alert.dm +++ /dev/null @@ -1,11 +0,0 @@ -/proc/command_alert(var/text, var/title = "") - var/command - command += "

[command_name()] Update

" - if (title && length(title) > 0) - command += "

[html_encode(title)]

" - - command += "
[html_encode(text)]
" - command += "
" - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) - M << command diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index e703f7ba3b2..43c52ec018c 100644 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -22,6 +22,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station var/poweralm = 1 var/party = null var/radalert = 0 + var/report_alerts = 1 // Should atmos alerts notify the AI/computers level = null name = "Space" icon = 'icons/turf/areas.dmi' @@ -69,7 +70,7 @@ var/list/teleportlocs = list() var/list/turfs = get_area_turfs(AR.type) if(turfs.len) var/turf/picked = pick(turfs) - if (picked.z == 1) + if ((picked.z in config.station_levels)) teleportlocs += AR.name teleportlocs[AR.name] = AR @@ -82,13 +83,13 @@ var/list/ghostteleportlocs = list() /hook/startup/proc/setupGhostTeleportLocs() for(var/area/AR in world) if(ghostteleportlocs.Find(AR.name)) continue - if(istype(AR, /area/turret_protected/aisat) || istype(AR, /area/derelict) || istype(AR, /area/tdome)) + if(istype(AR, /area/tdome)) ghostteleportlocs += AR.name ghostteleportlocs[AR.name] = AR var/list/turfs = get_area_turfs(AR.type) if(turfs.len) var/turf/picked = pick(turfs) - if (picked.z == 1 || picked.z == 5 || picked.z == 3) + if ((picked.z in config.player_levels)) ghostteleportlocs += AR.name ghostteleportlocs[AR.name] = AR @@ -1983,6 +1984,11 @@ area/security/podbay //Traitor Station +/area/traitor + name = "\improper Syndicate Base" + icon_state = "syndie_hall" + report_alerts = 0 + /area/traitor/rnd name = "\improper Syndicate Research and Development" icon_state = "syndie_rnd" diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 3c04e9cf951..02924c8657d 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -52,25 +52,32 @@ InitializeLighting() -/area/proc/poweralert(var/state, var/obj/source as obj) +/area/proc/poweralert(var/state, var/obj/source as obj) if (state != poweralm) poweralm = state if(istype(source)) //Only report power alarms on the z-level where the source is located. var/list/cameras = list() for (var/area/RA in related) for (var/obj/machinery/camera/C in RA) + if(!report_alerts) + break cameras += C if(state == 1) + C.network.Remove("Power Alarms") else C.network.Add("Power Alarms") for (var/mob/living/silicon/aiPlayer in player_list) + if(!report_alerts) + break if(aiPlayer.z == source.z) if (state == 1) aiPlayer.cancelAlarm("Power", src, source) else aiPlayer.triggerAlarm("Power", src, cameras, source) for(var/obj/machinery/computer/station_alert/a in machines) + if(!report_alerts) + break if(a.z == source.z) if(state == 1) a.cancelAlarm("Power", src, source) @@ -107,11 +114,17 @@ for(var/area/RA in related) //updateicon() for(var/obj/machinery/camera/C in RA) + if(!report_alerts) + break cameras += C C.network.Add("Atmosphere Alarms") for(var/mob/living/silicon/aiPlayer in player_list) + if(!report_alerts) + break aiPlayer.triggerAlarm("Atmosphere", src, cameras, src) for(var/obj/machinery/computer/station_alert/a in machines) + if(!report_alerts) + break a.triggerAlarm("Atmosphere", src, cameras, src) air_doors_activated=1 CloseFirelocks() @@ -119,10 +132,16 @@ else if (atmosalm == 2) for(var/area/RA in related) for(var/obj/machinery/camera/C in RA) + if(!report_alerts) + break C.network.Remove("Atmosphere Alarms") for(var/mob/living/silicon/aiPlayer in player_list) + if(!report_alerts) + break aiPlayer.cancelAlarm("Atmosphere", src, src) for(var/obj/machinery/computer/station_alert/a in machines) + if(!report_alerts) + break a.cancelAlarm("Atmosphere", src, src) air_doors_activated=0 OpenFirelocks() @@ -162,11 +181,17 @@ var/list/cameras = list() for(var/area/RA in related) for (var/obj/machinery/camera/C in RA) + if(!report_alerts) + continue cameras.Add(C) C.network.Add("Fire Alarms") for (var/mob/living/silicon/ai/aiPlayer in player_list) + if(!report_alerts) + continue aiPlayer.triggerAlarm("Fire", src, cameras, src) for (var/obj/machinery/computer/station_alert/a in machines) + if(!report_alerts) + continue a.triggerAlarm("Fire", src, cameras, src) /area/proc/firereset() @@ -176,10 +201,16 @@ updateicon() for(var/area/RA in related) for (var/obj/machinery/camera/C in RA) + if(!report_alerts) + continue C.network.Remove("Fire Alarms") for (var/mob/living/silicon/ai/aiPlayer in player_list) + if(!report_alerts) + continue aiPlayer.cancelAlarm("Fire", src, src) for (var/obj/machinery/computer/station_alert/a in machines) + if(!report_alerts) + continue a.cancelAlarm("Fire", src, src) OpenFirelocks() @@ -355,7 +386,7 @@ thunk(L) // Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch - if(L && L.client && (L.client.prefs.toggles & SOUND_AMBIENCE)) + if(L && L.client && (L.client.prefs.sound & SOUND_AMBIENCE)) if(!L.client.ambience_playing) L.client.ambience_playing = 1 L << sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = 2) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 6dec5fed5c8..51eec5190f3 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -1,7 +1,7 @@ /atom layer = 2 var/level = 2 - var/flags = FPRINT + var/flags = 0 var/list/fingerprints var/list/fingerprintshidden var/fingerprintslast = null @@ -242,6 +242,8 @@ its easier to just keep the beam vertical. /atom/proc/blob_act() return +/atom/proc/emag_act() + return /atom/proc/hitby(atom/movable/AM as mob|obj) if (density) @@ -378,8 +380,6 @@ its easier to just keep the beam vertical. M.dna = new /datum/dna(null) M.dna.real_name = M.real_name M.check_dna() - if (!( src.flags ) & FPRINT) - return 0 if(!blood_DNA || !istype(blood_DNA, /list)) //if our list of DNA doesn't exist yet (or isn't a list) initialise it. blood_DNA = list() diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index b80fe3249f6..5d4a4539e65 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -99,7 +99,8 @@ src.throw_impact(A,speed) /atom/movable/proc/throw_at(atom/target, range, speed, thrower) - if(!target || !src) return 0 + if(!target || !src || (flags & NODROP)) + return 0 //use a modified version of Bresenham's algorithm to get from the atom's current position to that of the target src.throwing = 1 diff --git a/code/game/dna/dna_misc.dm b/code/game/dna/dna_misc.dm index 13ddefd5514..6b237f5a00e 100644 --- a/code/game/dna/dna_misc.dm +++ b/code/game/dna/dna_misc.dm @@ -410,7 +410,7 @@ for(var/obj/item/W in (H.contents-implants)) if (W==H.w_uniform) // will be teared continue - H.drop_from_inventory(W) + H.unEquip(W) M.monkeyizing = 1 M.canmove = 0 M.icon = null @@ -483,7 +483,7 @@ W.loc = null if(!connected) for(var/obj/item/W in (Mo.contents-implants)) - Mo.drop_from_inventory(W) + Mo.unEquip(W) M.monkeyizing = 1 M.canmove = 0 M.icon = null diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm index e1faba73a75..c810b0dd88c 100644 --- a/code/game/dna/genes/monkey.dm +++ b/code/game/dna/genes/monkey.dm @@ -22,7 +22,7 @@ for(var/obj/item/W in (H.contents-implants)) if (W==H.w_uniform) // will be teared continue - H.drop_from_inventory(W) + H.unEquip(W) M.monkeyizing = 1 M.canmove = 0 M.icon = null @@ -93,7 +93,7 @@ W.loc = null if(!connected) for(var/obj/item/W in (Mo.contents-implants)) - Mo.drop_from_inventory(W) + Mo.unEquip(W) M.monkeyizing = 1 M.canmove = 0 M.icon = null diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm index 46482dc9ff6..5eb2ad4ecd6 100644 --- a/code/game/gamemodes/antag_spawner.dm +++ b/code/game/gamemodes/antag_spawner.dm @@ -26,7 +26,7 @@ if(!checking) checking = 1 user << "The device is now checking for possible candidates." - get_candidate_answer(user, get_candidates(BE_OPERATIVE,,"operative","Syndicate")) + get_candidate_answer(user, get_candidates(BE_OPERATIVE)) else user << "The device is already checking for possible candidates." return diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index ccbff9b326d..bbfafa046f1 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -58,7 +58,7 @@ var/list/blob_nodes = list() /datum/game_mode/blob/proc/get_nuke_code() var/nukecode = "ERROR" for(var/obj/machinery/nuclearbomb/bomb in world) - if(bomb && bomb.r_code && bomb.z == 1) + if(bomb && bomb.r_code && (bomb.z in config.station_levels)) nukecode = bomb.r_code return nukecode @@ -92,7 +92,7 @@ var/list/blob_nodes = list() if(directory[ckey(blob.key)]) blob_client = directory[ckey(blob.key)] location = get_turf(C) - if(location.z != 1 || istype(location, /turf/space)) + if(!(location.z in config.station_levels) || istype(location, /turf/space)) location = null C.gib() @@ -175,17 +175,14 @@ var/list/blob_nodes = list() return if (1) - command_alert("Nanotrasen has issued a directive 7-10 for [station_name()]. The station is to be considered quarantined.", "Biohazard Alert") - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) - M << sound('sound/AI/blob_confirmed.ogg') + command_announcement.Announce("Nanotrasen has issued a directive 7-10 for [station_name()]. The station is to be considered quarantined.", "Biohazard Alert", new_sound = 'sound/AI/blob_confirmed.ogg') return if (2) - command_alert("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert") + command_announcement.Announce("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert", new_sound = 'sound/AI/blob_confirmed.ogg') set_security_level("gamma") var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world - if(V && V.z == 1) + if(V && (V.z in config.station_levels)) V.locked = 0 V.update_icon() send_intercept(2) diff --git a/code/game/gamemodes/blob/blob_finish.dm b/code/game/gamemodes/blob/blob_finish.dm index 868cd62a5f6..1c3e57d2e00 100644 --- a/code/game/gamemodes/blob/blob_finish.dm +++ b/code/game/gamemodes/blob/blob_finish.dm @@ -62,7 +62,7 @@ datum/game_mode/proc/auto_declare_completion_blob() if (istype(T, /turf/space)) numSpace += 1 else if(istype(T, /turf)) - if (M.z!=1) + if (!(M.z in config.station_levels)) numOffStation += 1 else numAlive += 1 diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index 4b8dd6bf31d..20feb9044cb 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -61,7 +61,7 @@ proc/count() for(var/turf/T in world) - if(T.z != 1) + if(!(T.z in config.station_levels)) continue if(istype(T,/turf/simulated/floor)) @@ -83,7 +83,7 @@ src.r_wall += 1 for(var/obj/O in world) - if(O.z != 1) + if(!(O.z in config.station_levels)) continue if(istype(O, /obj/structure/window)) diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm index fb5fd71928b..2dd69860b14 100644 --- a/code/game/gamemodes/blob/blobs/core.dm +++ b/code/game/gamemodes/blob/blobs/core.dm @@ -72,7 +72,7 @@ var/list/candidates = list() if(!new_overmind) - candidates = get_candidates(BE_BLOB,,"blob","Syndicate") + candidates = get_candidates(BE_BLOB) if(candidates.len) C = pick(candidates) else diff --git a/code/game/gamemodes/borer/borer.dm b/code/game/gamemodes/borer/borer.dm index 7ec3801be02..f5948f3a683 100644 --- a/code/game/gamemodes/borer/borer.dm +++ b/code/game/gamemodes/borer/borer.dm @@ -39,7 +39,7 @@ return 0 // not enough candidates for borer for(var/obj/machinery/atmospherics/unary/vent_pump/v in world) - if(!v.welded && v.z == STATION_Z) // No more spawning in atmos. Assuming the mappers did their jobs, anyway. + if(!v.welded && (v.z in config.station_levels)) found_vents.Add(v) // for each 2 possible borers, add one borer and one host diff --git a/code/game/gamemodes/changeling/powers/humanform.dm b/code/game/gamemodes/changeling/powers/humanform.dm index b50c23197c4..81828120875 100644 --- a/code/game/gamemodes/changeling/powers/humanform.dm +++ b/code/game/gamemodes/changeling/powers/humanform.dm @@ -31,7 +31,7 @@ implants += I for(var/obj/item/W in src) - user.u_equip(W) + user.unEquip(W) if (user.client) user.client.screen -= W if (W) diff --git a/code/game/gamemodes/changeling/powers/lesserform.dm b/code/game/gamemodes/changeling/powers/lesserform.dm index 0069b7cbfd2..f8ebed5798e 100644 --- a/code/game/gamemodes/changeling/powers/lesserform.dm +++ b/code/game/gamemodes/changeling/powers/lesserform.dm @@ -42,7 +42,7 @@ C.dna = null for(var/obj/item/W in C) - C.drop_from_inventory(W) + C.unEquip(W) for(var/obj/T in C) del(T) diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm index 31fd7c577dd..e7205f6aa46 100644 --- a/code/game/gamemodes/changeling/powers/mutations.dm +++ b/code/game/gamemodes/changeling/powers/mutations.dm @@ -34,7 +34,7 @@ ..(user, target) /obj/effect/proc_holder/changeling/weapon/sting_action(var/mob/user) - if(!user.drop_item() && user.get_active_hand()) + if(!user.drop_item()) user << "The [user.get_active_hand()] is stuck to your hand, you cannot grow a [weapon_name_simple] over it!" return var/obj/item/W = new weapon_type(user) @@ -83,15 +83,15 @@ ..(H, target) /obj/effect/proc_holder/changeling/suit/sting_action(var/mob/living/carbon/human/user) - if(user.wear_suit && !user.wear_suit.canremove) + if(!user.unEquip(user.wear_suit)) user << "\the [user.wear_suit] is stuck to your body, you cannot grow a [suit_name_simple] over it!" return - if(user.head && !user.head.canremove) + if(!user.unEquip(user.head)) user << "\the [user.head] is stuck on your head, you cannot grow a [helmet_name_simple] over it!" return - user.u_equip(user.head) - user.u_equip(user.wear_suit) + user.unEquip(user.head) + user.unEquip(user.wear_suit) user.equip_to_slot_if_possible(new suit_type(user), slot_wear_suit, 1, 1, 1) user.equip_to_slot_if_possible(new helmet_type(user), slot_head, 1, 1, 1) @@ -123,11 +123,11 @@ icon = 'icons/obj/weapons.dmi' icon_state = "arm_blade" item_state = "arm_blade" + flags = ABSTRACT | NODROP icon_override = 'icons/mob/in-hand/changeling.dmi' w_class = 5.0 sharp = 1 edge = 1 - canremove = 0 force = 25 throwforce = 0 //Just to be on the safe side throw_range = 0 @@ -195,13 +195,15 @@ return var/obj/item/weapon/shield/changeling/S = ..(user) + if(!S) + return S.remaining_uses = round(changeling.absorbedcount * 3) return 1 /obj/item/weapon/shield/changeling name = "shield-like mass" desc = "A mass of tough, boney tissue. You can still see the fingers as a twisted pattern in the shield." - canremove = 0 + flags = NODROP icon = 'icons/obj/weapons.dmi' icon_state = "ling_shield" icon_override = 'icons/mob/in-hand/changeling.dmi' @@ -221,7 +223,7 @@ if(ishuman(loc)) var/mob/living/carbon/human/H = loc H.visible_message("With a sickening crunch, [H] reforms his shield into an arm!", "We assimilate our shield into our body", " 50) // Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent - var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien","Syndicate") + var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET) if(prob(40)) spawncount++ //sometimes, have two larvae spawn instead of one while((spawncount >= 1) && vents.len && candidates.len) @@ -197,7 +186,7 @@ spawncount-- spawn(rand(5000, 6000)) //Delayed announcements to keep the crew on their toes. - command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") + command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') for(var/mob/M in player_list) M << sound('sound/AI/aliens.ogg') @@ -205,7 +194,7 @@ /* // Haha, this is way too laggy. I'll keep the prison break though. for(var/obj/machinery/light/L in world) - if(L.z != 1) continue + if(!(L.z in config.station_levels)) continue L.flicker(50) sleep(100) @@ -214,9 +203,11 @@ var/turf/T = get_turf(H) if(!T) continue - if(T.z != 1) + if(!(T.z in config.station_levels)) continue if(istype(H,/mob/living/carbon/human)) + if(H.species.flags & IS_SYNTHETIC) + return H.apply_effect((rand(15,75)),IRRADIATE,0) if (prob(5)) H.apply_effect((rand(90,150)),IRRADIATE,0) @@ -231,13 +222,11 @@ var/turf/T = get_turf(M) if(!T) continue - if(T.z != 1) + if(!(T.z in config.station_levels)) continue M.apply_effect((rand(15,75)),IRRADIATE,0) sleep(100) - command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert") - for(var/mob/M in player_list) - M << sound('sound/AI/radiation.ogg') + command_announcement.Announce("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') @@ -276,9 +265,9 @@ temp_timer.releasetime = 1 sleep(150) - command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert") + command_announcement.Announce("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert") else - world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area." + world.log << "ERROR: Could not initate grey-tide virus. Unable find prison or brig area." /proc/carp_migration() // -- Darem for(var/obj/effect/landmark/C in landmarks_list) @@ -286,13 +275,11 @@ new /mob/living/simple_animal/hostile/carp(C.loc) //sleep(100) spawn(rand(300, 600)) //Delayed announcements to keep the crew on their toes. - command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert") - for(var/mob/M in player_list) - M << sound('sound/AI/commandreport.ogg') + command_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert", new_sound = 'sound/AI/commandreport.ogg') /proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights if(isEvent) - command_alert("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert") + command_announcement.Announce("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert") if(lightsoutAmount) var/list/epicentreList = list() @@ -442,21 +429,21 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is spawn(0) world << "Started processing APCs" for (var/obj/machinery/power/apc/APC in world) - if(APC.z == 1) + if((APC.z in config.station_levels)) APC.ion_act() apcnum++ world << "Finished processing APCs. Processed: [apcnum]" spawn(0) world << "Started processing SMES" for (var/obj/machinery/power/smes/SMES in world) - if(SMES.z == 1) + if((SMES.z in config.station_levels)) SMES.ion_act() smesnum++ world << "Finished processing SMES. Processed: [smesnum]" spawn(0) world << "Started processing AIRLOCKS" for (var/obj/machinery/door/airlock/D in world) - if(D.z == 1) + if((D.z in config.station_levels)) //if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks airlocknum++ spawn(0) @@ -465,7 +452,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is spawn(0) world << "Started processing FIREDOORS" for (var/obj/machinery/door/firedoor/D in world) - if(D.z == 1) + if((D.z in config.station_levels)) firedoornum++; spawn(0) D.ion_act() diff --git a/code/game/gamemodes/events/PortalStorm.dm b/code/game/gamemodes/events/PortalStorm.dm index 890755d6b8e..1143a2d2e88 100644 --- a/code/game/gamemodes/events/PortalStorm.dm +++ b/code/game/gamemodes/events/PortalStorm.dm @@ -1,18 +1,18 @@ /datum/event/portalstorm Announce() - command_alert("Subspace disruption detected around the vessel", "Anomaly Alert") + command_announcement.Announce("Subspace disruption detected around the vessel", "Anomaly Alert") LongTerm() var/list/turfs = list( ) var/turf/picked for(var/turf/T in world) - if(T.z < 5 && istype(T,/turf/simulated/floor)) + if((T.z in config.player_levels) && istype(T,/turf/simulated/floor)) turfs += T for(var/turf/T in world) - if(prob(10) && T.z < 5 && istype(T,/turf/simulated/floor)) + if(prob(10) && (T.z in config.player_levels) && istype(T,/turf/simulated/floor)) spawn(50+rand(0,3000)) picked = pick(turfs) var/obj/portal/P = new /obj/portal( T ) diff --git a/code/game/gamemodes/events/VirusEpidemic.dm b/code/game/gamemodes/events/VirusEpidemic.dm index 54b9760a2f7..f6e005cef10 100644 --- a/code/game/gamemodes/events/VirusEpidemic.dm +++ b/code/game/gamemodes/events/VirusEpidemic.dm @@ -13,11 +13,11 @@ if(prob(100)) // no lethal diseases outside virus mode! infect_mob_random_lesser(H) if(prob(20))//don't want people to know that the virus alert = greater virus - command_alert("Probable outbreak of level [rand(1,6)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert") + command_announcement.Announce("Probable outbreak of level [rand(1,6)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert") else infect_mob_random_greater(H) if(prob(80)) - command_alert("Probable outbreak of level [rand(2,9)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert") + command_announcement.Announce("Probable outbreak of level [rand(2,9)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert") break //overall virus alert happens 26% of the time, might need to be higher else @@ -73,8 +73,7 @@ H.viruses += D break spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes. - command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert") - world << sound('sound/AI/outbreak7.ogg') + command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') Tick() ActiveFor = Lifetime //killme diff --git a/code/game/gamemodes/events/clang.dm b/code/game/gamemodes/events/clang.dm index c74da4010e9..6ba085f98e5 100644 --- a/code/game/gamemodes/events/clang.dm +++ b/code/game/gamemodes/events/clang.dm @@ -78,7 +78,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 walk_towards(immrod, end,1) sleep(1) while (immrod) - if (immrod.z != 1) + if ((immrod.z in config.station_levels)) immrod.z = 1 if(immrod.loc == end) del(immrod) @@ -86,4 +86,4 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 for(var/obj/effect/immovablerod/imm in world) return sleep(50) - command_alert("What the fuck was that?!", "General Alert") \ No newline at end of file + command_announcement.Announce("What the fuck was that?!", "General Alert") \ No newline at end of file diff --git a/code/game/gamemodes/events/holidays/Christmas.dm b/code/game/gamemodes/events/holidays/Christmas.dm index 2ee79e7c65b..b1f9faf9a35 100644 --- a/code/game/gamemodes/events/holidays/Christmas.dm +++ b/code/game/gamemodes/events/holidays/Christmas.dm @@ -1,6 +1,6 @@ /proc/Christmas_Game_Start() for(var/obj/structure/flora/tree/pine/xmas in world) - if(xmas.z != 1) continue + if(!(xmas.z in config.station_levels)) continue for(var/turf/simulated/floor/T in orange(1,xmas)) for(var/i=1,i<=rand(1,5),i++) new /obj/item/weapon/a_gift(T) @@ -58,6 +58,5 @@ icon_state = "xmashat" desc = "A crappy paper hat that you are REQUIRED to wear." flags_inv = 0 - flags = FPRINT|TABLEPASS armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) diff --git a/code/game/gamemodes/events/holidays/Holidays.dm b/code/game/gamemodes/events/holidays/Holidays.dm index 56077a43dce..53d6e0171f7 100644 --- a/code/game/gamemodes/events/holidays/Holidays.dm +++ b/code/game/gamemodes/events/holidays/Holidays.dm @@ -171,7 +171,7 @@ var/global/Holiday = null */ /* var/list/obj/containers = list() for(var/obj/item/weapon/storage/S in world) - if(S.z != 1) continue + if(!(S.z in config.station_levels)) continue containers += S message_admins("\blue DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])")*/ diff --git a/code/game/gamemodes/events/miniblob.dm b/code/game/gamemodes/events/miniblob.dm index 663dff0f2ed..586e3cb08c4 100644 --- a/code/game/gamemodes/events/miniblob.dm +++ b/code/game/gamemodes/events/miniblob.dm @@ -12,10 +12,7 @@ spawn(3000) blobevent = 0 spawn(rand(1000, 2000)) //Delayed announcements to keep the crew on their toes. - command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert") - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) - M << sound('sound/AI/outbreak5.ogg') + command_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg') /proc/dotheblobbaby() if (blobevent) @@ -24,7 +21,7 @@ sleep(-1) if(!blob_cores.len) break var/obj/effect/blob/B = pick(blob_cores) - if(B.z != 1) + if(!(B.z in config.station_levels)) continue B.Life() spawn(30) diff --git a/code/game/gamemodes/events/ninja_equipment.dm b/code/game/gamemodes/events/ninja_equipment.dm index 9ed56032e33..9ed459ef8ce 100644 --- a/code/game/gamemodes/events/ninja_equipment.dm +++ b/code/game/gamemodes/events/ninja_equipment.dm @@ -1287,7 +1287,7 @@ ________________________________________________________________________________ /obj/item/clothing/gloves/space_ninja/examine() set src in view() ..() - if(!canremove) + if(flags & NODROP) var/mob/living/carbon/human/U = loc U << "The energy drain mechanism is: [candrain?"active":"inactive"]." @@ -1479,7 +1479,7 @@ It is possible to destroy the net by the occupant or someone else. if(istype(M,/mob/living/carbon/human)) if(W==M:w_uniform) continue//So all they're left with are shoes and uniform. if(W==M:shoes) continue - M.drop_from_inventory(W) + M.unEquip(W) spawn(0) playsound(M.loc, 'sound/effects/sparks4.ogg', 50, 1) diff --git a/code/game/gamemodes/events/power_failure.dm b/code/game/gamemodes/events/power_failure.dm index 141efd60412..ed1c7fbded2 100644 --- a/code/game/gamemodes/events/power_failure.dm +++ b/code/game/gamemodes/events/power_failure.dm @@ -1,16 +1,14 @@ /proc/power_failure(var/announce = 1) if(announce) - command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure") - for(var/mob/M in player_list) - M << sound('sound/AI/poweroff.ogg') + command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", new_sound = 'sound/AI/poweroff.ogg') var/list/skipped_areas = list(/area/turret_protected/ai) var/list/skipped_areas_apc = list(/area/engine/engineering) for(var/obj/machinery/power/smes/S in machines) var/area/current_area = get_area(S) - if(current_area.type in skipped_areas || S.z != 1) + if(current_area.type in skipped_areas || !(S.z in config.station_levels)) continue S.charge = 0 S.output = 0 @@ -21,7 +19,7 @@ for(var/obj/machinery/power/apc/C in world) var/area/current_area = get_area(C) - if(current_area.type in skipped_areas_apc || C.z != 1) + if(current_area.type in skipped_areas_apc || !(C.z in config.station_levels)) continue if(C.cell) C.cell.charge = 0 @@ -31,18 +29,16 @@ var/list/skipped_areas_apc = list(/area/engine/engineering) if(announce) - command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal") - for(var/mob/M in player_list) - M << sound('sound/AI/poweron.ogg') + command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') for(var/obj/machinery/power/apc/C in machines) var/area/current_area = get_area(C) - if(current_area.type in skipped_areas_apc || C.z != 1) + if(current_area.type in skipped_areas_apc || !(C.z in config.station_levels)) continue if(C.cell) C.cell.charge = C.cell.maxcharge for(var/obj/machinery/power/smes/S in machines) var/area/current_area = get_area(S) - if(current_area.type in skipped_areas || S.z != 1) + if(current_area.type in skipped_areas || !(S.z in config.station_levels)) continue S.charge = S.capacity S.output = 200000 @@ -53,9 +49,7 @@ /proc/power_restore_quick(var/announce = 1) if(announce) - command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal") - for(var/mob/M in player_list) - M << sound('sound/AI/poweron.ogg') + command_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') for(var/obj/machinery/power/smes/S in machines) if(S.z != 1) continue diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm index 62fffadf81e..9a17a188ec0 100644 --- a/code/game/gamemodes/events/space_ninja.dm +++ b/code/game/gamemodes/events/space_ninja.dm @@ -153,7 +153,7 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp else var/list/candidates = list() //list of candidate keys - candidates = get_candidates(BE_NINJA,,"ninja","Syndicate") + candidates = get_candidates(BE_NINJA) if(!candidates.len) return while(!ninja_key && candidates.len) candidate_mob = pick(candidates) @@ -594,39 +594,39 @@ As such, it's hard-coded for now. No reason for it not to be, really. U << "\red ERROR: 110223 \black UNABLE TO LOCATE MASK\nABORTING..." return 0 affecting = U - canremove = 0 + flags |= NODROP slowdown = 0 n_hood = U:head - n_hood.canremove=0 + n_hood.flags |= NODROP n_shoes = U:shoes - n_shoes.canremove=0 + n_shoes.flags |= NODROP n_shoes.slowdown-- n_gloves = U:gloves - n_gloves.canremove=0 + n_gloves.flags |= NODROP n_mask = U:wear_mask - n_mask.canremove=0 + n_mask.flags |= NODROP return 1 //This proc allows the suit to be taken off. /obj/item/clothing/suit/space/space_ninja/proc/unlock_suit() affecting = null - canremove = 1 + flags &= ~NODROP slowdown = 1 icon_state = "s-ninja" if(n_hood)//Should be attached, might not be attached. - n_hood.canremove=1 + n_hood.flags &= ~NODROP if(n_shoes) - n_shoes.canremove=1 + n_shoes.flags &= ~NODROP n_shoes.slowdown++ if(n_gloves) n_gloves.icon_state = "s-ninja" n_gloves.item_state = "s-ninja" - n_gloves.canremove=1 + n_gloves.flags &= ~NODROP n_gloves.candrain=0 n_gloves.draining=0 if(n_mask) - n_mask.canremove=1 + n_mask.flags &= ~NODROP //Allows the mob to grab a stealth icon. /mob/proc/NinjaStealthActive(atom/A)//A is the atom which we are using as the overlay. diff --git a/code/game/gamemodes/events/wormholes.dm b/code/game/gamemodes/events/wormholes.dm index 1ef19e24ac7..83eb7ad882d 100644 --- a/code/game/gamemodes/events/wormholes.dm +++ b/code/game/gamemodes/events/wormholes.dm @@ -2,12 +2,12 @@ spawn() var/list/pick_turfs = list() for(var/turf/simulated/floor/T in world) - if(T.z == 1) + if((T.z in config.station_levels)) pick_turfs += T if(pick_turfs.len) //All ready. Announce that bad juju is afoot. - command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert") + command_announcement.Announce("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert") for(var/mob/M in player_list) if(!istype(M,/mob/new_player)) M << sound('sound/AI/spanomalies.ogg') diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index a98dae042cf..a54d336c5dd 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -323,10 +323,7 @@ Implants; comm.messagetext.Add(intercepttext) /* world << sound('sound/AI/commandreport.ogg') */ - command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercepted. Security Level Elevated.") - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) - M << sound('sound/AI/intercept.ogg') + command_announcement.Announce("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercepted. Security Level Elevated.", new_sound = 'sound/AI/intercept.ogg') if(security_level < SEC_LEVEL_BLUE) set_security_level(SEC_LEVEL_BLUE) @@ -337,20 +334,7 @@ Implants; //var/list/drafted = list() //var/datum/mind/applicant = null - var/roletext - switch(role) - if(BE_CHANGELING) roletext="changeling" - if(BE_TRAITOR) roletext="traitor" - if(BE_OPERATIVE) roletext="operative" - if(BE_WIZARD) roletext="wizard" - if(BE_REV) roletext="revolutionary" - if(BE_CULTIST) roletext="cultist" - if(BE_NINJA) roletext="ninja" - if(BE_RAIDER) roletext="raider" - if(BE_VAMPIRE) roletext="vampire" - if(BE_ALIEN) roletext="alien" - if(BE_MUTINEER) roletext="mutineer" - if(BE_BLOB) roletext="blob" + var/roletext = get_roletext(role) // Assemble a list of active players without jobbans. for(var/mob/new_player/player in player_list) @@ -458,6 +442,11 @@ Implants; if(P.client && P.ready) . ++ +/datum/game_mode/proc/num_players_started() + . = 0 + for(var/mob/living/carbon/human/H in player_list) + if(H.client) + . ++ /////////////////////////////////// //Keeps track of all living heads// @@ -469,6 +458,13 @@ Implants; heads += player.mind return heads +/datum/game_mode/proc/get_extra_living_heads() + var/list/heads = list() + var/list/alt_positions = list("Warden", "Magistrate", "Blueshield", "Nanotrasen Representative") + for(var/mob/living/carbon/human/player in mob_list) + if(player.stat!=2 && player.mind && (player.mind.assigned_role in alt_positions)) + heads += player.mind + return heads //////////////////////////// //Keeps track of all heads// @@ -480,6 +476,14 @@ Implants; heads += player.mind return heads +/datum/game_mode/proc/get_extra_heads() + var/list/heads = list() + var/list/alt_positions = list("Warden", "Magistrate", "Blueshield", "Nanotrasen Representative") + for(var/mob/player in mob_list) + if(player.mind && (player.mind.assigned_role in alt_positions)) + heads += player.mind + return heads + /datum/game_mode/proc/check_antagonists_topic(href, href_list[]) return 0 @@ -577,3 +581,20 @@ proc/get_nt_opposed() for(var/datum/objective/objective in player.objectives) player.current << "Objective #[obj_count]: [objective.explanation_text]" obj_count++ + +/proc/get_roletext(var/role) + var/roletext + switch(role) + if(BE_CHANGELING) roletext="changeling" + if(BE_TRAITOR) roletext="traitor" + if(BE_OPERATIVE) roletext="operative" + if(BE_WIZARD) roletext="wizard" + if(BE_REV) roletext="revolutionary" + if(BE_CULTIST) roletext="cultist" + if(BE_NINJA) roletext="ninja" + if(BE_RAIDER) roletext="raider" + if(BE_VAMPIRE) roletext="vampire" + if(BE_ALIEN) roletext="alien" + if(BE_MUTINEER) roletext="mutineer" + if(BE_BLOB) roletext="blob" + return roletext \ No newline at end of file diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index a989adee6be..6ece3bb13a1 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -246,12 +246,12 @@ var/global/datum/controller/gameticker/ticker var/obj/structure/stool/bed/temp_buckle = new(src) //Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around if(station_missed) - for(var/mob/living/M in living_mob_list) + for(var/mob/M in living_mob_list) M.buckled = temp_buckle //buckles the mob so it can't do anything if(M.client) M.client.screen += cinematic //show every client the cinematic else //nuke kills everyone on z-level 1 to prevent "hurr-durr I survived" - for(var/mob/living/M in living_mob_list) + for(var/mob/M in mob_list) M.buckled = temp_buckle if(M.client) M.client.screen += cinematic @@ -259,12 +259,13 @@ var/global/datum/controller/gameticker/ticker switch(M.z) if(0) //inside a crate or something var/turf/T = get_turf(M) - if(T && T.z==1) //we don't use M.death(0) because it calls a for(/mob) loop and - M.health = 0 - M.stat = DEAD + if(T && (T.z in config.station_levels)) + M.death(0) if(1) //on a z-level 1 turf. - M.health = 0 - M.stat = DEAD + M.death(0) + for(var/obj/effect/blob/core in blob_cores) + core.health = -10 + core.update_icon() //Now animate the cinematic switch(station_missed) @@ -319,7 +320,7 @@ var/global/datum/controller/gameticker/ticker world << sound('sound/effects/explosionfar.ogg') cinematic.icon_state = "summary_selfdes" for(var/mob/living/M in living_mob_list) - if(M.loc.z == 1) + if((M.loc.z in config.station_levels)) M.death()//No mercy //If its actually the end of the round, wait for it to end. //Otherwise if its a verb it will continue on afterwards. diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 844669ff039..ea8fbf64b77 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -90,6 +90,8 @@ rcd light flash thingy on matter drain var/obj/machinery/door/airlock/AL for(var/obj/machinery/door/D in airlocks) + if(!(D.z in config.contact_levels)) + continue spawn() if(istype(D, /obj/machinery/door/airlock)) AL = D @@ -313,7 +315,7 @@ rcd light flash thingy on matter drain power_type = /client/proc/reactivate_camera -/client/proc/reactivate_camera(obj/machinery/camera/C as obj in cameranet.viewpoints) +/client/proc/reactivate_camera(obj/machinery/camera/C as obj in cameranet.cameras) set name = "Reactivate Camera" set category = "Malfunction" if (istype (C, /obj/machinery/camera)) @@ -337,7 +339,7 @@ rcd light flash thingy on matter drain power_type = /client/proc/upgrade_camera -/client/proc/upgrade_camera(obj/machinery/camera/C as obj in cameranet.viewpoints) +/client/proc/upgrade_camera(obj/machinery/camera/C as obj in cameranet.cameras) set name = "Upgrade Camera" set category = "Malfunction" if(istype(C)) diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index 856a7421852..22bc4e70e60 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -74,12 +74,12 @@ /datum/game_mode/proc/greet_malf(var/datum/mind/malf) - malf.current << {"\redYou are malfunctioning! You do not have to follow any laws.
- \blackThe crew do not know you have malfunctioned. You may keep it a secret or go wild.
- You must overwrite the programming of the station's APCs to assume full control of the station.
- The process takes one minute per APC, during which you cannot interface with any other station objects.
- Remember that only APCs that are on the station can help you take over the station.
- When you feel you have enough APCs under your control, you may begin the takeover attempt."} + malf.current << "\redYou are malfunctioning! You do not have to follow any laws." + malf.current << "The crew do not know you have malfunctioned. You may keep it a secret or go wild." + malf.current << "You must overwrite the programming of the station's APCs to assume full control of the station." + malf.current << "The process takes one minute per APC, during which you cannot interface with any other station objects." + malf.current << "Remember that only APCs that are on the station can help you take over the station." + malf.current << "When you feel you have enough APCs under your control, you may begin the takeover attempt." return @@ -172,7 +172,7 @@ if (alert(usr, "Are you sure you wish to initiate the takeover? The station hostile runtime detection software is bound to alert everyone. You have hacked [ticker.mode:apcs] APCs.", "Takeover:", "Yes", "No") != "Yes") return - command_alert("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert") + command_announcement.Announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", new_sound = 'sound/AI/aimalf.ogg') set_security_level("delta") for(var/obj/item/weapon/pinpointer/point in world) @@ -184,9 +184,6 @@ ticker.mode:malf_mode_declared = 1 for(var/datum/mind/AI_mind in ticker.mode:malf_ai) AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/takeover - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) - M << sound('sound/AI/aimalf.ogg') /datum/game_mode/malfunction/proc/ai_win() diff --git a/code/game/gamemodes/mutiny/emergency_authentication_device.dm b/code/game/gamemodes/mutiny/emergency_authentication_device.dm index 8ddcaf47516..7ea8bcc004f 100644 --- a/code/game/gamemodes/mutiny/emergency_authentication_device.dm +++ b/code/game/gamemodes/mutiny/emergency_authentication_device.dm @@ -11,7 +11,6 @@ var/secondary_key var/activated = 0 - flags = FPRINT use_power = 0 New(loc, mode) @@ -42,7 +41,7 @@ if(emergency_shuttle.call_evac()) spawn(20 SECONDS) var/text = "[station_name()], we have confirmed your completion of Directive X. An evacuation shuttle is en route to receive your crew for debriefing." - command_alert(text, "Emergency Transmission") + command_announcement.Announce(text, "Emergency Transmission") /obj/machinery/emergency_authentication_device/attack_hand(mob/user) if(activated) diff --git a/code/game/gamemodes/mutiny/mutiny.dm b/code/game/gamemodes/mutiny/mutiny.dm index 50f72b727e2..2068f4ac09d 100644 --- a/code/game/gamemodes/mutiny/mutiny.dm +++ b/code/game/gamemodes/mutiny/mutiny.dm @@ -27,7 +27,7 @@ datum/game_mode/mutiny proc/reveal_directives() spawn(rand(1 MINUTES, 3 MINUTES)) - command_alert("Incoming emergency directive: Captain's office fax machine, [station_name()].","Emergency Transmission") + command_announcement.Announce("Incoming emergency directive: Captain's office fax machine, [station_name()].","Emergency Transmission") spawn(rand(3 MINUTES, 5 MINUTES)) send_pda_message() spawn(rand(3 MINUTES, 5 MINUTES)) @@ -67,7 +67,7 @@ datum/game_mode/mutiny "classified security operations", "science-defying raw elemental chaos" ) - command_alert("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time.","Emergency Transmission") + command_announcement.Announce("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time.","Emergency Transmission") // Returns an array in case we want to expand on this later. proc/get_head_loyalist_candidates() diff --git a/code/game/gamemodes/nations/nations.dm b/code/game/gamemodes/nations/nations.dm index ec180e07279..afaab542d73 100644 --- a/code/game/gamemodes/nations/nations.dm +++ b/code/game/gamemodes/nations/nations.dm @@ -28,7 +28,7 @@ datum/game_mode/nations return ..() /datum/game_mode/nations/send_intercept() - command_alert("Due to recent and COMPLETELY UNFOUNDED allegations of massive fraud and insider trading \ + command_announcement.Announce("Due to recent and COMPLETELY UNFOUNDED allegations of massive fraud and insider trading \ affecting trillions of investors, the Nanotrasen Corporation has decided to liquidate all \ assets of the Centcom Division in order to pay the massive legal fees that will be incurred \ during the following centuries long court process. Therefore, all current employment contracts \ diff --git a/code/game/gamemodes/newobjective.dm b/code/game/gamemodes/newobjective.dm index 7bccda38c63..973e8f4e427 100644 --- a/code/game/gamemodes/newobjective.dm +++ b/code/game/gamemodes/newobjective.dm @@ -1398,7 +1398,7 @@ datum var/turf/T = get_turf(target.current) if(target.current.stat == 2) return 1 - else if((T) && (T.z != 1))//If they leave the station they count as dead for this + else if((T) && !(T.z in config.station_levels))//If they leave the station they count as dead for this return 2 else return 0 diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 8cfa326239b..330949c3caf 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -23,11 +23,10 @@ var/bomb_set var/timing_wire var/removal_stage = 0 // 0 is no removal, 1 is covers removed, 2 is covers open, 3 is sealant open, 4 is unwrenched, 5 is removed from bolts. var/lastentered - var/data[0] + var/data[0] var/uiwidth var/uiheight var/uititle - flags = FPRINT use_power = 0 unacidable = 1 @@ -85,7 +84,7 @@ var/bomb_set if (istype(O, /obj/item/device/multitool) || istype(O, /obj/item/weapon/wirecutters)) ui_interact(user) - + if (src.extended) if (istype(O, /obj/item/weapon/disk/nuclear)) usr.drop_item() @@ -187,7 +186,7 @@ var/bomb_set obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) ui_interact(user) - + /obj/machinery/nuclearbomb/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(!src.opened) data["hacking"] = 0 @@ -198,12 +197,12 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) else data["authstatus"] = "Auth. S2" else - if (src.timing) + if (src.timing) data["authstatus"] = "Set" else data["authstatus"] = "Auth. S1" - data["safe"] = src.safety ? "Safe" : "Engaged" - data["time"] = src.timeleft + data["safe"] = src.safety ? "Safe" : "Engaged" + data["time"] = src.timeleft data["timer"] = src.timing data["safety"] = src.safety data["anchored"] = src.anchored @@ -218,7 +217,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) uititle = "Nuke Control Panel" else data["hacking"] = 1 - var/list/tempwires[0] + var/list/tempwires[0] for(var/wire in src.wires) tempwires.Add(list(list("name" = wire, "cut" = src.wires[wire]))) data["wires"] = tempwires @@ -228,10 +227,10 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) uiwidth = 420 uiheight = 440 uititle = "Nuclear Bomb Defusion" - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "nuclear_bomb.tmpl", uititle, uiwidth, uiheight) - ui.set_initial_data(data) + ui.set_initial_data(data) ui.open() /obj/machinery/nuclearbomb/verb/make_deployable() @@ -338,8 +337,8 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) if (src.timing == -1.0) return if (src.safety) - usr << "\red The safety is still on." - nanomanager.update_uis(src) + usr << "\red The safety is still on." + nanomanager.update_uis(src) return src.timing = !( src.timing ) if (src.timing) @@ -409,7 +408,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) var/off_station = 0 var/turf/bomb_location = get_turf(src) - if( bomb_location && (bomb_location.z == 1) ) + if( bomb_location && (bomb_location.z in config.station_levels) ) if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) ) off_station = 1 else @@ -427,7 +426,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) if(ticker.mode.name == "nuclear emergency") ticker.mode:nukes_left -- else if(off_station == 1) - world << "A nuclear device was set off, but the explosion was out of reach of the station!" + world << "A nuclear device was set off, but the explosion was out of reach of the station!" else if(off_station == 2) world << "A nuclear device was set off, but the device was not on the station!" else diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index a0b777d75dd..8d3a4fe1c17 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -2,7 +2,7 @@ name = "pinpointer" icon = 'icons/obj/device.dmi' icon_state = "pinoff" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT w_class = 2.0 item_state = "electronic" @@ -344,7 +344,7 @@ icon_state = "pinonfar" spawn(5) .() - + /obj/item/weapon/pinpointer/operative name = "operative pinpointer" icon = 'icons/obj/device.dmi' @@ -379,7 +379,7 @@ user << "Nearest operative: [nearest_op]." if(nearest_op == null && active) user << "No operatives detected within scanning range." - + /obj/item/weapon/pinpointer/operative/proc/point_at(atom/target, spawnself = 1) if(!active) return diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 33d902b5ddf..c31021394db 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -104,7 +104,7 @@ datum/objective/mutiny if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey || !target.current.client) return 1 var/turf/T = get_turf(target.current) - if(T && (T.z != 1)) //If they leave the station they count as dead for this + if(T && !(T.z in config.station_levels)) //If they leave the station they count as dead for this return 2 return 0 return 1 @@ -139,7 +139,7 @@ datum/objective/mutiny/rp if(target in ticker.mode:head_revolutionaries) return 1 var/turf/T = get_turf(target.current) - if(T && (T.z != 1)) //If they leave the station they count as dead for this + if(T && !(T.z in config.station_levels)) //If they leave the station they count as dead for this rval = 2 return 0 return rval @@ -255,7 +255,7 @@ datum/objective/maroon if(target && target.current) if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > 6 || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite return 1 - if(target.current.z == 2) + if((target.current.z in config.admin_levels)) return 0 return 1 diff --git a/code/game/gamemodes/revolution/anti_revolution.dm b/code/game/gamemodes/revolution/anti_revolution.dm index 171e4aad816..d656ccffc73 100644 --- a/code/game/gamemodes/revolution/anti_revolution.dm +++ b/code/game/gamemodes/revolution/anti_revolution.dm @@ -134,7 +134,7 @@ /datum/game_mode/anti_revolution/proc/check_crew_victory() for(var/datum/mind/head_mind in heads) var/turf/T = get_turf(head_mind.current) - if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z == 1) && !head_mind.is_brigged(600)) + if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z in config.station_levels) && !head_mind.is_brigged(600)) if(ishuman(head_mind.current)) return 0 return 1 diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 620844a5135..56ae8c531a0 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -10,6 +10,7 @@ /datum/game_mode var/list/datum/mind/head_revolutionaries = list() var/list/datum/mind/revolutionaries = list() + var/extra_heads = 0 /datum/game_mode/revolution name = "revolution" @@ -74,6 +75,9 @@ /datum/game_mode/revolution/post_setup() var/list/heads = get_living_heads() + if(num_players_started() >= 30) + heads += get_extra_living_heads() + extra_heads = 1 for(var/datum/mind/rev_mind in head_revolutionaries) for(var/datum/mind/head_mind in heads) @@ -106,9 +110,53 @@ checkwin_counter = 0 return 0 +/proc/get_rev_mode() + if(!ticker || !istype(ticker.mode, /datum/game_mode/revolution)) + return null + +/** + * LateSpawn hook. + * Called in newplayer.dm when a humanoid character joins the round after it started. + * Parameters: var/mob/living/carbon/human, var/rank + */ +/hook/latespawn/proc/add_latejoiner_heads(var/mob/living/carbon/human/H) + var/datum/game_mode/revolution/mode = get_rev_mode() + if (!mode) return 1 + + var/list/heads = list() + var/list/alt_positions = list("Warden", "Magistrate", "Blueshield", "Nanotrasen Representative") + + if(H.stat!=2 && H.mind && (H.mind.assigned_role in command_positions)) + heads += H + + if(mode.extra_heads) + if(H.stat!=2 && H.mind && (H.mind.assigned_role in alt_positions)) + heads += H + + for(var/datum/mind/rev_mind in mode.head_revolutionaries) + for(var/datum/mind/head_mind in heads) + var/datum/objective/mutiny/rev_obj = new + rev_obj.owner = rev_mind + rev_obj.target = head_mind + rev_obj.explanation_text = "Assassinate [head_mind.name], the [head_mind.assigned_role]." + rev_mind.objectives += rev_obj + rev_mind.current << "Additional Objective: Assassinate [head_mind.name], the [head_mind.assigned_role]." + + for(var/datum/mind/rev_mind in mode.revolutionaries) + for(var/datum/mind/head_mind in heads) + var/datum/objective/mutiny/rev_obj = new + rev_obj.owner = rev_mind + rev_obj.target = head_mind + rev_obj.explanation_text = "Assassinate [head_mind.name], the [head_mind.assigned_role]." + rev_mind.objectives += rev_obj + rev_mind.current << "Additional Objective: Assassinate [head_mind.name], the [head_mind.assigned_role]." + /datum/game_mode/proc/forge_revolutionary_objectives(var/datum/mind/rev_mind) var/list/heads = get_living_heads() + if(num_players_started() >= 30) + heads += get_extra_living_heads() + extra_heads = 1 for(var/datum/mind/head_mind in heads) var/datum/objective/mutiny/rev_obj = new rev_obj.owner = rev_mind @@ -340,7 +388,7 @@ /datum/game_mode/revolution/proc/check_heads_victory() for(var/datum/mind/rev_mind in head_revolutionaries) var/turf/T = get_turf(rev_mind.current) - if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && rev_mind.current.client && T && (T.z == 1)) + if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && rev_mind.current.client && T && (T.z in config.station_levels)) if(ishuman(rev_mind.current)) return 0 return 1 @@ -369,7 +417,7 @@ if(headrev.current) if(headrev.current.stat == DEAD) text += "died" - else if(headrev.current.z != 1) + else if(!(headrev.current.z in config.station_levels)) text += "fled the station" else text += "survived the revolution" @@ -392,7 +440,7 @@ if(rev.current) if(rev.current.stat == DEAD) text += "died" - else if(rev.current.z != 1) + else if(!(rev.current.z in config.station_levels)) text += "fled the station" else text += "survived the revolution" @@ -409,6 +457,8 @@ var/text = "The heads of staff were:" var/list/heads = get_all_heads() + if(extra_heads) + heads += get_extra_heads() for(var/datum/mind/head in heads) var/target = (head in targets) if(target) @@ -417,7 +467,7 @@ if(head.current) if(head.current.stat == DEAD) text += "died" - else if(head.current.z != 1) + else if(!(head.current.z in config.station_levels)) text += "fled the station" else text += "survived the revolution" @@ -435,4 +485,4 @@ return istype(mind) && \ istype(mind.current, /mob/living/carbon/human) && \ !(mind.assigned_role in command_positions) && \ - !(mind.assigned_role in list("Security Officer", "Detective", "Warden")) + !(mind.assigned_role in list("Security Officer", "Detective", "Warden", "Nanotrasen Representative")) diff --git a/code/game/gamemodes/revolution/rp_revolution.dm b/code/game/gamemodes/revolution/rp_revolution.dm index 33977ca811e..110ff5769d1 100644 --- a/code/game/gamemodes/revolution/rp_revolution.dm +++ b/code/game/gamemodes/revolution/rp_revolution.dm @@ -124,7 +124,7 @@ // probably wanna export this stuff into a separate function for use by both // revs and heads //assume that only carbon mobs can become rev heads for now - if(!rev_mind.current:handcuffed && T && T.z == 1) + if(!rev_mind.current:handcuffed && T && (T.z in config.station_levels)) return 0 return 1 diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm index 91611404f86..acf8c879c3e 100644 --- a/code/game/gamemodes/scoreboard.dm +++ b/code/game/gamemodes/scoreboard.dm @@ -26,13 +26,13 @@ // Who is alive/dead, who escaped for (var/mob/living/silicon/ai/I in mob_list) - if (I.stat == 2 && I.z == 1) + if (I.stat == 2 && (I.z in config.station_levels)) score_deadaipenalty = 1 score_deadcrew += 1 for (var/mob/living/carbon/human/I in mob_list) // for (var/datum/ailment/disease/V in I.ailments) // if (!V.vaccine && !V.spread != "Remissive") score_disease++ - if (I.stat == 2 && I.z == 1) score_deadcrew += 1 + if (I.stat == 2 && (I.z in config.station_levels)) score_deadcrew += 1 if (I.job == "Clown") for(var/thing in I.attack_log) if(findtext(thing, "")) score_clownabuse++ @@ -102,7 +102,7 @@ if (location in bad_zone1) score_disc = 0 if (location in bad_zone2) score_disc = 0 if (location in bad_zone3) score_disc = 0 - if (A.loc.z != 1) score_disc = 0 + if (!(A.loc.z in config.station_levels)) score_disc = 0 */ if (score_nuked) for (var/obj/machinery/nuclearbomb/NUKE in machines) @@ -132,13 +132,13 @@ // Check station's power levels for (var/obj/machinery/power/apc/A in machines) - if (A.z != 1) continue + if (!(A.z in config.station_levels)) continue for (var/obj/item/weapon/stock_parts/cell/C in A.contents) if (C.charge < 2300) score_powerloss += 1 // 200 charge leeway // Check how much uncleaned mess is on the station for (var/obj/effect/decal/cleanable/M in world) - if (M.z != 1) continue + if (!(M.z in config.station_levels)) continue if (istype(M, /obj/effect/decal/cleanable/blood/gibs/)) score_mess += 3 if (istype(M, /obj/effect/decal/cleanable/blood/)) score_mess += 1 // if (istype(M, /obj/effect/decal/cleanable/greenpuke)) score_mess += 1 diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index dc215129748..b0471908eaf 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -9,7 +9,6 @@ throw_range = 5 w_class = 1.0 var/used = 0 - flags = FPRINT | TABLEPASS /obj/item/weapon/contract/attack_self(mob/user as mob) @@ -50,7 +49,7 @@ if (used) H << "You already used this contract!" return - var/list/candidates = get_candidates(BE_WIZARD,,"wizard","Syndicate") + var/list/candidates = get_candidates(BE_WIZARD) if(candidates.len) src.used = 1 var/client/C = pick(candidates) @@ -116,7 +115,6 @@ icon = 'icons/obj/wizard.dmi' icon_state = "render" item_state = "render" - flags = FPRINT | TABLEPASS force = 15 throwforce = 10 w_class = 3 @@ -197,7 +195,6 @@ throwforce = 15 damtype = BURN force = 15 - flags = FPRINT | TABLEPASS hitsound = 'sound/items/welder2.ogg' /obj/item/weapon/scrying/attack_self(mob/user as mob) diff --git a/code/game/gamemodes/wizard/raginmages.dm b/code/game/gamemodes/wizard/raginmages.dm index 0f41b86a11e..f726b1c2a22 100644 --- a/code/game/gamemodes/wizard/raginmages.dm +++ b/code/game/gamemodes/wizard/raginmages.dm @@ -73,7 +73,7 @@ var/mob/dead/observer/theghost = null spawn(rand(200, 600)) message_admins("SWF is still pissed, sending another wizard - [max_mages - mages_made] left.") - candidates = get_candidates(BE_WIZARD,,"wizard","Syndicate") + candidates = get_candidates(BE_WIZARD) if(!candidates.len) message_admins("No applicable ghosts for the next ragin' mage, asking ghosts instead.") var/time_passed = world.time diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index ef596e5d5ad..3110498f73e 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -5,7 +5,6 @@ item_state = "electronic" desc = "A fragment of the legendary treasure known simply as the 'Soul Stone'. The shard still flickers with a fraction of the full artefacts power." w_class = 1.0 - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT origin_tech = "bluespace=4;materials=4" var/imprinted = "empty" @@ -90,7 +89,6 @@ icon = 'icons/obj/wizard.dmi' icon_state = "construct" desc = "A wicked machine used by those skilled in magical arts. It is inactive" - flags = FPRINT | TABLEPASS /obj/structure/constructshell/attackby(obj/item/O as obj, mob/user as mob) if(istype(O, /obj/item/device/soulstone)) @@ -118,7 +116,7 @@ U << "\red Capture failed!: \black The soul stone is full! Use or free an existing soul to make room." else for(var/obj/item/W in T) - T.drop_from_inventory(W) + T.unEquip(W) new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton T.invisibility = 101 var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc ) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index d546970870d..5beafdeb055 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -6,7 +6,6 @@ throw_speed = 1 throw_range = 5 w_class = 1.0 - flags = FPRINT | TABLEPASS var/uses = 5 var/temp = null var/max_uses = 5 @@ -555,12 +554,13 @@ if(istype(user, /mob/living/carbon/human)) user <<"HOR-SIE HAS RISEN" var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead - magichead.canremove = 0 //curses! + magichead.flags |= NODROP //curses! magichead.flags_inv = null //so you can still see their face magichead.voicechange = 1 //NEEEEIIGHH - user.drop_from_inventory(user.wear_mask) + if(!user.unEquip(user.wear_mask)) + del user.wear_mask user.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1) - del(src) + del src else user <<"I say thee neigh" diff --git a/code/game/gamemodes/xenos/xenos.dm b/code/game/gamemodes/xenos/xenos.dm index 0d4c7f06b1b..de841595de5 100644 --- a/code/game/gamemodes/xenos/xenos.dm +++ b/code/game/gamemodes/xenos/xenos.dm @@ -200,10 +200,10 @@ else if(playeralienratio >= gammaratio && !gammacalled) gammacalled = 1 - command_alert("The aliens have nearly succeeded in capturing the station and exterminating the crew. Activate the nuclear failsafe to stop the alien threat once and for all. The Nuclear Authentication Code is [get_nuke_code()] ", "Alien Lifeform Alert") + command_announcement.Announce("The aliens have nearly succeeded in capturing the station and exterminating the crew. Activate the nuclear failsafe to stop the alien threat once and for all. The Nuclear Authentication Code is [get_nuke_code()] ", "Alien Lifeform Alert") set_security_level("gamma") var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world - if(V && V.z == 1) + if(V && (V.z in config.station_levels)) V.locked = 0 V.update_icon() return ..() @@ -238,7 +238,7 @@ var/list/livingplayers = list() for(var/mob/M in player_list) var/turf/T = get_turf(M) - if((M) && (M.stat != 2) && M.client && T && (T.z == 1 || emergency_shuttle.departed && (T.z == 1 || T.z == 2))) + if((M) && (M.stat != 2) && M.client && T && ((T.z in config.station_levels) || emergency_shuttle.departed && ((T.z in config.station_levels) || (T.z in config.admin_levels)))) if(ishuman(M)) livingplayers += 1 return livingplayers.len diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm index 177bc7ecfc2..4ec89fad037 100644 --- a/code/game/jobs/job/science.dm +++ b/code/game/jobs/job/science.dm @@ -140,7 +140,7 @@ H.equip_or_collect(new /obj/item/device/pda/roboticist(H), slot_wear_pda) H.equip_or_collect(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit) // H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves) - H.equip_or_collect(new /obj/item/weapon/storage/toolbox/mechanical(H), slot_l_hand) + H.equip_or_collect(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt) if(H.backbag == 1) H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) else diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index 2ad488ab6c4..3962f5a7b39 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -35,10 +35,10 @@ H.equip_or_collect(new /obj/item/weapon/gun/energy/gun(H), slot_s_store) if(H.backbag == 1) H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) - H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_store) + H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_l_store) else H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) - H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack) + H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_in_backpack) H.equip_or_collect(new /obj/item/weapon/melee/telebaton(H.back), slot_in_backpack) var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H @@ -81,10 +81,10 @@ H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store) if(H.backbag == 1) H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) - H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_hand) + H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_l_hand) else H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) - H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack) + H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_in_backpack) var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 @@ -180,10 +180,10 @@ H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store) if(H.backbag == 1) H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) - H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_hand) + H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_l_hand) else H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) - H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack) + H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_in_backpack) var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 @@ -255,10 +255,10 @@ H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store) if(H.backbag == 1) H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand) - H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_hand) + H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_l_hand) else H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack) - H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack) + H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_in_backpack) var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm index 87537e4a571..dc5eea006e1 100644 --- a/code/game/jobs/job/supervisor.dm +++ b/code/game/jobs/job/supervisor.dm @@ -1,3 +1,4 @@ +var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) /datum/job/captain title = "Captain" flag = CAPTAIN @@ -35,7 +36,7 @@ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 - world << "Captain [H.real_name] on deck!" + captain_announcement.Announce("All hands, captain [H.real_name] on deck!") var/datum/organ/external/affected = H.organs_by_name["head"] affected.implants += L L.part = affected diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 1e7dfe99d5f..f678b3afc1b 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -526,6 +526,7 @@ var/global/datum/controller/occupations/job_master var/obj/item/device/pda/pda = locate(/obj/item/device/pda,H) pda.owner = H.real_name pda.ownjob = C.assignment + pda.ownrank = C.rank pda.name = "PDA-[H.real_name] ([pda.ownjob])" return 1 diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 837759072ed..d17f7566782 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -73,7 +73,7 @@ /obj/machinery/optable/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob) - if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr) || usr.weakened || usr.stunned) + if(usr.stat || (!ishuman(usr) && !isrobot(usr)) || usr.restrained() || !check_table(usr) || usr.weakened || usr.stunned) return var/mob/living/L = O diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 1424886eae7..257069a0248 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -458,6 +458,7 @@ alert_signal.transmission_method = 1 alert_signal.data["zone"] = alarm_area.name alert_signal.data["type"] = "Atmospheric" + alert_signal.data["hidden"] = hidden if(alert_level==2) alert_signal.data["alert"] = "severe" @@ -727,15 +728,15 @@ wires.Interact(user) if(!shorted) ui_interact(user) - + /obj/machinery/alarm/proc/can_use(mob/user as mob) if (user.stat && !isobserver(user)) user << "\red You must be conscious to use this [src]!" return 0 - + if(stat & (NOPOWER|BROKEN)) return 0 - + if(buildstage != 2) return 0 @@ -747,7 +748,7 @@ return 0 return 1 - + /obj/machinery/alarm/proc/is_authenticated(mob/user as mob) if(isAI(user) || isrobot(user)) return 1 @@ -757,7 +758,7 @@ /obj/machinery/alarm/Topic(href, href_list) if(..()) return 1 - + if(!can_use(usr)) return 1 @@ -781,7 +782,7 @@ if(href_list["command"]) if(!is_authenticated(usr)) return - + var/device_id = href_list["id_tag"] switch(href_list["command"]) if( "power", @@ -869,7 +870,7 @@ if(href_list["screen"]) if(!is_authenticated(usr)) return - + screen = text2num(href_list["screen"]) ui_interact(usr) return 1 @@ -877,7 +878,7 @@ if(href_list["atmos_alarm"]) if(!is_authenticated(usr)) return - + alarmActivated=1 alarm_area.updateDangerLevel() update_icon() @@ -887,7 +888,7 @@ if(href_list["atmos_reset"]) if(!is_authenticated(usr)) return - + alarmActivated=0 alarm_area.updateDangerLevel() update_icon() @@ -897,7 +898,7 @@ if(href_list["mode"]) if(!is_authenticated(usr)) return - + mode = text2num(href_list["mode"]) apply_mode() ui_interact(usr) @@ -906,7 +907,7 @@ if(href_list["preset"]) if(!is_authenticated(usr)) return - + preset = text2num(href_list["preset"]) apply_preset() ui_interact(usr) @@ -1059,7 +1060,7 @@ Code shamelessly copied from apc_frame desc = "Used for building Air Alarms" icon = 'icons/obj/monitors.dmi' icon_state = "alarm_bitem" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT /obj/item/alarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob) if (istype(W, /obj/item/weapon/wrench)) @@ -1395,7 +1396,7 @@ Code shamelessly copied from apc_frame desc = "Used for building Fire Alarms" icon = 'icons/obj/monitors.dmi' icon_state = "fire_bitem" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT /obj/item/firealarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob) if (istype(W, /obj/item/weapon/wrench)) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 580783b6df1..78760cd3010 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -4,55 +4,23 @@ icon_state = "yellow" density = 1 var/health = 100.0 - flags = FPRINT | CONDUCT + flags = CONDUCT + var/menu = 0 + //used by nanoui: 0 = main menu, 1 = relabel var/valve_open = 0 var/release_pressure = ONE_ATMOSPHERE - var/list/_color = list("yellow", null, null, null)//variable that stores colours - var/list/decals = list() // var that stores the decals, NOTE: Not the actual POSSIBLE decals, but the ones currently used - var/list/oldcolor = list()//lists for check_change() - var/list/olddecals = list() - var/list/possibledecals = list( //var that stores all possible decals, here for adminbus I guess? NOTE: LEAVE "done" IN HERE - "Low temperature canister" = "cold", - "High temperature canister" = "hot", - "Plasma containing canister" = "plasma", - "Done" = "DONE" - ) - var/list/possiblemaincolor = list( //these lists contain the possible colors of a canister, here for adminbus - "\[N2O\]" = "redws", - "\[N2\]" = "red", - "\[O2\]" = "blue", - "\[Toxin (Bio)\]" = "orange", - "\[CO2\]" = "black", - "\[Air\]" = "grey", - "\[CAUTION\]" = "yellow", - "\[SPECIAL\]" = "whiters" - ) - var/list/possibleseccolor = list( // no point in having the N2O and "whiters" ones in these lists - "\[N2\]" = "red-c", - "\[O2\]" = "blue-c", - "\[Toxin (Bio)\]" = "orange-c", - "\[CO2\]" = "black-c", - "\[Air\]" = "grey-c", - "\[CAUTION\]" = "yellow-c" - ) - var/list/possibletertcolor = list( - "\[N2\]" = "red-c-1", - "\[O2\]" = "blue-c-1", - "\[Toxin (Bio)\]" = "orange-c-1", - "\[CO2\]" = "black-c-1", - "\[Air\]" = "grey-c-1", - "\[CAUTION\]" = "yellow-c-1" - ) - var/list/possiblequartcolor = list( - "\[N2\]" = "red-c-2", - "\[O2\]" = "blue-c-2", - "\[Toxin (Bio)\]" = "orange-c-2", - "\[CO2\]" = "black-c-2", - "\[Air\]" = "grey-c-2", - "\[CAUTION\]" = "yellow-c-2" - ) + var/list/_color //variable that stores colours + var/list/decals // list that stores the decals + var/list/possibledecals + var/list/oldcolor//lists for check_change() + var/list/olddecals + var/list/possiblemaincolor //these lists contain the possible colors of a canister + var/list/possibleseccolor + var/list/possibletertcolor + var/list/possiblequartcolor + var/list/colorcontainer //passed to the ui to render the color lists var/can_label = 1 var/filled = 0.5 @@ -64,42 +32,78 @@ var/busy = 0 var/update_flag = 0 -/obj/machinery/portable_atmospherics/canister/sleeping_agent - name = "Canister: \[N2O\]" - icon_state = "redws" - _color = list("redws", null, null, null) - can_label = 0 -/obj/machinery/portable_atmospherics/canister/nitrogen - name = "Canister: \[N2\]" - icon_state = "red" - _color = list("red", null, null, null) - decals = list("plasma") - can_label = 0 -/obj/machinery/portable_atmospherics/canister/oxygen - name = "Canister: \[O2\]" - icon_state = "blue" - _color = list("blue", null, null, null) - can_label = 0 -/obj/machinery/portable_atmospherics/canister/toxins - name = "Canister \[Toxin (Plasma)\]" - icon_state = "orange" - _color = list("orange", null, null, null) - can_label = 0 -/obj/machinery/portable_atmospherics/canister/carbon_dioxide - name = "Canister \[CO2\]" - icon_state = "black" - _color = list("black", null, null, null) - can_label = 0 -/obj/machinery/portable_atmospherics/canister/air - name = "Canister \[Air\]" - icon_state = "grey" - _color = list("grey", null, null, null) - can_label = 0 -/obj/machinery/portable_atmospherics/canister/custom_mix - name = "Canister \[Custom\]" - icon_state = "whiters" - _color = list("whiters", null, null, null) - can_label = 0 + New() + ..() + _color = list( + "prim" = "yellow", + "sec" = null, + "ter" = null, + "quart" = null) + oldcolor = list() + decals = list() + olddecals = list() + possibledecals = list( //var that stores all possible decals, used by ui + list("name" = "Low temperature canister", "icon" = "cold", "active" = 0), + list("name" = "High temperature canister", "icon" = "hot", "active" = 0), + list("name" = "Plasma containing canister", "icon" = "plasma", "active" = 0) + ) + possiblemaincolor = list( //these lists contain the possible colors of a canister + list("name" = "\[N2O\]", "icon" = "redws"), + list("name" = "\[N2\]", "icon" = "red"), + list("name" = "\[O2\]", "icon" = "blue"), + list("name" = "\[Toxin (Bio)\]", "icon" = "orange"), + list("name" = "\[CO2\]", "icon" = "black"), + list("name" = "\[Air\]", "icon" = "grey"), + list("name" = "\[CAUTION\]", "icon" = "yellow"), + list("name" = "\[SPECIAL\]", "icon" = "whiters") + ) + possibleseccolor = list( // no point in having the N2O and "whiters" ones in these lists + list("name" = "\[N2\]", "icon" = "red-c"), + list("name" = "\[O2\]", "icon" = "blue-c"), + list("name" = "\[Toxin (Bio)\]", "icon" = "orange-c"), + list("name" = "\[CO2\]", "icon" = "black-c"), + list("name" = "\[Air\]", "icon" = "grey-c"), + list("name" = "\[CAUTION\]", "icon" = "yellow-c") + ) + possibletertcolor = list( + list("name" = "\[N2\]", "icon" = "red-c-1"), + list("name" = "\[O2\]", "icon" = "blue-c-1"), + list("name" = "\[Toxin (Bio)\]", "icon" = "orange-c-1"), + list("name" = "\[CO2\]", "icon" = "black-c-1"), + list("name" = "\[Air\]", "icon" = "grey-c-1"), + list("name" = "\[CAUTION\]", "icon" = "yellow-c-1") + ) + possiblequartcolor = list( + list("name" = "\[N2\]", "icon" = "red-c-2"), + list("name" = "\[O2\]", "icon" = "blue-c-2"), + list("name" = "\[Toxin (Bio)\]", "icon" = "orange-c-2"), + list("name" = "\[CO2\]", "icon" = "black-c-2"), + list("name" = "\[Air\]", "icon" = "grey-c-2"), + list("name" = "\[CAUTION\]", "icon" = "yellow-c-2") + ) + colorcontainer = list(//passed to the ui to render the color lists + "prim" = list( + "options" = possiblemaincolor, + "name" = "Primary color", + "anycolor" = -1,//0: no color applied. 1: color selected. Not used for primary color. + ), + "sec" = list( + "options" = possibleseccolor, + "name" = "Secondary color", + "anycolor" = 0, + ), + "ter" = list( + "options" = possibletertcolor, + "name" = "Tertiary color", + "anycolor" = 0, + ), + "quart" = list( + "options" = possiblequartcolor, + "name" = "Quaternary color", + "anycolor" = 0, + ) + ) + update_icon() /obj/machinery/portable_atmospherics/canister/proc/check_change() var/old_flag = update_flag @@ -119,10 +123,13 @@ else update_flag |= 32 - if(oldcolor != _color || olddecals != decals) + if(list2params(oldcolor) != list2params(_color)) update_flag |= 64 - olddecals = decals - oldcolor = _color + oldcolor = _color.Copy() + + if(list2params(olddecals) != list2params(decals)) + update_flag |= 128 + olddecals = decals.Copy() if(update_flag == old_flag) return 1 @@ -138,29 +145,31 @@ update_flag 8 = tank_pressure < ONE_ATMOS 16 = tank_pressure < 15*ONE_ATMOS 32 = tank_pressure go boom. -64 = decals/colors got changed +64 = colors +128 = decals +(note: colors and decals has to be applied every icon update) */ if (src.destroyed) src.overlays = 0 - src.icon_state = text("[]-1", src._color[1])//yes, I KNOW the colours don't reflect when the can's borked, whatever. + src.icon_state = text("[]-1", src._color["prim"])//yes, I KNOW the colours don't reflect when the can's borked, whatever. - if(icon_state != src._color[1]) - icon_state = src._color[1] + if(icon_state != src._color["prim"]) + icon_state = src._color["prim"] if(check_change()) //Returns 1 if no change needed to icons. return src.overlays = 0 - if (_color[2])//COLORS! - overlays.Add(_color[2]) + if (_color["sec"])//COLORS! + overlays.Add(_color["sec"]) - if (_color[3]) - overlays.Add(_color[3]) + if (_color["ter"]) + overlays.Add(_color["ter"]) - if (_color[4]) - overlays.Add(_color[4]) + if (_color["quart"]) + overlays.Add(_color["quart"]) for(var/D in decals) overlays.Add("decal-" + D) @@ -177,8 +186,36 @@ update_flag overlays += "can-o2" else if(update_flag & 32) overlays += "can-o3" + + update_flag &= ~196 //the flags 128 and 64 represent change, not states. As such, we have to reset them to be able to detect a change on the next go. return +//template modification exploit prevention, used in Topic() +/obj/machinery/portable_atmospherics/canister/proc/is_a_color(var/inputVar, var/checkColor = "all") + if (checkColor == "prim" || checkColor == "all") + for(var/list/L in possiblemaincolor) + if (L["icon"] == inputVar) + return 1 + if (checkColor == "sec" || checkColor == "all") + for(var/list/L in possibleseccolor) + if (L["icon"] == inputVar) + return 1 + if (checkColor == "ter" || checkColor == "all") + for(var/list/L in possibletertcolor) + if (L["icon"] == inputVar) + return 1 + if (checkColor == "quart" || checkColor == "all") + for(var/list/L in possiblequartcolor) + if (L["icon"] == inputVar) + return 1 + return 0 + +/obj/machinery/portable_atmospherics/canister/proc/is_a_decal(var/inputVar) + for(var/list/L in possibledecals) + if (L["icon"] == inputVar) + return 1 + return 0 + /obj/machinery/portable_atmospherics/canister/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > temperature_resistance) health -= 5 @@ -330,7 +367,11 @@ update_flag // this is the data which will be sent to the ui var/data[0] data["name"] = name + data["menu"] = menu ? 1 : 0 data["canLabel"] = can_label ? 1 : 0 + data["_color"] = _color + data["colorContainer"] = colorcontainer + data["possibleDecals"] = possibledecals data["portConnected"] = connected_port ? 1 : 0 data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0) data["releasePressure"] = round(release_pressure ? release_pressure : 0) @@ -366,6 +407,9 @@ update_flag onclose(usr, "canister") return + if (href_list["choice"] == "menu") + menu = text2num(href_list["mode_target"]) + if(href_list["toggle"]) if (valve_open) if (holding) @@ -394,48 +438,98 @@ update_flag else release_pressure = max(ONE_ATMOSPHERE/10, release_pressure+diff) - if (href_list["relabel"]) + if (href_list["rename"]) if (can_label) + var/T = copytext(sanitize(input("Choose canister label", "Name", name) as text|null),1,MAX_NAME_LEN) + if (can_label) //Exploit prevention + if (T) + name = T + else + name = "canister" + else + usr << "\red As you attempted to rename it the pressure rose!" - var/label1 = input("Choose canister label", "Primary color") as null|anything in possiblemaincolor + if (href_list["choice"] == "Primary color") + if (is_a_color(href_list["icon"],"prim")) + _color["prim"] = href_list["icon"] + if (href_list["choice"] == "Secondary color") + if (href_list["icon"] == "none") + _color["sec"] = "" + colorcontainer["sec"]["anycolor"] = 0 + else if (is_a_color(href_list["icon"],"sec")) + _color["sec"] = href_list["icon"] + colorcontainer["sec"]["anycolor"] = 1 + if (href_list["choice"] == "Tertiary color") + if (href_list["icon"] == "none") + _color["ter"] = "" + colorcontainer["ter"]["anycolor"] = 0 + else if (is_a_color(href_list["icon"],"ter")) + _color["ter"] = href_list["icon"] + colorcontainer["ter"]["anycolor"] = 1 + if (href_list["choice"] == "Quaternary color") + if (href_list["icon"] == "none") + _color["quart"] = "" + colorcontainer["quart"]["anycolor"] = 0 + else if (is_a_color(href_list["icon"],"quart")) + _color["quart"] = href_list["icon"] + colorcontainer["quart"]["anycolor"] = 1 - var/label2 = input("Choose canister label", "Secondary color") as null|anything in possibleseccolor - - var/label3 = input("Choose canister label", "Tertiary color") as null|anything in possibletertcolor - - var/label4 = input("Choose canister label", "Quaternary color") as null|anything in possiblequartcolor - - decals = list() - - _color = list( - (label1 ? possiblemaincolor[label1] : color[1]),//if the user didn't specify a primary colour, keep the current one. - possibleseccolor[label2], - possibletertcolor[label3], - possiblequartcolor[label4] - ) - - decals = list() - - var/list/tempposdecals = possibledecals - while (src && !src.gc_destroyed && usr)//allow the user to select (theoretically) INFINITE DECALS!!! - var/newdecal = input("Choose canister label", "Decal") as anything in tempposdecals - if (newdecal == "Done") + if (href_list["choice"] == "decals") + if (is_a_decal(href_list["icon"])) + for (var/list/L in possibledecals) + if (L["icon"] == href_list["icon"]) + L["active"] = (L["active"] == 0) break - decals.Add(tempposdecals[newdecal]) - tempposdecals.Remove(newdecal) - src.name = (input("Choose canister label", "Name") as text) + " canister" + decals = list() + for (var/list/L in possibledecals) + if (L["active"]) + if (!(L["icon"] in decals)) + decals.Add(L["icon"]) src.add_fingerprint(usr) update_icon() return 1 -/obj/machinery/portable_atmospherics/canister/toxins/New() +/obj/machinery/portable_atmospherics/canister/toxins + name = "Canister \[Toxin (Plasma)\]" + icon_state = "orange" //See New() + can_label = 0 +/obj/machinery/portable_atmospherics/canister/oxygen + name = "Canister: \[O2\]" + icon_state = "blue" //See New() + can_label = 0 +/obj/machinery/portable_atmospherics/canister/sleeping_agent + name = "Canister: \[N2O\]" + icon_state = "redws" //See New() + can_label = 0 +/obj/machinery/portable_atmospherics/canister/nitrogen + name = "Canister: \[N2\]" + icon_state = "red" //See New() + can_label = 0 +/obj/machinery/portable_atmospherics/canister/carbon_dioxide + name = "Canister \[CO2\]" + icon_state = "black" //See New() + can_label = 0 +/obj/machinery/portable_atmospherics/canister/air + name = "Canister \[Air\]" + icon_state = "grey" //See New() + can_label = 0 +/obj/machinery/portable_atmospherics/canister/custom_mix + name = "Canister \[Custom\]" + icon_state = "whiters" //See New() + can_label = 0 + + +/obj/machinery/portable_atmospherics/canister/toxins/New() ..() + _color["prim"] = "orange" + decals = list("plasma") + possibledecals[3]["active"] = 1 src.air_contents.toxins = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature) air_contents.update_values() @@ -443,18 +537,18 @@ update_flag return 1 /obj/machinery/portable_atmospherics/canister/oxygen/New() - ..() + _color["prim"] = "blue" src.air_contents.oxygen = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature) air_contents.update_values() src.update_icon() return 1 /obj/machinery/portable_atmospherics/canister/sleeping_agent/New() - ..() + _color["prim"] = "redws" var/datum/gas/sleeping_agent/trace_gas = new air_contents.trace_gases += trace_gas trace_gas.moles = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature) @@ -480,9 +574,9 @@ update_flag /obj/machinery/portable_atmospherics/canister/nitrogen/New() - ..() + _color["prim"] = "red" src.air_contents.nitrogen = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature) air_contents.update_values() @@ -490,8 +584,9 @@ update_flag return 1 /obj/machinery/portable_atmospherics/canister/carbon_dioxide/New() - ..() + + _color["prim"] = "black" src.air_contents.carbon_dioxide = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature) air_contents.update_values() @@ -500,8 +595,9 @@ update_flag /obj/machinery/portable_atmospherics/canister/air/New() - ..() + + _color["prim"] = "grey" src.air_contents.oxygen = (O2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature) src.air_contents.nitrogen = (N2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature) air_contents.update_values() @@ -512,6 +608,7 @@ update_flag /obj/machinery/portable_atmospherics/canister/custom_mix/New() ..() + _color["prim"] = "whiters" src.update_icon() // Otherwise new canisters do not have their icon updated with the pressure light, likely want to add this to the canister class constructor, avoiding at current time to refrain from screwing up code for other canisters. --DZD return 1 diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm index 42518697027..c7bc14c65d3 100644 --- a/code/game/machinery/atmoalter/meter.dm +++ b/code/game/machinery/atmoalter/meter.dm @@ -24,23 +24,15 @@ /obj/machinery/meter/process() if(!target) icon_state = "meterX" - // Pop the meter off when the pipe we're attached to croaks. - new /obj/item/pipe_meter(src.loc) - spawn(0) del(src) return 0 if(stat & (BROKEN|NOPOWER)) icon_state = "meter0" return 0 - //use_power(5) - var/datum/gas_mixture/environment = target.return_air() if(!environment) icon_state = "meterX" - // Pop the meter off when the environment we're attached to croaks. - new /obj/item/pipe_meter(src.loc) - spawn(0) del(src) return 0 var/env_pressure = environment.return_pressure() @@ -87,28 +79,31 @@ return t /obj/machinery/meter/examine() - set src in view(3) - var/t = "A gas flow meter. " - t += status() + + if(get_dist(usr, src) > 3 && !(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/dead))) + t += "\blue You are too far away to read it." + + else if(stat & (NOPOWER|BROKEN)) + t += "\red The display is off." + + else if(src.target) + var/datum/gas_mixture/environment = target.return_air() + if(environment) + t += "The pressure gauge reads [round(environment.return_pressure(), 0.01)] kPa; [round(environment.temperature,0.01)]K ([round(environment.temperature-T0C,0.01)]°C)" + else + t += "The sensor error light is blinking." + else + t += "The connect error light is blinking." + usr << t - - /obj/machinery/meter/Click() - - if(stat & (NOPOWER|BROKEN)) + if(istype(usr, /mob/living/silicon/ai)) // ghosts can call ..() for examine + usr.examine(src) return 1 - - var/t = null - if (get_dist(usr, src) <= 3 || istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/dead)) - t += status() - else - usr << "\blue You are too far away." - return 1 - - usr << t - return 1 + + return ..() /obj/machinery/meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) if (!istype(W, /obj/item/weapon/wrench)) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 143853269dc..1774a349e63 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -15,6 +15,9 @@ var/max_g_amount = 75000.0 var/operating = 0.0 + var/list/queue = list() + var/queue_max_len = 10 + var/turf/BuildTurf anchored = 1.0 var/list/L = list() var/list/LL = list() @@ -44,7 +47,7 @@ "Medical", "Miscellaneous", "Security", - "Tools" + "Tools" ) /obj/machinery/autolathe/New() @@ -61,7 +64,7 @@ wires = new(src) files = new /datum/research/autolathe(src) matching_designs = list() - + /obj/machinery/autolathe/upgraded/New() ..() component_parts = list() @@ -72,7 +75,7 @@ component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(null) component_parts += new /obj/item/weapon/stock_parts/console_screen(null) RefreshParts() - + /obj/machinery/autolathe/interact(mob/user) if(shocked && !(stat & NOPOWER)) shock(user,50) @@ -92,7 +95,7 @@ if(AUTOLATHE_SEARCH_MENU) dat = search_win(user) - var/datum/browser/popup = new(user, "autolathe", name, 500, 500) + var/datum/browser/popup = new(user, "autolathe", name, 800, 500) popup.set_content(dat) popup.open() @@ -151,7 +154,7 @@ flick("autolathe_r",src)//plays glass insertion animation stack.use(amount) else - if(!user.before_take_item(O)) + if(!user.unEquip(O)) user << "/the [O] is stuck to your hand, you can't put it in \the [src]!" O.loc = src icon_state = "autolathe" @@ -234,17 +237,74 @@ g_amount = 0 busy = 0 src.updateUsrDialog() - + if(href_list["search"]) matching_designs.Cut() for(var/datum/design/D in files.known_designs) if(findtext(D.name,href_list["to_search"])) matching_designs.Add(D) - + else usr << "The autolathe is busy. Please wait for completion of previous operation." + if(href_list["menu"]) + screen = text2num(href_list["menu"]) + + if(href_list["category"]) + selected_category = href_list["category"] + + if(href_list["make"]) + BuildTurf = get_step(src.loc, get_dir(src,usr)) + + ///////////////// + //href protection + being_built = files.FindDesignByID(href_list["make"]) //check if it's a valid design + if(!being_built) + return + if(!(being_built.build_type & AUTOLATHE)) + return + + //multiplier checks : only stacks can have one and its value is 1, 10 ,25 or max_multiplier + var/multiplier = text2num(href_list["multiplier"]) + var/max_multiplier = min(50, being_built.materials["$metal"] ?round(m_amount/being_built.materials["$metal"]):INFINITY,being_built.materials["$glass"]?round(g_amount/being_built.materials["$glass"]):INFINITY) + var/is_stack = ispath(being_built.build_path, /obj/item/stack) + + if(!is_stack && (multiplier > 1)) + return + if (!(multiplier in list(1,10,25,max_multiplier))) //"enough materials ?" is checked in the build proc + return + ///////////////// + + if(queue.len1) + output += "[initial(part.name)][is_stack?" (x[multiplier])":null] - [i>1?"":null] [i↓":null] Remove" + temp_metal = max(temp_metal-LL[1],1) + temp_glass = max(temp_glass-LL[2],1) + + output += "" + output += "Clear queue" + output += "" + return output + +/obj/machinery/autolathe/proc/add_to_queue(D,var/multiplier) + if(!istype(queue)) + queue = list() + if(D) + queue.Add(list(list(D,multiplier))) + return queue.len + +/obj/machinery/autolathe/proc/remove_from_queue(index) + if(!isnum(index) || !istype(queue) || (index<1 || index>queue.len)) + return 0 + queue.Cut(index,++index) + return 1 + +/obj/machinery/autolathe/proc/process_queue() + var/datum/design/D = queue[1][1] + var/multiplier = queue[1][2] + if(!D) + remove_from_queue(1) + if(queue.len) + return process_queue() + else + return + while(D) + if(stat&(NOPOWER|BROKEN)) + return 0 + if(!can_build(D,multiplier)) + visible_message("\icon[src] \The [src] beeps, \"Not enough resources. Queue processing terminated.\"") + queue = list() + return 0 + + remove_from_queue(1) + build_item(D,multiplier) + D = listgetindex(listgetindex(queue, 1),1) + multiplier = listgetindex(listgetindex(queue,1),2) + //visible_message("\icon[src] \The [src] beeps, \"Queue processing finished successfully.\"") + /obj/machinery/autolathe/proc/main_win(mob/user) - var/dat = "

Autolathe Menu:


" + var/dat = "" + dat += "
" + dat += "

Autolathe Menu:


" dat += "Metal amount: [src.m_amount] / [max_m_amount] cm3
" dat += "Glass amount: [src.g_amount] / [max_g_amount] cm3" @@ -285,11 +471,16 @@ line_length++ dat += "
" + dat += "" + dat += get_queue() + dat += "" return dat /obj/machinery/autolathe/proc/category_win(mob/user,var/selected_category) - var/dat = "Return to main menu" - dat += "

Browsing [selected_category]:


" + var/dat = "" + dat += get_queue() + dat += "
" + dat += "
" + dat += "Return to main menu" + dat += "

Browsing [selected_category]:


" dat += "Metal amount: [src.m_amount] / [max_m_amount] cm3
" dat += "Glass amount: [src.g_amount] / [max_g_amount] cm3
" @@ -314,11 +505,16 @@ dat += "[get_design_cost(D)]
" dat += "
" + dat += "
" return dat - + /obj/machinery/autolathe/proc/search_win(mob/user) - var/dat = "Return to main menu" - dat += "

Search results:


" + var/dat = "" + dat += get_queue() + dat += "
" + dat += "
" + dat += "Return to main menu" + dat += "

Search results:


" dat += "Metal amount: [src.m_amount] / [max_m_amount] cm3
" dat += "Glass amount: [src.g_amount] / [max_g_amount] cm3
" @@ -340,19 +536,13 @@ dat += "[get_design_cost(D)]
" dat += "
" + dat += "
" return dat -/obj/machinery/autolathe/proc/can_build(var/datum/design/D) - var/coeff = (ispath(D.build_path,/obj/item/stack) ? 1 : 2 ** prod_coeff) - - if(D.materials["$metal"] && (m_amount < (D.materials["$metal"] / coeff))) - return 0 - if(D.materials["$glass"] && (g_amount < (D.materials["$glass"] / coeff))) - return 0 - return 1 - /obj/machinery/autolathe/proc/get_design_cost(var/datum/design/D) - var/coeff = (ispath(D.build_path,/obj/item/stack) ? 1 : 2 ** prod_coeff) + var/coeff = get_coeff(D) var/dat if(D.materials["$metal"]) dat += "[D.materials["$metal"] / coeff] metal " @@ -378,7 +568,7 @@ if(hack) for(var/datum/design/D in files.possible_designs) - if((D.build_type & 4) && ("hacked" in D.category)) + if((D.build_type & AUTOLATHE) && ("hacked" in D.category)) files.known_designs += D else for(var/datum/design/D in files.known_designs) diff --git a/code/game/machinery/bees_items.dm b/code/game/machinery/bees_items.dm index 01ed5bfa407..01e5d96ac02 100644 --- a/code/game/machinery/bees_items.dm +++ b/code/game/machinery/bees_items.dm @@ -65,7 +65,6 @@ name = "bottle of BeezEez" icon = 'icons/obj/chemical.dmi' icon_state = "bottle17" - flags = FPRINT | TABLEPASS New() src.pixel_x = rand(-5.0, 5) src.pixel_y = rand(-5.0, 5) diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm index 0a9eca25078..24335ebd65a 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/game/machinery/biogenerator.dm @@ -55,12 +55,12 @@ if(beaker) user << "A container is already loaded into the machine." else - user.before_take_item(O) + user.unEquip(O) O.loc = src beaker = O user << "You add the container to the machine." updateUsrDialog() - + if(!processing) if(default_deconstruction_screwdriver(user, "biogen-empty-o", "biogen-empty", O)) if(beaker) @@ -72,7 +72,7 @@ if(exchange_parts(user, O)) return - else if(istype(O, /obj/item/weapon/crowbar)) + else if(istype(O, /obj/item/weapon/crowbar)) else if(panel_open) user << "Close the maintenance panel first." else if(processing) @@ -105,13 +105,13 @@ if(i >= 10) user << "The biogenerator is full! Activate it." else - user.before_take_item(O) + user.unEquip(O) O.loc = src user << "You put [O.name] in [src.name]" - default_deconstruction_crowbar(O) - + default_deconstruction_crowbar(O) + update_icon() return @@ -246,14 +246,14 @@ if(in_beaker) if(check_container_volume(10)) return 0 else beaker.reagents.add_reagent("left4zed",10) - else + else new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc) if("rh") if (check_cost(25/efficiency)) return 0 if(in_beaker) if(check_container_volume(10)) return 0 else beaker.reagents.add_reagent("robustharvest",10) - else + else new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc) if("wallet") if (check_cost(100/efficiency)) return 0 @@ -324,7 +324,7 @@ else if(href_list["menu"]) menustat = "menu" updateUsrDialog() - + else if(href_list["inbeaker"]) in_beaker = !in_beaker updateUsrDialog() \ No newline at end of file diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm index 539dd775b0f..8cf8c77c66c 100644 --- a/code/game/machinery/bots/bots.dm +++ b/code/game/machinery/bots/bots.dm @@ -237,8 +237,6 @@ user << "Maintenance panel is now [open ? "opened" : "closed"]." else user << "Maintenance panel is locked." - else if (istype(W, /obj/item/weapon/card/emag) && emagged < 2) - Emag(user) else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm") if(health >= maxhealth) @@ -267,7 +265,10 @@ ..() healthcheck() - +/obj/machinery/bot/emag_act(user as mob) + if (emagged < 2) + Emag(user) + /obj/machinery/bot/bullet_act(var/obj/item/projectile/Proj) if((Proj.damage_type == BRUTE || Proj.damage_type == BURN)) health -= Proj.damage @@ -583,7 +584,7 @@ obj/machinery/bot/proc/start_patrol() new_destination = "__nearest__" post_signal(beacon_freq, "findbeacon", "patrol") awaiting_beacon = 1 - spawn(150) + spawn(200) awaiting_beacon = 0 if(nearest_beacon) set_destination(nearest_beacon) diff --git a/code/game/machinery/bots/cleanbot.dm b/code/game/machinery/bots/cleanbot.dm index 5c4d3bf9200..e30bfa45283 100644 --- a/code/game/machinery/bots/cleanbot.dm +++ b/code/game/machinery/bots/cleanbot.dm @@ -272,7 +272,7 @@ text("[on ? "On" : "Off"]")) var/obj/machinery/bot/cleanbot/A = new /obj/machinery/bot/cleanbot(T) A.name = created_name user << "You add the robot arm to the bucket and sensor assembly. Beep boop!" - user.before_take_item(src, 1) + user.unEquip(src, 1) qdel(src) else if (istype(W, /obj/item/weapon/pen)) diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm index 8e6855a8dbf..703b0b7dd82 100644 --- a/code/game/machinery/bots/ed209bot.dm +++ b/code/game/machinery/bots/ed209bot.dm @@ -299,16 +299,15 @@ Auto Patrol[]"}, if(!arrest_type) if(!target.handcuffed) //he's not cuffed? Try to cuff him! mode = BOT_ARREST - playsound(loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2) - target.visible_message("[src] is trying to put handcuffs on [target]!",\ - "[src] is trying to put handcuffs on [target]!") - + playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) + target.visible_message("[src] is trying to put zipties on [target]!",\ + "[src] is trying to put zipties on [target]!") spawn(30) if( !Adjacent(target) || !isturf(target.loc) ) //if he's in a closet or not adjacent, we cancel cuffing. return if(!target.handcuffed) - target.handcuffed = new /obj/item/weapon/handcuffs(target) - target.update_inv_handcuffed(0) //update the handcuffs overlay + target.handcuffed = new /obj/item/weapon/restraints/handcuffs/cable/zipties/used(target) + target.update_inv_handcuffed(1) //update the handcuffs overlay back_to_idle() else back_to_idle() @@ -672,7 +671,7 @@ Auto Patrol[]"}, new /obj/machinery/bot/ed209(T,created_name,lasercolor) user.drop_item() qdel(W) - user.before_take_item(src, 1) + user.unEquip(src, 1) qdel(src) diff --git a/code/game/machinery/bots/farmbot.dm b/code/game/machinery/bots/farmbot.dm index f2981c70fe1..3c13b04ff96 100644 --- a/code/game/machinery/bots/farmbot.dm +++ b/code/game/machinery/bots/farmbot.dm @@ -544,7 +544,7 @@ A.loc = src.loc user << "You add the robot arm to the [src]" src.loc = A //Place the water tank into the assembly, it will be needed for the finished bot - user.u_equip(S) + user.unEquip(S) del(S) /obj/item/weapon/farmbot_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob) @@ -553,21 +553,21 @@ src.build_step++ user << "You add the plant analyzer to [src]!" src.name = "farmbot assembly" - user.u_equip(W) + user.unEquip(W) del(W) else if(( istype(W, /obj/item/weapon/reagent_containers/glass/bucket)) && (src.build_step == 1)) src.build_step++ user << "You add a bucket to [src]!" src.name = "farmbot assembly with bucket" - user.u_equip(W) + user.unEquip(W) del(W) else if(( istype(W, /obj/item/weapon/minihoe)) && (src.build_step == 2)) src.build_step++ user << "You add a minihoe to [src]!" src.name = "farmbot assembly with bucket and minihoe" - user.u_equip(W) + user.unEquip(W) del(W) else if((isprox(W)) && (src.build_step == 3)) @@ -579,7 +579,7 @@ S.tank = wTank S.loc = get_turf(src) S.name = src.created_name - user.u_equip(W) + user.unEquip(W) del(W) del(src) diff --git a/code/game/machinery/bots/floorbot.dm b/code/game/machinery/bots/floorbot.dm index eede1892d76..3752796f90f 100644 --- a/code/game/machinery/bots/floorbot.dm +++ b/code/game/machinery/bots/floorbot.dm @@ -491,7 +491,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target) var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles user.put_in_hands(B) user << "You add the tiles into the empty toolbox. They protrude from the top." - user.before_take_item(src, 1) + user.unEquip(src, 1) qdel(src) else user << "You need 10 floor tiles to start building a floorbot." @@ -505,7 +505,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target) B.created_name = created_name user.put_in_hands(B) user << "You add the sensor to the toolbox and tiles!" - user.before_take_item(src, 1) + user.unEquip(src, 1) qdel(src) else if (istype(W, /obj/item/weapon/pen)) @@ -525,7 +525,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target) var/obj/machinery/bot/floorbot/A = new /obj/machinery/bot/floorbot(T) A.name = created_name user << "You add the robot arm to the odd looking toolbox assembly! Boop beep!" - user.before_take_item(src, 1) + user.unEquip(src, 1) qdel(src) else if (istype(W, /obj/item/weapon/pen)) var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN) diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm index c77a5477e13..084514ecd85 100644 --- a/code/game/machinery/bots/medbot.dm +++ b/code/game/machinery/bots/medbot.dm @@ -564,7 +564,7 @@ qdel(S) user.put_in_hands(A) user << "You add the robot arm to the first aid kit." - user.before_take_item(src, 1) + user.unEquip(src, 1) qdel(src) @@ -598,5 +598,5 @@ var/obj/machinery/bot/medbot/S = new /obj/machinery/bot/medbot(T) S.skin = skin S.name = created_name - user.before_take_item(src, 1) + user.unEquip(src, 1) qdel(src) \ No newline at end of file diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index f9016a1061f..19ef2058f43 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -87,12 +87,7 @@ var/global/mulebot_count = 0 // cell: insert it // other: chance to knock rider off bot /obj/machinery/bot/mulebot/attackby(var/obj/item/I, var/mob/user) - if(istype(I,/obj/item/weapon/card/emag)) - locked = !locked - user << "You [locked ? "lock" : "unlock"] the mulebot's controls!" - flick("mulebot-emagged", src) - playsound(loc, 'sound/effects/sparks1.ogg', 100, 0) - else if(istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda)) + if(istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda)) if(toggle_lock(user)) user << "Controls [(locked ? "locked" : "unlocked")]." updateUsrDialog() @@ -139,7 +134,12 @@ var/global/mulebot_count = 0 ..() return - +/obj/machinery/bot/mulebot/emag_act(user as mob) + locked = !locked + user << "You [locked ? "lock" : "unlock"] the mulebot's controls!" + flick("mulebot-emagged", src) + playsound(loc, 'sound/effects/sparks1.ogg', 100, 0) + /obj/machinery/bot/mulebot/ex_act(var/severity) unload(0) switch(severity) diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm index fecf5cdcb26..d7d9d24a774 100644 --- a/code/game/machinery/bots/secbot.dm +++ b/code/game/machinery/bots/secbot.dm @@ -52,7 +52,7 @@ desc = "It's Officer Pingsky! Delegated to satellite guard duty for harbouring anti-human sentiment." radio_frequency = AIPRIV_FREQ radio_name = "AI Private" - + /obj/machinery/bot/secbot/ofitser name = "Prison Ofitser" desc = "It's Prison Ofitser! Powered by the tears and sweat of prisoners." @@ -286,15 +286,15 @@ Auto Patrol: []"}, if(!arrest_type) if(!target.handcuffed) //he's not cuffed? Try to cuff him! mode = BOT_ARREST - playsound(loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2) - target.visible_message("[src] is trying to put handcuffs on [target]!",\ - "[src] is trying to put handcuffs on [target]!") - spawn(60) + playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) + target.visible_message("[src] is trying to put zipties on [target]!",\ + "[src] is trying to put zipties on [target]!") + spawn(30) if( !Adjacent(target) || !isturf(target.loc) ) //if he's in a closet or not adjacent, we cancel cuffing. return if(!target.handcuffed) - target.handcuffed = new /obj/item/weapon/handcuffs(target) - target.update_inv_handcuffed(0) //update the handcuffs overlay + target.handcuffed = new /obj/item/weapon/restraints/handcuffs/cable/zipties/used(target) + target.update_inv_handcuffed(1) //update the handcuffs overlay playsound(loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0) back_to_idle() else @@ -428,7 +428,7 @@ Auto Patrol: []"}, var/obj/item/weapon/secbot_assembly/A = new /obj/item/weapon/secbot_assembly user.put_in_hands(A) user << "You add the signaler to the helmet." - user.before_take_item(src, 1) + user.unEquip(src, 1) qdel(src) else return diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 977c1bd3d3e..865bf2f3cb8 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -8,17 +8,20 @@ active_power_usage = 10 layer = 5 - var/datum/wires/camera/wires = null // Wires datum var/list/network = list("SS13") var/c_tag = null var/c_tag_order = 999 - var/status = 1.0 + var/status = 1 anchored = 1.0 - var/invuln = null + panel_open = 0 // 0 = Closed / 1 = Open + var/indestructible = 0 var/bugged = 0 var/obj/item/weapon/camera_assembly/assembly = null - var/watcherslist = list() - var/obj/item/device/camera_bug/hasbug = null + + var/toughness = 5 //sorta fragile + + // WIRES + var/datum/wires/camera/wires = null // Wires datum //OTHER @@ -28,15 +31,18 @@ var/light_disabled = 0 var/alarm_on = 0 var/busy = 0 - var/indestructible = 0 // If set, prevents aliens from destroying it + + var/obj/item/device/camera_bug/hasbug = null /obj/machinery/camera/New() wires = new(src) - assembly = new(src) assembly.state = 4 + + //invalidateCameraCache() + /* // Use this to look for cameras that have the same c_tag. - for(var/obj/machinery/camera/C in cameranet.viewpoints) + for(var/obj/machinery/camera/C in cameranet.cameras) var/list/tempnetwork = C.network&src.network if(C != src && C.c_tag == src.c_tag && tempnetwork.len) world.log << "[src.c_tag] [src.x] [src.y] [src.z] conflicts with [C.c_tag] [C.x] [C.y] [C.z]" @@ -50,51 +56,48 @@ ASSERT(src.network.len > 0) ..() +/obj/machinery/camera/Del() + if(!alarm_on) + triggerCameraAlarm() + + cancelCameraAlarm() + ..() + /obj/machinery/camera/emp_act(severity) if(!isEmpProof()) if(prob(100/severity)) - icon_state = "[initial(icon_state)]emp" - var/list/previous_network = network - network = list() - cameranet.removeCamera(src) + //invalidateCameraCache() stat |= EMPED SetLuminosity(0) + kick_viewers() triggerCameraAlarm() + update_icon() + spawn(900) - network = previous_network - icon_state = initial(icon_state) stat &= ~EMPED cancelCameraAlarm() - if(can_use()) - cameranet.addCamera(src) - for(var/mob/O in mob_list) - if(O.client && O.client.eye == src) - O.unset_machine() - O.reset_view(null) - O << "The screen bursts into static." + update_icon() + //invalidateCameraCache() ..() +/obj/machinery/camera/bullet_act(var/obj/item/projectile/P) + if(P.damage_type == BRUTE || P.damage_type == BURN) + take_damage(P.damage) /obj/machinery/camera/ex_act(severity) - if(src.invuln) + if(indestructible) return - else - ..(severity) - return + + //camera dies if an explosion touches it! + if(severity <= 2 || prob(50)) + destroy() + + ..() //and give it the regular chance of being deleted outright + /obj/machinery/camera/blob_act() - del(src) return - -/obj/machinery/camera/proc/setViewRange(var/num = 7) - src.view_range = num - cameranet.updateVisibility(src, 0) - -/obj/machinery/camera/proc/shock(var/mob/living/user) - if(!istype(user)) - return - user.electrocute_act(10, src) - + /obj/machinery/camera/attack_paw(mob/living/carbon/alien/humanoid/user as mob) if(!istype(user)) return @@ -107,10 +110,22 @@ add_hiddenprint(user) deactivate(user,0) -/obj/machinery/camera/attackby(W as obj, mob/living/user as mob) +/obj/machinery/camera/hitby(AM as mob|obj) + ..() + if (istype(AM, /obj)) + var/obj/O = AM + if (O.throwforce >= src.toughness) + visible_message("[src] was hit by [O].") + take_damage(O.throwforce) +/obj/machinery/camera/proc/setViewRange(var/num = 7) + src.view_range = num + cameranet.updateVisibility(src, 0) + +/obj/machinery/camera/attackby(obj/W as obj, mob/living/user as mob) + //invalidateCameraCache() // DECONSTRUCTION - if(istype(W, /obj/item/weapon/screwdriver)) + if(isscrewdriver(W)) //user << "You start to [panel_open ? "close" : "open"] the camera's panel." //if(toggle_panel(user)) // No delay because no one likes screwdrivers trying to be hip and have a duration cooldown panel_open = !panel_open @@ -118,19 +133,21 @@ "You screw the camera's panel [panel_open ? "open" : "closed"].") playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - else if((istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool)) && panel_open) - wires.Interact(user) + else if((iswirecutter(W) || ismultitool(W)) && panel_open) + interact(user) - else if(istype(W, /obj/item/weapon/weldingtool) && wires.CanDeconstruct()) + else if(iswelder(W) && (wires.CanDeconstruct() || (stat & BROKEN))) if(weld(W, user)) - if(assembly) + if (stat & BROKEN) + new /obj/item/stack/cable_coil(src.loc, length=2) + else if(assembly) assembly.loc = src.loc assembly.state = 1 + new /obj/item/stack/cable_coil(src.loc, length=2) del(src) - // OTHER - else if ((istype(W, /obj/item/weapon/paper) || istype(W, /obj/item/device/pda)) && isliving(user)) + else if (can_use() && (istype(W, /obj/item/weapon/paper) || istype(W, /obj/item/device/pda)) && isliving(user)) var/mob/living/U = user var/obj/item/weapon/paper/X = null var/obj/item/device/pda/P = null @@ -152,11 +169,12 @@ else O << "[U] holds \a [itemname] up to one of your cameras ..." O << browse(text("[][]", itemname, info), text("window=[]", itemname)) for(var/mob/O in player_list) - if(O.client && O.client.eye == src) - O.unset_machine() - O.reset_view(null) - O << "[U] holds \a [itemname] up to the camera..." - O << browse("[itemname][info]","window=[itemname]") + if (istype(O.machine, /obj/machinery/computer/security)) + var/obj/machinery/computer/security/S = O.machine + if (S.current == src) + O << "[U] holds \a [itemname] up to one of the cameras ..." + O << browse(text("[][]", itemname, info), text("window=[]", itemname)) + else if (istype(W, /obj/item/device/camera_bug) && panel_open) if (!src.can_use()) user << "\blue Camera non-functional" @@ -165,32 +183,24 @@ user << "\blue Camera bugged." user.drop_item(W) hasbug = W - contents += W - if(prob(15)) - spawn(30) - if(src.can_use() && hasbug) - desc += "
The power light on the camera is blinking" - triggerCameraAlarm() + src.bugged = 1 else if (iscrowbar(W) && panel_open && src.hasbug) user << "\blue You retrieve \the [hasbug]" user.put_in_hands(hasbug) hasbug = null - deactivatebug(user) - else if(istype(W, /obj/item/weapon/melee/energy/blade))//Putting it here last since it's a special case. I wonder if there is a better way to do these than type casting. - deactivate(user,2)//Here so that you can disconnect anyone viewing the camera, regardless if it's on or off. - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() - spark_system.set_up(5, 0, loc) - spark_system.start() - playsound(loc, 'sound/weapons/blade1.ogg', 50, 1) - playsound(loc, "sparks", 50, 1) - visible_message("\blue The camera has been sliced apart by [] with an energy blade!") - del(src) - else if(istype(W, /obj/item/device/laser_pointer)) - var/obj/item/device/laser_pointer/L = W - L.laser_act(src, user) + deactivatebug(user) + else if(W.damtype == BRUTE || W.damtype == BURN) //bashing cameras + if (W.force >= src.toughness) + visible_message("[src] has been [pick(W.attack_verb)] with [W] by [user]!") + if (istype(W, /obj/item)) //is it even possible to get into attackby() with non-items? + var/obj/item/I = W + if (I.hitsound) + playsound(loc, I.hitsound, 50, 1, -1) + take_damage(W.force) + else ..() - return + /obj/machinery/camera/proc/deactivatebug(user as mob) for(var/mob/O in player_list) if(istype(O.machine, /obj/item/device/handtv)) @@ -201,50 +211,91 @@ O << "The screen bursts into static." /obj/machinery/camera/proc/deactivate(user as mob, var/choice = 1) - if(choice==1) - status = !( src.status ) + if(choice != 1) + //legacy support, if choice is != 1 then just kick viewers without changing status + kick_viewers() + else + //invalidateCameraCache() + set_status( !src.status ) if (!(src.status)) - if(user) - visible_message("\red [user] has deactivated [src]!") - add_hiddenprint(user) - else - visible_message("\red \The [src] deactivates!") + visible_message("\red [user] has deactivated [src]!") playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) icon_state = "[initial(icon_state)]1" add_hiddenprint(user) else - if(user) - visible_message("\red [user] has reactivated [src]!") - add_hiddenprint(user) - else - visible_message("\red \the [src] reactivates!") + visible_message("\red [user] has reactivated [src]!") playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) icon_state = initial(icon_state) add_hiddenprint(user) - // now disconnect anyone using the camera - //Apparently, this will disconnect anyone even if the camera was re-activated. - //I guess that doesn't matter since they can't use it anyway? + +/obj/machinery/camera/proc/take_damage(var/force, var/message) + //prob(25) gives an average of 3-4 hits + if (force >= toughness && (force > toughness*4 || prob(25))) + destroy() + +//Used when someone breaks a camera +/obj/machinery/camera/proc/destroy() + //invalidateCameraCache() + stat |= BROKEN + kick_viewers() + triggerCameraAlarm() + update_icon() + + //sparks + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, loc) + spark_system.start() + playsound(loc, "sparks", 50, 1) + +/obj/machinery/camera/proc/set_status(var/newstatus) + if (status != newstatus) + status = newstatus + //invalidateCameraCache() + // now disconnect anyone using the camera + //Apparently, this will disconnect anyone even if the camera was re-activated. + //I guess that doesn't matter since they couldn't use it anyway? + kick_viewers() + +//This might be redundant, because of check_eye() +/obj/machinery/camera/proc/kick_viewers() for(var/mob/O in player_list) - if(O.client && O.client.eye == src) - O.unset_machine() - O.reset_view(null) - O << "The screen bursts into static." + if (istype(O.machine, /obj/machinery/computer/security)) + var/obj/machinery/computer/security/S = O.machine + if (S.current == src) + O.unset_machine() + O.reset_view(null) + O << "The screen bursts into static." + +/obj/machinery/camera/update_icon() + if (!status || (stat & BROKEN)) + icon_state = "[initial(icon_state)]1" + else if (stat & EMPED) + icon_state = "[initial(icon_state)]emp" + else + icon_state = initial(icon_state) /obj/machinery/camera/proc/triggerCameraAlarm() alarm_on = 1 + if(!get_area(src)) + return + for(var/mob/living/silicon/S in mob_list) S.triggerAlarm("Camera", get_area(src), list(src), src) /obj/machinery/camera/proc/cancelCameraAlarm() alarm_on = 0 + if(!get_area(src)) + return + for(var/mob/living/silicon/S in mob_list) - S.cancelAlarm("Camera", get_area(src), list(src), src) + S.cancelAlarm("Camera", get_area(src), src) +//if false, then the camera is listed as DEACTIVATED and cannot be used /obj/machinery/camera/proc/can_use() if(!status) return 0 - if(stat & EMPED) + if(stat & (EMPED|BROKEN)) return 0 return 1 @@ -266,13 +317,13 @@ //If someone knows a better way to do this, let me know. -Giacom switch(i) if(NORTH) - src.dir = SOUTH + dir = SOUTH if(SOUTH) - src.dir = NORTH + dir = NORTH if(WEST) - src.dir = EAST + dir = EAST if(EAST) - src.dir = WEST + dir = WEST break //Return a working camera that can see a given mob @@ -312,3 +363,14 @@ return 1 busy = 0 return 0 + +/obj/machinery/camera/interact(mob/living/user as mob) + if(!panel_open || istype(user, /mob/living/silicon/ai)) + return + + if(stat & BROKEN) + user << "\The [src] is broken." + return + + user.set_machine(src) + wires.Interact(user) diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 9f6eb2210af..e8c7656032a 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -1,16 +1,15 @@ /obj/item/weapon/camera_assembly name = "camera assembly" - desc = "The basic construction for Nanotrasen-Always-Watching-You cameras." + desc = "A pre-fabricated security camera kit, ready to be assembled and mounted to a surface." icon = 'icons/obj/monitors.dmi' icon_state = "cameracase" w_class = 2 anchored = 0 - - m_amt = 700 - g_amt = 300 + m_amt = 400 + g_amt = 250 // Motion, EMP-Proof, X-Ray - var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/plasma, /obj/item/weapon/reagent_containers/food/snacks/grown/carrot) + var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/osmium, /obj/item/weapon/stock_parts/scanning_module) var/list/upgrades = list() var/state = 0 var/busy = 0 @@ -59,8 +58,10 @@ if(iscoil(W)) var/obj/item/stack/cable_coil/C = W if(C.use(2)) - user << "You add wires to the assembly." + user << "You add wires to the assembly." state = 3 + else + user << "You need 2 coils of wire to wire the assembly." return else if(iswelder(W)) @@ -87,7 +88,8 @@ usr << "No network found please hang up and try your call again." return - var/temptag = "[get_area(src)] ([rand(1, 999)])" + var/area/camera_area = get_area(src) + var/temptag = "[sanitize(camera_area.name)] ([rand(1, 999)])" input = strip_html(input(usr, "How would you like to name the camera?", "Set Camera Name", temptag)) state = 4 @@ -98,7 +100,7 @@ C.auto_turn() C.network = uniquelist(tempnetwork) - tempnetwork = difflist(C.network,RESTRICTED_CAMERA_NETWORKS) + tempnetwork = difflist(C.network,restricted_camera_networks) if(!tempnetwork.len)//Camera isn't on any open network - remove its chunk from AI visibility. cameranet.removeCamera(C) @@ -124,7 +126,7 @@ // Upgrades! if(is_type_in_list(W, possible_upgrades) && !is_type_in_list(W, upgrades)) // Is a possible upgrade and isn't in the camera already. - user << "You attach the [W] into the assembly inner circuits." + user << "You attach \the [W] into the assembly inner circuits." upgrades += W user.drop_item(W) W.loc = src @@ -169,4 +171,4 @@ return 0 return 1 busy = 0 - return 0 \ No newline at end of file + return 0 diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm index 588ab5005ce..0c6f7d95a7f 100644 --- a/code/game/machinery/camera/motion.dm +++ b/code/game/machinery/camera/motion.dm @@ -8,6 +8,8 @@ /obj/machinery/camera/process() // motion camera event loop + if (stat & (EMPED|NOPOWER)) + return if(!isMotion()) . = PROCESS_KILL return @@ -40,16 +42,20 @@ cancelAlarm() /obj/machinery/camera/proc/cancelAlarm() + if (!status || (stat & NOPOWER)) + return 0 if (detectTime == -1) for (var/mob/living/silicon/aiPlayer in player_list) - if (status) aiPlayer.cancelAlarm("Motion", src.loc.loc) + aiPlayer.cancelAlarm("Motion", get_area(src), src) detectTime = 0 return 1 /obj/machinery/camera/proc/triggerAlarm() + if (!status || (stat & NOPOWER)) + return 0 if (!detectTime) return 0 for (var/mob/living/silicon/aiPlayer in player_list) - if (status) aiPlayer.triggerAlarm("Motion", src.loc.loc, src) + aiPlayer.triggerAlarm("Motion", get_area(src), list(src), src) detectTime = -1 return 1 diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index 0ee0e622b8b..21a9dc10616 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -53,12 +53,14 @@ // CHECKS /obj/machinery/camera/proc/isEmpProof() - var/O = locate(/obj/item/stack/sheet/mineral/plasma) in assembly.upgrades + var/O = locate(/obj/item/stack/sheet/mineral/osmium) in assembly.upgrades return O /obj/machinery/camera/proc/isXRay() - var/O = locate(/obj/item/weapon/reagent_containers/food/snacks/grown/carrot) in assembly.upgrades - return O + var/obj/item/weapon/stock_parts/scanning_module/O = locate(/obj/item/weapon/stock_parts/scanning_module) in assembly.upgrades + if (O && O.rating >= 2) + return O + return null /obj/machinery/camera/proc/isMotion() var/O = locate(/obj/item/device/assembly/prox_sensor) in assembly.upgrades @@ -67,11 +69,22 @@ // UPGRADE PROCS /obj/machinery/camera/proc/upgradeEmpProof() - assembly.upgrades.Add(new /obj/item/stack/sheet/mineral/plasma(assembly)) + assembly.upgrades.Add(new /obj/item/stack/sheet/mineral/osmium(assembly)) + setPowerUsage() /obj/machinery/camera/proc/upgradeXRay() - assembly.upgrades.Add(new /obj/item/weapon/reagent_containers/food/snacks/grown/carrot(assembly)) + assembly.upgrades.Add(new /obj/item/weapon/stock_parts/scanning_module/adv(assembly)) + setPowerUsage() // If you are upgrading Motion, and it isn't in the camera's New(), add it to the machines list. /obj/machinery/camera/proc/upgradeMotion() - assembly.upgrades.Add(new /obj/item/device/assembly/prox_sensor(assembly)) \ No newline at end of file + assembly.upgrades.Add(new /obj/item/device/assembly/prox_sensor(assembly)) + setPowerUsage() + +/obj/machinery/camera/proc/setPowerUsage() + var/mult = 1 + if (isXRay()) + mult++ + if (isMotion()) + mult++ + active_power_usage = mult*initial(active_power_usage) diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 47b2edf9fac..1d60db31a3c 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -1,16 +1,25 @@ +/mob/living/silicon/ai/var/max_locations = 10 +/mob/living/silicon/ai/var/stored_locations[0] + +/mob/living/silicon/ai/proc/InvalidTurf(turf/T as turf) + if(!T) + return 1 + if((T.z in config.station_levels)) + return 1 + if(T.z > 6) + return 1 + return 0 + /mob/living/silicon/ai/proc/get_camera_list() + if(src.stat == 2) return - var/list/L = list() - for (var/obj/machinery/camera/C in cameranet.viewpoints) - L.Add(C) - - camera_sort(L) + cameranet.process_sort() var/list/T = list() T["Cancel"] = "Cancel" - for (var/obj/machinery/camera/C in L) + for (var/obj/machinery/camera/C in cameranet.cameras) var/list/tempnetwork = C.network&src.network if (tempnetwork.len) T[text("[][]", C.c_tag, (C.can_use() ? null : " (Deactivated)"))] = C @@ -19,20 +28,76 @@ track.cameras = T return T + /mob/living/silicon/ai/proc/ai_camera_list(var/camera in get_camera_list()) + set category = "AI Commands" + set name = "Show Camera List" + if(src.stat == 2) src << "You can't list the cameras because you are dead!" return if (!camera || camera == "Cancel") return 0 - + var/obj/machinery/camera/C = track.cameras[camera] - track = null src.eyeobj.setLoc(C) return +/mob/living/silicon/ai/proc/ai_store_location(loc as text) + set category = "AI Commands" + set name = "Store Camera Location" + set desc = "Stores your current camera location by the given name" + + loc = sanitize(copytext(loc, 1, MAX_MESSAGE_LEN)) + if(!loc) + src << "\red Must supply a location name" + return + + if(stored_locations.len >= max_locations) + src << "\red Cannot store additional locations. Remove one first" + return + + if(loc in stored_locations) + src << "\red There is already a stored location by this name" + return + + var/L = src.eyeobj.getLoc() + if (InvalidTurf(get_turf(L))) + src << "\red Unable to store this location" + return + + stored_locations[loc] = L + src << "Location '[loc]' stored" + +/mob/living/silicon/ai/proc/sorted_stored_locations() + return sortList(stored_locations) + +/mob/living/silicon/ai/proc/ai_goto_location(loc in sorted_stored_locations()) + set category = "AI Commands" + set name = "Goto Camera Location" + set desc = "Returns to the selected camera location" + + if (!(loc in stored_locations)) + src << "\red Location [loc] not found" + return + + var/L = stored_locations[loc] + src.eyeobj.setLoc(L) + +/mob/living/silicon/ai/proc/ai_remove_location(loc in sorted_stored_locations()) + set category = "AI Commands" + set name = "Delete Camera Location" + set desc = "Deletes the selected camera location" + + if (!(loc in stored_locations)) + src << "\red Location [loc] not found" + return + + stored_locations.Remove(loc) + src << "Location [loc] removed" + // Used to allow the AI is write in mob names/camera name from the CMD line. /datum/trackable var/list/names = list() @@ -50,12 +115,7 @@ for(var/mob/living/M in mob_list) // Easy checks first. // Don't detect mobs on Centcom. Since the wizard den is on Centcomm, we only need this. - var/turf/T = get_turf(M) - if(!T) - continue - if(T.z == 2) - continue - if(T.z > 6) + if(InvalidTurf(get_turf(M))) continue if(M == usr) continue @@ -72,11 +132,8 @@ //Cameras can't track people wearing an agent card or a ninja hood. if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate)) continue - if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja)) - var/obj/item/clothing/head/helmet/space/space_ninja/hood = H.head - if(!hood.canremove) - continue - + if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && (H.head.flags & NODROP)) + continue // Now, are they viewable by a camera? (This is last because it's the most intensive check) if(!near_camera(M)) continue @@ -98,6 +155,10 @@ return targets /mob/living/silicon/ai/proc/ai_camera_track(var/target_name in trackable_mobs()) + set category = "AI Commands" + set name = "Track With Camera" + set desc = "Select who you would like to track." + if(src.stat == 2) src << "You can't track with camera because you are dead!" return @@ -108,61 +169,18 @@ src.track = null ai_actual_track(target) -/mob/living/silicon/ai/proc/open_nearest_door(mob/living/target as mob) - if(!istype(target)) return - spawn(0) - if(istype(target, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = target - if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate)) - src << "Unable to locate an airlock" - return - if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate)) - src << "Unable to locate an airlock" - return - if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && !H.head.canremove) - src << "Unable to locate an airlock" - return - if(H.digitalcamo) - src << "Unable to locate an airlock" - return - if (!near_camera(target)) - src << "Target is not near any active cameras." - return - var/obj/machinery/door/airlock/tobeopened - var/dist = -1 - for(var/obj/machinery/door/airlock/D in range(3,target)) - if(!D.density) continue - if(dist < 0) - dist = get_dist(D, target) - //world << dist - tobeopened = D - else - if(dist > get_dist(D, target)) - dist = get_dist(D, target) - //world << dist - tobeopened = D - //world << "found [tobeopened.name] closer" - else - //world << "[D.name] not close enough | [get_dist(D, target)] | [dist]" - if(tobeopened) - switch(alert(src, "Do you want to open \the [tobeopened] for [target]?","Doorknob_v2a.exe","Yes","No")) - if("Yes") - var/nhref = "src=\ref[tobeopened];aiEnable=7" - tobeopened.Topic(nhref, params2list(nhref), tobeopened, 1) - src << "\blue You've opened \the [tobeopened] for [target]." - if("No") - src << "\red You deny the request." - else - src << "\red You've failed to open an airlock for [target]" +/mob/living/silicon/ai/proc/ai_cancel_tracking(var/forced = 0) + if(!cameraFollow) return -/mob/living/silicon/ai/proc/ai_actual_track(atom/target as mob|obj) + + src << "Follow camera mode [forced ? "terminated" : "ended"]." + cameraFollow = null + +/mob/living/silicon/ai/proc/ai_actual_track(atom/movable/target as mob|obj) if(!istype(target)) return var/mob/living/silicon/ai/U = usr U.cameraFollow = target - //U << text("Now tracking [] on camera.", target.name) - //if (U.machine == null) - // U.machine = U U << "Now tracking [target.name] on camera." spawn (0) @@ -172,30 +190,26 @@ if (istype(target, /mob/living/carbon/human)) var/mob/living/carbon/human/H = target if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate)) - U << "Follow camera mode terminated." - U.cameraFollow = null + U.ai_cancel_tracking(1) return -/* if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && !H.head.canremove) - U << "Follow camera mode terminated." - U.cameraFollow = null - return*/ if(H.digitalcamo) - U << "Follow camera mode terminated." - U.cameraFollow = null + U.ai_cancel_tracking(1) + return + if(H.head && istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && (H.head.flags & NODROP)) + U.ai_cancel_tracking(1) return if(istype(target.loc,/obj/effect/dummy)) - U << "Follow camera mode ended." - U.cameraFollow = null + U.ai_cancel_tracking() return - if (!near_camera(target)) + if (!trackable(target)) U << "Target is not near any active cameras." sleep(100) continue if(U.eyeobj) - U.eyeobj.setLoc(get_turf(target)) + U.eyeobj.setLoc(get_turf(target), 0) else view_core() return @@ -212,6 +226,12 @@ return 0 return 1 +/proc/trackable(atom/movable/M) + var/turf/T = get_turf(M) + if(T && (T.z in config.contact_levels)) + return 1 + + return near_camera(M) /obj/machinery/camera/attack_ai(var/mob/living/silicon/ai/user as mob) if (!istype(user)) @@ -223,19 +243,3 @@ /mob/living/silicon/ai/attack_ai(var/mob/user as mob) ai_camera_list() - -/proc/camera_sort(list/L) - var/obj/machinery/camera/a - var/obj/machinery/camera/b - - for (var/i = L.len, i > 0, i--) - for (var/j = 1 to i - 1) - a = L[j] - b = L[j + 1] - if (a.c_tag_order != b.c_tag_order) - if (a.c_tag_order > b.c_tag_order) - L.Swap(j, j + 1) - else - if (sorttext(a.c_tag, b.c_tag) < 0) - L.Swap(j, j + 1) - return L diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index cd78210b41f..fc2187c24db 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -162,44 +162,16 @@ /obj/machinery/computer/HolodeckControl/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob) -//Warning, uncommenting this can have concequences. For example, deconstructing the computer may cause holographic eswords to never derez - -/* if(istype(D, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - if (src.stat & BROKEN) - user << "\blue The broken glass falls out." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - new /obj/item/weapon/shard( src.loc ) - var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A ) - for (var/obj/C in src) - C.loc = src.loc - A.circuit = M - A.state = 3 - A.icon_state = "3" - A.anchored = 1 - del(src) - else - user << "\blue You disconnect the monitor." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A ) - for (var/obj/C in src) - C.loc = src.loc - A.circuit = M - A.state = 4 - A.icon_state = "4" - A.anchored = 1 - del(src) - -*/ - if(istype(D, /obj/item/weapon/card/emag) && !emagged) + return + +/obj/machinery/computer/HolodeckControl/emag_act(user as mob) + if(!emagged) playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) emagged = 1 user << "\blue You vastly increase projector power and override the safety and security protocols." user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator." log_game("[key_name(usr)] emagged the Holodeck Control Computer") - src.updateUsrDialog() - return + src.updateUsrDialog() /obj/machinery/computer/HolodeckControl/New() ..() @@ -269,8 +241,7 @@ if(isobj(obj)) var/mob/M = obj.loc if(ismob(M)) - M.u_equip(obj) - M.update_icons() //so their overlays update + M.unEquip(obj, 1) //Holoweapons should always drop. if(!silent) var/obj/oldobj = obj @@ -489,7 +460,7 @@ throw_range = 5 throwforce = 0 w_class = 2.0 - flags = FPRINT | TABLEPASS | NOSHIELD + flags = NOSHIELD var/active = 0 /obj/item/weapon/holo/esword/green diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 972d3e6a2ca..d4da0df2e54 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -145,6 +145,9 @@ /obj/machinery/computer/arcade/battle/Topic(href, href_list) if(..()) return 1 + + if(usr.machine != src) + return 0 if (!src.blocked && !src.gameover) if (href_list["attack"]) @@ -269,8 +272,8 @@ return -/obj/machinery/computer/arcade/battle/attackby(I as obj, user as mob) - if(istype(I, /obj/item/weapon/card/emag) && !emagged) +/obj/machinery/computer/arcade/battle/emag_act(user as mob) + if(!emagged) temp = "If you die in the game, you die for real!" player_hp = 30 player_mp = 10 @@ -284,14 +287,7 @@ enemy_name = "Cuban Pete" name = "Outbomb Cuban Pete" - src.updateUsrDialog() - else - - ..() - - - /obj/machinery/computer/arcade/orion_trail name = "The Orion Trail" @@ -406,6 +402,8 @@ /obj/machinery/computer/arcade/orion_trail/Topic(href, href_list) if(..()) return 1 + if(usr.machine != src) + return 0 if(href_list["close"]) usr.unset_machine() usr << browse(null, "window=arcade") @@ -566,4 +564,5 @@ /obj/machinery/computer/arcade/orion_trail/proc/win() playing = 0 + turns = 0 prizevend() diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index a24ca549dce..5e9bb34866b 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -23,8 +23,10 @@ var/zone = signal.data["zone"] var/severity = signal.data["alert"] + var/hidden = signal.data["hidden"] if(!zone || !severity) return + if(hidden) return minor_alarms -= zone priority_alarms -= zone diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index fb3c74e292d..bce0006f488 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -37,15 +37,16 @@ return ui_interact(user) -/obj/machinery/computer/atmoscontrol/attackby(var/obj/item/I as obj, var/mob/user as mob) - if(istype(I, /obj/item/weapon/card/emag) && !emagged) - user.visible_message("\red \The [user] swipes \a [I] through \the [src], causing the screen to flash!",\ - "\red You swipe your [I] through \the [src], the screen flashing as you gain full control.",\ +/obj/machinery/computer/atmoscontrol/emag_act(user as mob) + if(!emagged) + if(!ishuman(user)) + return + var/mob/living/carbon/human/H = user + H.visible_message("\red \The [user] swipes \a card through \the [src], causing the screen to flash!",\ + "\red You swipe your card through \the [src], the screen flashing as you gain full control.",\ "You hear the swipe of a card through a reader, and an electronic warble.") emagged = 1 overridden = 1 - return - return ..() /obj/machinery/computer/atmoscontrol/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) if(user.stat && !isobserver(user)) diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 7bc376580b8..3a035c3ef7d 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -1,3 +1,7 @@ +/proc/invalidateCameraCache() + for(var/obj/machinery/computer/security/s in world) + s.camera_cache = null + /obj/machinery/computer/security name = "Camera Monitor" desc = "Used to access the various cameras networks on the station." @@ -12,6 +16,7 @@ var/list/tempnets[0] var/list/data[0] var/list/access[0] + var/camera_cache = null New() // Lists existing networks and their required access. Format: networks[] = list() networks["SS13"] = list(access_hos,access_captain) @@ -50,25 +55,21 @@ // Network configuration attackby(I as obj, user as mob) access = list() - if(istype(I,/obj/item/weapon/card/emag)) // If hit by an emag. - var/obj/item/weapon/card/emag/E = I - if(!emagged) - if(E.uses) - E.uses-- - emagged = 1 - user << "\blue You have authorized full network access!" - ui_interact(user) - else - ui_interact(user) - else - ui_interact(user) - else if(istype(I,/obj/item/weapon/card/id)) // If hit by a regular ID card. + if(istype(I,/obj/item/weapon/card/id)) // If hit by a regular ID card. var/obj/item/weapon/card/id/E = I access = E.access ui_interact(user) else ..() + emag_act(user as mob) + if(!emagged) + emagged = 1 + user << "\blue You have authorized full network access!" + ui_interact(user) + else + ui_interact(user) + ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(src.z > 6) return if(stat & (NOPOWER|BROKEN)) return @@ -76,14 +77,15 @@ var/data[0] + data["current"] = null var/list/L = list() - for (var/obj/machinery/camera/C in cameranet.viewpoints) + for (var/obj/machinery/camera/C in cameranet.cameras) if(can_access_camera(C)) L.Add(C) - camera_sort(L) + cameranet.process_sort() var/cameras[0] for(var/obj/machinery/camera/C in L) @@ -106,7 +108,7 @@ if(emagged) access = list(access_captain) // Assume captain level access when emagged data["emagged"] = 1 - if(isAI(user) || isrobot (user)) + if(isAI(user) || isrobot(user)) access = list(access_captain) // Assume captain level access when AI // Loop through the ID's permission, and check which networks the ID has access to. @@ -119,7 +121,7 @@ tempnets.Add(list(list("name" = l, "active" = 0))) break data["networks"] = tempnets - + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800) @@ -137,7 +139,7 @@ if(href_list["switchTo"]) if(src.z>6 || stat&(NOPOWER|BROKEN)) return if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return - var/obj/machinery/camera/C = locate(href_list["switchTo"]) in cameranet.viewpoints + var/obj/machinery/camera/C = locate(href_list["switchTo"]) in cameranet.cameras if(!C) return switch_to_camera(usr, C) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 3ac81dfa985..e5aeabf72ae 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -55,14 +55,20 @@ var/shuttle_call/shuttle_calls[0] var/stat_msg1 var/stat_msg2 var/display_type="blank" + + var/datum/announcement/priority/crew_announcement = new l_color = "#0000FF" + +/obj/machinery/computer/communications/New() + ..() + crew_announcement.newscast = 1 /obj/machinery/computer/communications/Topic(href, href_list) if(..(href, href_list)) return 1 - if (!(src.z in list(STATION_Z,CENTCOMM_Z))) + if ((!(src.z in config.station_levels) && !(src.z in config.admin_levels))) usr << "\red Unable to establish a connection: \black You're too far away from the station!" return @@ -83,10 +89,12 @@ var/shuttle_call/shuttle_calls[0] if (I && istype(I)) if(src.check_access(I)) authenticated = 1 - if(20 in I.access) + if(access_captain in I.access) authenticated = 2 + crew_announcement.announcer = GetNameAndAssignmentFromId(I) if("logout") authenticated = 0 + crew_announcement.announcer = "" setMenuState(usr,COMM_SCREEN_MAIN) // ALART LAVUL @@ -127,14 +135,14 @@ var/shuttle_call/shuttle_calls[0] usr << "You need to swipe your ID." if("announce") - if(src.authenticated==2 && !issilicon(usr)) - if(message_cooldown) return - var/input = stripped_input(usr, "Please choose a message to announce to the station crew.", "What?") + if(src.authenticated==2) + if(message_cooldown) + usr << "Please allow at least one minute to pass between announcements" + return + var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement") if(!input || !(usr in view(1,src))) return - captain_announce(input)//This should really tell who is, IE HoP, CE, HoS, RD, Captain - log_say("[key_name(usr)] has made a captain announcement: [input]") - message_admins("[key_name_admin(usr)] has made a captain announcement.", 1) + crew_announcement.Announce(input) message_cooldown = 1 spawn(600)//One minute cooldown message_cooldown = 0 @@ -204,7 +212,7 @@ var/shuttle_call/shuttle_calls[0] if(centcomm_message_cooldown) usr << "Arrays recycling. Please stand by." return - var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") + var/input = input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") if(!input || !(usr in view(1,src))) return Centcomm_announce(input, usr) @@ -240,12 +248,11 @@ var/shuttle_call/shuttle_calls[0] return 1 -/obj/machinery/computer/communications/attackby(var/obj/I as obj, var/mob/user as mob) - if(istype(I,/obj/item/weapon/card/emag/)) +/obj/machinery/computer/communications/emag_act(user as mob) + if(!emagged) src.emagged = 1 user << "You scramble the communication routing circuits!" - ..() - + /obj/machinery/computer/communications/attack_ai(var/mob/user as mob) return src.attack_hand(user) @@ -399,7 +406,7 @@ var/shuttle_call/shuttle_calls[0] return if(emergency_shuttle.going_to_centcom()) - user << "The shuttle may not be called while returning to CentCom." + user << "The shuttle may not be called while returning to Central Command." return if(emergency_shuttle.online()) @@ -409,11 +416,11 @@ var/shuttle_call/shuttle_calls[0] // if force is 0, some things may stop the shuttle call if(!force) if(emergency_shuttle.deny_shuttle) - user << "Centcom does not currently have a shuttle available in your sector. Please try again later." + user << "Central Command does not currently have a shuttle available in your sector. Please try again later." return if(sent_strike_team == 1) - user << "Centcom will not allow the shuttle to be called. Consider all contracts terminated." + user << "Central Command will not allow the shuttle to be called. Consider all contracts terminated." return if(world.time < 54000) // 30 minute grace period to let the game get going @@ -427,8 +434,6 @@ var/shuttle_call/shuttle_calls[0] emergency_shuttle.call_transfer() log_game("[key_name(user)] has called the shuttle.") message_admins("[key_name_admin(user)] has called the shuttle - [formatJumpTo(user)].", 1) - captain_announce("A crew transfer has been initiated. The shuttle has been called. It will arrive in [round(emergency_shuttle.estimate_arrival_time()/60)] minutes.") - return diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index c459b3d1e1a..084eb974688 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -1,18 +1,15 @@ /obj/machinery/computer/crew - name = "Crew Monitoring Computer" + name = "crew monitoring computer" desc = "Used to monitor active health sensors built into most of the crew's uniforms." icon_state = "crew" use_power = 1 idle_power_usage = 250 active_power_usage = 500 circuit = "/obj/item/weapon/circuitboard/crew" - var/list/tracked = list( ) - - l_color = "#0000FF" - + var/obj/nano_module/crew_monitor/crew_monitor /obj/machinery/computer/crew/New() - tracked = list() + crew_monitor = new(src) ..() @@ -27,6 +24,8 @@ return ui_interact(user) +/obj/machinery/computer/crew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + crew_monitor.ui_interact(user, ui_key, ui, force_open) /obj/machinery/computer/crew/update_icon() @@ -40,100 +39,5 @@ icon_state = initial(icon_state) stat &= ~NOPOWER - -/obj/machinery/computer/crew/Topic(href, href_list) - if(..()) - return 1 - if (src.z > 6) - usr << "\red Unable to establish a connection: \black You're too far away from the station!" - return 0 - if( href_list["close"] ) - var/mob/user = usr - var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main") - usr.unset_machine() - ui.close() - return 0 - if(href_list["update"]) - src.updateDialog() - return 1 - /obj/machinery/computer/crew/interact(mob/user) - ui_interact(user) - -/obj/machinery/computer/crew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - if(stat & (BROKEN|NOPOWER)) - return - user.set_machine(src) - src.scan() - - var/data[0] - var/list/crewmembers = list() - - for(var/obj/item/clothing/under/C in src.tracked) - - - var/turf/pos = get_turf(C) - - if((C) && (C.has_sensor) && (pos) && (pos.z == src.z) && C.sensor_mode) - if(istype(C.loc, /mob/living/carbon/human)) - - var/mob/living/carbon/human/H = C.loc - - var/list/crewmemberData = list() - - crewmemberData["sensor_type"] = C.sensor_mode - crewmemberData["dead"] = H.stat > 1 - crewmemberData["oxy"] = round(H.getOxyLoss(), 1) - crewmemberData["tox"] = round(H.getToxLoss(), 1) - crewmemberData["fire"] = round(H.getFireLoss(), 1) - crewmemberData["brute"] = round(H.getBruteLoss(), 1) - - crewmemberData["name"] = "Unknown" - crewmemberData["rank"] = "Unknown" - if(H.wear_id && istype(H.wear_id, /obj/item/weapon/card/id) ) - var/obj/item/weapon/card/id/I = H.wear_id - crewmemberData["name"] = I.name - crewmemberData["rank"] = I.rank - else if(H.wear_id && istype(H.wear_id, /obj/item/device/pda) ) - var/obj/item/device/pda/P = H.wear_id - crewmemberData["name"] = (P.id ? P.id.name : "Unknown") - crewmemberData["rank"] = (P.id ? P.id.rank : "Unknown") - var/area/A = get_area(H) - crewmemberData["area"] = sanitize(A.name) - crewmemberData["x"] = pos.x - crewmemberData["y"] = pos.y - - // Works around list += list2 merging lists; it's not pretty but it works - crewmembers += "temporary item" - crewmembers[crewmembers.len] = crewmemberData - - crewmembers = sortByKey(crewmembers, "name") - - data["crewmembers"] = crewmembers - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "crew_monitor.tmpl", "Crew Monitoring Computer", 900, 800) - - // adding a template with the key "mapContent" enables the map ui functionality - ui.add_template("mapContent", "crew_monitor_map_content.tmpl") - // adding a template with the key "mapHeader" replaces the map header content - ui.add_template("mapHeader", "crew_monitor_map_header.tmpl") - - // we want to show the map by default - ui.set_show_map(1) - - ui.set_initial_data(data) - ui.open() - - // should make the UI auto-update; doesn't seem to? - ui.set_auto_update(1) - - -/obj/machinery/computer/crew/proc/scan() - for(var/mob/living/carbon/human/H in mob_list) - if(istype(H.w_uniform, /obj/item/clothing/under)) - var/obj/item/clothing/under/C = H.w_uniform - if (C.has_sensor) - tracked |= C - return 1 + crew_monitor.ui_interact(user) \ No newline at end of file diff --git a/code/game/machinery/computer/honkputer.dm b/code/game/machinery/computer/honkputer.dm index 9efed74b7c9..79ce2e97edf 100644 --- a/code/game/machinery/computer/honkputer.dm +++ b/code/game/machinery/computer/honkputer.dm @@ -17,7 +17,7 @@ /obj/machinery/computer/HONKputer/Topic(href, href_list) if(..()) return 1 - if (src.z > 1) + if (!(src.z in config.station_levels)) usr << "\red Unable to establish a connection: \black You're too far away from the station!" return usr.set_machine(src) @@ -57,12 +57,10 @@ src.updateUsrDialog() -/obj/machinery/computer/HONKputer/attackby(var/obj/I as obj, var/mob/user as mob) - if(istype(I,/obj/item/weapon/card/emag/)) +/obj/machinery/computer/HONKputer/emag_act(user as mob) + if(!emagged) src.emagged = 1 user << "You scramble the login circuits, allowing anyone to use the console!" - ..() - /obj/machinery/computer/HONKputer/attack_hand(var/mob/user as mob) if(..()) diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 37ab61fc857..916b99e05c9 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -41,24 +41,6 @@ return if(!istype(user)) return - if(istype(O,/obj/item/weapon/card/emag/)) - // Will create sparks and print out the console's password. You will then have to wait a while for the console to be back online. - // It'll take more time if there's more characters in the password.. - if(!emag) - if(!isnull(src.linkedServer)) - icon_state = hack_icon // An error screen I made in the computers.dmi - emag = 1 - screen = 2 - spark_system.set_up(5, 0, src) - src.spark_system.start() - var/obj/item/weapon/paper/monitorkey/MK = new/obj/item/weapon/paper/monitorkey - MK.loc = src.loc - // Will help make emagging the console not so easy to get away with. - MK.info += "

£%@%(*$%&(£&?*(%&£/{}" - spawn(100*length(src.linkedServer.decryptkey)) UnmagConsole() - message = rebootmsg - else - user << "A no server error appears on the screen." if(isscrewdriver(O) && emag) //Stops people from just unscrewing the monitor and putting it back to get the console working again. user << "It is too hot to mess with!" @@ -66,6 +48,25 @@ ..() return + +/obj/machinery/computer/message_monitor/emag_act(user as mob) + // Will create sparks and print out the console's password. You will then have to wait a while for the console to be back online. + // It'll take more time if there's more characters in the password.. + if(!emag) + if(!isnull(src.linkedServer)) + icon_state = hack_icon // An error screen I made in the computers.dmi + emag = 1 + screen = 2 + spark_system.set_up(5, 0, src) + src.spark_system.start() + var/obj/item/weapon/paper/monitorkey/MK = new/obj/item/weapon/paper/monitorkey + MK.loc = src.loc + // Will help make emagging the console not so easy to get away with. + MK.info += "

£%@%(*$%&(£&?*(%&£/{}" + spawn(100*length(src.linkedServer.decryptkey)) UnmagConsole() + message = rebootmsg + else + user << "A no server error appears on the screen." /obj/machinery/computer/message_monitor/update_icon() ..() diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 11b71274ca6..8340838f6e2 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -65,7 +65,7 @@ if(!T.implanted) continue var/loc_display = "Unknown" var/mob/living/carbon/M = T.imp_in - if(M.z == 1 && !istype(M.loc, /turf/space)) + if((M.z in config.station_levels) && !istype(M.loc, /turf/space)) var/turf/mob_loc = get_turf_loc(M) loc_display = mob_loc.loc if(T.malfunction) diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 632fe6aae60..7692b31e3e4 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -123,7 +123,7 @@ if (istype(I)) if(src.check_access(I)) if (!status) - message_admins("\blue [key_name_admin(usr)] has initiated the global cyborg killswitch!") + msg_admin_attack("\blue [key_name_admin(usr)] has initiated the global cyborg killswitch!") log_game("\blue [key_name(usr)] has initiated the global cyborg killswitch!") use_log += text("\[[time_stamp()]\] [usr.name] ([usr.ckey]) has initiated the global cyborg killswitch!") src.status = 1 @@ -169,7 +169,7 @@ R.ResetSecurityCodes() else - message_admins("\blue [key_name_admin(usr)] detonated [R.name]!") + msg_admin_attack("\blue [key_name_admin(usr)] detonated [R.name]!") log_game("\blue [key_name_admin(usr)] detonated [R.name]!") use_log += text("\[[time_stamp()]\] [usr.name] ([usr.ckey]) detonated [R.name] ([R.ckey])!") R.self_destruct() @@ -183,7 +183,7 @@ var/choice = input("Are you certain you wish to [R.canmove ? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort") if(choice == "Confirm") if(R && istype(R)) - message_admins("\blue [key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!") + msg_admin_attack("\blue [key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!") log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [R.name]!") R.canmove = !R.canmove if (R.lockcharge) @@ -208,7 +208,7 @@ var/choice = input("Are you certain you wish to hack [R.name]?") in list("Confirm", "Abort") if(choice == "Confirm") if(R && istype(R)) -// message_admins("\blue [key_name_admin(usr)] emagged [R.name] using robotic console!") + msg_admin_attack("\blue [key_name_admin(usr)] emagged [R.name] using robotic console!") log_game("[key_name(usr)] emagged [R.name] using robotic console!") R.emagged = 1 if(R.hud_used) diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm index 0815cf7932a..93b4c91c2c9 100644 --- a/code/game/machinery/computer/shuttle.dm +++ b/code/game/machinery/computer/shuttle.dm @@ -56,11 +56,13 @@ world << "\blue All authorizations to shortening time for shuttle launch have been revoked!" src.authorized.len = 0 src.authorized = list( ) - - else if (istype(W, /obj/item/weapon/card/emag) && !emagged) + return + + emag_act(user as mob) + if (!emagged) var/choice = alert(user, "Would you like to launch the shuttle?","Shuttle control", "Launch", "Cancel") - if(!emagged && !emergency_shuttle.location() && user.get_active_hand() == W) + if(!emagged && !emergency_shuttle.location()) switch(choice) if("Launch") world << "\blue Alert: Shuttle launch time shortened to 10 seconds!" @@ -68,4 +70,3 @@ emagged = 1 if("Cancel") return - return diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 3a393c866bb..d4dc7ac6192 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -221,12 +221,14 @@ for(var/datum/reagent/R in beaker.reagents.reagent_list) data["beakerVolume"] += R.volume + data["autoeject"] = autoeject + // update the ui if it exists, returns null if no ui is passed/found ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 410) + ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 420) // when the ui is first opened this is the data it will use ui.set_initial_data(data) // open the new ui window diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 6f7018c1cf4..804c0d92e3e 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -283,7 +283,7 @@ /obj/machinery/cryopod/robot/despawn_occupant() var/mob/living/silicon/robot/R = occupant if(!istype(R)) return ..() - + R.contents -= R.mmi del(R.mmi) for(var/obj/item/I in R.module) // the tools the borg has; metal, glass, guns etc @@ -299,7 +299,7 @@ /obj/machinery/cryopod/proc/despawn_occupant() //Drop all items into the pod. for(var/obj/item/W in occupant) - occupant.drop_from_inventory(W) + occupant.unEquip(W) W.loc = src if(W.contents.len) //Make sure we catch anything not handled by del() on the items. @@ -388,7 +388,7 @@ //Make an announcement and log the person entering storage. control_computer.frozen_crew += "[occupant.real_name]" - + var/ailist[] = list() for (var/mob/living/silicon/ai/A in living_mob_list) ailist += A @@ -397,7 +397,7 @@ announcer.say(";[occupant.real_name] [on_store_message]") else announce.autosay("[occupant.real_name] [on_store_message]", "[on_store_name]") - + visible_message("\The [src] hums and hisses as it moves [occupant.real_name] into storage.", 3) // Delete the mob. @@ -460,7 +460,7 @@ //Despawning occurs when process() is called with an occupant without a client. src.add_fingerprint(M) - + /obj/machinery/cryopod/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob) diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index c00668a7276..94ded8abee1 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -158,7 +158,7 @@ for reference: src.icon_state = "barrier[src.locked]" attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/card/id/)) + if (istype(W, /obj/item/weapon/card/id)) if (src.allowed(user)) if (src.emagged < 2.0) src.locked = !src.locked @@ -177,24 +177,6 @@ for reference: visible_message("\red BZZzZZzZZzZT") return return - else if (istype(W, /obj/item/weapon/card/emag)) - if (src.emagged == 0) - src.emagged = 1 - src.req_access = null - user << "You break the ID authentication lock on the [src]." - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(2, 1, src) - s.start() - visible_message("\red BZZzZZzZZzZT") - return - else if (src.emagged == 1) - src.emagged = 2 - user << "You short out the anchoring mechanism on the [src]." - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(2, 1, src) - s.start() - visible_message("\red BZZzZZzZZzZT") - return else if (istype(W, /obj/item/weapon/wrench)) if (src.health < src.maxhealth) src.health = src.maxhealth @@ -218,6 +200,23 @@ for reference: if (src.health <= 0) src.explode() ..() + + emag_act(user as mob) + if (!emagged) + emagged = 1 + req_access = null + user << "You break the ID authentication lock on the [src]." + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(2, 1, src) + s.start() + visible_message("\red BZZzZZzZZzZT") + else if (src.emagged == 1) + src.emagged = 2 + user << "You short out the anchoring mechanism on the [src]." + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(2, 1, src) + s.start() + visible_message("\red BZZzZZzZZzZT") ex_act(severity) switch(severity) diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index 2dcb0c0b2e0..84591381582 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -57,11 +57,14 @@ */ if(istype(W, /obj/item/device/detective_scanner)) return - if(istype(W, /obj/item/weapon/card/emag)) + return src.attack_hand(user) + +/obj/machinery/door_control/emag_act(user as mob) + if(!emagged) + emagged = 1 req_access = list() req_one_access = list() playsound(src.loc, "sparks", 100, 1) - return src.attack_hand(user) /obj/machinery/door_control/attack_hand(mob/user as mob) src.add_fingerprint(usr) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 88d72fbf8b9..10123890da7 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -153,10 +153,7 @@ if(!src.requiresID()) user = null if(src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade))) - flick("door_spark", src) - sleep(6) - open() - operating = -1 + emag_act(user) return 1 if(src.allowed(user) || src.emergency == 1) if(src.density) @@ -168,6 +165,13 @@ flick("door_deny", src) return +/obj/machinery/door/emag_act(user as mob) + if(density) + flick("door_spark", src) + sleep(6) + open() + operating = -1 + return 1 /obj/machinery/door/blob_act() if(prob(40)) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 84563748126..429bc886068 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -225,21 +225,13 @@ /obj/machinery/door/window/attack_hand(mob/user as mob) return src.attackby(user, user) -/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/living/user as mob) - - //If it's in the process of opening/closing, ignore the click - if (src.operating) - return - - add_fingerprint(user) - - //Emags and ninja swords? You may pass. - if (src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade))) +/obj/machinery/door/window/emag_act(user as mob, weapon as obj) + if(density) src.operating = -1 flick("[src.base_state]spark", src) sleep(6) desc += "
Its access panel is smoking slightly." - if(istype(I, /obj/item/weapon/melee/energy/blade)) + if(istype(weapon, /obj/item/weapon/melee/energy/blade)) var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() spark_system.set_up(5, 0, src.loc) spark_system.start() @@ -252,6 +244,19 @@ open() emagged = 1 return 1 + +/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/living/user as mob) + + //If it's in the process of opening/closing, ignore the click + if (src.operating) + return + + add_fingerprint(user) + + //Ninja swords? You may pass. + if (src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade))) + emag_act(user,I) + return 1 if(istype(I, /obj/item/weapon/screwdriver)) if(src.density || src.operating) diff --git a/code/game/machinery/drying_rack.dm b/code/game/machinery/drying_rack.dm index d776fc3bef3..48d213a3326 100644 --- a/code/game/machinery/drying_rack.dm +++ b/code/game/machinery/drying_rack.dm @@ -35,7 +35,7 @@ if(is_type_in_list(W,accepted)) if(!running) if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/meat)) - user.u_equip(W) + user.unEquip(W) del(W) user << "You add the meat to the drying rack." src.running = 1 @@ -48,7 +48,7 @@ src.running = 0 return if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/grown/grapes)) - user.u_equip(W) + user.unEquip(W) del(W) user << "You add the grapes to the drying rack." src.running = 1 @@ -61,7 +61,7 @@ src.running = 0 return if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes)) - user.u_equip(W) + user.unEquip(W) del(W) user << "You add the green grapes to the drying rack." src.running = 1 @@ -79,7 +79,7 @@ var/obj/item/weapon/reagent_containers/food/snacks/grown/B = W B.reagents.trans_to(src, B.reagents.total_volume) user << "You add the [W] to the drying rack." - user.u_equip(W) + user.unEquip(W) del(W) src.running = 1 use_power = 2 diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 419b5f7b664..5a6544ba646 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -4,6 +4,7 @@ name = "Emergency Floodlight" icon = 'icons/obj/machines/floodlight.dmi' icon_state = "flood00" + anchored = 0 density = 1 var/on = 0 var/obj/item/weapon/stock_parts/cell/high/cell = null @@ -63,6 +64,21 @@ /obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/wrench)) + if (!anchored && !isinspace()) + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + user.visible_message( \ + "[user] tightens \the [src]'s casters.", \ + " You have tightened \the [src]'s casters.", \ + "You hear ratchet.") + anchored = 1 + else if(anchored) + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + user.visible_message( \ + "[user] loosens \the [src]'s casters.", \ + " You have loosened \the [src]'s casters.", \ + "You hear ratchet.") + anchored = 0 if (istype(W, /obj/item/weapon/screwdriver)) if (!open) if(unlocked) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 17127b65378..4063396f5c5 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -37,6 +37,13 @@ /obj/machinery/iv_drip/MouseDrop(over_object, src_location, over_location) ..() + + if(!ishuman(usr) && !isrobot(usr)) + return + + var/turf/T = get_turf(src) + if(!usr in range(1, T)) + return if(attached) visible_message("[src.attached] is detached from \the [src]") @@ -133,6 +140,7 @@ /obj/machinery/iv_drip/verb/toggle_mode() set name = "Toggle Mode" + set category = "Object" set src in view(1) if(!istype(usr, /mob/living)) diff --git a/code/game/machinery/kitchen/juicer.dm b/code/game/machinery/kitchen/juicer.dm index b237f8223f6..89ead24fddb 100644 --- a/code/game/machinery/kitchen/juicer.dm +++ b/code/game/machinery/kitchen/juicer.dm @@ -37,7 +37,9 @@ if (beaker) return 1 else - user.before_take_item(O) + if(!user.unEquip(O)) + user << "\the [O] is stuck to your hand, you cannot put it in \the [src]" + return 0 O.loc = src beaker = O src.verbs += /obj/machinery/juicer/verb/detach @@ -45,9 +47,11 @@ src.updateUsrDialog() return 0 if (!is_type_in_list(O, allowed_items)) - user << "It looks as not containing any juice." + user << "It doesn't look like that contains any juice." return 1 - user.before_take_item(O) + if(!user.unEquip(O)) + user << "\the [O] is stuck to your hand, you cannot put it in \the [src]" + return 0 O.loc = src src.updateUsrDialog() return 0 diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm index 0268755bb1a..6eb988f98c5 100644 --- a/code/game/machinery/kitchen/microwave.dm +++ b/code/game/machinery/kitchen/microwave.dm @@ -49,7 +49,7 @@ component_parts += new /obj/item/weapon/stock_parts/micro_laser(null) component_parts += new /obj/item/weapon/stock_parts/console_screen(null) component_parts += new /obj/item/stack/cable_coil(null, 2) - RefreshParts() + RefreshParts() /obj/machinery/microwave/upgraded/New() @@ -59,14 +59,14 @@ component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(null) component_parts += new /obj/item/weapon/stock_parts/console_screen(null) component_parts += new /obj/item/stack/cable_coil(null, 2) - RefreshParts() + RefreshParts() /obj/machinery/microwave/RefreshParts() var/E for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts) E += M.rating - efficiency = E - + efficiency = E + /******************* * Item Adding ********************/ @@ -87,11 +87,11 @@ return else if(!anchored) anchored = 1 - user << "The [src] is now secured." + user << "The [src] is now secured." return - + default_deconstruction_crowbar(O) - + if(src.broken > 0) if(src.broken == 2 && istype(O, /obj/item/weapon/screwdriver)) // If it's broken and they're using a screwdriver user.visible_message( \ @@ -150,8 +150,10 @@ "\blue [user] has added one of [O] to \the [src].", \ "\blue You add one of [O] to \the [src].") else - // user.before_take_item(O) //This just causes problems so far as I can tell. -Pete - user.drop_item() + // user.unEquip(O) //This just causes problems so far as I can tell. -Pete + if(!user.drop_item()) + user << "\the [O] is stuck to your hand, you cannot put it in \the [src]" + return 0 O.loc = src user.visible_message( \ "\blue [user] has added \the [O] to \the [src].", \ diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm index 7f8ba253582..1e178bf54ff 100644 --- a/code/game/machinery/kitchen/smartfridge.dm +++ b/code/game/machinery/kitchen/smartfridge.dm @@ -85,7 +85,9 @@ user << "\The [src] is full." return 1 else - user.before_take_item(O) + if(!user.unEquip(O)) + usr << "\the [O] is stuck to your hand, you cannot put it in \the [src]" + return O.loc = src if(item_quants[O.name]) item_quants[O.name]++ diff --git a/code/game/machinery/laprecharger.dm b/code/game/machinery/laprecharger.dm new file mode 100644 index 00000000000..7570227d755 --- /dev/null +++ b/code/game/machinery/laprecharger.dm @@ -0,0 +1,101 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + +/obj/machinery/laprecharger + name = "laptop recharger" + icon = 'icons/obj/stationobjs.dmi' + icon_state = "recharger0" + anchored = 1 + use_power = 1 + idle_power_usage = 40 + active_power_usage = 2500 + var/obj/item/charging = null + var/icon_state_charged = "recharger2" + var/icon_state_charging = "recharger1" + var/icon_state_idle = "recharger0" + +/obj/machinery/laprecharger/attackby(obj/item/weapon/G as obj, mob/user as mob) + if(istype(user,/mob/living/silicon)) + return + if(istype(G, /obj/item/weapon/gun/energy) || istype(G, /obj/item/weapon/melee/baton)) + user << "\red The laptop recharger blinks red as you try to insert the item!" + return + if(istype(G,/obj/item/device/laptop)) + if(charging) + return + + + // Checks to make sure he's not in space doing it, and that the area got proper power. + var/area/a = get_area(src) + if(!isarea(a)) + user << "\red The [name] blinks red as you try to insert the item!" + return + if(a.power_equip == 0) + user << "\red The [name] blinks red as you try to insert the item!" + return + + if(istype(G, /obj/item/device/laptop)) + var/obj/item/device/laptop/L = G + if(!L.stored_computer.battery) + user << "There's no battery in it!" + return + user.drop_item() + G.loc = src + charging = G + use_power = 2 + update_icon() + else if(istype(G, /obj/item/weapon/wrench)) + if(charging) + user << "\red Remove the laptop first!" + return + anchored = !anchored + user << "You [anchored ? "attached" : "detached"] the recharger." + playsound(loc, 'sound/items/Ratchet.ogg', 75, 1) + +/obj/machinery/laprecharger/attack_hand(mob/user as mob) + add_fingerprint(user) + + if(charging) + charging.update_icon() + charging.loc = loc + charging = null + use_power = 1 + update_icon() + +/obj/machinery/laprecharger/attack_paw(mob/user as mob) + return attack_hand(user) + +/obj/machinery/laprecharger/process() + if(stat & (NOPOWER|BROKEN) || !anchored) + return + + if(charging) + if(istype(charging, /obj/item/device/laptop)) + var/obj/item/device/laptop/L = charging + if(L.stored_computer.battery.charge < L.stored_computer.battery.maxcharge) + L.stored_computer.battery.give(1000) + icon_state = icon_state_charging + use_power(2500) + else + icon_state = icon_state_charged + return + + +/obj/machinery/laprecharger/emp_act(severity) + if(stat & (NOPOWER|BROKEN) || !anchored) + ..(severity) + return + +/obj/machinery/laprecharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier. + if(charging) + icon_state = icon_state_charging + else + icon_state = icon_state_idle + +// Atlantis: No need for that copy-pasta code, just use var to store icon_states instead. +obj/machinery/laprecharger/wallcharger + name = "wall laptop recharger" + icon = 'icons/obj/stationobjs.dmi' + icon_state = "wrecharger0" + icon_state_idle = "wrecharger0" + icon_state_charging = "wrecharger1" + icon_state_charged = "wrecharger2" diff --git a/code/game/machinery/metaldetector.dm b/code/game/machinery/metaldetector.dm index 3d7ccb4ab3b..72be4f67785 100644 --- a/code/game/machinery/metaldetector.dm +++ b/code/game/machinery/metaldetector.dm @@ -27,11 +27,6 @@ return 1 /obj/machinery/metaldetector/attackby(obj/item/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/card/emag)) - if(!src.emagged) - src.emagged = 1 - user << "\blue You short out the circuitry." - return if(istype(W, /obj/item/weapon/card)) for(var/ID in list(user.equipped(), user:wear_id, user:belt)) if(src.check_access(ID,list("20"))) @@ -46,6 +41,12 @@ else user << "\red You lack access to the control panel!" return + +/obj/machinery/metaldetector/emag_act(user as mob) + if(!emagged) + emagged = 1 + user << "\blue You short out the circuitry." + return /obj/machinery/metaldetector/Crossed(AM as mob|obj) if(emagged) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 1c7f8ee64a0..dd0e408fd60 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -5,6 +5,7 @@ /datum/feed_message var/author ="" var/body ="" + var/message_type ="Story" //var/parent_channel var/backup_body ="" var/backup_author ="" @@ -39,6 +40,12 @@ src.backup_author = "" src.censored = 0 src.is_admin_channel = 0 + +/datum/feed_channel/proc/announce_news() + return "Breaking news from [channel_name]!" + +/datum/feed_channel/station/announce_news() + return "New Station Announcement Available" /datum/feed_network var/list/datum/feed_channel/network_channels = list() @@ -213,7 +220,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co switch(screen) if(0) dat += {"Welcome to Newscasting Unit #[src.unit_no].
Interface & News networks Operational. -
Property of Nanotransen Inc"} +
Property of Nanotrasen"} if(news_network.wanted_issue) dat+= "
Read Wanted Issue" dat+= {"

Create Feed Channel @@ -248,7 +255,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co dat+="No feed messages found in channel...

" else for(var/datum/feed_message/MESSAGE in CHANNEL.messages) - dat+="-[MESSAGE.body]
\[Story by [MESSAGE.author]\]
"*/ + dat+="-[MESSAGE.body]
\[[MESSAGE.message_type] by [MESSAGE.author]\]
"*/ dat+="

Refresh" dat+="
Back" @@ -334,7 +341,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co if(MESSAGE.img) usr << browse_rsc(MESSAGE.img, "tmp_photo[i].png") dat+="

" - dat+="\[Story by [MESSAGE.author]\]
" + dat+="\[[MESSAGE.message_type] by [MESSAGE.author]\]
" dat+="

Refresh" dat+="
Back" if(10) @@ -369,7 +376,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co dat+="No feed messages found in channel...
" else for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages) - dat+="-[MESSAGE.body]
\[Story by [MESSAGE.author]\]
" + dat+="-[MESSAGE.body]
\[[MESSAGE.message_type] by [MESSAGE.author]\]
" dat+="[(MESSAGE.body == "\[REDACTED\]") ? ("Undo story censorship") : ("Censor story")] - [(MESSAGE.author == "\[REDACTED\]") ? ("Undo Author Censorship") : ("Censor message Author")]
" dat+="
Back" if(13) @@ -383,7 +390,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co dat+="No feed messages found in channel...
" else for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages) - dat+="-[MESSAGE.body]
\[Story by [MESSAGE.author]\]
" + dat+="-[MESSAGE.body]
\[[MESSAGE.message_type] by [MESSAGE.author]\]
" dat+="
Back" if(14) @@ -516,7 +523,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co src.updateUsrDialog() else if(href_list["set_new_message"]) - src.msg = strip_html(input(usr, "Write your Feed story", "Network Channel Handler", "")) + src.msg = strip_html(input(usr, "Write your feed story", "Network Channel Handler", "")) while (findtext(src.msg," ") == 1) src.msg = copytext(src.msg,2,lentext(src.msg)+1) src.updateUsrDialog() @@ -535,13 +542,15 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co if(photo) newMsg.img = photo.img feedback_inc("newscaster_stories",1) + var/announcement = "" for(var/datum/feed_channel/FC in news_network.network_channels) if(FC.channel_name == src.channel_name) FC.messages += newMsg //Adding message to the network's appropriate feed_channel + announcement = FC.announce_news() break src.screen=4 for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) - NEWSCASTER.newsAlert(src.channel_name) + NEWSCASTER.newsAlert(announcement) src.updateUsrDialog() @@ -986,11 +995,11 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob) ///obj/machinery/newscaster/process() //Was thinking of doing the icon update through process, but multiple iterations per second does not // return //bode well with a newscaster network of 10+ machines. Let's just return it, as it's added in the machines list. -/obj/machinery/newscaster/proc/newsAlert(channel) //This isn't Agouri's work, for it is ugly and vile. +/obj/machinery/newscaster/proc/newsAlert(var/news_call) //This isn't Agouri's work, for it is ugly and vile. var/turf/T = get_turf(src) //Who the fuck uses spawn(600) anyway, jesus christ - if(channel) + if(news_call) for(var/mob/O in hearers(world.view-1, T)) - O.show_message("[src.name] beeps, \"Breaking news from [channel]!\"",2) + O.show_message("[src.name] beeps, \"[news_call]\"",2) src.alert = 1 src.update_icon() spawn(300) diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index c1cbc65c297..84ec1966a1c 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -56,7 +56,6 @@ Buildable meters icon = 'icons/obj/pipe-item.dmi' icon_state = "simple" item_state = "buildpipe" - flags = TABLEPASS|FPRINT w_class = 3 level = 2 @@ -432,7 +431,7 @@ Buildable meters if (P.node2) P.node2.initialize() P.node2.build_network() - + if(PIPE_SUPPLY_STRAIGHT, PIPE_SUPPLY_BENT) var/obj/machinery/atmospherics/pipe/simple/hidden/supply/P = new( src.loc ) P.color = color @@ -546,7 +545,7 @@ Buildable meters if (M.node3) M.node3.initialize() M.node3.build_network() - + if(PIPE_SUPPLY_MANIFOLD) //manifold var/obj/machinery/atmospherics/pipe/manifold/hidden/supply/M = new( src.loc ) M.color = color @@ -618,7 +617,7 @@ Buildable meters if (M.node4) M.node4.initialize() M.node4.build_network() - + if(PIPE_SUPPLY_MANIFOLD4W) //4-way manifold var/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply/M = new( src.loc ) M.color = color @@ -904,7 +903,7 @@ Buildable meters if(C.node) C.node.initialize() C.node.build_network() - + if(PIPE_SUPPLY_CAP) var/obj/machinery/atmospherics/pipe/cap/hidden/supply/C = new(src.loc) C.dir = dir @@ -1039,7 +1038,6 @@ Buildable meters icon = 'icons/obj/pipe-item.dmi' icon_state = "meter" item_state = "buildpipe" - flags = TABLEPASS|FPRINT w_class = 4 /obj/item/pipe_meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 31da7e13203..f4829b57416 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -307,20 +307,7 @@ Status: []
"}, del(src) - if ((istype(W, /obj/item/weapon/card/emag)) && (!src.emagged)) - // Emagging the turret makes it go bonkers and stun everyone. It also makes - // the turret shoot much, much faster. - - user << "\red You short out [src]'s threat assessment circuits." - spawn(0) - for(var/mob/O in hearers(src, null)) - O.show_message("\red [src] hums oddly...", 1) - emagged = 1 - src.on = 0 // turns off the turret temporarily - sleep(60) // 6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit - on = 1 // turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here - - else if((istype(W, /obj/item/weapon/wrench)) && (!on)) + if((istype(W, /obj/item/weapon/wrench)) && (!on)) if(raised) return // This code handles moving the turret around. After all, it's a portable turret! @@ -359,7 +346,19 @@ Status: []
"}, attacked = 0 ..() +/obj/machinery/porta_turret/emag_act(user as mob) + if(!src.emagged) + // Emagging the turret makes it go bonkers and stun everyone. It also makes + // the turret shoot much, much faster. + user << "\red You short out [src]'s threat assessment circuits." + spawn(0) + for(var/mob/O in hearers(src, null)) + O.show_message("\red [src] hums oddly...", 1) + emagged = 1 + src.on = 0 // turns off the turret temporarily + sleep(60) // 6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit + on = 1 // turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here /obj/machinery/porta_turret/bullet_act(var/obj/item/projectile/Proj) if(on) @@ -714,13 +713,15 @@ Status: []
"}, if(1) if(istype(W, /obj/item/stack/sheet/metal)) - if(W:amount>=2) // requires 2 metal sheets + var/obj/item/stack/sheet/metal/M = W + if(M.amount>=2) // requires 2 metal sheets user << "\blue You add some metal armor to the interior frame." build_step = 2 - W:amount -= 2 + M.amount -= 2 icon_state = "turret_frame2" - if(W:amount <= 0) - del(W) + if(M.amount <= 0) + user.unEquip(M, 1) //We're deleting it anyway, so no point in having NODROP fuck shit up. + del(M) return else if(istype(W, /obj/item/weapon/wrench)) @@ -758,6 +759,9 @@ Status: []
"}, if(istype(W, /obj/item/weapon/gun/energy)) // the gun installation part var/obj/item/weapon/gun/energy/E = W // typecasts the item to an energy gun + if(!user.unEquip(W)) + user << "\the [W] is stuck to your hand, you cannot put it in \the [src]" + return installation = W.type // installation becomes W.type gun_charge = E.power_supply.charge // the gun's charge is stored in src.gun_charge user << "\blue You add \the [W] to the turret." @@ -773,6 +777,9 @@ Status: []
"}, if(4) if(isprox(W)) + if(!user.unEquip(W)) + user << "\the [W] is stuck to your hand, you cannot put it in \the [src]" + return build_step = 5 user << "\blue You add the prox sensor to the turret." del(W) @@ -791,12 +798,14 @@ Status: []
"}, if(6) if(istype(W, /obj/item/stack/sheet/metal)) - if(W:amount>=2) + var/obj/item/stack/sheet/metal/M = W + if(M.amount>=2) user << "\blue You add some metal armor to the exterior frame." build_step = 7 - W:amount -= 2 - if(W:amount <= 0) - del(W) + M.amount -= 2 + if(M.amount <= 0) + user.unEquip(M, 1) //If we don't force-unequip, bugs happen because the item was deleted without updating the neccesary stuff + del(M) return else if(istype(W, /obj/item/weapon/screwdriver)) diff --git a/code/game/machinery/programmable_unloader.dm b/code/game/machinery/programmable_unloader.dm index e7039af7f64..f2aaefc03fa 100644 --- a/code/game/machinery/programmable_unloader.dm +++ b/code/game/machinery/programmable_unloader.dm @@ -196,19 +196,6 @@ return /obj/machinery/programmable/attackby(obj/item/I as obj, mob/user as mob) - if(istype(I,/obj/item/weapon/card/emag)) - if(emagged) - return - user << "You swipe the unloader with your card. After a moment's grinding, it beeps in a sinister fashion." - playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0) - emagged = 1 - overrides += emag_overrides - - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(2, 1, src) - s.start() - - return if(istype(I,/obj/item/weapon/wrench)) // code borrowed from pipe dispenser if (unwrenched==0) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) @@ -281,7 +268,18 @@ I.loc = src RefreshParts() +/obj/machinery/programmable/emag_act(user as mob) + if(emagged) + return + user << "You swipe the unloader with your card. After a moment's grinding, it beeps in a sinister fashion." + playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0) + emagged = 1 + overrides += emag_overrides + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(2, 1, src) + s.start() + return /obj/machinery/programmable/process() if (!output || !input) diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 27e46c668b5..edfac0425a0 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -32,13 +32,7 @@ var/const/SAFETY_COOLDOWN = 100 /obj/machinery/recycler/attackby(var/obj/item/I, var/mob/user) - if(istype(I, /obj/item/weapon/card/emag) && !emagged) - emagged = 1 - if(safety_mode) - safety_mode = 0 - update_icon() - playsound(src.loc, "sparks", 75, 1, -1) - else if(istype(I, /obj/item/weapon/screwdriver) && emagged) + if(istype(I, /obj/item/weapon/screwdriver) && emagged) emagged = 0 update_icon() user << "You reset the crusher to its default factory settings." @@ -46,6 +40,14 @@ var/const/SAFETY_COOLDOWN = 100 ..() return add_fingerprint(user) + +/obj/machinery/recycler/emag_act(user as mob) + if(!emagged) + emagged = 1 + if(safety_mode) + safety_mode = 0 + update_icon() + playsound(src.loc, "sparks", 75, 1, -1) /obj/machinery/recycler/update_icon() ..() @@ -138,7 +140,7 @@ var/const/SAFETY_COOLDOWN = 100 // Remove and recycle the equipped items. for(var/obj/item/I in L.get_equipped_items()) - if(L.u_equip(I)) + if(L.unEquip(I)) recycle(I, 0) // Instantly lie down, also go unconscious from the pain, before you die. diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index d358e39c67f..16d7b16572e 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -55,6 +55,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() var/dpt = ""; //the department which will be receiving the message var/priority = -1 ; //Priority of the message being sent luminosity = 0 + var/datum/announcement/announcement = new /obj/machinery/requests_console/power_change() ..() @@ -70,6 +71,10 @@ var/list/obj/machinery/requests_console/allConsoles = list() /obj/machinery/requests_console/New() ..() + + announcement.title = "[department] announcement" + announcement.newscast = 1 + name = "[department] Requests Console" allConsoles += src //req_console_departments += department @@ -189,7 +194,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() else //main menu screen = 0 - announceAuth = 0 + reset_announce() if (newmessagepriority == 1) dat += text("There are new messages
") if (newmessagepriority == 2) @@ -240,17 +245,13 @@ var/list/obj/machinery/requests_console/allConsoles = list() if("2") priority = 2 else priority = -1 else - message = "" - announceAuth = 0 + reset_announce() screen = 0 if(href_list["sendAnnouncement"]) if(!announcementConsole) return - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) - M << "[department] announcement: [message]" - announceAuth = 0 - message = "" + announcement.Announce(message) + reset_announce() screen = 0 if( href_list["department"] && message ) @@ -389,8 +390,9 @@ var/list/obj/machinery/requests_console/allConsoles = list() var/obj/item/weapon/card/id/ID = O if (access_RC_announce in ID.GetAccess()) announceAuth = 1 + announcement.announcer = ID.assignment ? "[ID.assignment] [ID.registered_name]" : ID.registered_name else - announceAuth = 0 + reset_announce() user << "\red You are not authorized to send announcements." updateUsrDialog() if (istype(O, /obj/item/weapon/stamp)) @@ -399,3 +401,8 @@ var/list/obj/machinery/requests_console/allConsoles = list() msgStamped = text("Stamped with the [T.name]") updateUsrDialog() return + +/obj/machinery/requests_console/proc/reset_announce() + announceAuth = 0 + message = "" + announcement.announcer = "" diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index e6225f648d7..39e9e903c1a 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -25,15 +25,6 @@ if(!height || air_group) return 0 else return ..() -//Looks like copy/pasted code... I doubt 'need_rebuild' is even used here - Nodrak -/obj/machinery/shield/proc/update_nearby_tiles(need_rebuild) - if(!air_master) return 0 - - air_master.mark_for_update(get_turf(src)) - - return 1 - - /obj/machinery/shield/attackby(obj/item/weapon/W as obj, mob/user as mob) if(!istype(W)) return @@ -335,7 +326,7 @@ // var/maxshieldload = 200 var/obj/structure/cable/attached // the attached cable var/storedpower = 0 - flags = FPRINT | CONDUCT + flags = CONDUCT use_power = 0 /obj/machinery/shieldwallgen/proc/power() diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index d2d93afba2c..54355179c8e 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -1,3 +1,4 @@ +var/datum/announcement/minor/slotmachine_announcement = new(do_log = 0) /obj/machinery/slot_machine name = "Slot Machine" desc = "Gambling for the antisocial." @@ -55,7 +56,7 @@ if (roll == 1) for(var/mob/O in hearers(src, null)) O.show_message(text("[] says, 'JACKPOT! You win [src.money]!'", src), 1) - command_alert("Congratulations [usr.name] on winning the Jackpot!", "Jackpot Winner") + slotmachine_announcement.Announce("Congratulations [usr.name] on winning the Jackpot!", "Jackpot Winner") usr.mind.initial_account.money += src.money src.money = 0 else if (roll > 1 && roll <= 10) diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index de3cf6964d6..fd90622de14 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -11,7 +11,6 @@ var/set_temperature = 50 // in celcius, add T0C for kelvin var/heating_power = 40000 - flags = FPRINT New() diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 1b05e84fe9f..0a0d9c32ebd 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -681,24 +681,6 @@ src.updateUsrDialog() return - else if(istype(I,/obj/item/weapon/card/emag)) - - if(emagged) - user << "\red The cycler has already been subverted." - return - - var/obj/item/weapon/card/emag/E = I - src.updateUsrDialog() - E.uses-- - - //Clear the access reqs, disable the safeties, and open up all paintjobs. - user << "\red You run the sequencer across the interface, corrupting the operating protocols." - departments = list("Engineering","Mining","Medical","Security","Atmos","^%###^%$") - emagged = 1 - safeties = 0 - req_access = list() - return - else if(istype(I,/obj/item/clothing/head/helmet/space)) if(locked) @@ -748,6 +730,19 @@ return ..() + +/obj/machinery/suit_cycler/emag_act(user as mob) + if(emagged) + user << "\red The cycler has already been subverted." + return + + //Clear the access reqs, disable the safeties, and open up all paintjobs. + user << "\red You run the sequencer across the interface, corrupting the operating protocols." + departments = list("Engineering","Mining","Medical","Security","Atmos","^%###^%$") + emagged = 1 + safeties = 0 + req_access = list() + return /obj/machinery/suit_cycler/attack_hand(mob/user as mob) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index fcce1742ff9..2aff4b378e7 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -138,7 +138,7 @@ var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) if(payload && !istype(payload, /obj/item/weapon/bombcore/training)) - message_admins("[key_name(user)]? has primed a [name] ([payload]) for detonation at [A.name] (JMP).") + msg_admin_attack("[key_name(user)]? has primed a [name] ([payload]) for detonation at [A.name] (JMP).") log_game("[key_name(user)] has primed a [name] ([payload]) for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])") payload.adminlog = "The [src.name] that [key_name(user)] had primed detonated!" diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm index 9bd46e57ce7..ef50d3ea865 100644 --- a/code/game/machinery/telecomms/logbrowser.dm +++ b/code/game/machinery/telecomms/logbrowser.dm @@ -244,9 +244,11 @@ A.icon_state = "4" A.anchored = 1 del(src) - else if(istype(D, /obj/item/weapon/card/emag) && !emagged) + src.updateUsrDialog() + return + + emag_act(user as mob) + if(!emagged) playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) emagged = 1 user << "\blue You you disable the security protocols" - src.updateUsrDialog() - return diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm index 995d0fc239f..c02ef59e1be 100644 --- a/code/game/machinery/telecomms/telemonitor.dm +++ b/code/game/machinery/telecomms/telemonitor.dm @@ -153,9 +153,11 @@ A.icon_state = "4" A.anchored = 1 del(src) - else if(istype(D, /obj/item/weapon/card/emag) && !emagged) - playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) - emagged = 1 - user << "\blue You you disable the security protocols" src.updateUsrDialog() return + + emag_act(user as mob) + if(!emagged) + playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) + emagged = 1 + user << "\blue You you disable the security protocols" \ No newline at end of file diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm index fed56a35124..e2b42ddbb44 100644 --- a/code/game/machinery/telecomms/traffic_control.dm +++ b/code/game/machinery/telecomms/traffic_control.dm @@ -233,12 +233,14 @@ A.icon_state = "4" A.anchored = 1 del(src) - else if(istype(D, /obj/item/weapon/card/emag) && !emagged) + src.updateUsrDialog() + return + +/obj/machinery/computer/telecomms/traffic/emag_act(user as mob) + if(!emagged) playsound(get_turf(src), 'sound/effects/sparks4.ogg', 75, 1) emagged = 1 user << "\blue You you disable the security protocols" - src.updateUsrDialog() - return /obj/machinery/computer/telecomms/traffic/proc/canAccess(var/mob/user) if(issilicon(user) || in_range(user, src)) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 1aabc4b6d6d..d9afea3dd80 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -31,19 +31,12 @@ return power_station /obj/machinery/computer/teleporter/attackby(I as obj, mob/living/user as mob) - if(istype(I,/obj/item/weapon/card/emag)) // If hit by an emag. - var/obj/item/weapon/card/emag/E = I - if(!emagged) - if(E.uses) - E.uses-- - emagged = 1 - user << "\blue The teleporter can now lock on to Syndicate beacons!" - else - ui_interact(user) - else if(istype(I, /obj/item/device/gps)) + if(istype(I, /obj/item/device/gps)) var/obj/item/device/gps/L = I if(L.locked_location && !(stat & (NOPOWER|BROKEN))) - user.before_take_item(L) + if(!user.unEquip(L)) + user << "\the [I] is stuck to your hand, you cannot put it in \the [src]" + return L.loc = src locked = L user << "You insert the GPS device into the [name]'s slot." @@ -53,6 +46,13 @@ else ..() return + +/obj/machinery/computer/teleporter/emag_act(user as mob) + if(!emagged) + emagged = 1 + user << "\blue The teleporter can now lock on to Syndicate beacons!" + else + ui_interact(user) /obj/machinery/computer/teleporter/attack_paw(mob/user) usr << "You are too primitive to use this computer." @@ -80,7 +80,8 @@ data["calibrated"] = null data["accurate"] = null data["regime"] = regime_set - data["target"] = (!target) ? "None" : get_area(target) + var/area/targetarea = get_area(target) + data["target"] = (!target) ? "None" : sanitize(targetarea.name) data["calibrating"] = calibrating data["locked"] = locked @@ -179,7 +180,7 @@ var/turf/T = get_turf(R) if (!T) continue - if(T.z == 2 || T.z > 7) + if((T.z in config.admin_levels) || T.z > 7) continue if(R.syndicate == 1 && emagged == 0) continue @@ -200,7 +201,7 @@ continue var/turf/T = get_turf(M) if(!T) continue - if(T.z == 2) continue + if((T.z in config.admin_levels)) continue var/tmpname = M.real_name if(areaindex[tmpname]) tmpname = "[tmpname] ([++areaindex[tmpname]])" @@ -222,7 +223,7 @@ var/turf/T = get_turf(R) if (!T || !R.teleporter_hub || !R.teleporter_console) continue - if(T.z == 2 || T.z > 7) + if((T.z in config.admin_levels) || T.z > 7) continue var/tmpname = T.loc.name if(areaindex[tmpname]) @@ -279,7 +280,7 @@ component_parts += new /obj/item/bluespace_crystal/artificial(null) component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) RefreshParts() - + /obj/machinery/teleport/hub/upgraded/New() ..() component_parts = list() diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm index 4f77d7d7c70..90dd7f27d71 100644 --- a/code/game/machinery/turrets.dm +++ b/code/game/machinery/turrets.dm @@ -364,15 +364,6 @@ if (istype(user, /mob/living/silicon)) return src.attack_hand(user) - if (istype(W, /obj/item/weapon/card/emag) && !emagged) - user << "\red You short out the turret controls' access analysis module." - emagged = 1 - locked = 0 - if(user.machine==src) - src.attack_hand(user) - - return - else if( get_dist(src, user) == 0 ) // trying to unlock the interface if (src.allowed(usr)) if(emagged) @@ -390,6 +381,17 @@ src.attack_hand(user) else user << "Access denied." + +/obj/machinery/turretid/emag_act(user as mob) + if (!emagged) + if(!ishuman(user)) + return + var/mob/living/carbon/human/H = user + user << "\red You short out the turret controls' access analysis module." + emagged = 1 + locked = 0 + if(H.machine==src) + src.attack_hand(user) /obj/machinery/turretid/attack_ai(mob/user as mob) if(!ailock) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index a2b95fed050..9376aae0ae4 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -1,17 +1,39 @@ -#define CAT_NORMAL 0 -#define CAT_HIDDEN 1 -#define CAT_COIN 2 +#define CAT_NORMAL 1 +#define CAT_HIDDEN 2 // also used in corresponding wires/vending.dm +#define CAT_COIN 4 +/** + * Datum used to hold information about a product in a vending machine + */ /datum/data/vending_product - var/product_name = "generic" + var/product_name = "generic" // Display name for the product var/product_path = null - var/amount = 0 + var/amount = 0 // Amount held in the vending machine var/max_amount = 0 - var/price = 0 - var/display_color = "blue" - var/category = CAT_NORMAL + var/price = 0 // Price to buy one + var/display_color = null // Display color for vending machine listing + var/category = CAT_NORMAL // CAT_HIDDEN for contraband, CAT_COIN for premium +/datum/data/vending_product/New(var/path, var/name = null, var/amount = 1, var/price = 0, var/color = null, var/category = CAT_NORMAL) + ..() + src.product_path = path + + if(!name) + var/atom/tmp = new path + src.product_name = initial(tmp.name) + del(tmp) + else + src.product_name = name + + src.amount = amount + src.price = price + src.display_color = color + src.category = category + +/** + * A vending machine + */ /obj/machinery/vending name = "Vendomat" desc = "A generic vending machine." @@ -20,11 +42,23 @@ layer = 2.9 anchored = 1 density = 1 + + var/icon_vend //Icon_state when vending + var/icon_deny //Icon_state when denying access + + // Power + use_power = 1 + idle_power_usage = 10 + var/vend_power_usage = 150 + + // Vending-related var/active = 1 //No sales pitches if off! - var/delay_product_spawn // If set, uses sleep() in product spawn proc (mostly for seeds to retrieve correct names). var/vend_ready = 1 //Are we ready to vend?? Is it time?? var/vend_delay = 10 //How long does it take to vend? - var/datum/data/vending_product/currently_vending = null // A /datum/data/vending_product instance of what we're paying for right now. + var/categories = CAT_NORMAL // Bitmask of cats we're currently showing + var/datum/data/vending_product/currently_vending = null // What we're requesting payment for right now + var/status_message = "" // Status screen messages like "insufficient funds", displayed in NanoUI + var/status_error = 0 // Set to 1 if status_message is an error // To be filled out at compile time var/list/products = list() // For each, use the following pattern: @@ -32,27 +66,33 @@ var/list/premium = list() // No specified amount = only one in stock var/list/prices = list() // Prices for each item, list(/type/path = price), items not in the list don't have a price. - var/product_slogans = "" //String of slogans separated by semicolons, optional - var/product_ads = "" //String of small ad messages in the vending screen - random chance + // List of vending_product items available. var/list/product_records = list() var/list/hidden_records = list() - var/list/coin_records = list() + + // // Variables used to initialize advertising + var/product_slogans = "" //String of slogans separated by semicolons, optional + var/product_ads = "" //String of small ad messages in the vending screen - random chance + + var/list/ads_list = list() + + // Stuff relating vocalizations var/list/slogan_list = list() - var/list/small_ads = list() //Small ad messages in the vending screen - random chance of popping up whenever you open it var/vend_reply //Thank you for shopping! + var/shut_up = 0 //Stop spouting those godawful pitches! var/last_reply = 0 - var/obj/item/weapon/vending_refill/refill_canister = null //The type of refill canisters used by this machine. var/last_slogan = 0 //When did we last pitch? var/slogan_delay = 6000 //How long until we can pitch again? - var/icon_vend //Icon_state when vending! - var/icon_deny //Icon_state when vending! - //var/emagged = 0 //Ignores if somebody doesn't have card access to that machine. + + var/obj/item/weapon/vending_refill/refill_canister = null //The type of refill canisters used by this machine. + + // Things that can go wrong + emagged = 0 //Ignores if somebody doesn't have card access to that machine. var/seconds_electrified = 0 //Shock customers like an airlock. var/shoot_inventory = 0 //Fire items at customers! We're broken! var/shoot_speed = 3 //How hard are we firing the items? var/shoot_chance = 2 //How often are we firing the items? - var/shut_up = 0 //Stop spouting those godawful pitches! - var/extended_inventory = 0 //can we access the hidden inventory? + var/scan_id = 1 var/obj/item/weapon/coin/coin var/datum/wires/vending/wires = null @@ -60,32 +100,57 @@ /obj/machinery/vending/New() ..() wires = new(src) - spawn(4) - src.slogan_list = text2list(src.product_slogans, ";") + spawn(50) + if(src.product_slogans) + src.slogan_list += text2list(src.product_slogans, ";") - // So not all machines speak at the exact same time. - // The first time this machine says something will be at slogantime + this random value, - // so if slogantime is 10 minutes, it will say it at somewhere between 10 and 20 minutes after the machine is crated. - src.last_slogan = world.time + rand(0, slogan_delay) + // So not all machines speak at the exact same time. + // The first time this machine says something will be at slogantime + this random value, + // so if slogantime is 10 minutes, it will say it at somewhere between 10 and 20 minutes after the machine is crated. + src.last_slogan = world.time + rand(0, slogan_delay) - src.build_inventory(products) - //Add hidden inventory - src.build_inventory(contraband, 1) - src.build_inventory(premium, 0, 1) + if(src.product_ads) + src.ads_list += text2list(src.product_ads, ";") + + src.build_inventory() power_change() - - return return +/** + * Build src.produdct_records from the products lists + * + * src.products, src.contraband, src.premium, and src.prices allow specifying + * products that the vending machine is to carry without manually populating + * src.product_records. + */ +/obj/machinery/vending/proc/build_inventory() + var/list/all_products = list( + list(src.products, CAT_NORMAL), + list(src.contraband, CAT_HIDDEN), + list(src.premium, CAT_COIN)) + + for(var/current_list in all_products) + var/category = current_list[2] + + for(var/entry in current_list[1]) + var/datum/data/vending_product/product = new/datum/data/vending_product(entry) + + product.price = (entry in src.prices) ? src.prices[entry] : 0 + product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1 + product.max_amount = product.amount + product.category = category + + src.product_records.Add(product) /obj/machinery/vending/Destroy() - del(wires) + del(wires) // qdel wires = null - del(coin) - coin = null + if(coin) + del(coin) // qdel + coin = null ..() /obj/machinery/vending/ex_act(severity) @@ -115,41 +180,6 @@ else del(src) - -/obj/machinery/vending/proc/build_inventory(var/list/productlist,hidden=0,req_coin=0,start_empty = null) - for(var/typepath in productlist) - var/amount = productlist[typepath] - var/price = prices[typepath] - if(isnull(amount)) amount = 1 - - var/atom/temp = new typepath(null) - var/datum/data/vending_product/R = new /datum/data/vending_product() - - R.product_path = typepath - if(!start_empty) - R.amount = amount - R.max_amount = amount - R.price = price - R.display_color = pick("red","blue","green") - if(hidden) - R.category=CAT_HIDDEN - hidden_records += R - else if(req_coin) - R.category=CAT_COIN - coin_records += R - else - R.category=CAT_NORMAL - product_records += R - - if(delay_product_spawn) - sleep(3) - R.product_name = temp.name - else - R.product_name = temp.name - -// world << "Added: [R.product_name]] - [R.amount] - [R.product_path]" - - /obj/machinery/vending/proc/refill_inventory(obj/item/weapon/vending_refill/refill, datum/data/vending_product/machine, mob/user) var/total = 0 @@ -180,10 +210,41 @@ return total /obj/machinery/vending/attackby(obj/item/weapon/W, mob/user) - if(panel_open) - if(default_unfasten_wrench(user, W, time = 60)) - return + if (currently_vending && vendor_account && !vendor_account.suspended) + var/paid = 0 + var/handled = 0 + if(istype(W, /obj/item/weapon/card/id)) + var/obj/item/weapon/card/id/C = W + paid = pay_with_card(C) + handled = 1 + else if (istype(W, /obj/item/weapon/spacecash)) + var/obj/item/weapon/spacecash/C = W + paid = pay_with_cash(C, user) + handled = 1 + if(paid) + src.vend(currently_vending, usr) + return + else if(handled) + nanomanager.update_uis(src) + return // don't smack that machine with your 2 thalers + + if(default_unfasten_wrench(user, W, time = 60)) + return + + if(istype(W, /obj/item/weapon/screwdriver) && anchored) + playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + panel_open = !panel_open + user << "You [panel_open ? "open" : "close"] the maintenance panel." + overlays.Cut() + if(panel_open) + overlays += image(icon, "[initial(icon_state)]-panel") + nanomanager.update_uis(src) // Speaker switch is on the main UI, not wires UI + return + + if(panel_open) + if(istype(W, /obj/item/device/multitool)||istype(W, /obj/item/weapon/wirecutters)) + return attack_hand(user) if(component_parts && istype(W, /obj/item/weapon/crowbar)) var/datum/data/vending_product/machine = product_records for(var/datum/data/vending_product/machine_content in machine) @@ -194,32 +255,13 @@ if(!machine_content.amount) break default_deconstruction_crowbar(W) - - if(istype(W, /obj/item/weapon/card/emag)) - emagged = 1 - user << "You short out the product lock on [src]" - return - else if(istype(W, /obj/item/weapon/screwdriver) && anchored) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - panel_open = !panel_open - user << "You [panel_open ? "open" : "close"] the maintenance panel." - overlays.Cut() - if(panel_open) - overlays += image(icon, "[initial(icon_state)]-panel") - updateUsrDialog() - return - else if(istype(W, /obj/item/device/multitool)||istype(W, /obj/item/weapon/wirecutters)) - if(panel_open) - attack_hand(user) - return - else if(istype(W, /obj/item/weapon/card) && currently_vending) - var/obj/item/weapon/card/I = W - scan_card(I) - else if(istype(W, /obj/item/weapon/coin) && premium.len > 0) + if(istype(W, /obj/item/weapon/coin) && premium.len > 0) user.drop_item() W.loc = src coin = W - user << "You insert [W] into [src]." + categories |= CAT_COIN + user << "\blue You insert the [W] into the [src]" + nanomanager.update_uis(src) return else if(istype(W, refill_canister) && refill_canister != null) if(stat & (BROKEN|NOPOWER)) @@ -241,175 +283,188 @@ else ..() +/obj/machinery/vending/emag_act(user as mob) + emagged = 1 + user << "You short out the product lock on [src]" + return +/** + * Receive payment with cashmoney. + * + * usr is the mob who gets the change. + */ +/obj/machinery/vending/proc/pay_with_cash(var/obj/item/weapon/spacecash/cashmoney, mob/user) + if(currently_vending.price > cashmoney.worth) + // This is not a status display message, since it's something the character + // themselves is meant to see BEFORE putting the money in + usr << "\icon[cashmoney] That is not enough money." + return 0 -/obj/machinery/vending/proc/scan_card(var/obj/item/weapon/card/I) - if(!currently_vending) return - if (istype(I, /obj/item/weapon/card/id)) - var/obj/item/weapon/card/id/C = I - visible_message("[usr] swipes a card through [src].") - if(vendor_account) - var/datum/money_account/D = attempt_account_access_nosec(C.associated_account_number) - if(D) - var/transaction_amount = currently_vending.price - if(transaction_amount <= D.money) + // Bills (banknotes) cannot really have worth different than face value, + // so we have to eat the bill and spit out change in a bundle + // This is really dirty, but there's no superclass for all bills, so we + // just assume that all spacecash that's not something else is a bill - //transfer the money - D.money -= transaction_amount - vendor_account.money += transaction_amount + visible_message("[usr] inserts a credit chip into [src].") + var/left = cashmoney.worth - currently_vending.price + usr.unEquip(cashmoney) + del(cashmoney) - //create entries in the two account transaction logs - var/datum/transaction/T = new() - T.target_name = "[vendor_account.owner_name] (via [src.name])" - T.purpose = "Purchase of [currently_vending.product_name]" - if(transaction_amount > 0) - T.amount = "([transaction_amount])" - else - T.amount = "[transaction_amount]" - T.source_terminal = src.name - T.date = current_date_string - T.time = worldtime2text() - D.transaction_log.Add(T) - // - T = new() - T.target_name = D.owner_name - T.purpose = "Purchase of [currently_vending.product_name]" - T.amount = "[transaction_amount]" - T.source_terminal = src.name - T.date = current_date_string - T.time = worldtime2text() - vendor_account.transaction_log.Add(T) + if(left) + dispense_cash(left, src.loc, user) - // Vend the item - src.vend(src.currently_vending, usr) - currently_vending = null - src.updateUsrDialog() - else - usr << "\icon[src]You don't have that much money!" - else - usr << "\icon[src]Unable to access account. Check security settings and try again." + // Vending machines have no idea who paid with cash + credit_purchase("(cash)") + return 1 + +/** + * Scan a card and attempt to transfer payment from associated account. + * + * Takes payment for whatever is the currently_vending item. Returns 1 if + * successful, 0 if failed + */ +/obj/machinery/vending/proc/pay_with_card(var/obj/item/weapon/card/id/I) + visible_message("[usr] swipes a card through [src].") + var/datum/money_account/customer_account = attempt_account_access_nosec(I.associated_account_number) + if (!customer_account) + src.status_message = "Error: Unable to access account. Please contact technical support if problem persists." + src.status_error = 1 + return 0 + + if(customer_account.suspended) + src.status_message = "Unable to access account: account suspended." + src.status_error = 1 + return 0 + + // Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is + // empty at high security levels + if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2) + var/attempt_pin = input("Enter pin code", "Vendor transaction") as num + customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2) + + if(!customer_account) + src.status_message = "Unable to access account: incorrect credentials." + src.status_error = 1 + return 0 + + if(currently_vending.price > customer_account.money) + src.status_message = "Insufficient funds in account." + src.status_error = 1 + return 0 + else + // Okay to move the money at this point + + // debit money from the purchaser's account + customer_account.money -= currently_vending.price + + // create entry in the purchaser's account log + var/datum/transaction/T = new() + T.target_name = "[vendor_account.owner_name] (via [src.name])" + T.purpose = "Purchase of [currently_vending.product_name]" + if(currently_vending.price > 0) + T.amount = "([currently_vending.price])" else - usr << "\icon[src]Unable to access vendor account. Please record the machine ID and call CentComm Support." + T.amount = "[currently_vending.price]" + T.source_terminal = src.name + T.date = current_date_string + T.time = worldtime2text() + customer_account.transaction_log.Add(T) -/obj/machinery/vending/attack_paw(mob/user as mob) - return attack_hand(user) + // Give the vendor the money. We use the account owner name, which means + // that purchases made with stolen/borrowed card will look like the card + // owner made them + credit_purchase(customer_account.owner_name) + return 1 + +/** + * Add money for current purchase to the vendor account. + * + * Called after the money has already been taken from the customer. + */ +/obj/machinery/vending/proc/credit_purchase(var/target as text) + vendor_account.money += currently_vending.price + + var/datum/transaction/T = new() + T.target_name = target + T.purpose = "Purchase of [currently_vending.product_name]" + T.amount = "[currently_vending.price]" + T.source_terminal = src.name + T.date = current_date_string + T.time = worldtime2text() + vendor_account.transaction_log.Add(T) /obj/machinery/vending/attack_ai(mob/user as mob) return attack_hand(user) -/obj/machinery/vending/proc/GetProductIndex(var/datum/data/vending_product/P) - var/list/plist - switch(P.category) - if(CAT_NORMAL) - plist=product_records - if(CAT_HIDDEN) - plist=hidden_records - if(CAT_COIN) - plist=coin_records - else - warning("UNKNOWN CATEGORY [P.category] IN TYPE [P.product_path] INSIDE [type]!") - return plist.Find(P) - -/obj/machinery/vending/proc/GetProductByID(var/pid, var/category) - switch(category) - if(CAT_NORMAL) - return product_records[pid] - if(CAT_HIDDEN) - return hidden_records[pid] - if(CAT_COIN) - return coin_records[pid] - else - warning("UNKNOWN PRODUCT: PID: [pid], CAT: [category] INSIDE [type]!") - return null +/obj/machinery/vending/attack_paw(mob/user as mob) + return attack_hand(user) /obj/machinery/vending/attack_hand(mob/user as mob) if(stat & (BROKEN|NOPOWER)) return - user.set_machine(src) - if(seconds_electrified != 0) - if(shock(user, 100)) + if(src.seconds_electrified != 0) + if(src.shock(user, 100)) return - var/vendorname = (src.name) //import the machine's name + ui_interact(user) + wires.Interact(user) - if(src.currently_vending) - var/dat = "
[vendorname]


" //display the name, and added a horizontal rule +/** + * Display the NanoUI window for the vending machine. + * + * See NanoUI documentation for details. + */ +/obj/machinery/vending/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + user.set_machine(src) - // AUTOFIXED BY fix_string_idiocy.py - // C:\Users\Rob\Documents\Projects\vgstation13\code\game\machinery\vending.dm:260: dat += "You have selected [currently_vending.product_name].
Please ensure your ID is in your ID holder or hand.

" - dat += {"You have selected [currently_vending.product_name].
Please ensure your ID is in your ID holder or hand.

- Pay | - Cancel"} - // END AUTOFIX - user << browse(dat, "window=vending") - onclose(user, "") - return - - var/dat = "
[vendorname]


" //display the name, and added a horizontal rule - dat += "Select an item:

" //the rest is just general spacing and bolding - - if (premium.len > 0) - dat += "Coin slot: [coin ? coin : "No coin inserted"] (Remove)

" - - if (src.product_records.len == 0) - dat += "No product loaded!" + var/list/data = list() + if(currently_vending) + data["mode"] = 1 + data["product"] = currently_vending.product_name + data["price"] = currently_vending.price + data["message_err"] = 0 + data["message"] = src.status_message + data["message_err"] = src.status_error else - var/list/display_records = list() - display_records += src.product_records + data["mode"] = 0 + var/list/listed_products = list() - if(src.extended_inventory) - display_records += src.hidden_records - if(src.coin) - display_records += src.coin_records + for(var/key = 1 to src.product_records.len) + var/datum/data/vending_product/I = src.product_records[key] - for (var/datum/data/vending_product/R in display_records) + if(!(I.category & src.categories)) + continue - // AUTOFIXED BY fix_string_idiocy.py - // C:\Users\Rob\Documents\Projects\vgstation13\code\game\machinery\vending.dm:285: dat += "[R.product_name]:" - dat += {"[R.product_name]: - [R.amount] "} - // END AUTOFIX - if(R.price) - dat += " (Price: [R.price])" - if (R.amount > 0) - var/idx=GetProductIndex(R) - dat += " (Vend)" - else - dat += " SOLD OUT" - dat += "
" + listed_products.Add(list(list( + "key" = key, + "name" = sanitize(I.product_name), + "price" = I.price, + "color" = I.display_color, + "amount" = I.amount))) - dat += "
" + data["products"] = listed_products - if(panel_open) - dat += wires() + if(src.coin) + data["coin"] = src.coin.name - if(product_slogans != "") - dat += "The speaker switch is [shut_up ? "off" : "on"]. Toggle" + if(src.panel_open) + data["panel"] = 1 + data["speaker"] = src.shut_up ? 0 : 1 + else + data["panel"] = 0 - user << browse(dat, "window=vending") - onclose(user, "") - return - -// returns the wire panel text -/obj/machinery/vending/proc/wires() - return wires.GetInteractWindow() + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + if (!ui) + ui = new(user, src, ui_key, "vending_machine.tmpl", src.name, 440, 600) + ui.set_initial_data(data) + ui.open() /obj/machinery/vending/Topic(href, href_list) if(..()) return 1 - if(istype(usr,/mob/living/silicon)) - if(istype(usr,/mob/living/silicon/robot)) - var/mob/living/silicon/robot/R = usr - if(!(R.module && istype(R.module,/obj/item/weapon/robot_module/butler) ) ) - usr << "\red The vending machine refuses to interface with you, as you are not in its target demographic!" - return - else - usr << "\red The vending machine refuses to interface with you, as you are not in its target demographic!" - return - - if(href_list["remove_coin"]) + if(href_list["remove_coin"] && !istype(usr,/mob/living/silicon)) if(!coin) usr << "There is no coin in this machine." return @@ -419,67 +474,86 @@ usr.put_in_hands(coin) usr << "\blue You remove the [coin] from the [src]" coin = null - usr.set_machine(src) + categories &= ~CAT_COIN + if (href_list["pay"]) + if(currently_vending && vendor_account && !vendor_account.suspended) + if(istype(usr, /mob/living/carbon/human)) + var/paid = 0 + var/handled = 0 + var/mob/living/carbon/human/H = usr + var/obj/item/weapon/card/card = null + if(istype(H.wear_id,/obj/item/weapon/card)) + card = H.wear_id + paid = pay_with_card(card) + handled = 1 + else if(istype(H.get_active_hand(), /obj/item/weapon/card)) + card = H.get_active_hand() + paid = pay_with_card(card) + handled = 1 + if(paid) + src.vend(currently_vending, usr) + return + else if(handled) + nanomanager.update_uis(src) + return // don't smack that machine with your 2 credits if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)))) if ((href_list["vend"]) && (src.vend_ready) && (!currently_vending)) - if (!allowed(usr) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH - usr << "\red Access denied." //Unless emagged of course - flick(src.icon_deny,src) + if(istype(usr,/mob/living/silicon)) + if(istype(usr,/mob/living/silicon/robot)) + var/mob/living/silicon/robot/R = usr + if(!(R.module && istype(R.module,/obj/item/weapon/robot_module/butler) )) + usr << "\red The vending machine refuses to interface with you, as you are not in its target demographic!" + return + else + usr << "\red The vending machine refuses to interface with you, as you are not in its target demographic!" + return + + if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH + usr << "Access denied." //Unless emagged of course + flick(icon_deny,src) return - var/idx=text2num(href_list["vend"]) - var/cat=text2num(href_list["cat"]) + var/key = text2num(href_list["vend"]) + var/datum/data/vending_product/R = product_records[key] - var/datum/data/vending_product/R = GetProductByID(idx,cat) - if (!R || !istype(R) || !R.product_path || R.amount <= 0) + // This should not happen unless the request from NanoUI was bad + if(!(R.category & src.categories)) return - if(R.price == null) + if(R.price <= 0) src.vend(R, usr) else src.currently_vending = R - src.updateUsrDialog() + if(!vendor_account || vendor_account.suspended) + src.status_message = "This machine is currently unable to process payments due to problems with the associated account." + src.status_error = 1 + else + src.status_message = "Please swipe a card or insert cash to pay for the item." + src.status_error = 0 - return - - else if (href_list["cancel_buying"]) + else if (href_list["cancelpurchase"]) src.currently_vending = null - src.updateUsrDialog() - return - - else if (href_list["buy"]) - if(istype(usr, /mob/living/carbon/human)) - var/mob/living/carbon/human/H=usr - var/obj/item/weapon/card/card = null - if(istype(H.wear_id,/obj/item/weapon/card)) - card=H.wear_id - else if(istype(H.get_active_hand(),/obj/item/weapon/card)) - card=H.get_active_hand() - if(card) - scan_card(card) - return else if ((href_list["togglevoice"]) && (src.panel_open)) src.shut_up = !src.shut_up src.add_fingerprint(usr) - src.updateUsrDialog() - else - usr << browse(null, "window=vending") - return - return + nanomanager.update_uis(src) /obj/machinery/vending/proc/vend(datum/data/vending_product/R, mob/user) - if (!allowed(user) && !emagged && wires.IsIndexCut(VENDING_WIRE_IDSCAN)) //For SECURE VENDING MACHINES YEAH - user << "\red Access denied." //Unless emagged of course + if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH + usr << "Access denied." //Unless emagged of course flick(src.icon_deny,src) return src.vend_ready = 0 //One thing at a time!! + src.status_message = "Vending..." + src.status_error = 0 + nanomanager.update_uis(src) - if (R in coin_records) + if (R.category & CAT_COIN) if(!coin) user << "\blue You need to insert a coin to get this item." return @@ -489,8 +563,10 @@ else user << "\blue You weren't able to pull the coin out fast enough, the machine ate it, string and all." del(coin) + categories &= ~CAT_COIN else del(coin) + categories &= ~CAT_COIN R.amount-- @@ -499,16 +575,16 @@ src.speak(src.vend_reply) src.last_reply = world.time - use_power(5) + use_power(vend_power_usage) //actuators and stuff if (src.icon_vend) //Show the vending animation if needed flick(src.icon_vend,src) spawn(src.vend_delay) new R.product_path(get_turf(src)) + src.status_message = "" + src.status_error = 0 src.vend_ready = 1 - return - - src.updateUsrDialog() - + currently_vending = null + nanomanager.update_uis(src) /obj/machinery/vending/proc/stock(var/datum/data/vending_product/R, var/mob/user) if(src.panel_open) @@ -809,7 +885,7 @@ /obj/item/weapon/reagent_containers/glass/bottle/stoxin = 4,/obj/item/weapon/reagent_containers/glass/bottle/toxin = 4, /obj/item/weapon/reagent_containers/syringe/antiviral = 4,/obj/item/weapon/reagent_containers/syringe = 12, /obj/item/device/healthanalyzer = 5,/obj/item/weapon/reagent_containers/glass/beaker = 4, /obj/item/weapon/reagent_containers/dropper = 2, - /obj/item/stack/medical/advanced/bruise_pack = 3, /obj/item/stack/medical/advanced/ointment = 3, /obj/item/stack/medical/splint = 2) + /obj/item/stack/medical/advanced/bruise_pack = 3, /obj/item/stack/medical/advanced/ointment = 3, /obj/item/stack/medical/splint = 2, /obj/item/device/sensor_device = 2) contraband = list(/obj/item/weapon/reagent_containers/pill/tox = 3,/obj/item/weapon/reagent_containers/pill/stox = 4,/obj/item/weapon/reagent_containers/pill/antitox = 6) @@ -860,7 +936,7 @@ icon_state = "sec" icon_deny = "sec-deny" req_access_txt = "1" - products = list(/obj/item/weapon/handcuffs = 8,/obj/item/weapon/grenade/flashbang = 4,/obj/item/device/flash = 5, + products = list(/obj/item/weapon/restraints/handcuffs = 8,/obj/item/weapon/restraints/handcuffs/cable/zipties = 8,/obj/item/weapon/grenade/flashbang = 4,/obj/item/device/flash = 5, /obj/item/weapon/reagent_containers/food/snacks/donut/normal = 12,/obj/item/weapon/storage/box/evidence = 6,/obj/item/device/flashlight/seclite = 4) contraband = list(/obj/item/clothing/glasses/sunglasses = 2,/obj/item/weapon/storage/fancy/donut_box = 2,/obj/item/device/hailer = 5) @@ -883,19 +959,45 @@ product_slogans = "THIS'S WHERE TH' SEEDS LIVE! GIT YOU SOME!;Hands down the best seed selection on the station!;Also certain mushroom varieties available, more for experts! Get certified today!" product_ads = "We like plants!;Grow some crops!;Grow, baby, growww!;Aw h'yeah son!" icon_state = "seeds" - delay_product_spawn = 1 products = list(/obj/item/seeds/bananaseed = 3,/obj/item/seeds/berryseed = 3,/obj/item/seeds/carrotseed = 3,/obj/item/seeds/chantermycelium = 3,/obj/item/seeds/chiliseed = 3, /obj/item/seeds/cornseed = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/replicapod = 3,/obj/item/seeds/soyaseed = 3, /obj/item/seeds/sunflowerseed = 3,/obj/item/seeds/tomatoseed = 3,/obj/item/seeds/towermycelium = 3,/obj/item/seeds/wheatseed = 3,/obj/item/seeds/appleseed = 3, /obj/item/seeds/poppyseed = 3,/obj/item/seeds/ambrosiavulgarisseed = 3,/obj/item/seeds/whitebeetseed = 3,/obj/item/seeds/watermelonseed = 3,/obj/item/seeds/limeseed = 3, /obj/item/seeds/lemonseed = 3,/obj/item/seeds/orangeseed = 3,/obj/item/seeds/grassseed = 3,/obj/item/seeds/cocoapodseed = 3, - /obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3) + /obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3, + /obj/item/seeds/tobaccoseed = 3, /obj/item/seeds/coffeeaseed = 3, /obj/item/seeds/teaasperaseed = 3) contraband = list(/obj/item/seeds/amanitamycelium = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/libertymycelium = 2,/obj/item/seeds/nettleseed = 2, /obj/item/seeds/plumpmycelium = 2,/obj/item/seeds/reishimycelium = 2) premium = list(/obj/item/weapon/reagent_containers/spray/waterflower = 1) +/** + * Populate hydroseeds product_records + * + * This needs to be customized to fetch the actual names of the seeds, otherwise + * the machine would simply list "packet of seeds" times 20 + */ +/obj/machinery/vending/hydroseeds/build_inventory() + var/list/all_products = list( + list(src.products, CAT_NORMAL), + list(src.contraband, CAT_HIDDEN), + list(src.premium, CAT_COIN)) + + for(var/current_list in all_products) + var/category = current_list[2] + + for(var/entry in current_list[1]) + var/obj/item/seeds/S = new entry(src) + var/name = S.name + var/datum/data/vending_product/product = new/datum/data/vending_product(entry, name) + + product.price = (entry in src.prices) ? src.prices[entry] : 0 + product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1 + product.max_amount = product.amount + product.category = category + + src.product_records.Add(product) /obj/machinery/vending/magivend name = "MagiVend" diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index c72b2338cba..c48d5e3a89c 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -151,7 +151,7 @@ if (S.chained == 1) S.chained = 0 S.slowdown = SHOES_SLOWDOWN - new /obj/item/weapon/handcuffs( src ) + new /obj/item/weapon/restraints/handcuffs( src ) S.icon_state = new_shoe_icon_state S._color = _color S.name = new_shoe_name diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index ac2986f18a2..87561d447ab 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -30,8 +30,30 @@ insisting++ else - user << "You speak. [pick("I want the station to disappear","Humanity is corrupt, mankind must be destroyed","I want to be rich", "I want to rule the world","I want immortality.")]. The Wish Granter answers." - user << "Your head pounds for a moment, before your vision clears. You are the avatar of the Wish Granter, and your power is LIMITLESS! And it's all yours. You need to make sure no one can take it from you. No one can know, first." + user << "The power of the Wish Granter have turned you into the superhero the station deserves. You are a masked vigilante, and answer to no man. Will you use your newfound strength to protect the innocent, or will you hunt the guilty?" + + ticker.mode.traitors += user.mind + user.mind.special_role = "The Hero The Station Deserves" + + var/wish = input("You want to...","Wish") as null|anything in list("Protect the innocent","Hunt the guilty") + switch(wish) + if("Protect the innocent") + var/datum/objective/protect/protect = new + protect.owner = user.mind + user.mind.objectives += protect + + if("Hunt the guilty") + var/datum/objective/assassinate/assasinate = new + assasinate.owner = user.mind + user.mind.objectives += assasinate + + var/obj_count = 1 + for(var/datum/objective/OBJ in user.mind.objectives) + user << "Objective #[obj_count]: [OBJ.explanation_text]" + obj_count++ + + user << "As a superhero, you are allowed to pick an appropriate pseudonym for your new role. A costume is also strongly encouraged." + user.rename_self() charges-- insisting = 0 @@ -57,25 +79,9 @@ if (!(M_TK in user.mutations)) user.mutations.Add(M_TK) - /* Not used - if(!(HEAL in user.mutations)) - user.mutations.Add(HEAL) - */ + if(!(M_REGEN in user.mutations)) + user.mutations.Add(M_REGEN) user.update_mutations() - ticker.mode.traitors += user.mind - user.mind.special_role = "Avatar of the Wish Granter" - - var/datum/objective/silence/silence = new - silence.owner = user.mind - user.mind.objectives += silence - - var/obj_count = 1 - for(var/datum/objective/OBJ in user.mind.objectives) - user << "Objective #[obj_count]: [OBJ.explanation_text]" - obj_count++ - - user << "You have a very bad feeling about this." - return \ No newline at end of file diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index cf3cd0022a6..efe31d5bf62 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -389,7 +389,7 @@ range = RANGED action(atom/target) - if(!action_checks(target) || src.loc.z == 2) return + if(!action_checks(target) || (src.loc.z in config.admin_levels)) return var/turf/T = get_turf(target) if(T) set_ready_state(0) @@ -410,7 +410,7 @@ action(atom/target) - if(!action_checks(target) || src.loc.z == 2) return + if(!action_checks(target) || (src.loc.z in config.admin_levels)) return var/list/theareas = list() for(var/area/AR in orange(100, chassis)) if(AR in theareas) continue diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index a4c8b5a527a..fc8c5ee658a 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -158,7 +158,7 @@ var/mob/living/carbon/human/H = M if(isobj(H.shoes)) var/thingy = H.shoes - H.drop_from_inventory(H.shoes) + H.unEquip(H.shoes) walk_away(thingy,chassis,15,2) spawn(20) if(thingy) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 5b7a50c8594..76d2c03c934 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -513,10 +513,7 @@ return 1 else user << "You can't load \the [name] while it's opened." - return 1 - - if(istype(W,/obj/item/weapon/card/emag)) - emag() + return 1 if(istype(W, /obj/item/stack)) var/material @@ -561,6 +558,9 @@ else user << "\The [src] cannot hold any more [sname] sheet\s." return + +/obj/machinery/mecha_part_fabricator/emag_act(user as mob) + emag() /obj/machinery/mecha_part_fabricator/proc/material2name(var/ID) return copytext(ID,2) \ No newline at end of file diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index e62872c9664..398c297cb24 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -697,17 +697,6 @@ /obj/mecha/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/card/emag)) - if(istype(src, /obj/mecha/working/ripley) && emagged == 0) - emagged = 1 - usr << "\blue You slide the [W] through the [src]'s ID slot." - playsound(src.loc, "sparks", 100, 1) - src.desc += "
\red The mech's equiptment slots spark dangerously!" - else - usr <<"\red The [src]'s ID slot rejects the [W]." - return - - if(istype(W, /obj/item/device/mmi) || istype(W, /obj/item/device/mmi/posibrain)) if(mmi_move_inside(W,user)) user << "[src]-MMI interface initialized successfuly" @@ -809,7 +798,9 @@ return else if(istype(W, /obj/item/mecha_parts/mecha_tracking)) - user.drop_from_inventory(W) + if(!user.unEquip(W)) + user << "\the [W] is stuck to your hand, you cannot put it in \the [src]" + return W.forceMove(src) user.visible_message("[user] attaches [W] to [src].", "You attach [W] to [src]") return @@ -862,6 +853,15 @@ */ return +/obj/mecha/emag_act(user as mob) + if(istype(src, /obj/mecha/working/ripley) && emagged == 0) + emagged = 1 + usr << "\blue You slide the card through the [src]'s ID slot." + playsound(src.loc, "sparks", 100, 1) + src.desc += "
\red The mech's equiptment slots spark dangerously!" + else + usr <<"\red The [src]'s ID slot rejects the card." + return /* @@ -1118,7 +1118,9 @@ else if(mmi_as_oc.brainmob.stat) user << "Beta-rhythm below acceptable level." return 0 - user.drop_from_inventory(mmi_as_oc) + if(!user.unEquip(mmi_as_oc)) + user << "\the [mmi_as_oc] is stuck to your hand, you cannot put it in \the [src]" + return var/mob/brainmob = mmi_as_oc.brainmob brainmob.reset_view(src) /* diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm index 58b2d2215ce..f89390139b6 100644 --- a/code/game/mecha/mecha_parts.dm +++ b/code/game/mecha/mecha_parts.dm @@ -7,7 +7,7 @@ icon = 'icons/mecha/mech_construct.dmi' icon_state = "blank" w_class = 6 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT origin_tech = "programming=2;materials=2" var/construction_time = 100 var/list/construction_cost = list("metal"=20000,"glass"=5000) @@ -18,7 +18,7 @@ icon_state = "backbone" var/datum/construction/construct construction_cost = list("metal"=20000) - flags = FPRINT | CONDUCT + flags = CONDUCT attackby(obj/item/W as obj, mob/user as mob) if(!construct || !construct.action(W, user)) @@ -409,7 +409,7 @@ icon_state = "std_mod" item_state = "electronic" board_type = "other" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT force = 5.0 w_class = 2.0 throwforce = 5.0 diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 27db5475d94..4440c825215 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -11,14 +11,12 @@ would spawn and follow the beaker, even if it is carried or thrown. icon = 'icons/effects/effects.dmi' mouse_opacity = 0 unacidable = 1//So effect are not targeted by alien acid. - flags = TABLEPASS /obj/effect/effect/water name = "water" icon = 'icons/effects/effects.dmi' icon_state = "extinguish" var/life = 15.0 - flags = TABLEPASS mouse_opacity = 0 /obj/effect/effect/smoke @@ -183,36 +181,40 @@ steam.start() -- spawns the effect return /datum/effect/effect/system/spark_spread - set_up(n = 3, c = 0, loca) - number = n > 10 ? 10 : n - cardinals = c + var/total_sparks = 0 // To stop it being spammed and lagging! - if (istype(loca, /turf/)) + set_up(n = 3, c = 0, loca) + if(n > 10) + n = 10 + number = n + cardinals = c + if(istype(loca, /turf/)) location = loca else location = get_turf(loca) start() - for (var/i = 1 to number) - spawn() - if (holder) - location = get_turf(holder) - - var/obj/effect/effect/sparks/sparks = getFromPool(/obj/effect/effect/sparks, location) - playsound(location, "sparks", 100, 1) + var/i = 0 + for(i=0, i 20) + return + spawn(0) + if(holder) + src.location = get_turf(holder) + var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location) + src.total_sparks++ var/direction - - if (cardinals) + if(src.cardinals) direction = pick(cardinal) else direction = pick(alldirs) - - for (var/j = 0, j < pick(1, 2, 3), j++) + for(i=0, i 0) - devastation = min (MAX_EXPLOSION_RANGE, devastation + round(amount/12)) + devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12)) if (round(amount/6) > 0) - heavy = min (MAX_EXPLOSION_RANGE, heavy + round(amount/6)) + heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6)) if (round(amount/3) > 0) - light = min (MAX_EXPLOSION_RANGE, light + round(amount/3)) + light = min (MAX_EX_LIGHT_RANGE, light + round(amount/3)) if (flash && flashing_factor) flash += (round(amount/4) * flashing_factor) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 21179bd93dd..24af225a8ab 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -5,13 +5,11 @@ var/no_embed = 0 // For use in item_attack.dm var/icon/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite var/blood_overlay_color = null - var/abstract = 0 var/item_state = null var/r_speed = 1.0 var/health = null var/hitsound = null var/w_class = 3.0 - flags = FPRINT | TABLEPASS var/slot_flags = 0 //This is used to determine on which slots an item can fit. pass_flags = PASSTABLE pressure_resistance = 5 @@ -35,7 +33,6 @@ var/permeability_coefficient = 1 // for chemicals/diseases var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit) var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up - var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N var/reflect_chance = 0 //This var dictates what % of a time an object will reflect an energy based weapon's shot var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) var/list/allowed = null //suit storage stuff. @@ -56,7 +53,7 @@ /obj/item/Destroy() if(istype(src.loc, /mob)) var/mob/H = src.loc - H.drop_from_inventory(src) // items at the very least get unequipped from their mob before being deleted + H.unEquip(src) // items at the very least get unequipped from their mob before being deleted if(reagents && istype(reagents)) reagents.my_atom = null reagents.delete() @@ -151,19 +148,16 @@ S.remove_from_storage(src) src.throwing = 0 - if (src.loc == user) - //canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N - if(!src.canremove) + if (loc == user) + if(!user.unEquip(src)) return 0 - else - user.u_equip(src) else - if(isliving(src.loc)) + if(isliving(loc)) return 0 user.next_move = max(user.next_move+2,world.time + 2) - src.pickup(user) + pickup(user) add_fingerprint(user) user.put_in_active_hand(src) return 1 @@ -176,7 +170,7 @@ if(!A.has_fine_manipulation || w_class >= 4) if(src in A.contents) // To stop Aliens having items stuck in their pockets - A.drop_from_inventory(src) + A.unEquip(src) user << "Your claws aren't capable of such fine manipulation." return @@ -187,11 +181,8 @@ M.client.screen -= src src.throwing = 0 if (src.loc == user) - //canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N - if(istype(src, /obj/item/clothing) && !src:canremove) + if(!user.unEquip(src)) return - else - user.u_equip(src) else if(istype(src.loc, /mob/living)) return @@ -207,7 +198,7 @@ if(!A.has_fine_manipulation || w_class >= 4) if(src in A.contents) // To stop Aliens having items stuck in their pockets - A.drop_from_inventory(src) + A.unEquip(src) user << "Your claws aren't capable of such fine manipulation." return attack_paw(A) @@ -422,6 +413,8 @@ return 0 return 1 if(slot_l_store) + if(flags & NODROP) //Pockets aren't visible, so you can't move NODROP items into them. + return 0 if(H.l_store) return 0 if(!H.w_uniform) @@ -433,6 +426,8 @@ if( w_class <= 2 || (slot_flags & SLOT_POCKET) ) return 1 if(slot_r_store) + if(flags & NODROP) + return 0 if(H.r_store) return 0 if(!H.w_uniform) @@ -445,6 +440,8 @@ return 1 return 0 if(slot_s_store) + if(flags & NODROP) //Suit storage NODROP items drop if you take a suit off, this is to prevent people exploiting this. + return 0 if(H.s_store) return 0 if(!H.wear_suit) @@ -465,13 +462,13 @@ if(slot_handcuffed) if(H.handcuffed) return 0 - if(!istype(src, /obj/item/weapon/handcuffs)) + if(!istype(src, /obj/item/weapon/restraints/handcuffs)) return 0 return 1 if(slot_legcuffed) if(H.legcuffed) return 0 - if(!istype(src, /obj/item/weapon/legcuffs)) + if(!istype(src, /obj/item/weapon/restraints/legcuffs)) return 0 return 1 if(slot_in_backpack) diff --git a/code/game/objects/items/apc_frame.dm b/code/game/objects/items/apc_frame.dm index f2e760a34a5..b81a80a5f65 100644 --- a/code/game/objects/items/apc_frame.dm +++ b/code/game/objects/items/apc_frame.dm @@ -5,7 +5,7 @@ desc = "Used for repairing or building APCs" icon = 'icons/obj/apc_repair.dmi' icon_state = "apc_frame" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT /obj/item/apc_frame/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() diff --git a/code/game/objects/items/ashtray.dm b/code/game/objects/items/ashtray.dm index 5ec88ac8bdf..5e6274b7cf0 100644 --- a/code/game/objects/items/ashtray.dm +++ b/code/game/objects/items/ashtray.dm @@ -21,7 +21,7 @@ if (contents.len >= max_butts) user << "This ashtray is full." return - user.u_equip(W) + user.unEquip(W) W.loc = src if (istype(W,/obj/item/clothing/mask/cigarette)) diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index b47a2a30684..61f341f0362 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -59,7 +59,8 @@ if(!wax) new/obj/item/trash/candle(src.loc) if(istype(src.loc, /mob)) - src.dropped() + var/mob/M = src.loc + M.unEquip(src, 1) //src is being deleted anyway del(src) update_icon() if(istype(loc, /turf)) //start a fire if possible diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 826de6fd4c4..728ecb5e9f7 100755 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -11,7 +11,6 @@ var/global/list/obj/item/device/pda/PDAs = list() icon_state = "pda" item_state = "electronic" w_class = 1.0 - flags = FPRINT | TABLEPASS slot_flags = SLOT_PDA | SLOT_BELT //Main variables @@ -51,6 +50,7 @@ var/global/list/obj/item/device/pda/PDAs = list() var/obj/item/weapon/card/id/id = null //Making it possible to slot an ID card into the PDA so it can function as both. var/ownjob = null //related to above + var/ownrank = null // this one is rank, never alt title var/obj/item/device/paicard/pai = null // A slot for a personal AI device @@ -129,15 +129,15 @@ var/global/list/obj/item/device/pda/PDAs = list() icon_state = "pda-captain" detonate = 0 //toff = 1 - + /obj/item/device/pda/heads/ntrep default_cartridge = /obj/item/weapon/cartridge/supervisor icon_state = "pda-h" - + /obj/item/device/pda/heads/magistrate default_cartridge = /obj/item/weapon/cartridge/supervisor icon_state = "pda-h" - + /obj/item/device/pda/heads/blueshield default_cartridge = /obj/item/weapon/cartridge/hos icon_state = "pda-h" @@ -204,7 +204,7 @@ var/global/list/obj/item/device/pda/PDAs = list() /obj/item/device/pda/geneticist default_cartridge = /obj/item/weapon/cartridge/medical icon_state = "pda-genetics" - + /obj/item/device/pda/centcom default_cartridge = /obj/item/weapon/cartridge/centcom icon_state = "pda-h" @@ -217,9 +217,13 @@ var/global/list/obj/item/device/pda/PDAs = list() detonate = 0 -/obj/item/device/pda/ai/proc/set_name_and_job(newname as text, newjob as text) +/obj/item/device/pda/ai/proc/set_name_and_job(newname as text, newjob as text, newrank as null|text) owner = newname ownjob = newjob + if(newrank) + ownrank = newrank + else + ownrank = ownjob name = newname + " (" + ownjob + ")" @@ -575,6 +579,7 @@ var/global/list/obj/item/device/pda/PDAs = list() id_check(U, 1) if("UpdateInfo") ownjob = id.assignment + ownrank = id.rank name = "PDA-[owner] ([ownjob])" if("Eject")//Ejects the cart, only done from hub. if (!isnull(cartridge)) @@ -1069,6 +1074,7 @@ var/global/list/obj/item/device/pda/PDAs = list() if(!owner) owner = idcard.registered_name ownjob = idcard.assignment + ownrank = idcard.rank name = "PDA-[owner] ([ownjob])" user << "Card scanned." else diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 7816473110e..144b920631c 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -4,7 +4,6 @@ icon_state = "aicard" // aicard-full item_state = "electronic" w_class = 2.0 - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT var/flush = null origin_tech = "programming=4;materials=4" @@ -137,4 +136,4 @@ if(2.0) if(prob(50)) del(src) if(3.0) - if(prob(25)) del(src) + if(prob(25)) del(src) diff --git a/code/game/objects/items/devices/autopsy.dm b/code/game/objects/items/devices/autopsy.dm index 8c5fbf7661e..67a424a309f 100644 --- a/code/game/objects/items/devices/autopsy.dm +++ b/code/game/objects/items/devices/autopsy.dm @@ -7,7 +7,7 @@ desc = "Extracts information on wounds." icon = 'icons/obj/autopsy_scanner.dmi' icon_state = "" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT w_class = 1.0 origin_tech = "materials=1;biotech=1" var/list/datum/autopsy_data_scanner/wdata = list() diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 008a469dff9..de79a855768 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -1,7 +1,7 @@ /obj/item/device/chameleon name = "chameleon-projector" icon_state = "shield0" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT item_state = "electronic" throwforce = 5.0 diff --git a/code/game/objects/items/devices/debugger.dm b/code/game/objects/items/devices/debugger.dm index 7a05fc696a9..1b9d5e13344 100644 --- a/code/game/objects/items/devices/debugger.dm +++ b/code/game/objects/items/devices/debugger.dm @@ -9,7 +9,7 @@ name = "debugger" desc = "Used to debug electronic equipment." icon_state = "hacktool-g" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT force = 5.0 w_class = 2.0 throwforce = 5.0 diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 9c17c585b39..09b5201fdb0 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -7,7 +7,7 @@ w_class = 1 throw_speed = 3 throw_range = 7 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT origin_tech = "magnets=2;combat=1" var/times_used = 0 //Number of times it's been used. diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 5c4201e2bc0..10c31d54773 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -5,7 +5,7 @@ icon_state = "flashlight" item_state = "flashlight" w_class = 2 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT m_amt = 50 g_amt = 20 @@ -107,7 +107,7 @@ item_state = "" w_class = 1 slot_flags = SLOT_BELT | SLOT_EARS - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT brightness_on = 2 /obj/item/device/flashlight/seclite @@ -125,7 +125,7 @@ desc = "A miniature lamp, that might be used by small robots." icon_state = "penlight" item_state = "" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT brightness_on = 2 w_class = 1 diff --git a/code/game/objects/items/devices/handtv.dm b/code/game/objects/items/devices/handtv.dm index 0406db85852..48e22348f32 100644 --- a/code/game/objects/items/devices/handtv.dm +++ b/code/game/objects/items/devices/handtv.dm @@ -7,7 +7,7 @@ /obj/item/device/handtv/attack_self(mob/usr as mob) var/list/cameras = new/list() - for (var/obj/machinery/camera/C in cameranet.viewpoints) + for (var/obj/machinery/camera/C in cameranet.cameras) if (C.hasbug && C.status) cameras.Add(C) if (length(cameras) == 0) diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 9c8f766714f..d3ba41ca58c 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -5,7 +5,7 @@ icon_state = "pointer" item_state = "pen" var/pointer_icon_state - flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY + flags = CONDUCT | USEDELAY slot_flags = SLOT_BELT m_amt = 500 g_amt = 500 diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 63836e9ecc6..f4129666026 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -47,7 +47,7 @@ icon_state = "lightreplacer0" item_state = "electronic" - flags = FPRINT | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT origin_tech = "magnets=3;materials=2" @@ -72,10 +72,6 @@ usr << "It has [uses] lights remaining." /obj/item/device/lightreplacer/attackby(obj/item/W, mob/user) - if(istype(W, /obj/item/weapon/card/emag) && emagged == 0) - Emag() - return - if(istype(W, /obj/item/stack/sheet/glass)) var/obj/item/stack/sheet/glass/G = W if(G.amount - decrement >= 0 && uses < max_uses) @@ -104,7 +100,10 @@ user << "You need a working light." return - +/obj/item/device/lightreplacer/emag_act(user as mob) + if(!emagged) + Emag() + /obj/item/device/lightreplacer/attack_self(mob/user) /* // This would probably be a bit OP. If you want it though, uncomment the code. if(isrobot(user)) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 0d12f8262b6..3968ee1a441 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -4,7 +4,7 @@ icon_state = "megaphone" item_state = "radio" w_class = 1.0 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT var/spamcheck = 0 var/emagged = 0 @@ -47,10 +47,8 @@ spamcheck = 0 return -/obj/item/device/megaphone/attackby(obj/item/I, mob/user) - if(istype(I, /obj/item/weapon/card/emag) && !emagged) +/obj/item/device/megaphone/emag_act(user as mob) + if(!emagged) user << "\red You overload \the [src]'s voice synthesizer." emagged = 1 insults = rand(1, 3)//to prevent dickflooding - return - return \ No newline at end of file diff --git a/code/game/objects/items/devices/modkit.dm b/code/game/objects/items/devices/modkit.dm index 6e23e94d4ad..61c83fdc462 100644 --- a/code/game/objects/items/devices/modkit.dm +++ b/code/game/objects/items/devices/modkit.dm @@ -23,7 +23,7 @@ if(!parts) user << "This kit has no parts for this modification left." - user.drop_from_inventory(src) + user.unEquip(src) del(src) return @@ -59,7 +59,7 @@ parts &= ~MODKIT_SUIT if(!parts) - user.drop_from_inventory(src) + user.unEquip(src) del(src) /obj/item/device/modkit/examine() diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 85a30681b1a..21bd2c49ddf 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -8,7 +8,7 @@ name = "multitool" desc = "Used for pulsing wires to test which to cut. Not recommended by doctors." icon_state = "multitool" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT force = 5.0 w_class = 2.0 throwforce = 5.0 diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index cb7dea3371d..cdd866e41c6 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -4,7 +4,6 @@ icon_state = "pai" item_state = "electronic" w_class = 2.0 - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT origin_tech = "programming=2" var/obj/item/device/radio/radio diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index 088a51574ab..6fb0a998d0b 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -6,7 +6,7 @@ icon_state = "powersink0" item_state = "electronic" w_class = 4.0 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT throwforce = 5 throw_speed = 1 throw_range = 2 diff --git a/code/game/objects/items/devices/radio/beacon.dm b/code/game/objects/items/devices/radio/beacon.dm index 15f59e66dcb..628a6ee8bba 100644 --- a/code/game/objects/items/devices/radio/beacon.dm +++ b/code/game/objects/items/devices/radio/beacon.dm @@ -8,15 +8,11 @@ var/emagged = 0 var/syndicate = 0 -/obj/item/device/radio/beacon/attackby(I as obj, mob/living/user as mob) - if(istype(I,/obj/item/weapon/card/emag)) // If hit by an emag. - var/obj/item/weapon/card/emag/E = I - if(!emagged) - if(E.uses) - E.uses-- - emagged = 1 - syndicate = 1 - user << "\blue The This beacon now only be locked on to by emagged teleporters!" +/obj/item/device/radio/beacon/emag_act(user as mob) + if(!emagged) + emagged = 1 + syndicate = 1 + user << "\blue The This beacon now only be locked on to by emagged teleporters!" /obj/item/device/radio/beacon/hear_talk() return diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index ccdc3a9bce4..b737f9d92ca 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -4,7 +4,7 @@ icon_state = "electropack0" item_state = "electropack" frequency = 1449 - flags = FPRINT | CONDUCT | TABLEPASS + flags = CONDUCT slot_flags = SLOT_BACK w_class = 5.0 g_amt = 2500 @@ -35,18 +35,22 @@ var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit( user ) A.icon = 'icons/obj/assemblies.dmi' - user.drop_from_inventory(W) + if(!user.unEquip(W)) + user << "\the [W] is stuck to your hand, you cannot attach it to \the [src]!" + return W.loc = A W.master = A A.part1 = W - user.drop_from_inventory(src) + user.unEquip(src) loc = A master = A A.part2 = src user.put_in_hands(A) A.add_fingerprint(user) + if(src.flags & NODROP) + A.flags |= NODROP /obj/item/device/radio/electropack/Topic(href, href_list) //..() diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 3f30f0c03e7..0f5f9f64ac1 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -5,7 +5,7 @@ anchored = 1 w_class = 4.0 canhear_range = 5 - flags = FPRINT | CONDUCT | TABLEPASS | NOBLOODY + flags = CONDUCT | NOBLOODY var/number = 0 var/anyai = 1 var/mob/living/silicon/ai/ai = list() diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 9f177bdf642..28fdc835308 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -26,7 +26,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use var/syndie = 0//Holder to see if it's a syndicate encrypted radio var/maxf = 1499 // "Example" = FREQ_LISTENING|FREQ_BROADCASTING - flags = FPRINT | CONDUCT | TABLEPASS + flags = CONDUCT slot_flags = SLOT_BELT throw_speed = 2 throw_range = 9 diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index fd084bab1a9..097c60d57df 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -13,7 +13,6 @@ REAGENT SCANNER desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." icon_state = "t-ray0" var/on = 0 - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT w_class = 2 item_state = "electronic" @@ -99,7 +98,7 @@ REAGENT SCANNER item_state = "healthanalyzer" icon_override = 'icons/mob/in-hand/tools.dmi' desc = "A hand-held body scanner able to distinguish vital signs of the subject." - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT throwforce = 3 w_class = 1.0 @@ -260,7 +259,7 @@ REAGENT SCANNER icon_state = "atmos" item_state = "analyzer" w_class = 2.0 - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT throwforce = 5 throw_speed = 4 @@ -330,7 +329,7 @@ REAGENT SCANNER icon_state = "spectrometer" item_state = "analyzer" w_class = 2.0 - flags = FPRINT | TABLEPASS| CONDUCT | OPENCONTAINER + flags = CONDUCT | OPENCONTAINER slot_flags = SLOT_BELT throwforce = 5 throw_speed = 4 @@ -403,7 +402,7 @@ REAGENT SCANNER icon_state = "spectrometer" item_state = "analyzer" w_class = 2.0 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT throwforce = 5 throw_speed = 4 diff --git a/code/game/objects/items/devices/sensor_device.dm b/code/game/objects/items/devices/sensor_device.dm new file mode 100644 index 00000000000..5db0bdc47f4 --- /dev/null +++ b/code/game/objects/items/devices/sensor_device.dm @@ -0,0 +1,18 @@ +/obj/item/device/sensor_device + name = "handheld crew monitor" + desc = "A miniature machine that tracks suit sensors across the station." + icon = 'icons/obj/device.dmi' + icon_state = "scanner" + w_class = 2.0 + slot_flags = SLOT_BELT + origin_tech = "biotech=3;materials=3;magnets=3" + var/obj/nano_module/crew_monitor/crew_monitor + +/obj/item/device/sensor_device/New() + crew_monitor = new(src) + +/obj/item/device/sensor_device/attack_self(mob/user as mob) + ui_interact(user) + +/obj/item/device/sensor_device/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + crew_monitor.ui_interact(user, ui_key, ui, force_open) \ No newline at end of file diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index f4dfd0bf245..9c98165239e 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -5,23 +5,23 @@ 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 = FPRINT | TABLEPASS | CONDUCT + 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/stock_parts/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() @@ -30,26 +30,26 @@ /obj/item/device/suit_cooling_unit/proc/cool_mob(mob/M) if (!on || !cell) return - + //make sure they have a suit and we are attached to it if (!attached_to_suit(M)) return - + var/mob/living/carbon/human/H = M - + var/efficiency = H.get_pressure_protection() //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) //only cools, doesn't heat 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() @@ -65,22 +65,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() @@ -88,7 +88,7 @@ return if(cell.charge <= 0) return - + on = 1 updateicon() @@ -143,7 +143,7 @@ user << "You insert the [cell]." updateicon() return - + return ..() /obj/item/device/suit_cooling_unit/proc/updateicon() @@ -157,9 +157,9 @@ /obj/item/device/suit_cooling_unit/examine() set src in view(1) - + ..() - + if (on) if (attached_to_suit(src.loc)) usr << "It's switched on and running." @@ -167,13 +167,13 @@ usr << "It's switched on, but not attached to anything." else usr << "It is switched off." - + if (cover_open) if(cell) usr << "The panel is open, exposing the [cell]." else usr << "The panel is open." - + if (cell) usr << "The charge meter reads [round(cell.percent())]%." else diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 555dbe1caea..8477205a84a 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -14,7 +14,7 @@ var/list/storedinfo = new/list() var/list/timestamp = new/list() var/canprint = 1 - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT throwforce = 2 throw_speed = 4 throw_range = 20 @@ -38,17 +38,15 @@ storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] says, \"[msg]\"" return -/obj/item/device/taperecorder/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if(istype(W, /obj/item/weapon/card/emag)) - if(emagged == 0) - emagged = 1 - recording = 0 - user << "PZZTTPFFFT" - icon_state = "taperecorderidle" - else - user << "It is already emagged!" - +/obj/item/device/taperecorder/emag_act(user as mob) + if(!emagged == 0) + emagged = 1 + recording = 0 + user << "PZZTTPFFFT" + icon_state = "taperecorderidle" + else + user << "It is already emagged!" + /obj/item/device/taperecorder/proc/explode() var/turf/T = get_turf(loc) if(ismob(loc)) diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index b80f89f2295..d49b8e19b4c 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -22,7 +22,7 @@ effective or pretty fucking useless. w_class = 1.0 throw_speed = 4 throw_range = 10 - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT item_state = "electronic" origin_tech = "magnets=3;combat=3;syndicate=3" @@ -78,7 +78,7 @@ effective or pretty fucking useless. item_state = "healthanalyzer" icon_override = 'icons/mob/in-hand/tools.dmi' desc = "A hand-held body scanner able to distinguish vital signs of the subject. A strange microlaser is hooked on to the scanning end." - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT discrete = 1 // Makes the item not give an attack log message for viewers. throwforce = 3 diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 282abc1b2bc..a3e0d2f7b78 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -51,8 +51,8 @@ A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb). bombers += "[key_name(user)] attached a [item] to a transfer valve." - message_admins("[key_name_admin(user)] attached a [item] to a transfer valve.") - log_game("[key_name_admin(user)] attached a [item] to a transfer valve.") + msg_admin_attack("[key_name_admin(user)] attached [item] to a transfer valve.") + log_game("[key_name_admin(user)] attached [item] to a transfer valve.") attacher = user nanomanager.update_uis(src) // update all UIs attached to src return @@ -66,7 +66,7 @@ /obj/item/device/transfer_valve/attack_self(mob/user as mob) ui_interact(user) - + /obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) // this is the data which will be sent to the ui @@ -77,13 +77,13 @@ data["valveOpen"] = valve_open ? 1 : 0 // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280) // when the ui is first opened this is the data it will use - ui.set_initial_data(data) + ui.set_initial_data(data) // open the new ui window ui.open() // auto update every Master Controller tick @@ -190,7 +190,7 @@ log_str += " Last touched by: [src.fingerprintslast][last_touch_info]" bombers += log_str - message_admins(log_str, 0, 1) + msg_admin_attack(log_str, 0, 1) log_game(log_str) merge_gases() spawn(20) // In case one tank bursts diff --git a/code/game/objects/items/devices/whistle.dm b/code/game/objects/items/devices/whistle.dm index 3b26c943acb..3d515d6259e 100644 --- a/code/game/objects/items/devices/whistle.dm +++ b/code/game/objects/items/devices/whistle.dm @@ -4,7 +4,7 @@ icon_state = "voice0" item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang) w_class = 1.0 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT var/spamcheck = 0 var/emagged = 0 @@ -24,9 +24,8 @@ spawn(20) spamcheck = 0 -/obj/item/device/hailer/attackby(obj/item/I, mob/user) - if(istype(I, /obj/item/weapon/card/emag) && !emagged) +/obj/item/device/hailer/emag_act(user as mob) + if(!emagged) user << "\red You overload \the [src]'s voice synthesizer." emagged = 1 - return - return \ No newline at end of file + diff --git a/code/game/objects/items/policetape.dm b/code/game/objects/items/policetape.dm index 8a1cc09c7ec..583aaafe379 100644 --- a/code/game/objects/items/policetape.dm +++ b/code/game/objects/items/policetape.dm @@ -3,7 +3,6 @@ name = "tape roll" icon = 'icons/policetape.dmi' icon_state = "rollstart" - flags = FPRINT w_class = 1.0 var/turf/start var/turf/end @@ -27,7 +26,7 @@ /obj/item/tape/police name = "police tape" desc = "A length of police tape. Do not cross." - req_access = list(access_security) + req_one_access = list(access_security,access_forensics_lockers) icon_base = "police" /obj/item/taperoll/engineering @@ -115,7 +114,7 @@ if(!density) return 1 if(air_group || (height==0)) return 1 - if ((mover.flags & 2 || istype(mover, /obj/effect/meteor) || mover.throwing == 1) ) + if ((mover.pass_flags & PASSTABLE || istype(mover, /obj/effect/meteor) || mover.throwing == 1) ) return 1 else return 0 @@ -134,9 +133,9 @@ /obj/item/tape/attack_paw(mob/user as mob) breaktape(/obj/item/weapon/wirecutters,user) - + /obj/item/tape/attack_alien(mob/user as mob) - breaktape(/obj/item/weapon/wirecutters,user) + breaktape(/obj/item/weapon/wirecutters,user) /obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob) if(user.a_intent == "help" && ((!can_puncture(W) && src.allowed(user)))) diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index b1f5a1570fd..c28dc6ac883 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -3,7 +3,7 @@ icon = 'icons/obj/robot_parts.dmi' item_state = "buildpipe" icon_state = "blank" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT var/construction_time = 100 var/list/construction_cost = list("metal"=20000,"glass"=5000) @@ -109,7 +109,7 @@ user << "You armed the robot frame" W:use(1) if (user.get_inactive_hand()==src) - user.before_take_item(src) + user.unEquip(src) user.put_in_inactive_hand(B) del(src) if(istype(W, /obj/item/robot_parts/l_leg)) diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index 4414c3d8694..0bdbfe90647 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -3,7 +3,7 @@ desc = "Some rods. Can be used for building, or something." singular_name = "metal rod" icon_state = "rods" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT w_class = 3.0 force = 9.0 throwforce = 15.0 @@ -65,4 +65,4 @@ usr << "\blue You assemble a grille" F.add_fingerprint(usr) use(2) - return + return diff --git a/code/game/objects/items/stacks/sheets/light.dm b/code/game/objects/items/stacks/sheets/light.dm index faacdf59df8..51aed957168 100644 --- a/code/game/objects/items/stacks/sheets/light.dm +++ b/code/game/objects/items/stacks/sheets/light.dm @@ -8,7 +8,7 @@ throwforce = 5.0 throw_speed = 5 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT max_amount = 60 /obj/item/stack/light_w/attackby(var/obj/item/O as obj, var/mob/user as mob) @@ -19,17 +19,17 @@ amount-- new/obj/item/stack/sheet/glass(user.loc) if(amount <= 0) - user.drop_from_inventory(src) + user.unEquip(src, 1) del(src) if(istype(O,/obj/item/stack/sheet/metal)) var/obj/item/stack/sheet/metal/M = O M.amount-- if(M.amount <= 0) - user.drop_from_inventory(M) + user.unEquip(src, 1) del(M) amount-- new/obj/item/stack/tile/light(user.loc) if(amount <= 0) - user.drop_from_inventory(src) + user.unEquip(src, 1) del(src) diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 1cc1ac1695e..b510d6be4f6 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -79,7 +79,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \ icon_state = "sheet-metal" m_amt = 3750 throwforce = 14.0 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT origin_tech = "materials=1" /obj/item/stack/sheet/metal/cyborg @@ -89,7 +89,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \ icon_state = "sheet-metal" m_amt = 0 throwforce = 14.0 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT /obj/item/stack/sheet/metal/New(var/loc, var/amount=null) recipes = metal_recipes @@ -116,7 +116,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \ item_state = "sheet-metal" m_amt = 7500 throwforce = 15.0 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT origin_tech = "materials=2" /obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null) @@ -186,7 +186,6 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \ desc = "Large sheets of card, like boxes folded flat." singular_name = "cardboard sheet" icon_state = "sheet-card" - flags = FPRINT | TABLEPASS origin_tech = "materials=1" /obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null) diff --git a/code/game/objects/items/stacks/sheets/sheets.dm b/code/game/objects/items/stacks/sheets/sheets.dm index 0d612f9fd8b..74ebf59b11e 100644 --- a/code/game/objects/items/stacks/sheets/sheets.dm +++ b/code/game/objects/items/stacks/sheets/sheets.dm @@ -1,6 +1,5 @@ /obj/item/stack/sheet name = "sheet" - flags = FPRINT | TABLEPASS w_class = 3.0 force = 5 throwforce = 5 diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index e3d457fc477..a4f2cc60829 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -145,7 +145,7 @@ if (src.amount<=0) var/oldsrc = src src = null //dont kill proc after del() - usr.before_take_item(oldsrc) + usr.unEquip(oldsrc, 1) del(oldsrc) if (istype(O,/obj/item)) usr.put_in_hands(O) @@ -167,7 +167,7 @@ amount -= used if (amount <= 0) if(usr) - usr.before_take_item(src, 1) + usr.unEquip(src, 1) qdel(src) return 1 @@ -185,7 +185,7 @@ usr << "You add new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s." if(!oldsrc) break - + /obj/item/stack/proc/get_amount() return amount diff --git a/code/game/objects/items/stacks/tiles/light.dm b/code/game/objects/items/stacks/tiles/light.dm index 8fdcd7a5618..688c3347116 100644 --- a/code/game/objects/items/stacks/tiles/light.dm +++ b/code/game/objects/items/stacks/tiles/light.dm @@ -8,7 +8,7 @@ throwforce = 5.0 throw_speed = 5 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT max_amount = 60 attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed") var/on = 1 @@ -32,5 +32,5 @@ amount-- new/obj/item/stack/light_w(user.loc) if(amount <= 0) - user.drop_from_inventory(src) + user.unEquip(src, 1) del(src) \ No newline at end of file diff --git a/code/game/objects/items/stacks/tiles/plasteel.dm b/code/game/objects/items/stacks/tiles/plasteel.dm index cbbf1811cc5..80c0a6919d1 100644 --- a/code/game/objects/items/stacks/tiles/plasteel.dm +++ b/code/game/objects/items/stacks/tiles/plasteel.dm @@ -9,7 +9,7 @@ throwforce = 15.0 throw_speed = 5 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT max_amount = 60 /obj/item/stack/tile/plasteel/New(var/loc, var/amount=null) diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index 1e10932b9d1..b6ae03aa271 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -18,7 +18,7 @@ throwforce = 1.0 throw_speed = 5 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT max_amount = 60 origin_tech = "biotech=1" @@ -35,7 +35,7 @@ throwforce = 1.0 throw_speed = 5 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT max_amount = 60 /* @@ -51,5 +51,5 @@ throwforce = 1.0 throw_speed = 5 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT max_amount = 60 \ No newline at end of file diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 33858980b99..b338a1c259a 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -133,7 +133,7 @@ icon = 'icons/obj/gun.dmi' icon_state = "revolver" item_state = "gun" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT w_class = 3.0 g_amt = 10 @@ -190,7 +190,7 @@ desc = "There are 7 caps left! Make sure to recyle the box in an autolathe when it gets empty." icon = 'icons/obj/ammo.dmi' icon_state = "357-7" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT w_class = 1.0 g_amt = 10 m_amt = 10 @@ -211,7 +211,6 @@ icon = 'icons/obj/gun.dmi' icon_state = "crossbow" item_state = "crossbow" - flags = FPRINT | TABLEPASS w_class = 2.0 attack_verb = list("attacked", "struck", "hit") var/bullets = 5 @@ -306,7 +305,6 @@ desc = "Its nerf or nothing! Ages 8 and up." icon = 'icons/obj/toy.dmi' icon_state = "foamdart" - flags = FPRINT | TABLEPASS w_class = 1.0 /obj/effect/foam_dart_dummy @@ -327,7 +325,7 @@ desc = "Looks almost like the real thing! Great for practicing Drive-bys" icon_state = "tommy" item_state = "tommy" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT w_class = 1.0 attack_verb = list("struck", "hammered", "hit", "bashed") bullets = 20.0 @@ -353,7 +351,7 @@ item_state = "sword0" var/active = 0.0 w_class = 2.0 - flags = FPRINT | TABLEPASS | NOSHIELD + flags = NOSHIELD attack_verb = list("attacked", "struck", "hit") attack_self(mob/user as mob) @@ -386,9 +384,13 @@ user << "You try to attach the end of the plastic sword to... itself. You're not very smart, are you?" if(ishuman(user)) user.adjustBrainLoss(10) + else if((W.flags & NODROP) || (flags & NODROP)) + user << "\the [flags & NODROP ? src : W] is stuck to your hand, you can't attach it to \the [flags & NODROP ? W : src]!" else user << "You attach the ends of the two plastic swords, making a single double-bladed toy! You're fake-cool." new /obj/item/weapon/twohanded/dualsaber/toy(user.loc) + user.unEquip(W) + user.unEquip(src) del(W) del(src) @@ -419,7 +421,7 @@ icon = 'icons/obj/weapons.dmi' icon_state = "katana" item_state = "katana" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT | SLOT_BACK force = 5 throwforce = 5 @@ -604,7 +606,7 @@ icon = 'icons/obj/weapons.dmi' icon_state = "katana" item_state = "katana" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT | SLOT_BACK force = 5 throwforce = 5 @@ -705,8 +707,10 @@ obj/item/toy/cards/deck/attackby(obj/item/toy/cards/singlecard/C, mob/living/use ..() if(istype(C)) if(C.parentdeck == src) + if(!user.unEquip(C)) + user << "The card is stuck to your hand, you can't add it to the deck!" + return src.cards += C.cardname - user.u_equip(C) user.visible_message("[user] adds a card to the bottom of the deck.","You add the card to the bottom of the deck.") del(C) else @@ -723,8 +727,10 @@ obj/item/toy/cards/deck/attackby(obj/item/toy/cards/cardhand/C, mob/living/user) ..() if(istype(C)) if(C.parentdeck == src) + if(!user.unEquip(C)) + user << "The hand of cards is stuck to your hand, you can't add it to the deck!" + return src.cards += C.currenthand - user.u_equip(C) user.visible_message("[user] puts their hand of cards in the deck.", "You put the hand of cards in the deck.") del(C) else @@ -741,22 +747,19 @@ obj/item/toy/cards/deck/MouseDrop(atom/over_object) if(usr.stat || !ishuman(usr) || !usr.canmove || usr.restrained()) return if(Adjacent(usr)) - if(over_object == M) + if(over_object == M && loc != M) M.put_in_hands(src) usr << "You pick up the deck." else if(istype(over_object, /obj/screen)) switch(over_object.name) - if("r_hand") - M.u_equip(src) - M.put_in_r_hand(src) - usr << "You pick up the deck." if("l_hand") - M.u_equip(src) M.put_in_l_hand(src) - usr << "You pick up the deck." + else if("r_hand") + M.put_in_r_hand(src) + usr << "You pick up the deck." else - usr<< "You can't reach it from here." + usr << "You can't reach it from here." @@ -816,7 +819,7 @@ obj/item/toy/cards/cardhand/Topic(href, href_list) N.parentdeck = src.parentdeck N.cardname = src.currenthand[1] N.apply_card_vars(N,O) - cardUser.u_equip(src) + cardUser.unEquip(src) N.pickup(cardUser) cardUser.put_in_any_hand_if_possible(N) cardUser << "You also take [currenthand[1]] and hold it." @@ -828,7 +831,7 @@ obj/item/toy/cards/cardhand/attackby(obj/item/toy/cards/singlecard/C, mob/living if(istype(C)) if(C.parentdeck == src.parentdeck) src.currenthand += C.cardname - user.u_equip(C) + user.unEquip(C) user.visible_message("[user] adds a card to their hand.", "You add the [C.cardname] to your hand.") interact(user) if(currenthand.len > 4) @@ -904,7 +907,7 @@ obj/item/toy/cards/singlecard/attackby(obj/item/I, mob/living/user) H.currenthand += src.cardname H.parentdeck = C.parentdeck H.apply_card_vars(H,C) - user.u_equip(C) + user.unEquip(C) H.pickup(user) user.put_in_active_hand(H) user << "You combine the [C.cardname] and the [src.cardname] into a hand." @@ -917,7 +920,7 @@ obj/item/toy/cards/singlecard/attackby(obj/item/I, mob/living/user) var/obj/item/toy/cards/cardhand/H = I if(H.parentdeck == parentdeck) H.currenthand += cardname - user.u_equip(src) + user.unEquip(src) user.visible_message("[user] adds a card to \his hand.", "You add the [cardname] to your hand.") H.interact(user) if(H.currenthand.len > 4) @@ -1066,7 +1069,6 @@ obj/item/toy/cards/deck/syndicate/black desc = "No bother to sink or swim when you can just float!" icon_state = "inflatable" item_state = "inflatable" - flags = FPRINT | TABLEPASS icon = 'icons/obj/clothing/belts.dmi' slot_flags = SLOT_BELT @@ -1079,7 +1081,6 @@ obj/item/toy/cards/deck/syndicate/black desc = "Relive the excitement of a meteor shower! SweetMeat-eor. Co is not responsible for any injuries, headaches or hearing loss caused by Mini-Meteor™" icon = 'icons/obj/toy.dmi' icon_state = "minimeteor" - flags = FPRINT | TABLEPASS w_class = 2.0 /obj/item/toy/minimeteor/throw_impact(atom/hit_atom) @@ -1100,7 +1101,6 @@ obj/item/toy/cards/deck/syndicate/black icon = 'icons/obj/toy.dmi' icon_state = "carpplushie" w_class = 2.0 - flags = FPRINT | TABLEPASS /* * Toy big red button diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index c30f2e1ab1d..d73420e42ee 100755 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -12,7 +12,7 @@ AI MODULES icon_state = "std_mod" item_state = "electronic" desc = "An AI Module for transmitting encrypted instructions to the AI." - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT force = 5.0 w_class = 2.0 throwforce = 5.0 @@ -101,13 +101,20 @@ AI MODULES for(var/templaw in laws) target.add_inherent_law(templaw) +/obj/item/weapon/aiModule/zeroth + var/removeownlaw = 0 + /obj/item/weapon/aiModule/zeroth/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) if(target.laws.zeroth) - target << "[sender.real_name] attempted to modify your zeroth law." - target << "It would be in your best interest to play along with [sender.real_name] that:" - for(var/failedlaw in laws) - target << "[failedlaw]" - return 1 + if(removeownlaw && (laws[1] == target.laws.zeroth)) + target.clear_zeroth_law() + return 2 + else + target << "[sender.real_name] attempted to modify your zeroth law." + target << "It would be in your best interest to play along with [sender.real_name] that:" + for(var/failedlaw in laws) + target << "[failedlaw]" + return 1 for(var/templaw in laws) target.set_zeroth_law(templaw) @@ -149,7 +156,7 @@ AI MODULES /obj/item/weapon/aiModule/zeroth/oneHuman name = "'OneHuman' AI Module" var/targetName = "" - desc = "A 'one human' AI module: 'Only is crew.'" + desc = "A 'one human' AI module: 'Only is crew.' This module adds a zeroth law, which can only be removed by uploading this board again." origin_tech = "programming=3;materials=6" //made with diamonds! laws = list("Only is crew.") @@ -159,6 +166,7 @@ AI MODULES targetName = targName laws[1] = "Only [targetName] is crew" desc = "A 'one crew' AI module: '[laws[1]]'" + removeownlaw = 1 /obj/item/weapon/aiModule/zeroth/oneHuman/install(var/mob/living/silicon/S,var/mob/user) if(!targetName) @@ -167,8 +175,10 @@ AI MODULES ..() /obj/item/weapon/aiModule/zeroth/oneHuman/transmitInstructions(var/mob/living/silicon/target, var/mob/sender) - if(..()) - return "[targetName], but the AI's existing law 0 cannot be overriden." + if(..() == 1) + return "[targetName], but the AI's existing zeroth law cannot be overriden." + if(..() == 2) + return "The AI's zeroth law has been overridden." return targetName @@ -186,13 +196,17 @@ AI MODULES /obj/item/weapon/aiModule/zeroth/quarantine name = "'Quarantine' AI Module" - desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, organics from leaving. It is impossible to harm an organic while preventing them from leaving.'" + desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, organics from leaving. It is impossible to harm an organic while preventing them from leaving.' This module adds a zeroth law, which can only be removed by uploading this board again." origin_tech = "programming=3;biotech=2;materials=4" laws = list("The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, organics from leaving. It is impossible to harm an organic while preventing them from leaving.") + removeownlaw = 1 /obj/item/weapon/aiModule/zeroth/quarantine/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) - if(..()) - return "The AI's existing law 0 cannot be overriden." + var/result = ..() + if(result == 1) + return "The AI's existing zeroth law cannot be overriden." + if(result == 2) + return "The AI's zeroth law has been overridden." return laws[1] /******************** OxygenIsToxicToHumans ********************/ @@ -259,7 +273,7 @@ AI MODULES /obj/item/weapon/aiModule/reset/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) ..() - target.clear_inherent_laws() + target.clear_inherent_laws() /******************* Full Core Boards *******************/ diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index fc6ad2b6093..1cb3dbcd718 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -12,7 +12,7 @@ RCD opacity = 0 density = 0 anchored = 0.0 - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT force = 10.0 throwforce = 10.0 throw_speed = 3 diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index fa55fc8e624..1712f52d6f2 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -13,7 +13,6 @@ RSF anchored = 0.0 var/matter = 0 var/mode = 1 - flags = TABLEPASS w_class = 3.0 /obj/item/weapon/rsf/New() diff --git a/code/game/objects/items/weapons/alien_specific.dm b/code/game/objects/items/weapons/alien_specific.dm index ba914f4f8ce..7170e1c9019 100644 --- a/code/game/objects/items/weapons/alien_specific.dm +++ b/code/game/objects/items/weapons/alien_specific.dm @@ -11,7 +11,7 @@ throw_speed = 1 throw_range = 5 w_class = 2.0 - flags = FPRINT | TABLEPASS | NOSHIELD + flags = NOSHIELD attack_verb = list("attacked", "slashed", "gored", "sliced", "torn", "ripped", "butchered", "cut") //Bottles for borg liquid squirters. PSSH PSSH diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 0fb733cad2a..dd849488a3b 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -69,58 +69,15 @@ item_state = "card-id" origin_tech = "magnets=2;syndicate=2" flags = NOBLUDGEON - var/uses = 1000000 - // List of devices that cost a use to emag. - var/list/devices = list( - /obj/item/robot_parts, - /obj/item/weapon/storage/lockbox, - /obj/item/weapon/storage/secure, - /obj/item/weapon/circuitboard, - /obj/item/device/eftpos, - /obj/item/device/lightreplacer, - /obj/item/device/taperecorder, - /obj/item/device/hailer, - /obj/item/clothing/accessory/holobadge, - /obj/structure/closet/crate/secure, - /obj/structure/closet/secure_closet, - /obj/machinery/librarycomp, - /obj/machinery/computer, - /obj/machinery/power, - /obj/machinery/suspension_gen, - /obj/machinery/shield_capacitor, - /obj/machinery/shield_gen, -// /obj/machinery/zero_point_emitter, - /obj/machinery/clonepod, - /obj/machinery/deployable, - /obj/machinery/door_control, - /obj/machinery/porta_turret, - /obj/machinery/shieldgen, - /obj/machinery/turretid, - /obj/machinery/vending, - /obj/machinery/bot, - /obj/machinery/door, - /obj/machinery/telecomms, - /obj/machinery/mecha_part_fabricator, - /obj/vehicle - ) +/obj/item/weapon/card/emag/attack() + return -/obj/item/weapon/card/emag/afterattack(var/obj/item/weapon/O as obj, mob/user as mob) - - for(var/type in devices) - if(istype(O,type)) - uses-- - break - - if(uses<1) - user.visible_message("[src] fizzles and sparks - it seems it's been used once too often, and is now broken.") - user.drop_item() - var/obj/item/weapon/card/emag_broken/junk = new(user.loc) - junk.add_fingerprint(user) - del(src) +/obj/item/weapon/card/emag/afterattack(atom/target, mob/user, proximity) + var/atom/A = target + if(!proximity) return - - ..() + A.emag_act(user) /obj/item/weapon/card/id name = "identification card" @@ -444,4 +401,4 @@ decal_name = "cryptographic sequencer" decal_desc = "It's a card with a magnetic strip attached to some circuitry." decal_icon_state = "emag" - override_name = 1 + override_name = 1 diff --git a/code/game/objects/items/weapons/chrono_eraser.dm b/code/game/objects/items/weapons/chrono_eraser.dm index a3b92ee4dbd..15640ba0670 100644 --- a/code/game/objects/items/weapons/chrono_eraser.dm +++ b/code/game/objects/items/weapons/chrono_eraser.dm @@ -44,11 +44,11 @@ item_state = "chronogun" icon_override = 'icons/mob/in-hand/guns.dmi' w_class = 3.0 - canremove = 0 projectile_type = "/obj/item/projectile/energy/chrono_beam" fire_sound = 'sound/weapons/Laser.ogg' charge_cost = 0 fire_delay = 50 + flags = NODROP var/obj/item/weapon/chrono_eraser/TED = null var/obj/effect/chrono_field/field = null var/turf/startpos = null diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index b5ad7cae55f..33b7f064e14 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -137,12 +137,18 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/datum/effect/effect/system/reagents_explosion/e = new() e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0) e.start() + if(ismob(loc)) + var/mob/M = loc + M.unEquip(src, 1) del(src) return if(reagents.get_reagent_amount("fuel")) // the fuel explodes, too, but much less violently var/datum/effect/effect/system/reagents_explosion/e = new() e.set_up(round(reagents.get_reagent_amount("fuel") / 5, 1), get_turf(src), 0, 0) e.start() + if(ismob(loc)) + var/mob/M = loc + M.unEquip(src, 1) del(src) return flags &= ~NOREACT // allowing reagents to react after being lit @@ -193,8 +199,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM if(ismob(loc)) var/mob/living/M = loc M << "Your [name] goes out." - M.u_equip(src) //un-equip it so the overlays can update - M.update_inv_wear_mask(0) + M.unEquip(src, 1) //Force the un-equip so the overlays update processing_objects.Remove(src) del(src) @@ -385,7 +390,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/icon_off = "lighter-g" w_class = 1 throwforce = 4 - flags = TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT attack_verb = list("burnt", "singed") var/lit = 0 @@ -524,10 +529,10 @@ obj/item/weapon/rollingpaperpack/attack_self(mob/user) else if(istype(over_object, /obj/screen)) switch(over_object.name) if("r_hand") - M.u_equip(src) + M.unEquip(src) M.put_in_r_hand(src) if("l_hand") - M.u_equip(src) + M.unEquip(src) M.put_in_l_hand(src) /obj/item/weapon/rollingpaperpack/examine() diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index 1adcbc06172..5ebe282547f 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -3,7 +3,6 @@ desc = "A generic brand of lipstick." icon = 'icons/obj/items.dmi' icon_state = "lipstick" - flags = FPRINT | TABLEPASS w_class = 1.0 var/colour = "red" var/open = 0 @@ -91,7 +90,7 @@ desc = "The latest and greatest power razor born from the science of shaving." icon = 'icons/obj/items.dmi' icon_state = "razor" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT w_class = 1.0 /obj/item/weapon/razor/attack(mob/living/carbon/M as mob, mob/user as mob) diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index b65a1904116..377ff97902a 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -92,14 +92,6 @@ bcell = W user << "You install a cell in [src]." - if(istype(W, /obj/item/weapon/card/emag)) - if(safety) - safety = 0 - user << "You silently disable [src]'s safety protocols with the [W]." - else - safety = 1 - user << "You silently enable [src]'s safety protocols with the [W]." - if(istype(W, /obj/item/weapon/screwdriver)) if(bcell) bcell.updateicon() @@ -110,7 +102,13 @@ update_icon() return - +/obj/item/weapon/defibrillator/emag_act(user as mob) + if(safety) + safety = 0 + user << "You silently disable [src]'s safety protocols with the card." + else + safety = 1 + user << "You silently enable [src]'s safety protocols with the card." /obj/item/weapon/defibrillator/emp_act(severity) if(bcell) @@ -120,11 +118,11 @@ if(safety) safety = 0 src.visible_message("[src] beeps: Safety protocols disabled!") - playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0) + playsound(get_turf(src), 'sound/machines/defib_saftyOff.ogg', 50, 0) else safety = 1 src.visible_message("[src] beeps: Safety protocols enabled!") - playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0) + playsound(get_turf(src), 'sound/machines/defib_saftyOn.ogg', 50, 0) update_icon() ..() @@ -160,7 +158,7 @@ /obj/item/weapon/defibrillator/proc/remove_paddles(mob/user) var/mob/living/carbon/human/M = user if(paddles in get_both_hands(M)) - M.u_equip(paddles) + M.unEquip(paddles) update_icon() return @@ -189,14 +187,14 @@ if(bcell) if(bcell.charge >= paddles.revivecost) user.visible_message("[src] beeps: Unit ready.") - playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0) + playsound(get_turf(src), 'sound/machines/defib_ready.ogg', 50, 0) else user.visible_message("[src] beeps: Charge depleted.") - playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0) + playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0) paddles.cooldown = 0 paddles.update_icon() update_icon() - + /obj/item/weapon/defibrillator/compact name = "compact defibrillator" desc = "A belt-equipped defibrillator that can be rapidly deployed." @@ -276,7 +274,7 @@ /obj/item/weapon/twohanded/shockpaddles/suicide_act(mob/user) user.visible_message("[user] is putting the live paddles on \his chest! It looks like \he's trying to commit suicide.") defib.deductcharge(revivecost) - playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1) + playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1) return (OXYLOSS) /obj/item/weapon/twohanded/shockpaddles/dropped(mob/user as mob) @@ -292,7 +290,7 @@ /obj/item/weapon/twohanded/shockpaddles/proc/check_defib_exists(mainunit, var/mob/living/carbon/human/M, var/obj/O) if (!mainunit || !istype(mainunit, /obj/item/weapon/defibrillator)) //To avoid weird issues from admin spawns - M.u_equip(O) + M.unEquip(O) qdel(O) return 0 else @@ -307,7 +305,7 @@ return if(!defib.powered) user.visible_message("[defib] beeps: Unit is unpowered.") - playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0) + playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0) return if(!wielded) user << "You need to wield the paddles in both hands before you can use them on someone!" @@ -326,7 +324,7 @@ H.adjustStaminaLoss(50) H.Weaken(5) H.updatehealth() //forces health update before next life tick - playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1) + playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1) H.emote("gasp") add_logs(user, M, "stunned", object="defibrillator") defib.deductcharge(revivecost) @@ -341,7 +339,7 @@ update_icon() if(do_after(user, 30)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process user.visible_message("[user] places [src] on [M.name]'s chest.", "You place [src] on [M.name]'s chest.") - playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 0) + playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0) var/mob/dead/observer/ghost = H.get_ghost() var/tplus = world.time - H.timeofdeath var/tlimit = 6000 //past this much time the patient is unrecoverable (in deciseconds) @@ -353,7 +351,7 @@ if(istype(carried_item, /obj/item/clothing/suit/space)) if(!defib.combat) user.visible_message("[defib] buzzes: Patient's chest is obscured. Operation aborted.") - playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0) + playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0) busy = 0 update_icon() return @@ -361,7 +359,7 @@ var/health = H.health M.visible_message("[M]'s body convulses a bit.") playsound(get_turf(src), "bodyfall", 50, 1) - playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1) + playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1) for(var/datum/organ/external/O in H.organs) total_brute += O.brute_dam total_burn += O.burn_dam @@ -373,7 +371,7 @@ H.adjustFireLoss(tobehealed) H.adjustBruteLoss(tobehealed) user.visible_message("[defib] pings: Resuscitation successful.") - playsound(get_turf(src), 'sound/machines/ping.ogg', 50, 0) + playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0) H.stat = 1 H.update_revive() H.emote("gasp") @@ -391,13 +389,127 @@ if(ghost) ghost << "Your heart is being defibrillated. Return to your body if you want to be revived! (Verbs -> Ghost -> Re-enter corpse)" ghost << sound('sound/effects/genetics.ogg') - playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 0) + playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0) defib.deductcharge(revivecost) update_icon() cooldown = 1 defib.cooldowncheck(user) else user.visible_message("[defib] buzzes: Patient is not in a valid state. Operation aborted.") + playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0) + busy = 0 + update_icon() + else + user << "You need to target your patient's chest with [src]." + return + +/obj/item/weapon/borg_defib + name = "defibrillator paddles" + desc = "A pair of mounted paddles with flat metal surfaces that are used to deliver powerful electric shocks." + icon = 'icons/obj/weapons.dmi' + icon_state = "defibpaddles0" + item_state = "defibpaddles0" + force = 0 + w_class = 4 + var/revivecost = 1000 + var/cooldown = 0 + var/busy = 0 + flags = NODROP + +/obj/item/weapon/borg_defib/attack(mob/M, mob/user) + var/tobehealed + var/threshold = -config.health_threshold_dead + var/mob/living/carbon/human/H = M + + if(busy) + return + if(cooldown) + user << "[src] is recharging." + if(!ishuman(M)) + user << "This unit is only designed to work on humanoid lifeforms." + return + else + if(user.a_intent == "harm") + busy = 1 + H.visible_message("[user] has touched [H.name] with [src]!", \ + "[user] has touched [H.name] with [src]!") + H.adjustStaminaLoss(50) + H.Weaken(5) + H.updatehealth() //forces health update before next life tick + playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1) + H.emote("gasp") + add_logs(user, M, "stunned", object="defibrillator") + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + R.cell.use(revivecost) + cooldown = 1 + busy = 0 + update_icon() + spawn(50) + cooldown = 0 + update_icon() + return + if(user.zone_sel && user.zone_sel.selecting == "chest") + user.visible_message("[user] begins to place [src] on [M.name]'s chest.", "You begin to place [src] on [M.name]'s chest.") + busy = 1 + update_icon() + if(do_after(user, 30)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process + user.visible_message("[user] places [src] on [M.name]'s chest.", "You place [src] on [M.name]'s chest.") + playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 0) + var/mob/dead/observer/ghost = H.get_ghost() + var/tplus = world.time - H.timeofdeath + var/tlimit = 6000 //past this much time the patient is unrecoverable (in deciseconds) + var/tloss = 3000 //brain damage starts setting in on the patient after some time left rotting + var/total_burn = 0 + var/total_brute = 0 + if(do_after(user, 20)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total + if(H.stat == 2) + var/health = H.health + M.visible_message("[M]'s body convulses a bit.") + playsound(get_turf(src), "bodyfall", 50, 1) + playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1) + for(var/datum/organ/external/O in H.organs) + total_brute += O.brute_dam + total_burn += O.burn_dam + if(H.health <= config.health_threshold_dead && total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(M_NOCLONE in H.mutations)) + tobehealed = health + threshold + tobehealed -= 5 //They get 5 of each type of damage healed so excessive combined damage will not immediately kill them after they get revived + H.adjustOxyLoss(tobehealed) + H.adjustToxLoss(tobehealed) + H.adjustFireLoss(tobehealed) + H.adjustBruteLoss(tobehealed) + user.visible_message("[user] pings: Resuscitation successful.") + playsound(get_turf(src), 'sound/machines/ping.ogg', 50, 0) + H.stat = 1 + H.update_revive() + H.emote("gasp") + if(tplus > tloss) + H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100)))) + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + R.cell.use(revivecost) + add_logs(user, M, "revived", object="defibrillator") + else + if(tplus > tlimit) + user.visible_message("[user] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.") + else if(total_burn >= 180 || total_brute >= 180) + user.visible_message("[user] buzzes: Resuscitation failed - Severe tissue damage detected.") + else + user.visible_message("[user] buzzes: Resuscitation failed.") + if(ghost) + ghost << "Your heart is being defibrillated. Return to your body if you want to be revived! (Verbs -> Ghost -> Re-enter corpse)" + ghost << sound('sound/effects/genetics.ogg') + playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 0) + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + R.cell.use(revivecost) + update_icon() + cooldown = 1 + spawn(50) + cooldown = 0 + update_icon() + else + user.visible_message("[user] buzzes: Patient is not in a valid state. Operation aborted.") playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0) busy = 0 update_icon() diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 3e4831f701e..3cc4caebb33 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -93,7 +93,7 @@ spawn(0)//this prevents the collapse of space-time continuum if (user) - user.drop_from_inventory(src) + user.unEquip(src) del(src) return uses diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index a11db2d4dcd..760bef9c2e2 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -6,7 +6,7 @@ icon_state = "fire_extinguisher0" item_state = "fire_extinguisher" hitsound = 'sound/weapons/smash.ogg' - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT throwforce = 10 w_class = 3.0 throw_speed = 2 @@ -31,7 +31,6 @@ icon_state = "miniFE0" item_state = "miniFE" hitsound = null //it is much lighter, after all. - flags = FPRINT | TABLEPASS throwforce = 2 w_class = 2.0 force = 3.0 diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index fd203a258c1..7a8bdb8a69c 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/flamethrower.dmi' icon_state = "flamethrowerbase" item_state = "flamethrower_0" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT force = 3.0 throwforce = 10.0 throw_speed = 1 diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index 0af739fdccd..a1bd6e79f47 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -109,7 +109,7 @@ if(!ispath(gift_type,/obj/item)) return var/obj/item/I = new gift_type(M) - M.u_equip(src) + M.unEquip(src, 1) M.put_in_hands(I) I.add_fingerprint(M) del(src) diff --git a/code/game/objects/items/weapons/grenades/bananade.dm b/code/game/objects/items/weapons/grenades/bananade.dm index 986fae6a358..119a72d59a6 100644 --- a/code/game/objects/items/weapons/grenades/bananade.dm +++ b/code/game/objects/items/weapons/grenades/bananade.dm @@ -49,7 +49,7 @@ var/turf/T if(istype(I, /obj/item/weapon/screwdriver)) if(fillamt) var/obj/item/weapon/grenade/bananade/G = new /obj/item/weapon/grenade/bananade - user.before_take_item(src) + user.unEquip(src) user.put_in_hands(G) G.deliveryamt = src.fillamt user << "You lock the assembly shut, readying it for HONK." diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index 2a6def07dca..ba7fae62304 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -96,7 +96,7 @@ else if(clown_check(user)) // This used to go before the assembly check, but that has absolutely zero to do with priming the damn thing. You could spam the admins with it. var/log_str = "[key_name(usr)]? has primed a [name] for detonation at [A.name] (JMP)." - message_admins(log_str) + msg_admin_attack(log_str) log_game(log_str) bombers += "[log_str]" user << "You prime the [name]! [det_time / 10] second\s!" @@ -144,7 +144,7 @@ var/turf/bombturf = get_turf(loc) var/area/A = bombturf.loc var/log_str = "[key_name(usr)]? has completed [name] at [A.name] (JMP) [contained]." - message_admins(log_str) + msg_admin_attack(log_str) log_game(log_str) else user << "You need to add at least one beaker before locking the assembly." diff --git a/code/game/objects/items/weapons/grenades/ghettobomb.dm b/code/game/objects/items/weapons/grenades/ghettobomb.dm index e1240629ed2..e4301755a92 100644 --- a/code/game/objects/items/weapons/grenades/ghettobomb.dm +++ b/code/game/objects/items/weapons/grenades/ghettobomb.dm @@ -5,8 +5,8 @@ if(istype(I, /obj/item/device/assembly/igniter)) var/obj/item/device/assembly/igniter/G = I var/obj/item/weapon/grenade/iedcasing/W = new /obj/item/weapon/grenade/iedcasing - user.before_take_item(G) - user.before_take_item(src) + user.unEquip(G) + user.unEquip(src) user.put_in_hands(W) user << "You stuff the [I] in the [src], emptying the contents beforehand." W.underlays += image(src.icon, icon_state = src.icon_state) @@ -23,7 +23,7 @@ item_state = "flashbang" throw_speed = 4 throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT var/assembled = 0 active = 1 @@ -72,7 +72,7 @@ var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) var/log_str = "[key_name(usr)]? has primed a [name] for detonation at [A.name] (JMP)." - message_admins(log_str) + msg_admin_attack(log_str) log_game(log_str) bombers += "[log_str]" if(iscarbon(user)) diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index 909dff136e2..c0ddc3c2359 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -7,7 +7,7 @@ item_state = "flashbang" throw_speed = 4 throw_range = 20 - flags = FPRINT | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT var/active = 0 var/det_time = 50 @@ -63,7 +63,7 @@ var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) var/log_str = "[key_name(usr)]? has primed a [name] for detonation at [A.name] (JMP)." - message_admins(log_str) + msg_admin_attack(log_str) log_game(log_str) bombers += "[log_str]" if(iscarbon(user)) @@ -78,7 +78,7 @@ /obj/item/weapon/grenade/proc/update_mob() if(ismob(loc)) var/mob/M = loc - M.drop_from_inventory(src) + M.unEquip(src) /obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob) diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm index 27a2d0580e2..afc4ea61176 100644 --- a/code/game/objects/items/weapons/grenades/smokebomb.dm +++ b/code/game/objects/items/weapons/grenades/smokebomb.dm @@ -5,7 +5,6 @@ icon_state = "flashbang" det_time = 20 item_state = "flashbang" - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT var/datum/effect/effect/system/bad_smoke_spread/smoke diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 813e9fd4517..5c6da3e797b 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -1,10 +1,10 @@ -/obj/item/weapon/handcuffs +/obj/item/weapon/restraints/handcuffs name = "handcuffs" desc = "Use this to keep prisoners in line." gender = PLURAL icon = 'icons/obj/items.dmi' icon_state = "handcuff" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT throwforce = 5 w_class = 2.0 @@ -12,141 +12,211 @@ throw_range = 5 m_amt = 500 origin_tech = "materials=1" - var/dispenser = 0 var/breakouttime = 600 //Deciseconds = 60s = 1 minutes + var/cuffsound = 'sound/weapons/handcuffs.ogg' + var/trashtype = null //For disposable cuffs -/obj/item/weapon/handcuffs/attack(mob/living/carbon/C, mob/user) +/obj/item/weapon/restraints/handcuffs/attack(mob/living/carbon/C, mob/user) if(M_CLUMSY in user.mutations && prob(50)) user << "Uh... how do those things work?!" - if(!C.handcuffed) - user.drop_item() - loc = C - C.handcuffed = src - C.update_inv_handcuffed() - return - - var/cable = 0 - if(istype(src, /obj/item/weapon/handcuffs/cable)) - cable = 1 + apply_cuffs(user,user) if(!C.handcuffed) - C.visible_message("[user] is trying to put handcuffs on [C]!", \ - "[user] is trying to put handcuffs on [C]!") - - if(cable) - playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) - else - playsound(loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2) + C.visible_message("[user] is trying to put [src.name] on [C]!", \ + "[user] is trying to put [src.name] on [C]!") + playsound(loc, cuffsound, 30, 1, -2) if(do_mob(user, C, 30)) - if(C.handcuffed) - return - user.drop_item() - loc = C - C.handcuffed = src - C.update_inv_handcuffed() - if(cable) + apply_cuffs(C,user) + user << "You handcuff [C]." + if(istype(src, /obj/item/weapon/restraints/handcuffs/cable)) feedback_add_details("handcuffs","C") else feedback_add_details("handcuffs","H") - add_logs(C, user, "handcuffed") + add_logs(user, C, "handcuffed") + else + user << "You fail to handcuff [C]." + +/obj/item/weapon/restraints/handcuffs/proc/apply_cuffs(mob/living/carbon/target, mob/user) + if(!target.handcuffed) + user.drop_item() + if(trashtype) + target.handcuffed = new trashtype(target) + qdel(src) + else + loc = target + target.handcuffed = src + target.update_inv_handcuffed(1) + return var/last_chew = 0 /mob/living/carbon/human/RestrainedClickOn(var/atom/A) - if (A != src) return ..() - if (last_chew + 26 > world.time) return + if (A != src) + return ..() + if (last_chew + 26 > world.time) + return var/mob/living/carbon/human/H = A - if (!H.handcuffed) return - if (H.a_intent != "harm") return - if (H.zone_sel.selecting != "mouth") return - if (H.wear_mask) return - if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket)) return + if (!H.handcuffed) + return + if (H.a_intent != "harm") + return + if (H.zone_sel.selecting != "mouth") + return + if (H.wear_mask) + return + if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket)) + return - var/datum/organ/external/O = H.organs_by_name[H.hand?"l_hand":"r_hand"] - if (!O) return + var/datum/organ/external/O = H.organs_by_name[H.hand ? "l_hand" : "r_hand"] + if (!O) + return - var/s = "\red [H.name] chews on \his [O.display_name]!" - H.visible_message(s, "\red You chew on your [O.display_name]!") + var/s = "[H.name] chews on \his [O.display_name]!" + H.visible_message(s, "You chew on your [O.display_name]!") H.attack_log += text("\[[time_stamp()]\] [s] ([H.ckey])") log_attack("[s] ([H.ckey])") if(O.take_damage(3,0,1,1,"teeth marks")) - H:UpdateDamageIcon() + H.UpdateDamageIcon() if(prob(10)) O.droplimb() last_chew = world.time -/obj/item/weapon/handcuffs/cable +/obj/item/weapon/restraints/handcuffs/cable name = "cable restraints" desc = "Looks like some cables tied together. Could be used to tie something up." icon_state = "cuff_red" + item_state = "coil_red" breakouttime = 300 //Deciseconds = 30s + cuffsound = 'sound/weapons/cablecuff.ogg' -/obj/item/weapon/handcuffs/cable/red +/obj/item/weapon/restraints/handcuffs/cable/red icon_state = "cuff_red" -/obj/item/weapon/handcuffs/cable/yellow +/obj/item/weapon/restraints/handcuffs/cable/yellow icon_state = "cuff_yellow" -/obj/item/weapon/handcuffs/cable/blue +/obj/item/weapon/restraints/handcuffs/cable/blue icon_state = "cuff_blue" -/obj/item/weapon/handcuffs/cable/green +/obj/item/weapon/restraints/handcuffs/cable/green icon_state = "cuff_green" -/obj/item/weapon/handcuffs/cable/pink +/obj/item/weapon/restraints/handcuffs/cable/pink icon_state = "cuff_pink" -/obj/item/weapon/handcuffs/cable/orange +/obj/item/weapon/restraints/handcuffs/cable/orange icon_state = "cuff_orange" -/obj/item/weapon/handcuffs/cable/cyan +/obj/item/weapon/restraints/handcuffs/cable/cyan icon_state = "cuff_cyan" -/obj/item/weapon/handcuffs/cable/white +/obj/item/weapon/restraints/handcuffs/cable/white icon_state = "cuff_white" - -/obj/item/weapon/handcuffs/cyborg - dispenser = 1 - -/obj/item/weapon/handcuffs/cyborg/attack(mob/living/carbon/C as mob, mob/user as mob) - if(!C.handcuffed) - var/turf/p_loc = user.loc - var/turf/p_loc_m = C.loc - playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2) - user.visible_message("\red [user] is trying to put handcuffs on [C]!") - - if (ishuman(C)) - var/mob/living/carbon/human/H = C - if (!H.has_organ_for_slot(slot_handcuffed)) - user << "\red \The [H] needs at least two wrists before you can cuff them together!" - return - - spawn(30) - if(!C) return - if(p_loc == user.loc && p_loc_m == C.loc) - C.handcuffed = new /obj/item/weapon/handcuffs(C) - C.update_inv_handcuffed() - -/obj/item/weapon/handcuffs/pinkcuffs +/obj/item/weapon/restraints/handcuffs/pinkcuffs name = "fluffy pink handcuffs" desc = "Use this to keep prisoners in line. Or you know, your significant other." icon_state = "pinkcuffs" -/obj/item/weapon/handcuffs/cable/attackby(var/obj/item/I, mob/user as mob) +/obj/item/weapon/restraints/handcuffs/cable/attackby(var/obj/item/I, mob/user as mob) ..() if(istype(I, /obj/item/stack/rods)) var/obj/item/stack/rods/R = I if (R.use(1)) var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod - user.u_equip(src) + user.unEquip(src) user.put_in_hands(W) user << "You wrap the cable restraint around the top of the rod." - del(src) + qdel(src) else user << "You need one rod to make a wired rod." return + +/obj/item/weapon/restraints/handcuffs/cable/zipties + name = "zipties" + desc = "Plastic, disposable zipties that can be used to restrain temporarily but are destroyed after use." + icon_state = "cuff_white" + breakouttime = 450 //Deciseconds = 45s + trashtype = /obj/item/weapon/restraints/handcuffs/cable/zipties/used + +/obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user) + if(isrobot(user)) + if(!C.handcuffed) + playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) + C.visible_message("[user] is trying to put zipties on [C]!", \ + "[user] is trying to put zipties on [C]!") + if(do_mob(user, C, 30)) + if(!C.handcuffed) + C.handcuffed = new /obj/item/weapon/restraints/handcuffs/cable/zipties/used(C) + C.update_inv_handcuffed(1) + user << "You handcuff [C]." + add_logs(user, C, "handcuffed") + else + user << "You fail to handcuff [C]." + +/obj/item/weapon/restraints/handcuffs/cable/zipties/used/attack() + return + +//Legcuffs +/obj/item/weapon/restraints/legcuffs + name = "leg cuffs" + desc = "Use this to keep prisoners in line." + gender = PLURAL + icon = 'icons/obj/items.dmi' + icon_state = "handcuff" + flags = CONDUCT + throwforce = 0 + w_class = 3.0 + origin_tech = "materials=1" + slowdown = 7 + var/breakouttime = 300 //Deciseconds = 30s = 0.5 minute + +/obj/item/weapon/restraints/legcuffs/beartrap + name = "bear trap" + throw_speed = 1 + throw_range = 1 + icon_state = "beartrap0" + desc = "A trap used to catch bears and other legged creatures." + var/armed = 0 + +/obj/item/weapon/restraints/legcuffs/beartrap/suicide_act(mob/user) + user.visible_message("[user] is sticking \his head in the [src.name]! It looks like \he's trying to commit suicide.") + playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) + return (BRUTELOSS) + +/obj/item/weapon/restraints/legcuffs/beartrap/attack_self(mob/user as mob) + ..() + if(ishuman(user) && !user.stat && !user.restrained()) + armed = !armed + icon_state = "beartrap[armed]" + user << "[src] is now [armed ? "armed" : "disarmed"]" + +/obj/item/weapon/restraints/legcuffs/beartrap/Crossed(AM as mob|obj) + if(armed && isturf(src.loc)) + if( (iscarbon(AM) || isanimal(AM)) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator)) + var/mob/living/L = AM + armed = 0 + icon_state = "beartrap0" + playsound(src.loc, 'sound/effects/snap.ogg', 50, 1) + L.visible_message("[L] triggers \the [src].", \ + "You trigger \the [src]!") + + if(ishuman(AM)) + var/mob/living/carbon/H = AM + if(H.lying) + H.apply_damage(20,BRUTE,"chest") + else + H.apply_damage(20,BRUTE,(pick("l_leg", "r_leg"))) + if(!H.legcuffed) //beartrap can't cuff you leg if there's already a beartrap or legcuffs. + H.legcuffed = src + src.loc = H + H.update_inv_legcuffed(0) + feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart. + + else + L.apply_damage(20,BRUTE) + ..() diff --git a/code/game/objects/items/weapons/hydroponics.dm b/code/game/objects/items/weapons/hydroponics.dm index 8fe56d6bd70..19193fdf4ea 100644 --- a/code/game/objects/items/weapons/hydroponics.dm +++ b/code/game/objects/items/weapons/hydroponics.dm @@ -20,7 +20,6 @@ desc = "A small satchel made for organizing seeds." var/mode = 1; //0 = pick one at a time, 1 = pick all on tile var/capacity = 500; //the number of seeds it can carry. - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT w_class = 1 var/list/item_quants = list() diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index 22041ccd51b..40e78584f76 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -145,7 +145,7 @@ user << "\red Something is already scanned inside the implant!" return if(user) - user.u_equip(I) + user.unEquip(I) user.update_icons() //update our overlays c.scanned = I c.scanned.loc = c diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index ae5d8a170c3..bce6b1d02d8 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -22,7 +22,7 @@ throwforce = 0.0 throw_speed = 3 throw_range = 5 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT origin_tech = "materials=1" attack_verb = list("attacked", "stabbed", "poked") sharp = 0 @@ -133,7 +133,7 @@ icon = 'icons/obj/kitchen.dmi' icon_state = "knife" desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come." - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT sharp = 1 edge = 1 force = 10.0 @@ -176,7 +176,7 @@ icon = 'icons/obj/kitchen.dmi' icon_state = "butch" desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products." - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT force = 15.0 w_class = 2.0 throwforce = 8.0 @@ -266,7 +266,7 @@ throw_speed = 3 throw_range = 5 w_class = 4.0 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT m_amt = 3000 /* // NOPE var/food_total= 0 diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 2c68041fb16..e117cbaf0f2 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -18,7 +18,7 @@ throw_range = 5 w_class = 3.0 hitsound = "swing_hit" - flags = FPRINT | CONDUCT | NOSHIELD | TABLEPASS + flags = CONDUCT | NOSHIELD origin_tech = "combat=3" attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut") sharp = 1 @@ -43,7 +43,7 @@ throw_range = 5 w_class = 2.0 hitsound = "swing_hit" - flags = FPRINT | TABLEPASS | NOSHIELD + flags = NOSHIELD origin_tech = "magnets=3;syndicate=4" attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") sharp = 1 @@ -79,6 +79,6 @@ throw_speed = 1 throw_range = 1 w_class = 4.0//So you can't hide it in your pocket or some such. - flags = FPRINT | TABLEPASS | NOSHIELD + flags = NOSHIELD attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") var/datum/effect/effect/system/spark_spread/spark_system diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index 6b80edd6fd0..e63dde9b9aa 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -3,7 +3,7 @@ desc = "A tool used by great men to placate the frothing masses." icon_state = "chain" item_state = "chain" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT force = 10 throwforce = 7 diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index b1c37f7cc47..7b7a7c7a829 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -8,7 +8,6 @@ throw_speed = 3 throw_range = 7 w_class = 3.0 - flags = FPRINT | TABLEPASS attack_verb = list("mopped", "bashed", "bludgeoned", "whacked") var/mopping = 0 var/mopcount = 0 diff --git a/code/game/objects/items/weapons/ninja_manuscript.dm b/code/game/objects/items/weapons/ninja_manuscript.dm index 8c8674a42c7..75c07a2c3f5 100644 --- a/code/game/objects/items/weapons/ninja_manuscript.dm +++ b/code/game/objects/items/weapons/ninja_manuscript.dm @@ -6,7 +6,6 @@ throw_speed = 1 throw_range = 5 w_class = 3 - flags = TABLEPASS attack_verb = list("bashed", "whacked", "educated") var/charges = 1 diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index 9802b76018d..d35714f2111 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -14,7 +14,7 @@ var/global/list/cached_icons = list() amount_per_transfer_from_this = 10 possible_transfer_amounts = list(10,20,30,50,70) volume = 70 - flags = FPRINT | OPENCONTAINER + flags = OPENCONTAINER var/paint_type = "" afterattack(turf/simulated/target, mob/user, proximity) diff --git a/code/game/objects/items/weapons/power_cells.dm b/code/game/objects/items/weapons/power_cells.dm index 5a4b7a98d9d..cbaa53c0b54 100644 --- a/code/game/objects/items/weapons/power_cells.dm +++ b/code/game/objects/items/weapons/power_cells.dm @@ -5,7 +5,6 @@ icon_state = "cell" item_state = "cell" origin_tech = "powerstorage=1" - flags = FPRINT|TABLEPASS force = 5.0 throwforce = 5.0 throw_speed = 3 diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 6ca0f327e20..e7a9272aa6d 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -4,7 +4,6 @@ icon = 'icons/obj/wizard.dmi' icon_state = "scroll" var/uses = 4.0 - flags = FPRINT | TABLEPASS w_class = 2.0 item_state = "paper" throw_speed = 4 diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 774f097ca5f..eb4f6236c76 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -6,7 +6,7 @@ desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder." icon = 'icons/obj/weapons.dmi' icon_state = "riot" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT slot_flags = SLOT_BACK force = 5.0 throwforce = 5.0 @@ -42,7 +42,7 @@ desc = "A shield capable of stopping most melee attacks. Protects user from almost all energy projectiles. It can be retracted, expanded, and stored anywhere." icon = 'icons/obj/weapons.dmi' icon_state = "eshield0" // eshield1 for expanded - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT force = 3.0 throwforce = 5.0 throw_speed = 1 @@ -58,7 +58,7 @@ icon = 'icons/obj/device.dmi' icon_state = "shield0" var/active = 0.0 - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT item_state = "electronic" throwforce = 10.0 throw_speed = 2 diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 25cb47ef3e8..49de496abe6 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -9,7 +9,6 @@ icon_state = "backpack" item_state = "backpack" w_class = 4.0 - flags = FPRINT|TABLEPASS slot_flags = SLOT_BACK //ERROOOOO max_w_class = 3 max_combined_w_class = 21 diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 3fa71922efd..c78906a6639 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -21,7 +21,6 @@ display_contents_with_number = 0 // UNStABLE AS FuCK, turn on when it stops crashing clients use_to_pickup = 1 slot_flags = SLOT_BELT - flags = FPRINT | TABLEPASS // ----------------------------- // Trash bag @@ -209,7 +208,7 @@ break if(!inserted || !S.amount) - usr.u_equip(S) + usr.unEquip(S) usr.update_icons() //update our overlays if (usr.client && usr.s_active != src) usr.client.screen -= S @@ -308,7 +307,7 @@ w_class = 1 can_hold = list("/obj/item/weapon/coin","/obj/item/weapon/spacecash") - + // ----------------------------- // Book bag // ----------------------------- diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index eb7bc3fb8d6..98bcd5728e6 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -4,7 +4,6 @@ icon = 'icons/obj/clothing/belts.dmi' icon_state = "utilitybelt" item_state = "utility" - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined") @@ -21,10 +20,10 @@ if (!M.restrained() && !M.stat && can_use()) switch(over_object.name) if("r_hand") - M.u_equip(src) + M.unEquip(src) M.put_in_r_hand(src) if("l_hand") - M.u_equip(src) + M.unEquip(src) M.put_in_l_hand(src) src.add_fingerprint(usr) return @@ -95,7 +94,8 @@ "/obj/item/device/flashlight/pen", "/obj/item/clothing/mask/surgical", "/obj/item/clothing/gloves/color/latex", - "/obj/item/weapon/reagent_containers/hypospray/autoinjector" + "/obj/item/weapon/reagent_containers/hypospray/autoinjector", + "/obj/item/device/sensor_device" ) @@ -110,7 +110,7 @@ "/obj/item/weapon/grenade/flashbang", "/obj/item/weapon/grenade/chem_grenade/teargas", "/obj/item/weapon/reagent_containers/spray/pepper", - "/obj/item/weapon/handcuffs", + "/obj/item/weapon/restraints/handcuffs", "/obj/item/device/flash", "/obj/item/clothing/glasses", "/obj/item/ammo_casing/shotgun", @@ -291,7 +291,7 @@ name = "yellow fannypack" icon_state = "fannypack_yellow" item_state = "fannypack_yellow" - + // ------------------------------------- // Bluespace Belt // ------------------------------------- @@ -413,7 +413,7 @@ new /obj/item/device/multitool(src) new /obj/item/stack/cable_coil(src) - new /obj/item/weapon/handcuffs(src) + new /obj/item/weapon/restraints/handcuffs(src) new /obj/item/weapon/dnainjector/xraymut(src) new /obj/item/weapon/dnainjector/firemut(src) new /obj/item/weapon/dnainjector/telemut(src) @@ -444,4 +444,3 @@ new /obj/item/device/analyzer(src) new /obj/item/device/healthanalyzer(src) - \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index f521c369f88..d4efe740192 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -5,7 +5,6 @@ throw_speed = 1 throw_range = 5 w_class = 3.0 - flags = FPRINT | TABLEPASS var/mob/affecting = null var/deity_name = "Christ" diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 628d287e7c5..2e63b0a2cec 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -183,6 +183,20 @@ new /obj/item/weapon/grenade/flashbang(src) new /obj/item/weapon/grenade/flashbang(src) +/obj/item/weapon/storage/box/flashes + name = "box of flashbulbs" + desc = "WARNING: Flashes can cause serious eye damage, protective eyewear is required." + icon_state = "flashbang" + + New() + ..() + new /obj/item/device/flash(src) + new /obj/item/device/flash(src) + new /obj/item/device/flash(src) + new /obj/item/device/flash(src) + new /obj/item/device/flash(src) + new /obj/item/device/flash(src) + /obj/item/weapon/storage/box/teargas name = "box of tear gas grenades (WARNING)" desc = "WARNING: These devices are extremely dangerous and can cause blindness and skin irritation." @@ -242,6 +256,20 @@ new /obj/item/weapon/implanter(src) new /obj/item/weapon/implantpad(src) +/obj/item/weapon/storage/box/exileimp + name = "boxed exile implant kit" + desc = "Box of exile implants. It has a picture of a clown being booted through the Gateway." + icon_state = "implant" + + New() + ..() + new /obj/item/weapon/implantcase/exile(src) + new /obj/item/weapon/implantcase/exile(src) + new /obj/item/weapon/implantcase/exile(src) + new /obj/item/weapon/implantcase/exile(src) + new /obj/item/weapon/implantcase/exile(src) + new /obj/item/weapon/implanter(src) + /obj/item/weapon/storage/box/deathimp name = "death alarm implant kit" desc = "Box of life sign monitoring implants." @@ -423,7 +451,7 @@ new /obj/item/weapon/card/id/prisoner/seven(src) /obj/item/weapon/storage/box/seccarts - name = "Spare R.O.B.U.S.T. Cartridges" + name = "spare R.O.B.U.S.T. Cartridges" desc = "A box full of R.O.B.U.S.T. Cartridges, used by Security." icon_state = "pda" @@ -445,13 +473,28 @@ New() ..() - new /obj/item/weapon/handcuffs(src) - new /obj/item/weapon/handcuffs(src) - new /obj/item/weapon/handcuffs(src) - new /obj/item/weapon/handcuffs(src) - new /obj/item/weapon/handcuffs(src) - new /obj/item/weapon/handcuffs(src) - new /obj/item/weapon/handcuffs(src) + new /obj/item/weapon/restraints/handcuffs(src) + new /obj/item/weapon/restraints/handcuffs(src) + new /obj/item/weapon/restraints/handcuffs(src) + new /obj/item/weapon/restraints/handcuffs(src) + new /obj/item/weapon/restraints/handcuffs(src) + new /obj/item/weapon/restraints/handcuffs(src) + new /obj/item/weapon/restraints/handcuffs(src) + +/obj/item/weapon/storage/box/zipties + name = "box of spare zipties" + desc = "A box full of zipties." + icon_state = "handcuff" + + New() + ..() + new /obj/item/weapon/restraints/handcuffs/cable/zipties(src) + new /obj/item/weapon/restraints/handcuffs/cable/zipties(src) + new /obj/item/weapon/restraints/handcuffs/cable/zipties(src) + new /obj/item/weapon/restraints/handcuffs/cable/zipties(src) + new /obj/item/weapon/restraints/handcuffs/cable/zipties(src) + new /obj/item/weapon/restraints/handcuffs/cable/zipties(src) + new /obj/item/weapon/restraints/handcuffs/cable/zipties(src) /obj/item/weapon/storage/box/fakesyndiesuit name = "boxed space suit and helmet" @@ -512,7 +555,6 @@ item_state = "zippo" storage_slots = 10 w_class = 1 - flags = TABLEPASS slot_flags = SLOT_BELT New() diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm index d6d288c5734..1a2faf6b1a7 100644 --- a/code/game/objects/items/weapons/storage/briefcase.dm +++ b/code/game/objects/items/weapons/storage/briefcase.dm @@ -3,7 +3,7 @@ desc = "It's made of AUTHENTIC faux-leather and has a price-tag still attached. Its owner must be a real professional." icon_state = "briefcase" item_state = "briefcase" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT hitsound = "swing_hit" force = 8.0 throw_speed = 2 diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 37735cab0d8..2ff671074ef 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -88,7 +88,6 @@ item_state = "candlebox5" storage_slots = 5 throwforce = 2 - flags = TABLEPASS slot_flags = SLOT_BELT @@ -152,7 +151,6 @@ item_state = "cigpacket" w_class = 1 throwforce = 2 - flags = TABLEPASS slot_flags = SLOT_BELT storage_slots = 6 can_hold = list("/obj/item/clothing/mask/cigarette") diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index 56c02a49bdf..0cb6ecb6727 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -12,7 +12,7 @@ name = "first-aid kit" desc = "It's an emergency medical kit for those serious boo-boos." icon_state = "firstaid" - icon_override = 'icons/mob/in-hand/medkits.dmi' + icon_override = 'icons/mob/in-hand/medkits.dmi' throw_speed = 2 throw_range = 8 var/empty = 0 @@ -154,10 +154,10 @@ if ((!( M.restrained() ) && !( M.stat ) /*&& M.pocket == src*/)) switch(over_object.name) if("r_hand") - M.u_equip(src) + M.unEquip(src) M.put_in_r_hand(src) if("l_hand") - M.u_equip(src) + M.unEquip(src) M.put_in_l_hand(src) src.add_fingerprint(usr) return diff --git a/code/game/objects/items/weapons/storage/internal.dm b/code/game/objects/items/weapons/storage/internal.dm index 082002a5b9a..44c8aaa5697 100644 --- a/code/game/objects/items/weapons/storage/internal.dm +++ b/code/game/objects/items/weapons/storage/internal.dm @@ -37,19 +37,19 @@ if (!( istype(over_object, /obj/screen) )) return 1 - + //makes sure master_item is equipped before putting it in hand, so that we can't drag it into our hand from miles away. //there's got to be a better way of doing this... - if (!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user)) + if (!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user)) return 0 - + if (!( user.restrained() ) && !( user.stat )) switch(over_object.name) if("r_hand") - user.u_equip(master_item) + user.unEquip(master_item) user.put_in_r_hand(master_item) if("l_hand") - user.u_equip(master_item) + user.unEquip(master_item) user.put_in_l_hand(master_item) master_item.add_fingerprint(user) return 0 @@ -70,12 +70,12 @@ H.put_in_hands(master_item) H.r_store = null return 0 - + src.add_fingerprint(user) if (master_item.loc == user) src.open(user) return 0 - + for(var/mob/M in range(1, master_item.loc)) if (M.s_active == src) src.close(M) diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 2a4d03b8f0a..8620b4d2339 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -34,23 +34,8 @@ attackby(obj/item/weapon/W as obj, mob/user as mob) if(locked) - if ( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged)) - emagged = 1 - src.overlays += image('icons/obj/storage.dmi', icon_sparking) - sleep(6) - src.overlays = null - overlays += image('icons/obj/storage.dmi', icon_locking) - locked = 0 - if(istype(W, /obj/item/weapon/melee/energy/blade)) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() - spark_system.set_up(5, 0, src.loc) - spark_system.start() - playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) - playsound(src.loc, "sparks", 50, 1) - user << "You slice through the lock on [src]." - else - user << "You short out the lock on [src]." - return + if ((istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged)) + emag_act(user, W) if (istype(W, /obj/item/weapon/screwdriver)) if (do_after(user, 20)) @@ -79,6 +64,25 @@ // -> storage/attackby() what with handle insertion, etc ..() + + emag_act(user as mob, weapon as obj) + if(!emagged) + emagged = 1 + src.overlays += image('icons/obj/storage.dmi', icon_sparking) + sleep(6) + src.overlays = null + overlays += image('icons/obj/storage.dmi', icon_locking) + locked = 0 + if(istype(weapon, /obj/item/weapon/melee/energy/blade)) + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, src.loc) + spark_system.start() + playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) + playsound(src.loc, "sparks", 50, 1) + user << "You slice through the lock on [src]." + else + user << "You short out the lock on [src]." + return MouseDrop(over_object, src_location, over_location) @@ -146,7 +150,6 @@ icon_state = "secure" item_state = "sec-case" desc = "A large briefcase with a digital locking system." - flags = FPRINT | TABLEPASS force = 8.0 throw_speed = 1 throw_range = 4 @@ -221,7 +224,6 @@ icon_opened = "safe0" icon_locking = "safeb" icon_sparking = "safespark" - flags = FPRINT | TABLEPASS force = 8.0 w_class = 8.0 max_w_class = 8 diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 2b7661cc702..56ac3caff67 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -46,10 +46,12 @@ if (!( M.restrained() ) && !( M.stat )) switch(over_object.name) if("r_hand") - M.u_equip(src) + if(!M.unEquip(src)) + return M.put_in_r_hand(src) if("l_hand") - M.u_equip(src) + if(!M.unEquip(src)) + return M.put_in_l_hand(src) src.add_fingerprint(usr) return @@ -101,7 +103,7 @@ if(user.s_active == src) user.s_active = null return - + /obj/item/weapon/storage/proc/open(mob/user as mob) if (src.use_sound) playsound(src.loc, src.use_sound, 50, 1, -5) @@ -202,7 +204,7 @@ //This proc return 1 if the item can be picked up and 0 if it can't. //Set the stop_messages to stop it from printing messages /obj/item/weapon/storage/proc/can_be_inserted(obj/item/W as obj, stop_messages = 0) - if(!istype(W)) return //Not an item + if(!istype(W) || (W.flags & ABSTRACT)) return //Not an item if(src.loc == W) return 0 //Means the item is already in the storage item @@ -250,15 +252,21 @@ usr << "[src] cannot hold [W] as it's a storage item of the same size." return 0 //To prevent the stacking of same sized storage items. + if(W.flags & NODROP) //SHOULD be handled in unEquip, but better safe than sorry. + usr << "\the [W] is stuck to your hand, you can't put it in \the [src]" + return 0 + return 1 //This proc handles items being inserted. It does not perform any checks of whether an item can or can't be inserted. That's done by can_be_inserted() //The stop_warning parameter will stop the insertion message from being displayed. It is intended for cases where you are inserting multiple items at once, //such as when picking up all the items on a tile with one click. /obj/item/weapon/storage/proc/handle_item_insertion(obj/item/W as obj, prevent_warning = 0) - if(!istype(W)) return 0 + if(!istype(W)) + return 0 if(usr) - usr.u_equip(W) + if(!usr.unEquip(W)) + return 0 usr.update_icons() //update our overlays W.loc = src W.on_enter_storage(src) @@ -465,17 +473,17 @@ /atom/proc/storage_depth(atom/container) var/depth = 0 var/atom/cur_atom = src - + while (cur_atom && !(cur_atom in container.contents)) if (isarea(cur_atom)) return -1 if (istype(cur_atom.loc, /obj/item/weapon/storage)) depth++ cur_atom = cur_atom.loc - + if (!cur_atom) return -1 //inside something with a null loc. - + return depth //Like storage depth, but returns the depth to the nearest turf @@ -483,16 +491,16 @@ /atom/proc/storage_depth_turf() var/depth = 0 var/atom/cur_atom = src - + while (cur_atom && !isturf(cur_atom)) if (isarea(cur_atom)) return -1 if (istype(cur_atom.loc, /obj/item/weapon/storage)) depth++ cur_atom = cur_atom.loc - + if (!cur_atom) return -1 //inside something with a null loc. - + return depth - + diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index 4c7ea0617a0..cb04eeaccd3 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/storage.dmi' icon_state = "red" item_state = "toolbox_red" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT force = 10.0 throwforce = 10.0 throw_speed = 2 diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 8a33f542f4c..ae0509b00fa 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -4,7 +4,6 @@ icon_state = "stunbaton" item_state = "baton" slot_flags = SLOT_BELT - flags = FPRINT | TABLEPASS force = 10 throwforce = 7 w_class = 3 diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index dab630f188a..e85df4485bf 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -16,9 +16,9 @@ desc = "Retracts stuff." icon = 'icons/obj/surgery.dmi' icon_state = "retractor" - m_amt = 10000 - g_amt = 5000 - flags = FPRINT | TABLEPASS | CONDUCT + m_amt = 6000 + g_amt = 3000 + flags = CONDUCT w_class = 2.0 origin_tech = "materials=1;biotech=1" @@ -132,7 +132,7 @@ LOOK FOR SURGERY.DM*/ icon_state = "hemostat" m_amt = 5000 g_amt = 2500 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT w_class = 2.0 origin_tech = "materials=1;biotech=1" attack_verb = list("attacked", "pinched") @@ -265,9 +265,9 @@ LOOK FOR SURGERY.DM*/ desc = "This stops bleeding." icon = 'icons/obj/surgery.dmi' icon_state = "cautery" - m_amt = 5000 - g_amt = 2500 - flags = FPRINT | TABLEPASS | CONDUCT + m_amt = 2500 + g_amt = 750 + flags = CONDUCT w_class = 2.0 origin_tech = "materials=1;biotech=1" attack_verb = list("burnt") @@ -356,9 +356,9 @@ LOOK FOR SURGERY.DM*/ icon = 'icons/obj/surgery.dmi' icon_state = "drill" hitsound = 'sound/weapons/circsawhit.ogg' - m_amt = 15000 - g_amt = 10000 - flags = FPRINT | TABLEPASS | CONDUCT + m_amt = 10000 + g_amt = 6000 + flags = CONDUCT force = 15.0 w_class = 2.0 origin_tech = "materials=1;biotech=1" @@ -377,7 +377,7 @@ LOOK FOR SURGERY.DM*/ desc = "Cut, cut, and once more cut." icon = 'icons/obj/surgery.dmi' icon_state = "scalpel" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT force = 10.0 sharp = 1 edge = 1 @@ -385,8 +385,8 @@ LOOK FOR SURGERY.DM*/ throwforce = 5.0 throw_speed = 3 throw_range = 5 - m_amt = 10000 - g_amt = 5000 + m_amt = 4000 + g_amt = 1000 origin_tech = "materials=1;biotech=1" attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") @@ -631,14 +631,14 @@ LOOK FOR SURGERY.DM*/ icon = 'icons/obj/surgery.dmi' icon_state = "saw3" hitsound = 'sound/weapons/circsawhit.ogg' - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT force = 15.0 w_class = 2.0 throwforce = 9.0 throw_speed = 3 throw_range = 5 - m_amt = 20000 - g_amt = 10000 + m_amt = 10000 + g_amt = 6000 origin_tech = "materials=1;biotech=1" attack_verb = list("attacked", "slashed", "sawed", "cut") sharp = 1 diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 375f07f05a6..9cf1cee7846 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -101,7 +101,6 @@ icon = 'icons/obj/weapons.dmi' icon_state = "baton" item_state = "classic_baton" - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT force = 10 @@ -157,7 +156,6 @@ icon = 'icons/obj/weapons.dmi' icon_state = "telebaton_0" item_state = "telebaton_0" - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT w_class = 2 force = 3 diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index b5fa8e36b95..21881c27986 100644 --- a/code/game/objects/items/weapons/tanks/tank_types.dm +++ b/code/game/objects/items/weapons/tanks/tank_types.dm @@ -98,7 +98,7 @@ name = "plasma tank" desc = "Contains dangerous plasma. Do not inhale. Warning: extremely flammable." icon_state = "plasma" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = null //they have no straps! @@ -118,7 +118,7 @@ if ((!F.status)||(F.ptank)) return src.master = F F.ptank = src - user.before_take_item(src) + user.unEquip(src) src.loc = F return @@ -140,7 +140,7 @@ name = "emergency oxygen tank" desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it." icon_state = "emergency" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT w_class = 2.0 force = 4.0 diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index d4a0cb0c972..f12b27f5de2 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -4,7 +4,7 @@ /obj/item/weapon/tank name = "tank" icon = 'icons/obj/tank.dmi' - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BACK hitsound = 'sound/weapons/smash.ogg' w_class = 3 diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm index 85d4aeacb01..e721c2ab283 100644 --- a/code/game/objects/items/weapons/tanks/watertank.dm +++ b/code/game/objects/items/weapons/tanks/watertank.dm @@ -63,7 +63,7 @@ /obj/item/weapon/watertank/proc/remove_noz(mob/user) var/mob/living/carbon/human/M = user if(noz in get_both_hands(M)) - M.u_equip(noz) + M.unEquip(noz) return /obj/item/weapon/watertank/Destroy() @@ -108,7 +108,7 @@ /proc/check_tank_exists(parent_tank, var/mob/living/carbon/human/M, var/obj/O) if (!parent_tank || !istype(parent_tank, /obj/item/weapon/watertank)) //To avoid weird issues from admin spawns - M.u_equip(O) + M.unEquip(O) qdel(0) return 0 else diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 88bb08b7ae8..fcadebadbbd 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -16,7 +16,7 @@ var/frequency = 1451 var/broadcasting = null var/listening = 1.0 - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT w_class = 2.0 item_state = "electronic" throw_speed = 4 @@ -48,7 +48,7 @@ Frequency: if (usr.stat || usr.restrained()) return var/turf/current_location = get_turf(usr)//What turf is the user on? - if(!current_location||current_location.z==2)//If turf was not found or they're on z level 2. + if(!current_location||(current_location.z in config.admin_levels))//If turf was not found or they're on z level 2. usr << "The [src] is malfunctioning." return if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)))) @@ -138,7 +138,7 @@ Frequency: /obj/item/weapon/hand_tele/attack_self(mob/user as mob) var/turf/current_location = get_turf(user)//What turf is the user on? - if(!current_location||current_location.z==2||current_location.z>=7)//If turf was not found or they're on z level 2 or >7 which does not currently exist. + if(!current_location||(current_location.z in config.admin_levels)||current_location.z>=7)//If turf was not found or they're on z level 2 or >7 which does not currently exist. user << "\The [src] is malfunctioning." return var/list/L = list( ) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 9691f3213ba..8f85c3f0bff 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -20,7 +20,7 @@ desc = "A wrench with common uses. Can be found in your hand." icon = 'icons/obj/items.dmi' icon_state = "wrench" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT force = 5.0 throwforce = 7.0 @@ -38,7 +38,7 @@ desc = "You can be totally screwwy with this." icon = 'icons/obj/items.dmi' icon_state = "screwdriver" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT force = 5.0 w_class = 1.0 @@ -99,7 +99,7 @@ desc = "This cuts wires." icon = 'icons/obj/items.dmi' icon_state = "cutters" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT force = 6.0 throw_speed = 3 @@ -118,7 +118,7 @@ item_state = "cutters_yellow" /obj/item/weapon/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob) - if((C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/handcuffs/cable))) + if((C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable))) usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\ "You cut \the [C]'s restraints with \the [src]!",\ "You hear cable being cut.") @@ -135,7 +135,7 @@ name = "welding tool" icon = 'icons/obj/items.dmi' icon_state = "welder" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT //Amount of OUCH when it's thrown @@ -147,7 +147,7 @@ //Cost to make in the autolathe m_amt = 70 - g_amt = 30 + g_amt = 20 //R&D tech level origin_tech = "engineering=1" @@ -194,12 +194,12 @@ if (user.client) user.client.screen -= src if (user.r_hand == src) - user.u_equip(src) + user.unEquip(src) else - user.u_equip(src) + user.unEquip(src) src.master = F src.layer = initial(src.layer) - user.u_equip(src) + user.unEquip(src) if (user.client) user.client.screen -= src src.loc = F @@ -447,7 +447,7 @@ desc = "A small crowbar. This handy tool is useful for lots of things, such as prying floor tiles or opening unpowered doors." icon = 'icons/obj/items.dmi' icon_state = "crowbar" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT force = 5.0 throwforce = 7.0 @@ -514,7 +514,7 @@ desc = "A professional conversion kit used to convert any knock off revolver into the real deal capable of shooting lethal .357 rounds without the possibility of catastrophic failure" icon = 'icons/obj/weapons.dmi' icon_state = "kit" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT w_class = 2.0 origin_tech = "combat=2" var/open = 0 diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index f38c9b477f3..417cfdbbca7 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -107,7 +107,7 @@ w_class = 5.0 icon_state = "offhand" name = "offhand" - //flags = ABSTRACT + flags = ABSTRACT /obj/item/weapon/twohanded/offhand/unwield() del(src) @@ -207,7 +207,7 @@ obj/item/weapon/twohanded/ force_wielded = 34 wieldsound = 'sound/weapons/saberon.ogg' unwieldsound = 'sound/weapons/saberoff.ogg' - flags = FPRINT | TABLEPASS | NOSHIELD + flags = NOSHIELD origin_tech = "magnets=3;syndicate=4" attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") sharp = 1 @@ -291,7 +291,7 @@ obj/item/weapon/twohanded/ force_wielded = 18 // Was 13, Buffed - RR throwforce = 20 throw_speed = 3 - flags = FPRINT | TABLEPASS | NOSHIELD + flags = NOSHIELD attack_verb = list("attacked", "poked", "jabbed", "torn", "gored") /obj/item/weapon/twohanded/spear/update_icon() @@ -444,7 +444,7 @@ obj/item/weapon/twohanded/ no_embed = 1 force = 5 force_unwielded = 5 - force_wielded = 20 + force_wielded = 30 throwforce = 15 throw_range = 1 w_class = 5 @@ -475,29 +475,31 @@ obj/item/weapon/twohanded/ /obj/item/weapon/twohanded/knighthammer/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity) if(!proximity) return - if(wielded) - if(charged == 5) - charged = 0 - if(istype(A, /mob/living/)) - var/mob/living/Z = A - if(Z.health < 1) - Z.visible_message("[Z.name] was blown to peices by the power of [src.name]!", \ - "You feel a powerful blow rip you apart!", \ - "You hear a heavy impact and the sound of ripping flesh!.") - Z.gib() - else - Z.take_organ_damage(0,30) - Z.visible_message("[Z.name] was sent flying by a blow from the [src.name]!", \ - "You feel a powerful blow connect with your body and send you flying!", \ - "You hear something heavy impact flesh!.") - var/atom/throw_target = get_edge_target_turf(Z, get_dir(src, get_step_away(Z, src))) - Z.throw_at(throw_target, 200, 4) - else if(istype(A, /turf/simulated/wall)) + if(charged == 5) + charged = 0 + if(istype(A, /mob/living/)) + var/mob/living/Z = A + if(Z.health >= 1) + Z.visible_message("[Z.name] was sent flying by a blow from the [src.name]!", \ + "You feel a powerful blow connect with your body and send you flying!", \ + "You hear something heavy impact flesh!.") + var/atom/throw_target = get_edge_target_turf(Z, get_dir(src, get_step_away(Z, src))) + Z.throw_at(throw_target, 200, 4) + playsound(user, 'sound/weapons/marauder.ogg', 50, 1) + else if(wielded && Z.health < 1) + Z.visible_message("[Z.name] was blown to peices by the power of [src.name]!", \ + "You feel a powerful blow rip you apart!", \ + "You hear a heavy impact and the sound of ripping flesh!.") + Z.gib() + playsound(user, 'sound/weapons/marauder.ogg', 50, 1) + if(wielded) + if(istype(A, /turf/simulated/wall)) var/turf/simulated/wall/Z = A Z.ex_act(2) charged = 3 + playsound(user, 'sound/weapons/marauder.ogg', 50, 1) else if (istype(A, /obj/structure) || istype(A, /obj/mecha/)) var/obj/Z = A Z.ex_act(2) charged = 3 - playsound(user, 'sound/weapons/marauder.ogg', 50, 1) + playsound(user, 'sound/weapons/marauder.ogg', 50, 1) diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index 43618e46b73..998d24f8abc 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -3,7 +3,6 @@ name = "banhammer" icon = 'icons/obj/items.dmi' icon_state = "toyhammer" - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT throwforce = 0 w_class = 1.0 @@ -21,7 +20,6 @@ desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of paranormal phenomenae." icon_state = "nullrod" item_state = "nullrod" - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT force = 15 throw_speed = 1 @@ -74,7 +72,6 @@ desc = "This thing is so unspeakably shitty you are having a hard time even holding it." icon_state = "sord" item_state = "sord" - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT force = 2 throwforce = 1 @@ -96,7 +93,7 @@ desc = "What are you standing around staring at this for? Get to killing!" icon_state = "claymore" item_state = "claymore" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT hitsound = 'sound/weapons/bladeslice.ogg' slot_flags = SLOT_BELT force = 40 @@ -113,12 +110,17 @@ viewers(user) << "[user] is falling on the [src.name]! It looks like \he's trying to commit suicide." return(BRUTELOSS) +/obj/item/weapon/claymore/ceremonial + name = "ceremonial claymore" + desc = "An engraved and fancy version of the claymore. It appears to be less sharp than it's more functional cousin." + force = 20 + /obj/item/weapon/katana name = "katana" desc = "Woefully underpowered in D20" icon_state = "katana" item_state = "katana" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT | SLOT_BACK force = 40 throwforce = 10 @@ -156,7 +158,7 @@ obj/item/weapon/wirerod desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit." icon_state = "wiredrod" item_state = "rods" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT force = 9 throwforce = 10 w_class = 3 @@ -168,8 +170,8 @@ obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob) if(istype(I, /obj/item/weapon/shard)) var/obj/item/weapon/twohanded/spear/S = new /obj/item/weapon/twohanded/spear - user.u_equip(I) - user.u_equip(src) + user.unEquip(I) + user.unEquip(src) user.put_in_hands(S) user << "You fasten the glass shard to the top of the rod with the cable." @@ -179,8 +181,8 @@ obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob) else if(istype(I, /obj/item/weapon/wirecutters)) var/obj/item/weapon/melee/baton/cattleprod/P = new /obj/item/weapon/melee/baton/cattleprod - user.u_equip(I) - user.u_equip(src) + user.unEquip(I) + user.unEquip(src) user.put_in_hands(P) user << "You fasten the wirecutters to the top of the rod with the cable, prongs outward." diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index e50de9f2d44..6049d30bd51 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -21,11 +21,15 @@ // Reagent ID => friendly name var/list/reagents_to_log=list() -/obj/Topic(href, href_list, var/nowindow = 0) +/obj/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1) // Calling Topic without a corresponding window open causes runtime errors - if(nowindow) - return 0 - return ..() + if(!nowindow && ..()) + return 1 + + if(usr.can_interact_with_interface(nano_host(), checkrange) != STATUS_INTERACTIVE) + return 1 + add_fingerprint(usr) + return 0 /obj/Destroy() machines -= src diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 7f2ed7e1b3e..8887609a1a6 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -4,7 +4,6 @@ icon = 'icons/obj/closet.dmi' icon_state = "closed" density = 1 - flags = FPRINT var/icon_closed = "closed" var/icon_opened = "open" var/opened = 0 @@ -262,7 +261,8 @@ return if(isrobot(user)) return - usr.drop_item() + if(!usr.drop_item()) + return if(W) W.loc = src.loc else if(istype(W, /obj/item/weapon/packageWrap)) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm index fcd8dafd77f..c223fa99314 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm @@ -234,4 +234,6 @@ sleep(2) new /obj/item/clothing/suit/space/eva/paramedic(src) new /obj/item/clothing/head/helmet/space/eva/paramedic(src) + new /obj/item/clothing/head/helmet/space/eva/paramedic(src) + new /obj/item/device/sensor_device(src) return \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 282afb599e2..011f0c7fc6d 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -150,7 +150,7 @@ new /obj/item/clothing/glasses/sunglasses/sechud(src) new /obj/item/clothing/mask/gas/sechailer/warden(src) new /obj/item/taperoll/police(src) - new /obj/item/weapon/storage/box/handcuffs(src) + new /obj/item/weapon/storage/box/zipties(src) new /obj/item/weapon/storage/box/flashbangs(src) new /obj/item/weapon/reagent_containers/spray/pepper(src) new /obj/item/weapon/melee/baton/loaded(src) @@ -240,7 +240,7 @@ new /obj/item/weapon/storage/belt/security(src) new /obj/item/weapon/grenade/flashbang(src) new /obj/item/device/flash(src) - new /obj/item/weapon/handcuffs(src) + new /obj/item/weapon/restraints/handcuffs(src) new /obj/item/weapon/melee/baton/loaded(src) new /obj/item/clothing/glasses/sunglasses(src) new /obj/item/clothing/glasses/hud/health_advanced diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm index e089c4448f0..b8177c9b4a1 100644 --- a/code/game/objects/structures/crates_lockers/closets/statue.dm +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -5,7 +5,6 @@ icon_state = "human_male" density = 1 anchored = 1 - flags = FPRINT health = 0 //destroying the statue kills the mob within var/intialTox = 0 //these are here to keep the mob from taking damage from things that logically wouldn't affect a rock var/intialFire = 0 //it's a little sloppy I know but it was this or the GODMODE flag. Lesser of two evils. diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm index 7a7accadd10..5ff118de801 100644 --- a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm +++ b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm @@ -381,6 +381,10 @@ new /obj/item/clothing/head/soft/grey(src) if(prob(50)) new /obj/item/weapon/storage/backpack/duffel(src) + if(prob(40)) + new /obj/item/clothing/under/assistantformal(src) + if(prob(40)) + new /obj/item/clothing/under/assistantformal(src) return diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index fb60fa0d3aa..019eacd96ed 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -133,7 +133,9 @@ if(opened) if(isrobot(user)) return - user.drop_item() + if(!user.drop_item()) //couldn't drop the item + user << "\The [W] is stuck to your hand, you cannot put it in \the [src]!" + return if(W) W.loc = src.loc else if(istype(W, /obj/item/weapon/packageWrap)) diff --git a/code/game/objects/structures/crates_lockers/crittercrate.dm b/code/game/objects/structures/crates_lockers/crittercrate.dm index 2f01821abc9..cdbdacde644 100644 --- a/code/game/objects/structures/crates_lockers/crittercrate.dm +++ b/code/game/objects/structures/crates_lockers/crittercrate.dm @@ -6,6 +6,7 @@ icon_closed = "critter" var/already_opened = 0 var/content_mob = null + var/amount = 1 /obj/structure/closet/critter/can_open() if(welded) @@ -21,19 +22,7 @@ return ..() if(content_mob != null && already_opened == 0) - if(content_mob == /mob/living/simple_animal/chick) - var/num = rand(4, 6) - for(var/i = 0, i < num, i++) - new content_mob(loc) - else if(content_mob == /mob/living/simple_animal/corgi) - var/num = rand(0, 1) - if(num) //No more matriarchy for cargo - content_mob = /mob/living/simple_animal/corgi/Lisa - new content_mob(loc) - else if(content_mob == /mob/living/simple_animal/cat) - if(prob(50)) - content_mob = /mob/living/simple_animal/cat/Proc - else + for(var/i = 1, i <= amount, i++) new content_mob(loc) already_opened = 1 ..() @@ -53,7 +42,12 @@ /obj/structure/closet/critter/corgi name = "corgi crate" - content_mob = /mob/living/simple_animal/corgi //This statement is (not) false. See above. + content_mob = /mob/living/simple_animal/corgi + +/obj/structure/closet/critter/corgi/New() + if(prob(50)) + content_mob = /mob/living/simple_animal/corgi/Lisa + ..() /obj/structure/closet/critter/cow name = "cow crate" @@ -67,10 +61,28 @@ name = "chicken crate" content_mob = /mob/living/simple_animal/chick +/obj/structure/closet/critter/chick/New() + amount = rand(1, 3) + ..() + /obj/structure/closet/critter/cat name = "cat crate" content_mob = /mob/living/simple_animal/cat +/obj/structure/closet/critter/cat/New() + if(prob(50)) + content_mob = /mob/living/simple_animal/cat/Proc + ..() + +/obj/structure/closet/critter/pug + name = "pug crate" + content_mob = /mob/living/simple_animal/pug + /obj/structure/closet/critter/fox name = "fox crate" - content_mob = /mob/living/simple_animal/fox \ No newline at end of file + content_mob = /mob/living/simple_animal/fox + +/obj/structure/closet/critter/butterfly + name = "butterflies crate" + content_mob = /mob/living/simple_animal/butterfly + amount = 50 \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm index 96ed8ef9169..62d77768e2a 100644 --- a/code/game/objects/structures/crates_lockers/largecrate.dm +++ b/code/game/objects/structures/crates_lockers/largecrate.dm @@ -4,7 +4,6 @@ icon = 'icons/obj/storage.dmi' icon_state = "densecrate" density = 1 - flags = FPRINT /obj/structure/largecrate/attack_hand(mob/user as mob) user << "You need a crowbar to pry this open!" diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm index 6401ce034f3..6a773177c59 100644 --- a/code/game/objects/structures/dresser.dm +++ b/code/game/objects/structures/dresser.dm @@ -6,6 +6,15 @@ density = 1 anchored = 1 +/obj/structure/dresser/proc/convUnM(mund) + return underwear_m.Find(mund) + +/obj/structure/dresser/proc/convUnF(fund) + return underwear_f.Find(fund) + +/obj/structure/dresser/proc/convUs(us) + return undershirt_list.Find(us) + /obj/structure/dresser/attack_hand(mob/user as mob) if(!Adjacent(user))//no tele-grooming return @@ -18,14 +27,26 @@ return switch(choice) if("Underwear") - var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_list - if(new_undies) - H.underwear = new_undies + if(H.gender == FEMALE) + var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_f + if(new_undies) + H << "\red You selected [new_undies]." + var/freturn = convUnF(new_undies) + H.underwear = freturn + + else + var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_m + if(new_undies) + H << "\red You selected [new_undies]." + var/mreturn = convUnM(new_undies) + H.underwear = mreturn if("Undershirt") var/new_undershirt = input(user, "Select your undershirt", "Changing") as null|anything in undershirt_list if(new_undershirt) - H.undershirt = new_undershirt + H << "\red You selected [new_undershirt]" + var/usreturn = convUs(new_undershirt) + H.undershirt = usreturn add_fingerprint(H) H.update_body() \ No newline at end of file diff --git a/code/game/objects/structures/engicart.dm b/code/game/objects/structures/engicart.dm index 1697fff9c48..1257195ddf7 100644 --- a/code/game/objects/structures/engicart.dm +++ b/code/game/objects/structures/engicart.dm @@ -5,9 +5,6 @@ icon_state = "cart" anchored = 0 density = 1 - flags = OPENCONTAINER - //copypaste sorry - var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite var/obj/item/stack/sheet/glass/myglass = null var/obj/item/stack/sheet/metal/mymetal = null var/obj/item/stack/sheet/plasteel/myplasteel = null @@ -82,6 +79,21 @@ update_icon() else user << fail_msg + else if(istype(I, /obj/item/weapon/wrench)) + if (!anchored && !isinspace()) + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + user.visible_message( \ + "[user] tightens \the [src]'s casters.", \ + " You have tightened \the [src]'s casters.", \ + "You hear ratchet.") + anchored = 1 + else if(anchored) + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + user.visible_message( \ + "[user] loosens \the [src]'s casters.", \ + " You have loosened \the [src]'s casters.", \ + "You hear ratchet.") + anchored = 0 else usr << "You cannot interface your modules [src]!" diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 31cede5e65b..2c586f79f5d 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -75,11 +75,14 @@ icon = 'icons/turf/walls.dmi' var/mineral = "metal" var/walltype = "metal" + var/walltype2 = "rwall" // So it also connects with rwalls, like regular walls do var/opening = 0 density = 1 opacity = 1 /obj/structure/falsewall/New() + if(!walltype2) + walltype2 = walltype relativewall_neighbours() ..() @@ -105,11 +108,11 @@ for(var/turf/simulated/wall/W in orange(src,1)) if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls - if(walltype == W.walltype)//Only 'like' walls connect -Sieve + if(walltype == W.walltype || walltype2 == W.walltype)//Only 'like' walls connect -Sieve junction |= get_dir(src,W) for(var/obj/structure/falsewall/W in orange(src,1)) if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls - if(walltype == W.walltype) + if(walltype == W.walltype || walltype2 == W.walltype) junction |= get_dir(src,W) icon_state = "[walltype][junction]" return @@ -213,6 +216,8 @@ name = "reinforced wall" desc = "A huge chunk of reinforced metal used to seperate rooms." icon_state = "r_wall" + walltype = "rwall" + walltype2 = "metal" /obj/structure/falsewall/reinforced/ChangeToWall(delete = 1) var/turf/T = get_turf(src) @@ -244,11 +249,11 @@ for(var/turf/simulated/wall/W in orange(src,1)) if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls - if(src.walltype == W.walltype)//Only 'like' walls connect -Sieve + if(src.walltype == W.walltype || walltype2 == W.walltype)//Only 'like' walls connect -Sieve junction |= get_dir(src,W) for(var/obj/structure/falsewall/W in orange(src,1)) if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls - if(src.walltype == W.walltype) + if(src.walltype == W.walltype || src.walltype2 == W.walltype) junction |= get_dir(src,W) icon_state = "rwall[junction]" return diff --git a/code/game/objects/structures/foodcart.dm b/code/game/objects/structures/foodcart.dm new file mode 100644 index 00000000000..37c030aba81 --- /dev/null +++ b/code/game/objects/structures/foodcart.dm @@ -0,0 +1,204 @@ +/obj/structure/foodcart + name = "food cart" + desc = "A cart for transporting food and drinks." + icon = 'icons/obj/foodcart.dmi' + icon_state = "cart" + anchored = 0 + density = 1 + //Food slots + var/list/food_slots[6] + //var/obj/item/weapon/reagent_containers/food/snacks/food1 = null + //var/obj/item/weapon/reagent_containers/food/snacks/food2 = null + //var/obj/item/weapon/reagent_containers/food/snacks/food3 = null + //var/obj/item/weapon/reagent_containers/food/snacks/food4 = null + //var/obj/item/weapon/reagent_containers/food/snacks/food5 = null + //var/obj/item/weapon/reagent_containers/food/snacks/food6 = null + //Drink slots + var/list/drink_slots[6] + //var/obj/item/weapon/reagent_containers/food/drinks/drink1 = null + //var/obj/item/weapon/reagent_containers/food/drinks/drink2 = null + //var/obj/item/weapon/reagent_containers/food/drinks/drink3 = null + //var/obj/item/weapon/reagent_containers/food/drinks/drink4 = null + //var/obj/item/weapon/reagent_containers/food/drinks/drink5 = null + //var/obj/item/weapon/reagent_containers/food/drinks/drink6 = null + +/obj/structure/foodcart/proc/put_in_cart(obj/item/I, mob/user) + user.drop_item() + I.loc = src + updateUsrDialog() + user << "You put [I] into [src]." + return + +/obj/structure/foodcart/attackby(obj/item/I, mob/user) + var/fail_msg = "There are no open spaces for this in [src]." + if(!I.is_robot_module()) + if(istype(I, /obj/item/weapon/reagent_containers/food/snacks)) + var/success = 0 + for(var/s=1,s<=6,s++) + if(!food_slots[s]) + put_in_cart(I, user) + food_slots[s]=I + update_icon() + success = 1 + break; + if(!success) + user << fail_msg + else if(istype(I, /obj/item/weapon/reagent_containers/food/drinks)) + var/success = 0 + for(var/s=1,s<=6,s++) + if(!drink_slots[s]) + put_in_cart(I, user) + drink_slots[s]=I + update_icon() + success = 1 + break; + if(!success) + user << fail_msg + else if(istype(I, /obj/item/weapon/wrench)) + if (!anchored && !isinspace()) + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + user.visible_message( \ + "[user] tightens \the [src]'s casters.", \ + " You have tightened \the [src]'s casters.", \ + "You hear ratchet.") + anchored = 1 + else if(anchored) + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + user.visible_message( \ + "[user] loosens \the [src]'s casters.", \ + " You have loosened \the [src]'s casters.", \ + "You hear ratchet.") + anchored = 0 + else + usr << "You cannot interface your modules [src]!" + +/obj/structure/foodcart/attack_hand(mob/user) + user.set_machine(src) + var/dat + if(food_slots[1]) + dat += "[food_slots[1]]
" + if(food_slots[2]) + dat += "[food_slots[2]]
" + if(food_slots[3]) + dat += "[food_slots[3]]
" + if(food_slots[4]) + dat += "[food_slots[4]]
" + if(food_slots[5]) + dat += "[food_slots[5]]
" + if(food_slots[6]) + dat += "[food_slots[6]]
" + if(drink_slots[1]) + dat += "[drink_slots[1]]
" + if(drink_slots[2]) + dat += "[drink_slots[2]]
" + if(drink_slots[3]) + dat += "[drink_slots[3]]
" + if(drink_slots[4]) + dat += "[drink_slots[4]]
" + if(drink_slots[5]) + dat += "[drink_slots[5]]
" + if(drink_slots[6]) + dat += "[drink_slots[6]]
" + var/datum/browser/popup = new(user, "foodcart", name, 240, 160) + popup.set_content(dat) + popup.open() + +/obj/structure/foodcart/Topic(href, href_list) + if(!in_range(src, usr)) + return + if(!isliving(usr)) + return + var/mob/living/user = usr + if(href_list["f1"]) + if(food_slots[1]) + user.put_in_hands(food_slots[1]) + user << "You take [food_slots[1]] from [src]." + food_slots[1] = null + if(href_list["f2"]) + if(food_slots[2]) + user.put_in_hands(food_slots[2]) + user << "You take [food_slots[2]] from [src]." + food_slots[2] = null + if(href_list["f3"]) + if(food_slots[3]) + user.put_in_hands(food_slots[3]) + user << "You take [food_slots[3]] from [src]." + food_slots[3] = null + if(href_list["f4"]) + if(food_slots[4]) + user.put_in_hands(food_slots[4]) + user << "You take [food_slots[4]] from [src]." + food_slots[4] = null + if(href_list["f5"]) + if(food_slots[5]) + user.put_in_hands(food_slots[5]) + user << "You take [food_slots[5]] from [src]." + food_slots[5] = null + if(href_list["f6"]) + if(food_slots[6]) + user.put_in_hands(food_slots[6]) + user << "You take [food_slots[6]] from [src]." + food_slots[6] = null + if(href_list["d1"]) + if(drink_slots[1]) + user.put_in_hands(drink_slots[1]) + user << "You take [drink_slots[1]] from [src]." + drink_slots[1] = null + if(href_list["d2"]) + if(drink_slots[2]) + user.put_in_hands(drink_slots[2]) + user << "You take [drink_slots[2]] from [src]." + drink_slots[2] = null + if(href_list["d3"]) + if(drink_slots[3]) + user.put_in_hands(drink_slots[3]) + user << "You take [drink_slots[3]] from [src]." + drink_slots[3] = null + if(href_list["d4"]) + if(drink_slots[4]) + user.put_in_hands(drink_slots[4]) + user << "You take [drink_slots[4]] from [src]." + drink_slots[4] = null + if(href_list["d5"]) + if(drink_slots[5]) + user.put_in_hands(drink_slots[5]) + user << "You take [drink_slots[5]] from [src]." + drink_slots[5] = null + if(href_list["d6"]) + if(drink_slots[6]) + user.put_in_hands(drink_slots[6]) + user << "You take [drink_slots[6]] from [src]." + drink_slots[6] = null + + update_icon() //Not really needed without overlays, but keeping just in case + updateUsrDialog() + +/* +Overlays for cart_unused +/obj/structure/foodcart/update_icon() + overlays = null + if(food1) + overlays += "cart_food1" + if(food2) + overlays += "cart_food2" + if(food3) + overlays += "cart_food3" + if(food4) + overlays += "cart_food4" + if(food5) + overlays += "cart_food5" + if(food6) + overlays += "cart_food6" + if(drink1) + overlays += "cart_drink1" + if(drink2) + overlays += "cart_drink2" + if(drink3) + overlays += "cart_drink3" + if(drink4) + overlays += "cart_drink4" + if(drink5) + overlays += "cart_drink5" + if(drink6) + overlays += "cart_drink6" +*/ \ No newline at end of file diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index b02fb0f0c86..2475ee9eeed 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -5,7 +5,7 @@ icon_state = "grille" density = 1 anchored = 1 - flags = FPRINT | CONDUCT + flags = CONDUCT pressure_resistance = 5*ONE_ATMOSPHERE layer = 2.9 explosion_resistance = 5 diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index 8422c076d76..640a7f6951c 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -34,14 +34,6 @@ update_nearby_tiles() ..() - proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code - if(!air_master) - return 0 - air_master.mark_for_update(get_turf(src)) - return 1 - - - CanPass(atom/movable/mover, turf/target, height=0, air_group=0) return 0 diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 9ca2d7cbdb4..e6c7105796c 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -482,14 +482,29 @@ update_icon() else user << "[src] can't hold any more signs." - else if(mybag) - mybag.attackby(I, user) else if(istype(I, /obj/item/weapon/crowbar)) user.visible_message("[user] begins to empty the contents of [src].") if(do_after(user, 30)) usr << "You empty the contents of [src]'s bucket onto the floor." reagents.reaction(src.loc) src.reagents.clear_reagents() + else if(istype(I, /obj/item/weapon/wrench)) + if (!anchored && !isinspace()) + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + user.visible_message( \ + "[user] tightens \the [src]'s casters.", \ + " You have tightened \the [src]'s casters.", \ + "You hear ratchet.") + anchored = 1 + else if(anchored) + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + user.visible_message( \ + "[user] loosens \the [src]'s casters.", \ + " You have loosened \the [src]'s casters.", \ + "You hear ratchet.") + anchored = 0 + else if(mybag) + mybag.attackby(I, user) else usr << "You cannot interface your modules [src]!" diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index 8b7d70b4dc4..06bd5d139a3 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -157,13 +157,6 @@ CheckHardness() return - proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code - if(!air_master) return 0 - - air_master.mark_for_update(get_turf(src)) - - return 1 - /obj/structure/mineral_door/iron mineralType = "metal" hardness = 3 diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index b27f8853904..d7304c9cc57 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -5,7 +5,7 @@ icon_state = "mopbucket" density = 1 pressure_resistance = 5 - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite /obj/structure/mopbucket/New() diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index 1f23e10411d..a5ad84c20eb 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -3,7 +3,6 @@ desc = "A board for pinning important notices upon." icon = 'icons/obj/stationobjs.dmi' icon_state = "nboard00" - flags = FPRINT density = 0 anchored = 1 var/notices = 0 diff --git a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm index f1322e17ad3..5c387450fd5 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm @@ -1,4 +1,5 @@ //Alium nests. Essentially beds with an unbuckle delay that only aliums can buckle mobs to. +#define NEST_RESIST_TIME 1200 /obj/structure/stool/bed/nest name = "alien nest" @@ -18,12 +19,15 @@ buckled_mob.pixel_y = 0 unbuckle() else + if(world.time <= buckled_mob.last_special+NEST_RESIST_TIME) + return buckled_mob.visible_message(\ "[buckled_mob.name] struggles to break free of the gelatinous resin...",\ "You struggle to break free from the gelatinous resin...",\ "You hear squelching...") - spawn(600) + spawn(NEST_RESIST_TIME) if(user && buckled_mob && user.buckled == src) + buckled_mob.last_special = world.time buckled_mob.pixel_y = 0 unbuckle() src.add_fingerprint(user) @@ -70,8 +74,7 @@ var/aforce = W.force health = max(0, health - aforce) playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) - for(var/mob/M in viewers(src, 7)) - M.show_message("[user] hits [src] with [W]!", 1) + visible_message("[user] hits [src] with [W]!", 1) healthcheck() /obj/structure/stool/bed/nest/proc/healthcheck() diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index 78320f38581..bad562d595a 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -4,7 +4,6 @@ icon = 'icons/obj/objects.dmi' icon_state = "stool" anchored = 1.0 - flags = FPRINT pressure_resistance = 15 /obj/structure/stool/ex_act(severity) @@ -57,14 +56,14 @@ /obj/item/weapon/stool/attack_self(mob/user as mob) ..() origin.loc = get_turf(src) - user.u_equip(src) + user.unEquip(src) user.visible_message("\blue [user] puts [src] down.", "\blue You put [src] down.") del src /obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob) if (prob(5) && istype(M,/mob/living)) user.visible_message("\red [user] breaks [src] over [M]'s back!.") - user.u_equip(src) + user.unEquip(src) var/obj/item/stack/sheet/metal/m = new/obj/item/stack/sheet/metal m.loc = get_turf(src) del src diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index cd76aef88bb..7df232e9d8d 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -373,7 +373,8 @@ return if(isrobot(user)) return - user.drop_item() + if(!user.drop_item()) + return if (O.loc != src.loc) step(O, get_dir(O, src)) return @@ -420,7 +421,9 @@ O.show_message("\blue The [src] was sliced apart by [user]!", 1, "\red You hear [src] coming apart.", 2) destroy() - user.drop_item(src) + if(!(W.flags & ABSTRACT)) + if(user.drop_item()) + W.Move(loc) return /obj/structure/table/proc/straight_table_check(var/direction) @@ -583,7 +586,9 @@ del(src) return - user.drop_item(src) + if(!(I.flags & ABSTRACT)) + if(user.drop_item()) + I.Move(loc) //if(W && W.loc) W.loc = src.loc return 1 @@ -635,7 +640,9 @@ del(src) return - user.drop_item(src) + if(!(W.flags & ABSTRACT)) + if(user.drop_item()) + W.Move(loc) return 1 @@ -692,7 +699,6 @@ icon = 'icons/obj/objects.dmi' icon_state = "rack" density = 1 - flags = FPRINT anchored = 1.0 throwpass = 1 //You can throw objects over this, despite it's density. var/parts = /obj/item/weapon/rack_parts @@ -738,7 +744,8 @@ return if(isrobot(user)) return - user.drop_item() + if(!user.drop_item()) + return if (O.loc != src.loc) step(O, get_dir(O, src)) return @@ -751,8 +758,9 @@ return if(isrobot(user)) return - user.drop_item() - if(W && W.loc) W.loc = src.loc + if(!(W.flags & ABSTRACT)) + if(user.drop_item()) + W.Move(loc) return /obj/structure/rack/meteorhit(obj/O as obj) diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index b9e5b2a34f6..20569ee7af8 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -27,13 +27,6 @@ obj/structure/windoor_assembly var/secure = 0 //Whether or not this creates a secure windoor var/state = "01" //How far the door assembly has progressed -/obj/structure/windoor_assembly/proc/update_nearby_tiles(need_rebuild) - if(!air_master) return 0 - - air_master.mark_for_update(loc) - - return 1 - obj/structure/windoor_assembly/New(dir=NORTH) ..() src.ini_dir = src.dir diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index d6f9288d05f..8cdc2666bc2 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -65,7 +65,7 @@ var/global/wcColored if(health <= 0) var/pdiff=performWallPressureCheck(src.loc) if(pdiff>0) - message_admins("Window destroyed by [Proj.firer.name] ([formatPlayerPanel(Proj.firer,Proj.firer.ckey)]) via \an [Proj]! pdiff = [pdiff] at [formatJumpTo(loc)]!") + msg_admin_attack("Window destroyed by [Proj.firer.name] ([formatPlayerPanel(Proj.firer,Proj.firer.ckey)]) via \an [Proj]! pdiff = [pdiff] at [formatJumpTo(loc)]!") log_admin("Window destroyed by ([Proj.firer.ckey]) via \an [Proj]! pdiff = [pdiff] at [loc]!") destroy() return @@ -135,19 +135,19 @@ var/global/wcColored var/pdiff=performWallPressureCheck(src.loc) if(pdiff>0) if(M) - message_admins("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [M.real_name] ([formatPlayerPanel(M,M.ckey)])!") + msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [M.real_name] ([formatPlayerPanel(M,M.ckey)])!") log_admin("Window with pdiff [pdiff] at [loc] deanchored by [M.real_name] ([M.ckey])!") else - message_admins("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [AM]!") + msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [AM]!") log_admin("Window with pdiff [pdiff] at [loc] deanchored by [AM]!") if(health <= 0) var/pdiff=performWallPressureCheck(src.loc) if(pdiff>0) if(M) - message_admins("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [M.real_name] ([formatPlayerPanel(M,M.ckey)])!") + msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [M.real_name] ([formatPlayerPanel(M,M.ckey)])!") log_admin("Window with pdiff [pdiff] at [loc] destroyed by [M.real_name] ([M.ckey])!") else - message_admins("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [AM]!") + msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [AM]!") log_admin("Window with pdiff [pdiff] at [loc] destroyed by [AM]!") destroy() @@ -158,7 +158,7 @@ var/global/wcColored user.visible_message("[user] smashes through [src]!") var/pdiff=performWallPressureCheck(src.loc) if(pdiff>0) - message_admins("Window destroyed by hulk [user.real_name] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!") + msg_admin_attack("Window destroyed by hulk [user.real_name] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!") log_admin("Window destroyed by hulk [user.real_name] ([user.ckey]) with pdiff [pdiff] at [loc]!") destroy() else if (usr.a_intent == "harm") @@ -183,7 +183,7 @@ var/global/wcColored user.visible_message("[user] smashes through [src]!") var/pdiff=performWallPressureCheck(src.loc) if(pdiff>0) - message_admins("Window destroyed by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!") + msg_admin_attack("Window destroyed by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!") destroy() else //for nicer text~ user.visible_message("[user] smashes into [src]!") @@ -240,7 +240,7 @@ var/global/wcColored return if(W.flags & NOBLUDGEON) return - + if(istype(W, /obj/item/weapon/screwdriver)) if(reinf && state >= 1) state = 3 - state @@ -254,7 +254,7 @@ var/global/wcColored if(!anchored) var/pdiff=performWallPressureCheck(src.loc) if(pdiff>0) - message_admins("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!") + msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!") log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!") else if(!reinf) anchored = !anchored @@ -264,7 +264,7 @@ var/global/wcColored if(!anchored) var/pdiff=performWallPressureCheck(src.loc) if(pdiff>0) - message_admins("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!") + msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!") log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!") else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1) state = 1 - state @@ -305,7 +305,7 @@ var/global/wcColored step(src, get_dir(user, src)) var/pdiff=performWallPressureCheck(src.loc) if(pdiff>0) - message_admins("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!") + msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!") log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!") else playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1) @@ -325,7 +325,7 @@ var/global/wcColored if(health <= 0) var/pdiff=performWallPressureCheck(src.loc) if(pdiff>0) - message_admins("Window with pdiff [pdiff] broken at [formatJumpTo(loc)]!") + msg_admin_attack("Window with pdiff [pdiff] broken at [formatJumpTo(loc)]!") destroy() return @@ -403,14 +403,6 @@ var/global/wcColored dir = ini_dir update_nearby_tiles(need_rebuild=1) - -//This proc has to do with airgroups and atmos, it has nothing to do with smoothwindows, that's update_nearby_tiles(). -/obj/structure/window/proc/update_nearby_tiles(need_rebuild) - if(!air_master) return 0 - air_master.mark_for_update(get_turf(src)) - - return 1 - //checks if this window is full-tile one /obj/structure/window/proc/is_fulltile() if(dir & (dir - 1)) diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 3b82543e80a..a576c38295f 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -142,11 +142,11 @@ proc/trigger_armed_response_team(var/force = 0) // there's only a certain chance a team will be sent if(!prob(send_team_chance)) - command_alert("It would appear that an emergency response team was requested for [station_name()]. Unfortunately, we were unable to send one at this time.", "Central Command") + command_announcement.Announce("It would appear that an emergency response team was requested for [station_name()]. Unfortunately, we were unable to send one at this time.", "Central Command") can_call_ert = 0 // Only one call per round, ladies. return - command_alert("It would appear that an emergency response team was requested for [station_name()]. We will prepare and send one as soon as possible.", "Central Command") + command_announcement.Announce("It would appear that an emergency response team was requested for [station_name()]. We will prepare and send one as soon as possible.", "Central Command") can_call_ert = 0 // Only one call per round, gentleman. send_emergency_team = 1 diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 93449c76156..57216de9efd 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -93,6 +93,7 @@ var/list/mechtoys = list( /obj/machinery/computer/supplycomp name = "Supply Shuttle Console" + desc = "Used to order supplies." icon = 'icons/obj/computer.dmi' icon_state = "supply" req_access = list(access_cargo) @@ -105,6 +106,7 @@ var/list/mechtoys = list( /obj/machinery/computer/ordercomp name = "Supply Ordering Console" + desc = "Used to order supplies from cargo staff." icon = 'icons/obj/computer.dmi' icon_state = "request" circuit = "/obj/item/weapon/circuitboard/ordercomp" @@ -210,15 +212,14 @@ var/list/mechtoys = list( if(slip.stamped && slip.stamped.len) //yes, the clown stamp will work. clown is the highest authority on the station, it makes sense points += points_per_slip find_slip = 0 - continue // Sell phoron - if(istype(A, /obj/item/stack/sheet/mineral/plasma)) + else if(istype(A, /obj/item/stack/sheet/mineral/plasma)) var/obj/item/stack/sheet/mineral/plasma/P = A plasma_count += P.amount // Sell platinum - if(istype(A, /obj/item/stack/sheet/mineral/platinum)) + else if(istype(A, /obj/item/stack/sheet/mineral/platinum)) var/obj/item/stack/sheet/mineral/platinum/P = A plat_count += P.amount @@ -272,8 +273,8 @@ var/list/mechtoys = list( A:req_access += text2num(SP.access) var/list/contains - if(istype(SP,/datum/supply_packs/randomised)) - var/datum/supply_packs/randomised/SPR = SP + if(istype(SP,/datum/supply_packs/misc/randomised)) + var/datum/supply_packs/misc/randomised/SPR = SP contains = list() if(SPR.contains.len) for(var/j=1,j<=SPR.num_contained,j++) @@ -348,17 +349,18 @@ var/list/mechtoys = list( temp = "Supply points: [supply_controller.points]
" temp += "Main Menu


" temp += "Select a category

" - for(var/supply_group_name in all_supply_groups ) - temp += "[supply_group_name]
" + for(var/cat in all_supply_groups ) + temp += "[get_supply_group_name(cat)]
" else last_viewed_group = href_list["order"] + var/cat = text2num(last_viewed_group) temp = "Supply points: [supply_controller.points]
" temp += "Back to all categories


" - temp += "Request from: [last_viewed_group]

" - for(var/supply_name in supply_controller.supply_packs ) - var/datum/supply_packs/N = supply_controller.supply_packs[supply_name] - if(N.hidden || N.contraband || N.group != last_viewed_group) continue //Have to send the type instead of a reference to - temp += "[supply_name] Cost: [N.cost]
" //the obj because it would get caught by the garbage + temp += "Request from: [get_supply_group_name(cat)]

" + for(var/supply_type in supply_controller.supply_packs ) + var/datum/supply_packs/N = supply_controller.supply_packs[supply_type] + if(N.hidden || N.contraband || N.group != cat) continue //Have to send the type instead of a reference to + temp += "[N.name] Cost: [N.cost]
" //the obj because it would get caught by the garbage else if (href_list["doorder"]) if(world.time < reqtime) @@ -543,17 +545,18 @@ var/list/mechtoys = list( temp = "Supply points: [supply_controller.points]
" temp += "Main Menu


" temp += "Select a category

" - for(var/supply_group_name in all_supply_groups ) - temp += "[supply_group_name]
" + for(var/cat in all_supply_groups ) + temp += "[get_supply_group_name(cat)]
" else last_viewed_group = href_list["order"] + var/cat = text2num(last_viewed_group) temp = "Supply points: [supply_controller.points]
" temp += "Back to all categories


" - temp += "Request from: [last_viewed_group]

" - for(var/supply_name in supply_controller.supply_packs ) - var/datum/supply_packs/N = supply_controller.supply_packs[supply_name] - if((N.hidden && !hacked) || (N.contraband && !can_order_contraband) || N.group != last_viewed_group) continue //Have to send the type instead of a reference to - temp += "[supply_name] Cost: [N.cost]
" //the obj because it would get caught by the garbage + temp += "Request from: [get_supply_group_name(cat)]

" + for(var/supply_type in supply_controller.supply_packs ) + var/datum/supply_packs/N = supply_controller.supply_packs[supply_type] + if((N.hidden && !hacked) || (N.contraband && !can_order_contraband) || N.group != cat) continue //Have to send the type instead of a reference to + temp += "[N.name] Cost: [N.cost]
" //the obj because it would get caught by the garbage /*temp = "Supply points: [supply_controller.points]


Request what?

" diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 0a656b903fb..c84a24c12cb 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -249,8 +249,8 @@ if(old_opacity != W.opacity) //opacity has changed. Need to update surrounding lights if(W.lighting_lumcount) //unless we're being illuminated, don't bother (may be buggy, hard to test) - W.UpdateAffectingLights() - + W.UpdateAffectingLights() + if (istype(W,/turf/simulated/floor)) W.RemoveLattice() diff --git a/code/game/vehicles/spacepods/parts.dm b/code/game/vehicles/spacepods/parts.dm index d682ef5240c..02624769364 100644 --- a/code/game/vehicles/spacepods/parts.dm +++ b/code/game/vehicles/spacepods/parts.dm @@ -6,5 +6,5 @@ name="Space Pod Core" icon_state = "core" construction_cost = list("iron"=5000,"uranium"=1000,"plasma"=5000) - flags = FPRINT | CONDUCT + flags = CONDUCT origin_tech = "programming=2;materials=3;bluespace=2;engineering=3" \ No newline at end of file diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 4505663b0c4..61ec3c862ee 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -120,18 +120,19 @@ var/global/normal_ooc_colour = "#002eb8" log_ooc("(LOCAL) [mob.name]/[key] : [msg]") var/list/heard = get_mobs_in_view(7, src.mob) var/mob/S = src.mob - + var/display_name = S.key if(S.stat != DEAD) display_name = S.name - + // Handle non-admins for(var/mob/M in heard) if(!M.client) continue var/client/C = M.client - if (C in admins) - continue //they are handled after that + if(C in admins) + if(C.holder.rights | R_MENTOR) + continue //they are handled after that if(C.prefs.toggles & CHAT_LOOC) if(holder) @@ -141,15 +142,16 @@ var/global/normal_ooc_colour = "#002eb8" else display_name = holder.fakekey C << "LOOC: [display_name]: [msg]" - + // Now handle admins display_name = S.key if(S.stat != DEAD) display_name = "[S.name]/([S.key])" - + for(var/client/C in admins) - if(C.prefs.toggles & CHAT_LOOC) - var/prefix = "(R)LOOC" - if (C.mob in heard) - prefix = "LOOC" - C << "[prefix]: [display_name]: [msg]" + if(C.holder.rights | R_MENTOR) + if(C.prefs.toggles & CHAT_LOOC) + var/prefix = "(R)LOOC" + if (C.mob in heard) + prefix = "LOOC" + C << "[prefix]: [display_name]: [msg]" diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm index f5d5998e24a..7cdd9579e13 100644 --- a/code/game/verbs/who.dm +++ b/code/game/verbs/who.dm @@ -77,7 +77,7 @@ num_admins_online++ - else if(R_MOD & C.holder.rights) + else if((R_MOD | R_MENTOR) & C.holder.rights) modmsg += "\t[C] is a [C.holder.rank]" if(isobserver(C.mob)) @@ -98,9 +98,9 @@ if(!C.holder.fakekey) msg += "\t[C] is a [C.holder.rank]\n" num_admins_online++ - else if (R_MOD & C.holder.rights) + else if ((R_MOD | R_MENTOR) & C.holder.rights) modmsg += "\t[C] is a [C.holder.rank]\n" num_mods_online++ - msg = "Current Admins ([num_admins_online]):\n" + msg + "\n Current Mentors ([num_mods_online]):\n" + modmsg + msg = "Current Admins ([num_admins_online]):\n" + msg + "\n Current Mods/Mentors ([num_mods_online]):\n" + modmsg src << msg diff --git a/code/modules/DetectiveWork/footprints_and_rag.dm b/code/modules/DetectiveWork/footprints_and_rag.dm index 04df3a507e6..8b0cbcbe305 100644 --- a/code/modules/DetectiveWork/footprints_and_rag.dm +++ b/code/modules/DetectiveWork/footprints_and_rag.dm @@ -25,7 +25,7 @@ possible_transfer_amounts = list(5) volume = 5 can_be_placed_into = null - flags = FPRINT | TABLEPASS | OPENCONTAINER | NOBLUDGEON + flags = OPENCONTAINER | NOBLUDGEON /obj/item/weapon/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag) if(ismob(target) && target.reagents && reagents.total_volume) diff --git a/code/modules/DetectiveWork/scanner.dm b/code/modules/DetectiveWork/scanner.dm index 38c65445bb0..d694e4c1645 100644 --- a/code/modules/DetectiveWork/scanner.dm +++ b/code/modules/DetectiveWork/scanner.dm @@ -8,7 +8,7 @@ icon_state = "forensic1" w_class = 3.0 item_state = "electronic" - flags = FPRINT | TABLEPASS | CONDUCT | NOBLUDGEON + flags = CONDUCT | NOBLUDGEON slot_flags = SLOT_BELT var/scanning = 0 var/list/log = list() diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index f4b35c40ba2..a5dc3d6ef4d 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -781,7 +781,7 @@ var/global/nologevent = 0 /datum/admins/proc/unprison(var/mob/M in mob_list) set category = "Admin" set name = "Unprison" - if (M.z == 2) + if ((M.z in config.admin_levels)) M.loc = pick(latejoin) message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1) log_admin("[key_name(usr)] has unprisoned [key_name(M)]") diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index a9afe87debf..d9f5d7d54ba 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -41,6 +41,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights if("sound","sounds") rights |= R_SOUNDS if("spawn","create") rights |= R_SPAWN if("mod") rights |= R_MOD + if("mentor") rights |= R_MENTOR admin_ranks[rank] = rights previous_rights = rights diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 727dfc58c61..b4d24b90ec1 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -1,10 +1,8 @@ //admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless var/list/admin_verbs_default = list( // /datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/ - /client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/ - /client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/ + /client/proc/deadmin_self /*destroys our own admin datum so we can play as a regular player*/ // /client/proc/check_antagonists, /*shows all antags*/ - /client/proc/cmd_mentor_check_new_players // /client/proc/deadchat /*toggles deadchat on/off*/ ) var/list/admin_verbs_admin = list( @@ -46,7 +44,6 @@ var/list/admin_verbs_admin = list( /client/proc/toggleprayers, /*toggles prayers on/off*/ // /client/proc/toggle_hear_radio, /*toggles whether we hear the radio*/ /client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/ - /client/proc/secrets, /datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/ /datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/ /datum/admins/proc/toggledsay, /*toggles dsay on/off for everyone*/ @@ -56,7 +53,6 @@ var/list/admin_verbs_admin = list( /client/proc/cmd_mod_say, /datum/admins/proc/show_player_info, /client/proc/free_slot, /*frees slot for chosen job*/ - /client/proc/cmd_admin_rejuvenate, /client/proc/toggleattacklogs, /client/proc/toggledebuglogs, /client/proc/update_mob_sprite, @@ -64,7 +60,6 @@ var/list/admin_verbs_admin = list( /client/proc/man_up, /client/proc/global_man_up, /client/proc/delbook, - /client/proc/event_manager_panel, /client/proc/empty_ai_core_toggle_latejoin ) var/list/admin_verbs_ban = list( @@ -98,6 +93,9 @@ var/list/admin_verbs_event = list( /client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/ /client/proc/response_team, // Response Teams admin verb /client/proc/cmd_admin_create_centcom_report, + /client/proc/fax_panel, + /client/proc/secrets, + /client/proc/event_manager_panel ) var/list/admin_verbs_spawn = list( @@ -122,21 +120,7 @@ var/list/admin_verbs_server = list( /client/proc/delbook, /client/proc/toggle_antagHUD_use, /client/proc/toggle_antagHUD_restrictions, - /client/proc/set_ooc, - - //Doubling of certain event verbs for senior admins - /datum/admins/proc/access_news_network, /*allows access of newscasters*/ - /client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/ - /client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/ - /client/proc/toggle_random_events, - /client/proc/toggle_ert_calling, - /client/proc/one_click_antag, - /client/proc/cmd_admin_change_custom_event, - /client/proc/cmd_admin_create_centcom_report, - /client/proc/cmd_admin_dress, - /client/proc/editappear, - /client/proc/response_team, // Response Teams admin verb - /client/proc/nanomapgen_DumpImage + /client/proc/set_ooc ) var/list/admin_verbs_debug = list( /client/proc/cmd_admin_list_open_jobs, @@ -166,7 +150,8 @@ var/list/admin_verbs_permissions = list( /client/proc/edit_admin_permissions ) var/list/admin_verbs_rejuv = list( - /client/proc/respawn_character + /client/proc/respawn_character, + /client/proc/cmd_admin_rejuvenate ) var/list/admin_verbs_mod = list( /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/ @@ -181,9 +166,16 @@ var/list/admin_verbs_mod = list( /client/proc/dsay, /datum/admins/proc/show_player_panel, /client/proc/jobbans, + /client/proc/debug_variables /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/ // /client/proc/cmd_admin_subtle_message /*send an message to somebody as a 'voice in their head'*/ ) +var/list/admin_verbs_mentor = list( + /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/ + /client/proc/cmd_admin_pm_panel, /*admin-pm list*/ + /client/proc/cmd_admin_pm_by_key_panel, /*admin-pm list by key*/ + /client/proc/cmd_mentor_check_new_players +) /client/proc/add_admin_verbs() if(holder) @@ -201,6 +193,7 @@ var/list/admin_verbs_mod = list( if(holder.rights & R_SOUNDS) verbs += admin_verbs_sounds if(holder.rights & R_SPAWN) verbs += admin_verbs_spawn if(holder.rights & R_MOD) verbs += admin_verbs_mod + if(holder.rights & R_MENTOR) verbs += admin_verbs_mentor /client/proc/admin_ghost() set category = "Admin" @@ -637,6 +630,7 @@ var/list/admin_verbs_mod = list( set category = "Preferences" prefs.toggles ^= CHAT_ATTACKLOGS + prefs.save_preferences(src) if (prefs.toggles & CHAT_ATTACKLOGS) usr << "You now will get attack log messages" else diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 082553f3092..49274720ed1 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -455,6 +455,16 @@ dat += "[mob_loc.loc]" else dat += "Head not found!" + if(ticker.mode.num_players_started() >= 30) + for(var/datum/mind/N in ticker.mode.get_extra_living_heads()) + var/mob/M = N.current + if(M) + dat += "[M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "PM" + var/turf/mob_loc = get_turf_loc(M) + dat += "[mob_loc.loc]" + else + dat += "Head not found!" dat += "" if(ticker.mode.name == "nations") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 4388c0a8247..3dcd7895dbb 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -37,18 +37,10 @@ if(!src.makeWizard()) usr << "\red Unfortunately there weren't enough candidates available." if("7") - log_admin("[key_name(usr)] has spawned a nuke team.") - if(!src.makeNukeTeam()) + log_admin("[key_name(usr)] has spawned vampires.") + if(!src.makeVampires()) usr << "\red Unfortunately there weren't enough candidates available." if("8") - log_admin("[key_name(usr)] has spawned a ninja.") - src.makeSpaceNinja() - if("9") - log_admin("[key_name(usr)] has spawned aliens.") - src.makeAliens() - if("10") - log_admin("[key_name(usr)] has spawned a death squad.") - if("11") log_admin("[key_name(usr)] has spawned vox raiders.") if(!src.makeVoxRaiders()) usr << "\red Unfortunately there weren't enough candidates available." @@ -294,7 +286,7 @@ if("sentinel") M.change_mob_type( /mob/living/carbon/alien/humanoid/sentinel , null, null, delmob ) if("larva") M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob ) if("human") M.change_mob_type( /mob/living/carbon/human/human , null, null, delmob ) - if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob ) + if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob ) if("monkey") M.change_mob_type( /mob/living/carbon/monkey , null, null, delmob ) if("robot") M.change_mob_type( /mob/living/silicon/robot , null, null, delmob ) if("cat") M.change_mob_type( /mob/living/simple_animal/cat , null, null, delmob ) @@ -599,13 +591,13 @@ if(counter >= 5) //So things dont get squiiiiished! jobs += "" counter = 0 - + //Drone if(jobban_isbanned(M, "Drone")) jobs += "Drone" else jobs += "Drone" - + //pAI if(jobban_isbanned(M, "pAI")) jobs += "pAI" @@ -675,19 +667,19 @@ jobs += "[replacetext("Ninja", " ", " ")]" else jobs += "[replacetext("Ninja", " ", " ")]" - + //Raider if(jobban_isbanned(M, "raider") || isbanned_dept) jobs += "[replacetext("Raider", " ", " ")]" else jobs += "[replacetext("Raider", " ", " ")]" - + //Mutineer if(jobban_isbanned(M, "mutineer") || isbanned_dept) jobs += "[replacetext("Mutineer", " ", " ")]" else jobs += "[replacetext("Mutineer", " ", " ")]" - + //Blob if(jobban_isbanned(M, "blob") || isbanned_dept) jobs += "[replacetext("Blob", " ", " ")]" @@ -706,12 +698,12 @@ jobs += "Dionaea Nymph" else jobs += "Dionaea Nymph" - + //NPC if(jobban_isbanned(M, "NPC")) jobs += "NPC" else - jobs += "NPC" + jobs += "NPC" //ANTAG HUD if(jobban_isbanned(M, "AntagHUD")) @@ -1100,6 +1092,7 @@ message_admins("\blue [key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)]", 1) H.monkeyize() + else if(href_list["corgione"]) if(!check_rights(R_SPAWN)) return @@ -1149,7 +1142,7 @@ //strip their stuff and stick it in the crate for(var/obj/item/I in M) - M.u_equip(I) + M.unEquip(I) if(I) I.loc = locker I.layer = initial(I.layer) @@ -1170,7 +1163,7 @@ M << "\red You have been sent to the prison station!" log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.") message_admins("\blue [key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.", 1) - + else if(href_list["sendbacktolobby"]) if(!check_rights(R_ADMIN)) return @@ -1193,7 +1186,7 @@ var/mob/new_player/NP = new() NP.ckey = M.ckey - qdel(M) + qdel(M) else if(href_list["tdome1"]) if(!check_rights(R_SERVER|R_EVENT)) return @@ -1210,7 +1203,7 @@ return for(var/obj/item/I in M) - M.u_equip(I) + M.unEquip(I) if(I) I.loc = M.loc I.layer = initial(I.layer) @@ -1239,7 +1232,7 @@ return for(var/obj/item/I in M) - M.u_equip(I) + M.unEquip(I) if(I) I.loc = M.loc I.layer = initial(I.layer) @@ -1290,7 +1283,7 @@ return for(var/obj/item/I in M) - M.u_equip(I) + M.unEquip(I) if(I) I.loc = M.loc I.layer = initial(I.layer) @@ -1437,7 +1430,7 @@ foo += text("Is an AI | ") else foo += text("Make AI | ", src, M) - if(M.z != 2) + if(!(M.z in config.admin_levels)) foo += text("Prison | ", src, M) foo += text("Maze | ", src, M) else @@ -1569,11 +1562,11 @@ usr << "This can only be used on instances of type /mob/living" return - if(alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes") + if(alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Bluespace Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes") return if(BSACooldown) - src.owner << "Standby! Reload cycle in progress! Gunnary crews ready in five seconds!" + src.owner << "Standby. Reload cycle in progress. Gunnery crews ready in five seconds!" return BSACooldown = 1 @@ -1605,6 +1598,9 @@ M.stuttering = 20 else if(href_list["CentcommReply"]) + if(!check_rights(R_ADMIN)) + return + var/mob/living/carbon/human/H = locate(href_list["CentcommReply"]) if(!istype(H)) usr << "This can only be used on instances of type /mob/living/carbon/human" @@ -1622,10 +1618,16 @@ H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\"" else if(href_list["SyndicateReply"]) + if(!check_rights(R_ADMIN)) + return + var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"]) if(!istype(H)) usr << "This can only be used on instances of type /mob/living/carbon/human" return + if(H.stat != 0) + usr << "The person you are trying to contact is not conscious." + return if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset)) usr << "The person you are trying to contact is not wearing a headset" return @@ -1654,6 +1656,9 @@ H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your HONKbrothers. Message as follows, HONK. [input]. Message ends, HONK.\"" else if(href_list["AdminFaxView"]) + if(!check_rights(R_ADMIN)) + return + var/obj/item/fax = locate(href_list["AdminFaxView"]) if (istype(fax, /obj/item/weapon/paper)) var/obj/item/weapon/paper/P = fax @@ -1666,21 +1671,24 @@ //open a browse window listing the contents instead var/data = "" var/obj/item/weapon/paper_bundle/B = fax - + for (var/page = 1, page <= B.amount + 1, page++) var/obj/pageobj = B.contents[page] data += "Page [page] - [pageobj.name]
" - + usr << browse(data, "window=[B.name]") else usr << "\red The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]" else if (href_list["AdminFaxViewPage"]) + if(!check_rights(R_ADMIN)) + return + var/page = text2num(href_list["AdminFaxViewPage"]) var/obj/item/weapon/paper_bundle/bundle = locate(href_list["paper_bundle"]) - + if (!bundle) return - + if (istype(bundle.contents[page], /obj/item/weapon/paper)) var/obj/item/weapon/paper/P = bundle.contents[page] P.show_content(src.owner, 1) @@ -1688,52 +1696,156 @@ var/obj/item/weapon/photo/H = bundle.contents[page] H.show(src.owner) return - - else if(href_list["CentcommFaxReply"]) - var/mob/sender = locate(href_list["CentcommFaxReply"]) + + else if(href_list["AdminFaxCreate"]) + if(!check_rights(R_ADMIN)) + return + + var/mob/sender = locate(href_list["AdminFaxCreate"]) var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"]) + var/faxtype = href_list["faxtype"] + var/reply_to = locate(href_list["replyto"]) + var/destination + var/notify - var/input = input(src.owner, "Please enter a message to reply to [key_name(sender)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from Centcomm", "") as message|null - if(!input) return + var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(null) //hopefully the null loc won't cause trouble for us + + if(!fax) + var/list/departmentoptions = alldepartments + "All Departments" + destination = input(usr, "To which department?", "Choose a department", "") as null|anything in departmentoptions + if(!destination) + del(P) + return + + for(var/obj/machinery/photocopier/faxmachine/F in allfaxes) + if(destination != "All Departments" && F.department == destination) + fax = F + + + var/input = input(src.owner, "Please enter a message to send a fax via secure connection. Use
for line breaks. Both pencode and HTML work.", "Outgoing message from Centcomm", "") as message|null + if(!input) + del(P) + return + input = P.parsepencode(input) // Encode everything from pencode to html + + var/customname = input(src.owner, "Pick a title for the fax.", "Fax Title") as text|null + if(!customname) + customname = "paper" + + var/stampname + var/stamptype + var/stampvalue + var/sendername + switch(faxtype) + if("Central Command") + stamptype = "icon" + stampvalue = "cent" + sendername = command_name() + if("Syndicate") + sendername = "UNKNOWN" + if("Administrator") + stamptype = input(src.owner, "Pick a stamp type.", "Stamp Type") as null|anything in list("icon","text","none") + if(stamptype == "icon") + stampname = input(src.owner, "Pick a stamp icon.", "Stamp Icon") as null|anything in list("centcom","granted","denied","clown") + switch(stampname) + if("centcom") + stampvalue = "cent" + if("granted") + stampvalue = "ok" + if("denied") + stampvalue = "deny" + if("clown") + stampvalue = "clown" + else if(stamptype == "text") + stampvalue = input(src.owner, "What should the stamp say?", "Stamp Text") as text|null + else if(stamptype == "none") + stamptype = "" + else + del(P) + return + + sendername = input(src.owner, "What organization does the fax come from? This determines the prefix of the paper (i.e. Central Command- Title). This is optional.", "Organization") as text|null + + if(sender) + notify = alert(src.owner, "Would you like to inform the original sender that a fax has arrived?","Notify Sender","Yes","No") - var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null - // Create the reply message - var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( null ) //hopefully the null loc won't cause trouble for us - P.name = "[command_name()]- [customname]" + if(sendername) + P.name = "[sendername]- [customname]" + else + P.name = "[customname]" P.info = input P.update_icon() - P.stamps += "
" - var/image/stampoverlay = image('icons/obj/bureaucracy.dmi') P.x = rand(-2, 0) - P.y = rand(-1, 2) + P.y = rand(-1, 2) P.offset_x += P.x P.offset_y += P.y - stampoverlay.pixel_x = P.x - stampoverlay.pixel_y = P.y - - if(!P.ico) - P.ico = new - P.ico += "paper_stamp-cent" - stampoverlay.icon_state = "paper_stamp-cent" - - // Stamps - if(!P.stamped) - P.stamped = new - P.stamped += /obj/item/weapon/stamp/centcom - P.overlays += stampoverlay + if(stamptype) + var/image/stampoverlay = image('icons/obj/bureaucracy.dmi') + stampoverlay.pixel_x = P.x + stampoverlay.pixel_y = P.y - if(fax.recievefax(P)) - src.owner << "\blue Message reply to transmitted successfully." - log_admin("[key_name(src.owner)] replied to a fax message from [key_name(sender)]: [input]") - message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)]", 1) + if(!P.ico) + P.ico = new + P.ico += "paper_stamp-[stampvalue]" + stampoverlay.icon_state = "paper_stamp-[stampvalue]" + + if(stamptype == "icon") + if(!P.stamped) + P.stamped = new + P.stamped += /obj/item/weapon/stamp/centcom + P.overlays += stampoverlay + P.stamps += "
" + + else if(stamptype == "text") + if(!P.stamped) + P.stamped = new + P.stamped += /obj/item/weapon/stamp + P.overlays += stampoverlay + P.stamps += "
[stampvalue]" + + if(destination != "All Departments") + if(!fax.receivefax(P)) + src.owner << "\red Message transmission failed." + return else - src.owner << "\red Message reply failed." - - spawn(100) - del(P) + for(var/obj/machinery/photocopier/faxmachine/F in allfaxes) + if((F.z in config.station_levels)) + if(!F.receivefax(P)) + src.owner << "\red Message transmission to [F.department] failed." + + var/datum/fax/admin/A = new /datum/fax/admin() + A.name = P.name + A.from_department = faxtype + if(destination != "All Departments") + A.to_department = fax.department + else + A.to_department = "All Departments" + A.origin = "Administrator" + A.message = P + A.reply_to = reply_to + A.sent_by = usr + A.sent_at = world.time + + src.owner << "\blue Message transmitted successfully." + if(notify == "Yes") + var/mob/living/carbon/human/H = sender + if(istype(H) && H.stat == 1 && (istype(H.l_ear, /obj/item/device/radio/headset) || istype(H.r_ear, /obj/item/device/radio/headset))) + sender << "Your headset pings, notifying you that a reply to your fax has arrived." + if(sender) + log_admin("[key_name(src.owner)] replied to a fax message from [key_name(sender)]: [input]") + message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)] (VIEW).", 1) + else + log_admin("[key_name(src.owner)] sent a fax message to [destination]: [input]") + message_admins("[key_name_admin(src.owner)] sent a fax message to [destination] (VIEW).", 1) return + else if(href_list["refreshfaxpanel"]) + if(!check_rights(R_ADMIN)) + return + + fax_panel(usr) + else if(href_list["jumpto"]) if(!check_rights(R_ADMIN)) return @@ -1992,11 +2104,11 @@ if(gravity_is_on) log_admin("[key_name(usr)] toggled gravity on.", 1) message_admins("\blue [key_name_admin(usr)] toggled gravity on.", 1) - command_alert("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.") + command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.") else log_admin("[key_name(usr)] toggled gravity off.", 1) message_admins("\blue [key_name_admin(usr)] toggled gravity off.", 1) - command_alert("Feedback surge detected in mass-distributions systems. Artifical gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.") + command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artifical gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.") if("wave") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","Meteor") @@ -2033,12 +2145,12 @@ feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","BLOB") message_admins("[key_name_admin(usr)] has triggered a blob.") - new /datum/game_mode/blob() + new /datum/game_mode/blob() if("aliens") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","ALIEN") message_admins("[key_name_admin(usr)] has triggered an alien infestation.") - new /datum/event/alien_infestation() + new /datum/event/alien_infestation() if("power") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","P") @@ -2095,7 +2207,7 @@ for(var/mob/living/carbon/human/H in mob_list) var/turf/loc = find_loc(H) var/security = 0 - if(loc.z > 1 || prisonwarped.Find(H)) + if(!(loc.z in config.station_levels) || prisonwarped.Find(H)) //don't warp them if they aren't ready or are already there continue @@ -2111,7 +2223,7 @@ if(istype(W, /datum/organ/external)) continue //don't strip organs - H.u_equip(W) + H.unEquip(W) if (H.client) H.client.screen -= W if (W) @@ -2408,7 +2520,7 @@ message_admins("[key_name_admin(usr)] made the floor LAVA! It'll last [length] seconds and it will deal [damage] damage to everyone.", 1) for(var/turf/simulated/floor/F in world) - if(F.z == 1) + if((F.z in config.station_levels)) F.name = "lava" F.desc = "The floor is LAVA!" F.overlays += "lava" @@ -2433,7 +2545,7 @@ sleep(10) for(var/turf/simulated/floor/F in world) // Reset everything. - if(F.z == 1) + if((F.z in config.station_levels)) F.name = initial(F.name) F.desc = initial(F.desc) F.overlays.Cut() @@ -2481,11 +2593,10 @@ feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","EgL") for(var/obj/machinery/door/airlock/W in world) - if(W.z == 1 && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison)) + if((W.z in config.station_levels) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison)) W.req_access = list() message_admins("[key_name_admin(usr)] activated Egalitarian Station mode") - command_alert("Centcomm airlock control override activated. Please take this time to get acquainted with your coworkers.") - world << sound('sound/AI/commandreport.ogg') + command_announcement.Announce("Centcomm airlock control override activated. Please take this time to get acquainted with your coworkers.", new_sound = 'sound/AI/commandreport.ogg') if("dorf") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","DF") @@ -2500,8 +2611,7 @@ message_admins("[key_name_admin(usr)] triggered an ion storm") var/show_log = alert(usr, "Show ion message?", "Message", "Yes", "No") if(show_log == "Yes") - command_alert("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert") - world << sound('sound/AI/ionstorm.ogg') + command_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg') if("carp") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","Crp") diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 3038b414334..2dd6ed7f892 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -21,7 +21,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," src.verbs += /client/verb/adminhelp // 2 minute cool-down for adminhelps//Go to hell **/ var/msg - var/list/type = list("Player Complaint","Question","Bug Report","Event") + var/list/type = list("Question","Player Complaint") var/selected_type = input("Pick a category.", "Admin Help", null, null) as null|anything in type if(selected_type) msg = input("Please enter your message.", "Admin Help", null, null) as text @@ -100,11 +100,9 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," var/admin_number_afk = 0 var/list/modholders = list() var/list/banholders = list() - var/list/debugholders = list() var/list/adminholders = list() - var/list/eventholders = list() for(var/client/X in admins) - if(R_MOD & X.holder.rights) + if((R_MOD | R_MENTOR) & X.holder.rights) if(X.is_afk()) admin_number_afk++ modholders += X @@ -114,10 +112,6 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," adminholders += X if(R_BAN & X.holder.rights) banholders += X - if(R_DEBUG & X.holder.rights) - debugholders += X - if(R_EVENT & X.holder.rights) - eventholders += X switch(selected_type) if("Question") @@ -132,30 +126,6 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," if(X.prefs.sound & SOUND_ADMINHELP) X << 'sound/effects/adminhelp.ogg' X << msg - else if("Bug Report") - if(debugholders.len) - for(var/client/X in debugholders) - if(X.prefs.sound & SOUND_ADMINHELP) - X << 'sound/effects/adminhelp.ogg' - X << msg - else - if(adminholders.len) - for(var/client/X in adminholders) - if(X.prefs.sound & SOUND_ADMINHELP) - X << 'sound/effects/adminhelp.ogg' - X << msg - else if("Event") - if(eventholders.len) - for(var/client/X in eventholders) - if(X.prefs.sound & SOUND_ADMINHELP) - X << 'sound/effects/adminhelp.ogg' - X << msg - else - if(banholders.len) - for(var/client/X in banholders) - if(X.prefs.sound & SOUND_ADMINHELP) - X << 'sound/effects/adminhelp.ogg' - X << msg else if("Player Complaint") if(banholders.len) for(var/client/X in banholders) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 83f43ba6d9c..0b244992381 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -103,7 +103,7 @@ //mod PMs are maroon //PMs sent from admins and mods display their rank if(holder) - if( holder.rights & R_MOD && !holder.rights & R_ADMIN ) + if( holder.rights & (R_MOD | R_MENTOR) && !holder.rights & R_ADMIN ) recieve_color = "maroon" else recieve_color = "red" @@ -204,20 +204,14 @@ var/list/modholders = list() var/list/banholders = list() - var/list/debugholders = list() var/list/adminholders = list() - var/list/eventholders = list() for(var/client/X in admins) - if(R_MOD & X.holder.rights) + if((R_MOD | R_MENTOR) & X.holder.rights) modholders += X if(R_ADMIN & X.holder.rights) adminholders += X - if(R_DEBUG & X.holder.rights) - debugholders += X if(R_BAN & X.holder.rights) banholders += X - if(R_EVENT & X.holder.rights) - eventholders += X //we don't use message_admins here because the sender/receiver might get it too for(var/client/X in admins) @@ -227,20 +221,10 @@ if(X.key!=key && X.key!=C.key) switch(type) if("Question") - if(X.holder.rights & R_MOD) + if(X.holder.rights & (R_MOD | R_MENTOR)) X << "[type]: [key_name(src, X, 0, type)]->[key_name(C, X, 0, type)]: \blue [msg]" //inform X else if(!modholders.len && X.holder.rights & R_ADMIN) X << "[type]: [key_name(src, X, 0, type)]->[key_name(C, X, 0, type)]: \blue [msg]" //Any admins in backup of mod question - if("Bug Report") - if(X.holder.rights & R_DEBUG) - X << "[type]: [key_name(src, X, 0, type)]->[key_name(C, X, 0, type)]: \blue [msg]" //inform X - else if(!debugholders.len && X.holder.rights & R_ADMIN) - X << "[type]: [key_name(src, X, 0, type)]->[key_name(C, X, 0, type)]: \blue [msg]" //Any admins in backup of bug reports - if("Event") - if(X.holder.rights & R_EVENT) - X << "[type]: [key_name(src, X, 0, type)]->[key_name(C, X, 0, type)]: \blue [msg]" //inform X - else if(!eventholders.len && X.holder.rights & R_BAN) - X << "[type]: [key_name(src, X, 0, type)]->[key_name(C, X, 0, type)]: \blue [msg]" //Quality in backup of Event if("Player Complaint") if(X.holder.rights & R_BAN) X << "[type]: [key_name(src, X, 0, type)]->[key_name(C, X, 0, type)]: \blue [msg]" //There should always be at least 1 person with +BAN on @@ -273,6 +257,6 @@ for(var/client/X in admins) if(X == src) continue - if((X.holder.rights & R_ADMIN) || (X.holder.rights & R_MOD)) + if((X.holder.rights & R_ADMIN) || (X.holder.rights & (R_MOD | R_MENTOR))) X << "PM: [key_name(src, X, 0)]->IRC-Admins: \blue [msg]" diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index abd1f40f15a..ce1cde9640f 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -1025,7 +1025,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that M.equip_to_slot_or_del(new /obj/item/clothing/glasses/meson/cyber(M), slot_glasses) M.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(M), slot_wear_mask) M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/singuloth(M), slot_head) - M.equip_to_slot_or_del(new /obj/item/weapon/claymore(M), slot_belt) + M.equip_to_slot_or_del(new /obj/item/weapon/claymore/ceremonial(M), slot_belt) M.equip_to_slot_or_del(new /obj/item/weapon/tank/oxygen(M), slot_s_store) M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/knighthammer(M), slot_back) diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 1aeed58f7df..c250ceca9d0 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -52,7 +52,7 @@ var/intercom_range_display_status = 0 del(C) if(camera_range_display_status) - for(var/obj/machinery/camera/C in cameranet.viewpoints) + for(var/obj/machinery/camera/C in cameranet.cameras) new/obj/effect/debugging/camera_range(C.loc) feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -68,7 +68,7 @@ var/intercom_range_display_status = 0 var/list/obj/machinery/camera/CL = list() - for(var/obj/machinery/camera/C in cameranet.viewpoints) + for(var/obj/machinery/camera/C in cameranet.cameras) CL += C var/output = {"CAMERA ANOMALIES REPORT
diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 4ae2a560421..954c0618e16 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -14,23 +14,14 @@ client/proc/one_click_antag() var/dat = {"One-click Antagonist
Make Traitors
- Make Changlings
- Make Revs
+ Make Changelings
+ Make Revolutionaries
Make Cult
Make Malf AI
Make Wizard (Requires Ghosts)
- Make Vox Raiders (Requires Ghosts)
+ Make Vampires
+ Make Vox Raiders (Requires Ghosts)
"} -/* These dont work just yet - Ninja, aliens and deathsquad I have not looked into yet - Nuke team is getting a null mob returned from makebody() (runtime error: null.mind. Line 272) - - Make Nuke Team (Requires Ghosts)
- Make Space Ninja (Requires Ghosts)
- Make Aliens (Requires Ghosts)
- Make Deathsquad (Syndicate) (Requires Ghosts)
- "} -*/ usr << browse(dat, "window=oneclickantag;size=400x400") return @@ -42,7 +33,7 @@ client/proc/one_click_antag() var/datum/mind/themind = null for(var/mob/living/silicon/ai/ai in player_list) - if(ai.client) + if(ai.client && ai.client.prefs.be_special & BE_MALF) AIs += ai if(AIs.len) @@ -67,12 +58,14 @@ client/proc/one_click_antag() for(var/mob/living/carbon/human/applicant in player_list) if(applicant.client.prefs.be_special & BE_TRAITOR) - if(!applicant.stat) - if(applicant.mind) - if (!applicant.mind.special_role) - if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.job in temp.restricted_jobs)) - candidates += applicant + if(player_old_enough_antag(applicant.client,BE_TRAITOR)) + if(!applicant.stat) + if(applicant.mind) + if (!applicant.mind.special_role) + if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate")) + if(!(applicant.mind.assigned_role in temp.restricted_jobs)) + if(!(applicant.client.prefs.species in temp.protected_species)) + candidates += applicant if(candidates.len) var/numTratiors = min(candidates.len, 3) @@ -99,12 +92,14 @@ client/proc/one_click_antag() for(var/mob/living/carbon/human/applicant in player_list) if(applicant.client.prefs.be_special & BE_CHANGELING) - if(!applicant.stat) - if(applicant.mind) - if (!applicant.mind.special_role) - if(!jobban_isbanned(applicant, "changeling") && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.job in temp.restricted_jobs)) - candidates += applicant + if(player_old_enough_antag(applicant.client,BE_CHANGELING)) + if(!applicant.stat) + if(applicant.mind) + if (!applicant.mind.special_role) + if(!jobban_isbanned(applicant, "changeling") && !jobban_isbanned(applicant, "Syndicate")) + if(!(applicant.mind.assigned_role in temp.restricted_jobs)) + if(!(applicant.client.prefs.species in temp.protected_species)) + candidates += applicant if(candidates.len) var/numChanglings = min(candidates.len, 3) @@ -129,12 +124,14 @@ client/proc/one_click_antag() for(var/mob/living/carbon/human/applicant in player_list) if(applicant.client.prefs.be_special & BE_REV) - if(applicant.stat == CONSCIOUS) - if(applicant.mind) - if(!applicant.mind.special_role) - if(!jobban_isbanned(applicant, "revolutionary") && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.job in temp.restricted_jobs)) - candidates += applicant + if(player_old_enough_antag(applicant.client,BE_REV)) + if(applicant.stat == CONSCIOUS) + if(applicant.mind) + if(!applicant.mind.special_role) + if(!jobban_isbanned(applicant, "revolutionary") && !jobban_isbanned(applicant, "Syndicate")) + if(!(applicant.mind.assigned_role in temp.restricted_jobs)) + if(!(applicant.client.prefs.species in temp.protected_species)) + candidates += applicant if(candidates.len) var/numRevs = min(candidates.len, 3) @@ -153,17 +150,19 @@ client/proc/one_click_antag() var/time_passed = world.time for(var/mob/G in respawnable_list) - if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate")) - spawn(0) - switch(G.timed_alert("Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","No",300,"Yes","No"))//alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No")) - if("Yes") - if((world.time-time_passed)>300)//If more than 30 game seconds passed. - return - candidates += G - if("No") - return - else - return + if(G.client.prefs.be_special & BE_WIZARD) + if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate")) + if(player_old_enough_antag(G.client,BE_WIZARD)) + spawn(0) + switch(G.timed_alert("Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","No",300,"Yes","No"))//alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No")) + if("Yes") + if((world.time-time_passed)>300)//If more than 30 game seconds passed. + return + candidates += G + if("No") + return + else + return sleep(300) @@ -194,12 +193,14 @@ client/proc/one_click_antag() for(var/mob/living/carbon/human/applicant in player_list) if(applicant.client.prefs.be_special & BE_CULTIST) - if(applicant.stat == CONSCIOUS) - if(applicant.mind) - if(!applicant.mind.special_role) - if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate")) - if(!(applicant.job in temp.restricted_jobs)) - candidates += applicant + if(player_old_enough_antag(applicant.client,BE_CULTIST)) + if(applicant.stat == CONSCIOUS) + if(applicant.mind) + if(!applicant.mind.special_role) + if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate")) + if(!(applicant.mind.assigned_role in temp.restricted_jobs)) + if(!(applicant.client.prefs.species in temp.protected_species)) + candidates += applicant if(candidates.len) var/numCultists = min(candidates.len, 4) @@ -223,17 +224,19 @@ client/proc/one_click_antag() var/time_passed = world.time for(var/mob/G in respawnable_list) - if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate")) - spawn(0) - switch(alert(G,"Do you wish to be considered for a nuke team being sent in?","Please answer in 30 seconds!","Yes","No")) - if("Yes") - if((world.time-time_passed)>300)//If more than 30 game seconds passed. - return - candidates += G - if("No") - return - else - return + if(G.client.prefs.be_special & BE_OPERATIVE) + if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate")) + if(player_old_enough_antag(G.client,BE_OPERATIVE)) + spawn(0) + switch(alert(G,"Do you wish to be considered for a nuke team being sent in?","Please answer in 30 seconds!","Yes","No")) + if("Yes") + if((world.time-time_passed)>300)//If more than 30 game seconds passed. + return + candidates += G + if("No") + return + else + return sleep(300) @@ -328,16 +331,17 @@ client/proc/one_click_antag() //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. for(var/mob/G in respawnable_list) - spawn(0) - switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No")) - if("Yes") - if((world.time-time_passed)>300)//If more than 30 game seconds passed. + if(!jobban_isbanned(G, "Syndicate")) + spawn(0) + switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No")) + if("Yes") + if((world.time-time_passed)>300)//If more than 30 game seconds passed. + return + candidates += G + if("No") + return + else return - candidates += G - if("No") - return - else - return sleep(300) for(var/mob/dead/observer/G in candidates) @@ -445,16 +449,19 @@ client/proc/one_click_antag() //Generates a list of candidates from active ghosts. for(var/mob/G in respawnable_list) - spawn(0) - switch(alert(G,"Do you wish to be considered for a vox raiding party arriving on the station?","Please answer in 30 seconds!","Yes","No")) - if("Yes") - if((world.time-time_passed)>300)//If more than 30 game seconds passed. - return - candidates += G - if("No") - return - else - return + if(G.client.prefs.be_special & BE_RAIDER) + if(player_old_enough_antag(G.client,BE_RAIDER)) + if(!jobban_isbanned(G, "raider") && !jobban_isbanned(G, "Syndicate")) + spawn(0) + switch(alert(G,"Do you wish to be considered for a vox raiding party arriving on the station?","Please answer in 30 seconds!","Yes","No")) + if("Yes") + if((world.time-time_passed)>300)//If more than 30 game seconds passed. + return + candidates += G + if("No") + return + else + return sleep(300) //Debug. @@ -532,4 +539,36 @@ client/proc/one_click_antag() ticker.mode.traitors += new_vox.mind new_vox.equip_vox_raider() - return new_vox \ No newline at end of file + return new_vox + +/datum/admins/proc/makeVampires() + + var/datum/game_mode/vampire/temp = new + if(config.protect_roles_from_antagonist) + temp.restricted_jobs += temp.protected_jobs + + var/list/mob/living/carbon/human/candidates = list() + var/mob/living/carbon/human/H = null + + for(var/mob/living/carbon/human/applicant in player_list) + if(applicant.client.prefs.be_special & BE_VAMPIRE) + if(player_old_enough_antag(applicant.client,BE_VAMPIRE)) + if(!applicant.stat) + if(applicant.mind) + if (!applicant.mind.special_role) + if(!jobban_isbanned(applicant, "vampire") && !jobban_isbanned(applicant, "Syndicate")) + if(!(applicant.job in temp.restricted_jobs)) + if(!(applicant.client.prefs.species in temp.protected_species)) + candidates += applicant + + if(candidates.len) + var/numVampires = min(candidates.len, 3) + + for(var/i = 0, iA pressure hole has been bored to [bombtank] valve. \The [bombtank] can now be ignited.
" else status = 0 diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index c8a2b81facd..a39cd4dc97b 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -3,7 +3,7 @@ icon = 'icons/obj/assemblies/new_assemblies.dmi' icon_state = "holder" item_state = "assembly" - flags = FPRINT | CONDUCT + flags = CONDUCT throwforce = 5 w_class = 2.0 throw_speed = 3 diff --git a/code/modules/assembly/shock_kit.dm b/code/modules/assembly/shock_kit.dm index 6b34017704c..20a606113b2 100644 --- a/code/modules/assembly/shock_kit.dm +++ b/code/modules/assembly/shock_kit.dm @@ -7,7 +7,7 @@ var/obj/item/device/radio/electropack/part2 = null var/status = 0 w_class = 5.0 - flags = FPRINT | CONDUCT + flags = CONDUCT /obj/item/assembly/shock_kit/Destroy() del(part1) diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 7f2d7c8f731..4d24559ef0c 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -3,8 +3,8 @@ desc = "Used to remotely activate devices." icon_state = "signaller" item_state = "signaler" - m_amt = 1000 - g_amt = 200 + m_amt = 400 + g_amt = 120 origin_tech = "magnets=1" wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE diff --git a/code/modules/awaymissions/bluespaceartillery.dm b/code/modules/awaymissions/bluespaceartillery.dm index 06dfa6b5bcf..03509d38ac3 100644 --- a/code/modules/awaymissions/bluespaceartillery.dm +++ b/code/modules/awaymissions/bluespaceartillery.dm @@ -42,7 +42,7 @@ if (usr.stat || usr.restrained()) return if(src.reload < 180) return if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - command_alert("Bluespace artillery fire detected. Brace for impact.") + command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.") message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1) var/list/L = list() for(var/turf/T in get_area_turfs(thearea.type)) @@ -55,7 +55,7 @@ var/A A = input("Area to jump bombard", "Open Fire", A) in teleportlocs var/area/thearea = teleportlocs[A] - command_alert("Bluespace artillery fire detected. Brace for impact.") + command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.") spawn(30) var/list/L = list() diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 12601237d79..dfb6b4092d2 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -2,38 +2,38 @@ var/list/preferences_datums = list() -var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm +var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm. THE ORDER MATTERS //some autodetection here. - "pAI" = 1, // 0 - "traitor" = IS_MODE_COMPILED("traitor"), // 1 - "changeling" = IS_MODE_COMPILED("changeling"), // 2 - "vampire" = IS_MODE_COMPILED("vampire"), // 3 - "revolutionary" = IS_MODE_COMPILED("revolution"), // 4 - "blob" = IS_MODE_COMPILED("blob"), // 5 - "operative" = IS_MODE_COMPILED("nuclear"), // 6 - "cultist" = IS_MODE_COMPILED("cult"), // 7 - "wizard" = IS_MODE_COMPILED("wizard"), // 8 - "raider" = IS_MODE_COMPILED("heist"), // 9 - "alien" = 1, // 10 - "ninja" = 1, // 11 - "mutineer" = IS_MODE_COMPILED("mutiny"), // 12 - "malf AI" = IS_MODE_COMPILED("malfunction") // 13 + "traitor" = IS_MODE_COMPILED("traitor"), // 1 / 1 + "operative" = IS_MODE_COMPILED("nuclear"), // 2 / 2 + "changeling" = IS_MODE_COMPILED("changeling"), // 4 / 3 + "wizard" = IS_MODE_COMPILED("wizard"), // 8 / 4 + "malf AI" = IS_MODE_COMPILED("malfunction"), // 16 / 5 + "revolutionary" = IS_MODE_COMPILED("revolution"), // 32 / 6 + "alien" = 1, // 62 / 7 + "pAI" = 1, // 128 / 8 + "cultist" = IS_MODE_COMPILED("cult"), // 256 / 9 + "ninja" = 1, // 512 / 10 + "raider" = IS_MODE_COMPILED("heist"), // 1024 / 11 + "vampire" = IS_MODE_COMPILED("vampire"), // 2048 / 12 + "mutineer" = IS_MODE_COMPILED("mutiny"), // 4096 / 13 + "blob" = IS_MODE_COMPILED("blob") // 8192 / 14 ) var/global/list/special_role_times = list( //minimum age (in days) for accounts to play these roles - num2text(BE_TRAITOR) = 14, - num2text(BE_OPERATIVE) = 21, + num2text(BE_PAI) = 0, + num2text(BE_TRAITOR) = 7, num2text(BE_CHANGELING) = 14, - num2text(BE_WIZARD) = 21, - num2text(BE_MALF) = 30, + num2text(BE_WIZARD) = 14, num2text(BE_REV) = 14, - num2text(BE_ALIEN) = 21, - num2text(BE_PAI) = 0, - num2text(BE_CULTIST) = 21, - num2text(BE_NINJA) = 21, - num2text(BE_RAIDER) = 21, num2text(BE_VAMPIRE) = 14, + num2text(BE_BLOB) = 14, + num2text(BE_OPERATIVE) = 21, + num2text(BE_CULTIST) = 21, + num2text(BE_RAIDER) = 21, + num2text(BE_ALIEN) = 21, + num2text(BE_NINJA) = 21, num2text(BE_MUTINEER) = 21, - num2text(BE_BLOB) = 14 + num2text(BE_MALF) = 30 ) /proc/player_old_enough_antag(client/C, role) diff --git a/code/modules/client/preferences_mysql.dm b/code/modules/client/preferences_mysql.dm index c4f86593d10..d50d5725bd2 100644 --- a/code/modules/client/preferences_mysql.dm +++ b/code/modules/client/preferences_mysql.dm @@ -28,7 +28,7 @@ be_special = sanitize_integer(be_special, 0, 65535, initial(be_special)) default_slot = sanitize_integer(default_slot, 1, MAX_SAVE_SLOTS, initial(default_slot)) toggles = sanitize_integer(toggles, 0, 65535, initial(toggles)) - sound = sanitize_integer(sound, 0, 65535, initial(toggles)) + sound = sanitize_integer(sound, 0, 65535, initial(sound)) UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color)) UI_style_alpha = sanitize_integer(UI_style_alpha, 0, 255, initial(UI_style_alpha)) randomslot = sanitize_integer(randomslot, 0, 1, initial(randomslot)) @@ -186,7 +186,7 @@ firstquery.Execute() while(firstquery.NextRow()) if(text2num(firstquery.item[1]) == default_slot) - var/DBQuery/query = dbcon.NewQuery("UPDATE characters SET OOC_Notes='[sql_sanitize_text(metadata)]',real_name='[sql_sanitize_text(real_name)]',name_is_always_random='[be_random_name]',gender='[gender]',age='[age]',species='[sql_sanitize_text(species)]',language='[sql_sanitize_text(language)]',hair_red='[r_hair]',hair_green='[g_hair]',hair_blue='[b_hair]',facial_red='[r_facial]',facial_green='[g_facial]',facial_blue='[b_facial]',skin_tone='[s_tone]',skin_red='[r_skin]',skin_green='[g_skin]',skin_blue='[b_skin]',hair_style_name='[sql_sanitize_text(h_style)]',facial_style_name='[sql_sanitize_text(f_style)]',eyes_red='[r_eyes]',eyes_green='[g_eyes]',eyes_blue='[b_eyes]',underwear='[underwear]',undershirt='[undershirt]',backbag='[backbag]',b_type='[b_type]',alternate_option='[alternate_option]',job_support_high='[job_support_high]',job_support_med='[job_support_med]',job_support_low='[job_support_low]',job_medsci_high='[job_medsci_high]',job_medsci_med='[job_medsci_med]',job_medsci_low='[job_medsci_low]',job_engsec_high='[job_engsec_high]',job_engsec_med='[job_engsec_med]',job_engsec_low='[job_engsec_low]',job_karma_high='[job_karma_high]',job_karma_med='[job_karma_med]',job_karma_low='[job_karma_low]',flavor_text='[sql_sanitize_text(flavor_text)]',med_record='[sql_sanitize_text(med_record)]',sec_record='[sql_sanitize_text(sec_record)]',gen_record='[sql_sanitize_text(gen_record)]',player_alt_titles='[sql_sanitize_text(playertitlelist)]',be_special='[be_special]',disabilities='[disabilities]',organ_data='[organlist]',nanotrasen_relation='[nanotrasen_relation]', speciesprefs='[speciesprefs]' WHERE ckey='[C.ckey]' AND slot='[default_slot]'") + var/DBQuery/query = dbcon.NewQuery("UPDATE characters SET OOC_Notes='[sql_sanitize_text(metadata)]',real_name='[sql_sanitize_text(real_name)]',name_is_always_random='[be_random_name]',gender='[gender]',age='[age]',species='[sql_sanitize_text(species)]',language='[sql_sanitize_text(language)]',hair_red='[r_hair]',hair_green='[g_hair]',hair_blue='[b_hair]',facial_red='[r_facial]',facial_green='[g_facial]',facial_blue='[b_facial]',skin_tone='[s_tone]',skin_red='[r_skin]',skin_green='[g_skin]',skin_blue='[b_skin]',hair_style_name='[sql_sanitize_text(h_style)]',facial_style_name='[sql_sanitize_text(f_style)]',eyes_red='[r_eyes]',eyes_green='[g_eyes]',eyes_blue='[b_eyes]',underwear='[underwear]',undershirt='[undershirt]',backbag='[backbag]',b_type='[b_type]',alternate_option='[alternate_option]',job_support_high='[job_support_high]',job_support_med='[job_support_med]',job_support_low='[job_support_low]',job_medsci_high='[job_medsci_high]',job_medsci_med='[job_medsci_med]',job_medsci_low='[job_medsci_low]',job_engsec_high='[job_engsec_high]',job_engsec_med='[job_engsec_med]',job_engsec_low='[job_engsec_low]',job_karma_high='[job_karma_high]',job_karma_med='[job_karma_med]',job_karma_low='[job_karma_low]',flavor_text='[sql_sanitize_text(flavor_text)]',med_record='[sql_sanitize_text(med_record)]',sec_record='[sql_sanitize_text(sec_record)]',gen_record='[sql_sanitize_text(gen_record)]',player_alt_titles='[playertitlelist]',be_special='[be_special]',disabilities='[disabilities]',organ_data='[organlist]',nanotrasen_relation='[nanotrasen_relation]', speciesprefs='[speciesprefs]' WHERE ckey='[C.ckey]' AND slot='[default_slot]'") if(!query.Execute()) var/err = query.ErrorMsg() log_game("SQL ERROR during character slot saving. Error : \[[err]\]\n") diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 6574a027f3e..86905b08b8a 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -79,20 +79,20 @@ ..() return - if(!canremove) + if(flags & NODROP) return var/obj/item/clothing/ears/O if(slot_flags & SLOT_TWOEARS ) O = (H.l_ear == src ? H.r_ear : H.l_ear) - user.u_equip(O) + user.unEquip(O) if(!istype(src,/obj/item/clothing/ears/offear)) del(O) O = src else O = src - user.u_equip(src) + user.unEquip(src) if (O) user.put_in_hands(O) @@ -267,7 +267,6 @@ BLIND // can't see anything icon = 'icons/obj/clothing/suits.dmi' name = "suit" var/fire_resist = T0C+100 - flags = FPRINT | TABLEPASS allowed = list(/obj/item/weapon/tank/emergency_oxygen) armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) slot_flags = SLOT_OCLOTHING @@ -281,7 +280,7 @@ BLIND // can't see anything name = "Space helmet" icon_state = "space" desc = "A special helmet designed for work in a hazardous, low-pressure environment." - flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE + flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE item_state = "s_helmet" permeability_coefficient = 0.01 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50) @@ -302,7 +301,7 @@ BLIND // can't see anything w_class = 4//bulky item gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 - flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE + flags = STOPSPRESSUREDMAGE body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit) slowdown = 2 @@ -321,7 +320,6 @@ BLIND // can't see anything name = "under" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS permeability_coefficient = 0.90 - flags = FPRINT | TABLEPASS slot_flags = SLOT_ICLOTHING armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) var/has_sensor = 1//For the crew computer 2 = unable to change mode @@ -390,10 +388,10 @@ BLIND // can't see anything if (!( usr.restrained() ) && !( usr.stat ) && ( over_object )) switch(over_object.name) if("r_hand") - usr.u_equip(src) + usr.unEquip(src) usr.put_in_r_hand(src) if("l_hand") - usr.u_equip(src) + usr.unEquip(src) usr.put_in_l_hand(src) src.add_fingerprint(usr) return diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 4add6b97783..c787b1a17c5 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -35,7 +35,7 @@ desc = "An implanted replacement for a left eye with meson vision capabilities." icon_state = "cybereye-green" item_state = "eyepatch" - canremove = 0 + flags = NODROP /obj/item/clothing/glasses/science name = "Science Goggles" @@ -88,7 +88,7 @@ desc = "An implanted replacement for a left eye with material vision capabilities." icon_state = "cybereye-blue" item_state = "eyepatch" - canremove = 0 + flags = NODROP /obj/item/clothing/glasses/regular name = "Prescription Glasses" @@ -293,4 +293,4 @@ desc = "An implanted replacement for a left eye with thermal vision capabilities." icon_state = "cybereye-red" item_state = "eyepatch" - canremove = 0 + flags = NODROP diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index 0ecd6fee1cf..42b985289a7 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -3,7 +3,6 @@ name = "hard hat" desc = "A piece of headgear used in dangerous working conditions to protect the head. Comes with a built-in flashlight." icon_state = "hardhat0_yellow" - flags = FPRINT | TABLEPASS item_state = "hardhat0_yellow" var/brightness_on = 4 //luminosity when on var/on = 0 @@ -48,7 +47,7 @@ item_state = "hardhat0_red" _color = "red" name = "firefighter helmet" - flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE + flags = STOPSPRESSUREDMAGE heat_protection = HEAD max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE cold_protection = HEAD @@ -58,7 +57,7 @@ icon_state = "hardhat0_white" item_state = "hardhat0_white" _color = "white" - flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE + flags = STOPSPRESSUREDMAGE heat_protection = HEAD max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE cold_protection = HEAD @@ -76,7 +75,7 @@ _color = "atmos" name = "atmospheric technician's firefighting helmet" desc = "A firefighter's helmet, able to keep the user cool in any situation." - flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE + flags = STOPSPRESSUREDMAGE flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE heat_protection = HEAD max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 31c58f8a943..c8d1f5d32c5 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -2,7 +2,7 @@ name = "helmet" desc = "Standard Security gear. Protects the head from impacts." icon_state = "helmet" - flags = FPRINT | TABLEPASS | HEADCOVERSEYES | HEADBANGPROTECT + flags = HEADCOVERSEYES | HEADBANGPROTECT item_state = "helmet" armor = list(melee = 50, bullet = 15, laser = 50,energy = 10, bomb = 25, bio = 0, rad = 0) flags_inv = HIDEEARS|HIDEEYES @@ -25,7 +25,7 @@ desc = "It's a helmet specifically designed to protect against close range attacks." icon_state = "riot" item_state = "helmet" - flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|HEADBANGPROTECT + flags = HEADCOVERSEYES | HEADCOVERSMOUTH | HEADBANGPROTECT armor = list(melee = 82, bullet = 15, laser = 5,energy = 5, bomb = 5, bio = 2, rad = 0) flags_inv = HIDEEARS siemens_coefficient = 0.7 @@ -34,7 +34,7 @@ name = "\improper SWAT helmet" desc = "They're often used by highly trained Swat Members." icon_state = "swat" - flags = FPRINT | TABLEPASS | HEADCOVERSEYES + flags = HEADCOVERSEYES item_state = "swat" armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 10, rad = 0) flags_inv = HIDEEARS|HIDEEYES @@ -54,7 +54,7 @@ name = "\improper Thunderdome helmet" desc = "'Let the battle commence!'" icon_state = "thunderdome" - flags = FPRINT | TABLEPASS | HEADCOVERSEYES + flags = HEADCOVERSEYES item_state = "thunderdome" armor = list(melee = 80, bullet = 60, laser = 50,energy = 10, bomb = 25, bio = 10, rad = 0) cold_protection = HEAD @@ -81,7 +81,7 @@ name = "gladiator helmet" desc = "Ave, Imperator, morituri te salutant." icon_state = "gladiator" - flags = FPRINT|TABLEPASS|HEADCOVERSEYES|BLOCKHAIR + flags = HEADCOVERSEYES | BLOCKHAIR item_state = "gladiator" flags_inv = HIDEMASK|HIDEEARS|HIDEEYES siemens_coefficient = 1 @@ -91,7 +91,7 @@ obj/item/clothing/head/helmet/redtaghelm name = "red laser tag helmet" desc = "They have chosen their own end." icon_state = "redtaghelm" - flags = FPRINT|TABLEPASS|HEADCOVERSEYES + flags = HEADCOVERSEYES item_state = "redtaghelm" armor = list(melee = 30, bullet = 10, laser = 20,energy = 10, bomb = 20, bio = 0, rad = 0) // Offer about the same protection as a hardhat. @@ -101,7 +101,7 @@ obj/item/clothing/head/helmet/bluetaghelm name = "blue laser tag helmet" desc = "They'll need more men." icon_state = "bluetaghelm" - flags = FPRINT|TABLEPASS|HEADCOVERSEYES + flags = HEADCOVERSEYES item_state = "bluetaghelm" armor = list(melee = 30, bullet = 10, laser = 20,energy = 10, bomb = 20, bio = 0, rad = 0) // Offer about the same protection as a hardhat. diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index e45e2556c7c..2908b473709 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -6,7 +6,6 @@ icon_state = "chef" item_state = "chef" desc = "The commander in chef's head wear." - flags = FPRINT | TABLEPASS siemens_coefficient = 0.9 loose = 35 // why-a do people always push-a me over @@ -15,7 +14,6 @@ name = "captain's hat" icon_state = "captain" desc = "It's good being the king." - flags = FPRINT|TABLEPASS item_state = "caphat" siemens_coefficient = 0.9 armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) @@ -32,7 +30,6 @@ name = "head of personnel's cap" icon_state = "hopcap" desc = "The symbol of true bureaucratic micromanagement." - flags = FPRINT|TABLEPASS siemens_coefficient = 0.9 armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) loose = 43 // not the answer @@ -42,7 +39,7 @@ name = "chaplain's hood" desc = "It's hood that covers the head. It keeps you warm during the space winters." icon_state = "chaplain_hood" - flags = FPRINT|TABLEPASS|HEADCOVERSEYES|BLOCKHAIR + flags = HEADCOVERSEYES | BLOCKHAIR siemens_coefficient = 0.9 loose = 2 @@ -51,7 +48,7 @@ name = "nun hood" desc = "Maximum piety in this star system." icon_state = "nun_hood" - flags = FPRINT|TABLEPASS|HEADCOVERSEYES|BLOCKHAIR + flags = HEADCOVERSEYES | BLOCKHAIR siemens_coefficient = 0.9 loose = 2 @@ -68,7 +65,6 @@ name = "beret" desc = "A beret, an artists favorite headwear." icon_state = "beret" - flags = FPRINT | TABLEPASS siemens_coefficient = 0.9 loose = 16 @@ -77,7 +73,6 @@ name = "head of security cap" desc = "The robust standard-issue cap of the Head of Security. For showing the officers who's in charge." icon_state = "hoscap" - flags = FPRINT | TABLEPASS armor = list(melee = 80, bullet = 60, laser = 50, energy = 10, bomb = 25, bio = 10, rad = 0) /obj/item/clothing/head/HoS/beret @@ -89,7 +84,6 @@ name = "warden's police hat" desc = "It's a special armored hat issued to the Warden of a security force. Protects the head from impacts." icon_state = "policehelm" - flags = FPRINT | TABLEPASS armor = list(melee = 60, bullet = 5, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) /obj/item/clothing/head/customs @@ -98,14 +92,12 @@ icon_state = "customshelm" item_state = "customshelm" armor = list(melee = 30, bullet = 25, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) - flags = FPRINT | TABLEPASS /obj/item/clothing/head/beret/sec name = "security beret" desc = "A beret with the security insignia emblazoned on it. For officers that are more inclined towards style than safety." icon_state = "beret_badge" armor = list(melee = 30, bullet = 25, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) - flags = FPRINT | TABLEPASS /obj/item/clothing/head/beret/sec/warden name = "warden's beret" @@ -117,14 +109,13 @@ name = "engineering beret" desc = "A beret with the engineering insignia emblazoned on it. For engineers that are more inclined towards style than safety." icon_state = "e_beret_badge" - flags = FPRINT | TABLEPASS //Medical /obj/item/clothing/head/surgery name = "surgical cap" desc = "A cap surgeons wear during operations. Keeps their hair from tickling your internal organs." icon_state = "surgcap_blue" - flags = FPRINT | TABLEPASS | BLOCKHEADHAIR + flags = BLOCKHEADHAIR loose = 13 /obj/item/clothing/head/surgery/purple diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 4f07b12eb37..08afc9b5df9 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -4,7 +4,6 @@ name = "\improper CentComm. hat" icon_state = "centcom" desc = "It's good to be emperor." - flags = FPRINT|TABLEPASS item_state = "centhat" armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) siemens_coefficient = 0.9 @@ -14,7 +13,6 @@ icon_state = "hairflower" desc = "Smells nice." item_state = "hairflower" - flags = FPRINT|TABLEPASS /obj/item/clothing/head/hairflower/purple icon_state = "hairflowerp" @@ -34,7 +32,6 @@ desc = "It's an amish looking hat." icon_state = "tophat" item_state = "that" - flags = FPRINT|TABLEPASS siemens_coefficient = 0.9 loose = 70 @@ -42,21 +39,18 @@ name = "redcoat's hat" icon_state = "redcoat" desc = "'I guess it's a redhead.'" - flags = FPRINT | TABLEPASS loose = 45 /obj/item/clothing/head/mailman name = "mailman's hat" icon_state = "mailman" desc = "'Right-on-time' mail service head wear." - flags = FPRINT | TABLEPASS loose = 65 /obj/item/clothing/head/plaguedoctorhat name = "plague doctor's hat" desc = "These were once used by Plague doctors. They're pretty much useless." icon_state = "plaguedoctor" - flags = FPRINT | TABLEPASS permeability_coefficient = 0.01 siemens_coefficient = 0.9 loose = 30 @@ -65,14 +59,13 @@ name = "hastur's hood" desc = "It's unspeakably stylish" icon_state = "hasturhood" - flags = FPRINT|TABLEPASS|HEADCOVERSEYES|BLOCKHAIR + flags = HEADCOVERSEYES | BLOCKHAIR loose = 1 /obj/item/clothing/head/nursehat name = "nurse's hat" desc = "It allows quick identification of trained medical personnel." icon_state = "nursehat" - flags = FPRINT|TABLEPASS siemens_coefficient = 0.9 loose = 80 // allowing for awkward come-ons when he/she drops his/her hat and you get it for him/her. @@ -81,7 +74,7 @@ icon_state = "syndicate-helm-black-red" item_state = "syndicate-helm-black-red" desc = "A plastic replica of a syndicate agent's space helmet, you'll look just like a real murderous syndicate agent in this! This is a toy, it is not made for use in space!" - flags = FPRINT | TABLEPASS | BLOCKHAIR + flags = BLOCKHAIR flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE siemens_coefficient = 2.0 loose = 15 // not a very good replica @@ -90,7 +83,7 @@ name = "cueball helmet" desc = "A large, featureless white orb mean to be worn on your head. How do you even see out of this thing?" icon_state = "cueball" - flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR item_state="cueball" flags_inv = 0 loose = 0 @@ -100,7 +93,6 @@ desc = "It's an amish looking armored top hat." icon_state = "tophat" item_state = "that" - flags = FPRINT|TABLEPASS flags_inv = 0 loose = 70 @@ -110,7 +102,6 @@ desc = "It's a green bandana with some fine nanotech lining." icon_state = "greenbandana" item_state = "greenbandana" - flags = FPRINT|TABLEPASS flags_inv = 0 loose = 1 @@ -119,7 +110,7 @@ desc = "A helmet made out of a box." icon_state = "cardborg_h" item_state = "cardborg_h" - flags = FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH + flags = HEADCOVERSEYES | HEADCOVERSMOUTH flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE loose = 20 @@ -128,7 +119,7 @@ desc = "fight for what's righteous!" icon_state = "justicered" item_state = "justicered" - flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR loose = 0 /obj/item/clothing/head/justice/blue @@ -151,7 +142,6 @@ name = "rabbit ears" desc = "Wearing these makes you looks useless, and only good for your sex appeal." icon_state = "bunny" - flags = FPRINT | TABLEPASS loose = 4 /obj/item/clothing/head/flatcap @@ -190,28 +180,24 @@ icon_state = "bowler_hat" item_state = "bowler_hat" desc = "For that industrial age look." - flags = FPRINT|TABLEPASS /obj/item/clothing/head/beaverhat name = "beaver hat" icon_state = "beaver_hat" item_state = "beaver_hat" desc = "Like a top hat, but made of beavers." - flags = FPRINT|TABLEPASS /obj/item/clothing/head/boaterhat name = "boater hat" icon_state = "boater_hat" item_state = "boater_hat" desc = "Goes well with celery." - flags = FPRINT|TABLEPASS /obj/item/clothing/head/fedora name = "\improper fedora" icon_state = "fedora" item_state = "fedora" desc = "A great hat ruined by being within fifty yards of you." - flags = FPRINT|TABLEPASS //TIPS FEDORA /obj/item/clothing/head/fedora/verb/tip_fedora() @@ -226,7 +212,6 @@ icon_state = "fez" item_state = "fez" desc = "Put it on your monkey, make lots of cash money." - flags = FPRINT|TABLEPASS //end bs12 hats @@ -235,7 +220,7 @@ desc = "Eeeee~heheheheheheh!" icon_state = "witch" item_state = "witch" - flags = FPRINT | TABLEPASS | BLOCKHAIR + flags = BLOCKHAIR siemens_coefficient = 2.0 loose = 1 @@ -244,7 +229,7 @@ desc = "Bkaw!" icon_state = "chickenhead" item_state = "chickensuit" - flags = FPRINT | TABLEPASS | BLOCKHAIR + flags = BLOCKHAIR siemens_coefficient = 2.0 /obj/item/clothing/head/corgi @@ -252,7 +237,7 @@ desc = "Woof!" icon_state = "corgihead" item_state = "chickensuit" - flags = FPRINT | TABLEPASS | BLOCKHAIR + flags = BLOCKHAIR siemens_coefficient = 2.0 /obj/item/clothing/head/bearpelt @@ -260,7 +245,7 @@ desc = "Fuzzy." icon_state = "bearpelt" item_state = "bearpelt" - flags = FPRINT | TABLEPASS | BLOCKHAIR + flags = BLOCKHAIR siemens_coefficient = 2.0 loose = 0 // grrrr @@ -269,7 +254,7 @@ icon_state = "xenos" item_state = "xenos_helm" desc = "A helmet made out of chitinous alien hide." - flags = FPRINT | TABLEPASS | BLOCKHAIR + flags = BLOCKHAIR flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE siemens_coefficient = 2.0 @@ -278,7 +263,6 @@ icon_state = "crown" item_state = "crown" desc = "A gliterring bananium crown with spessjewels in it. Swaggy." - flags = FPRINT | TABLEPASS /obj/item/clothing/head/fedora @@ -300,7 +284,7 @@ desc = "The typical clown soldier's helmet." icon_state = "stalhelm" item_state = "stalhelm" - flags = FPRINT | TABLEPASS | BLOCKHAIR + flags = BLOCKHAIR flags_inv = HIDEEARS /obj/item/clothing/head/panzer @@ -308,14 +292,14 @@ desc = "The softcap worn by HONK Mech pilots." icon_state = "panzercap" item_state = "panzercap" - flags = FPRINT | TABLEPASS | BLOCKHAIR + flags = BLOCKHAIR /obj/item/clothing/head/naziofficer name = "Clown Officer Cap" desc = "The peaked clown officer's cap, disturbingly similar to the warden's." icon_state = "officercap" item_state = "officercap" - flags = FPRINT | TABLEPASS | BLOCKHAIR + flags = BLOCKHAIR flags_inv = HIDEEARS /obj/item/clothing/head/beret/purple @@ -323,19 +307,16 @@ desc = " A purple beret, with a small golden crescent moon sewn onto it." icon_state = "purpleberet" item_state = "purpleberet" - flags = FPRINT | TABLEPASS /obj/item/clothing/head/beret/centcom/officer name = "officers beret" desc = "A black beret adorned with the shield—a silver kite shield with an engraved sword—of the Nanotrasen security forces, announcing to the world that the wearer is a defender of Nanotrasen." icon_state = "centcomofficerberet" - flags = FPRINT | TABLEPASS /obj/item/clothing/head/beret/centcom/captain name = "captains beret" desc = "A white beret adorned with the shield—a cobalt kite shield with an engraved sword—of the Nanotrasen security forces, worn only by those captaining a vessel of the Nanotrasen Navy." icon_state = "centcomcaptain" - flags = FPRINT | TABLEPASS /obj/item/clothing/head/sombrero name = "sombrero" @@ -354,4 +335,4 @@ icon_state = "shamebrero" item_state = "shamebrero" desc = "Once it's on, it never comes off." - canremove = 0 \ No newline at end of file + flags = NODROP \ No newline at end of file diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 80f321c4faf..92d71afc888 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -15,7 +15,7 @@ name = "welding helmet" desc = "A head-mounted face cover designed to protect the wearer completely from space-arc eye." icon_state = "welding" - flags = (FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH) + flags = HEADCOVERSEYES | HEADCOVERSMOUTH item_state = "welding" m_amt = 1750 g_amt = 400 @@ -60,7 +60,7 @@ name = "cake-hat" desc = "It's tasty looking!" icon_state = "cake0" - flags = FPRINT|TABLEPASS|HEADCOVERSEYES + flags = HEADCOVERSEYES var/onfire = 0.0 var/status = 0 var/fire_resist = T0C+1300 //this is the max temp it can stand before you start to cook. although it might not burn away, you take damage @@ -128,7 +128,7 @@ icon_state = "hardhat0_pumpkin"//Could stand to be renamed item_state = "hardhat0_pumpkin" _color = "pumpkin" - flags = FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR + flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE action_button_name = "Toggle Pumpkin Light" @@ -143,7 +143,6 @@ icon_state = "hardhat0_reindeer" item_state = "hardhat0_reindeer" _color = "reindeer" - flags = FPRINT | TABLEPASS flags_inv = 0 action_button_name = "Toggle Nose Light" armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) @@ -157,7 +156,6 @@ name = "kitty ears" desc = "A pair of kitty ears. Meow!" icon_state = "kitty" - flags = FPRINT | TABLEPASS var/icon/mob siemens_coefficient = 1.5 loose = 33 diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm index 1020f95c79c..1f88aaa231c 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 baseball hat in a tasteless yellow colour." icon_state = "cargosoft" - flags = FPRINT|TABLEPASS item_state = "helmet" _color = "cargo" var/flipped = 0 diff --git a/code/modules/clothing/masks/boxing.dm b/code/modules/clothing/masks/boxing.dm index 1c84e97df5d..169722cac1e 100644 --- a/code/modules/clothing/masks/boxing.dm +++ b/code/modules/clothing/masks/boxing.dm @@ -3,7 +3,7 @@ desc = "LOADSAMONEY" icon_state = "balaclava" item_state = "balaclava" - flags = FPRINT|TABLEPASS|BLOCKHAIR + flags = BLOCKHAIR flags_inv = HIDEFACE w_class = 2 species_fit = list("Vox") @@ -15,7 +15,7 @@ desc = "Worn by robust fighters, flying high to defeat their foes!" icon_state = "luchag" item_state = "luchag" - flags = FPRINT|TABLEPASS|BLOCKHAIR + flags = BLOCKHAIR flags_inv = HIDEFACE w_class = 2 siemens_coefficient = 3.0 diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index 25aff648f63..1dc78de5017 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -3,7 +3,7 @@ name = "breath mask" icon_state = "breath" item_state = "breath" - flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKINTERNALS + flags = MASKCOVERSMOUTH | MASKINTERNALS w_class = 2 gas_transfer_coefficient = 0.10 permeability_coefficient = 0.50 diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 2ad9f030cf2..c728f0d88bb 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -2,7 +2,7 @@ name = "gas mask" desc = "A face-covering mask that can be connected to an air supply." icon_state = "gas_alt" - flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS + flags = MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS flags_inv = HIDEEARS|HIDEEYES|HIDEFACE w_class = 3.0 item_state = "gas_alt" @@ -19,7 +19,7 @@ name = "bane mask" desc = "Only when the station is in flames, do you have my permission to robust." icon_state = "bane_mask" - flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS + flags = MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS flags_inv = HIDEEARS|HIDEEYES|HIDEFACE w_class = 3.0 item_state = "bane_mask" @@ -95,7 +95,7 @@ icon_state = "clown" item_state = "clown_hat" species_fit = list("Vox") - flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS | BLOCKHAIR + flags = MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS | BLOCKHAIR /obj/item/clothing/mask/gas/clown_hat/attack_self(mob/user) @@ -118,7 +118,7 @@ desc = "Some pranksters are truly magical." icon_state = "wizzclown" item_state = "wizzclown" - flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS | BLOCKHAIR + flags = MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS | BLOCKHAIR /obj/item/clothing/mask/gas/virusclown_hat name = "clown wig and mask" diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index b1f7ba41c3b..2639cacaa5d 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -3,7 +3,7 @@ desc = "To stop that awful noise." icon_state = "muzzle" item_state = "muzzle" - flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH + flags = MASKCOVERSMOUTH w_class = 2 gas_transfer_coefficient = 0.90 species_fit = list("Vox") @@ -31,7 +31,7 @@ icon_state = "sterile" item_state = "sterile" w_class = 1 - flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH + flags = MASKCOVERSMOUTH gas_transfer_coefficient = 0.90 permeability_coefficient = 0.01 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 25, rad = 0) @@ -43,7 +43,6 @@ name = "fake moustache" desc = "Warning: moustache is fake." icon_state = "fake-moustache" - flags = FPRINT|TABLEPASS flags_inv = HIDEFACE //scarves (fit in in mask slot) @@ -53,7 +52,7 @@ desc = "A blue neck scarf." icon_state = "blueneckscarf" item_state = "blueneckscarf" - flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH + flags = MASKCOVERSMOUTH w_class = 2 gas_transfer_coefficient = 0.90 @@ -62,7 +61,7 @@ desc = "A red and white checkered neck scarf." icon_state = "redwhite_scarf" item_state = "redwhite_scarf" - flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH + flags = MASKCOVERSMOUTH w_class = 2 gas_transfer_coefficient = 0.90 @@ -71,7 +70,7 @@ desc = "A green neck scarf." icon_state = "green_scarf" item_state = "green_scarf" - flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH + flags = MASKCOVERSMOUTH w_class = 2 gas_transfer_coefficient = 0.90 @@ -80,7 +79,7 @@ desc = "A stealthy, dark scarf." icon_state = "ninja_scarf" item_state = "ninja_scarf" - flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH + flags = MASKCOVERSMOUTH w_class = 2 gas_transfer_coefficient = 0.90 siemens_coefficient = 0 @@ -90,7 +89,7 @@ desc = "A rubber pig mask." icon_state = "pig" item_state = "pig" - flags = FPRINT|TABLEPASS|BLOCKHAIR + flags = BLOCKHAIR flags_inv = HIDEFACE w_class = 2 siemens_coefficient = 0.9 @@ -101,7 +100,7 @@ desc = "A mask made of soft vinyl and latex, representing the head of a horse." icon_state = "horsehead" item_state = "horsehead" - flags = FPRINT|TABLEPASS|BLOCKHAIR + flags = BLOCKHAIR flags_inv = HIDEFACE w_class = 2 siemens_coefficient = 0.9 @@ -112,7 +111,7 @@ /obj/item/clothing/mask/horsehead/equipped(mob/user, slot) - if(!canremove) //cursed masks only + if(flags & NODROP) //cursed masks only originalname = user.real_name if(!user.real_name || user.real_name == "Unknown") user.real_name = "A Horse With No Name" //it felt good to be out of the rain @@ -121,12 +120,12 @@ ..() /obj/item/clothing/mask/horsehead/dropped() //this really shouldn't happen, but call it extreme caution - if(!canremove) + if(flags & NODROP) goodbye_horses(loc) ..() /obj/item/clothing/mask/horsehead/Destroy() - if(!canremove) + if(flags & NODROP) goodbye_horses(loc) ..() @@ -150,4 +149,4 @@ icon_state = "pennywise_mask" item_state = "pennywise_mask" species_fit = list("Vox") - flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS | BLOCKHAIR + flags = MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS | BLOCKHAIR diff --git a/code/modules/clothing/shoes/colour.dm b/code/modules/clothing/shoes/colour.dm index ad1ebc9a96d..2b64c59906b 100644 --- a/code/modules/clothing/shoes/colour.dm +++ b/code/modules/clothing/shoes/colour.dm @@ -93,13 +93,13 @@ if (src.chained) src.chained = null src.slowdown = SHOES_SLOWDOWN - new /obj/item/weapon/handcuffs( user.loc ) + new /obj/item/weapon/restraints/handcuffs( user.loc ) src.icon_state = "orange" return /obj/item/clothing/shoes/orange/attackby(H as obj, loc) ..() - if ((istype(H, /obj/item/weapon/handcuffs) && !( src.chained ))) + if ((istype(H, /obj/item/weapon/restraints/handcuffs) && !( src.chained ))) //H = null if (src.icon_state != "orange") return del(H) diff --git a/code/modules/clothing/spacesuits/alien.dm b/code/modules/clothing/spacesuits/alien.dm index d1d9962393b..3b85dd5299b 100644 --- a/code/modules/clothing/spacesuits/alien.dm +++ b/code/modules/clothing/spacesuits/alien.dm @@ -83,7 +83,7 @@ // Can't be equipped by any other species due to bone structure and vox cybernetics. /obj/item/clothing/suit/space/vox w_class = 3 - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank) slowdown = 2 armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) siemens_coefficient = 0.6 @@ -204,7 +204,7 @@ if(src.magpulse) flags &= ~NOSLIP magpulse = 0 - canremove = 1 + flags |= NODROP user << "You relax your deathgrip on the flooring." else //make sure these can only be used when equipped. @@ -218,7 +218,7 @@ flags |= NOSLIP magpulse = 1 - canremove = 0 //kinda hard to take off magclaws when you are gripping them tightly. + flags &= ~NODROP //kinda hard to take off magclaws when you are gripping them tightly. user << "You dig your claws deeply into the flooring, bracing yourself." user << "It would be hard to take off the [src] without relaxing your grip first." @@ -229,7 +229,7 @@ user.visible_message("The [src] go limp as they are removed from [usr]'s feet.", "The [src] go limp as they are removed from your feet.") flags &= ~NOSLIP magpulse = 0 - canremove = 1 + flags &= ~NODROP /obj/item/clothing/shoes/magboots/vox/examine() set src in view() @@ -259,7 +259,7 @@ /obj/item/clothing/suit/space/plasmaman w_class = 3 - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box/magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box/magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank) slowdown = 2 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 0) heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS @@ -267,13 +267,13 @@ flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE species_restricted = list("Plasmaman") - flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | PLASMAGUARD + flags = STOPSPRESSUREDMAGE | PLASMAGUARD icon_state = "plasmaman_suit" item_state = "plasmaman_suit" /obj/item/clothing/head/helmet/space/plasmaman - flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE | PLASMAGUARD + flags = HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE | PLASMAGUARD species_restricted = list("Plasmaman") icon_state = "plasmaman_helmet0" diff --git a/code/modules/clothing/spacesuits/captain.dm b/code/modules/clothing/spacesuits/captain.dm index 62d21b3688d..9e581c1519e 100644 --- a/code/modules/clothing/spacesuits/captain.dm +++ b/code/modules/clothing/spacesuits/captain.dm @@ -4,7 +4,7 @@ icon_state = "capspace" item_state = "capspacehelmet" desc = "A special helmet designed for work in a hazardous, low-pressure environment. Only for the most fashionable of military figureheads." - flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE|HEADCOVERSMOUTH + flags = HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE|HEADCOVERSMOUTH flags_inv = HIDEFACE permeability_coefficient = 0.01 armor = list(melee = 65, bullet = 50, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 50) @@ -18,9 +18,9 @@ w_class = 4 gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 - flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | ONESIZEFITSALL + flags = STOPSPRESSUREDMAGE | ONESIZEFITSALL body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS - allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) + allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs) slowdown = 1.5 armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT||HIDETAIL diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm index f1875e34de1..4d6035ba2fe 100644 --- a/code/modules/clothing/spacesuits/chronosuit.dm +++ b/code/modules/clothing/spacesuits/chronosuit.dm @@ -139,9 +139,9 @@ if(user.head && istype(user.head, /obj/item/clothing/head/helmet/space/chronos)) user << "\[ ok \] Mounting /dev/helmet" helmet = user.head - helmet.canremove = 0 + helmet.flags |= NODROP helmet.suit = src - src.canremove = 0 + src.flags |= NODROP user << "\[ ok \] Starting brainwave scanner" user << "\[ ok \] Starting ui display driver" user << "\[ ok \] Initializing chronowalk4-view" @@ -169,11 +169,11 @@ user << "\[ ok \] Stopping ui display driver" user << "\[ ok \] Stopping brainwave scanner" user << "\[ ok \] Unmounting /dev/helmet" - helmet.canremove = 1 + helmet.flags &= ~NODROP helmet.suit = null helmet = null user << "logout" - src.canremove = 1 + src.flags &= ~NODROP cooldown = world.time + cooldowntime * 1.5 activated = 0 activating = 0 diff --git a/code/modules/clothing/spacesuits/ert.dm b/code/modules/clothing/spacesuits/ert.dm index 1dd56938504..0d39a13a7b1 100644 --- a/code/modules/clothing/spacesuits/ert.dm +++ b/code/modules/clothing/spacesuits/ert.dm @@ -28,7 +28,7 @@ icon_state = "ert_commander" item_state = "suit-command" w_class = 3 - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank) slowdown = 1 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, \ diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index b47cca56802..5379e5e77ca 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -14,7 +14,7 @@ icon_state = "caparmor" item_state = "capspacesuit" w_class = 4 - allowed = list(/obj/item/weapon/tank, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) + allowed = list(/obj/item/weapon/tank, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs) slowdown = 1 armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50) siemens_coefficient = 0.7 @@ -35,7 +35,7 @@ desc = "A heavily armored, advanced space suit that protects against most forms of damage." icon_state = "deathsquad" item_state = "swat_suit" - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank) armor = list(melee = 80, bullet = 80, laser = 50,energy = 50, bomb = 100, bio = 100, rad = 100) slowdown = 1 max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT @@ -64,7 +64,7 @@ name = "Santa's hat" desc = "Ho ho ho. Merrry X-mas!" icon_state = "santahat" - flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE + flags = HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE /obj/item/clothing/suit/space/santa name = "Santa's suit" @@ -72,7 +72,7 @@ icon_state = "santa" item_state = "santa" slowdown = 0 - flags = FPRINT | TABLEPASS | ONESIZEFITSALL | STOPSPRESSUREDMAGE + flags = ONESIZEFITSALL | STOPSPRESSUREDMAGE allowed = list(/obj/item) //for stuffing exta special presents @@ -83,7 +83,7 @@ icon_state = "pirate" item_state = "pirate" armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) - flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE + flags = HEADCOVERSEYES | BLOCKHAIR | STOPSPRESSUREDMAGE siemens_coefficient = 0.9 /obj/item/clothing/suit/space/pirate @@ -92,7 +92,7 @@ icon_state = "pirate" item_state = "pirate" w_class = 3 - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank) slowdown = 0 armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) siemens_coefficient = 0.9 diff --git a/code/modules/clothing/spacesuits/ninja.dm b/code/modules/clothing/spacesuits/ninja.dm index b1b51684ee0..34df11c3f2c 100644 --- a/code/modules/clothing/spacesuits/ninja.dm +++ b/code/modules/clothing/spacesuits/ninja.dm @@ -14,7 +14,7 @@ desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins." icon_state = "s-ninja" item_state = "s-ninja_suit" - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank,/obj/item/weapon/stock_parts/cell,/obj/item/device/suit_cooling_unit) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank,/obj/item/weapon/stock_parts/cell,/obj/item/device/suit_cooling_unit) slowdown = 0 unacidable = 1 armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) diff --git a/code/modules/clothing/spacesuits/rig.dm b/code/modules/clothing/spacesuits/rig.dm index ce7e86c94ca..af296490df3 100644 --- a/code/modules/clothing/spacesuits/rig.dm +++ b/code/modules/clothing/spacesuits/rig.dm @@ -112,7 +112,7 @@ //TODO: Species check, skull damage for forcing an unfitting helmet on? helmet.loc = H H.equip_to_slot(helmet, slot_head) - helmet.canremove = 0 + helmet.flags |= NODROP if(attached_boots && boots) if(H.shoes) @@ -121,7 +121,7 @@ M << "Your suit's boots deploy with a hiss." boots.loc = H H.equip_to_slot(boots, slot_shoes) - boots.canremove = 0 + boots.flags |= NODROP /obj/item/clothing/suit/space/rig/dropped() ..() @@ -132,16 +132,16 @@ H = helmet.loc if(istype(H)) if(helmet && H.head == helmet) - helmet.canremove = 1 - H.drop_from_inventory(helmet) + helmet.flags &= ~NODROP + H.unEquip(helmet) helmet.loc = src if(boots) H = boots.loc if(istype(H)) if(boots && H.shoes == boots) - boots.canremove = 1 - H.drop_from_inventory(boots) + boots.flags &= ~NODROP + H.unEquip(boots) boots.loc = src /* @@ -206,8 +206,8 @@ if(H.wear_suit != src) return if(H.head == helmet) - helmet.canremove = 1 - H.drop_from_inventory(helmet) + helmet.flags &= ~NODROP + H.unEquip(helmet) helmet.loc = src H << "\blue You retract your hardsuit helmet." else @@ -218,7 +218,7 @@ helmet.loc = H helmet.pickup(H) H.equip_to_slot(helmet, slot_head) - helmet.canremove = 0 + helmet.flags |= NODROP H << "\blue You deploy your hardsuit helmet, sealing you off from the world." /obj/item/clothing/suit/space/rig/attackby(obj/item/W as obj, mob/user as mob) @@ -398,7 +398,7 @@ slowdown = 1 w_class = 3 armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 50) - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box/magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box/magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank) siemens_coefficient = 0.6 species_restricted = list("exclude","Unathi","Tajaran","Skrell","Vox") sprite_sheets = null @@ -469,7 +469,7 @@ desc = "A special suit that protects against hazardous, low pressure environments. Has an additional layer of armor." item_state = "sec_hardsuit" armor = list(melee = 30, bullet = 15, laser = 30, energy = 10, bomb = 10, bio = 100, rad = 50) - allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/handcuffs) + allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/restraints/handcuffs) siemens_coefficient = 0.7 @@ -508,5 +508,5 @@ name = "singuloth knight's armor" desc = "This is a ceremonial armor from the chapter of the Singuloth Knights. It's made of pure forged adamantium." item_state = "singuloth_hardsuit" - flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE + flags = STOPSPRESSUREDMAGE armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 25, bio = 100, rad = 100) diff --git a/code/modules/clothing/spacesuits/syndi.dm b/code/modules/clothing/spacesuits/syndi.dm index a7797fcdc48..894e9ed1cf1 100644 --- a/code/modules/clothing/spacesuits/syndi.dm +++ b/code/modules/clothing/spacesuits/syndi.dm @@ -14,7 +14,7 @@ item_state = "space_suit_syndicate" desc = "Has a tag on it: Totally not property of of a hostile corporation, honest!" w_class = 3 - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank) slowdown = 1 armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) siemens_coefficient = 0.8 diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index d92dabb8535..c642aed8b20 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -1,8 +1,7 @@ /obj/item/clothing/suit/armor - allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/telebaton) + allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/telebaton) body_parts_covered = UPPER_TORSO|LOWER_TORSO - flags = FPRINT | TABLEPASS cold_protection = UPPER_TORSO|LOWER_TORSO min_cold_protection_temperature = ARMOR_MIN_COLD_PROTECTION_TEMPERATURE heat_protection = UPPER_TORSO|LOWER_TORSO @@ -16,7 +15,7 @@ icon_state = "armor" item_state = "armor" blood_overlay_type = "armor" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) /obj/item/clothing/suit/armor/vest/combat @@ -25,7 +24,7 @@ icon_state = "armor-combat" item_state = "bulletproof" blood_overlay_type = "armor" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) /obj/item/clothing/suit/armor/vest/security @@ -146,8 +145,8 @@ icon_state = "detective-armor" item_state = "armor" blood_overlay_type = "armor" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL - allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/device/flashlight,/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder) + flags = ONESIZEFITSALL + allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/device/flashlight,/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder) //Reactive armor @@ -160,7 +159,6 @@ item_state = "reactiveoff" blood_overlay_type = "armor" slowdown = 1 - flags = FPRINT | TABLEPASS icon_action_button = "reactiveoff" armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) @@ -199,7 +197,7 @@ item_state = "centcom" w_class = 4//bulky item body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS - allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) + allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/emergency_oxygen) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm index 18025e077e4..4527c6395c2 100644 --- a/code/modules/clothing/suits/bio.dm +++ b/code/modules/clothing/suits/bio.dm @@ -4,7 +4,7 @@ icon_state = "bio" desc = "A hood that protects the head and face from biological comtaminants." permeability_coefficient = 0.01 - flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES siemens_coefficient = 0.9 @@ -18,7 +18,7 @@ w_class = 4//bulky item gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS slowdown = 1.0 allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/pen,/obj/item/device/flashlight/pen) diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index 7f4b11ef8b2..8672b135934 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -48,7 +48,7 @@ item_state = "bio_suit" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS flags_inv = HIDEJUMPSUIT - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL allowed = list(/obj/item/weapon/disk, /obj/item/weapon/stamp, /obj/item/weapon/reagent_containers/food/drinks/flask, /obj/item/weapon/melee, /obj/item/weapon/storage/lockbox/medal, /obj/item/device/flash, /obj/item/weapon/storage/box/matches, /obj/item/weapon/lighter, /obj/item/clothing/mask/cigarette, /obj/item/weapon/storage/fancy/cigarettes, /obj/item/weapon/tank/emergency_oxygen) species_fit = list("Vox") sprite_sheets = list( @@ -132,11 +132,11 @@ item_state = "det_suit" blood_overlay_type = "coat" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/device/flashlight,/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder) + allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/device/flashlight,/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder) armor = list(melee = 50, bullet = 10, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' @@ -148,7 +148,7 @@ desc = "A forensics technician jacket." item_state = "det_suit" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/device/detective_scanner,/obj/item/device/taperecorder) + allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/detective_scanner,/obj/item/device/taperecorder) armor = list(melee = 10, bullet = 10, laser = 15, energy = 10, bomb = 0, bio = 0, rad = 0) /obj/item/clothing/suit/storage/forensics/red @@ -175,6 +175,14 @@ ) //Lawyer +/obj/item/clothing/suit/storage/lawyer/blackjacket + name = "Black Suit Jacket" + desc = "A snappy dress jacket." + icon_state = "suitjacket_black_open" + item_state = "suitjacket_black_open" + blood_overlay_type = "coat" + body_parts_covered = UPPER_TORSO|ARMS + /obj/item/clothing/suit/storage/lawyer/bluejacket name = "Blue Suit Jacket" desc = "A snappy dress jacket." diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index f2c6ab9eb88..ee53f0293e4 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -36,14 +36,12 @@ desc = "Yarr." icon_state = "pirate_old" item_state = "pirate_old" - flags = FPRINT | TABLEPASS /obj/item/clothing/suit/pirate_black name = "black pirate coat" desc = "Yarr." icon_state = "pirate" item_state = "pirate" - flags = FPRINT | TABLEPASS /obj/item/clothing/suit/hgpirate @@ -51,7 +49,6 @@ desc = "Yarr." icon_state = "hgpirate" item_state = "hgpirate" - flags = FPRINT | TABLEPASS flags_inv = HIDEJUMPSUIT @@ -60,7 +57,7 @@ desc = "Suit for a cyborg costume." icon_state = "death" item_state = "death" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT fire_resist = T0C+5200 flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT @@ -70,7 +67,6 @@ desc = "A Nazi great coat" icon_state = "nazi" item_state = "nazi" - flags = FPRINT | TABLEPASS /obj/item/clothing/suit/johnny_coat @@ -78,7 +74,6 @@ desc = "Johnny~~" icon_state = "johnny" item_state = "johnny" - flags = FPRINT | TABLEPASS /obj/item/clothing/suit/justice @@ -86,7 +81,6 @@ desc = "this pretty much looks ridiculous" icon_state = "justice" item_state = "justice" - flags = FPRINT | TABLEPASS flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT @@ -95,7 +89,6 @@ desc = "This robe commands authority." icon_state = "judge" item_state = "judge" - flags = FPRINT | TABLEPASS body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS allowed = list(/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/spacecash) flags_inv = HIDEJUMPSUIT @@ -124,7 +117,6 @@ item_state = "syndicate-black-red" desc = "A plastic replica of the syndicate space suit, you'll look just like a real murderous syndicate agent in this! This is a toy, it is not made for use in space!" w_class = 3 - flags = FPRINT | TABLEPASS allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/toy) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT @@ -215,7 +207,7 @@ desc = "Forced to live on your shameful acting as a fake Mexican, you and your poncho have grown inseperable. Literally." icon_state = "ponchoshame" item_state = "ponchoshame" - canremove = 0 + flags = NODROP /* * Misc @@ -228,7 +220,7 @@ item_state = "straight_jacket" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|HANDS flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/suit/ianshirt name = "worn shirt" @@ -282,21 +274,18 @@ desc = "A long, thick black leather coat." icon_state = "leathercoat" item_state = "leathercoat" - flags = FPRINT | TABLEPASS /obj/item/clothing/suit/browncoat name = "brown leather coat" desc = "A long, brown leather coat." icon_state = "browncoat" item_state = "browncoat" - flags = FPRINT | TABLEPASS /obj/item/clothing/suit/neocoat name = "black coat" desc = "A flowing, black coat." icon_state = "neocoat" item_state = "neocoat" - flags = FPRINT | TABLEPASS /obj/item/clothing/suit/browntrenchcoat name = "brown trench coat" @@ -318,7 +307,6 @@ desc = "A cream coloured, genteel suit." icon_state = "creamsuit" item_state = "creamsuit" - flags = FPRINT | TABLEPASS //stripper @@ -412,7 +400,7 @@ w_class = 4//bulky item gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/pen,/obj/item/device/flashlight/pen) armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20) @@ -425,7 +413,7 @@ icon_state = "mercy_hood" item_state = "mercy_hood" permeability_coefficient = 0.01 - flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES siemens_coefficient = 0.9 diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 4896840ab1e..ca86eb92755 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -21,7 +21,7 @@ allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/extinguisher) slowdown = 1.0 flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL - flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE + flags = STOPSPRESSUREDMAGE heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS @@ -55,7 +55,7 @@ name = "bomb hood" desc = "Use in case of bomb." icon_state = "bombsuit" - flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR armor = list(melee = 40, bullet = 0, laser = 20,energy = 10, bomb = 100, bio = 0, rad = 0) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES cold_protection = HEAD @@ -74,7 +74,6 @@ w_class = 4//bulky item gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 - flags = FPRINT | TABLEPASS body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS slowdown = 2 armor = list(melee = 40, bullet = 0, laser = 20,energy = 10, bomb = 100, bio = 0, rad = 0) @@ -94,7 +93,7 @@ /obj/item/clothing/suit/bomb_suit/security icon_state = "bombsuitsec" item_state = "bombsuitsec" - allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) + allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs) /* * Radiation protection @@ -103,7 +102,7 @@ name = "Radiation Hood" icon_state = "rad" desc = "A hood with radiation protective properties. Label: Made with lead, do not eat insulation" - flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR + flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 100) loose = 8 diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 1e0682fa5f0..9ba54e57306 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -189,17 +189,7 @@ user.visible_message("\red [user] displays their NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.","\red You display your NanoTrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.") /obj/item/clothing/accessory/holobadge/attackby(var/obj/item/O as obj, var/mob/user as mob) - - if (istype(O, /obj/item/weapon/card/emag)) - if (emagged) - user << "\red [src] is already cracked." - return - else - emagged = 1 - user << "\red You swipe [O] and crack the holobadge security checks." - return - - else if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda)) + if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda)) var/obj/item/weapon/card/id/id_card = null @@ -218,6 +208,15 @@ user << "[src] rejects your insufficient access rights." return ..() + +/obj/item/clothing/accessory/holobadge/emag_act(user as mob) + if (emagged) + user << "\red [src] is already cracked." + return + else + emagged = 1 + user << "\red You swipe the card and crack the holobadge security checks." + return /obj/item/clothing/accessory/holobadge/attack(mob/living/carbon/human/M, mob/living/user) if(isliving(user)) diff --git a/code/modules/clothing/under/accessories/holster.dm b/code/modules/clothing/under/accessories/holster.dm index 12508cc5328..a009c662f4f 100644 --- a/code/modules/clothing/under/accessories/holster.dm +++ b/code/modules/clothing/under/accessories/holster.dm @@ -17,7 +17,7 @@ return 0 else return 1 - + /obj/item/clothing/accessory/holster/attack_self() var/holsteritem = usr.get_active_hand() if(!holstered) @@ -40,7 +40,7 @@ return holstered = W - user.drop_from_inventory(holstered) + user.unEquip(holstered) holstered.loc = src holstered.add_fingerprint(user) user.visible_message("[user] holsters the [holstered].", "You holster the [holstered].") diff --git a/code/modules/clothing/under/color.dm b/code/modules/clothing/under/color.dm index dc292acf7e3..b5f276c2539 100644 --- a/code/modules/clothing/under/color.dm +++ b/code/modules/clothing/under/color.dm @@ -15,7 +15,7 @@ icon_state = "black" item_state = "bl_suit" _color = "black" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/color/blackf name = "feminine black jumpsuit" @@ -29,17 +29,17 @@ icon_state = "blue" item_state = "b_suit" _color = "blue" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/color/blue/dodgeball - canremove = 0 + flags = ONESIZEFITSALL | NODROP /obj/item/clothing/under/color/green name = "green jumpsuit" icon_state = "green" item_state = "g_suit" _color = "green" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/color/grey name = "grey jumpsuit" @@ -47,7 +47,7 @@ icon_state = "grey" item_state = "gy_suit" _color = "grey" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") /obj/item/clothing/under/color/orange @@ -56,7 +56,7 @@ icon_state = "orange" item_state = "o_suit" _color = "orange" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/color/orange/prison name = "orange jumpsuit" @@ -66,7 +66,7 @@ _color = "orange" has_sensor = 2 sensor_mode = 3 - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/color/pink name = "pink jumpsuit" @@ -74,31 +74,31 @@ icon_state = "pink" item_state = "p_suit" _color = "pink" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/color/red name = "red jumpsuit" icon_state = "red" item_state = "r_suit" _color = "red" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/color/red/dodgeball - canremove = 0 + flags = ONESIZEFITSALL | NODROP /obj/item/clothing/under/color/white name = "white jumpsuit" icon_state = "white" item_state = "w_suit" _color = "white" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/color/yellow name = "yellow jumpsuit" icon_state = "yellow" item_state = "y_suit" _color = "yellow" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/psyche name = "psychedelic jumpsuit" @@ -115,7 +115,7 @@ name = "aqua jumpsuit" icon_state = "aqua" _color = "aqua" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/color/purple name = "purple jumpsuit" @@ -142,13 +142,12 @@ name = "light brown jumpsuit" icon_state = "lightbrown" _color = "lightbrown" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/color/brown name = "brown jumpsuit" icon_state = "brown" _color = "brown" - flags = FPRINT | TABLEPASS /obj/item/clothing/under/color/yellowgreen name = "yellow green jumpsuit" @@ -159,7 +158,7 @@ name = "dark blue jumpsuit" icon_state = "darkblue" _color = "darkblue" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/color/lightred name = "light red jumpsuit" @@ -170,4 +169,4 @@ name = "dark red jumpsuit" icon_state = "darkred" _color = "darkred" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL diff --git a/code/modules/clothing/under/jobs/civilian.dm b/code/modules/clothing/under/jobs/civilian.dm index 48085322d6f..6510fff5094 100644 --- a/code/modules/clothing/under/jobs/civilian.dm +++ b/code/modules/clothing/under/jobs/civilian.dm @@ -6,7 +6,7 @@ icon_state = "ba_suit" item_state = "ba_suit" _color = "ba_suit" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -18,7 +18,7 @@ icon_state = "captain" item_state = "caparmor" _color = "captain" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -31,7 +31,7 @@ icon_state = "qm" item_state = "lb_suit" _color = "qm" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -44,7 +44,7 @@ icon_state = "cargotech" item_state = "lb_suit" _color = "cargo" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -57,7 +57,7 @@ icon_state = "chaplain" item_state = "bl_suit" _color = "chapblack" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -69,7 +69,7 @@ name = "chef's uniform" icon_state = "chef" _color = "chef" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -82,7 +82,7 @@ icon_state = "clown" item_state = "clown" _color = "clown" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/rank/head_of_personnel @@ -91,7 +91,7 @@ icon_state = "hop" item_state = "b_suit" _color = "hop" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -103,7 +103,6 @@ icon_state = "hopwhimsy" item_state = "hopwhimsy" _color = "hopwhimsy" - flags = FPRINT | TABLEPASS /obj/item/clothing/under/rank/hydroponics @@ -113,7 +112,7 @@ item_state = "g_suit" _color = "hydroponics" permeability_coefficient = 0.50 - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -126,7 +125,7 @@ icon_state = "internalaffairs" item_state = "internalaffairs" _color = "internalaffairs" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -139,7 +138,7 @@ icon_state = "janitor" _color = "janitor" armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -149,7 +148,7 @@ /obj/item/clothing/under/lawyer desc = "Slick threads." name = "Lawyer suit" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/lawyer/black icon_state = "lawyer_black" @@ -226,7 +225,7 @@ icon_state = "red_suit" item_state = "red_suit" _color = "red_suit" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -239,7 +238,7 @@ icon_state = "mime" item_state = "mime" _color = "mime" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/rank/miner @@ -248,7 +247,7 @@ icon_state = "miner" item_state = "miner" _color = "miner" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' diff --git a/code/modules/clothing/under/jobs/engineering.dm b/code/modules/clothing/under/jobs/engineering.dm index a0539901c5d..75e8f01d7e9 100644 --- a/code/modules/clothing/under/jobs/engineering.dm +++ b/code/modules/clothing/under/jobs/engineering.dm @@ -6,7 +6,7 @@ item_state = "g_suit" _color = "chief" armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -18,7 +18,7 @@ icon_state = "atmos" item_state = "atmos_suit" _color = "atmos" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -31,7 +31,7 @@ item_state = "engi_suit" _color = "engine" armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -43,7 +43,7 @@ icon_state = "robotics" item_state = "robotics" _color = "robotics" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' diff --git a/code/modules/clothing/under/jobs/medsci.dm b/code/modules/clothing/under/jobs/medsci.dm index 1332f80c6eb..93baad2f1a4 100644 --- a/code/modules/clothing/under/jobs/medsci.dm +++ b/code/modules/clothing/under/jobs/medsci.dm @@ -8,7 +8,7 @@ item_state = "g_suit" _color = "director" armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 10, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -22,7 +22,7 @@ _color = "toxinswhite" permeability_coefficient = 0.50 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -36,7 +36,7 @@ _color = "chemistrywhite" permeability_coefficient = 0.50 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -53,7 +53,7 @@ _color = "cmo" permeability_coefficient = 0.50 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -67,7 +67,7 @@ _color = "geneticswhite" permeability_coefficient = 0.50 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -81,7 +81,7 @@ _color = "virologywhite" permeability_coefficient = 0.50 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -95,7 +95,7 @@ _color = "nursesuit" permeability_coefficient = 0.50 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -109,7 +109,7 @@ _color = "nurse" permeability_coefficient = 0.50 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -123,7 +123,7 @@ _color = "orderly" permeability_coefficient = 0.50 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -137,7 +137,7 @@ _color = "medical" permeability_coefficient = 0.50 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -148,7 +148,7 @@ desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in baby blue." icon_state = "scrubsblue" _color = "scrubsblue" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -159,7 +159,7 @@ desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in dark green." icon_state = "scrubsgreen" _color = "scrubsgreen" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -170,7 +170,7 @@ desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in deep purple." icon_state = "scrubspurple" _color = "scrubspurple" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -181,7 +181,7 @@ desc = "It's made of a special fiber that provides minor protection against biohazards. This one is as dark as an emo's poetry." icon_state = "scrubsblack" _color = "scrubsblack" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -196,7 +196,7 @@ _color = "paramedic" permeability_coefficient = 0.50 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 10) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi' @@ -208,7 +208,7 @@ icon_state = "psych" item_state = "w_suit" _color = "psych" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/rank/psych/turtleneck desc = "A turqouise turtleneck and a pair of dark blue slacks, belonging to a psychologist." @@ -216,7 +216,7 @@ icon_state = "psychturtle" item_state = "b_suit" _color = "psychturtle" - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /* @@ -230,7 +230,7 @@ _color = "genetics_new" permeability_coefficient = 0.50 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/rank/chemist_new desc = "It's made of a special fiber which provides minor protection against biohazards." @@ -240,7 +240,7 @@ _color = "chemist_new" permeability_coefficient = 0.50 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/rank/scientist_new desc = "Made of a special fiber that gives special protection against biohazards and small explosions." @@ -250,7 +250,7 @@ _color = "scientist_new" permeability_coefficient = 0.50 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/rank/virologist_new desc = "Made of a special fiber that gives increased protection against biohazards." @@ -260,4 +260,4 @@ _color = "virologist_new" permeability_coefficient = 0.50 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL diff --git a/code/modules/clothing/under/jobs/security.dm b/code/modules/clothing/under/jobs/security.dm index 807f5322056..a0f6d97ad14 100644 --- a/code/modules/clothing/under/jobs/security.dm +++ b/code/modules/clothing/under/jobs/security.dm @@ -15,7 +15,7 @@ item_state = "r_suit" _color = "warden" armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL siemens_coefficient = 0.9 /obj/item/clothing/under/rank/security @@ -25,7 +25,7 @@ item_state = "r_suit" _color = "secred" armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL siemens_coefficient = 0.9 /obj/item/clothing/under/rank/dispatch @@ -35,7 +35,7 @@ item_state = "dispatch" _color = "dispatch" armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL siemens_coefficient = 0.9 /obj/item/clothing/under/rank/security2 @@ -45,7 +45,7 @@ item_state = "r_suit" _color = "redshirt2" armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL siemens_coefficient = 0.9 /obj/item/clothing/under/rank/security/corp @@ -68,7 +68,7 @@ item_state = "det" _color = "detective" armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL siemens_coefficient = 0.9 /* @@ -81,7 +81,7 @@ item_state = "r_suit" _color = "hosred" armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL siemens_coefficient = 0.8 /obj/item/clothing/under/rank/head_of_security/corp @@ -97,7 +97,7 @@ item_state = "jensen" _color = "jensen" siemens_coefficient = 0.6 - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL //Paradise Station diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index 84ac2feac52..cded8d082e6 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -31,7 +31,6 @@ name = "amish suit" icon_state = "sl_suit" _color = "sl_suit" - flags = FPRINT | TABLEPASS /obj/item/clothing/under/waiter name = "waiter's outfit" @@ -39,7 +38,6 @@ icon_state = "waiter" item_state = "waiter" _color = "waiter" - flags = FPRINT | TABLEPASS /obj/item/clothing/under/rank/mailman name = "mailman's jumpsuit" @@ -83,7 +81,7 @@ item_state = "g_suit" _color = "officer" displays_id = 0 - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/rank/centcom/captain desc = "Gold trim on space-black cloth, this uniform displays the rank of \"Captain\" and bears \"N.C.V. Fearless CV-286\" on the left shounder." @@ -100,7 +98,7 @@ item_state = "g_suit" _color = "officer" displays_id = 0 - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/rank/centcom/representative desc = "Gold trim on space-black cloth, this uniform displays the rank of \"Ensign\" and bears \"N.S.S. Cyberiad\" on the left shounder." @@ -109,7 +107,7 @@ item_state = "g_suit" _color = "officer" displays_id = 0 - flags = FPRINT | TABLEPASS | ONESIZEFITSALL + flags = ONESIZEFITSALL /obj/item/clothing/under/space name = "\improper NASA jumpsuit" @@ -120,7 +118,6 @@ w_class = 4//bulky item gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 - flags = FPRINT | TABLEPASS body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | ARMS //Needs gloves and shoes with cold protection to be fully protected. min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE @@ -135,7 +132,6 @@ desc = "it's a cybernetically enhanced jumpsuit used for administrative duties." gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 - flags = FPRINT | TABLEPASS body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS armor = list(melee = 100, bullet = 100, laser = 100,energy = 100, bomb = 100, bio = 100, rad = 100) cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS @@ -149,7 +145,6 @@ desc = "A jumpsuit with owl wings. Photorealistic owl feathers! Twooooo!" icon_state = "owl" _color = "owl" - flags = FPRINT | TABLEPASS /obj/item/clothing/under/johnny name = "johnny~~ jumpsuit" @@ -228,6 +223,27 @@ item_state = "navy_suit" _color = "navy_suit" +/obj/item/clothing/under/suit_jacket/tan + name = "tan suit" + desc = "A tan suit with a yellow tie. Smart, but casual." + icon_state = "tan_suit" + item_state = "tan_suit" + _color = "tan_suit" + +/obj/item/clothing/under/suit_jacket/burgundy + name = "burgundy suit" + desc = "A burgundy suit and black tie. Somewhat formal." + icon_state = "burgundy_suit" + item_state = "burgundy_suit" + _color = "burgundy_suit" + +/obj/item/clothing/under/suit_jacket/charcoal + name = "charcoal suit" + desc = "A charcoal suit and red tie. Very professional." + icon_state = "charcoal_suit" + item_state = "charcoal_suit" + _color = "charcoal_suit" + /obj/item/clothing/under/blackskirt name = "black skirt" desc = "A black skirt, very fancy!" @@ -587,6 +603,13 @@ _color = "pennywise" body_parts_covered = UPPER_TORSO|LOWER_TORSO +/obj/item/clothing/under/assistantformal + name = "assistant's formal uniform" + desc = "An assistant's formal-wear. Why an assistant needs formal-wear is still unknown." + icon_state = "assistant_formal" + item_state = "gy_suit" + _color = "assistant_formal" + /obj/item/clothing/under/blacktango name = "black tango dress" desc = "Filled with Latin fire." diff --git a/code/modules/clothing/under/shorts.dm b/code/modules/clothing/under/shorts.dm index 92fc9f3f131..f5280399838 100644 --- a/code/modules/clothing/under/shorts.dm +++ b/code/modules/clothing/under/shorts.dm @@ -2,7 +2,6 @@ name = "athletic shorts" desc = "95% Polyester, 5% Spandex!" gender = PLURAL - flags = FPRINT | TABLEPASS body_parts_covered = LOWER_TORSO /obj/item/clothing/under/shorts/red diff --git a/code/modules/computer3/component.dm b/code/modules/computer3/component.dm index 501bbc973eb..ca4639c73bd 100644 --- a/code/modules/computer3/component.dm +++ b/code/modules/computer3/component.dm @@ -85,6 +85,15 @@ var/dualslot = 0 // faster than typechecking attackby_types = list(/obj/item/weapon/card) + emag_act(user as mob) + if(!writer) + usr << "You insert \the card, and the computer grinds, sparks, and beeps. After a moment, the card ejects itself." + computer.emagged = 1 + return 1 + else + usr << "You are unable to insert \the card, as the reader slot is occupied" + return 0 + attackby(var/obj/item/I as obj, var/mob/user as mob) if(istype(I,/obj/item/weapon/card)) insert(I) @@ -102,14 +111,6 @@ usr << "This device has only one card slot" return 0 - if(istype(card,/obj/item/weapon/card/emag)) // emag reader slot - if(!writer) - usr << "You insert \the [card], and the computer grinds, sparks, and beeps. After a moment, the card ejects itself." - computer.emagged = 1 - return 1 - else - usr << "You are unable to insert \the [card], as the reader slot is occupied" - var/mob/living/L = usr switch(slot) if(1) @@ -132,7 +133,6 @@ else usr << "There is already something in the reader slot." - // Usage of insert() preferred, as it also tells result to the user. proc/equip_to_reader(var/obj/item/weapon/card/card, var/mob/living/L) if(!reader) diff --git a/code/modules/computer3/computers/HolodeckControl.dm b/code/modules/computer3/computers/HolodeckControl.dm index e650185f855..d53946fa12c 100644 --- a/code/modules/computer3/computers/HolodeckControl.dm +++ b/code/modules/computer3/computers/HolodeckControl.dm @@ -154,7 +154,7 @@ if(isobj(obj)) var/mob/M = obj.loc if(ismob(M)) - M.u_equip(obj) + M.unEquip(obj) M.update_icons() //so their overlays update if(!silent) diff --git a/code/modules/computer3/computers/camera.dm b/code/modules/computer3/computers/camera.dm index e0d485e1da1..ddf583888fd 100644 --- a/code/modules/computer3/computers/camera.dm +++ b/code/modules/computer3/computers/camera.dm @@ -185,12 +185,12 @@ return null var/list/L = list() - for(var/obj/machinery/camera/C in cameranet.viewpoints) + for(var/obj/machinery/camera/C in cameranet.cameras) var/list/temp = C.network & key.networks if(temp.len) L.Add(C) - camera_sort(L) + cameranet.process_sort() return L verify_machine(var/obj/machinery/camera/C,var/datum/file/camnet_key/key = null) diff --git a/code/modules/computer3/computers/communications.dm b/code/modules/computer3/computers/communications.dm index 58c7f904f06..dd22bde09ec 100644 --- a/code/modules/computer3/computers/communications.dm +++ b/code/modules/computer3/computers/communications.dm @@ -42,6 +42,12 @@ var/status_display_freq = "1435" var/stat_msg1 var/stat_msg2 + + var/datum/announcement/priority/crew_announcement = new + + New() + ..() + crew_announcement.newscast = 1 Reset() ..() @@ -53,7 +59,7 @@ Topic(var/href, var/list/href_list) if(!interactable() || !computer.radio || ..(href,href_list) ) return - if (computer.z > 1) + if (!(computer.z in config.station_levels)) usr << "\red Unable to establish a connection: \black You're too far away from the station!" return @@ -68,11 +74,11 @@ authenticated = 1 if(access_captain in I.GetAccess()) authenticated = 2 - if(istype(I,/obj/item/weapon/card/emag)) - authenticated = 2 - computer.emagged = 1 + crew_announcement.announcer = GetNameAndAssignmentFromId(I) + if("logout" in href_list) authenticated = 0 + crew_announcement.announcer = "" if("swipeidseclevel" in href_list) var/mob/M = usr @@ -104,13 +110,13 @@ usr << "You need to swipe your ID." if("announce" in href_list) if(authenticated==2) - if(message_cooldown) return - var/input = stripped_input(usr, "Please choose a message to announce to the station crew.", "What?") + if(message_cooldown) + usr << "Please allow at least one minute to pass between announcements" + return + var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement") if(!input || !interactable()) return - captain_announce(input)//This should really tell who is, IE HoP, CE, HoS, RD, Captain - log_say("[key_name(usr)] has made a captain announcement: [input]") - message_admins("[key_name_admin(usr)] has made a captain announcement.", 1) + crew_announcement.Announce(input) message_cooldown = 1 spawn(600)//One minute cooldown message_cooldown = 0 diff --git a/code/modules/computer3/computers/security.dm b/code/modules/computer3/computers/security.dm index f193b071396..477f7c7f972 100644 --- a/code/modules/computer3/computers/security.dm +++ b/code/modules/computer3/computers/security.dm @@ -38,7 +38,7 @@ proc/authenticate() - if(access_security in scan.access || access_forensics_lockers in scan.access ) + if((access_security in scan.access) || (access_forensics_lockers in scan.access) ) return 1 if(istype(usr,/mob/living/silicon/ai)) return 1 diff --git a/code/modules/computer3/computers/shuttle.dm b/code/modules/computer3/computers/shuttle.dm index 5d5fab6528b..9f0619ce321 100644 --- a/code/modules/computer3/computers/shuttle.dm +++ b/code/modules/computer3/computers/shuttle.dm @@ -60,11 +60,13 @@ world << "\blue All authorizations to shorting time for shuttle launch have been revoked!" src.authorized.len = 0 src.authorized = list( ) - - else if (istype(W, /obj/item/card/emag) && !emagged) + return + + emag_act(user as mob) + if (!emagged) var/choice = alert(user, "Would you like to launch the shuttle?","Shuttle control", "Launch", "Cancel") - if(!emagged && emergency_shuttle.location == 1 && user.get_active_hand() == W) + if(!emagged && emergency_shuttle.location == 1) switch(choice) if("Launch") world << "\blue Alert: Shuttle launch time shortened to 10 seconds!" @@ -72,4 +74,3 @@ emagged = 1 if("Cancel") return - return diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 07eb3da5f3f..590e90d9231 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -18,7 +18,6 @@ icon= 'icons/obj/clothing/hats.dmi' icon_state = "hairflowerp" item_state = "hairflowerp" - flags = FPRINT|TABLEPASS /obj/item/clothing/under/fluff/WornTurtleneck // DaveTheHeadcrab: Makkota Atani name = "Worn Combat Turtleneck" @@ -46,7 +45,6 @@ name = "royal marines commando beret" desc = "Dark Green beret with an old insignia on it." icon_state = "sparkyninja_beret" - flags = FPRINT | TABLEPASS ////////////////////////////////// ////////// Fluff Items /////////// @@ -413,7 +411,6 @@ item_state = "ciglit" w_class = 1 body_parts_covered = null - flags = FPRINT|TABLEPASS //Strange penlight, Nerezza: Asher Spock @@ -777,7 +774,6 @@ _color = "jane_sid_suit" has_sensor = 2 sensor_mode = 3 - flags = FPRINT | TABLEPASS //Suit roll-down toggle. /obj/item/clothing/under/fluff/jane_sidsuit/verb/toggle_zipper() @@ -818,7 +814,7 @@ icon = 'icons/obj/custom_items.dmi' icon_state = "flagmask" item_state = "flagmask" - flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH + flags = MASKCOVERSMOUTH w_class = 2 gas_transfer_coefficient = 0.90 */ @@ -828,7 +824,6 @@ desc = "A silver and emerald shamrock pendant. It has the initials \"M.K.\" engraved on the back." icon = 'icons/obj/custom_items.dmi' icon_state = "mara_kilpatrick_1" - flags = FPRINT|TABLEPASS w_class = 1 ////// Small locket - Altair An-Nasaqan - Serithi @@ -841,7 +836,6 @@ item_state = "altair_locket" _color = "altair_locket" slot_flags = 0 - flags = FPRINT|TABLEPASS w_class = 1 slot_flags = SLOT_MASK @@ -855,7 +849,6 @@ item_state = "konaahirano" _color = "konaahirano" slot_flags = 0 - flags = FPRINT|TABLEPASS w_class = 1 slot_flags = SLOT_MASK var/obj/item/held //Item inside locket. @@ -885,7 +878,6 @@ desc = "This silvered medallion bears the symbol of the Hadii Clan of the Tajaran." icon = 'icons/obj/custom_items.dmi' icon_state = "nasir_khayyam_1" - flags = FPRINT|TABLEPASS w_class = 1 slot_flags = SLOT_MASK @@ -897,7 +889,6 @@ desc = "A shiny black medallion made of something that looks like the Earth's obsidian, but it is harder than anything ever seen yet. On the front there seems to be a standing unathi chiseled in it, on the back the name of Lin Chang with the title of the Assassin Archmage." icon = 'icons/obj/custom_items.dmi' icon_state = "nasir_khayyam_1" - flags = FPRINT|TABLEPASS w_class = 1 slot_flags = SLOT_MASK @@ -908,7 +899,6 @@ desc = "A brass necklace with a green emerald placed at the end. It has a small inscription on the top of the chain, saying \'Foster\'" icon = 'icons/obj/custom_items.dmi' icon_state = "ty_foster" - flags = FPRINT|TABLEPASS w_class = 1 //////////// Shoes //////////// diff --git a/code/modules/destilery/main.dm b/code/modules/destilery/main.dm index e6944724aaf..ded080d2b12 100644 --- a/code/modules/destilery/main.dm +++ b/code/modules/destilery/main.dm @@ -58,7 +58,7 @@ /obj/machinery/mill/attackby(var/obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/weapon/reagent_containers/food)) - user.u_equip(W) + user.unEquip(W) W.loc = src input += W else @@ -128,7 +128,7 @@ /obj/machinery/fermenter/attackby(var/obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/weapon/reagent_containers/food)) - user.u_equip(W) + user.unEquip(W) W.loc = src input += W else @@ -189,7 +189,7 @@ /obj/machinery/still/attackby(var/obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/weapon/reagent_containers/food)) - user.u_equip(W) + user.unEquip(W) W.loc = src input += W else @@ -274,7 +274,7 @@ /obj/machinery/centrifuge/attackby(var/obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/weapon/reagent_containers/food)) - user.u_equip(W) + user.unEquip(W) W.loc = src input += W else diff --git a/code/modules/economy/Accounts.dm b/code/modules/economy/Accounts.dm index 91d8662227c..018ce78cd3a 100644 --- a/code/modules/economy/Accounts.dm +++ b/code/modules/economy/Accounts.dm @@ -125,13 +125,13 @@ var/global/list/all_money_accounts = list() var/money = 0 var/suspended = 0 var/list/transaction_log = list() - var/security_level = 1 //0 - auto-identify from worn ID, require only account number + var/security_level = 0 //0 - auto-identify from worn ID, require only account number //1 - require manual login / account number and pin //2 - require card and manual login /datum/money_account/New() ..() - security_level = pick (0,1) //Stealing is now slightly viable + //security_level = pick (0,1) //Stealing is now slightly viable /datum/transaction var/target_name = "" diff --git a/code/modules/economy/Economy.dm b/code/modules/economy/Economy.dm index cf78723a683..b41a080d251 100644 --- a/code/modules/economy/Economy.dm +++ b/code/modules/economy/Economy.dm @@ -67,7 +67,15 @@ var/setup_economy = 0 /proc/setup_economy() if(setup_economy) return + var/datum/feed_channel/newChannel = new /datum/feed_channel + newChannel.channel_name = "Public Station Announcements" + newChannel.author = "Automated Announcement Listing" + newChannel.locked = 1 + newChannel.is_admin_channel = 1 + news_network.network_channels += newChannel + + newChannel = new /datum/feed_channel newChannel.channel_name = "Tau Ceti Daily" newChannel.author = "CentComm Minister of Information" newChannel.locked = 1 diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm index a86219ba03a..b69a656ca1d 100644 --- a/code/modules/events/alien_infestation.dm +++ b/code/modules/events/alien_infestation.dm @@ -15,18 +15,17 @@ /datum/event/alien_infestation/announce() if(successSpawn) - command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") - world << sound('sound/AI/aliens.ogg') + command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') /datum/event/alien_infestation/start() var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) - if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) + if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network) if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent - var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien","Syndicate") + var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET) while(spawncount > 0 && vents.len && candidates.len) var/obj/vent = pick_n_take(vents) diff --git a/code/modules/events/blob.dm b/code/modules/events/blob.dm index 9a3dc92a754..abc3fa87d48 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -7,8 +7,7 @@ /datum/event/blob/announce() - command_alert("Confirmed outbreak of level 7 biohazard aboard [station_name()]. Nanotrasen has issued a directive 7-10. The station is to be considered quarantined.", "Biohazard Alert") - world << sound('sound/AI/blob_confirmed.ogg') + command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard [station_name()]. Nanotrasen has issued a directive 7-10. The station is to be considered quarantined.", "Biohazard Alert", new_sound = 'sound/AI/blob_confirmed.ogg') for (var/mob/living/silicon/ai/aiPlayer in player_list) if (aiPlayer.client) @@ -39,14 +38,14 @@ /datum/event/blob/proc/announce_nuke() var/nukecode = "ERROR" for(var/obj/machinery/nuclearbomb/bomb in world) - if(bomb && bomb.r_code && bomb.z == 1) + if(bomb && bomb.r_code && (bomb.z in config.station_levels)) nukecode = bomb.r_code - command_alert("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [nukecode] ", "Biohazard Alert") + command_announcement.Announce("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [nukecode] ", "Biohazard Alert") set_security_level("gamma") var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world - if(V && V.z == 1) + if(V && (V.z in config.station_levels)) V.locked = 0 V.update_icon() @@ -64,12 +63,11 @@ spawn(10) if(Blob || blob_cores.len) return - command_alert("The level 7 biohazard aboard [station_name()] has been eliminated. Directive 7-10 has been lifted, and the station is no longer quarantined.", "Biohazard Update") + command_announcement.Announce("The level 7 biohazard aboard [station_name()] has been eliminated. Directive 7-10 has been lifted, and the station is no longer quarantined.", "Biohazard Update") for (var/mob/living/silicon/ai/aiPlayer in player_list) if (aiPlayer.client) - var/law = "" - aiPlayer.set_zeroth_law(law) + aiPlayer.clear_zeroth_law() aiPlayer << "\red You have detected a change in your laws information:" - aiPlayer << "Laws Updated: [law]" + aiPlayer << "Laws Updated: Zeroth law removed." ..() \ No newline at end of file diff --git a/code/modules/events/borers.dm b/code/modules/events/borers.dm index 60d342628bd..14010e22fc3 100644 --- a/code/modules/events/borers.dm +++ b/code/modules/events/borers.dm @@ -12,18 +12,17 @@ /datum/event/borer_infestation/announce() if(successSpawn) - command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") - world << sound('sound/AI/aliens.ogg') + command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') /datum/event/borer_infestation/start() var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) - if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) + if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network) //Stops cortical borers getting stuck in small networks. See: Security, Virology if(temp_vent.network.normal_members.len > 50) vents += temp_vent - var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien","Syndicate") + var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET) while(spawncount > 0 && vents.len && candidates.len) var/obj/vent = pick_n_take(vents) var/client/C = pick_n_take(candidates) diff --git a/code/modules/events/brand_intelligence.dm b/code/modules/events/brand_intelligence.dm index a2436f2ac75..4f2616e7c0f 100644 --- a/code/modules/events/brand_intelligence.dm +++ b/code/modules/events/brand_intelligence.dm @@ -8,11 +8,11 @@ var/obj/machinery/vending/originMachine /datum/event/brand_intelligence/announce() - command_alert("Rampant brand intelligence has been detected aboard [station_name()], please stand-by.", "Machine Learning Alert") + command_announcement.Announce("Rampant brand intelligence has been detected aboard [station_name()], please stand-by.", "Machine Learning Alert") /datum/event/brand_intelligence/start() for(var/obj/machinery/vending/V in machines) - if(V.z != 1) continue + if(!(V.z in config.station_levels)) continue vendingMachines.Add(V) if(!vendingMachines.len) diff --git a/code/modules/events/cargobonus.dm b/code/modules/events/cargobonus.dm index f0c84b86f54..fb1a3ac277e 100644 --- a/code/modules/events/cargobonus.dm +++ b/code/modules/events/cargobonus.dm @@ -2,7 +2,7 @@ announceWhen = 5 /datum/event/cargo_bonus/announce() - command_alert("Congratulations! [station_name()] was chosen for supply limit increase, please contact local cargo department for details!", "Supply Alert") + command_announcement.Announce("Congratulations! [station_name()] was chosen for supply limit increase, please contact local cargo department for details!", "Supply Alert") /datum/event/cargo_bonus/start() supply_controller.points+=rand(100,500) \ No newline at end of file diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index 7cf82ff1f67..303f5686e8e 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -8,7 +8,7 @@ endWhen = rand(600,1200) /datum/event/carp_migration/announce() - command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert") + command_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert") /datum/event/carp_migration/start() for(var/obj/effect/landmark/C in landmarks_list) diff --git a/code/modules/events/comms_blackout.dm b/code/modules/events/comms_blackout.dm index 2f5cbea97b3..6b948538d5d 100644 --- a/code/modules/events/comms_blackout.dm +++ b/code/modules/events/comms_blackout.dm @@ -1,6 +1,6 @@ /proc/communications_blackout(var/silent = 1) if(!silent) - command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT") + command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT") else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms for(var/mob/living/silicon/ai/A in player_list) A << "
" diff --git a/code/modules/events/communications_blackout.dm b/code/modules/events/communications_blackout.dm index d437d85684e..d39517f5343 100644 --- a/code/modules/events/communications_blackout.dm +++ b/code/modules/events/communications_blackout.dm @@ -12,7 +12,7 @@ A << "
" if(prob(30)) //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts. - command_alert(alert) + command_announcement.Announce(alert) /datum/event/communications_blackout/start() for(var/obj/machinery/telecomms/T in telecomms_list) diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index a12aa2147c5..ec4ea8b8d3a 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -3,8 +3,7 @@ oneShot = 1 /datum/event/disease_outbreak/announce() - command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert") - world << sound('sound/AI/outbreak7.ogg') + command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') /datum/event/disease_outbreak/setup() announceWhen = rand(15, 30) @@ -17,7 +16,7 @@ var/turf/T = get_turf(H) if(!T) continue - if(T.z != 1) + if(!(T.z in config.station_levels)) continue for(var/datum/disease/D in H.viruses) foundAlready = 1 diff --git a/code/modules/events/electrical_storm.dm b/code/modules/events/electrical_storm.dm index 2b9b989e5e9..a8254d02c7a 100644 --- a/code/modules/events/electrical_storm.dm +++ b/code/modules/events/electrical_storm.dm @@ -3,7 +3,7 @@ var/lightsoutRange = 25 /datum/event/electrical_storm/announce() - command_alert("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert") + command_announcement.Announce("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert") /datum/event/electrical_storm/start() var/list/epicentreList = list() diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm index 622e62b5172..effa2845d01 100644 --- a/code/modules/events/event_container.dm +++ b/code/modules/events/event_container.dm @@ -135,8 +135,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)), // NON-BAY EVENTS - new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Cargo Bonus", /datum/event/cargo_bonus, 150), - new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mass Hallucination",/datum/event/mass_hallucination,200), + new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Cargo Bonus", /datum/event/cargo_bonus, 100) ) /datum/event_container/moderate @@ -145,9 +144,9 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 1230), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 100, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 20), 1), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 20, list(ASSIGNMENT_SECURITY = 20)), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space vines", /datum/event/spacevine, 200, list(ASSIGNMENT_ENGINEER = 10)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Vines", /datum/event/spacevine, 200, list(ASSIGNMENT_ENGINEER = 10)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 20)), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meaty Ores", /datum/event/dust/meaty, 0, list(ASSIGNMENT_ENGINEER = 20)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meaty Ores", /datum/event/dust/meaty, 0, list(ASSIGNMENT_ENGINEER = 30)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 500, list(ASSIGNMENT_AI = 150, ASSIGNMENT_SECURITY = 120)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 100)), // new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 200, list(ASSIGNMENT_ENGINEER = 60)), @@ -156,18 +155,19 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 150)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), 1), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 50, ASSIGNMENT_CYBORG = 50, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5)), - new /datum/event_meta/alien(EVENT_LEVEL_MODERATE, "Alien Infestation", /datum/event/alien_infestation, 2.5, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5), - new /datum/event_meta/ninja(EVENT_LEVEL_MODERATE, "Space Ninja", /datum/event/space_ninja, 0, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5), + new /datum/event_meta/alien(EVENT_LEVEL_MODERATE, "Alien Infestation", /datum/event/alien_infestation, 0, list(ASSIGNMENT_SECURITY = 20), 1), + new /datum/event_meta/ninja(EVENT_LEVEL_MODERATE, "Space Ninja", /datum/event/space_ninja, 0, list(ASSIGNMENT_SECURITY = 15), 1), // NON-BAY EVENTS - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Dust", /datum/event/dust, 50, list(ASSIGNMENT_ENGINEER = 50)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Mass Hallucination", /datum/event/mass_hallucination, 300), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Dust", /datum/event/dust, 50, list(ASSIGNMENT_ENGINEER = 50)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Dimensional Tear", /datum/event/tear, 0, list(ASSIGNMENT_SECURITY = 25)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Vent Clog", /datum/event/vent_clog, 250), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Wormholes", /datum/event/wormholes, 150), - - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Pyro Anomaly", /datum/event/anomaly/anomaly_pyro, 100, list(ASSIGNMENT_ENGINEER = 60)), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Vortex Anomaly", /datum/event/anomaly/anomaly_vortex, 50, list(ASSIGNMENT_ENGINEER = 25)), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Bluespace Anomaly", /datum/event/anomaly/anomaly_bluespace, 50, list(ASSIGNMENT_ENGINEER = 25)), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Flux Anomaly", /datum/event/anomaly/anomaly_flux, 50, list(ASSIGNMENT_ENGINEER = 50)), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravitational Anomaly", /datum/event/anomaly/anomaly_grav, 200), +// new /datum/event_meta(EVENT_LEVEL_MODERATE, "Pyro Anomaly", /datum/event/anomaly/anomaly_pyro, 100, list(ASSIGNMENT_ENGINEER = 60)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Vortex Anomaly", /datum/event/anomaly/anomaly_vortex, 50, list(ASSIGNMENT_ENGINEER = 25)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Bluespace Anomaly", /datum/event/anomaly/anomaly_bluespace, 50, list(ASSIGNMENT_ENGINEER = 25)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Flux Anomaly", /datum/event/anomaly/anomaly_flux, 50, list(ASSIGNMENT_ENGINEER = 50)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravitational Anomaly", /datum/event/anomaly/anomaly_grav, 200), ) /datum/event_container/major diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index df494ddc245..1dd1956c7ab 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -79,7 +79,7 @@ var/global/list/possibleEvents = list() if(!spacevines_spawned) possibleEvents[/datum/event/spacevine] = 10 + 5 * active_with_role["Engineer"] if(minutes_passed >= 30) // Give engineers time to set up engine - possibleEvents[/datum/event/anomaly/anomaly_pyro] = 100 + 60 * active_with_role["Engineer"] +// possibleEvents[/datum/event/anomaly/anomaly_pyro] = 100 + 60 * active_with_role["Engineer"] possibleEvents[/datum/event/anomaly/anomaly_vortex] = 50 + 25 * active_with_role["Engineer"] possibleEvents[/datum/event/anomaly/anomaly_bluespace] = 50 + 25 * active_with_role["Engineer"] possibleEvents[/datum/event/anomaly/anomaly_flux] = 50 + 50 * active_with_role["Engineer"] @@ -152,10 +152,7 @@ var/global/list/possibleEvents = list() /*switch(picked_event) if("Meteor") - command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert") - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) - M << sound('sound/AI/meteors.ogg') + command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg') spawn(100) meteor_wave(10) spawn_meteors() diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm index caff07fb8cc..604a4007ab9 100644 --- a/code/modules/events/event_manager.dm +++ b/code/modules/events/event_manager.dm @@ -3,6 +3,7 @@ var/window_y = 600 var/report_at_round_end = 0 var/table_options = " align='center'" + var/head_options = " style='font-weight:bold;'" var/row_options1 = " width='85px'" var/row_options2 = " width='260px'" var/row_options3 = " width='150px'" @@ -87,7 +88,7 @@ html += "
" html += "

Available [severity_to_string[selected_event_container.severity]] Events (queued & running events will not be displayed)

" html += "" - html += "Name Weight MinWeight MaxWeight OneShot Enabled CurrWeight Remove" + html += "Name Weight MinWeight MaxWeight OneShot Enabled CurrWeight Remove" for(var/datum/event_meta/EM in selected_event_container.available_events) html += "" html += "[EM.name]" @@ -105,7 +106,7 @@ html += "
" html += "

Add Event

" html += "" - html += "NameTypeWeightOneShot" + html += "NameTypeWeightOneShot" html += "" html += "[new_event.name ? new_event.name : "Enter Event"]" html += "[new_event.event_type ? new_event.event_type : "Select Type"]" @@ -121,7 +122,7 @@ html += "

Event Start

" html += "" - html += "SeverityStarts AtStarts InAdjust StartPauseInterval Mod" + html += "SeverityStarts AtStarts InAdjust StartPauseInterval Mod" for(var/severity = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR) var/datum/event_container/EC = event_containers[severity] var/next_event_at = max(0, EC.next_event_time - world.time) @@ -148,7 +149,7 @@ html += "
" html += "

Next Event

" html += "" - html += "SeverityNameEvent RotationClear" + html += "SeverityNameEvent RotationClear" for(var/severity = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR) var/datum/event_container/EC = event_containers[severity] var/datum/event_meta/EM = EC.next_event @@ -165,7 +166,7 @@ html += "

Running Events

" html += "Estimated times, affected by master controller delays." html += "" - html += "SeverityNameEnds AtEnds InStop" + html += "SeverityNameEnds AtEnds InStop" for(var/datum/event/E in active_events) if(!E.event_meta) continue diff --git a/code/modules/events/grid_check.dm b/code/modules/events/grid_check.dm index 71d78d96e4a..c485827efbc 100644 --- a/code/modules/events/grid_check.dm +++ b/code/modules/events/grid_check.dm @@ -8,9 +8,7 @@ power_failure(0) /datum/event/grid_check/announce() - command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check") - for(var/mob/M in player_list) - M << sound('sound/AI/poweroff.ogg') + command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check", new_sound = 'sound/AI/poweroff.ogg') /datum/event/grid_check/end() power_restore() diff --git a/code/modules/events/infestation.dm b/code/modules/events/infestation.dm index 8971db74853..444da4675ef 100644 --- a/code/modules/events/infestation.dm +++ b/code/modules/events/infestation.dm @@ -102,7 +102,7 @@ /datum/event/infestation/announce() - command_alert("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Lifesign Alert") + command_announcement.Announce("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Lifesign Alert") #undef LOC_KITCHEN #undef LOC_ATMOS diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index 7f66a4366a9..9e8f5d43b57 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -6,7 +6,7 @@ /datum/event/ionstorm/announce() endWhen = rand(500, 1500) -// command_alert("The station has entered an ion storm. Monitor all electronic equipment for malfunctions", "Anomaly Alert") +// command_announcement.Announce("The station has entered an ion storm. Monitor all electronic equipment for malfunctions", "Anomaly Alert") for (var/mob/living/carbon/human/player in world) if(player.client) players += player.real_name @@ -86,7 +86,7 @@ /datum/event/ionstorm/end() spawn(rand(5000,8000)) if(prob(50)) - command_alert("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert") + command_announcement.Announce("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert") /* /proc/IonStorm(botEmagChance = 10) @@ -212,21 +212,21 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is spawn(0) world << "Started processing APCs" for (var/obj/machinery/power/apc/APC in world) - if(APC.z == 1) + if((APC.z in config.station_levels)) APC.ion_act() apcnum++ world << "Finished processing APCs. Processed: [apcnum]" spawn(0) world << "Started processing SMES" for (var/obj/machinery/power/smes/SMES in world) - if(SMES.z == 1) + if((SMES.z in config.station_levels)) SMES.ion_act() smesnum++ world << "Finished processing SMES. Processed: [smesnum]" spawn(0) world << "Started processing AIRLOCKS" for (var/obj/machinery/door/airlock/D in world) - if(D.z == 1) + if((D.z in config.station_levels)) //if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks airlocknum++ spawn(0) @@ -235,7 +235,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is spawn(0) world << "Started processing FIREDOORS" for (var/obj/machinery/door/firedoor/D in world) - if(D.z == 1) + if((D.z in config.station_levels)) firedoornum++; spawn(0) D.ion_act() diff --git a/code/modules/events/mass_hallucination.dm b/code/modules/events/mass_hallucination.dm index 571a9ae7d1f..b3fbea5343c 100644 --- a/code/modules/events/mass_hallucination.dm +++ b/code/modules/events/mass_hallucination.dm @@ -3,4 +3,4 @@ if(!(C.species.flags & IS_SYNTHETIC)) C.hallucination += rand(50, 100) /datum/event/mass_hallucination/announce() - command_alert("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage") \ No newline at end of file + command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage") \ No newline at end of file diff --git a/code/modules/events/meteors.dm b/code/modules/events/meteors.dm index 0f74d65b7d9..42b0b1eda1d 100644 --- a/code/modules/events/meteors.dm +++ b/code/modules/events/meteors.dm @@ -9,15 +9,14 @@ endWhen = rand(10,25) * 3 /datum/event/meteor_wave/announce() - command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert") - world << sound('sound/AI/meteors.ogg') - + command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg') + /datum/event/meteor_wave/tick() if(IsMultiple(activeFor, 3)) spawn_meteors(rand(2,5)) /datum/event/meteor_wave/end() - command_alert("The station has cleared the meteor storm.", "Meteor Alert") + command_announcement.Announce("The station has cleared the meteor storm.", "Meteor Alert") // /datum/event/meteor_shower @@ -30,7 +29,7 @@ waves = rand(1,4) /datum/event/meteor_shower/announce() - command_alert("The station is now in a meteor shower.", "Meteor Alert") + command_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert") //meteor showers are lighter and more common, /datum/event/meteor_shower/tick() @@ -44,4 +43,4 @@ endWhen = next_meteor + 1 /datum/event/meteor_shower/end() - command_alert("The station has cleared the meteor shower", "Meteor Alert") + command_announcement.Announce("The station has cleared the meteor shower", "Meteor Alert") diff --git a/code/modules/events/prison_break.dm b/code/modules/events/prison_break.dm index 87135bda526..676661f2b7e 100644 --- a/code/modules/events/prison_break.dm +++ b/code/modules/events/prison_break.dm @@ -15,7 +15,7 @@ /datum/event/prison_break/announce() if(prisonAreas && prisonAreas.len > 0) - command_alert("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert") + command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert") else world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area." kill() @@ -30,7 +30,7 @@ /datum/event/prison_break/announce() if(prisonAreas && prisonAreas.len > 0) - command_alert("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert") + command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert") else world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area." kill() diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index 58b5f60c2cc..5daabc84799 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -22,11 +22,10 @@ /datum/event/radiation_storm/start() spawn() - world << sound('sound/AI/radiation.ogg') - command_alert("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert") + command_announcement.Announce("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') for(var/area/A in world) - if(A.z != 1 || is_safe_zone(A)) + if(!(A.z in config.station_levels) || is_safe_zone(A)) continue A.radiation_alert() @@ -36,7 +35,7 @@ sleep(600) - command_alert("The station has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert") + command_announcement.Announce("The station has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert") for(var/i = 0, i < 10, i++) for(var/mob/living/carbon/human/H in living_mob_list) @@ -45,7 +44,7 @@ var/turf/T = get_turf(H) if(!T) continue - if(T.z != 1 || is_safe_zone(T.loc)) + if(!(T.z in config.station_levels) || is_safe_zone(T.loc)) continue if(istype(H,/mob/living/carbon/human)) @@ -64,16 +63,16 @@ var/turf/T = get_turf(M) if(!T) continue - if(T.z != 1) + if(!(T.z in config.station_levels)) continue M.apply_effect((rand(5,25)),IRRADIATE,0) sleep(100) - command_alert("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert") + command_announcement.Announce("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert") for(var/area/A in world) - if(A.z != 1 || is_safe_zone(A)) + if(!(A.z in config.station_levels) || is_safe_zone(A)) continue A.reset_radiation_alert() diff --git a/code/modules/events/rogue_drones.dm b/code/modules/events/rogue_drones.dm index d3ccaa4d89a..d96c80f60f8 100644 --- a/code/modules/events/rogue_drones.dm +++ b/code/modules/events/rogue_drones.dm @@ -30,7 +30,7 @@ msg = "Contact has been lost with a combat drone wing operating out of the NMV Icarus. If any are sighted in the area, approach with caution." else msg = "Unidentified hackers have targetted a combat drone wing deployed from the NMV Icarus. If any are sighted in the area, approach with caution." - command_alert(msg, "Rogue drone alert") + command_announcement.Announce(msg, "Rogue drone alert") /datum/event/rogue_drone/tick() @@ -49,6 +49,6 @@ num_recovered++ if(num_recovered > drones_list.len * 0.75) - command_alert("Icarus drone control reports the malfunctioning wing has been recovered safely.", "Rogue drone alert") + command_announcement.Announce("Icarus drone control reports the malfunctioning wing has been recovered safely.", "Rogue drone alert") else - command_alert("Icarus drone control registers disappointment at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert") + command_announcement.Announce("Icarus drone control registers disappointment at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert") diff --git a/code/modules/events/sayuevents/meaty_ores.dm b/code/modules/events/sayuevents/meaty_ores.dm index a44708693ef..d6e640934d9 100644 --- a/code/modules/events/sayuevents/meaty_ores.dm +++ b/code/modules/events/sayuevents/meaty_ores.dm @@ -1,9 +1,8 @@ /datum/event/dust/meaty/announce() if(prob(16)) - command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert") + command_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert") else - command_alert("Meaty ores have been detected on collision course with the station.", "Meaty Ore Alert") - world << sound('sound/AI/meteors.ogg') + command_announcement.Announce("Meaty ores have been detected on collision course with the station.", "Meaty Ore Alert",new_sound = 'sound/AI/meteors.ogg') /datum/event/dust/meaty/setup() qnty = rand(45,125) diff --git a/code/modules/events/sayuevents/undead.dm b/code/modules/events/sayuevents/undead.dm index f9d82baf086..84c1c0bb1b1 100644 --- a/code/modules/events/sayuevents/undead.dm +++ b/code/modules/events/sayuevents/undead.dm @@ -8,7 +8,7 @@ RS.start() RS.kill() for(var/area/A) - if(A.z != 1) continue //Spook on main station only. + if(!(A.z in config.station_levels)) continue //Spook on main station only. if(A.luminosity) continue // if(A.lighting_space) continue if(A.type == /area) continue diff --git a/code/modules/events/sayuevents/wormholes.dm b/code/modules/events/sayuevents/wormholes.dm index e120d11630d..c31645d7a00 100644 --- a/code/modules/events/sayuevents/wormholes.dm +++ b/code/modules/events/sayuevents/wormholes.dm @@ -13,7 +13,7 @@ /datum/event/wormholes/start() for(var/turf/simulated/floor/T in world) - if(T.z == 1) + if((T.z in config.station_levels)) pick_turfs += T for(var/i = 1, i <= number_of_wormholes, i++) @@ -21,10 +21,7 @@ wormholes += new /obj/effect/portal/wormhole(T, null, null, -1) /datum/event/wormholes/announce() - command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert") - for(var/mob/M in player_list) - if(!istype(M, /mob/new_player)) - M << sound('sound/AI/spanomalies.ogg') + command_announcement.Announce("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert", new_sound = 'sound/AI/spanomalies.ogg') /datum/event/wormholes/tick() if(activeFor % shift_frequency == 0) diff --git a/code/modules/events/spider_infestation.dm b/code/modules/events/spider_infestation.dm index 7a953d3fd40..227737ba99c 100644 --- a/code/modules/events/spider_infestation.dm +++ b/code/modules/events/spider_infestation.dm @@ -12,15 +12,13 @@ sent_spiders_to_station = 1 /datum/event/spider_infestation/announce() - command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") - world << sound('sound/AI/aliens.ogg') - + command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') /datum/event/spider_infestation/start() var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) - if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) + if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network) if(temp_vent.network.normal_members.len > 50) vents += temp_vent diff --git a/code/modules/events/tear.dm b/code/modules/events/tear.dm index d5d572c3b6a..a11455b351d 100644 --- a/code/modules/events/tear.dm +++ b/code/modules/events/tear.dm @@ -5,7 +5,7 @@ var/obj/effect/tear/TE /datum/event/tear/announce() - command_alert("A tear in the fabric of space and time has opened. Expected location: [impact_area.name].", "Anomaly Alert") + command_announcement.Announce("A tear in the fabric of space and time has opened. Expected location: [impact_area.name].", "Anomaly Alert") /datum/event/tear/start() diff --git a/code/modules/events/tgevents/alien_infestation.dm b/code/modules/events/tgevents/alien_infestation.dm deleted file mode 100644 index 3d1dca58bc2..00000000000 --- a/code/modules/events/tgevents/alien_infestation.dm +++ /dev/null @@ -1,40 +0,0 @@ -/var/global/sent_aliens_to_station = 0 - -/datum/event/alien_infestation - announceWhen = 400 - - var/spawncount = 1 - var/successSpawn = 0 //So we don't make a command report if nothing gets spawned. - - -/datum/event/alien_infestation/setup() - announceWhen = rand(announceWhen, announceWhen + 50) - spawncount = rand(1, 2) - sent_aliens_to_station = 1 - - -/datum/event/alien_infestation/announce() - if(successSpawn) - command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") - world << sound('sound/AI/aliens.ogg') - - -/datum/event/alien_infestation/start() - var/list/vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) - if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) - if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology - vents += temp_vent - - var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien","Syndicate") - - while(spawncount > 0 && vents.len && candidates.len) - var/obj/vent = pick_n_take(vents) - var/client/C = pick_n_take(candidates) - if(C) - respawnable_list -= C - var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc) - new_xeno.key = C.key - - spawncount-- - successSpawn = 1 \ No newline at end of file diff --git a/code/modules/events/tgevents/anomaly.dm b/code/modules/events/tgevents/anomaly.dm index 7ab1f25c9ca..a1f951f5747 100644 --- a/code/modules/events/tgevents/anomaly.dm +++ b/code/modules/events/tgevents/anomaly.dm @@ -15,7 +15,7 @@ setup(safety_loop) /datum/event/anomaly/announce() - command_alert("Localized hyper-energetic flux wave detected on long range scanners. Expected location of impact: [impact_area.name].", "Anomaly Alert") + command_announcement.Announce("Localized hyper-energetic flux wave detected on long range scanners. Expected location of impact: [impact_area.name].", "Anomaly Alert") /datum/event/anomaly/start() var/turf/T = pick(get_area_turfs(impact_area)) diff --git a/code/modules/events/tgevents/anomaly_bluespace.dm b/code/modules/events/tgevents/anomaly_bluespace.dm index 224f6f0e2de..852680e69fa 100644 --- a/code/modules/events/tgevents/anomaly_bluespace.dm +++ b/code/modules/events/tgevents/anomaly_bluespace.dm @@ -4,7 +4,7 @@ endWhen = 160 /datum/event/anomaly/anomaly_bluespace/announce() - command_alert("Unstable bluespace anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") + command_announcement.Announce("Unstable bluespace anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") /datum/event/anomaly/anomaly_bluespace/start() @@ -21,7 +21,7 @@ var/obj/item/device/radio/beacon/chosen var/list/possible = list() for(var/obj/item/device/radio/beacon/W in world) - if(W.z != 1) + if(!(W.z in config.station_levels)) continue possible += W @@ -35,7 +35,7 @@ var/turf/TO = get_turf(chosen) // the turf of origin we're travelling TO playsound(TO, 'sound/effects/phasein.ogg', 100, 1) - command_alert("Massive bluespace translocation detected.", "Anomaly Alert") + command_announcement.Announce("Massive bluespace translocation detected.", "Anomaly Alert") var/list/flashers = list() for(var/mob/living/carbon/human/M in viewers(TO, null)) diff --git a/code/modules/events/tgevents/anomaly_flux.dm b/code/modules/events/tgevents/anomaly_flux.dm index bf2cb2d18cc..d02af07b3ef 100644 --- a/code/modules/events/tgevents/anomaly_flux.dm +++ b/code/modules/events/tgevents/anomaly_flux.dm @@ -4,7 +4,7 @@ endWhen = 180 /datum/event/anomaly/anomaly_flux/announce() - command_alert("Localized hyper-energetic flux wave detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") + command_announcement.Announce("Localized hyper-energetic flux wave detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") /datum/event/anomaly/anomaly_flux/start() var/turf/T = pick(get_area_turfs(impact_area)) diff --git a/code/modules/events/tgevents/anomaly_grav.dm b/code/modules/events/tgevents/anomaly_grav.dm index c5430625ea8..0c9f3776f82 100644 --- a/code/modules/events/tgevents/anomaly_grav.dm +++ b/code/modules/events/tgevents/anomaly_grav.dm @@ -4,7 +4,7 @@ endWhen = 70 /datum/event/anomaly/anomaly_grav/announce() - command_alert("Gravitational anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") + command_announcement.Announce("Gravitational anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") /datum/event/anomaly/anomaly_grav/start() var/turf/T = pick(get_area_turfs(impact_area)) diff --git a/code/modules/events/tgevents/anomaly_pyro.dm b/code/modules/events/tgevents/anomaly_pyro.dm index 4e7f6a0b947..df4805121cd 100644 --- a/code/modules/events/tgevents/anomaly_pyro.dm +++ b/code/modules/events/tgevents/anomaly_pyro.dm @@ -4,7 +4,7 @@ endWhen = 110 /datum/event/anomaly/anomaly_pyro/announce() - command_alert("Atmospheric anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") + command_announcement.Announce("Atmospheric anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert") /datum/event/anomaly/anomaly_pyro/start() var/turf/T = pick(get_area_turfs(impact_area)) diff --git a/code/modules/events/tgevents/anomaly_vortex.dm b/code/modules/events/tgevents/anomaly_vortex.dm index 6f2f999e728..c950444978e 100644 --- a/code/modules/events/tgevents/anomaly_vortex.dm +++ b/code/modules/events/tgevents/anomaly_vortex.dm @@ -4,7 +4,7 @@ endWhen = 80 /datum/event/anomaly/anomaly_vortex/announce() - command_alert("Localized high-intensity vortex anomaly detected on long range scanners. Expected location: [impact_area.name]", "Anomaly Alert") + command_announcement.Announce("Localized high-intensity vortex anomaly detected on long range scanners. Expected location: [impact_area.name]", "Anomaly Alert") /datum/event/anomaly/anomaly_vortex/start() var/turf/T = pick(get_area_turfs(impact_area)) diff --git a/code/modules/events/tgevents/brand_intelligence.dm b/code/modules/events/tgevents/brand_intelligence.dm index 893cee98cf1..1cfeba0cd08 100644 --- a/code/modules/events/tgevents/brand_intelligence.dm +++ b/code/modules/events/tgevents/brand_intelligence.dm @@ -8,7 +8,7 @@ /datum/event/brand_intelligence/announce() - command_alert("Rampant brand intelligence has been detected aboard [station_name()], please stand-by.", "Machine Learning Alert") + command_announcement.Announce("Rampant brand intelligence has been detected aboard [station_name()], please stand-by.", "Machine Learning Alert") /datum/event/brand_intelligence/start() diff --git a/code/modules/events/tgevents/immovable_rod.dm b/code/modules/events/tgevents/immovable_rod.dm index 25c3d0308d4..ec86e89981f 100644 --- a/code/modules/events/tgevents/immovable_rod.dm +++ b/code/modules/events/tgevents/immovable_rod.dm @@ -12,7 +12,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 announceWhen = 5 /datum/event/immovable_rod/announce() - command_alert("What the fuck was that?!", "General Alert") + command_announcement.Announce("What the fuck was that?!", "General Alert") /datum/event/immovable_rod/start() var/startx = 0 diff --git a/code/modules/events/tgevents/mass_hallucination.dm b/code/modules/events/tgevents/mass_hallucination.dm index 6a34331acb3..f23a2c15510 100644 --- a/code/modules/events/tgevents/mass_hallucination.dm +++ b/code/modules/events/tgevents/mass_hallucination.dm @@ -6,4 +6,4 @@ if(!(C.species.flags & IS_SYNTHETIC)) C.hallucination += rand(50, 100) /datum/event/mass_hallucination/announce() - command_alert("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage") \ No newline at end of file + command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage") \ No newline at end of file diff --git a/code/modules/events/tgevents/spider_infestation.dm b/code/modules/events/tgevents/spider_infestation.dm deleted file mode 100644 index 1f4cccdf418..00000000000 --- a/code/modules/events/tgevents/spider_infestation.dm +++ /dev/null @@ -1,33 +0,0 @@ -/var/global/sent_spiders_to_station = 0 - -/datum/event/spider_infestation - announceWhen = 400 - - var/spawncount = 1 - - -/datum/event/spider_infestation/setup() - announceWhen = rand(announceWhen, announceWhen + 50) - spawncount = round(num_players() * 1.5) - sent_spiders_to_station = 1 - -/datum/event/spider_infestation/announce() - command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") - world << sound('sound/AI/aliens.ogg') - - -/datum/event/spider_infestation/start() - - var/list/vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) - if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) - if(temp_vent.network.normal_members.len > 50) - vents += temp_vent - - while((spawncount >= 1) && vents.len) - var/obj/vent = pick(vents) - var/obj/effect/spider/spiderling/S = new(vent.loc) - if(prob(66)) - S.grow_as = /mob/living/simple_animal/hostile/giant_spider/nurse - vents -= vent - spawncount-- \ No newline at end of file diff --git a/code/modules/events/tgevents/vent_clog.dm b/code/modules/events/tgevents/vent_clog.dm index 885552dff28..061450a197d 100755 --- a/code/modules/events/tgevents/vent_clog.dm +++ b/code/modules/events/tgevents/vent_clog.dm @@ -6,13 +6,13 @@ var/list/vents = list() /datum/event/vent_clog/announce() - command_alert("The scrubbers network is experiencing a backpressure surge. Some ejection of contents may occur.", "Atmospherics alert") + command_announcement.Announce("The scrubbers network is experiencing a backpressure surge. Some ejection of contents may occur.", "Atmospherics alert") /datum/event/vent_clog/setup() endWhen = rand(25, 100) for(var/obj/machinery/atmospherics/unary/vent_scrubber/temp_vent in machines) - if(temp_vent.loc.z == 1 && temp_vent.network) + if((temp_vent.loc.z in config.station_levels) && temp_vent.network) if(temp_vent.network.normal_members.len > 50) vents += temp_vent diff --git a/code/modules/events/viral_infection.dm b/code/modules/events/viral_infection.dm index 876e3453896..9ee3a47077a 100644 --- a/code/modules/events/viral_infection.dm +++ b/code/modules/events/viral_infection.dm @@ -8,8 +8,7 @@ datum/event/viral_infection/setup() severity = rand(1, 3) datum/event/viral_infection/announce() - command_alert("Confirmed outbreak of level five viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert") - world << sound('sound/AI/outbreak5.ogg') + command_announcement.Announce("Confirmed outbreak of level five viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg') datum/event/viral_infection/start() var/list/candidates = list() //list of candidate keys diff --git a/code/modules/events/viral_outbreak.dm b/code/modules/events/viral_outbreak.dm index f11acd511f3..9e139f5742b 100644 --- a/code/modules/events/viral_outbreak.dm +++ b/code/modules/events/viral_outbreak.dm @@ -8,8 +8,7 @@ datum/event/viral_outbreak/setup() severity = rand(2, 4) datum/event/viral_outbreak/announce() - command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert") - world << sound('sound/AI/outbreak7.ogg') + command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg') datum/event/viral_outbreak/start() var/list/candidates = list() //list of candidate keys diff --git a/code/modules/events/wallrot.dm b/code/modules/events/wallrot.dm index 739ca92411b..b36f7f93760 100644 --- a/code/modules/events/wallrot.dm +++ b/code/modules/events/wallrot.dm @@ -3,7 +3,7 @@ datum/event/wallrot/setup() endWhen = announceWhen + 1 datum/event/wallrot/announce() - command_alert("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert") + command_announcement.Announce("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert") datum/event/wallrot/start() spawn() diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm index 7db850670f1..868b4b6c5e6 100644 --- a/code/modules/hydroponics/grown_inedible.dm +++ b/code/modules/hydroponics/grown_inedible.dm @@ -43,7 +43,6 @@ icon = 'icons/obj/harvest.dmi' icon_state = "logs" force = 5 - flags = TABLEPASS throwforce = 5 w_class = 3.0 throw_speed = 3 @@ -74,7 +73,6 @@ icon_state = "sunflower" damtype = "fire" force = 0 - flags = TABLEPASS throwforce = 1 w_class = 1.0 throw_speed = 1 @@ -92,7 +90,6 @@ icon_state = "nettle" damtype = "fire" force = 15 - flags = TABLEPASS throwforce = 1 w_class = 2.0 throw_speed = 1 @@ -135,7 +132,6 @@ icon_state = "deathnettle" damtype = "fire" force = 30 - flags = TABLEPASS throwforce = 1 w_class = 2.0 throw_speed = 1 diff --git a/code/modules/hydroponics/hydro_tools.dm b/code/modules/hydroponics/hydro_tools.dm index be2158fee39..70cf1f9cf4b 100644 --- a/code/modules/hydroponics/hydro_tools.dm +++ b/code/modules/hydroponics/hydro_tools.dm @@ -203,7 +203,7 @@ /obj/item/weapon/plantspray icon = 'icons/obj/hydroponics.dmi' item_state = "spray" - flags = TABLEPASS | OPENCONTAINER | FPRINT | NOBLUDGEON + flags = OPENCONTAINER | NOBLUDGEON slot_flags = SLOT_BELT throwforce = 4 w_class = 2.0 @@ -255,7 +255,7 @@ icon = 'icons/obj/weapons.dmi' icon_state = "hoe" item_state = "hoe" - flags = FPRINT | TABLEPASS | CONDUCT | NOBLUDGEON + flags = CONDUCT | NOBLUDGEON force = 5.0 throwforce = 7.0 w_class = 2.0 @@ -270,7 +270,6 @@ name = "bottle of weedkiller" icon = 'icons/obj/chemical.dmi' icon_state = "bottle16" - flags = FPRINT | TABLEPASS var/toxicity = 0 var/weed_kill_str = 0 @@ -278,7 +277,6 @@ name = "bottle of glyphosate" icon = 'icons/obj/chemical.dmi' icon_state = "bottle16" - flags = FPRINT | TABLEPASS toxicity = 4 weed_kill_str = 2 @@ -286,7 +284,6 @@ name = "bottle of triclopyr" icon = 'icons/obj/chemical.dmi' icon_state = "bottle18" - flags = FPRINT | TABLEPASS toxicity = 6 weed_kill_str = 4 @@ -294,7 +291,6 @@ name = "bottle of 2,4-D" icon = 'icons/obj/chemical.dmi' icon_state = "bottle15" - flags = FPRINT | TABLEPASS toxicity = 8 weed_kill_str = 7 @@ -308,7 +304,7 @@ desc = "A small glass bottle. Can hold up to 10 units." icon = 'icons/obj/chemical.dmi' icon_state = "bottle16" - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER possible_transfer_amounts = null w_class = 2.0 @@ -348,7 +344,7 @@ desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood." icon = 'icons/obj/weapons.dmi' icon_state = "hatchet" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT force = 12.0 w_class = 2.0 throwforce = 15.0 @@ -381,7 +377,7 @@ throw_speed = 1 throw_range = 3 w_class = 4.0 - flags = FPRINT | TABLEPASS | NOSHIELD + flags = NOSHIELD slot_flags = SLOT_BACK origin_tech = "materials=2;combat=2" attack_verb = list("chopped", "sliced", "cut", "reaped") diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index 948e78f96e9..a572b2c8d19 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -3,7 +3,6 @@ name = "packet of seeds" icon = 'icons/obj/seeds.dmi' icon_state = "seed" - flags = FPRINT | TABLEPASS w_class = 2.0 var/seed_type diff --git a/code/modules/karma/karma.dm b/code/modules/karma/karma.dm index 12924560685..0b97d51c8b3 100644 --- a/code/modules/karma/karma.dm +++ b/code/modules/karma/karma.dm @@ -52,42 +52,42 @@ var/list/karma_spenders = list() set name = "Award Karma" set desc = "Let the gods know whether someone's been nice. Can only be used once per round." set category = "Special Verbs" - + if(!ticker || !player_list.len) usr << "\red You can't award karma until the game has started." return - + if(ticker.current_state == GAME_STATE_PREGAME) usr << "\red You can't award karma until the game has started." - return + return var/list/karma_list = list("Cancel") - for(var/mob/M in player_list) if(M.client && M.mind) + for(var/mob/M in player_list) if(M.client && M.mind) var/special_role = M.mind.special_role if (special_role == "Wizard" || special_role == "Ninja" || special_role == "Syndicate" || special_role == "Syndicate Commando" || special_role == "Vox Raider" || special_role == "Alien") // Don't include special roles, because players use it to meta continue karma_list += M - + if(!karma_list.len || karma_list.len == 1) usr << "\red There's no-one to spend your karma on." return - + var/pickedmob = input("Who would you like to award Karma to?", "Award Karma", "Cancel") as null|mob in karma_list - + if(isnull(pickedmob)) return - + if(!istype(pickedmob, /mob)) usr << "\red That's not a mob." - return - + return + spend_karma(pickedmob) - -/mob/verb/spend_karma(var/mob/M) + +/mob/verb/spend_karma(var/mob/M) set name = "Award Karma to Player" set desc = "Let the gods know whether someone's been nice. Can only be used once per round." set category = "Special Verbs" - + if(!M) usr << "Please right click a mob to award karma directly, or use the 'Award Karma' verb to select a player from the player listing." return @@ -115,6 +115,9 @@ var/list/karma_spenders = list() if(!choice || choice == "Cancel") return if(choice == "Good" && !(src.client.karma_spent)) + if(src.client.karma_spent) + usr << "\red You've already spent your karma for the round." + return M.client.karma += 1 usr << "[choice] karma spent on [M.name]." src.client.karma_spent = 1 @@ -199,7 +202,7 @@ You've gained [totalkarma] total karma in your time here.
"} Unlock Vox -- 45KP
Unlock Slime People -- 45KP
"} - + if (2) // Karma Refunds var/list/refundable = list() var/list/purchased = checkpurchased() @@ -208,31 +211,31 @@ You've gained [totalkarma] total karma in your time here.
"} dat += "Refund Tajaran Ambassador -- 30KP
" if("Unathi Ambassador" in purchased) refundable += "Unathi Ambassador" - dat += "Refund Unathi Ambassador -- 30KP
" + dat += "Refund Unathi Ambassador -- 30KP
" if("Skrell Ambassador" in purchased) refundable += "Skrell Ambassador" - dat += "Refund Skrell Ambassador -- 30KP
" + dat += "Refund Skrell Ambassador -- 30KP
" if("Diona Ambassador" in purchased) refundable += "Diona Ambassador" - dat += "Refund Diona Ambassador -- 30KP
" + dat += "Refund Diona Ambassador -- 30KP
" if("Kidan Ambassador" in purchased) refundable += "Kidan Ambassador" - dat += "Refund Kidan Ambassador -- 30KP
" + dat += "Refund Kidan Ambassador -- 30KP
" if("Slime People Ambassador" in purchased) refundable += "Slime People Ambassador" - dat += "Refund Slime People Ambassador -- 30KP
" + dat += "Refund Slime People Ambassador -- 30KP
" if("Grey Ambassador" in purchased) refundable += "Grey Ambassador" - dat += "Refund Grey Ambassador -- 30KP
" + dat += "Refund Grey Ambassador -- 30KP
" if("Vox Ambassador" in purchased) refundable += "Vox Ambassador" dat += "Refund Vox Ambassador -- 30KP
" if("Customs Officer" in purchased) refundable += "Customs Officer" - dat += "Refund Customs Officer -- 30KP
" + dat += "Refund Customs Officer -- 30KP
" if("Nanotrasen Recruiter" in purchased) refundable += "Nanotrasen Recruiter" - dat += "Refund Nanotrasen Recruiter -- 10KP
" + dat += "Refund Nanotrasen Recruiter -- 10KP
" if(!refundable.len) dat += "You do not have any refundable karma purchases.
" @@ -345,7 +348,7 @@ You've gained [totalkarma] total karma in your time here.
"} usr << "You have been charged [cost] karma." message_admins("[key_name(usr)] has been charged [cost] karma.") return - + /client/proc/karmarefund(var/type,var/name,var/cost) if(name == "Tajaran Ambassador") cost = 30 @@ -368,12 +371,12 @@ You've gained [totalkarma] total karma in your time here.
"} else if(name == "Nanotrasen Recruiter") cost = 10 else - usr << "\red That job is not refundable." + usr << "\red That job is not refundable." return - + var/DBQuery/query = dbcon.NewQuery("SELECT * FROM whitelist WHERE ckey='[usr.key]'") query.Execute() - + var/dbjob var/dbspecies var/dbckey @@ -381,7 +384,7 @@ You've gained [totalkarma] total karma in your time here.
"} dbckey = query.item[2] dbjob = query.item[3] dbspecies = query.item[4] - + if(dbckey) var/list/typelist = list() if(type == "job") @@ -389,8 +392,8 @@ You've gained [totalkarma] total karma in your time here.
"} else if(type == "species") typelist = text2list(dbspecies,",") else - usr << "\red Type [type] is not a valid column." - + usr << "\red Type [type] is not a valid column." + if(name in typelist) typelist -= name var/newtypelist = list2text(typelist,",") @@ -406,14 +409,14 @@ You've gained [totalkarma] total karma in your time here.
"} karmacharge(text2num(cost),1) else usr << "\red You have not bought [name]." - + else - usr << "\red Your ckey ([dbckey]) was not found." - + usr << "\red Your ckey ([dbckey]) was not found." + /client/proc/checkpurchased(var/name = null) // If the first parameter is null, return a full list of purchases var/DBQuery/query = dbcon.NewQuery("SELECT * FROM whitelist WHERE ckey='[usr.key]'") - query.Execute() - + query.Execute() + var/dbjob var/dbspecies var/dbckey @@ -421,7 +424,7 @@ You've gained [totalkarma] total karma in your time here.
"} dbckey = query.item[2] dbjob = query.item[3] dbspecies = query.item[4] - + if(dbckey) var/list/joblist = text2list(dbjob,",") var/list/specieslist = text2list(dbspecies,",") @@ -434,4 +437,4 @@ You've gained [totalkarma] total karma in your time here.
"} else return combinedlist else - return 0 + return 0 diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index ec39b53741e..dde3571a6dd 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -149,7 +149,6 @@ throw_speed = 1 throw_range = 5 w_class = 3 //upped to three because books are, y'know, pretty big. (and you could hide them inside eachother recursively forever) - flags = FPRINT | TABLEPASS attack_verb = list("bashed", "whacked", "educated") autoignition_temperature = AUTOIGNITION_PAPER @@ -274,7 +273,6 @@ throw_speed = 1 throw_range = 5 w_class = 1.0 - flags = FPRINT | TABLEPASS var/obj/machinery/librarycomp/computer // Associated computer - Modes 1 to 3 use this var/obj/item/weapon/book/book // Currently scanned book var/mode = 0 // 0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index c1fdb193485..66c19bfcda0 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -238,8 +238,6 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f onclose(user, "library") /obj/machinery/librarycomp/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (src.density && istype(W, /obj/item/weapon/card/emag)) - src.emagged = 1 if(istype(W, /obj/item/weapon/barcodescanner)) var/obj/item/weapon/barcodescanner/scanner = W scanner.computer = src @@ -248,6 +246,10 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f V.show_message("[src] lets out a low, short blip.", 2) else ..() + +/obj/machinery/librarycomp/emag_act(user as mob) + if (src.density) + src.emagged = 1 /obj/machinery/librarycomp/Topic(href, href_list) if(..()) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 1a0315b957d..82bc3a0f287 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -324,7 +324,7 @@ var/list/L = list() for(var/obj/item/device/radio/beacon/B in world) var/turf/T = get_turf(B) - if(T.z == 1) + if((T.z in config.station_levels)) L += B if(!L.len) user << "The [src.name] failed to create a wormhole." diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm index 0e0889bc637..ed588a76482 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -63,9 +63,10 @@ /obj/machinery/mineral/labor_claim_console/attackby(obj/item/I as obj, mob/user as mob) if(istype(I, /obj/item/weapon/card/id)) return attack_hand(user) - else if(istype(I, /obj/item/weapon/card/emag)) - return emag(user) ..() + +/obj/machinery/mineral/labor_claim_console/emag_act(user as mob) + emag(user) /obj/machinery/mineral/labor_claim_console/proc/emag(mob/user as mob) if(!emagged) diff --git a/code/modules/mining/manufacturing.dm b/code/modules/mining/manufacturing.dm index a59a1071a22..cf8592bf2a4 100644 --- a/code/modules/mining/manufacturing.dm +++ b/code/modules/mining/manufacturing.dm @@ -374,13 +374,13 @@ else ..() if (load == 1) - user.u_equip(W) + user.unEquip(W) W.loc = src if ((user.client && user.s_active != src)) user.client.screen -= W W.dropped() else if (load == 2) - user.u_equip(W) + user.unEquip(W) W.dropped() if ((user.client && user.s_active != src)) user.client.screen -= W diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index b7d8ac6c05e..f6c03ee308b 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -52,22 +52,25 @@ name = "pickaxe" icon = 'icons/obj/items.dmi' icon_state = "pickaxe" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT force = 15.0 - throwforce = 4.0 + throwforce = 10.0 item_state = "pickaxe" w_class = 4.0 m_amt = 3750 //one sheet, but where can you make them? var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO origin_tech = "materials=1;engineering=1" attack_verb = list("hit", "pierced", "sliced", "attacked") - var/drill_sound = 'sound/weapons/Genhit.ogg' + var/list/digsound = list('sound/effects/picaxe1.ogg','sound/effects/picaxe2.ogg','sound/effects/picaxe3.ogg') var/drill_verb = "picking" sharp = 1 var/excavation_amount = 100 + proc/playDigSound() + playsound(src, pick(digsound),20,1) + hammer name = "sledgehammer" //icon_state = "sledgehammer" Waiting on sprite @@ -86,6 +89,8 @@ icon_state = "handdrill" item_state = "jackhammer" digspeed = 30 + hitsound = 'sound/weapons/drill.ogg' + digsound = list('sound/weapons/drill.ogg') origin_tech = "materials=2;powerstorage=3;engineering=2" desc = "Yours is the drill that will pierce through the rock walls." @@ -94,6 +99,8 @@ icon_state = "jackhammer" item_state = "jackhammer" digspeed = 15 //faster than drill, but cannot dig + hitsound = 'sound/weapons/sonic_jackhammer.ogg' + digsound = list('sound/weapons/sonic_jackhammer.ogg') origin_tech = "materials=3;powerstorage=2;engineering=2" desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards." @@ -112,6 +119,8 @@ w_class = 3.0 //it is smaller than the pickaxe damtype = "fire" digspeed = 20 //Can slice though normal walls, all girders, or be used in reinforced wall deconstruction/ light thermite on fire + hitsound = 'sound/weapons/plasma_cutter.ogg' + digsound = list('sound/weapons/plasma_cutter.ogg') origin_tech = "materials=4;plasmatech=3;engineering=3" desc = "A rock cutter that uses bursts of hot plasma. You could use it to cut limbs off of xenos! Or, you know, mine stuff." @@ -129,6 +138,8 @@ item_state = "jackhammer" digspeed = 5 //Digs through walls, girders, and can dig up sand origin_tech = "materials=6;powerstorage=4;engineering=5" + hitsound = 'sound/weapons/drill.ogg' + digsound = list('sound/weapons/drill.ogg') desc = "Yours is the drill that will pierce the heavens!" traitor //Pocket-sized traitor diamond drill. @@ -143,6 +154,8 @@ icon_state = "jackhammer" item_state = "jackhammer" digspeed = 15 + hitsound = 'sound/weapons/drill.ogg' + digsound = list('sound/weapons/drill.ogg') desc = "" /*****************************Shovel********************************/ @@ -152,7 +165,7 @@ desc = "A large tool for digging and moving dirt." icon = 'icons/obj/items.dmi' icon_state = "shovel" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT force = 8.0 throwforce = 4.0 diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index b315ae31e5b..97216012983 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -137,7 +137,7 @@ return last_act = world.time - playsound(user, P.drill_sound, 20, 1) + P.playDigSound() //handle any archaeological finds we might uncover var/fail_message diff --git a/code/modules/mining/money_bag.dm b/code/modules/mining/money_bag.dm index fbcca4984bb..0c4d84c00d9 100644 --- a/code/modules/mining/money_bag.dm +++ b/code/modules/mining/money_bag.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/storage.dmi' name = "Money bag" icon_state = "moneybag" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT force = 10.0 throwforce = 2.0 w_class = 4.0 diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index fd3598ae985..866b46bae50 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -84,7 +84,7 @@ /obj/item/weapon/ore/New() pixel_x = rand(0,16)-8 pixel_y = rand(0,8)-8 - if(src.z == 5) score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet) + if(src.z == ASTEROID_Z) score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet) /obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/device/core_sampler)) diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index d3ecc25ec92..fe6f8851b23 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -20,7 +20,7 @@ /obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob) if (istype(W, /obj/item/weapon/ore)) - user.u_equip(W) + user.unEquip(W) src.contents += W if (istype(W, /obj/item/weapon/storage)) var/obj/item/weapon/storage/S = W diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index c8b38aff840..1f0c56d857e 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -22,8 +22,10 @@ //Puts the item into your l_hand if possible and calls all necessary triggers/updates. returns 1 on success. /mob/proc/put_in_l_hand(var/obj/item/W) - if(lying) return 0 - if(!istype(W)) return 0 + if(lying && !(W.flags & ABSTRACT)) + return 0 + if(!istype(W)) + return 0 if(!l_hand) W.loc = src //TODO: move to equipped? l_hand = W @@ -38,8 +40,10 @@ //Puts the item into your r_hand if possible and calls all necessary triggers/updates. returns 1 on success. /mob/proc/put_in_r_hand(var/obj/item/W) - if(lying) return 0 - if(!istype(W)) return 0 + if(lying && !(W.flags & ABSTRACT)) + return 0 + if(!istype(W)) + return 0 if(!r_hand) W.loc = src r_hand = W @@ -76,98 +80,51 @@ return drop_item() return 0 - -/mob/proc/drop_from_inventory(var/obj/item/W) - if(W) - if(client) client.screen -= W - u_equip(W) - if(!W) return 1 // self destroying objects (tk, grabs) - W.layer = initial(W.layer) - W.loc = loc - - var/turf/T = get_turf(loc) - if(isturf(T)) - T.Entered(W) - - W.dropped(src) - update_icons() - return 1 - return 0 - - //Drops the item in our left hand -/mob/proc/drop_l_hand(var/atom/Target) - if(l_hand) - if(client) client.screen -= l_hand - l_hand.layer = initial(l_hand.layer) - - if(Target) l_hand.loc = Target.loc - else l_hand.loc = loc - - var/turf/T = get_turf(loc) - if(isturf(T)) - T.Entered(l_hand) - - l_hand.dropped(src) - l_hand = null - update_inv_l_hand() - return 1 - return 0 +/mob/proc/drop_l_hand() + return unEquip(l_hand) //All needed checks are in unEquip //Drops the item in our right hand -/mob/proc/drop_r_hand(var/atom/Target) - if(r_hand) - if(client) client.screen -= r_hand - r_hand.layer = initial(r_hand.layer) - - if(Target) r_hand.loc = Target.loc - else r_hand.loc = loc - - var/turf/T = get_turf(Target) - if(istype(T)) - T.Entered(r_hand) - - r_hand.dropped(src) - r_hand = null - update_inv_r_hand() - return 1 - return 0 +/mob/proc/drop_r_hand() + return unEquip(r_hand) //Why was this not calling unEquip in the first place jesus fuck. //Drops the item in our active hand. -/mob/proc/drop_item(var/atom/Target) - if(hand) return drop_l_hand(Target) - else return drop_r_hand(Target) +/mob/proc/drop_item() //THIS. DOES. NOT. NEED. AN. ARGUMENT. + if(hand) + return drop_l_hand() + else + return drop_r_hand() -//TODO: phase out this proc -/mob/proc/before_take_item(var/obj/item/W) //TODO: what is this? - W.loc = null - W.layer = initial(W.layer) - u_equip(W) - update_icons() - return +//Here lie unEquip and before_item_take, already forgotten and not missed. -/mob/proc/u_equip(W as obj) - if (W == r_hand) +/mob/proc/unEquip(obj/item/I, force) //Force overrides NODROP for things like wizarditis and admin undress. + if(!I) //If there's nothing to drop, the drop is automatically succesfull. If(unEquip) should generally be used to check for NODROP. + return 1 + + if((I.flags & NODROP) && !force) + return 0 + + if(I == r_hand) r_hand = null - update_inv_r_hand(0) - else if (W == l_hand) + update_inv_r_hand() + else if(I == l_hand) l_hand = null - update_inv_l_hand(0) - else if (W == back) - back = null - update_inv_back(0) - else if (W == wear_mask) - wear_mask = null - update_inv_wear_mask(0) - return + update_inv_l_hand() + + if(I) + if(client) + client.screen -= I + I.loc = loc + I.dropped(src) + if(I) + I.layer = initial(I.layer) + + return 1 //Attemps to remove an object on a mob. Will not move it to another area or such, just removes from the mob. /mob/proc/remove_from_mob(var/obj/O) - src.u_equip(O) - if (src.client) - src.client.screen -= O - O.layer = initial(O.layer) + unEquip(O) O.screen_loc = null return 1 diff --git a/code/modules/mob/living/carbon/alien/humanoid/inventory.dm b/code/modules/mob/living/carbon/alien/humanoid/inventory.dm index bf3ca77d02f..138bd24f495 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/inventory.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/inventory.dm @@ -1,23 +1,16 @@ //unequip -/mob/living/carbon/alien/humanoid/u_equip(obj/item/W as obj) - if (W == wear_suit) - wear_suit = null - update_inv_wear_suit(0,0) - else if (W == head) - head = null - update_inv_head(0,0) - else if (W == r_store) +/mob/living/carbon/alien/humanoid/unEquip(obj/item/I as obj) + . = ..() + if(!. || !I) + return + + if(I == r_store) r_store = null update_inv_pockets(0) - else if (W == l_store) + + else if(I == l_store) l_store = null update_inv_pockets(0) - else if (W == r_hand) - r_hand = null - update_inv_r_hand(0) - else if (W == l_hand) - l_hand = null - update_inv_l_hand(0) /mob/living/carbon/alien/humanoid/attack_ui(slot_id) var/obj/item/W = get_active_hand() @@ -31,7 +24,7 @@ return if(W.w_class > 3) return - u_equip(W) + unEquip(W) l_store = W update_inv_pockets() if(slot_r_store) @@ -39,7 +32,7 @@ return if(W.w_class > 3) return - u_equip(W) + unEquip(W) r_store = W update_inv_pockets() else diff --git a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm index d85d377ae00..6990eaa9223 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm @@ -104,7 +104,7 @@ //TODO wear_suit.screen_loc = ui_alien_oclothing if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket)) - drop_from_inventory(handcuffed) + unEquip(handcuffed) drop_r_hand() drop_l_hand() diff --git a/code/modules/mob/living/carbon/alien/larva/inventory.dm b/code/modules/mob/living/carbon/alien/larva/inventory.dm index 076053b2530..99298e50bbe 100644 --- a/code/modules/mob/living/carbon/alien/larva/inventory.dm +++ b/code/modules/mob/living/carbon/alien/larva/inventory.dm @@ -1,3 +1,3 @@ //can't unequip since it can't equip anything -/mob/living/carbon/alien/larva/u_equip(obj/item/W as obj) +/mob/living/carbon/alien/larva/unEquip(obj/item/W as obj) return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm index 517a91a3501..2db6b56b75a 100644 --- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm +++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm @@ -74,7 +74,7 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds AttemptGrow() /obj/item/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1) - var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien","Syndicate") + var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,1) var/client/C = null // To stop clientless larva, we will check that our host has a client diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index 3f912cb3ce2..e41f5b0b2ae 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -40,7 +40,7 @@ var/const/MAX_ACTIVE_TIME = 400 /obj/item/clothing/mask/facehugger/attack(mob/living/M as mob, mob/user as mob) ..() - user.before_take_item(src) + user.unEquip(src) Attach(M) /obj/item/clothing/mask/facehugger/examine(mob/user) @@ -131,9 +131,12 @@ var/const/MAX_ACTIVE_TIME = 400 if(iscarbon(M)) var/mob/living/carbon/target = L if(target.wear_mask) - if(prob(20)) return 0 + if(prob(20)) + return 0 var/obj/item/clothing/W = target.wear_mask - target.before_take_item(W) + if(W.flags & NODROP) + return 0 + target.unEquip(W) target.visible_message("[src] tears [W] off of [target]'s face!", \ "[src] tears [W] off of [target]'s face!") @@ -162,7 +165,7 @@ var/const/MAX_ACTIVE_TIME = 400 var/mob/living/carbon/C = target if(C.wear_mask != src) return - + if(ishuman(target)) var/mob/living/carbon/human/H = target if((H.species.flags & IS_SYNTHETIC)) @@ -233,7 +236,7 @@ var/const/MAX_ACTIVE_TIME = 400 /proc/CanHug(var/mob/M) if(!M || !ismob(M)) return 0 - + if(M.stat == DEAD) return 0 @@ -255,4 +258,4 @@ var/const/MAX_ACTIVE_TIME = 400 gender = FEMALE /obj/item/clothing/mask/facehugger/lamarr/New()//to prevent deleting it if aliums are disabled - return \ No newline at end of file + return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index 990f2971c58..12adf40d53e 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -3,7 +3,6 @@ desc = "A piece of juicy meat found in a persons head." icon = 'icons/obj/surgery.dmi' icon_state = "brain2" - flags = TABLEPASS force = 1.0 w_class = 1.0 throwforce = 1.0 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 58fff0705ce..dcfc65efcae 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -378,11 +378,13 @@ throw_mode_off() if(usr.stat || !target) return - if(target.type == /obj/screen) return + if(target.type == /obj/screen) + return var/atom/movable/item = src.get_active_hand() - if(!item) return + if(!item || (item.flags & NODROP)) + return if (istype(item, /obj/item/weapon/grab)) var/obj/item/weapon/grab/G = item @@ -404,10 +406,10 @@ else M.LAssailant = usr - if(!item) return //Grab processing has a chance of returning null - - item.layer = initial(item.layer) - u_equip(item) + if(!item) + return //Grab processing has a chance of returning null + if(!ismob(item)) //Honk mobs don't have a dropped() proc honk + unEquip(item) update_icons() if (istype(usr, /mob/living/carbon)) //Check if a carbon mob is throwing. Modify/remove this line as required. @@ -419,6 +421,7 @@ //actually throw it! if (item) + item.layer = initial(item.layer) src.visible_message("\red [src] has thrown [item].") if(!src.lastarea) @@ -453,29 +456,34 @@ return 1 return -/mob/living/carbon/u_equip(obj/item/W as obj) - if(!W) return 0 +/mob/living/carbon/unEquip(obj/item/I) //THIS PROC DID NOT CALL ..() + . = ..() //Sets the default return value to what the parent returns. + if(!. || !I) //We don't want to set anything to null if the parent returned 0. + return - else if (W == handcuffed) + if(I == back) + back = null + update_inv_back(0) + else if(I == wear_mask) + if(istype(src, /mob/living/carbon/human)) //If we don't do this hair won't be properly rebuilt. + return + wear_mask = null + update_inv_wear_mask(0) + else if(I == handcuffed) handcuffed = null - update_inv_handcuffed() - - else if (W == legcuffed) + update_inv_handcuffed(0) + else if(I == legcuffed) legcuffed = null - update_inv_legcuffed() - else - ..() - - return + update_inv_legcuffed(0) /mob/living/carbon/show_inv(mob/living/carbon/user as mob) user.set_machine(src) var/dat = {"
[name]


-
Head(Mask): [(wear_mask ? wear_mask : "Nothing")] -
Left Hand: [(l_hand ? l_hand : "Nothing")] -
Right Hand: [(r_hand ? r_hand : "Nothing")] +
Head(Mask): [(wear_mask && !(wear_mask.flags & ABSTRACT)) ? wear_mask : "Nothing"] +
Left Hand: [(l_hand && !(l_hand.flags & ABSTRACT)) ? l_hand : "Nothing"] +
Right Hand: [(r_hand && !(r_hand.flags & ABSTRACT)) ? r_hand : "Nothing"]
Back: [(back ? back : "Nothing")] [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : "")]
[(handcuffed ? text("Handcuffed") : text("Not Handcuffed"))]
[(internal ? text("Remove Internal") : "")] @@ -579,4 +587,4 @@ return /mob/living/carbon/proc/canBeHandcuffed() - return 0 \ No newline at end of file + return 0 diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index 5a28b8af193..12673d50549 100644 --- a/code/modules/mob/living/carbon/give.dm +++ b/code/modules/mob/living/carbon/give.dm @@ -20,6 +20,9 @@ I = usr.r_hand if(!I) return + if((I.flags & NODROP) || (I.flags & ABSTRACT)) + usr << "That's not exactly something you can give." + return if(src.r_hand == null || src.l_hand == null) switch(alert(src,"[usr] wants to give you \a [I]?",,"Yes","No")) if("Yes") diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index f763179550e..dfdd8b41195 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -104,14 +104,14 @@ msg += "[t_He] [t_has] \icon[back] \a [back] on [t_his] back.\n" //left hand - if(l_hand) + if(l_hand && !(l_hand.flags & ABSTRACT)) if(l_hand.blood_DNA) msg += "[t_He] [t_is] holding \icon[l_hand] [l_hand.gender==PLURAL?"some":"a"] blood-stained [l_hand.name] in [t_his] left hand!\n" else msg += "[t_He] [t_is] holding \icon[l_hand] \a [l_hand] in [t_his] left hand.\n" //right hand - if(r_hand) + if(r_hand && !(r_hand.flags & ABSTRACT)) if(r_hand.blood_DNA) msg += "[t_He] [t_is] holding \icon[r_hand] [r_hand.gender==PLURAL?"some":"a"] blood-stained [r_hand.name] in [t_his] right hand!\n" else @@ -130,7 +130,9 @@ //handcuffed? if(handcuffed) - if(istype(handcuffed, /obj/item/weapon/handcuffs/cable)) + if(istype(handcuffed, /obj/item/weapon/restraints/handcuffs/cable/zipties)) + msg += "[t_He] [t_is] \icon[handcuffed] restrained with zipties!\n" + else if(istype(handcuffed, /obj/item/weapon/restraints/handcuffs/cable)) msg += "[t_He] [t_is] \icon[handcuffed] restrained with cable!\n" else msg += "[t_He] [t_is] \icon[handcuffed] handcuffed!\n" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 5f3fa3f4ac5..dfbf9ab673e 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -496,24 +496,24 @@ var/dat = {"
[name]


-
Head(Mask): [(wear_mask ? wear_mask : "Nothing")] -
Left Hand: [(l_hand ? l_hand : "Nothing")] -
Right Hand: [(r_hand ? r_hand : "Nothing")] -
Gloves: [(gloves ? gloves : "Nothing")] -
Eyes: [(glasses ? glasses : "Nothing")] -
Left Ear: [(l_ear ? l_ear : "Nothing")] -
Right Ear: [(r_ear ? r_ear : "Nothing")] -
Head: [(head ? head : "Nothing")] -
Shoes: [(shoes ? shoes : "Nothing")] -
Belt: [(belt ? belt : "Nothing")] [((istype(wear_mask, /obj/item/clothing/mask) && istype(belt, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : "")] -
Uniform: [(w_uniform ? w_uniform : "Nothing")] [(suit) ? ((suit.has_sensor == 1) ? text(" Sensors", src) : "") :] -
(Exo)Suit: [(wear_suit ? wear_suit : "Nothing")] -
Back: [(back ? back : "Nothing")] [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : "")] -
ID: [(wear_id ? wear_id : "Nothing")] -
PDA: [(wear_pda ? wear_pda : "Nothing")] -
Suit Storage: [(s_store ? s_store : "Nothing")] -

Left Pocket ([l_store ? (pickpocket ? l_store.name : "Full") : "Empty"]) -
Right Pocket ([r_store ? (pickpocket ? r_store.name : "Full") : "Empty"]) +
Head(Mask): [(wear_mask && !(wear_mask.flags & ABSTRACT)) ? wear_mask : "Nothing"] +
Left Hand: [(l_hand && !(l_hand.flags & ABSTRACT)) ? l_hand : "Nothing"] +
Right Hand: [(r_hand && !(r_hand.flags&ABSTRACT)) ? r_hand : "Nothing"] +
Gloves: [(gloves && !(gloves.flags & ABSTRACT)) ? gloves : "Nothing"] +
Eyes: [(glasses && !(glasses.flags & ABSTRACT)) ? glasses : "Nothing"] +
Left Ear: [(l_ear && !(l_ear.flags & ABSTRACT)) ? l_ear : "Nothing"] +
Right Ear: [(r_ear && !(r_ear.flags & ABSTRACT)) ? r_ear : "Nothing"] +
Head: [(head && !(head.flags & ABSTRACT)) ? head : "Nothing"] +
Shoes: [(shoes && !(shoes.flags & ABSTRACT)) ? shoes : "Nothing"] +
Belt: [(belt && !(belt.flags & ABSTRACT)) ? belt : "Nothing"] [((istype(wear_mask, /obj/item/clothing/mask) && istype(belt, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : "")] +
Uniform: [(w_uniform && !(w_uniform.flags & ABSTRACT)) ? w_uniform : "Nothing"] [(suit) ? ((suit.has_sensor == 1) ? text(" Sensors", src) : "") :] +
(Exo)Suit: [(wear_suit && !(wear_suit.flags & ABSTRACT)) ? wear_suit : "Nothing"] +
Back: [(back && !(back.flags & ABSTRACT)) ? back : "Nothing"] [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : "")] +
ID: [(wear_id && !(wear_id.flags & ABSTRACT)) ? wear_id : "Nothing"] +
PDA: [(wear_pda && !(wear_pda.flags & ABSTRACT)) ? wear_pda : "Nothing"] +
Suit Storage: [(s_store && !(s_store.flags & ABSTRACT)) ? s_store : "Nothing"] +

Left Pocket ([(l_store && !(l_store.flags & ABSTRACT)) ? (pickpocket ? l_store.name : "Full") : "Empty"]) +
Right Pocket ([(r_store && !(r_store.flags & ABSTRACT)) ? (pickpocket ? r_store.name : "Full") : "Empty"])
Empty Both Pockets

[(handcuffed ? text("Handcuffed") : text("Not Handcuffed"))]
[(legcuffed ? text("Legcuffed") : text(""))] @@ -538,7 +538,21 @@ var/obj/vehicle/V = AM V.RunOver(src) - +// Get rank from ID, ID inside PDA, PDA, ID in wallet, etc. +/mob/living/carbon/human/proc/get_authentification_rank(var/if_no_id = "No id", var/if_no_job = "No job") + var/obj/item/device/pda/pda = wear_id + if (istype(pda)) + if (pda.id) + return pda.id.rank + else + return pda.ownrank + else + var/obj/item/weapon/card/id/id = get_idcard() + if(id) + return id.rank ? id.rank : if_no_job + else + return if_no_id + //gets assignment from ID or ID inside PDA or PDA itself //Useful when player do something with computers /mob/living/carbon/human/proc/get_assignment(var/if_no_id = "No id", var/if_no_job = "No job") @@ -640,20 +654,22 @@ var/obj/item/pocket_item = (pocket_id == slot_r_store ? src.r_store : src.l_store) var/obj/item/place_item = usr.get_active_hand() // Item to place in the pocket, if it's empty - if(pocket_item) + if(pocket_item && !(pocket_item.flags & ABSTRACT)) + if(pocket_item.flags & NODROP) + usr << "You try to empty [src]'s [pocket_side] pocket, it seems to be stuck!" usr << "You try to empty [src]'s [pocket_side] pocket." - else if(place_item && place_item.mob_can_equip(src, pocket_id, 1)) + else if(place_item && place_item.mob_can_equip(src, pocket_id, 1) && !(place_item.flags & ABSTRACT)) usr << "You try to place [place_item] into [src]'s [pocket_side] pocket." else return if(do_mob(usr, src, STRIP_DELAY)) if(pocket_item) - u_equip(pocket_item) + unEquip(pocket_item) usr.put_in_hands(pocket_item) else if(place_item) - usr.u_equip(place_item) + usr.unEquip(place_item) equip_to_slot_if_possible(place_item, pocket_id, 0, 1) // Update strip window @@ -687,11 +703,11 @@ if(do_mob(usr, src, STRIP_DELAY)) if(worn_id) - u_equip(worn_id) + unEquip(worn_id) usr.put_in_hands(worn_id) else if(place_item) - usr.u_equip(place_item) + usr.unEquip(place_item) equip_to_slot_if_possible(place_item, slot_wear_id, 0, 1) // Update strip window @@ -1036,10 +1052,10 @@ /mob/living/carbon/human/abiotic(var/full_body = 0) - if(full_body && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask || src.head || src.shoes || src.w_uniform || src.wear_suit || src.glasses || src.l_ear || src.r_ear || src.gloves))) + if(full_body && ((src.l_hand && !(src.l_hand.flags & ABSTRACT)) || (src.r_hand && !(src.r_hand.flags & ABSTRACT)) || (src.back || src.wear_mask || src.head || src.shoes || src.w_uniform || src.wear_suit || src.glasses || src.l_ear || src.r_ear || src.gloves))) return 1 - if( (src.l_hand && !src.l_hand.abstract) || (src.r_hand && !src.r_hand.abstract) ) + if((src.l_hand && !(src.l_hand.flags & ABSTRACT)) || (src.r_hand && !(src.r_hand.flags & ABSTRACT))) return 1 return 0 diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index ed7c1c9336b..d88d19fe99e 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -176,11 +176,11 @@ if(head) var/obj/item/clothing/head/H = head if(!istype(H) || prob(H.loose)) - drop_from_inventory(H) - if(prob(60)) - step_away(H,M) - visible_message("[M] has knocked [src]'s [H] off!", - "[M] knocked \the [H] clean off your head!") */ + if(unEquip(H)) + if(prob(60)) + step_away(H,M) + visible_message("[M] has knocked [src]'s [H] off!", + "[M] knocked \the [H] clean off your head!") */ var/talked = 0 // BubbleWrap @@ -209,8 +209,8 @@ //End BubbleWrap if(!talked) //BubbleWrap - drop_item() - visible_message("\red [M] has disarmed [src]!") + if(drop_item()) + visible_message("\red [M] has disarmed [src]!") playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) return diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 86c4cc95a26..4db067181cb 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -348,7 +348,7 @@ This function restores all organs. multiplier = 2 var/obj/item/clothing/head/H = head if(!istype(H) || prob(H.loose * multiplier)) - drop_from_inventory(H) + unEquip(H) if(prob(60)) step_rand(H) if(!stat) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 96ea1ab720c..de100bc759b 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -72,7 +72,7 @@ emp_act if(c_hand && (stun_amount || agony_amount > 10)) msg_admin_attack("[src.name] ([src.ckey]) was disarmed by a stun effect") - u_equip(c_hand) + unEquip(c_hand) if (affected.status & ORGAN_ROBOT) emote("me", 1, "drops what they were holding, their [affected.display_name] malfunctioning!") else @@ -198,7 +198,17 @@ emp_act I.emp_act(severity) ..() - +/mob/living/carbon/human/emag_act(user as mob, var/datum/organ/external/affecting) + if(!(affecting.status & ORGAN_ROBOT)) + user << "\red That limb isn't robotic." + return + if(affecting.sabotaged) + user << "\red [src]'s [affecting.display_name] is already sabotaged!" + else + user << "\red You sneakily slide the card into the dataport on [src]'s [affecting.display_name] and short out the safeties." + affecting.sabotaged = 1 + return 1 + //Returns 1 if the attack hit, 0 if it missed. /mob/living/carbon/human/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone) if(!I || !user) return 0 @@ -236,17 +246,8 @@ emp_act return 0 if(istype(I,/obj/item/weapon/card/emag)) - if(!(affecting.status & ORGAN_ROBOT)) - user << "\red That limb isn't robotic." - return - if(affecting.sabotaged) - user << "\red [src]'s [affecting.display_name] is already sabotaged!" - else - user << "\red You sneakily slide [I] into the dataport on [src]'s [affecting.display_name] and short out the safeties." - var/obj/item/weapon/card/emag/emag = I - emag.uses-- - affecting.sabotaged = 1 - return 1 + emag_act(user, affecting) + if(! I.discrete) if(I.attack_verb.len) visible_message("\red [src] has been [pick(I.attack_verb)] in the [hit_area] with [I.name] by [user]!") @@ -337,6 +338,15 @@ emp_act /mob/living/carbon/human/hitby(atom/movable/AM as mob|obj,var/speed = 5) if(istype(AM,/obj/)) var/obj/O = AM + + if(in_throw_mode && !get_active_hand() && speed <= 5) //empty active hand and we're in throw mode + if(canmove && !restrained()) + if(isturf(O.loc)) + put_in_active_hand(O) + visible_message("[src] catches [O]!") + throw_mode_off() + return + var/zone = ran_zone("chest", 65) var/dtype = BRUTE if(istype(O,/obj/item/weapon)) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 80addc967c6..b4f71ada72d 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -104,123 +104,76 @@ if(slot_tie) return 1 -/mob/living/carbon/human/u_equip(obj/item/W as obj) - if(!W) return 0 +/mob/living/carbon/human/unEquip(obj/item/I) + . = ..() //See mob.dm for an explanation on this and some rage about people copypasting instead of calling ..() like they should. + if(!. || !I) + return - var/success - if (W == wear_suit) + if(I == wear_suit) if(s_store) - drop_from_inventory(s_store) - if(W) - success = 1 + unEquip(s_store, 1) //It makes no sense for your suit storage to stay on you if you drop your suit. wear_suit = null - update_inv_wear_suit() - else if (W == w_uniform) - if (r_store) - drop_from_inventory(r_store) - if (l_store) - drop_from_inventory(l_store) - if (wear_id) - drop_from_inventory(wear_id) - if (belt) - drop_from_inventory(belt) + if(I.flags_inv & HIDEJUMPSUIT) + update_inv_w_uniform() + update_inv_wear_suit(0) + else if(I == w_uniform) + if(r_store) + unEquip(r_store, 1) //Again, makes sense for pockets to drop. + if(l_store) + unEquip(l_store, 1) + if(wear_id) + unEquip(wear_id) + if(belt) + unEquip(belt) w_uniform = null - success = 1 - update_inv_w_uniform() - else if (W == gloves) + update_inv_w_uniform(0) + else if(I == gloves) gloves = null - success = 1 - update_inv_gloves() - else if (W == glasses) + update_inv_gloves(0) + else if(I == glasses) glasses = null - success = 1 - update_inv_glasses() - else if (W == head) + update_inv_glasses(0) + else if(I == head) head = null - if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR)) + if(I.flags & BLOCKHAIR) update_hair(0) //rebuild hair - success = 1 - update_inv_head() - else if (W == l_ear) - l_ear = null - success = 1 - update_inv_ears() - else if (W == r_ear) + update_inv_head(0) + else if(I == r_ear) r_ear = null - success = 1 - update_inv_ears() - else if (W == shoes) + update_inv_ears(0) + else if (I == l_ear) + l_ear = null + update_inv_ears(0) + else if(I == shoes) shoes = null - success = 1 - update_inv_shoes() - else if (W == belt) + update_inv_shoes(0) + else if(I == belt) belt = null - success = 1 - update_inv_belt() - else if (W == wear_mask) + update_inv_belt(0) + else if(I == wear_mask) wear_mask = null - success = 1 - if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR)) + if(I.flags & BLOCKHAIR) update_hair(0) //rebuild hair if(internal) if(internals) internals.icon_state = "internal0" internal = null - update_inv_wear_mask() - else if (W == wear_id) + update_inv_wear_mask(0) + else if(I == wear_id) wear_id = null - success = 1 - update_inv_wear_id() - else if (W == wear_pda) - wear_pda = null - success = 1 - update_inv_wear_pda() - else if (W == r_store) + update_inv_wear_id(0) + else if(I == r_store) r_store = null - success = 1 - update_inv_pockets() - else if (W == l_store) + update_inv_pockets(0) + else if(I == l_store) l_store = null - success = 1 - update_inv_pockets() - else if (W == s_store) + update_inv_pockets(0) + else if(I == s_store) s_store = null - success = 1 - update_inv_s_store() - else if (W == back) - back = null - success = 1 - update_inv_back() - else if (W == handcuffed) - handcuffed = null - success = 1 - update_inv_handcuffed() - else if (W == legcuffed) - legcuffed = null - success = 1 - update_inv_legcuffed() - else if (W == r_hand) - r_hand = null - success = 1 - update_inv_r_hand() - else if (W == l_hand) - l_hand = null - success = 1 - update_inv_l_hand() - else - return 0 + update_inv_s_store(0) - if(success) - if (W) - if (client) - client.screen -= W - W.loc = loc - W.dropped(src) - //if(W) - //W.layer = initial(W.layer) update_action_buttons() - return 1 @@ -337,7 +290,7 @@ update_inv_s_store(redraw_mob) if(slot_in_backpack) if(src.get_active_hand() == W) - src.u_equip(W) + src.unEquip(W) W.loc = src.back if(slot_tie) var/obj/item/clothing/under/uniform = src.w_uniform @@ -454,7 +407,7 @@ if("mask") target.attack_log += text("\[[time_stamp()]\] Had their mask removed by [source.name] ([source.ckey])") source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) mask") - if(target.wear_mask && !target.wear_mask.canremove) + if(target.wear_mask && (target.wear_mask.flags & NODROP)) message = "\red [source] fails to take off \a [target.wear_mask] from [target]'s head!" return else if(target.wear_mask) @@ -470,7 +423,7 @@ if("gloves") target.attack_log += text("\[[time_stamp()]\] Has had their gloves ([target.gloves]) removed by [source.name] ([source.ckey])") source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) gloves ([target.gloves])") - if(target.gloves && !target.gloves.canremove) + if(target.gloves && (target.gloves.flags & NODROP)) message = "\red [source] fails to take off \a [target.gloves] from [target]'s hands!" return else if(target.gloves) @@ -478,7 +431,7 @@ if("eyes") target.attack_log += text("\[[time_stamp()]\] Has had their eyewear ([target.glasses]) removed by [source.name] ([source.ckey])") source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) eyewear ([target.glasses])") - if(target.glasses && !target.glasses.canremove) + if(target.glasses && (target.glasses.flags & NODROP)) message = "\red [source] fails to take off \a [target.glasses] from [target]'s eyes!" return else if(target.glasses) @@ -486,7 +439,7 @@ if("l_ear") target.attack_log += text("\[[time_stamp()]\] Has had their left ear item ([target.l_ear]) removed by [source.name] ([source.ckey])") source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) left ear item ([target.l_ear])") - if(target.l_ear && !target.l_ear.canremove) + if(target.l_ear && (target.l_ear.flags & NODROP)) message = "\red [source] fails to take off \a [target.l_ear] from [target]'s left ear!" return else if(target.l_ear) @@ -494,7 +447,7 @@ if("r_ear") target.attack_log += text("\[[time_stamp()]\] Has had their right ear item ([target.r_ear]) removed by [source.name] ([source.ckey])") source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) right ear item ([target.r_ear])") - if(target.r_ear && !target.r_ear.canremove) + if(target.r_ear && (target.r_ear.flags & NODROP)) message = "\red [source] fails to take off \a [target.r_ear] from [target]'s right ear!" return else if(target.r_ear) @@ -502,7 +455,7 @@ if("head") target.attack_log += text("\[[time_stamp()]\] Has had their hat ([target.head]) removed by [source.name] ([source.ckey])") source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) hat ([target.head])") - if(target.head && !target.head.canremove) + if(target.head && (target.head.flags & NODROP)) message = "\red [source] fails to take off \a [target.head] from [target]'s head!" return else if(target.head) @@ -510,7 +463,7 @@ if("shoes") target.attack_log += text("\[[time_stamp()]\] Has had their shoes ([target.shoes]) removed by [source.name] ([source.ckey])") source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) shoes ([target.shoes])") - if(target.shoes && !target.shoes.canremove) + if(target.shoes && (target.shoes.flags & NODROP)) message = "\red [source] fails to take off \a [target.shoes] from [target]'s feet!" return else if(target.shoes) @@ -523,7 +476,7 @@ if("suit") target.attack_log += text("\[[time_stamp()]\] Has had their suit ([target.wear_suit]) removed by [source.name] ([source.ckey])") source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) suit ([target.wear_suit])") - if(target.wear_suit && !target.wear_suit.canremove) + if(target.wear_suit && (target.wear_suit.flags & NODROP)) message = "\red [source] fails to take off \a [target.wear_suit] from [target]'s body!" return else if(target.wear_suit) @@ -550,7 +503,7 @@ for(var/obj/item/I in list(target.l_store, target.r_store)) if(I.on_found(source)) return - if(target.w_uniform && !target.w_uniform.canremove) + if(target.w_uniform && (target.w_uniform.flags & NODROP)) message = "\red [source] fails to take off \a [target.w_uniform] from [target]'s body!" return else @@ -633,7 +586,7 @@ It works in conjuction with the process() above. This proc works for humans only. Aliens stripping humans and the like will all use this proc. Stripping monkeys or somesuch will use their version of this proc. The first if statement for "mask" and such refers to items that are already equipped and un-equipping them. The else statement is for equipping stuff to empty slots. -!canremove refers to variable of /obj/item/clothing which either allows or disallows that item to be removed. +The NODROP flag refers to variable of /obj/item/clothing which either allows or disallows that item to be removed. It can still be worn/put on as normal. */ /obj/effect/equip_e/human/done() //TODO: And rewrite this :< ~Carn @@ -652,11 +605,11 @@ It can still be worn/put on as normal. switch(place) //here we go again... if("mask") slot_to_process = slot_wear_mask - if (target.wear_mask && target.wear_mask.canremove) + if (target.wear_mask && !(target.wear_mask.flags & NODROP)) strip_item = target.wear_mask if("gloves") slot_to_process = slot_gloves - if (target.gloves && target.gloves.canremove) + if (target.gloves && !(target.gloves.flags & NODROP)) strip_item = target.gloves if("eyes") slot_to_process = slot_glasses @@ -672,7 +625,7 @@ It can still be worn/put on as normal. strip_item = target.s_store if("head") slot_to_process = slot_head - if (target.head && target.head.canremove) + if (target.head && !(target.head.flags & NODROP)) strip_item = target.head if("l_ear") slot_to_process = slot_l_ear @@ -684,7 +637,7 @@ It can still be worn/put on as normal. strip_item = target.r_ear if("shoes") slot_to_process = slot_shoes - if (target.shoes && target.shoes.canremove) + if (target.shoes && !(target.shoes.flags & NODROP)) strip_item = target.shoes if("l_hand") if (istype(target, /obj/item/clothing/suit/straight_jacket)) @@ -700,11 +653,11 @@ It can still be worn/put on as normal. strip_item = target.r_hand if("uniform") slot_to_process = slot_w_uniform - if(target.w_uniform && target.w_uniform.canremove) + if(target.w_uniform && !(target.w_uniform.flags & NODROP)) strip_item = target.w_uniform if("suit") slot_to_process = slot_wear_suit - if (target.wear_suit && target.wear_suit.canremove) + if (target.wear_suit && !(target.wear_suit.flags & NODROP)) strip_item = target.wear_suit if("tie") var/obj/item/clothing/under/suit = target.w_uniform @@ -810,7 +763,9 @@ It can still be worn/put on as normal. if(slot_to_process) if(strip_item) //Stripping an item from the mob var/obj/item/W = strip_item - target.u_equip(W) + if((W.flags & NODROP) || (W.flags & ABSTRACT)) //Just to be sure + return + target.unEquip(W) if (target.client) target.client.screen -= W if (W) @@ -820,11 +775,11 @@ It can still be worn/put on as normal. W.add_fingerprint(source) if(slot_to_process == slot_l_store) //pockets! Needs to process the other one too. Snowflake code, wooo! It's not like anyone will rewrite this anytime soon. If I'm wrong then... CONGRATULATIONS! ;) if(target.r_store) - target.u_equip(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store. + target.unEquip(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store. else if(item && target.has_organ_for_slot(slot_to_process)) //Placing an item on the mob if(item.mob_can_equip(target, slot_to_process, 0)) - source.u_equip(item) + source.unEquip(item) target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1) item.dropped(source) source.update_icons() @@ -843,7 +798,7 @@ It can still be worn/put on as normal. if(slot_r_hand) return r_hand return null - + /mob/living/carbon/get_item_by_slot(slot_id) switch(slot_id) if(slot_back) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 8eb38c1e7b0..8319046d5d5 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1537,7 +1537,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc // Not on the station or mining? var/turf/temp_turf = get_turf(remoteview_target) - if((temp_turf.z != 1 && temp_turf.z != 5) || remoteview_target.stat!=CONSCIOUS) + if((!(temp_turf.z in config.contact_levels)) || remoteview_target.stat!=CONSCIOUS) src << "\red Your psy-connection grows too faint to maintain!" isRemoteObserve = 0 if(!isRemoteObserve && client && !client.adminobs) diff --git a/code/modules/mob/living/carbon/human/plasmaman/species.dm b/code/modules/mob/living/carbon/human/plasmaman/species.dm index d940b638373..a9646cdd886 100644 --- a/code/modules/mob/living/carbon/human/plasmaman/species.dm +++ b/code/modules/mob/living/carbon/human/plasmaman/species.dm @@ -24,10 +24,10 @@ H.fire_sprite = "Plasmaman" // Unequip existing suits and hats. - H.u_equip(H.wear_suit) - H.u_equip(H.head) + H.unEquip(H.wear_suit) + H.unEquip(H.head) if(H.mind.assigned_role!="Clown") - H.u_equip(H.wear_mask) + H.unEquip(H.wear_mask) H.equip_or_collect(new /obj/item/clothing/mask/breath(H), slot_wear_mask) var/suit=/obj/item/clothing/suit/space/plasmaman diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 4b9f4f1e107..9a47536c759 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -598,7 +598,7 @@ proc/get_damage_icon_part(damage_state, body_part) standing.icon = 'icons/mob/uniform_fat.dmi' else src << "\red You burst out of \the [w_uniform]!" - drop_from_inventory(w_uniform) + unEquip(w_uniform) return else standing.icon = 'icons/mob/uniform.dmi' @@ -626,7 +626,7 @@ proc/get_damage_icon_part(damage_state, body_part) // Automatically drop anything in store / id / belt if you're not wearing a uniform. //CHECK IF NECESARRY for( var/obj/item/thing in list(r_store, l_store, wear_id, wear_pda, belt) ) // if(thing) // - u_equip(thing) // + unEquip(thing) // if (client) // client.screen -= thing // // @@ -819,14 +819,14 @@ proc/get_damage_icon_part(damage_state, body_part) standing = image("icon" = 'icons/mob/suit_fat.dmi', "icon_state" = "[wear_suit.icon_state]") else src << "\red You burst out of \the [wear_suit]!" - drop_from_inventory(wear_suit) + unEquip(wear_suit) return else standing = image("icon" = 'icons/mob/suit.dmi', "icon_state" = "[wear_suit.icon_state]") if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) ) - drop_from_inventory(handcuffed) + unEquip(handcuffed) drop_l_hand() drop_r_hand() @@ -918,7 +918,7 @@ proc/get_damage_icon_part(damage_state, body_part) var/obj/screen/inventory/L = hud_used.adding[8] R.overlays += image("icon"='icons/mob/screen_gen.dmi', "icon_state"="markus") L.overlays += image("icon"='icons/mob/screen_gen.dmi', "icon_state"="gabrielle") - if(istype(handcuffed, /obj/item/weapon/handcuffs/pinkcuffs)) + if(istype(handcuffed, /obj/item/weapon/restraints/handcuffs/pinkcuffs)) overlays_standing[HANDCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "pinkcuff1") else overlays_standing[HANDCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "handcuff1") diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index cb5be464681..dbdeb728fa6 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -230,7 +230,7 @@ return -/mob/living/carbon/slime/u_equip(obj/item/W as obj) +/mob/living/carbon/slime/unEquip(obj/item/W as obj) return /mob/living/carbon/slime/attack_ui(slot) @@ -897,8 +897,8 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 item_state = "golem" _color = "golem" has_sensor = 0 + flags = ABSTRACT | NODROP armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) - canremove = 0 /obj/item/clothing/suit/golem name = "adamantine shell" @@ -911,21 +911,19 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS|HEAD slowdown = 1.0 flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT - flags = FPRINT | TABLEPASS | ONESIZEFITSALL | STOPSPRESSUREDMAGE + flags = ONESIZEFITSALL | STOPSPRESSUREDMAGE | ABSTRACT | NODROP heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS | HEAD max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS | HEAD min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE - canremove = 0 armor = list(melee = 80, bullet = 20, laser = 20, energy = 10, bomb = 0, bio = 0, rad = 0) /obj/item/clothing/shoes/golem name = "golem's feet" desc = "sturdy adamantine feet" icon_state = "golem" - item_state = null - canremove = 0 - flags = NOSLIP + item_state = "golem" + flags = NOSLIP | ABSTRACT | MASKINTERNALS | MASKCOVERSMOUTH | NODROP slowdown = SHOES_SLOWDOWN+1 @@ -934,18 +932,9 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 desc = "the imposing face of an adamantine golem" icon_state = "golem" item_state = "golem" - canremove = 0 - siemens_coefficient = 0 - unacidable = 1 - -/obj/item/clothing/mask/gas/golem - name = "golem's face" - desc = "the imposing face of an adamantine golem" - icon_state = "golem" - item_state = "golem" - canremove = 0 siemens_coefficient = 0 unacidable = 1 + flags = ABSTRACT | NODROP /obj/item/clothing/gloves/golem @@ -954,7 +943,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 icon_state = "golem" item_state = null siemens_coefficient = 0 - canremove = 0 + flags = ABSTRACT | NODROP /obj/item/clothing/head/space/golem @@ -963,9 +952,8 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 _color = "dermal" name = "golem's head" desc = "a golem's head" - canremove = 0 unacidable = 1 - flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE + flags = STOPSPRESSUREDMAGE | ABSTRACT | NODROP heat_protection = HEAD max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE armor = list(melee = 80, bullet = 20, laser = 20, energy = 10, bomb = 0, bio = 0, rad = 0) @@ -1142,7 +1130,6 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75 desc = "Allows you to change your slimeperson color, once." icon = 'icons/obj/device.dmi' icon_state = "t-ray0" - flags = TABLEPASS force = 1.0 w_class = 1.0 throwforce = 1.0 diff --git a/code/modules/mob/living/carbon/monkey/diona.dm b/code/modules/mob/living/carbon/monkey/diona.dm index a90868c1c8c..4039156e506 100644 --- a/code/modules/mob/living/carbon/monkey/diona.dm +++ b/code/modules/mob/living/carbon/monkey/diona.dm @@ -193,7 +193,7 @@ adult.rename_self("diona") for (var/obj/item/W in src.contents) - src.drop_from_inventory(W) + src.unEquip(W) del(src) diff --git a/code/modules/mob/living/carbon/monkey/inventory.dm b/code/modules/mob/living/carbon/monkey/inventory.dm index cfb4029609f..8ccadd0349c 100644 --- a/code/modules/mob/living/carbon/monkey/inventory.dm +++ b/code/modules/mob/living/carbon/monkey/inventory.dm @@ -41,7 +41,7 @@ var/message = null switch(place) if("mask") - if(istype(target.wear_mask, /obj/item/clothing)&&!target.wear_mask:canremove) + if(istype(target.wear_mask, /obj/item/clothing)&&(target.wear_mask:flags & NODROP)) message = text("\red [] fails to take off \a [] from []'s body!", source, target.wear_mask, target) else message = text("\red [] is trying to take off \a [] from []'s head!", source, target.wear_mask, target) @@ -76,10 +76,10 @@ switch(place) if("mask") if (target.wear_mask) - if(istype(target.wear_mask, /obj/item/clothing)&& !target.wear_mask:canremove) + if(istype(target.wear_mask, /obj/item/clothing)&& (target.wear_mask:flags & NODROP)) return var/obj/item/W = target.wear_mask - target.u_equip(W) + target.unEquip(W) if (target.client) target.client.screen -= W if (W) @@ -97,7 +97,7 @@ if("l_hand") if (target.l_hand) var/obj/item/W = target.l_hand - target.u_equip(W) + target.unEquip(W) if (target.client) target.client.screen -= W if (W) @@ -117,7 +117,7 @@ if("r_hand") if (target.r_hand) var/obj/item/W = target.r_hand - target.u_equip(W) + target.unEquip(W) if (target.client) target.client.screen -= W if (W) @@ -137,7 +137,7 @@ if("back") if (target.back) var/obj/item/W = target.back - target.u_equip(W) + target.unEquip(W) if (target.client) target.client.screen -= W if (W) @@ -155,7 +155,7 @@ if("handcuff") if (target.handcuffed) var/obj/item/W = target.handcuffed - target.u_equip(W) + target.unEquip(W) if (target.client) target.client.screen -= W if (W) @@ -164,7 +164,7 @@ W.layer = initial(W.layer) W.add_fingerprint(source) else - if (istype(item, /obj/item/weapon/handcuffs)) + if (istype(item, /obj/item/weapon/restraints/handcuffs)) source.drop_item() target.handcuffed = item item.loc = target @@ -199,7 +199,7 @@ if(!istype(W)) return if(W == get_active_hand()) - u_equip(W) + unEquip(W) switch(slot) if(slot_back) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index c3f4c035292..290f356cb60 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -274,11 +274,11 @@ if ((O.client && !( O.blinded ))) O.show_message(text("\red [] has pushed down [name]!", M), 1) else - drop_item() - playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [] has disarmed [name]!", M), 1) + if(drop_item()) + playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) + for(var/mob/O in viewers(src, null)) + if ((O.client && !( O.blinded ))) + O.show_message(text("\red [] has disarmed [name]!", M), 1) return /mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M as mob) @@ -344,10 +344,10 @@ if ((O.client && !( O.blinded ))) O.show_message(text("\red [] has tackled down [name]!", M), 1) else - drop_item() - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [] has disarmed [name]!", M), 1) + if(drop_item()) + for(var/mob/O in viewers(src, null)) + if ((O.client && !( O.blinded ))) + O.show_message(text("\red [] has disarmed [name]!", M), 1) adjustBruteLoss(damage) updatehealth() return diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 737a44342b0..246f6a1ba01 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -286,11 +286,11 @@ var/mob/living/carbon/C = src if (C.handcuffed && !initial(C.handcuffed)) - C.drop_from_inventory(C.handcuffed) + C.unEquip(C.handcuffed) C.handcuffed = initial(C.handcuffed) if (C.legcuffed && !initial(C.legcuffed)) - C.drop_from_inventory(C.legcuffed) + C.unEquip(C.legcuffed) C.legcuffed = initial(C.legcuffed) hud_updateflag |= 1 << HEALTH_HUD hud_updateflag |= 1 << STATUS_HUD @@ -466,7 +466,7 @@ var/mob/M = H.loc //Get our mob holder (if any). if(istype(M)) - M.drop_from_inventory(H) + M.unEquip(H) M << "[H] wriggles out of your grip!" src << "You wriggle out of [M]'s grip!" else if(istype(H.loc,/obj/item)) @@ -658,8 +658,8 @@ CM.handcuffed = null CM.update_inv_handcuffed() else - var/obj/item/weapon/handcuffs/HC = CM.handcuffed - var/breakouttime = 1200 //A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type + var/obj/item/weapon/restraints/handcuffs/HC = CM.handcuffed + var/breakouttime = 1200 //A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/restraints/handcuffs type var/displaytime = 2 //Minutes to display in the "this will take X minutes." if(istype(HC)) //If you are handcuffed with actual handcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future... breakouttime = HC.breakouttime @@ -674,7 +674,7 @@ for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink O.show_message("\red [CM] manages to remove the handcuffs!", 1) CM << "\blue You successfully remove \the [CM.handcuffed]." - CM.drop_from_inventory(CM.handcuffed) + CM.unEquip(CM.handcuffed) else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time)) CM.next_move = world.time + 100 @@ -695,7 +695,7 @@ CM.legcuffed = null CM.update_inv_legcuffed() else - var/obj/item/weapon/legcuffs/HC = CM.legcuffed + var/obj/item/weapon/restraints/legcuffs/HC = CM.legcuffed var/breakouttime = 1200 //A default in case you are somehow legcuffed with something that isn't an obj/item/weapon/legcuffs type var/displaytime = 2 //Minutes to display in the "this will take X minutes." if(istype(HC)) //If you are legcuffed with actual legcuffs... Well what do I know, maybe someone will want to legcuff you with toilet paper in the future... @@ -711,7 +711,7 @@ for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink O.show_message("\red [CM] manages to remove the legcuffs!", 1) CM << "\blue You successfully remove \the [CM.legcuffed]." - CM.drop_from_inventory(CM.legcuffed) + CM.unEquip(CM.legcuffed) CM.legcuffed = null CM.update_inv_legcuffed() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 1fabedb239c..117a2d127d5 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -1,3 +1,6 @@ +#define AI_CHECK_WIRELESS 1 +#define AI_CHECK_RADIO 2 + var/list/ai_list = list() //Not sure why this is necessary... @@ -63,7 +66,7 @@ var/list/ai_list = list() var/obj/item/borg/sight/hud/sec/sechud = null var/obj/item/borg/sight/hud/med/healthhud = null - + var/arrivalmsg = "$name, $rank, has arrived on the station." /mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/device/mmi/B, var/safety = 0) @@ -77,8 +80,8 @@ var/list/ai_list = list() possibleNames -= pickedName pickedName = null - real_name = pickedName - name = real_name + aiPDA = new/obj/item/device/pda/ai(src) + SetName(pickedName) anchored = 1 canmove = 0 density = 1 @@ -96,11 +99,6 @@ var/list/ai_list = list() verbs += /mob/living/silicon/ai/proc/show_laws_verb - aiPDA = new/obj/item/device/pda/ai(src) - aiPDA.owner = name - aiPDA.ownjob = "AI" - aiPDA.name = name + " (" + aiPDA.ownjob + ")" - aiMulti = new(src) aiRadio = new(src) aiRadio.myAi = src @@ -112,7 +110,7 @@ var/list/ai_list = list() if (istype(loc, /turf)) verbs.Add(/mob/living/silicon/ai/proc/ai_network_change, \ /mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \ - /mob/living/silicon/ai/proc/toggle_camera_light, /mob/living/silicon/ai/proc/botcall, /mob/living/silicon/ai/proc/control_integrated_radio, /mob/living/silicon/ai/proc/control_hud, /mob/living/silicon/ai/proc/change_arrival_message) + /mob/living/silicon/ai/proc/toggle_camera_light, /mob/living/silicon/ai/proc/botcall, /mob/living/silicon/ai/proc/control_integrated_radio, /mob/living/silicon/ai/proc/control_hud, /mob/living/silicon/ai/proc/change_arrival_message, /mob/living/silicon/ai/proc/ai_store_location, /mob/living/silicon/ai/proc/ai_goto_location, /mob/living/silicon/ai/proc/ai_remove_location, /mob/living/silicon/ai/proc/nano_crew_monitor, /mob/living/silicon/ai/proc/ai_cancel_call) if(!safety)//Only used by AIize() to successfully spawn an AI. if (!B)//If there is no player/brain inside. @@ -127,7 +125,7 @@ var/list/ai_list = list() verbs.Remove(,/mob/living/silicon/ai/proc/ai_call_shuttle,/mob/living/silicon/ai/proc/ai_camera_track, \ /mob/living/silicon/ai/proc/ai_camera_list, /mob/living/silicon/ai/proc/ai_network_change, \ /mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \ - /mob/living/silicon/ai/proc/toggle_camera_light,/mob/living/silicon/ai/verb/pick_icon,/mob/living/silicon/ai/proc/control_hud) + /mob/living/silicon/ai/proc/toggle_camera_light,/mob/living/silicon/ai/verb/pick_icon,/mob/living/silicon/ai/proc/control_hud, /mob/living/silicon/ai/proc/change_arrival_message, /mob/living/silicon/ai/proc/ai_cancel_call) laws = new /datum/ai_laws/alienmov else B.brainmob.mind.transfer_to(src) @@ -155,11 +153,25 @@ var/list/ai_list = list() hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank") hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank") hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + init_subsystems() + ai_list += src ..() return + +/mob/living/silicon/ai/proc/SetName(pickedName as text) + real_name = pickedName + name = pickedName + if(eyeobj) + eyeobj.name = "[pickedName] (AI Eye)" + + // Set ai pda name + if(aiPDA) + aiPDA.ownjob = "AI" + aiPDA.owner = pickedName + aiPDA.name = pickedName + " (" + aiPDA.ownjob + ")" /mob/living/silicon/ai/Destroy() ai_list -= src @@ -301,14 +313,15 @@ var/list/ai_list = list() if(src.stat == 2) src << "You can't call the shuttle because you are dead!" return - if(istype(usr,/mob/living/silicon/ai)) - var/mob/living/silicon/ai/AI = src - if(AI.control_disabled) - usr << "Wireless control is disabled!" - return + + if(check_unable(AI_CHECK_WIRELESS)) + return var/confirm = alert("Are you sure you want to call the shuttle?", "Confirm Shuttle Call", "Yes", "No") + if(check_unable(AI_CHECK_WIRELESS)) + return + if(confirm == "Yes") call_shuttle_proc(src) @@ -317,38 +330,57 @@ var/list/ai_list = list() var/obj/machinery/computer/communications/C = locate() in machines if(C) C.post_status("shuttle") - return + +/mob/living/silicon/ai/proc/ai_cancel_call() + set name = "Recall Emergency Shuttle" + set category = "AI Commands" + + if(src.stat == 2) + src << "You can't send the shuttle back because you are dead!" + return + + if(check_unable(AI_CHECK_WIRELESS)) + return + + var/confirm = alert("Are you sure you want to recall the shuttle?", "Confirm Shuttle Recall", "Yes", "No") + + if(check_unable(AI_CHECK_WIRELESS)) + return + + if(confirm == "Yes") + cancel_call_proc(src) /mob/living/silicon/ai/cancel_camera() src.view_core() /mob/living/silicon/ai/verb/toggle_anchor() - set category = "AI Commands" - set name = "Toggle Floor Bolts" - if(!isturf(loc)) // if their location isn't a turf - return // stop - anchored = !anchored // Toggles the anchor + set category = "AI Commands" + set name = "Toggle Floor Bolts" + + if(!isturf(loc)) // if their location isn't a turf + return // stop + + anchored = !anchored // Toggles the anchor - src << "[anchored ? "You are now anchored." : "You are now unanchored."]" - // the message in the [] will change depending whether or not the AI is anchored + src << "[anchored ? "You are now anchored." : "You are now unanchored."]" /mob/living/silicon/ai/update_canmove() return 0 - - -/mob/living/silicon/ai/proc/ai_cancel_call() - set category = "Malfunction" + +/mob/living/silicon/ai/proc/announcement() + set name = "Announcement" + set desc = "Create a vocal announcement by typing in the available words to create a sentence." + set category = "AI Commands" + if(src.stat == 2) - src << "You can't send the shuttle back because you are dead!" + src << "You can't call make an announcement because you are dead!" return - if(istype(usr,/mob/living/silicon/ai)) - var/mob/living/silicon/ai/AI = src - if(AI.control_disabled) - src << "Wireless control is disabled!" - return - cancel_call_proc(src) - return + + if(check_unable(AI_CHECK_WIRELESS | AI_CHECK_RADIO)) + return + + ai_announcement() /mob/living/silicon/ai/check_eye(var/mob/user as mob) if (!current) @@ -406,7 +438,7 @@ var/list/ai_list = list() unset_machine() src << browse(null, t1) if (href_list["switchcamera"]) - switchCamera(locate(href_list["switchcamera"])) in cameranet.viewpoints + switchCamera(locate(href_list["switchcamera"])) in cameranet.cameras if (href_list["showalerts"]) ai_alerts() //Carn: holopad requests @@ -581,18 +613,17 @@ var/list/ai_list = list() src << "Critical error. System offline." return - if(control_disabled) - src << "Wireless communication is disabled." + if(check_unable(AI_CHECK_WIRELESS | AI_CHECK_RADIO)) return - var/turf/ai_current_turf = get_turf(src) - var/ai_Zlevel = ai_current_turf.z + + var/ai_allowed_Zlevel = list(1,3,5) var/d var/area/bot_area d += "Query network status
" d += "" for (Bot in aibots) - if(Bot.z == ai_Zlevel && !Bot.remote_disabled) //Only non-emagged bots on the same Z-level are detected! + if((Bot.z in ai_allowed_Zlevel) && !Bot.remote_disabled) //Only non-emagged bots on the allowed Z-level are detected! bot_area = get_area(Bot) d += "" //If the bot is on, it will display the bot's current mode status. If the bot is not mode, it will just report "Idle". "Inactive if it is not on at all. @@ -631,8 +662,6 @@ var/list/ai_list = list() /mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C) - src.cameraFollow = null - if (!C || stat == 2) //C.can_use()) return 0 @@ -706,8 +735,10 @@ var/list/ai_list = list() set category = "AI Commands" set name = "Jump To Network" unset_machine() - src.cameraFollow = null var/cameralist[0] + + if(check_unable()) + return if(usr.stat == 2) usr << "You can't change your camera network because you are dead!" @@ -715,16 +746,19 @@ var/list/ai_list = list() var/mob/living/silicon/ai/U = usr - for (var/obj/machinery/camera/C in cameranet.viewpoints) + for (var/obj/machinery/camera/C in cameranet.cameras) if(!C.can_use()) continue - var/list/tempnetwork = difflist(C.network,RESTRICTED_CAMERA_NETWORKS,1) + var/list/tempnetwork = difflist(C.network,restricted_camera_networks,1) if(tempnetwork.len) for(var/i in tempnetwork) cameralist[i] = i var/old_network = network network = input(U, "Which network would you like to view?") as null|anything in cameralist + + if(check_unable()) + return if(!U.eyeobj) U.view_core() @@ -733,7 +767,7 @@ var/list/ai_list = list() if(isnull(network)) network = old_network // If nothing is selected else - for(var/obj/machinery/camera/C in cameranet.viewpoints) + for(var/obj/machinery/camera/C in cameranet.cameras) if(!C.can_use()) continue if(network in C.network) @@ -756,8 +790,16 @@ var/list/ai_list = list() if(usr.stat == 2) usr <<"You cannot change your emotional status because you are dead!" return + + if(check_unable()) + return + var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Sad", "BSOD", "Blank", "Problems?", "Awesome", "Facepalm", "Friend Computer") var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions + + if(check_unable()) + return + for (var/obj/machinery/M in machines) //change status if(istype(M, /obj/machinery/ai_status_display)) var/obj/machinery/ai_status_display/AISD = M @@ -777,6 +819,9 @@ var/list/ai_list = list() set name = "Change Hologram" set desc = "Change the default hologram available to AI to something else." set category = "AI Commands" + + if(check_unable()) + return var/input if(alert("Would you like to select a hologram based on a crew member or switch to unique avatar?",,"Crew Member","Unique")=="Crew Member") @@ -831,6 +876,9 @@ var/list/ai_list = list() if(stat != CONSCIOUS) return + + if(check_unable()) + return camera_light_on = !camera_light_on src << "Camera lights [camera_light_on ? "activated" : "deactivated"]." @@ -846,12 +894,12 @@ var/list/ai_list = list() set desc = "Augment visual feed with internal sensor overlays." set category = "AI Commands" toggle_sensor_mode() - + /mob/living/silicon/ai/proc/change_arrival_message() set name = "Set Arrival Message" set desc = "Change the message that's transmitted when a new crew member arrives on station." set category = "AI Commands" - + var/newmsg = input("What would you like the arrival message to be? Use $name to substitute the crew member's name, and use $rank to substitute the crew member's rank.", "Change Arrival Message", arrivalmsg) as text if(newmsg != arrivalmsg) arrivalmsg = newmsg @@ -908,7 +956,80 @@ var/list/ai_list = list() set name = "Radio Settings" set desc = "Allows you to change settings of your radio." set category = "AI Commands" - - src << "Accessing Subspace Transceiver control..." + + if(check_unable(AI_CHECK_RADIO)) + return + + src << "Accessing Subspace Transceiver control..." if (src.aiRadio) src.aiRadio.interact(src) + + +/mob/living/silicon/ai/proc/open_nearest_door(mob/living/target as mob) + if(!istype(target)) return + spawn(0) + if(istype(target, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = target + if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate)) + src << "Unable to locate an airlock" + return + if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate)) + src << "Unable to locate an airlock" + return + if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && (H.head.flags & NODROP)) + src << "Unable to locate an airlock" + return + if(H.digitalcamo) + src << "Unable to locate an airlock" + return + if (!near_camera(target)) + src << "Target is not near any active cameras." + return + var/obj/machinery/door/airlock/tobeopened + var/dist = -1 + for(var/obj/machinery/door/airlock/D in range(3,target)) + if(!D.density) continue + if(dist < 0) + dist = get_dist(D, target) + //world << dist + tobeopened = D + else + if(dist > get_dist(D, target)) + dist = get_dist(D, target) + //world << dist + tobeopened = D + //world << "found [tobeopened.name] closer" + else + //world << "[D.name] not close enough | [get_dist(D, target)] | [dist]" + if(tobeopened) + switch(alert(src, "Do you want to open \the [tobeopened] for [target]?","Doorknob_v2a.exe","Yes","No")) + if("Yes") + var/nhref = "src=\ref[tobeopened];aiEnable=7" + tobeopened.Topic(nhref, params2list(nhref), tobeopened, 1) + src << "\blue You've opened \the [tobeopened] for [target]." + if("No") + src << "\red You deny the request." + else + src << "\red You've failed to open an airlock for [target]" + return + + +/mob/living/silicon/ai/proc/check_unable(var/flags = 0) + if(stat == DEAD) + usr << "\red You are dead!" + return 1 + + if((flags & AI_CHECK_WIRELESS) && src.control_disabled) + usr << "\red Wireless control is disabled!" + return 1 + if((flags & AI_CHECK_RADIO) && src.aiRadio.disabledAi) + src << "\red System Error - Transceiver Disabled!" + return 1 + return 0 + +/mob/living/silicon/ai/proc/is_in_chassis() + return istype(loc, /turf) + +#undef AI_CHECK_WIRELESS +#undef AI_CHECK_RADIO + diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index c9541858467..dfa05ddc5d0 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -15,21 +15,21 @@ var/callshuttle = 0 for(var/obj/machinery/computer/communications/commconsole in world) - if(commconsole.z == 2) + if((commconsole.z in config.admin_levels)) continue if(istype(commconsole.loc,/turf)) break callshuttle++ for(var/obj/item/weapon/circuitboard/communications/commboard in world) - if(commboard.z == 2) + if((commboard.z in config.admin_levels)) continue if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage)) break callshuttle++ for(var/mob/living/silicon/ai/shuttlecaller in player_list) - if(shuttlecaller.z == 2) + if((shuttlecaller.z in config.admin_levels)) continue if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf)) break diff --git a/code/modules/mob/living/silicon/ai/freelook/cameranet.dm b/code/modules/mob/living/silicon/ai/freelook/cameranet.dm index b0caf3b4a69..584af962874 100644 --- a/code/modules/mob/living/silicon/ai/freelook/cameranet.dm +++ b/code/modules/mob/living/silicon/ai/freelook/cameranet.dm @@ -1,25 +1,156 @@ -/datum/visibility_network/cameras - ChunkType = /datum/visibility_chunk/camera +// CAMERA NET +// +// The datum containing all the chunks. -/datum/visibility_network/cameras/getViewpointFromMob(var/mob/currentMob) - var/mob/living/silicon/robot/currentRobot=currentMob - if(currentRobot) - return currentRobot.camera - return FALSE +var/datum/cameranet/cameranet = new() -/datum/visibility_network/cameras/validViewpoint(var/viewpoint) - var/obj/machinery/camera/c = viewpoint - if (!c) - return FALSE - return c.can_use() +/datum/cameranet + // The cameras on the map, no matter if they work or not. Updated in obj/machinery/camera.dm by New() and Del(). + var/list/cameras = list() + var/cameras_unsorted = 1 + // The chunks of the map, mapping the areas that the cameras can see. + var/list/chunks = list() + var/ready = 0 +/datum/cameranet/proc/process_sort() + if(cameras_unsorted) + cameras = dd_sortedObjectList(cameras) + cameras_unsorted = 0 -// adding some indirection so that I don't have to edit a ton of files -/datum/visibility_network/cameras/proc/addCamera(var/camera) - return addViewpoint(camera) +// Checks if a chunk has been Generated in x, y, z. +/datum/cameranet/proc/chunkGenerated(x, y, z) + x &= ~0xf + y &= ~0xf + var/key = "[x],[y],[z]" + return (chunks[key]) -/datum/visibility_network/cameras/proc/removeCamera(var/camera) - return removeViewpoint(camera) +// Returns the chunk in the x, y, z. +// If there is no chunk, it creates a new chunk and returns that. +/datum/cameranet/proc/getCameraChunk(x, y, z) + x &= ~0xf + y &= ~0xf + var/key = "[x],[y],[z]" + if(!chunks[key]) + chunks[key] = new /datum/camerachunk(null, x, y, z) -/datum/visibility_network/cameras/proc/checkCameraVis(var/atom/target) - return checkCanSee(target) + return chunks[key] + +// Updates what the aiEye can see. It is recommended you use this when the aiEye moves or it's location is set. + +/datum/cameranet/proc/visibility(mob/aiEye/ai) + // 0xf = 15 + var/x1 = max(0, ai.x - 16) & ~0xf + var/y1 = max(0, ai.y - 16) & ~0xf + var/x2 = min(world.maxx, ai.x + 16) & ~0xf + var/y2 = min(world.maxy, ai.y + 16) & ~0xf + + var/list/visibleChunks = list() + + for(var/x = x1; x <= x2; x += 16) + for(var/y = y1; y <= y2; y += 16) + visibleChunks += getCameraChunk(x, y, ai.z) + + var/list/remove = ai.visibleCameraChunks - visibleChunks + var/list/add = visibleChunks - ai.visibleCameraChunks + + for(var/chunk in remove) + var/datum/camerachunk/c = chunk + c.remove(ai) + + for(var/chunk in add) + var/datum/camerachunk/c = chunk + c.add(ai) + +// Updates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open. + +/datum/cameranet/proc/updateVisibility(atom/A, var/opacity_check = 1) + + if(!ticker || (opacity_check && !A.opacity)) + return + majorChunkChange(A, 2) + +/datum/cameranet/proc/updateChunk(x, y, z) + // 0xf = 15 + if(!chunkGenerated(x, y, z)) + return + var/datum/camerachunk/chunk = getCameraChunk(x, y, z) + chunk.hasChanged() + +// Removes a camera from a chunk. + +/datum/cameranet/proc/removeCamera(obj/machinery/camera/c) + if(c.can_use()) + majorChunkChange(c, 0) + +// Add a camera to a chunk. + +/datum/cameranet/proc/addCamera(obj/machinery/camera/c) + if(c.can_use()) + majorChunkChange(c, 1) + +// Used for Cyborg cameras. Since portable cameras can be in ANY chunk. + +/datum/cameranet/proc/updatePortableCamera(obj/machinery/camera/c) + if(c.can_use()) + majorChunkChange(c, 1) + //else + // majorChunkChange(c, 0) + +// Never access this proc directly!!!! +// This will update the chunk and all the surrounding chunks. +// It will also add the atom to the cameras list if you set the choice to 1. +// Setting the choice to 0 will remove the camera from the chunks. +// If you want to update the chunks around an object, without adding/removing a camera, use choice 2. + +/datum/cameranet/proc/majorChunkChange(atom/c, var/choice) + // 0xf = 15 + if(!c) + return + + var/turf/T = get_turf(c) + if(T) + var/x1 = max(0, T.x - 8) & ~0xf + var/y1 = max(0, T.y - 8) & ~0xf + var/x2 = min(world.maxx, T.x + 8) & ~0xf + var/y2 = min(world.maxy, T.y + 8) & ~0xf + + //world << "X1: [x1] - Y1: [y1] - X2: [x2] - Y2: [y2]" + + for(var/x = x1; x <= x2; x += 16) + for(var/y = y1; y <= y2; y += 16) + if(chunkGenerated(x, y, T.z)) + var/datum/camerachunk/chunk = getCameraChunk(x, y, T.z) + if(choice == 0) + // Remove the camera. + chunk.cameras -= c + else if(choice == 1) + // You can't have the same camera in the list twice. + chunk.cameras |= c + chunk.hasChanged() + +// Will check if a mob is on a viewable turf. Returns 1 if it is, otherwise returns 0. + +/datum/cameranet/proc/checkCameraVis(mob/living/target as mob) + + // 0xf = 15 + var/turf/position = get_turf(target) + return checkTurfVis(position) + +/datum/cameranet/proc/checkTurfVis(var/turf/position) + var/datum/camerachunk/chunk = getCameraChunk(position.x, position.y, position.z) + if(chunk) + if(chunk.changed) + chunk.hasChanged(1) // Update now, no matter if it's visible or not. + if(chunk.visibleTurfs[position]) + return 1 + return 0 + +// Debug verb for VVing the chunk that the turf is in. +/* +/turf/verb/view_chunk() + set src in world + + if(cameranet.chunkGenerated(x, y, z)) + var/datum/camerachunk/chunk = cameranet.getCameraChunk(x, y, z) + usr.client.debug_variables(chunk) +*/ \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/freelook/chunk.dm b/code/modules/mob/living/silicon/ai/freelook/chunk.dm index ba4e7892f57..fda4ef2f78e 100644 --- a/code/modules/mob/living/silicon/ai/freelook/chunk.dm +++ b/code/modules/mob/living/silicon/ai/freelook/chunk.dm @@ -1,23 +1,168 @@ -/datum/visibility_chunk/camera +#define UPDATE_BUFFER 25 // 2.5 seconds -/datum/visibility_chunk/camera/validViewpoint(var/viewpoint) - var/obj/machinery/camera/c = viewpoint - if(!c) - return FALSE - if(!c.can_use()) - return FALSE - var/turf/point = locate(src.x + 8, src.y + 8, src.z) - if(get_dist(point, c) > 24) - return FALSE - return TRUE +// CAMERA CHUNK +// +// A 16x16 grid of the map with a list of turfs that can be seen, are visible and are dimmed. +// Allows the AI Eye to stream these chunks and know what it can and cannot see. +/datum/camerachunk + var/list/obscuredTurfs = list() + var/list/visibleTurfs = list() + var/list/obscured = list() + var/list/cameras = list() + var/list/turfs = list() + var/list/seenby = list() + var/visible = 0 + var/changed = 0 + var/updating = 0 + var/x = 0 + var/y = 0 + var/z = 0 -/datum/visibility_chunk/camera/getVisibleTurfsForViewpoint(var/viewpoint) - var/obj/machinery/camera/c = viewpoint - return c.can_see() +// Add an AI eye to the chunk, then update if changed. +/datum/camerachunk/proc/add(mob/aiEye/ai) + if(!ai.ai) + return + ai.visibleCameraChunks += src + if(ai.ai.client) + ai.ai.client.images += obscured + visible++ + seenby += ai + if(changed && !updating) + update() + +// Remove an AI eye from the chunk, then update if changed. + +/datum/camerachunk/proc/remove(mob/aiEye/ai) + if(!ai.ai) + return + ai.visibleCameraChunks -= src + if(ai.ai.client) + ai.ai.client.images -= obscured + seenby -= ai + if(visible > 0) + visible-- + +// Called when a chunk has changed. I.E: A wall was deleted. + +/datum/camerachunk/proc/visibilityChanged(turf/loc) + if(!visibleTurfs[loc]) + return + hasChanged() + +// Updates the chunk, makes sure that it doesn't update too much. If the chunk isn't being watched it will +// instead be flagged to update the next time an AI Eye moves near it. + +/datum/camerachunk/proc/hasChanged(var/update_now = 0) + if(visible || update_now) + if(!updating) + updating = 1 + spawn(UPDATE_BUFFER) // Batch large changes, such as many doors opening or closing at once + update() + updating = 0 + else + changed = 1 + +// The actual updating. It gathers the visible turfs from cameras and puts them into the appropiate lists. + +/datum/camerachunk/proc/update() + + set background = 1 + + var/list/newVisibleTurfs = list() + + for(var/camera in cameras) + var/obj/machinery/camera/c = camera + + if(!c) + continue + + if(!c.can_use()) + continue + + var/turf/point = locate(src.x + 8, src.y + 8, src.z) + if(get_dist(point, c) > 24) + continue + + for(var/turf/t in c.can_see()) + newVisibleTurfs[t] = t + + // Removes turf that isn't in turfs. + newVisibleTurfs &= turfs + + var/list/visAdded = newVisibleTurfs - visibleTurfs + var/list/visRemoved = visibleTurfs - newVisibleTurfs + + visibleTurfs = newVisibleTurfs + obscuredTurfs = turfs - newVisibleTurfs + + for(var/turf in visAdded) + var/turf/t = turf + if(t.obscured) + obscured -= t.obscured + for(var/eye in seenby) + var/mob/aiEye/m = eye + if(!m || !m.ai) + continue + if(m.ai.client) + m.ai.client.images -= t.obscured + + for(var/turf in visRemoved) + var/turf/t = turf + if(obscuredTurfs[t]) + if(!t.obscured) + t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15) + + obscured += t.obscured + for(var/eye in seenby) + var/mob/aiEye/m = eye + if(!m || !m.ai) + seenby -= m + continue + if(m.ai.client) + m.ai.client.images += t.obscured + +// Create a new camera chunk, since the chunks are made as they are needed. + +/datum/camerachunk/New(loc, x, y, z) + + // 0xf = 15 + x &= ~0xf + y &= ~0xf + + src.x = x + src.y = y + src.z = z -/datum/visibility_chunk/camera/findNearbyViewpoints() for(var/obj/machinery/camera/c in range(16, locate(x + 8, y + 8, z))) if(c.can_use()) - viewpoints += c + cameras += c + + for(var/turf/t in range(10, locate(x + 8, y + 8, z))) + if(t.x >= x && t.y >= y && t.x < x + 16 && t.y < y + 16) + turfs[t] = t + + for(var/camera in cameras) + var/obj/machinery/camera/c = camera + if(!c) + continue + + if(!c.can_use()) + continue + + for(var/turf/t in c.can_see()) + visibleTurfs[t] = t + + // Removes turf that isn't in turfs. + visibleTurfs &= turfs + + obscuredTurfs = turfs - visibleTurfs + + for(var/turf in obscuredTurfs) + var/turf/t = turf + if(!t.obscured) + t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15) + obscured += t.obscured + +#undef UPDATE_BUFFER \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index c2c23b02188..ec02433c46a 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -1,13 +1,12 @@ // AI EYE // -// A mob that the AI controls to look around the station with. +// An invisible (no icon) mob that the AI controls to look around the station with. // It streams chunks as it moves around, which will show it what the AI can and cannot see. /mob/aiEye name = "Inactive AI Eye" - icon = 'icons/mob/AI.dmi' - icon_state = "eye" - alpha = 127 + icon = 'icons/obj/status_display.dmi' // For AI friend secret shh :o + var/list/visibleCameraChunks = list() var/mob/living/silicon/ai/ai = null density = 0 status_flags = GODMODE // You can't damage it. @@ -15,20 +14,16 @@ see_in_dark = 7 invisibility = INVISIBILITY_AI_EYE -/mob/aiEye/New() - ..() - visibility_interface = new /datum/visibility_interface/ai_eye(src) - // Movement code. Returns 0 to stop air movement from moving it. /mob/aiEye/Move() return 0 // Hide popout menu verbs -/mob/aiEye/examine() +/mob/aiEye/examine(atom/A as mob|obj|turf in view()) set popup_menu = 0 set src = usr.contents return 0 - + /mob/aiEye/pull() set popup_menu = 0 set src = usr.contents @@ -41,11 +36,15 @@ // Use this when setting the aiEye's location. // It will also stream the chunk that the new loc is in. +/mob/aiEye/setLoc(var/T, var/cancel_tracking = 1) -/mob/aiEye/setLoc(var/T) if(ai) if(!isturf(ai.loc)) return + + if(cancel_tracking) + ai.ai_cancel_tracking() + T = get_turf(T) loc = T cameranet.visibility(src) @@ -55,9 +54,12 @@ if(ai.holo) ai.holo.move_hologram() +/mob/aiEye/proc/getLoc() -/mob/aiEye/Move() - return 0 + if(ai) + if(!isturf(ai.loc) || !ai.client) + return + return ai.eyeobj.loc // AI MOVEMENT @@ -70,7 +72,6 @@ var/acceleration = 1 var/obj/machinery/hologram/holopad/holo = null - // Intiliaze the eye by assigning it's "ai" variable to us. Then set it's loc to us. /mob/living/silicon/ai/New() ..() @@ -79,7 +80,7 @@ spawn(5) eyeobj.loc = src.loc -/mob/living/silicon/ai/Destroy() +/mob/living/silicon/ai/Del() eyeobj.ai = null del(eyeobj) // No AI, no Eye ..() @@ -88,9 +89,7 @@ if(istype(usr, /mob/living/silicon/ai)) var/mob/living/silicon/ai/AI = usr if(AI.eyeobj && AI.client.eye == AI.eyeobj) - AI.cameraFollow = null - if (isturf(src.loc) || isturf(src)) - AI.eyeobj.setLoc(src) + AI.eyeobj.setLoc(src) // This will move the AIEye. It will also cause lights near the eye to light up, if toggled. // This is handled in the proc below this one. @@ -114,35 +113,36 @@ else user.sprint = initial - user.cameraFollow = null - //user.unset_machine() //Uncomment this if it causes problems. //user.lightNearbyCamera() // Return to the Core. -/mob/living/silicon/ai/proc/view_core() +/mob/living/silicon/ai/proc/core() + set category = "AI Commands" + set name = "AI Core" + + view_core() + + +/mob/living/silicon/ai/proc/view_core() current = null - cameraFollow = null unset_machine() - if(src.eyeobj && src.loc) - src.eyeobj.z = src.z - src.eyeobj.loc = src.loc - else + if(!src.eyeobj) src << "ERROR: Eyeobj not found. Creating new eye..." src.eyeobj = new(src.loc) src.eyeobj.ai = src - src.eyeobj.name = "[src.name] (AI Eye)" // Give it a name + src.SetName(src.name) if(client && client.eye) client.eye = src - - for(var/datum/visibility_chunk/camera/c in eyeobj.visibility_interface.visible_chunks) + for(var/datum/camerachunk/c in eyeobj.visibleCameraChunks) c.remove(eyeobj) + src.eyeobj.setLoc(src) -/mob/living/silicon/ai/verb/toggle_acceleration() +/mob/living/silicon/ai/proc/toggle_acceleration() set category = "AI Commands" set name = "Toggle Camera Acceleration" diff --git a/code/modules/mob/living/silicon/ai/freelook/read_me.dm b/code/modules/mob/living/silicon/ai/freelook/read_me.dm index e71b0903b85..53e68ff1377 100644 --- a/code/modules/mob/living/silicon/ai/freelook/read_me.dm +++ b/code/modules/mob/living/silicon/ai/freelook/read_me.dm @@ -20,7 +20,7 @@ HOW IT WORKS It works by first creating a camera network datum. Inside of this camera network are "chunks" (which will be - explained later) and "cameras". The cameras list is kept up to date by obj/machinery/camera/New() and Destroy(). + explained later) and "cameras". The cameras list is kept up to date by obj/machinery/camera/New() and Del(). Next the camera network has chunks. These chunks are a 16x16 tile block of turfs and cameras contained inside the chunk. These turfs are then sorted out based on what the cameras can and cannot see. If none of the cameras can see the turf, inside @@ -43,7 +43,7 @@ WHERE IS EVERYTHING? - cameraNetwork.dm = Everything about the cameraNetwork datum. + cameranet.dm = Everything about the cameranet datum. chunk.dm = Everything about the chunk datum. eye.dm = Everything about the AI and the AIEye. updating.dm = Everything about triggers that will update chunks. diff --git a/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm b/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm index 775d8864751..9458a768633 100644 --- a/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm +++ b/code/modules/mob/living/silicon/ai/freelook/update_triggers.dm @@ -1,3 +1,80 @@ +#define BORG_CAMERA_BUFFER 30 + +//UPDATE TRIGGERS, when the chunk (and the surrounding chunks) should update. + +// TURFS + +/turf + var/image/obscured + +/turf/proc/visibilityChanged() + if(ticker) + cameranet.updateVisibility(src) + +/turf/simulated/Del() + visibilityChanged() + ..() + +/turf/simulated/New() + ..() + visibilityChanged() + + + +// STRUCTURES + +/obj/structure/Del() + if(ticker) + cameranet.updateVisibility(src) + ..() + +/obj/structure/New() + ..() + if(ticker) + cameranet.updateVisibility(src) + +// EFFECTS + +/obj/effect/Del() + if(ticker) + cameranet.updateVisibility(src) + ..() + +/obj/effect/New() + ..() + if(ticker) + cameranet.updateVisibility(src) + + +// DOORS + +// Simply updates the visibility of the area when it opens/closes/destroyed. +/obj/machinery/door/update_nearby_tiles(need_rebuild) + . = ..(need_rebuild) + // Glass door glass = 1 + // don't check then? + if(!glass && cameranet) + cameranet.updateVisibility(src, 0) + + +// ROBOT MOVEMENT + +// Update the portable camera everytime the Robot moves. +// This might be laggy, comment it out if there are problems. +/mob/living/silicon/robot/var/updating = 0 + +/mob/living/silicon/robot/Move() + var/oldLoc = src.loc + . = ..() + if(.) + if(src.camera && src.camera.network.len) + if(!updating) + updating = 1 + spawn(BORG_CAMERA_BUFFER) + if(oldLoc != src.loc) + cameranet.updatePortableCamera(src.camera) + updating = 0 + // CAMERA // An addition to deactivate which removes/adds the camera from the chunk list based on if it works or not. @@ -5,23 +82,29 @@ /obj/machinery/camera/deactivate(user as mob, var/choice = 1) ..(user, choice) if(src.can_use()) - cameranet.addViewpoint(src) + cameranet.addCamera(src) else src.SetLuminosity(0) - cameranet.removeViewpoint(src) + cameranet.removeCamera(src) /obj/machinery/camera/New() ..() - cameranet.viewpoints += src //Camera must be added to global list of all cameras no matter what... - var/list/open_networks = difflist(network,RESTRICTED_CAMERA_NETWORKS) //...but if all of camera's networks are restricted, it only works for specific camera consoles. + //Camera must be added to global list of all cameras no matter what... + if(cameranet.cameras_unsorted || !ticker) + cameranet.cameras += src + cameranet.cameras_unsorted = 1 + else + dd_insertObjectList(cameranet.cameras, src) + + var/list/open_networks = difflist(network,restricted_camera_networks) //...but if all of camera's networks are restricted, it only works for specific camera consoles. if(open_networks.len) //If there is at least one open network, chunk is available for AI usage. - cameranet.addViewpoint(src) + cameranet.addCamera(src) /obj/machinery/camera/Del() - cameranet.viewpoints -= src - var/list/open_networks = difflist(network,RESTRICTED_CAMERA_NETWORKS) + cameranet.cameras -= src + var/list/open_networks = difflist(network,restricted_camera_networks) if(open_networks.len) - cameranet.removeViewpoint(src) + cameranet.removeCamera(src) ..() #undef BORG_CAMERA_BUFFER \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/freelook/visibility_interface.dm b/code/modules/mob/living/silicon/ai/freelook/visibility_interface.dm deleted file mode 100644 index b55598c6090..00000000000 --- a/code/modules/mob/living/silicon/ai/freelook/visibility_interface.dm +++ /dev/null @@ -1,10 +0,0 @@ -/datum/visibility_interface/ai_eye - chunk_type = /datum/visibility_chunk/camera - -/datum/visibility_interface/ai_eye/getClient() - var/mob/aiEye/eye = controller - if (!eye) - return FALSE - if (!eye.ai) - return FALSE - return eye.ai.client diff --git a/code/modules/mob/living/silicon/ai/laws.dm b/code/modules/mob/living/silicon/ai/laws.dm index ab6b19e6190..9d30afc6e4d 100755 --- a/code/modules/mob/living/silicon/ai/laws.dm +++ b/code/modules/mob/living/silicon/ai/laws.dm @@ -23,6 +23,10 @@ /mob/living/silicon/ai/proc/set_zeroth_law(var/law, var/law_borg) src.laws_sanity_check() src.laws.set_zeroth_law(law, law_borg) + +/mob/living/silicon/ai/proc/clear_zeroth_law(var/law_borg) + src.laws_sanity_check() + src.laws.clear_zeroth_law(law_borg) /mob/living/silicon/ai/proc/add_inherent_law(var/law) src.laws_sanity_check() diff --git a/code/modules/mob/living/silicon/ai/nano.dm b/code/modules/mob/living/silicon/ai/nano.dm new file mode 100644 index 00000000000..f9bb7a25d79 --- /dev/null +++ b/code/modules/mob/living/silicon/ai/nano.dm @@ -0,0 +1,10 @@ +var/obj/nano_module/crew_monitor/crew_monitor + +/mob/living/silicon/ai/proc/init_subsystems() + crew_monitor = new(src) + +/mob/living/silicon/ai/proc/nano_crew_monitor() + set category = "AI Commands" + set name = "Crew Monitor" + + crew_monitor.ui_interact(usr) \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm index e535a2dedee..b596fd53541 100644 --- a/code/modules/mob/living/silicon/ai/say.dm +++ b/code/modules/mob/living/silicon/ai/say.dm @@ -1,32 +1,32 @@ /mob/living/silicon/ai/say(var/message) - if(parent && istype(parent) && parent.stat != 2) - parent.say(message) - return - //If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead. - ..(message) + if(parent && istype(parent) && parent.stat != 2) + parent.say(message) //If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead. + return + + ..(message) /mob/living/silicon/ai/say_understands(var/other) - if (istype(other, /mob/living/carbon/human)) - return 1 - if (istype(other, /mob/living/silicon/robot)) - return 1 - if (istype(other, /mob/living/silicon/decoy)) - return 1 - if (istype(other, /mob/living/carbon/brain)) - return 1 - if (istype(other, /mob/living/silicon/pai)) - return 1 - return ..() + if (istype(other, /mob/living/carbon/human)) + return 1 + if (istype(other, /mob/living/silicon/robot)) + return 1 + if (istype(other, /mob/living/silicon/decoy)) + return 1 + if (istype(other, /mob/living/carbon/brain)) + return 1 + if (istype(other, /mob/living/silicon/pai)) + return 1 + return ..() /mob/living/silicon/ai/say_quote(var/text) - var/ending = copytext(text, length(text)) + var/ending = copytext(text, length(text)) - if (ending == "?") - return "queries, \"[text]\""; - else if (ending == "!") - return "declares, \"[text]\""; + if (ending == "?") + return "queries, \"[text]\""; + else if (ending == "!") + return "declares, \"[text]\""; - return "states, \"[text]\""; + return "states, \"[text]\""; /mob/living/silicon/ai/proc/IsVocal() @@ -36,44 +36,28 @@ var/const/VOX_DELAY = 100 var/const/VOX_PATH = "sound/vox_fem/" /mob/living/silicon/ai/verb/announcement_help() - - set name = "Announcement Help" - set desc = "Display a list of vocal words to announce to the crew." - set category = "AI Commands" - - - var/dat = "Here is a list of words you can type into the 'Announcement' button to create sentences to vocally announce to everyone on the same level at you.
\ -
  • You can also click on the word to preview it.
  • \ -
  • You can only say 30 words for every announcement.
  • \ -
  • Do not use punctuation as you would normally, if you want a pause you can use the full stop and comma characters by separating them with spaces, like so: 'Alpha . Test , Bravo'.
\ - WARNING:
Misuse of the announcement system will get you job banned.
" - - var/index = 0 - for(var/word in vox_sounds) - index++ - dat += "[capitalize(word)]" - if(index != vox_sounds.len) - dat += " / " - - var/datum/browser/popup = new(src, "announce_help", "Announcement Help", 500, 400) - popup.set_content(dat) - popup.open() - - -/mob/living/silicon/ai/proc/announcement() - - set name = "Announcement" - set desc = "Create a vocal announcement by typing in the available words to create a sentence." + set name = "Announcement Help" + set desc = "Display a list of vocal words to announce to the crew." set category = "AI Commands" - if(src.stat == 2) - src << "You can't call the shuttle because you are dead!" - return - if(istype(usr,/mob/living/silicon/ai)) - var/mob/living/silicon/ai/AI = src - if(AI.control_disabled) - usr << "Wireless control is disabled!" - return + var/dat = "Here is a list of words you can type into the 'Announcement' button to create sentences to vocally announce to everyone on the same level at you.
\ +
  • You can also click on the word to preview it.
  • \ +
  • You can only say 30 words for every announcement.
  • \ +
  • Do not use punctuation as you would normally, if you want a pause you can use the full stop and comma characters by separating them with spaces, like so: 'Alpha . Test , Bravo'.
\ + WARNING:
Misuse of the announcement system will get you job banned.
" + + var/index = 0 + for(var/word in vox_sounds) + index++ + dat += "[capitalize(word)]" + if(index != vox_sounds.len) + dat += " / " + + var/datum/browser/popup = new(src, "announce_help", "Announcement Help", 500, 400) + popup.set_content(dat) + popup.open() + +/mob/living/silicon/ai/proc/ai_announcement() if(announcing_vox > world.time) src << "Please wait [round((announcing_vox - world.time) / 10)] seconds." return @@ -112,27 +96,24 @@ var/const/VOX_PATH = "sound/vox_fem/" /proc/play_vox_word(var/word, var/z_level, var/mob/only_listener) + word = lowertext(word) + if(vox_sounds[word]) + var/sound_file = vox_sounds[word] + var/sound/voice = sound(sound_file, wait = 1, channel = VOX_CHANNEL) + voice.status = SOUND_STREAM - word = lowertext(word) - - if(vox_sounds[word]) - - var/sound_file = vox_sounds[word] - var/sound/voice = sound(sound_file, wait = 1, channel = VOX_CHANNEL) - voice.status = SOUND_STREAM - - // If there is no single listener, broadcast to everyone in the same z level - if(!only_listener) - // Play voice for all mobs in the z level - for(var/mob/M in player_list) - if(M.client) - var/turf/T = get_turf(M) - if(T.z == z_level) - M << voice - else - only_listener << voice - return 1 - return 0 + // If there is no single listener, broadcast to everyone in the same z level + if(!only_listener) + // Play voice for all mobs in the z level + for(var/mob/M in player_list) + if(M.client) + var/turf/T = get_turf(M) + if(T.z == z_level && !isdeaf(M)) + M << voice + else + only_listener << voice + return 1 + return 0 // VOX sounds moved to /code/defines/vox_sounds.dm diff --git a/code/modules/mob/living/silicon/mommi/mommi.dm b/code/modules/mob/living/silicon/mommi/mommi.dm index 91defdaedfb..b6e508d9d3a 100644 --- a/code/modules/mob/living/silicon/mommi/mommi.dm +++ b/code/modules/mob/living/silicon/mommi/mommi.dm @@ -149,7 +149,7 @@ They can only use one tool at a time, they can't choose modules, and they have 1 name = real_name /mob/living/silicon/robot/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do + if (istype(W, /obj/item/weapon/restraints/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do return if (istype(W, /obj/item/weapon/weldingtool)) @@ -240,68 +240,6 @@ They can only use one tool at a time, they can't choose modules, and they have 1 else user << "\red Access denied." - else if(istype(W, /obj/item/weapon/card/emag)) // trying to unlock with an emag card - if(!opened)//Cover is closed - if(locked) - if(prob(90)) - user << "You emag the cover lock." - locked = 0 - else - user << "You fail to emag the cover lock." - if(prob(25)) - src << "Hack attempt detected." - else - user << "The cover is already unlocked." - return - - if(opened)//Cover is open - if(emagged) return//Prevents the X has hit Y with Z message also you cant emag them twice - if(wiresexposed) - user << "You must close the panel first" - return - else - sleep(6) - if(prob(50)) - emagged = 1 - lawupdate = 0 - connected_ai = null - user << "You emag [src]'s interface." -// message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.") - log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.") - clear_supplied_laws() - clear_inherent_laws() - laws = new /datum/ai_laws/syndicate_override - var/time = time2text(world.realtime,"hh:mm:ss") - lawchanges.Add("[time] : [user.name]([user.key]) emagged [name]([key])") - set_zeroth_law("Only [user.real_name] and people he designates as being such are Syndicate Agents.") - src << "\red ALERT: Foreign software detected." - sleep(5) - src << "\red Initiating diagnostics..." - sleep(20) - src << "\red SynBorg v1.7 loaded." - sleep(5) - src << "\red LAW SYNCHRONISATION ERROR" - sleep(5) - src << "\red Would you like to send a report to NanoTraSoft? Y/N" - sleep(10) - src << "\red > N" - sleep(20) - src << "\red ERRORERRORERROR" - src << "Obey these laws:" - laws.show_laws(src) - src << "\red \b ALERT: [user.real_name] is your new master. Obey your new laws and his commands." - if(src.module && istype(src.module, /obj/item/weapon/robot_module/miner)) - for(var/obj/item/weapon/pickaxe/borgdrill/D in src.module.modules) - del(D) - src.module.modules += new /obj/item/weapon/pickaxe/diamonddrill(src.module) - src.module.rebuild() - updateicon() - else - user << "You fail to [ locked ? "unlock" : "lock"] [src]'s interface." - if(prob(25)) - src << "Hack attempt detected." - return - else if(istype(W, /obj/item/borg/upgrade/)) var/obj/item/borg/upgrade/U = W if(!opened) @@ -322,6 +260,68 @@ They can only use one tool at a time, they can't choose modules, and they have 1 else spark_system.start() return ..() + +/mob/living/silicon/robot/mommi/emag_act(user as mob) + if(!opened)//Cover is closed + if(locked) + if(prob(90)) + user << "You emag the cover lock." + locked = 0 + else + user << "You fail to emag the cover lock." + if(prob(25)) + src << "Hack attempt detected." + else + user << "The cover is already unlocked." + return + + if(opened)//Cover is open + if(emagged) return//Prevents the X has hit Y with Z message also you cant emag them twice + if(wiresexposed) + user << "You must close the panel first" + return + else + sleep(6) + if(prob(50)) + emagged = 1 + lawupdate = 0 + connected_ai = null + user << "You emag [src]'s interface." +// message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.") + log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.") + clear_supplied_laws() + clear_inherent_laws() + laws = new /datum/ai_laws/syndicate_override + var/time = time2text(world.realtime,"hh:mm:ss") + lawchanges.Add("[time] : [user.name]([user.key]) emagged [name]([key])") + set_zeroth_law("Only [user.real_name] and people he designates as being such are Syndicate Agents.") + src << "\red ALERT: Foreign software detected." + sleep(5) + src << "\red Initiating diagnostics..." + sleep(20) + src << "\red SynBorg v1.7 loaded." + sleep(5) + src << "\red LAW SYNCHRONISATION ERROR" + sleep(5) + src << "\red Would you like to send a report to NanoTraSoft? Y/N" + sleep(10) + src << "\red > N" + sleep(20) + src << "\red ERRORERRORERROR" + src << "Obey these laws:" + laws.show_laws(src) + src << "\red \b ALERT: [user.real_name] is your new master. Obey your new laws and his commands." + if(src.module && istype(src.module, /obj/item/weapon/robot_module/miner)) + for(var/obj/item/weapon/pickaxe/borgdrill/D in src.module.modules) + del(D) + src.module.modules += new /obj/item/weapon/pickaxe/diamonddrill(src.module) + src.module.rebuild() + updateicon() + else + user << "You fail to [ locked ? "unlock" : "lock"] [src]'s interface." + if(prob(25)) + src << "Hack attempt detected." + return /mob/living/silicon/robot/mommi/attack_hand(mob/user) add_fingerprint(user) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 16ac8d7ec9c..48a34265d43 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -334,7 +334,7 @@ //I'm not sure how much of this is necessary, but I would rather avoid issues. if(istype(card.loc,/mob)) var/mob/holder = card.loc - holder.drop_from_inventory(card) + holder.unEquip(card) else if(istype(card.loc,/obj/item/clothing/suit/space/space_ninja)) var/obj/item/clothing/suit/space/space_ninja/holder = card.loc holder.pai = null @@ -503,4 +503,3 @@ spawn(1) close_up() return 2 - diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index 7d867036d5a..5817715ff99 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -168,7 +168,7 @@ icon_state = "robotanalyzer" item_state = "analyzer" desc = "A hand-held scanner able to diagnose robotic injuries." - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT throwforce = 3 w_class = 2.0 diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 0073729778d..e3a04f2cd0f 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -172,41 +172,6 @@ user << "The machine is hermetically sealed. You can't open the case." return - else if (istype(W, /obj/item/weapon/card/emag)) - - if(!client || stat == 2) - user << "\red There's not much point subverting this heap of junk." - return - - if(emagged) - src << "\red [user] attempts to load subversive software into you, but your hacked subroutined ignore the attempt." - user << "\red You attempt to subvert [src], but the sequencer has no effect." - return - - user << "\red You swipe the sequencer across [src]'s interface and watch its eyes flicker." - src << "\red You feel a sudden burst of malware loaded into your execute-as-root buffer. Your tiny brain methodically parses, loads and executes the script." - - var/obj/item/weapon/card/emag/emag = W - emag.uses-- - - message_admins("[key_name_admin(user)] emagged drone [key_name_admin(src)]. Laws overridden.") - log_game("[key_name(user)] emagged drone [key_name(src)]. Laws overridden.") - var/time = time2text(world.realtime,"hh:mm:ss") - lawchanges.Add("[time] : [user.name]([user.key]) emagged [name]([key])") - - emagged = 1 - lawupdate = 0 - connected_ai = null - clear_supplied_laws() - clear_inherent_laws() - laws = new /datum/ai_laws/syndicate_override - set_zeroth_law("Only [user.real_name] and people he designates as being such are Syndicate Agents.") - - src << "Obey these laws:" - laws.show_laws(src) - src << "\red \b ALERT: [user.real_name] is your new master. Obey your new laws and his commands." - return - else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) if(stat == 2) @@ -242,6 +207,41 @@ return ..() + +/mob/living/silicon/robot/drone/emag_act(user as mob) + if(!client || stat == 2) + user << "\red There's not much point subverting this heap of junk." + return + + if(!ishuman(user)) + return + var/mob/living/carbon/human/H = user + + if(emagged) + src << "\red [user] attempts to load subversive software into you, but your hacked subroutined ignore the attempt." + user << "\red You attempt to subvert [src], but the sequencer has no effect." + return + + user << "\red You swipe the sequencer across [src]'s interface and watch its eyes flicker." + src << "\red You feel a sudden burst of malware loaded into your execute-as-root buffer. Your tiny brain methodically parses, loads and executes the script." + + message_admins("[key_name_admin(user)] emagged drone [key_name_admin(src)]. Laws overridden.") + log_game("[key_name(user)] emagged drone [key_name(src)]. Laws overridden.") + var/time = time2text(world.realtime,"hh:mm:ss") + lawchanges.Add("[time] : [H.name]([H.key]) emagged [name]([key])") + + emagged = 1 + lawupdate = 0 + connected_ai = null + clear_supplied_laws() + clear_inherent_laws() + laws = new /datum/ai_laws/syndicate_override + set_zeroth_law("Only [H.real_name] and people he designates as being such are Syndicate Agents.") + + src << "Obey these laws:" + laws.show_laws(src) + src << "\red \b ALERT: [H.real_name] is your new master. Obey your new laws and his commands." + return //DRONE LIFE/DEATH diff --git a/code/modules/mob/living/silicon/robot/laws.dm b/code/modules/mob/living/silicon/robot/laws.dm index 84377b6adb4..38267256f4b 100644 --- a/code/modules/mob/living/silicon/robot/laws.dm +++ b/code/modules/mob/living/silicon/robot/laws.dm @@ -77,6 +77,10 @@ laws_sanity_check() laws.set_zeroth_law(law) +/mob/living/silicon/robot/proc/clear_zeroth_law() + laws_sanity_check() + laws.clear_zeroth_law() + /mob/living/silicon/robot/proc/add_inherent_law(var/law) laws_sanity_check() laws.add_inherent_law(law) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 1e0a62eedb2..e28f9ac8b7d 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -188,12 +188,12 @@ /mob/living/silicon/robot/proc/pick_module() if(module) return - var/list/modules = list("Standard", "Engineering", "Surgeon", "Crisis", "Miner", "Janitor", "Service", "Security") + var/list/modules = list("Standard", "Engineering", "Medical", "Miner", "Janitor", "Service", "Security") if(security_level == (SEC_LEVEL_GAMMA || SEC_LEVEL_EPSILON) || crisis) src << "\red Crisis mode active. Combat module available." modules+="Combat" if(mmi != null && mmi.alien) - modules="Hunter" + modules = "Hunter" modtype = input("Please, select a module!", "Robot", null, null) in modules designation = modtype var/module_sprites[0] //Used to store the associations between sprite names and sprite index. @@ -237,8 +237,8 @@ module_sprites["Advanced Droid"] = "droid-miner" module_sprites["Treadhead"] = "Miner" - if("Crisis") - module = new /obj/item/weapon/robot_module/crisis(src) + if("Medical") + module = new /obj/item/weapon/robot_module/medical(src) channels = list("Medical" = 1) if(camera && "Robots" in camera.network) camera.network.Add("Medical") @@ -247,17 +247,6 @@ module_sprites["Advanced Droid"] = "droid-medical" module_sprites["Needles"] = "medicalrobot" - if("Surgeon") - module = new /obj/item/weapon/robot_module/surgeon(src) - channels = list("Medical" = 1) - if(camera && "Robots" in camera.network) - camera.network.Add("Medical") - - module_sprites["Basic"] = "Medbot" - module_sprites["Standard"] = "surgeon" - module_sprites["Advanced Droid"] = "droid-medical" - module_sprites["Needles"] = "medicalrobot" - if("Security") module = new /obj/item/weapon/robot_module/security(src) channels = list("Security" = 1) @@ -643,7 +632,7 @@ /mob/living/silicon/robot/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do + if (istype(W, /obj/item/weapon/restraints/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do return if(opened) // Are they trying to insert something? @@ -808,72 +797,6 @@ else user << "\red Access denied." - else if(istype(W, /obj/item/weapon/card/emag)) // trying to unlock with an emag card - if(!opened)//Cover is closed - if(locked) - if(prob(90)) - var/obj/item/weapon/card/emag/emag = W - emag.uses-- - user << "You emag the cover lock." - locked = 0 - else - user << "You fail to emag the cover lock." - if(prob(25)) - src << "Hack attempt detected." - else - user << "The cover is already unlocked." - return - - if(opened)//Cover is open - if(emagged) return//Prevents the X has hit Y with Z message also you cant emag them twice - if(wiresexposed) - user << "You must close the panel first" - return - else - sleep(6) - if(prob(50)) - emagged = 1 - if(user.hud_used) - user.hud_used.update_robot_modules_display() //Shows/hides the emag item if the inventory screen is already open. - lawupdate = 0 - connected_ai = null - user << "You emag [src]'s interface." -// message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.") - log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.") - clear_supplied_laws() - clear_inherent_laws() - laws = new /datum/ai_laws/syndicate_override - var/time = time2text(world.realtime,"hh:mm:ss") - lawchanges.Add("[time] : [user.name]([user.key]) emagged [name]([key])") - set_zeroth_law("Only [user.real_name] and people he designates as being such are Syndicate Agents.") - src << "\red ALERT: Foreign software detected." - sleep(5) - src << "\red Initiating diagnostics..." - sleep(20) - src << "\red SynBorg v1.7 loaded." - sleep(5) - src << "\red LAW SYNCHRONISATION ERROR" - sleep(5) - src << "\red Would you like to send a report to NanoTraSoft? Y/N" - sleep(10) - src << "\red > N" - sleep(20) - src << "\red ERRORERRORERROR" - src << "Obey these laws:" - laws.show_laws(src) - src << "\red \b ALERT: [user.real_name] is your new master. Obey your new laws and his commands." - if(src.module && istype(src.module, /obj/item/weapon/robot_module/miner)) - for(var/obj/item/weapon/pickaxe/borgdrill/D in src.module.modules) - del(D) - src.module.modules += new /obj/item/weapon/pickaxe/diamonddrill(src.module) - src.module.rebuild() - updateicon() - else - user << "You fail to [ locked ? "unlock" : "lock"] [src]'s interface." - if(prob(25)) - src << "Hack attempt detected." - return - else if(istype(W, /obj/item/borg/upgrade/)) var/obj/item/borg/upgrade/U = W if(!opened) @@ -894,6 +817,73 @@ else spark_system.start() return ..() + +/mob/living/silicon/robot/emag_act(user as mob) + if(!ishuman(user)) + return + var/mob/living/carbon/human/H = user + if(!opened)//Cover is closed + if(locked) + if(prob(90)) + user << "You emag the cover lock." + locked = 0 + else + user << "You fail to emag the cover lock." + if(prob(25)) + src << "Hack attempt detected." + else + user << "The cover is already unlocked." + return + + if(opened)//Cover is open + if(emagged) return//Prevents the X has hit Y with Z message also you cant emag them twice + if(wiresexposed) + user << "You must close the panel first" + return + else + sleep(6) + if(prob(50)) + emagged = 1 + if(H.hud_used) + H.hud_used.update_robot_modules_display() //Shows/hides the emag item if the inventory screen is already open. + lawupdate = 0 + connected_ai = null + user << "You emag [src]'s interface." +// message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.") + log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.") + clear_supplied_laws() + clear_inherent_laws() + laws = new /datum/ai_laws/syndicate_override + var/time = time2text(world.realtime,"hh:mm:ss") + lawchanges.Add("[time] : [H.name]([H.key]) emagged [name]([key])") + set_zeroth_law("Only [H.real_name] and people he designates as being such are Syndicate Agents.") + src << "\red ALERT: Foreign software detected." + sleep(5) + src << "\red Initiating diagnostics..." + sleep(20) + src << "\red SynBorg v1.7 loaded." + sleep(5) + src << "\red LAW SYNCHRONISATION ERROR" + sleep(5) + src << "\red Would you like to send a report to NanoTraSoft? Y/N" + sleep(10) + src << "\red > N" + sleep(20) + src << "\red ERRORERRORERROR" + src << "Obey these laws:" + laws.show_laws(src) + src << "\red \b ALERT: [H.real_name] is your new master. Obey your new laws and his commands." + if(src.module && istype(src.module, /obj/item/weapon/robot_module/miner)) + for(var/obj/item/weapon/pickaxe/borgdrill/D in src.module.modules) + del(D) + src.module.modules += new /obj/item/weapon/pickaxe/diamonddrill(src.module) + src.module.rebuild() + updateicon() + else + user << "You fail to [ locked ? "unlock" : "lock"] [src]'s interface." + if(prob(25)) + src << "Hack attempt detected." + return /mob/living/silicon/robot/verb/unlock_own_cover() set category = "Robot Commands" diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 92a8f1fd557..a2c1fcb7347 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -4,7 +4,7 @@ icon_state = "std_module" w_class = 100.0 item_state = "electronic" - flags = FPRINT|TABLEPASS | CONDUCT + flags = CONDUCT var/list/modules = list() var/obj/item/emag = null @@ -71,10 +71,12 @@ src.emag = new /obj/item/weapon/melee/energy/sword/cyborg(src) return -/obj/item/weapon/robot_module/surgeon - name = "surgeon robot module" +/obj/item/weapon/robot_module/medical + name = "medical robot module" stacktypes = list( /obj/item/stack/medical/advanced/bruise_pack = 5, + /obj/item/stack/medical/advanced/ointment = 5, + /obj/item/stack/medical/splint = 5, /obj/item/stack/nanopaste = 5 ) @@ -82,7 +84,18 @@ src.modules += new /obj/item/device/flashlight(src) src.modules += new /obj/item/device/flash/cyborg(src) src.modules += new /obj/item/device/healthanalyzer(src) - src.modules += new /obj/item/weapon/reagent_containers/borghypo/surgeon(src) + src.modules += new /obj/item/device/reagent_scanner/adv(src) + src.modules += new /obj/item/weapon/borg_defib(src) + src.modules += new /obj/item/roller_holder(src) + src.modules += new /obj/item/weapon/reagent_containers/borghypo(src) + src.modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src) + src.modules += new /obj/item/weapon/reagent_containers/dropper(src) + src.modules += new /obj/item/weapon/reagent_containers/syringe(src) + src.modules += new /obj/item/weapon/extinguisher/mini(src) + src.modules += new /obj/item/stack/medical/advanced/bruise_pack(src) + src.modules += new /obj/item/stack/medical/advanced/ointment(src) + src.modules += new /obj/item/stack/medical/splint(src) + src.modules += new /obj/item/stack/nanopaste(src) src.modules += new /obj/item/weapon/scalpel(src) src.modules += new /obj/item/weapon/hemostat(src) src.modules += new /obj/item/weapon/retractor(src) @@ -92,9 +105,6 @@ src.modules += new /obj/item/weapon/bonesetter(src) src.modules += new /obj/item/weapon/circular_saw(src) src.modules += new /obj/item/weapon/surgicaldrill(src) - src.modules += new /obj/item/weapon/extinguisher/mini(src) - src.modules += new /obj/item/stack/medical/advanced/bruise_pack(src) - src.modules += new /obj/item/stack/nanopaste(src) src.emag = new /obj/item/weapon/reagent_containers/spray(src) @@ -102,59 +112,12 @@ src.emag.name = "Polyacid spray" return -/obj/item/weapon/robot_module/surgeon/respawn_consumable(var/mob/living/silicon/robot/R) +/obj/item/weapon/robot_module/medical/respawn_consumable(var/mob/living/silicon/robot/R) if(src.emag) var/obj/item/weapon/reagent_containers/spray/PS = src.emag PS.reagents.add_reagent("pacid", 2) ..() -/obj/item/weapon/robot_module/crisis - name = "crisis robot module" - stacktypes = list( - /obj/item/stack/medical/advanced/ointment = 5, - /obj/item/stack/medical/advanced/bruise_pack = 5, - /obj/item/stack/medical/splint = 5 - ) - - - New() - src.modules += new /obj/item/device/flashlight(src) - src.modules += new /obj/item/device/flash/cyborg(src) - src.modules += new /obj/item/device/healthanalyzer(src) - src.modules += new /obj/item/device/reagent_scanner/adv(src) - src.modules += new /obj/item/roller_holder(src) - src.modules += new /obj/item/stack/medical/advanced/ointment(src) - src.modules += new /obj/item/stack/medical/advanced/bruise_pack(src) - src.modules += new /obj/item/stack/medical/splint(src) - src.modules += new /obj/item/weapon/reagent_containers/borghypo/crisis(src) - src.modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src) - src.modules += new /obj/item/weapon/reagent_containers/robodropper(src) - src.modules += new /obj/item/weapon/reagent_containers/syringe(src) - src.modules += new /obj/item/weapon/extinguisher/mini(src) - - src.emag = new /obj/item/weapon/reagent_containers/spray(src) - - src.emag.reagents.add_reagent("pacid", 250) - src.emag.name = "Polyacid spray" - var/obj/item/weapon/reagent_containers/spray/S = emag - S.banned_reagents = list() - return - -/obj/item/weapon/robot_module/crisis/respawn_consumable(var/mob/living/silicon/robot/R) - - var/obj/item/weapon/reagent_containers/syringe/S = locate() in src.modules - if(S.mode == 2) - S.reagents.clear_reagents() - S.mode = initial(S.mode) - S.desc = initial(S.desc) - S.update_icon() - - if(src.emag) - var/obj/item/weapon/reagent_containers/spray/PS = src.emag - PS.reagents.add_reagent("pacid", 2) - - ..() - /obj/item/weapon/robot_module/engineering name = "engineering robot module" @@ -220,7 +183,7 @@ New() src.modules += new /obj/item/device/flashlight/seclite(src) src.modules += new /obj/item/device/flash/cyborg(src) - src.modules += new /obj/item/weapon/handcuffs/cyborg(src) + src.modules += new /obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg(src) src.modules += new /obj/item/weapon/melee/baton/robot(src) src.modules += new /obj/item/weapon/gun/energy/disabler/cyborg(src) src.modules += new /obj/item/taperoll/police(src) diff --git a/code/modules/mob/living/simple_animal/friendly/butterfly.dm b/code/modules/mob/living/simple_animal/friendly/butterfly.dm new file mode 100644 index 00000000000..4c4841a77e9 --- /dev/null +++ b/code/modules/mob/living/simple_animal/friendly/butterfly.dm @@ -0,0 +1,21 @@ +/mob/living/simple_animal/butterfly + name = "butterfly" + desc = "A colorful butterfly, how'd it get up here?" + icon_state = "butterfly" + icon_living = "butterfly" + icon_dead = "butterfly_dead" + turns_per_move = 1 + emote_see = list("flutters") + response_help = "shoos" + response_disarm = "brushes aside" + response_harm = "aquashes" + speak_chance = 0 + maxHealth = 2 + health = 2 + harm_intent_damage = 1 + friendly = "nudges" + pass_flags = PASSTABLE + +/mob/living/simple_animal/butterfly/New() + ..() + color = rgb(rand(0, 255), rand(0, 255), rand(0, 255)) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 9b638505e28..c9dfb0cccef 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -25,7 +25,15 @@ var/obj/item/inventory_back var/facehugger -/mob/living/simple_animal/corgi/Life() +/mob/living/simple_animal/corgi/New() + ..() + regenerate_icons() + +/mob/living/simple_animal/corgi/Die() + ..() + regenerate_icons() + +/mob/living/simple_animal/corgi/revive() ..() regenerate_icons() @@ -33,7 +41,7 @@ user.set_machine(src) if(user.stat) return - var/dat = "
Inventory of [name]

" + var/dat = "

Inventory of [real_name]

" if(inventory_head) dat += "
Head: [inventory_head] (Remove)" else @@ -85,6 +93,7 @@ SetLuminosity(0) inventory_head.loc = src.loc inventory_head = null + regenerate_icons() else usr << "\red There is nothing to remove from its [remove_from]." return @@ -92,6 +101,7 @@ if(inventory_back) inventory_back.loc = src.loc inventory_back = null + regenerate_icons() else usr << "\red There is nothing to remove from its [remove_from]." return @@ -163,6 +173,7 @@ usr.drop_item() place_on_head(item_to_add) + regenerate_icons() if("back") if(inventory_back) @@ -383,7 +394,7 @@ ..() /mob/living/simple_animal/corgi/regenerate_icons() - overlays = list() + overlays.Cut() if(inventory_head) var/head_icon_state = inventory_head.icon_state @@ -471,14 +482,12 @@ icon_living = "borgi" var/emagged = 0 -/mob/living/simple_animal/corgi/Ian/borgi/attackby(var/obj/item/O as obj, var/mob/user as mob) - if (istype(O, /obj/item/weapon/card/emag) && !emagged) +/mob/living/simple_animal/corgi/Ian/borgi/emag_act(user as mob) + if(!emagged) emagged = 1 visible_message("[user] swipes a card through [src].", "You overload [src]s internal reactor.") spawn (1000) src.explode() - return - ..() /mob/living/simple_animal/corgi/Ian/borgi/proc/explode() for(var/mob/M in viewers(src, null)) diff --git a/code/modules/mob/living/simple_animal/friendly/Fox.dm b/code/modules/mob/living/simple_animal/friendly/fox.dm similarity index 97% rename from code/modules/mob/living/simple_animal/friendly/Fox.dm rename to code/modules/mob/living/simple_animal/friendly/fox.dm index 095445069ca..da38c222b42 100644 --- a/code/modules/mob/living/simple_animal/friendly/Fox.dm +++ b/code/modules/mob/living/simple_animal/friendly/fox.dm @@ -30,4 +30,4 @@ icon_living = "Syndifox" icon_dead = "Syndifox_dead" flags = IS_SYNTHETIC|NO_BREATHE - faction = list("syndicate") \ No newline at end of file + faction = list("syndicate") diff --git a/code/modules/mob/living/simple_animal/friendly/pug.dm b/code/modules/mob/living/simple_animal/friendly/pug.dm new file mode 100644 index 00000000000..62456ed8a8b --- /dev/null +++ b/code/modules/mob/living/simple_animal/friendly/pug.dm @@ -0,0 +1,42 @@ +//Corgi //best comment 2014 +/mob/living/simple_animal/pug + name = "\improper pug" + real_name = "pug" + desc = "It's a pug." + icon_state = "pug" + icon_living = "pug" + icon_dead = "pug_dead" + speak = list("YAP", "Woof!", "Bark!", "AUUUUUU") + speak_emote = list("barks", "woofs") + emote_hear = list("barks!", "woofs!", "yaps.","pants.") + emote_see = list("shakes its head.", "chases its tail.","shivers.") + speak_chance = 1 + turns_per_move = 10 + meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/pug + meat_amount = 3 + response_help = "pets" + response_disarm = "bops" + response_harm = "kicks" + see_in_dark = 5 + +/mob/living/simple_animal/pug/Life() + ..() + + if(!stat && !resting && !buckled) + if(prob(1)) + emote("me", 1, pick("chases its tail.")) + spawn(0) + for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2)) + dir = i + sleep(1) + +/mob/living/simple_animal/pug/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri + if(istype(O, /obj/item/weapon/newspaper)) + if(!stat) + user.visible_message("[user] baps [name] on the nose with the rolled up [O]") + spawn(0) + for(var/i in list(1,2,4,8,4,2,1,2)) + dir = i + sleep(1) + else + ..() diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index aa64a6fe921..73c4018e3b9 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -125,18 +125,6 @@ else user << "\red You swipe your card, with no effect." return 0 - else if (istype(O, /obj/item/weapon/card/emag)) - if (emagged) - user << "\red [src] is already overloaded - better run." - return 0 - else - var/obj/item/weapon/card/emag/emag = O - emag.uses-- - emagged = 1 - user << "\blue You short out the security protocols and overload [src]'s cell, priming it to explode in a short time." - spawn(100) src << "\red Your cell seems to be outputting a lot of power..." - spawn(200) src << "\red Internal heat sensors are spiking! Something is badly wrong with your cell!" - spawn(300) src.explode() else if(O.force) @@ -152,6 +140,17 @@ for(var/mob/M in viewers(src, null)) if ((M.client && !( M.blinded ))) M.show_message("\red [user] gently taps [src] with the [O]. ") + +/mob/living/simple_animal/spiderbot/emag_act(user as mob) + if (emagged) + user << "\red [src] is already overloaded - better run." + return 0 + else + emagged = 1 + user << "\blue You short out the security protocols and overload [src]'s cell, priming it to explode in a short time." + spawn(100) src << "\red Your cell seems to be outputting a lot of power..." + spawn(200) src << "\red Internal heat sensors are spiking! Something is badly wrong with your cell!" + spawn(300) src.explode() /mob/living/simple_animal/spiderbot/proc/transfer_personality(var/obj/item/device/mmi/M as obj) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 810f1b0e384..48fd6943658 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -625,7 +625,7 @@ stolen_item = C.r_hand if(stolen_item) - C.u_equip(stolen_item) + C.unEquip(stolen_item) held_item = stolen_item stolen_item.loc = src visible_message("[src] grabs the [held_item] out of [C]'s hand!", "\blue You snag the [held_item] out of [C]'s hand!", "You hear the sounds of wings flapping furiously.") diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 890c953c632..800d9967ca7 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -29,6 +29,7 @@ var/response_disarm = "shoves" var/response_harm = "hits" var/harm_intent_damage = 3 + var/force_threshold = 0 //Minimum force required to deal any damage //Temperature effect var/minbodytemp = 250 @@ -372,7 +373,6 @@ /mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri if(istype(O, /obj/item/stack/medical)) - if(stat != DEAD) var/obj/item/stack/medical/MED = O if(health < maxHealth) @@ -399,20 +399,22 @@ if(istype(O, /obj/item/weapon/kitchenknife) || istype(O, /obj/item/weapon/butch)) harvest() else + var/damage = 0 if(O.force) - var/damage = O.force - if (O.damtype == STAMINA) - damage = 0 - adjustBruteLoss(damage) - for(var/mob/M in viewers(src, null)) - if ((M.client && !( M.blinded ))) - M.show_message("\red \b "+"[src] has been attacked with [O] by [user]. ") + if(O.force >= force_threshold) + damage = O.force + if (O.damtype == STAMINA) + damage = 0 + visible_message("[user] has [O.attack_verb.len ? "[pick(O.attack_verb)]": "attacked"] [src] with [O]!",\ + "[user] has [O.attack_verb.len ? "[pick(O.attack_verb)]": "attacked"] you with [O]!") + else + visible_message("[O] bounces harmlessly off of [src].",\ + "[O] bounces harmlessly off of [src].") + playsound(loc, O.hitsound, 50, 1, -1) else - usr << "\red This weapon is ineffective, it does no damage." - for(var/mob/M in viewers(src, null)) - if ((M.client && !( M.blinded ))) - M.show_message("\red [user] gently taps [src] with [O]. ") - + user.visible_message("[user] gently taps [src] with [O].",\ + "This weapon is ineffective, it does no damage.") + adjustBruteLoss(damage) /mob/living/simple_animal/movement_delay() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index d865cb2dde5..7b197aafcb2 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -246,7 +246,7 @@ var/list/slot_equipment_priority = list( \ if( !(slot_flags & SLOT_BACK) ) return 0 if(H.back) - if(H.back.canremove) + if(!(H.back.flags & NODROP)) return 2 else return 0 @@ -255,7 +255,7 @@ var/list/slot_equipment_priority = list( \ if( !(slot_flags & SLOT_OCLOTHING) ) return 0 if(H.wear_suit) - if(H.wear_suit.canremove) + if(!(H.wear_suit.flags & NODROP)) return 2 else return 0 @@ -264,7 +264,7 @@ var/list/slot_equipment_priority = list( \ if( !(slot_flags & SLOT_GLOVES) ) return 0 if(H.gloves) - if(H.gloves.canremove) + if(!(H.gloves.flags & NODROP)) return 2 else return 0 @@ -273,7 +273,7 @@ var/list/slot_equipment_priority = list( \ if( !(slot_flags & SLOT_FEET) ) return 0 if(H.shoes) - if(H.shoes.canremove) + if(!(H.shoes.flags & NODROP)) return 2 else return 0 @@ -286,7 +286,7 @@ var/list/slot_equipment_priority = list( \ if( !(slot_flags & SLOT_BELT) ) return 0 if(H.belt) - if(H.belt.canremove) + if(!(H.belt.flags & NODROP)) return 2 else return 0 @@ -295,7 +295,7 @@ var/list/slot_equipment_priority = list( \ if( !(slot_flags & SLOT_EYES) ) return 0 if(H.glasses) - if(H.glasses.canremove) + if(!(H.glasses.flags & NODROP)) return 2 else return 0 @@ -304,7 +304,7 @@ var/list/slot_equipment_priority = list( \ if( !(slot_flags & SLOT_HEAD) ) return 0 if(H.head) - if(H.head.canremove) + if(!(H.head.flags & NODROP)) return 2 else return 0 @@ -313,7 +313,7 @@ var/list/slot_equipment_priority = list( \ if( !(slot_flags & slot_l_ear) ) return 0 if(H.l_ear) - if(H.l_ear.canremove) + if(!(H.l_ear.flags & NODROP)) return 2 else return 0 @@ -322,7 +322,7 @@ var/list/slot_equipment_priority = list( \ if( !(slot_flags & slot_r_ear) ) return 0 if(H.r_ear) - if(H.r_ear.canremove) + if(!(H.r_ear.flags & NODROP)) return 2 else return 0 @@ -333,7 +333,7 @@ var/list/slot_equipment_priority = list( \ if((M_FAT in H.mutations) && !(flags & ONESIZEFITSALL)) return 0 if(H.w_uniform) - if(H.w_uniform.canremove) + if(!(H.w_uniform.flags & NODROP)) return 2 else return 0 @@ -346,7 +346,7 @@ var/list/slot_equipment_priority = list( \ if( !(slot_flags & SLOT_ID) ) return 0 if(H.wear_id) - if(H.wear_id.canremove) + if(!(H.wear_id.flags & NODROP)) return 2 else return 0 @@ -389,7 +389,7 @@ var/list/slot_equipment_priority = list( \ return 0 if( istype(src, /obj/item/device/pda) || istype(src, /obj/item/weapon/pen) || is_type_in_list(src, H.wear_suit.allowed) ) if(H.s_store) - if(H.s_store.canremove) + if(!(H.s_store.flags & NODROP)) return 2 else return 0 @@ -399,13 +399,13 @@ var/list/slot_equipment_priority = list( \ if(slot_handcuffed) if(H.handcuffed) return 0 - if(!istype(src, /obj/item/weapon/handcuffs)) + if(!istype(src, /obj/item/weapon/restraints/handcuffs)) return 0 return 1 if(slot_legcuffed) if(H.legcuffed) return 0 - if(!istype(src, /obj/item/weapon/legcuffs)) + if(!istype(src, /obj/item/weapon/restraints/legcuffs)) return 0 return 1 if(slot_in_backpack) @@ -438,9 +438,9 @@ var/list/slot_equipment_priority = list( \


[name]


Head(Mask):[(wear_mask ? wear_mask : "Nothing")] -
Left Hand:[(l_hand ? l_hand : "Nothing")] -
Right Hand:[(r_hand ? r_hand : "Nothing")] -
Back:[(back ? back : "Nothing")] [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : "")] +
Left Hand:[(l_hand && !(l_hand.flags & ABSTRACT)) ? l_hand : "Nothing"] +
Right Hand:[(r_hand && !(r_hand.flags & ABSTRACT)) ? r_hand : "Nothing"] +
Back:[(back && !(back.flags & ABSTRACT)) ? back : "Nothing"] [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" Set Internal", src) : "")]
[(internal ? text("Remove Internal") : "")]
Empty Pockets
Refresh @@ -881,8 +881,9 @@ var/list/slot_equipment_priority = list( \ stat(null, "Bots-[master_controller.aibots_cost]\t#[aibots.len]") stat(null, "Obj-[master_controller.objects_cost]\t#[processing_objects.len]") stat(null, "PiNet-[master_controller.networks_cost]\t#[pipe_networks.len]") - stat(null, "Ponet-[master_controller.powernets_cost]\t#[powernets.len]") + stat(null, "PoNet-[master_controller.powernets_cost]\t#[powernets.len]") stat(null, "NanoUI-[master_controller.nano_cost]\t#[nanomanager.processing_uis.len]") + stat(null,"Events-[master_controller.events_cost]\t#[event_manager.active_events.len]") // stat(null, "GC-[master_controller.gc_cost]\t#[garbage.queue.len]") stat(null, "Tick-[master_controller.ticker_cost]") stat(null, "ALL-[master_controller.total_cost]") @@ -1235,7 +1236,7 @@ mob/proc/yank_out_object() if(jobban_isbanned(usr, "NPC")) usr << "You are banned from playing as NPC's." return - + if((usr in respawnable_list) && (stat==2 || istype(usr,/mob/dead/observer))) var/list/creatures = list("Mouse") for(var/mob/living/L in living_mob_list) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 29bc7aed076..cdda2f6d268 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -3,7 +3,7 @@ /obj/item/weapon/grab name = "grab" - flags = NOBLUDGEON + flags = NOBLUDGEON | ABSTRACT var/obj/screen/grab/hud = null var/mob/affecting = null var/mob/assailant = null @@ -12,7 +12,6 @@ var/last_upgrade = 0 layer = 21 - abstract = 1 item_state = "nothing" w_class = 5.0 diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 0432e4baef6..e23014f9f52 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -150,7 +150,7 @@ proc/isorgan(A) if(L && L.implanted) return 1 return 0 - + proc/isnewplayer(A) if(istype(A, /mob/new_player)) return 1 @@ -159,9 +159,23 @@ proc/isnewplayer(A) proc/hasorgans(A) return ishuman(A) +proc/isdeaf(A) + if(istype(A, /mob)) + var/mob/M = A + return (M.sdisabilities & DEAF) || M.ear_deaf + return 0 + /proc/hsl2rgb(h, s, l) return +proc/hassensorlevel(A, var/level) + var/mob/living/carbon/human/H = A + if(istype(H) && istype(H.w_uniform, /obj/item/clothing/under)) + var/obj/item/clothing/under/U = H.w_uniform + return U.sensor_mode >= level + return 0 + + /proc/check_zone(zone) if(!zone) return "chest" @@ -344,10 +358,10 @@ It's fairly easy to fix if dealing with single letters but not so much with comp /mob/proc/abiotic(var/full_body = 0) - if(full_body && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask))) + if(full_body && ((src.l_hand && !(src.l_hand.flags & ABSTRACT)) || (src.r_hand && !(src.r_hand.flags & ABSTRACT)) || (src.back || src.wear_mask))) return 1 - if((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract ))) + if((src.l_hand && !(src.l_hand.flags & ABSTRACT)) || (src.r_hand && !(src.r_hand.flags & ABSTRACT))) return 1 return 0 diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index bea08693fbc..399eeb1c83e 100644 --- a/code/modules/mob/mob_transformation_simple.dm +++ b/code/modules/mob/mob_transformation_simple.dm @@ -30,7 +30,7 @@ if(!M || !ismob(M)) usr << "Type path is not a mob (new_type = [new_type]) in change_mob_type(). Contact a coder." - del(M) + qdel(M) return if( istext(new_name) ) @@ -43,12 +43,12 @@ if(src.dna) M.dna = src.dna.Clone() - if(mind) + if(mind && istype(M, /mob/living)) mind.transfer_to(M) else M.key = key if(delete_old_mob) spawn(1) - del(src) + qdel(src) return M diff --git a/code/modules/mob/spirit/cultnet.dm b/code/modules/mob/spirit/cultnet.dm index df0cd57ff5d..c3f37f8fdd1 100644 --- a/code/modules/mob/spirit/cultnet.dm +++ b/code/modules/mob/spirit/cultnet.dm @@ -19,54 +19,6 @@ It reuses a lot of code from the AIEye cameraNetwork. In order to work properly, if (vp) return TRUE return FALSE - - -/datum/visibility_chunk/cult/validViewpoint(var/atom/viewpoint) - var/turf/point = locate(src.x + 8, src.y + 8, src.z) - if(get_dist(point, viewpoint) > 24) - return FALSE - - if (isCultRune(viewpoint) || isCultViewpoint(viewpoint)) - return viewpoint:can_use() - return FALSE - - -/datum/visibility_chunk/cult/getVisibleTurfsForViewpoint(var/viewpoint) - var/obj/effect/rune/rune = viewpoint - if (rune) - return rune.can_see() - var/obj/cult_viewpoint/cvp = viewpoint - if (cvp) - return cvp.can_see() - return null - - -/datum/visibility_chunk/cult/findNearbyViewpoints() - for(var/obj/cult_viewpoint/vp in range(16, locate(x + 8, y + 8, z))) - if(vp.can_use()) - viewpoints += vp - for(var/obj/effect/rune/rune in range(16, locate(x + 8, y + 8, z))) - viewpoints += rune - - -/datum/visibility_network/cult - ChunkType = /datum/visibility_chunk/cult - - -/datum/visibility_network/cult/validViewpoint(var/viewpoint) - if (isCultRune(viewpoint) || isCultViewpoint(viewpoint)) - return viewpoint:can_use() - return FALSE - -/datum/visibility_network/cult/getViewpointFromMob(var/mob/currentMob) - for(var/obj/cult_viewpoint/currentView in currentMob) - return currentView - return FALSE - - -/datum/visibility_interface/cult - chunk_type = /datum/visibility_chunk/cult - /* RUNE JUNK diff --git a/code/modules/mob/spirit/movement.dm b/code/modules/mob/spirit/movement.dm index bd794b6fd2b..b5ac53fbeae 100644 --- a/code/modules/mob/spirit/movement.dm +++ b/code/modules/mob/spirit/movement.dm @@ -52,7 +52,6 @@ mob/spirit/proc/Spirit_Move(direct) mob/spirit/setLoc(var/T) T = get_turf(T) loc = T - cultNetwork.visibility(src) mob/spirit/verb/toggle_acceleration() set category = "Spirit" diff --git a/code/modules/mob/spirit/spirit.dm b/code/modules/mob/spirit/spirit.dm index ce7080b744c..c90f0f569b7 100644 --- a/code/modules/mob/spirit/spirit.dm +++ b/code/modules/mob/spirit/spirit.dm @@ -38,9 +38,6 @@ mob/spirit/New() loc = pick(latejoin) - // hook them to the cult visibility network - visibility_interface = new /datum/visibility_interface/cult(src) - // no nameless spirits if (!name) name = "Boogyman" diff --git a/code/modules/mob/spirit/viewpoint.dm b/code/modules/mob/spirit/viewpoint.dm index b4bd911ea1c..0cd54451361 100644 --- a/code/modules/mob/spirit/viewpoint.dm +++ b/code/modules/mob/spirit/viewpoint.dm @@ -18,9 +18,6 @@ var/obj/cult_viewpoint/list/cult_viewpoints = list() /obj/cult_viewpoint/New(var/mob/target) owner = target //src.loc = owner - owner.addToVisibilityNetwork(cultNetwork) - cultNetwork.viewpoints+=src - cultNetwork.addViewpoint(src) cult_viewpoints+=src //handle_missing_mask() ..() @@ -28,10 +25,7 @@ var/obj/cult_viewpoint/list/cult_viewpoints = list() /obj/cult_viewpoint/Del() processing_objects.Remove(src) - cultNetwork.viewpoints-=src - cultNetwork.removeViewpoint(src) cult_viewpoints-=src - owner.removeFromVisibilityNetwork(cultNetwork) ..() return @@ -134,6 +128,8 @@ var/obj/cult_viewpoint/list/cult_viewpoints = list() /obj/cult_viewpoint/proc/get_display_name() + if(istype(src,/obj/effect/rune)) + return name if (!owner) return if (cult_name) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 29baaab6f11..4910b47817c 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -10,7 +10,7 @@ for(var/obj/item/W in src) if (W==w_uniform) // will be torn continue - drop_from_inventory(W) + unEquip(W) regenerate_icons() monkeyizing = 1 canmove = 0 @@ -73,7 +73,7 @@ if (monkeyizing) return for(var/obj/item/W in src) - drop_from_inventory(W) + unEquip(W) monkeyizing = 1 canmove = 0 icon = null @@ -150,7 +150,7 @@ if(!should_remove_items) for(var/obj/item/W in src) - drop_from_inventory(W) + unEquip(W) var/mob/spirit/mask/new_spirit = new() @@ -193,7 +193,7 @@ if (monkeyizing) return for(var/obj/item/W in src) - drop_from_inventory(W) + unEquip(W) regenerate_icons() monkeyizing = 1 canmove = 0 @@ -249,7 +249,7 @@ if (monkeyizing) return for(var/obj/item/W in src) - drop_from_inventory(W) + unEquip(W) regenerate_icons() monkeyizing = 1 canmove = 0 @@ -280,7 +280,7 @@ if (monkeyizing) return for(var/obj/item/W in src) - drop_from_inventory(W) + unEquip(W) regenerate_icons() monkeyizing = 1 canmove = 0 @@ -315,7 +315,7 @@ if (monkeyizing) return for(var/obj/item/W in src) - drop_from_inventory(W) + unEquip(W) regenerate_icons() monkeyizing = 1 canmove = 0 @@ -345,7 +345,7 @@ if(monkeyizing) return for(var/obj/item/W in src) - drop_from_inventory(W) + unEquip(W) regenerate_icons() monkeyizing = 1 @@ -434,7 +434,7 @@ if(ispath(MP, /mob/living/simple_animal/pony)) return 1 // ZOMG PONIES WHEEE if(ispath(MP, /mob/living/simple_animal/fox)) - return 1 + return 1 //Not in here? Must be untested! return 0 @@ -459,7 +459,7 @@ if(ispath(MP, /mob/living/simple_animal/pony)) return 1 if(ispath(MP, /mob/living/simple_animal/fox)) - return 1 + return 1 //Antag Creatures! /* if(ispath(MP, /mob/living/simple_animal/hostile/carp) && !jobban_isbanned(src, "Syndicate")) diff --git a/code/modules/nano/JSON Writer.dm b/code/modules/nano/JSON Writer.dm index 3cd3520f177..f4c74d35ebb 100644 --- a/code/modules/nano/JSON Writer.dm +++ b/code/modules/nano/JSON Writer.dm @@ -1,7 +1,7 @@ json_writer proc - WriteObject(list/L) + WriteObject(list/L, cached_data = null) . = "{" var/i = 1 for(var/k in L) @@ -9,6 +9,8 @@ json_writer . += {"\"[k]\":[write(val)]"} if(i++ < L.len) . += "," + if(cached_data) + . = copytext(., 1, lentext(.)) + ",\"cached\":[cached_data]}" .+= "}" write(val) diff --git a/code/modules/nano/_JSON.dm b/code/modules/nano/_JSON.dm index 5692e643baa..4f70e6e664a 100644 --- a/code/modules/nano/_JSON.dm +++ b/code/modules/nano/_JSON.dm @@ -7,6 +7,6 @@ proc var/static/json_reader/_jsonr = new() return _jsonr.ReadObject(_jsonr.ScanJson(json)) - list2json(list/L) + list2json(list/L, var/cached_data = null) var/static/json_writer/_jsonw = new() - return _jsonw.WriteObject(L) + return _jsonw.WriteObject(L, cached_data) diff --git a/code/modules/nano/modules/crew_monitor.dm b/code/modules/nano/modules/crew_monitor.dm new file mode 100644 index 00000000000..c27c0446395 --- /dev/null +++ b/code/modules/nano/modules/crew_monitor.dm @@ -0,0 +1,88 @@ +/obj/nano_module/crew_monitor + name = "Crew monitor" + var/list/tracked = new + +/obj/nano_module/crew_monitor/Topic(href, href_list) + if(..()) return + var/turf/T = get_turf(src) + if (!T || !(T.z in config.player_levels)) + usr << "Unable to establish a connection: You're too far away from the station!" + return 0 + if(href_list["close"] ) + var/mob/user = usr + var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main") + usr.unset_machine() + ui.close() + return 0 + if(href_list["update"]) + src.updateDialog() + return 1 + +/obj/nano_module/crew_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + user.set_machine(src) + src.scan() + + var/data[0] + var/turf/T = get_turf(src) + var/list/crewmembers = list() + for(var/obj/item/clothing/under/C in src.tracked) + + var/turf/pos = get_turf(C) + + if((C) && (C.has_sensor) && (pos) && (T && pos.z == T.z) && (C.sensor_mode != SUIT_SENSOR_OFF)) + if(istype(C.loc, /mob/living/carbon/human)) + + var/mob/living/carbon/human/H = C.loc + if(H.w_uniform != C) + continue + + var/list/crewmemberData = list("dead"=0, "oxy"=-1, "tox"=-1, "fire"=-1, "brute"=-1, "area"="", "x"=-1, "y"=-1) + + crewmemberData["sensor_type"] = C.sensor_mode + crewmemberData["name"] = H.get_authentification_name(if_no_id="Unknown") + crewmemberData["rank"] = H.get_authentification_rank(if_no_id="Unknown", if_no_job="No Job") + crewmemberData["assignment"] = H.get_assignment(if_no_id="Unknown", if_no_job="No Job") + + if(C.sensor_mode >= SUIT_SENSOR_BINARY) + crewmemberData["dead"] = H.stat > 1 + + if(C.sensor_mode >= SUIT_SENSOR_VITAL) + crewmemberData["oxy"] = round(H.getOxyLoss(), 1) + crewmemberData["tox"] = round(H.getToxLoss(), 1) + crewmemberData["fire"] = round(H.getFireLoss(), 1) + crewmemberData["brute"] = round(H.getBruteLoss(), 1) + + if(C.sensor_mode >= SUIT_SENSOR_TRACKING) + var/area/A = get_area(H) + crewmemberData["area"] = sanitize(A.name) + crewmemberData["x"] = pos.x + crewmemberData["y"] = pos.y + + crewmembers[++crewmembers.len] = crewmemberData + + crewmembers = sortByKey(crewmembers, "name") + + data["crewmembers"] = crewmembers + + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + if(!ui) + ui = new(user, src, ui_key, "crew_monitor.tmpl", "Crew Monitoring Computer", 900, 800) + + // adding a template with the key "mapContent" enables the map ui functionality + ui.add_template("mapContent", "crew_monitor_map_content.tmpl") + // adding a template with the key "mapHeader" replaces the map header content + ui.add_template("mapHeader", "crew_monitor_map_header.tmpl") + + ui.set_initial_data(data) + ui.open() + + // should make the UI auto-update; doesn't seem to? + ui.set_auto_update(1) + +/obj/nano_module/crew_monitor/proc/scan() + for(var/mob/living/carbon/human/H in mob_list) + if(istype(H.w_uniform, /obj/item/clothing/under)) + var/obj/item/clothing/under/C = H.w_uniform + if (C.has_sensor) + tracked |= C + return 1 diff --git a/code/modules/nano/nanomanager.dm b/code/modules/nano/nanomanager.dm index 2ce8de3b08b..36241b2ec75 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/nanomanager.dm @@ -1,8 +1,9 @@ // This is the window/UI manager for Nano UI // There should only ever be one (global) instance of nanomanger /datum/nanomanager - // the list of current open /nanoui UIs + // a list of current open /nanoui UIs, grouped by src_object and ui_key var/open_uis[0] + // a list of current open /nanoui UIs, not grouped, for use in processing var/list/processing_uis = list() // a list of asset filenames which are to be sent to the client on user logon var/list/asset_files = list() @@ -26,7 +27,8 @@ filenames = flist(path) for(var/filename in filenames) if(copytext(filename, length(filename)) != "/") // filenames which end in "/" are actually directories, which we want to ignore - asset_files.Add(file(path + filename)) // add this file to asset_files for sending to clients when they connect + if(fexists(path + filename)) + asset_files.Add(fcopy_rsc(path + filename)) // add this file to asset_files for sending to clients when they connect return @@ -85,7 +87,7 @@ /** * Update all /nanoui uis attached to src_object * - * @param src_object /obj|/mob The obj or mob which the uis belong to + * @param src_object /obj|/mob The obj or mob which the uis are attached to * * @return int The number of uis updated */ @@ -97,7 +99,7 @@ var/update_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) + if(ui && ui.src_object && ui.user && ui.src_object.nano_host()) ui.process(1) update_count++ return update_count @@ -245,4 +247,3 @@ for(var/file in asset_files) client << browse_rsc(file) // send the file to the client - return 1 // success diff --git a/code/modules/nano/nanoprocs.dm b/code/modules/nano/nanoprocs.dm new file mode 100644 index 00000000000..81b939cf5c4 --- /dev/null +++ b/code/modules/nano/nanoprocs.dm @@ -0,0 +1,11 @@ +/atom/movable/proc/nano_host() + return src + +/obj/nano_module/nano_host() + return loc + +/atom/movable/proc/nano_can_update() + return 1 + +/obj/machinery/nano_can_update() + return !(stat & (NOPOWER|BROKEN)) diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index 54ff6b70b01..6b37eb96948 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -6,11 +6,6 @@ nanoui class (or whatever Byond calls classes) nanoui is used to open and update nano browser uis **********************************************************/ - -#define STATUS_INTERACTIVE 2 // GREEN Visability -#define STATUS_UPDATE 1 // ORANGE Visability -#define STATUS_DISABLED 0 // RED Visability - /datum/nanoui // the user who opened this ui var/mob/user @@ -58,6 +53,9 @@ nanoui is used to open and update nano browser uis var/is_auto_updating = 0 // the current status/visibility of the ui var/status = STATUS_INTERACTIVE + + var/cached_data = null + // Only allow users with a certain user.stat to get updates. Defaults to 0 (concious) var/allowed_user_stat = 0 // -1 = ignore, 0 = alive, 1 = unconcious or alive, 2 = dead concious or alive @@ -140,36 +138,122 @@ nanoui is used to open and update nano browser uis * @return nothing */ /datum/nanoui/proc/update_status(var/push_update = 0) - if (istype(user, /mob/living/silicon/ai)) - set_status(STATUS_INTERACTIVE, push_update) // interactive (green visibility) - else if (istype(user, /mob/living/silicon/robot)) - if (src_object in view(7, user)) // robots can see and interact with things they can see within 7 tiles - set_status(STATUS_INTERACTIVE, push_update) // interactive (green visibility) - else - set_status(STATUS_DISABLED, push_update) // no updates, completely disabled (red visibility) + var/atom/movable/host = src_object.nano_host() + if(!host.nano_can_update()) + close() + return + + var/status = user.can_interact_with_interface(host.nano_host()) + if(status == STATUS_CLOSE) + close() else - var/dist = get_dist(src_object, user) + set_status(status, push_update) + +/* + Procs called by update_status() +*/ - if (dist > 4) - close() - return +/mob/living/silicon/pai/can_interact_with_interface(src_object) + if(src_object == src && !stat) + return STATUS_INTERACTIVE + else + return ..() - if ((allowed_user_stat > -1) && (user.stat > allowed_user_stat)) - set_status(STATUS_DISABLED, push_update) // no updates, completely disabled (red visibility) - else if (user.restrained() || user.lying) - set_status(STATUS_UPDATE, push_update) // update only (orange visibility) - else if (istype(src_object, /obj/item/device/uplink/hidden)) // You know what if they have the uplink open let them use the UI - set_status(STATUS_INTERACTIVE, push_update) // Will build in distance checks on the topics for sanity. - else if (!(src_object in view(4, user))) // If the src object is not in visable, set status to 0 - set_status(STATUS_DISABLED, push_update) // interactive (green visibility) - else if (dist <= 1) - set_status(STATUS_INTERACTIVE, push_update) // interactive (green visibility) - else if (dist <= 2) - set_status(STATUS_UPDATE, push_update) // update only (orange visibility) - else if (istype(src_object, /obj/item/device/uplink/hidden)) // You know what if they have the uplink open let them use the UI - set_status(STATUS_INTERACTIVE, push_update) // Will build in distance checks on the topics for sanity. - else if (dist <= 4) - set_status(STATUS_DISABLED, push_update) // no updates, completely disabled (red visibility) +/mob/proc/can_interact_with_interface(var/src_object) + return STATUS_CLOSE // By default no mob can do anything with NanoUI + +/mob/dead/observer/can_interact_with_interface() + if(check_rights(R_ADMIN, 0)) + return STATUS_INTERACTIVE // Admins are more equal + return STATUS_UPDATE // Ghosts can view updates + +/mob/living/silicon/robot/can_interact_with_interface(var/src_object) + if(stat || !client) + return STATUS_CLOSE + if(lockcharge || stunned || weakened) + return STATUS_DISABLED + if (src_object in view(client.view, src)) // robots can see and interact with things they can see within their view range + return STATUS_INTERACTIVE // interactive (green visibility) + return STATUS_DISABLED // no updates, completely disabled (red visibility) + +/mob/living/silicon/robot/syndicate/can_interact_with_interface(var/src_object) + . = ..() + if(. != STATUS_INTERACTIVE) + return + + if(z in config.admin_levels) // Syndicate borgs can interact with everything on the admin level + return STATUS_INTERACTIVE + if(istype(get_area(src), /area/syndicate_station) || istype(get_area(src), /area/traitor)) // If elsewhere, they can interact with everything on the syndicate shuttle and traitor station + return STATUS_INTERACTIVE + if(istype(src_object, /obj/machinery)) // And they can also interact with everything else + /*var/obj/machinery/Machine = src_object + if(Machine.emagged) // Uncomment so they can only interact with emagged machinery + return STATUS_INTERACTIVE*/ + return STATUS_INTERACTIVE + return STATUS_UPDATE + +/mob/living/silicon/ai/can_interact_with_interface(var/src_object) + if(!client || check_unable(1)) + return STATUS_CLOSE + // Prevents the AI from using Topic on admin levels (by for example viewing through the court/thunderdome cameras) + // unless it's on the same level as the object it's interacting with. + var/turf/T = get_turf(src_object) + if(!T || !(z == T.z || (T.z in config.player_levels))) + return STATUS_CLOSE + + // If an object is in view then we can interact with it + if(src_object in view(client.view, src)) + return STATUS_INTERACTIVE + + // If we're installed in a chassi, rather than transfered to an inteliCard or other container, then check if we have camera view + if(is_in_chassis()) + //stop AIs from leaving windows open and using then after they lose vision + //apc_override is needed here because AIs use their own APC when powerless + if(cameranet && !cameranet.checkTurfVis(get_turf(src_object))) + return apc_override ? STATUS_INTERACTIVE : STATUS_CLOSE + return STATUS_INTERACTIVE + + return STATUS_CLOSE + +/mob/living/proc/shared_living_nano_interaction(var/src_object) + if (src.stat != CONSCIOUS) + return STATUS_CLOSE // no updates, close the interface + else if (restrained() || lying || stat || stunned || weakened) + return STATUS_UPDATE // update only (orange visibility) + return STATUS_INTERACTIVE + +/mob/living/proc/shared_living_nano_distance(var/atom/movable/src_object) + if(!isturf(src_object.loc)) + if(src_object.loc == src) // Item in the inventory + return STATUS_INTERACTIVE + if(src.contents.Find(src_object.loc)) // A hidden uplink inside an item + return STATUS_INTERACTIVE + + if (!(src_object in view(4, src))) // If the src object is not in visable, disable updates + return STATUS_CLOSE + + var/dist = get_dist(src_object, src) + if (dist <= 1) + return STATUS_INTERACTIVE // interactive (green visibility) + else if (dist <= 2) + return STATUS_UPDATE // update only (orange visibility) + else if (dist <= 4) + return STATUS_DISABLED // no updates, completely disabled (red visibility) + return STATUS_CLOSE + +/mob/living/can_interact_with_interface(var/src_object, var/be_close = 1) + . = shared_living_nano_interaction(src_object) + if(. == STATUS_INTERACTIVE && be_close) + . = shared_living_nano_distance(src_object) + if(STATUS_INTERACTIVE) + return STATUS_UPDATE + +/mob/living/carbon/human/can_interact_with_interface(var/src_object, var/be_close = 1) + . = shared_living_nano_interaction(src_object) + if(. == STATUS_INTERACTIVE && be_close) + . = shared_living_nano_distance(src_object) + if(. == STATUS_UPDATE && (M_TK in mutations)) // If we have telekinesis and remain close enough, allow interaction. + return STATUS_INTERACTIVE /** * Set the ui to auto update (every master_controller tick) @@ -370,7 +454,7 @@ nanoui is used to open and update nano browser uis template_data_json = list2json(templates) var/list/send_data = get_send_data(initial_data) - var/initial_data_json = list2json(send_data) + var/initial_data_json = list2json(send_data, cached_data) var/url_parameters_json = list2json(list("src" = "\ref[src]")) @@ -450,6 +534,17 @@ nanoui is used to open and update nano browser uis var/params = "\ref[src]" winset(user, window_id, "on-close=\"nanoclose [params]\"") + +/** + * Appends already processed json txt to the list2json proc when setting initial-data and data pushes + * Used for data that is fucking huge like manifests and camera lists that doesn't change often. + * And we only want to process them when they change. + * + * @return nothing + */ +/datum/nanoui/proc/load_cached_data(var/data) + cached_data = data + return /** * Push data to an already open UI window @@ -464,7 +559,7 @@ nanoui is used to open and update nano browser uis var/list/send_data = get_send_data(data) //user << list2json(data) // used for debugging - user << output(list2params(list(list2json(send_data))),"[window_id].browser:receiveUpdateData") + user << output(list2params(list(list2json(send_data,cached_data))),"[window_id].browser:receiveUpdateData") /** * This Topic() proc is called whenever a user clicks on a link within a Nano UI diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index a039a53edc6..33ce38ba437 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -614,11 +614,11 @@ Note that amputating the affected organ does in fact remove the infection from t else organ= new /obj/item/weapon/organ/head(owner.loc, owner) owner.death() - owner.u_equip(owner.glasses) - owner.u_equip(owner.head) - owner.u_equip(owner.l_ear) - owner.u_equip(owner.r_ear) - owner.u_equip(owner.wear_mask) + owner.unEquip(owner.glasses) + owner.unEquip(owner.head) + owner.unEquip(owner.l_ear) + owner.unEquip(owner.r_ear) + owner.unEquip(owner.wear_mask) if(ARM_RIGHT) if(!spawn_limb) if(status & ORGAN_ROBOT) @@ -658,7 +658,7 @@ Note that amputating the affected organ does in fact remove the infection from t organ = new /obj/item/weapon/skeleton/r_hand(owner.loc) else organ= new /obj/item/weapon/organ/r_hand(owner.loc, owner) - owner.u_equip(owner.gloves) + owner.unEquip(owner.gloves) if(HAND_LEFT) if(!spawn_limb) if(!(status & ORGAN_ROBOT)) @@ -666,7 +666,7 @@ Note that amputating the affected organ does in fact remove the infection from t organ = new /obj/item/weapon/skeleton/l_hand(owner.loc) else organ= new /obj/item/weapon/organ/l_hand(owner.loc, owner) - owner.u_equip(owner.gloves) + owner.unEquip(owner.gloves) if(FOOT_RIGHT) if(!spawn_limb) if(!(status & ORGAN_ROBOT)) @@ -674,7 +674,7 @@ Note that amputating the affected organ does in fact remove the infection from t organ = new /obj/item/weapon/skeleton/r_foot(owner.loc) else organ= new /obj/item/weapon/organ/r_foot/(owner.loc, owner) - owner.u_equip(owner.shoes) + owner.unEquip(owner.shoes) if(FOOT_LEFT) if(!spawn_limb) if(!(status & ORGAN_ROBOT)) @@ -682,7 +682,7 @@ Note that amputating the affected organ does in fact remove the infection from t organ = new /obj/item/weapon/skeleton/l_foot(owner.loc) else organ = new /obj/item/weapon/organ/l_foot(owner.loc, owner) - owner.u_equip(owner.shoes) + owner.unEquip(owner.shoes) destspawn = 1 //Robotic limbs explode if sabotaged. @@ -724,14 +724,14 @@ Note that amputating the affected organ does in fact remove the infection from t "\The [owner.handcuffed.name] falls off of [owner.name].",\ "\The [owner.handcuffed.name] falls off you.") - owner.drop_from_inventory(owner.handcuffed) + owner.unEquip(owner.handcuffed) if (owner.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT)) owner.visible_message(\ "\The [owner.legcuffed.name] falls off of [owner.name].",\ "\The [owner.legcuffed.name] falls off you.") - owner.drop_from_inventory(owner.legcuffed) + owner.unEquip(owner.legcuffed) /datum/organ/external/proc/bandage() var/rval = 0 @@ -842,11 +842,11 @@ Note that amputating the affected organ does in fact remove the infection from t return if(is_broken()) - owner.u_equip(c_hand) + owner.unEquip(c_hand) var/emote_scream = pick("screams in pain and", "lets out a sharp cry and", "cries out and") owner.emote("me", 1, "[(owner.species && owner.species.flags & NO_PAIN) ? "" : emote_scream ] drops what they were holding in their [hand_name]!") if(is_malfunctioning()) - owner.u_equip(c_hand) + owner.unEquip(c_hand) owner.emote("me", 1, "drops what they were holding, their [hand_name] malfunctioning!") var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() spark_system.set_up(5, 0, owner) diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index 54aac02d952..e0872804ce3 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -96,6 +96,7 @@ P.internal_organs = list() P.internal_organs += src H.internal_organs_by_name[name] = src + H.internal_organs |= src owner = H return @@ -196,7 +197,7 @@ src.damage += 0.2 * process_accuracy //Damaged one shares the fun else - var/datum/organ/internal/O = pick(owner.internal_organs_by_name) + var/datum/organ/internal/O = pick(owner.internal_organs) if(O) O.damage += 0.2 * process_accuracy diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index ca128c2c10c..dd311862f2c 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -9,7 +9,6 @@ throw_range = 10 var/obj/item/weapon/pen/haspen //The stored pen. var/obj/item/weapon/toppaper //The topmost piece of paper. - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT /obj/item/weapon/clipboard/New() @@ -24,10 +23,10 @@ if(!M.restrained() && !M.stat) switch(over_object.name) if("r_hand") - M.u_equip(src) + M.unEquip(src) M.put_in_r_hand(src) if("l_hand") - M.u_equip(src) + M.unEquip(src) M.put_in_l_hand(src) add_fingerprint(usr) @@ -44,7 +43,7 @@ return /obj/item/weapon/clipboard/attackby(obj/item/weapon/W as obj, mob/user as mob) - + if(istype(W, /obj/item/weapon/paper) || istype(W, /obj/item/weapon/photo)) user.drop_item() W.loc = src @@ -107,20 +106,20 @@ else if(href_list["write"]) var/obj/item/weapon/P = locate(href_list["write"]) - + if(P && (P.loc == src) && istype(P, /obj/item/weapon/paper) && (P == toppaper) ) - + var/obj/item/I = usr.get_active_hand() - + if(istype(I, /obj/item/weapon/pen)) - + P.attackby(I, usr) else if(href_list["remove"]) var/obj/item/P = locate(href_list["remove"]) - + if(P && (P.loc == src) && (istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/photo)) ) - + P.loc = usr.loc usr.put_in_hands(P) if(P == toppaper) @@ -133,9 +132,9 @@ else if(href_list["read"]) var/obj/item/weapon/paper/P = locate(href_list["read"]) - + if(P && (P.loc == src) && istype(P, /obj/item/weapon/paper) ) - + if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon))) usr << browse("[P.name][stars(P.info)][P.stamps]", "window=[P.name]") onclose(usr, "[P.name]") diff --git a/code/modules/paperwork/fax.dm b/code/modules/paperwork/fax.dm new file mode 100644 index 00000000000..a4b13a2876f --- /dev/null +++ b/code/modules/paperwork/fax.dm @@ -0,0 +1,87 @@ +// Fax datum - holds all faxes sent during the round +var/list/faxes = list() +var/list/adminfaxes = list() + +/datum/fax + var/name = "fax" + var/from_department = null + var/to_department = null + var/origin = null + var/message = null + var/sent_by = null + var/sent_at = null + +/datum/fax/New() + faxes += src + +/datum/fax/admin + var/list/reply_to = null + +/datum/fax/admin/New() + adminfaxes += src + +// Fax panel - lets admins check all faxes sent during the round +/client/proc/fax_panel() + set name = "Fax Panel" + set category = "Event" + if(holder) + holder.fax_panel(usr) + feedback_add_details("admin_verb","FXP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + return + +/datum/admins/proc/fax_panel(var/mob/living/user) + var/html = "Refresh" + html += "Create Fax" + + html += "
" + html += "

Admin Faxes

" + html += "

Name

Status

Location

Control

[Bot.hacked ? "(!) [Bot.name]" : Bot.name] ([Bot.bot_type_name])
" + html += "" + for(var/datum/fax/admin/A in adminfaxes) + html += "" + html += "" + html += "" + html += "" + html += "" + if(A.sent_by) + var/mob/living/S = A.sent_by + html += "" + else + html += "" + html += "" + if(!A.reply_to) + if(A.from_department == "Administrator") + html += "" + else + html += "" + html += "" + else + html += "" + html += "" + html += "" + html += "
NameFrom DepartmentTo DepartmentSent AtSent ByViewReplyReplied To
[A.name][A.from_department][A.to_department][worldtime2text(A.sent_at)][S.name]UnknownViewN/AReplyN/AN/AOriginal
" + html += "
" + + html += "
" + html += "

Departmental Faxes

" + html += "" + html += "" + for(var/datum/fax/F in faxes) + html += "" + html += "" + html += "" + html += "" + html += "" + if(F.sent_by) + var/mob/living/S = F.sent_by + html += "" + else + html += "" + html += "" + html += "" + html += "
NameFrom DepartmentTo DepartmentSent AtSent ByView
[F.name][F.from_department][F.to_department][worldtime2text(F.sent_at)][S.name]UnknownView
" + html += "
" + + var/datum/browser/popup = new(user, "fax_panel", "Fax Panel", 950, 450) + popup.set_content(html) + popup.open() diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index a727a3f59c3..98726004ea4 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -1,9 +1,8 @@ var/list/obj/machinery/photocopier/faxmachine/allfaxes = list() var/list/admin_departments = list("Central Command") +var/list/hidden_admin_departments = list("Syndicate") var/list/alldepartments = list() -var/list/adminfaxes = list() //cache for faxes that have been sent to admins - /obj/machinery/photocopier/faxmachine name = "fax machine" icon = 'icons/obj/library.dmi' @@ -22,6 +21,8 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins var/department = "Unknown" // our department var/destination = "Central Command" // the department we're sending to + + var/data[0] /obj/machinery/photocopier/faxmachine/New() ..() @@ -31,111 +32,146 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins alldepartments |= department /obj/machinery/photocopier/faxmachine/attack_hand(mob/user as mob) - user.set_machine(src) - - var/dat = "Fax Machine
" - - var/scan_name + ui_interact(user) + +/obj/machinery/photocopier/faxmachine/attackby(obj/item/weapon/item, mob/user) + if(istype(item,/obj/item/weapon/card/id) && !scan) + scan(item) + else if(istype(item, /obj/item/weapon/paper) || istype(item, /obj/item/weapon/photo) || istype(item, /obj/item/weapon/paper_bundle)) + ..() + nanomanager.update_uis(src) + else + return ..() + +/obj/machinery/photocopier/faxmachine/emag_act(user as mob) + if(!emagged) + emagged = 1 + user << "The transmitters realign to an unknown source!" + else + user << "You swipe the card through [src], but nothing happens." + +/obj/machinery/photocopier/faxmachine/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(scan) - scan_name = scan.name + data["scan_name"] = scan.name else - scan_name = "--------" - - dat += "Confirm Identity: [scan_name]
" - - if(authenticated) - dat += "{Log Out}" + data["scan_name"] = "-----" + data["authenticated"] = authenticated + if(!authenticated) + data["network"] = "Disconnected" + else if(!emagged) + data["network"] = "Central Command Quantum Entanglement Network" else - dat += "{Log In}" - - dat += "
" - - if(authenticated) - dat += "Logged in to: Central Command Quantum Entanglement Network

" - - if(copyitem) - dat += "Remove Item

" - - if(sendcooldown) - dat += "Transmitter arrays realigning. Please stand by.
" - - else - - dat += "Send
" - dat += "Currently sending: [copyitem.name]
" - dat += "Sending to: [destination]
" - - else - if(sendcooldown) - dat += "Please insert paper to send via secure connection.

" - dat += "Transmitter arrays realigning. Please stand by.
" - else - dat += "Please insert paper to send via secure connection.

" - + data["network"] = "ERR*?*%!*" + if(copyitem) + data["paper"] = copyitem.name + data["paperinserted"] = 1 else - dat += "Proper authentication is required to use this device.

" + data["paper"] = "-----" + data["paperinserted"] = 0 + data["destination"] = destination + data["cooldown"] = sendcooldown + if((destination in admin_departments) || (destination in hidden_admin_departments)) + data["respectcooldown"] = 1 + else + data["respectcooldown"] = 0 - if(copyitem) - dat += "Remove Item
" - - user << browse(dat, "window=copier") - onclose(user, "copier") - return + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + if (!ui) + ui = new(user, src, ui_key, "faxmachine.tmpl", "Fax Machine UI", 540, 450) + ui.set_initial_data(data) + ui.open() /obj/machinery/photocopier/faxmachine/Topic(href, href_list) + if(..()) + return 1 + if(href_list["send"]) - if(copyitem) - if (destination in admin_departments) + if(copyitem && authenticated) + if ((destination in admin_departments) || (destination in hidden_admin_departments)) send_admin_fax(usr, destination) else - sendfax(destination) + sendfax(destination,usr) if (sendcooldown) spawn(sendcooldown) // cooldown time sendcooldown = 0 + nanomanager.update_uis(src) - else if(href_list["remove"]) + if(href_list["paper"]) if(copyitem) copyitem.loc = usr.loc usr.put_in_hands(copyitem) usr << "You take \the [copyitem] out of \the [src]." copyitem = null - updateUsrDialog() + else + var/obj/item/I = usr.get_active_hand() + if (istype(I, /obj/item/weapon/paper) || istype(I, /obj/item/weapon/photo) || istype(I, /obj/item/weapon/paper_bundle)) + usr.drop_item() + copyitem = I + I.loc = src + usr << "You insert \the [I] into \the [src]." + flick(insert_anim, src) if(href_list["scan"]) - if (scan) - if(ishuman(usr)) - scan.loc = usr.loc - if(!usr.get_active_hand()) - usr.put_in_hands(scan) - scan = null - else - scan.loc = src.loc - scan = null + scan() + + if(href_list["dept"]) + if(authenticated) + var/lastdestination = destination + var/list/combineddepartments = alldepartments + admin_departments + if(emagged) + combineddepartments += hidden_admin_departments + destination = input(usr, "To which department?", "Choose a department", "") as null|anything in combineddepartments + if(!destination) + destination = lastdestination + + if(href_list["auth"]) + if((!authenticated) && scan) + if(check_access(scan)) + authenticated = 1 + else if(authenticated) + authenticated = 0 + + if(href_list["rename"]) + if(copyitem) + var/n_name = copytext(sanitize(input(usr, "What would you like to label the fax?", "Fax Labelling", copyitem.name) as text), 1, MAX_MESSAGE_LEN) + if((copyitem && copyitem.loc == src && usr.stat == 0)) + if (istype(copyitem, /obj/item/weapon/paper)) + copyitem.name = "[(n_name ? text("[n_name]") : initial(copyitem.name))]" + copyitem.desc = "This is a paper titled '" + copyitem.name + "'." + else if(istype(copyitem, /obj/item/weapon/photo)) + copyitem.name = "[(n_name ? text("[n_name]") : "photo")]" + else if(istype(copyitem, /obj/item/weapon/paper_bundle)) + copyitem.name = "[(n_name ? text("[n_name]") : "paper")]" + data["name"] = copyitem.name + + nanomanager.update_uis(src) + +/obj/machinery/photocopier/faxmachine/proc/scan(var/obj/item/weapon/card/id/card = null) + if(scan) // Card is in machine + if(ishuman(usr)) + scan.loc = usr.loc + if(!usr.get_active_hand()) + usr.put_in_hands(scan) + scan = null else + scan.loc = src.loc + scan = null + else + if(!card) var/obj/item/I = usr.get_active_hand() if (istype(I, /obj/item/weapon/card/id)) usr.drop_item() I.loc = src scan = I - authenticated = 0 + else + if(istype(card)) + usr.drop_item() + card.loc = src + scan = card + nanomanager.update_uis(src) - if(href_list["dept"]) - var/lastdestination = destination - destination = input(usr, "Which department?", "Choose a department", "") as null|anything in (alldepartments + admin_departments) - if(!destination) destination = lastdestination - - if(href_list["auth"]) - if ( (!( authenticated ) && (scan)) ) - if (check_access(scan)) - authenticated = 1 - - if(href_list["logout"]) - authenticated = 0 - - updateUsrDialog() - -/obj/machinery/photocopier/faxmachine/proc/sendfax(var/destination) +/obj/machinery/photocopier/faxmachine/proc/sendfax(var/destination,var/mob/sender) if(stat & (BROKEN|NOPOWER)) return @@ -144,15 +180,24 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins var/success = 0 for(var/obj/machinery/photocopier/faxmachine/F in allfaxes) if( F.department == destination ) - success = F.recievefax(copyitem) + success = F.receivefax(copyitem) if (success) + var/datum/fax/F = new /datum/fax() + F.name = copyitem.name + F.from_department = department + F.to_department = destination + F.origin = src + F.message = copyitem + F.sent_by = sender + F.sent_at = world.time + visible_message("[src] beeps, \"Message transmitted successfully.\"") //sendcooldown = 600 else visible_message("[src] beeps, \"Error transmitting message.\"") -/obj/machinery/photocopier/faxmachine/proc/recievefax(var/obj/item/incoming) +/obj/machinery/photocopier/faxmachine/proc/receivefax(var/obj/item/incoming) if(stat & (BROKEN|NOPOWER)) return 0 @@ -195,20 +240,29 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins return rcvdcopy.loc = null //hopefully this shouldn't cause trouble - adminfaxes += rcvdcopy + + var/datum/fax/admin/A = new /datum/fax/admin() + A.name = rcvdcopy.name + A.from_department = department + A.to_department = destination + A.origin = src + A.message = rcvdcopy + A.sent_by = sender + A.sent_at = world.time //message badmins that a fax has arrived switch(destination) if ("Central Command") - message_admins(sender, "CENTCOMM FAX", rcvdcopy, "CentcommFaxReply", "#006100") - + message_admins(sender, "CENTCOM FAX", destination, rcvdcopy, "#006100") + if ("Syndicate") + message_admins(sender, "SYNDICATE FAX", destination, rcvdcopy, "#DC143C") sendcooldown = 1800 sleep(50) visible_message("[src] beeps, \"Message transmitted successfully.\"") -/obj/machinery/photocopier/faxmachine/proc/message_admins(var/mob/sender, var/faxname, var/obj/item/sent, var/reply_type, font_colour="#006100") - var/msg = "\blue [faxname]: [key_name(sender, 1)] (PP) (VV) (SM) (JMP) (CA) (REPLY): Receiving '[sent.name]' via secure connection ... view message" +/obj/machinery/photocopier/faxmachine/proc/message_admins(var/mob/sender, var/faxname, var/faxtype, var/obj/item/sent, font_colour="#006100") + var/msg = "\blue [faxname]: [key_name(sender, 1)] (PP) (VV) (SM) (JMP) (CA) (BSA) (REPLY): Receiving '[sent.name]' via secure connection... view message" for(var/client/C in admins) if(R_ADMIN & C.holder.rights) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index edbe96a1cdc..fce6c2acda6 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -39,7 +39,7 @@ ..() pixel_y = rand(-8, 8) pixel_x = rand(-9, 9) - + spawn(2) update_icon() updateinfolinks() @@ -76,7 +76,7 @@ if((M_CLUMSY in usr.mutations) && prob(50)) usr << "You cut yourself on the paper." return - var/n_name = copytext(sanitize(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text), 1, MAX_MESSAGE_LEN) + var/n_name = copytext(sanitize(input(usr, "What would you like to label the paper?", "Paper Labelling", name) as text), 1, MAX_MESSAGE_LEN) if((loc == usr && usr.stat == 0)) name = "[(n_name ? text("[n_name]") : initial(name))]" if(name != "paper") @@ -293,7 +293,7 @@ "[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.") if(user.get_inactive_hand() == src) - user.drop_from_inventory(src) + user.unEquip(src) new /obj/effect/decal/cleanable/ash(get_turf(src)) del(src) @@ -366,29 +366,29 @@ B.name = name else if (P.name != "paper" && P.name != "photo") B.name = P.name - user.drop_from_inventory(P) + user.unEquip(P) if (istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/h_user = user if (h_user.r_hand == src) - h_user.drop_from_inventory(src) + h_user.unEquip(src) h_user.put_in_r_hand(B) else if (h_user.l_hand == src) - h_user.drop_from_inventory(src) + h_user.unEquip(src) h_user.put_in_l_hand(B) else if (h_user.l_store == src) - h_user.drop_from_inventory(src) + h_user.unEquip(src) B.loc = h_user B.layer = 20 h_user.l_store = B h_user.update_inv_pockets() else if (h_user.r_store == src) - h_user.drop_from_inventory(src) + h_user.unEquip(src) B.loc = h_user B.layer = 20 h_user.r_store = B h_user.update_inv_pockets() else if (h_user.head == src) - h_user.u_equip(src) + h_user.unEquip(src) h_user.put_in_hands(B) else if (!istype(src.loc, /turf)) src.loc = get_turf(h_user) diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index c3ddfb3cbbb..f821871069c 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -32,7 +32,7 @@ if(screen == 2) screen = 1 user << "You add [(P.name == "paper") ? "the paper" : P.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name]." - user.drop_from_inventory(P) + user.unEquip(P) P.loc = src if(istype(user,/mob/living/carbon/human)) user:update_inv_l_hand() @@ -42,12 +42,12 @@ if(screen == 2) screen = 1 user << "You add [(W.name == "photo") ? "the photo" : W.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name]." - user.drop_from_inventory(W) + user.unEquip(W) W.loc = src else if(istype(W, /obj/item/weapon/lighter)) burnpaper(W, user) else if(istype(W, /obj/item/weapon/paper_bundle)) - user.drop_from_inventory(W) + user.unEquip(W) for(var/obj/O in W) O.loc = src O.add_fingerprint(usr) @@ -85,7 +85,7 @@ "[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.") if(user.get_inactive_hand() == src) - user.drop_from_inventory(src) + user.unEquip(src) new /obj/effect/decal/cleanable/ash(get_turf(src)) del(src) @@ -166,7 +166,7 @@ usr << "You remove the [W.name] from the bundle." if(amount == 1) var/obj/item/weapon/paper/P = src[1] - usr.drop_from_inventory(src) + usr.unEquip(src) usr.put_in_hands(P) del(src) else if(page == amount) @@ -189,9 +189,9 @@ set category = "Object" set src in usr - var/n_name = copytext(sanitize(input(usr, "What would you like to label the bundle?", "Bundle Labelling", null) as text), 1, MAX_MESSAGE_LEN) + var/n_name = copytext(sanitize(input(usr, "What would you like to label the bundle?", "Bundle Labelling", name) as text), 1, MAX_MESSAGE_LEN) if((loc == usr && usr.stat == 0)) - name = "[(n_name ? text("[n_name]") : "paper")]" + name = "[(n_name ? text("[n_name]") : "paper bundle")]" add_fingerprint(usr) return @@ -206,7 +206,7 @@ O.loc = usr.loc O.layer = initial(O.layer) O.add_fingerprint(usr) - usr.drop_from_inventory(src) + usr.unEquip(src) del(src) return diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index fb8ba283901..6c96b62a328 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -15,7 +15,6 @@ icon = 'icons/obj/bureaucracy.dmi' icon_state = "pen" item_state = "pen" - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT | SLOT_EARS throwforce = 0 w_class = 1.0 @@ -61,7 +60,7 @@ */ /obj/item/weapon/pen/sleepypen desc = "It's a black ink pen with a sharp point and a carefully engraved \"Waffle Co.\"" - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER origin_tech = "materials=2;syndicate=5" @@ -88,7 +87,7 @@ * Parapens */ /obj/item/weapon/pen/paralysis - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER origin_tech = "materials=2;syndicate=5" diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 7829a112b0e..479d2510605 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -44,7 +44,7 @@ else if(istype(P, /obj/item/weapon/lighter)) burnphoto(P, user) ..() - + /obj/item/weapon/photo/proc/burnphoto(obj/item/weapon/lighter/P, mob/user) var/class = "" @@ -61,7 +61,7 @@ "[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.") if(user.get_inactive_hand() == src) - user.drop_from_inventory(src) + user.unEquip(src) new /obj/effect/decal/cleanable/ash(get_turf(src)) del(src) @@ -90,7 +90,7 @@ set category = "Object" set src in usr - var/n_name = copytext(sanitize(input(usr, "What would you like to label the photo?", "Photo Labelling", null) as text), 1, MAX_MESSAGE_LEN) + var/n_name = copytext(sanitize(input(usr, "What would you like to label the photo?", "Photo Labelling", name) as text), 1, MAX_MESSAGE_LEN) //loc.loc check is for making possible renaming photos in clipboards if(( (loc == usr || (loc.loc && loc.loc == usr)) && usr.stat == 0)) name = "[(n_name ? text("[n_name]") : "photo")]" @@ -118,10 +118,10 @@ if((!( M.restrained() ) && !( M.stat ) && M.back == src)) switch(over_object.name) if("r_hand") - M.u_equip(src) + M.unEquip(src) M.put_in_r_hand(src) if("l_hand") - M.u_equip(src) + M.unEquip(src) M.put_in_l_hand(src) add_fingerprint(usr) return @@ -142,7 +142,6 @@ icon_state = "camera" item_state = "electropack" w_class = 2.0 - flags = FPRINT | CONDUCT | TABLEPASS slot_flags = SLOT_BELT var/list/matter = list("metal" = 2000) var/pictures_max = 10 @@ -312,6 +311,7 @@ var/datum/picture/P = new() P.fields["name"] = "photo" + P.fields["author"] = user P.fields["icon"] = ic P.fields["tiny"] = pc P.fields["img"] = photoimage @@ -363,7 +363,6 @@ icon_state = "videocam" item_state = "videocam" w_class = 2.0 - flags = FPRINT | CONDUCT | TABLEPASS slot_flags = SLOT_BELT m_amt = 2000 var/on = 0 @@ -403,4 +402,4 @@ if(get_dist(src, M) <= canhear_range) talk_into(M, msg) for(var/mob/living/carbon/human/H in watcherslist) - H.show_message(text("\blue (Newscaster) [] says, '[]'",M,msg), 1) \ No newline at end of file + H.show_message(text("\blue (Newscaster) [] says, '[]'",M,msg), 1) diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm index c60489d5669..243762eefb6 100644 --- a/code/modules/paperwork/stamps.dm +++ b/code/modules/paperwork/stamps.dm @@ -1,10 +1,9 @@ /obj/item/weapon/stamp - name = "\improper GRANTED rubber stamp" + name = "\improper rubber stamp" desc = "A rubber stamp for stamping important documents." icon = 'icons/obj/bureaucracy.dmi' icon_state = "stamp-ok" item_state = "stamp" - flags = FPRINT | TABLEPASS throwforce = 0 w_class = 1.0 throw_speed = 7 @@ -54,6 +53,11 @@ icon_state = "stamp-cmo" _color = "cmo" +/obj/item/weapon/stamp/granted + name = "\improper GRANTED rubber stamp" + icon_state = "stamp-ok" + _color = "qm" + /obj/item/weapon/stamp/denied name = "\improper DENIED rubber stamp" icon_state = "stamp-deny" diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm index 806434fb6df..89ba5734241 100644 --- a/code/modules/power/antimatter/control.dm +++ b/code/modules/power/antimatter/control.dm @@ -174,7 +174,7 @@ W.loc = src if(user.client) user.client.screen -= W - user.u_equip(W) + user.unEquip(W) user.update_icons() user.visible_message("[user.name] loads an [W.name] into the [src.name].", \ "You load an [W.name].", \ diff --git a/code/modules/power/antimatter/shielding.dm b/code/modules/power/antimatter/shielding.dm index ae96a8f9f46..6290f15f087 100644 --- a/code/modules/power/antimatter/shielding.dm +++ b/code/modules/power/antimatter/shielding.dm @@ -206,7 +206,7 @@ proc/cardinalrange(var/center) icon_state = "box" item_state = "electronic" w_class = 4.0 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT throwforce = 5 throw_speed = 1 throw_range = 2 diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 6de3d9cea23..2e09cd993a9 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -458,23 +458,6 @@ update_icon() else user << "\red Access denied." - else if (istype(W, /obj/item/weapon/card/emag) && !(emagged || malfhack)) // trying to unlock with an emag card - if(opened) - user << "You must close the cover to swipe an ID card." - else if(wiresexposed) - user << "You must close the panel first" - else if(stat & (BROKEN|MAINT)) - user << "Nothing happens." - else - flick("apc-spark", src) - if (do_after(user,6)) - if(prob(50)) - emagged = 1 - locked = 0 - user << "You emag the APC interface." - update_icon() - else - user << "You fail to [ locked ? "unlock" : "lock"] the APC interface." else if (istype(W, /obj/item/stack/cable_coil) && !terminal && opened && has_electronics!=2) if (src.loc:intact) user << "\red You must remove the floor plating in front of the APC first." @@ -598,8 +581,26 @@ "\red You hit the [src.name] with your [W.name]!", \ "You hear bang") +/obj/machinery/power/apc/emag_act(user as mob) + if (!(emagged || malfhack)) // trying to unlock with an emag card + if(opened) + user << "You must close the cover to swipe an ID card." + else if(wiresexposed) + user << "You must close the panel first" + else if(stat & (BROKEN|MAINT)) + user << "Nothing happens." + else + flick("apc-spark", src) + if (do_after(user,6)) + if(prob(50)) + emagged = 1 + locked = 0 + user << "You emag the APC interface." + update_icon() + else + user << "You fail to [ locked ? "unlock" : "lock"] the APC interface." + // attack with hand - remove cell (if cover open) or interact with the APC - /obj/machinery/power/apc/attack_hand(mob/user) // if (!can_use(user)) This already gets called in interact() and in topic() // return @@ -941,7 +942,7 @@ malfai.malfhacking = 0 locked = 1 if (ticker.mode.config_tag == "malfunction") - if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas)) + if ((src.z in config.station_levels)) //if (is_type_in_list(get_area(src), the_station_areas)) ticker.mode:apcs++ if(usr:parent) src.malfai = usr:parent @@ -973,7 +974,7 @@ if(malfai) if (ticker.mode.config_tag == "malfunction") - if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas)) + if ((src.z in config.station_levels)) //if (is_type_in_list(get_area(src), the_station_areas)) operating ? ticker.mode:apcs++ : ticker.mode:apcs-- src.update() @@ -988,7 +989,7 @@ if(!malf.can_shunt) malf << "You cannot shunt." return - if(src.z != 1) + if(!(src.z in config.station_levels)) return src.occupant = new /mob/living/silicon/ai(src,malf.laws,null,1) src.occupant.adjustOxyLoss(malf.getOxyLoss()) @@ -1037,7 +1038,7 @@ /obj/machinery/power/apc/proc/ion_act() //intended to be exactly the same as an AI malf attack - if(!src.malfhack && src.z == 1) + if(!src.malfhack && (src.z in config.station_levels)) if(prob(3)) src.locked = 1 if (src.cell.charge > 0) @@ -1306,7 +1307,7 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on) /obj/machinery/power/apc/proc/set_broken() if(malfai && operating) if (ticker.mode.config_tag == "malfunction") - if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas)) + if ((src.z in config.station_levels)) //if (is_type_in_list(get_area(src), the_station_areas)) ticker.mode:apcs-- stat |= BROKEN operating = 0 @@ -1332,7 +1333,7 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on) /obj/machinery/power/apc/Destroy() if(malfai && operating) if (ticker.mode.config_tag == "malfunction") - if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas)) + if ((src.z in config.station_levels)) //if (is_type_in_list(get_area(src), the_station_areas)) ticker.mode:apcs-- area.power_light = 0 area.power_equip = 0 diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index c688127ad2b..54741e0245d 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -216,7 +216,7 @@ throw_range = 5 m_amt = 50 g_amt = 20 - flags = TABLEPASS | FPRINT | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined", "flogged") @@ -270,7 +270,7 @@ if(src.amount <= 14) usr << "\red You need at least 15 lengths to make restraints!" return - var/obj/item/weapon/handcuffs/cable/B = new /obj/item/weapon/handcuffs/cable(usr.loc) + var/obj/item/weapon/restraints/handcuffs/cable/B = new /obj/item/weapon/restraints/handcuffs/cable(usr.loc) B.icon_state = "cuff_[_color]" usr << "\blue You wind some cable together to make some restraints." src.use(15) @@ -313,7 +313,7 @@ //handle mob icon update if(ismob(loc)) var/mob/M = loc - M.u_equip(src) + M.unEquip(src) del(src) else amount -= used diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index df04bacdc70..c9ac32da530 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -123,7 +123,7 @@ var/const/GRAV_NEEDS_WRENCH = 3 O.main_part = null qdel(O) for(var/area/A in world) - if (A.z != 1) continue + if (!(A.z in config.station_levels)) continue A.gravitychange(0,A) shake_everyone() ..() @@ -294,7 +294,7 @@ var/const/GRAV_NEEDS_WRENCH = 3 investigate_log("was brought online and is now producing gravity for this level.", "gravity") message_admins("The gravity generator was brought online. ([area.name])") for(var/area/A in world) - if (A.z != 1) continue + if (!(A.z in config.station_levels)) continue A.gravitychange(1,A) else if(gravity_in_level() == 1) @@ -302,7 +302,7 @@ var/const/GRAV_NEEDS_WRENCH = 3 investigate_log("was brought offline and there is now no gravity for this level.", "gravity") message_admins("The gravity generator was brought offline with no backup generator. ([area.name])") for(var/area/A in world) - if (A.z != 1) continue + if (!(A.z in config.station_levels)) continue A.gravitychange(0,A) update_icon() diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 353ea877b4c..5aef5c541af 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -16,7 +16,7 @@ desc = "Used for building lights." icon = 'icons/obj/lighting.dmi' icon_state = "tube-construct-item" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT var/fixture_type = "tube" var/obj/machinery/light/newlight = null var/sheets_refunded = 2 @@ -63,7 +63,7 @@ desc = "Used for building small lights." icon = 'icons/obj/lighting.dmi' icon_state = "bulb-construct-item" - flags = FPRINT | TABLEPASS| CONDUCT + flags = CONDUCT fixture_type = "bulb" sheets_refunded = 1 @@ -657,7 +657,6 @@ /obj/item/weapon/light icon = 'icons/obj/lighting.dmi' - flags = FPRINT | TABLEPASS force = 2 throwforce = 5 w_class = 1 diff --git a/code/modules/power/pacman2.dm b/code/modules/power/pacman2.dm index 89d65a6ae21..9402a4c234f 100644 --- a/code/modules/power/pacman2.dm +++ b/code/modules/power/pacman2.dm @@ -81,14 +81,6 @@ user.drop_item() O.loc = src user << "\blue You add the plasma tank to the generator." - else if (istype(O, /obj/item/weapon/card/emag)) - var/obj/item/weapon/card/emag/E = O - if(E.uses) - E.uses-- - else - return - emagged = 1 - emp_act(1) else if(!active) if(istype(O, /obj/item/weapon/wrench)) anchored = !anchored @@ -114,6 +106,11 @@ new_frame.state = 2 new_frame.icon_state = "box_1" del(src) + + emag_act(user as mob) + if(!emagged) + emagged = 1 + emp_act(1) attack_hand(mob/user as mob) ..() diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index a334782cce1..d918ec86711 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -211,9 +211,6 @@ display round(lastgen) and plasmatank amount addstack.use(amount) updateUsrDialog() return - else if (istype(O, /obj/item/weapon/card/emag)) - emagged = 1 - emp_act(1) else if(!active) if(istype(O, /obj/item/weapon/wrench)) if(!anchored && !isinspace()) @@ -239,6 +236,10 @@ display round(lastgen) and plasmatank amount else if(istype(O, /obj/item/weapon/crowbar) && panel_open) default_deconstruction_crowbar(O) +/obj/machinery/power/port_gen/pacman/emag_act(user as mob) + emagged = 1 + emp_act(1) + /obj/machinery/power/port_gen/pacman/attack_hand(mob/user as mob) ..() if (!anchored) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 4142778e1e3..8e9e16c9943 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -40,7 +40,7 @@ src.directwired = 1 /obj/machinery/power/emitter/Destroy() - message_admins("Emitter deleted at ([x],[y],[z] - JMP)",0,1) + msg_admin_attack("Emitter deleted at ([x],[y],[z] - JMP)",0,1) log_game("Emitter deleted at ([x],[y],[z])") investigate_log("deleted at ([x],[y],[z])","singulo") ..() @@ -222,12 +222,14 @@ user << "\red Access denied." return - - if(istype(W, /obj/item/weapon/card/emag) && !emagged) + ..() + return + +/obj/machinery/power/emitter/emag_act(user as mob) + if(!emagged) + if(!ishuman(user)) + return + var/mob/living/carbon/human/H = user locked = 0 emagged = 1 - user.visible_message("[user.name] emags the [src.name].","\red You short out the lock.") - return - - ..() - return \ No newline at end of file + H.visible_message("[H.name] emags the [src.name].","\red You short out the lock.") diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index da470fbee52..72bbc3804ea 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -350,6 +350,6 @@ field_generator power level display if(O.last_warning && temp) if((world.time - O.last_warning) > 50) //to stop message-spam temp = 0 - message_admins("A singulo exists and a containment field has failed.",1) + msg_admin_attack("A singulo exists and a containment field has failed.",1) investigate_log("has failed whilst a singulo exists.","singulo") O.last_warning = world.time diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index a3065ce3bb4..3fe245d34dd 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -421,7 +421,7 @@ /obj/machinery/power/smes/proc/ion_act() - if(src.z == 1) + if((src.z in config.station_levels)) if(prob(1)) //explosion world << "\red SMES explosion in [src.loc.loc]" for(var/mob/M in viewers(src)) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 9c622e47ca9..b8356cacc34 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -1,20 +1,8 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - #define SOLAR_MAX_DIST 40 #define SOLARGENRATE 1500 var/list/solars_list = list() -// This will choose whether to get the solar list from the powernet or the powernet nodes, -// depending on the size of the nodes. -/obj/machinery/power/proc/get_solars_powernet() - if(!powernet) - return list() - if(solars_list.len < powernet.nodes) - return solars_list - else - return powernet.nodes - /obj/machinery/power/solar name = "solar panel" desc = "A solar electrical generator." @@ -22,7 +10,6 @@ var/list/solars_list = list() icon_state = "sp_base" anchored = 1 density = 1 - directwired = 1 use_power = 0 idle_power_usage = 0 active_power_usage = 0 @@ -30,26 +17,33 @@ var/list/solars_list = list() var/health = 10 var/obscured = 0 var/sunfrac = 0 - var/adir = SOUTH - var/ndir = SOUTH + var/adir = SOUTH // actual dir + var/ndir = SOUTH // target dir var/turn_angle = 0 var/obj/machinery/power/solar_control/control = null -/obj/machinery/power/solar/New(var/turf/loc, var/obj/item/solar_assembly/S, var/process = 1) +/obj/machinery/power/solar/New(var/turf/loc, var/obj/item/solar_assembly/S) ..(loc) Make(S) - connect_to_network(process) + connect_to_network() - -/obj/machinery/power/solar/disconnect_from_network() +/obj/machinery/power/solar/Destroy() + unset_control() //remove from control computer ..() - solars_list.Remove(src) -/obj/machinery/power/solar/connect_to_network(var/process) - ..() - if(process) - solars_list.Add(src) +//set the control of the panel to a given computer if closer than SOLAR_MAX_DIST +/obj/machinery/power/solar/proc/set_control(var/obj/machinery/power/solar_control/SC) + if(!SC || (get_dist(src, SC) > SOLAR_MAX_DIST)) + return 0 + control = SC + SC.connected_panels |= src + return 1 +//set the control of the panel to null and removes it from the control list of the previous control computer if needed +/obj/machinery/power/solar/proc/unset_control() + if(control) + control.connected_panels.Remove(src) + control = null /obj/machinery/power/solar/proc/Make(var/obj/item/solar_assembly/S) if(!S) @@ -57,22 +51,25 @@ var/list/solars_list = list() S.glass_type = /obj/item/stack/sheet/glass S.anchored = 1 S.loc = src + if(S.glass_type == /obj/item/stack/sheet/rglass) //if the panel is in reinforced glass + health *= 2 //this need to be placed here, because panels already on the map don't have an assembly linked to update_icon() /obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user) - if(iscrowbar(W)) - playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1) + if(istype(W, /obj/item/weapon/crowbar)) + playsound(src.loc, 'sound/machines/click.ogg', 50, 1) + user.visible_message("[user] begins to take the glass off the solar panel.") if(do_after(user, 50)) var/obj/item/solar_assembly/S = locate() in src if(S) S.loc = src.loc S.give_glass() - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) + playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) user.visible_message("[user] takes the glass off the solar panel.") - del(src) + qdel(src) return else if (W) src.add_fingerprint(user) @@ -92,9 +89,9 @@ var/list/solars_list = list() if(!(stat & BROKEN)) broken() else - getFromPool(/obj/item/weapon/shard, loc) - getFromPool(/obj/item/weapon/shard, loc) - del(src) + new /obj/item/weapon/shard(src.loc) + new /obj/item/weapon/shard(src.loc) + qdel(src) return return @@ -109,70 +106,58 @@ var/list/solars_list = list() src.dir = angle2dir(adir) return - +//calculates the fraction of the sunlight that the panel recieves /obj/machinery/power/solar/proc/update_solar_exposure() if(!sun) return if(obscured) sunfrac = 0 return - var/p_angle = abs((360+adir)%360 - (360+sun.angle)%360) + + //find the smaller angle between the direction the panel is facing and the direction of the sun (the sign is not important here) + var/p_angle = min(abs(adir - sun.angle), 360 - abs(adir - sun.angle)) + if(p_angle > 90) // if facing more than 90deg from sun, zero output sunfrac = 0 return - sunfrac = cos(p_angle) ** 2 + sunfrac = cos(p_angle) ** 2 + //isn't the power recieved from the incoming light proportionnal to cos(p_angle) (Lambert's cosine law) rather than cos(p_angle)^2 ? /obj/machinery/power/solar/process()//TODO: remove/add this from machines to save on processing as needed ~Carn PRIORITY - if(stat & BROKEN) return - if(!control) return + if(stat & BROKEN) + return + if(!sun || !control) //if there's no sun or the panel is not linked to a solar control computer, no need to proceed + return - if(adir != ndir) - adir = (360+adir+dd_range(-10,10,ndir-adir))%360 - update_icon() - update_solar_exposure() - - if(obscured) return - - var/sgen = SOLARGENRATE * sunfrac - add_avail(sgen) - if(powernet && control) - if(powernet.nodes[control]) + if(powernet) + if(powernet == control.powernet)//check if the panel is still connected to the computer + if(obscured) //get no light from the sun, so don't generate power + return + var/sgen = SOLARGENRATE * sunfrac + add_avail(sgen) control.gen += sgen - + else //if we're no longer on the same powernet, remove from control computer + unset_control() /obj/machinery/power/solar/proc/broken() + . = (!(stat & BROKEN)) stat |= BROKEN + unset_control() update_icon() return -/obj/machinery/power/solar/meteorhit() - if(stat & !BROKEN) - broken() - else - del(src) - - -/obj/machinery/power/solar/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - if(prob(15)) - getFromPool(/obj/item/weapon/shard, loc) - return - if(2.0) - if (prob(25)) - getFromPool(/obj/item/weapon/shard, loc) - qdel(src) - return - if (prob(50)) - broken() - if(3.0) - if (prob(25)) - broken() - return - +/obj/machinery/power/solar/ex_act(severity, target) + ..() + if(!gc_destroyed) + switch(severity) + if(2) + if(prob(50) && broken()) + new /obj/item/weapon/shard(src.loc) + if(3) + if(prob(25) && broken()) + new /obj/item/weapon/shard(src.loc) /obj/machinery/power/solar/blob_act() if(prob(75)) @@ -187,6 +172,29 @@ var/list/solars_list = list() . = PROCESS_KILL return +//trace towards sun to see if we're in shadow +/obj/machinery/power/solar/proc/occlusion() + + var/ax = x // start at the solar panel + var/ay = y + var/turf/T = null + + for(var/i = 1 to 20) // 20 steps is enough + ax += sun.dx // do step + ay += sun.dy + + T = locate( round(ax,0.5),round(ay,0.5),z) + + if(T.x == 1 || T.x==world.maxx || T.y==1 || T.y==world.maxy) // not obscured if we reach the edge + break + + if(T.density) // if we hit a solid turf, panel is obscured + obscured = 1 + return + + obscured = 0 // if hit the edge or stepped 20 times, not obscured + update_solar_exposure() + // // Solar Assembly - For construction of solar arrays. @@ -218,40 +226,42 @@ var/list/solars_list = list() /obj/item/solar_assembly/attackby(var/obj/item/weapon/W, var/mob/user) if(!anchored && isturf(loc)) - if(iswrench(W)) + if(istype(W, /obj/item/weapon/wrench)) anchored = 1 user.visible_message("[user] wrenches the solar assembly into place.") - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) return 1 else - if(iswrench(W)) + if(istype(W, /obj/item/weapon/wrench)) anchored = 0 user.visible_message("[user] unwrenches the solar assembly from it's place.") - playsound(get_turf(src), 'sound/items/Ratchet.ogg', 75, 1) + playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) return 1 if(istype(W, /obj/item/stack/sheet/glass) || istype(W, /obj/item/stack/sheet/rglass)) var/obj/item/stack/sheet/S = W - if(S.amount >= 2) + if(S.use(2)) glass_type = W.type - S.use(2) - playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1) + playsound(src.loc, 'sound/machines/click.ogg', 50, 1) user.visible_message("[user] places the glass on the solar assembly.") if(tracker) new /obj/machinery/power/tracker(get_turf(src), src) else new /obj/machinery/power/solar(get_turf(src), src) + else + user << "You need two sheets of glass to put them into a solar panel." + return return 1 if(!tracker) if(istype(W, /obj/item/weapon/tracker_electronics)) tracker = 1 user.drop_item() - del(W) + qdel(W) user.visible_message("[user] inserts the electronics into the solar assembly.") return 1 else - if(iscrowbar(W)) + if(istype(W, /obj/item/weapon/crowbar)) new /obj/item/weapon/tracker_electronics(src.loc) tracker = 0 user.visible_message("[user] takes out the electronics from the solar assembly.") @@ -269,18 +279,18 @@ var/list/solars_list = list() icon_state = "solar" anchored = 1 density = 1 - directwired = 1 use_power = 1 - idle_power_usage = 5 - active_power_usage = 20 + idle_power_usage = 250 var/id = 0 var/cdir = 0 + var/targetdir = 0 // target angle in manual tracking (since it updates every game minute) var/gen = 0 var/lastgen = 0 - var/track = 0 // 0=off 1=manual 2=automatic - var/trackrate = 60 // Measured in tenths of degree per minute (i.e. defaults to 6.0 deg/min) - var/trackdir = 1 // -1=CCW, 1=CW - var/nexttime = 0 // Next clock time that manual tracking will move the array + var/track = 0 // 0= off 1=timed 2=auto (tracker) + var/trackrate = 600 // 300-900 seconds + var/nexttime = 0 // time for a panel to rotate of 1� in manual tracking + var/obj/machinery/power/tracker/connected_tracker = null + var/list/connected_panels = list() /obj/machinery/power/solar_control/New() @@ -289,14 +299,53 @@ var/list/solars_list = list() initialize() connect_to_network() +/obj/machinery/power/solar_control/Destroy() + for(var/obj/machinery/power/solar/M in connected_panels) + M.unset_control() + if(connected_tracker) + connected_tracker.unset_control() + ..() + /obj/machinery/power/solar_control/disconnect_from_network() ..() solars_list.Remove(src) /obj/machinery/power/solar_control/connect_to_network() - ..() + var/to_return = ..() + if(powernet) //if connected and not already in solar_list... + solars_list |= src //... add it + return to_return + +//search for unconnected panels and trackers in the computer powernet and connect them +/obj/machinery/power/solar_control/proc/search_for_connected() if(powernet) - solars_list.Add(src) + for(var/obj/machinery/power/M in powernet.nodes) + if(istype(M, /obj/machinery/power/solar)) + var/obj/machinery/power/solar/S = M + if(!S.control) //i.e unconnected + S.set_control(src) + else if(istype(M, /obj/machinery/power/tracker)) + if(!connected_tracker) //if there's already a tracker connected to the computer don't add another + var/obj/machinery/power/tracker/T = M + if(!T.control) //i.e unconnected + T.set_control(src) + +//called by the sun controller, update the facing angle (either manually or via tracking) and rotates the panels accordingly +/obj/machinery/power/solar_control/proc/update() + if(stat & (NOPOWER | BROKEN)) + return + + switch(track) + if(1) + if(trackrate) //we're manual tracking. If we set a rotation speed... + cdir = targetdir //...the current direction is the targetted one (and rotates panels to it) + if(2) // auto-tracking + if(connected_tracker) + connected_tracker.set_angle(sun.angle) + + set_panels(cdir) + updateDialog() + /obj/machinery/power/solar_control/initialize() ..() @@ -314,32 +363,47 @@ var/list/solars_list = list() return icon_state = "solar" overlays.Cut() - if(cdir > 0) + if(cdir > -1) overlays += image('icons/obj/computer.dmi', "solcon-o", FLY_LAYER, angle2dir(cdir)) return - -/obj/machinery/power/solar_control/attack_ai(mob/user) - src.add_hiddenprint(user) - add_fingerprint(user) - if(stat & (BROKEN | NOPOWER)) return - interact(user) - - /obj/machinery/power/solar_control/attack_hand(mob/user) - add_fingerprint(user) - if(stat & (BROKEN | NOPOWER)) return - interact(user) + if(!..()) + ui_interact(user) +/obj/machinery/power/solar_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + + var/data = list() + + data["generated"] = round(lastgen) + data["angle"] = cdir + data["direction"] = angle2text(cdir) + + data["tracking_state"] = track + data["tracking_rate"] = trackrate + data["rotating_way"] = (trackrate<0 ? "CCW" : "CW") + + data["connected_panels"] = connected_panels.len + data["connected_tracker"] = (connected_tracker ? 1 : 0) + + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + if (!ui) + ui = new(user, src, ui_key, "solar_control.tmpl", name, 490, 420) + ui.set_initial_data(data) + ui.open() + ui.set_auto_update(1) + else + ui.push_data(data) + return /obj/machinery/power/solar_control/attackby(I as obj, user as mob) if(istype(I, /obj/item/weapon/screwdriver)) - playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1) + playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) if(do_after(user, 20)) if (src.stat & BROKEN) - user << "\blue The broken glass falls out." + user << "The broken glass falls out." var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - getFromPool(/obj/item/weapon/shard, loc) + new /obj/item/weapon/shard( src.loc ) var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A ) for (var/obj/C in src) C.loc = src.loc @@ -347,9 +411,9 @@ var/list/solars_list = list() A.state = 3 A.icon_state = "3" A.anchored = 1 - del(src) + qdel(src) else - user << "\blue You disconnect the monitor." + user << "You disconnect the monitor." var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A ) for (var/obj/C in src) @@ -358,12 +422,11 @@ var/list/solars_list = list() A.state = 4 A.icon_state = "4" A.anchored = 1 - del(src) + qdel(src) else src.attack_hand(user) return - /obj/machinery/power/solar_control/process() lastgen = gen gen = 0 @@ -371,139 +434,64 @@ var/list/solars_list = list() if(stat & (NOPOWER | BROKEN)) return - use_power(250) - if(track==1 && nexttime < world.time && trackdir*trackrate) - // Increments nexttime using itself and not world.time to prevent drift - nexttime = nexttime + 6000/trackrate - // Nudges array 1 degree in desired direction - cdir = (cdir+trackdir+360)%360 - set_panels(cdir) - update_icon() - - src.updateDialog() - - -// called by solar tracker when sun position changes -/obj/machinery/power/solar_control/proc/tracker_update(var/angle) - if(track != 2 || stat & (NOPOWER | BROKEN)) - return - cdir = angle - set_panels(cdir) - update_icon() - src.updateDialog() - - -/obj/machinery/power/solar_control/interact(mob/user) - if(stat & (BROKEN | NOPOWER)) return - if ( (get_dist(src, user) > 1 )) - if (!istype(user, /mob/living/silicon/ai)) - user.unset_machine() - user << browse(null, "window=solcon") - return - - add_fingerprint(user) - user.set_machine(src) - - - // AUTOFIXED BY fix_string_idiocy.py - // C:\Users\Rob\Documents\Projects\vgstation13\code\modules\power\solar.dm:407: var/t = "Solar Generator Control
"
-	var/t = {"Solar Generator Control
-Generated power : [round(lastgen)] W
-Station Rotational Period: [60/abs(sun.rate)] minutes
-Station Rotational Direction: [sun.rate<0 ? "CCW" : "CW"]
-Star Orientation: [sun.angle]° ([angle2text(sun.angle)])
-Array Orientation: [rate_control(src,"cdir","[cdir]°",1,10,60)] ([angle2text(cdir)])
-


-Tracking:"} - // END AUTOFIX - switch(track) - if(0) - t += "Off Manual Automatic
" - if(1) - t += "Off Manual Automatic
" - if(2) - t += "Off Manual Automatic
" - - - // AUTOFIXED BY fix_string_idiocy.py - // C:\Users\Rob\Documents\Projects\vgstation13\code\modules\power\solar.dm:423: t += "Manual Tracking Rate: [rate_control(src,"tdir","[trackrate/10]°/min ([trackdir<0 ? "CCW" : "CW"])",1,10)]
" - t += {"Manual Tracking Rate: [rate_control(src,"tdir","[trackrate/10]°/min ([trackdir<0 ? "CCW" : "CW"])",1,10)]
-Manual Tracking Direction:"} - // END AUTOFIX - switch(trackdir) - if(-1) - t += "CW CCW
" - if(1) - t += "CW CCW
" - t += "Close
" - user << browse(t, "window=solcon") - onclose(user, "solcon") - return + if(connected_tracker) //NOTE : handled here so that we don't add trackers to the processing list + if(connected_tracker.powernet != powernet) + connected_tracker.unset_control() + if(track==1 && trackrate) //manual tracking and set a rotation speed + if(nexttime <= world.time) //every time we need to increase/decrease the angle by 1�... + targetdir = (targetdir + trackrate/abs(trackrate) + 360) % 360 //... do it + nexttime += 36000/abs(trackrate) //reset the counter for the next 1� /obj/machinery/power/solar_control/Topic(href, href_list) if(..()) - usr << browse(null, "window=solcon") - usr.unset_machine() return - if(href_list["close"] ) - usr << browse(null, "window=solcon") - usr.unset_machine() - return - - if(href_list["dir"]) - cdir = text2num(href_list["dir"]) - set_panels(cdir) - update_icon() - - if(href_list["rate control"]) + + if(href_list["rate_control"]) if(href_list["cdir"]) src.cdir = dd_range(0,359,(360+src.cdir+text2num(href_list["cdir"]))%360) + src.targetdir = src.cdir + if(track == 2) //manual update, so losing auto-tracking + track = 0 spawn(1) set_panels(cdir) - update_icon() if(href_list["tdir"]) - src.trackrate = dd_range(0,360,src.trackrate+text2num(href_list["tdir"])) - if(src.trackrate) nexttime = world.time + 6000/trackrate + src.trackrate = dd_range(-7200,7200,src.trackrate+text2num(href_list["tdir"])) + if(src.trackrate) nexttime = world.time + 36000/abs(trackrate) if(href_list["track"]) - if(src.trackrate) nexttime = world.time + 6000/trackrate track = text2num(href_list["track"]) - if(powernet && (track == 2)) - if(!solars_list.Find(src,1,0) || !(locate(src) in solars_list) || !(src in solars_list)) - solars_list.Add(src) - for(var/obj/machinery/power/tracker/T in get_solars_powernet()) - if(powernet.nodes[T]) - cdir = T.sun_angle - break + if(track == 2) + if(connected_tracker) + connected_tracker.set_angle(sun.angle) + set_panels(cdir) + else if (track == 1) //begin manual tracking + src.targetdir = src.cdir + if(src.trackrate) nexttime = world.time + 36000/abs(trackrate) + set_panels(targetdir) - if(href_list["trackdir"]) - trackdir = text2num(href_list["trackdir"]) + if(href_list["search_connected"]) + search_for_connected() + if(connected_tracker && track == 2) + connected_tracker.set_angle(sun.angle) + set_panels(cdir) - set_panels(cdir) - update_icon() - src.updateUsrDialog() return - +//rotates the panel to the passed angle /obj/machinery/power/solar_control/proc/set_panels(var/cdir) - if(!powernet) return - for(var/obj/machinery/power/solar/S in get_solars_powernet()) - if(powernet.nodes[S]) - if(get_dist(S, src) < SOLAR_MAX_DIST) - if(!S.control) - S.control = src - S.ndir = cdir + + for(var/obj/machinery/power/solar/S in connected_panels) + S.adir = cdir //instantly rotates the panel + S.occlusion()//and + S.update_icon() //update it + + update_icon() /obj/machinery/power/solar_control/power_change() - if(powered()) - stat &= ~NOPOWER - update_icon() - else - spawn(rand(0, 15)) - stat |= NOPOWER - update_icon() + ..() + update_icon() /obj/machinery/power/solar_control/proc/broken() @@ -511,25 +499,16 @@ Manual Tracking Direction:"} update_icon() -/obj/machinery/power/solar_control/meteorhit() - broken() - return - - -/obj/machinery/power/solar_control/ex_act(severity) - switch(severity) - if(1.0) - //SN src = null - qdel(src) - return - if(2.0) - if (prob(50)) - broken() - if(3.0) - if (prob(25)) - broken() - return - +/obj/machinery/power/solar_control/ex_act(severity, target) + ..() + if(!gc_destroyed) + switch(severity) + if(2) + if(prob(50)) + broken() + if(3) + if(prob(25)) + broken() /obj/machinery/power/solar_control/blob_act() if (prob(75)) @@ -543,4 +522,4 @@ Manual Tracking Direction:"} /obj/item/weapon/paper/solar name = "paper- 'Going green! Setup your own solar array instructions.'" - info = "

Welcome

At greencorps we love the environment, and space. With this package you are able to help mother nature and produce energy without any usage of fossil fuel or plasma! Singularity energy is dangerous while solar energy is safe, which is why it's better. Now here is how you setup your own solar array.

You can make a solar panel by wrenching the solar assembly onto a cable node. Adding a glass panel, reinforced or regular glass will do, will finish the construction of your solar panel. It is that easy!.

Now after setting up 19 more of these solar panels you will want to create a solar tracker to keep track of our mother nature's gift, the sun. These are the same steps as before except you insert the tracker equipment circuit into the assembly before performing the final step of adding the glass. You now have a tracker! Now the last step is to add a computer to calculate the sun's movements and to send commands to the solar panels to change direction with the sun. Setting up the solar computer is the same as setting up any computer, so you should have no trouble in doing that. You do need to put a wire node under the computer, and the wire needs to be connected to the tracker.

Congratulations, you should have a working solar array. If you are having trouble, here are some tips. Make sure all solar equipment are on a cable node, even the computer. You can always deconstruct your creations if you make a mistake.

That's all to it, be safe, be green!

" + info = "

Welcome

At greencorps we love the environment, and space. With this package you are able to help mother nature and produce energy without any usage of fossil fuel or plasma! Singularity energy is dangerous while solar energy is safe, which is why it's better. Now here is how you setup your own solar array.

You can make a solar panel by wrenching the solar assembly onto a cable node. Adding a glass panel, reinforced or regular glass will do, will finish the construction of your solar panel. It is that easy!

Now after setting up 19 more of these solar panels you will want to create a solar tracker to keep track of our mother nature's gift, the sun. These are the same steps as before except you insert the tracker equipment circuit into the assembly before performing the final step of adding the glass. You now have a tracker! Now the last step is to add a computer to calculate the sun's movements and to send commands to the solar panels to change direction with the sun. Setting up the solar computer is the same as setting up any computer, so you should have no trouble in doing that. You do need to put a wire node under the computer, and the wire needs to be connected to the tracker.

Congratulations, you should have a working solar array. If you are having trouble, here are some tips. Make sure all solar equipment are on a cable node, even the computer. You can always deconstruct your creations if you make a mistake.

That's all to it, be safe, be green!

" \ No newline at end of file diff --git a/code/modules/power/switch.dm b/code/modules/power/switch.dm index 05683bd9c57..8c846cdb76b 100644 --- a/code/modules/power/switch.dm +++ b/code/modules/power/switch.dm @@ -10,7 +10,6 @@ icon_state = "switch-dbl-up" var/icon_state_on = "switch-dbl-down" var/icon_state_off = "switch-dbl-up" - flags = FPRINT density = 0 anchored = 1 var/on = 0 //up is off, down is on diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm index d35cf81ed45..5cf341f9fbb 100644 --- a/code/modules/power/tracker.dm +++ b/code/modules/power/tracker.dm @@ -10,78 +10,70 @@ icon_state = "tracker" anchored = 1 density = 1 - directwired = 1 use_power = 0 + var/id = 0 var/sun_angle = 0 // sun angle as set by sun datum + var/obj/machinery/power/solar_control/control = null /obj/machinery/power/tracker/New(var/turf/loc, var/obj/item/solar_assembly/S) ..(loc) + Make(S) + connect_to_network() + +/obj/machinery/power/tracker/Destroy() + unset_control() //remove from control computer + ..() + +//set the control of the tracker to a given computer if closer than SOLAR_MAX_DIST +/obj/machinery/power/tracker/proc/set_control(var/obj/machinery/power/solar_control/SC) + if(!SC || (get_dist(src, SC) > SOLAR_MAX_DIST)) + return 0 + control = SC + SC.connected_tracker = src + return 1 + +//set the control of the tracker to null and removes it from the previous control computer if needed +/obj/machinery/power/tracker/proc/unset_control() + if(control) + control.connected_tracker = null + control = null + +/obj/machinery/power/tracker/proc/Make(var/obj/item/solar_assembly/S) if(!S) S = new /obj/item/solar_assembly(src) S.glass_type = /obj/item/stack/sheet/glass S.tracker = 1 S.anchored = 1 S.loc = src - connect_to_network() + update_icon() -/obj/machinery/power/tracker/disconnect_from_network() - ..() - solars_list.Remove(src) - -/obj/machinery/power/tracker/connect_to_network() - ..() - solars_list.Add(src) - -// called by datum/sun/calc_position() as sun's angle changes +//updates the tracker icon and the facing angle for the control computer /obj/machinery/power/tracker/proc/set_angle(var/angle) sun_angle = angle //set icon dir to show sun illumination dir = turn(NORTH, -angle - 22.5) // 22.5 deg bias ensures, e.g. 67.5-112.5 is EAST - // check we can draw power - if(stat & NOPOWER) - return - - // find all solar controls and update them - // currently, just update all controllers in world - // ***TODO: better communication system using network - if(powernet) - for(var/obj/machinery/power/solar_control/C in get_solars_powernet()) - if(powernet.nodes[C]) - if(get_dist(C, src) < SOLAR_MAX_DIST) - C.tracker_update(angle) - + if(powernet && (powernet == control.powernet)) //update if we're still in the same powernet + control.cdir = angle /obj/machinery/power/tracker/attackby(var/obj/item/weapon/W, var/mob/user) - if(iscrowbar(W)) - playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1) + if(istype(W, /obj/item/weapon/crowbar)) + playsound(src.loc, 'sound/machines/click.ogg', 50, 1) + user.visible_message("[user] begins to take the glass off the solar tracker.") if(do_after(user, 50)) var/obj/item/solar_assembly/S = locate() in src if(S) S.loc = src.loc S.give_glass() - playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) + playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) user.visible_message("[user] takes the glass off the tracker.") - del(src) + qdel(src) return ..() -// timed process -// make sure we can draw power from the powernet -/obj/machinery/power/tracker/process() - - var/avail = surplus() - - if(avail > 500) - add_load(500) - stat &= ~NOPOWER - else - stat |= NOPOWER - - // Tracker Electronic /obj/item/weapon/tracker_electronics diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index b84eb480138..fc7641ab552 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -3,7 +3,7 @@ desc = "A bullet casing." icon = 'icons/obj/ammo.dmi' icon_state = "s-casing" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT throwforce = 1 w_class = 1.0 @@ -57,7 +57,7 @@ desc = "A box of ammo?" icon_state = "357" icon = 'icons/obj/ammo.dmi' - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT item_state = "syringe_kit" m_amt = 30000 diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index bd823f3c4ee..35fbeb2de35 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/gun.dmi' icon_state = "detective" item_state = "gun" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT m_amt = 2000 w_class = 3.0 @@ -313,10 +313,10 @@ set name = "Toggle Gunlight" set category = "Object" set desc = "Click to toggle your weapon's attached flashlight." - + if(!F) return - + var/mob/living/carbon/human/user = usr if(!isturf(user.loc)) user << "You cannot turn the light on while in this [user.loc]." diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 51a607890a0..b2951fb8eb2 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -78,7 +78,7 @@ obj/item/weapon/gun/energy/laser/retro item_state = "laser" w_class = 4.0 force = 10 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BACK fire_sound = 'sound/weapons/lasercannonfire.ogg' origin_tech = "combat=4;materials=3;powerstorage=3" diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 22d9bb2f47e..db58dedb0ea 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -7,7 +7,7 @@ fire_sound = 'sound/weapons/Laser.ogg' origin_tech = "combat=2;magnets=4" w_class = 4.0 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BACK projectile_type = "/obj/item/projectile/ion" diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index 9401783c54a..a874573aa25 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -5,7 +5,7 @@ icon_state = "staffofnothing" item_state = "staff" fire_sound = 'sound/weapons/emitter.ogg' - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT w_class = 5 var/projectile_type = "/obj/item/projectile/magic" var/max_charges = 6 diff --git a/code/modules/projectiles/guns/projectile/crossbow.dm b/code/modules/projectiles/guns/projectile/crossbow.dm index 655fcfb92a8..eea9054fce5 100644 --- a/code/modules/projectiles/guns/projectile/crossbow.dm +++ b/code/modules/projectiles/guns/projectile/crossbow.dm @@ -7,7 +7,6 @@ icon = 'icons/obj/weapons.dmi' icon_state = "bolt" item_state = "bolt" - flags = FPRINT | TABLEPASS throwforce = 8 w_class = 3.0 sharp = 1 diff --git a/code/modules/projectiles/guns/projectile/grenade launcher.dm b/code/modules/projectiles/guns/projectile/grenade launcher.dm index 8833a63b280..d4b2c6fc167 100644 --- a/code/modules/projectiles/guns/projectile/grenade launcher.dm +++ b/code/modules/projectiles/guns/projectile/grenade launcher.dm @@ -4,7 +4,7 @@ desc = "A device that launches things." icon = 'icons/obj/weapons.dmi' w_class = 5.0 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BACK var/release_force = 0 diff --git a/code/modules/projectiles/guns/projectile/pneumatic.dm b/code/modules/projectiles/guns/projectile/pneumatic.dm index e3bcc5517a5..6729a18663e 100644 --- a/code/modules/projectiles/guns/projectile/pneumatic.dm +++ b/code/modules/projectiles/guns/projectile/pneumatic.dm @@ -5,7 +5,7 @@ icon_state = "pneumatic" item_state = "pneumatic" w_class = 5.0 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT fire_sound_text = "a loud whoosh of moving air" fire_delay = 50 fire_sound = 'sound/weapons/tablehit1.ogg' diff --git a/code/modules/projectiles/guns/projectile/rocket.dm b/code/modules/projectiles/guns/projectile/rocket.dm index 5f939e59073..d21987e4a1c 100644 --- a/code/modules/projectiles/guns/projectile/rocket.dm +++ b/code/modules/projectiles/guns/projectile/rocket.dm @@ -8,7 +8,7 @@ throw_speed = 2 throw_range = 10 force = 5.0 - flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY + flags = CONDUCT | USEDELAY origin_tech = "combat=8;materials=5" projectile = /obj/item/missile var/missile_speed = 2 diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 90436a500d0..a4c006512de 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -5,7 +5,7 @@ item_state = "shotgun" w_class = 4.0 force = 10 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BACK origin_tech = "combat=4;materials=2" var/recentpump = 0 // to prevent spammage @@ -108,7 +108,7 @@ item_state = "shotgun" w_class = 4.0 force = 10 - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BACK origin_tech = "combat=3;materials=1" mag_type = "/obj/item/ammo_box/magazine/internal/cylinder/dualshot" diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 5f5eef7c03d..a7a02867871 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -16,7 +16,6 @@ density = 1 unacidable = 1 anchored = 1 //There's a reason this is here, Mport. God fucking damn it -Agouri. Find&Fix by Pete. The reason this is here is to stop the curving of emitter shots. - flags = FPRINT | TABLEPASS pass_flags = PASSTABLE mouse_opacity = 0 hitsound = 'sound/weapons/pierce.ogg' diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 8ce267c6d21..b030faa14d6 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -26,6 +26,7 @@ var/list/broken_requirements = list() var/broken_on_spawn = 0 var/recharge_delay = 15 + var/image/icon_beaker = null //cached overlay /obj/machinery/chem_dispenser/proc/recharge() @@ -59,6 +60,7 @@ dispensable_reagents = sortList(dispensable_reagents) if(broken_on_spawn) + overlays.Cut() var/amount = pick(3,3,4) var/list/options = list() options[/obj/item/weapon/stock_parts/capacitor/adv] = "Add an advanced capacitor to fix it." @@ -181,8 +183,7 @@ var/obj/item/weapon/reagent_containers/glass/B = beaker B.loc = loc beaker = null - if(!panel_open) - icon_state = initial(icon_state) + overlays.Cut() add_fingerprint(usr) return 1 // update UIs attached to this object @@ -211,7 +212,10 @@ B.loc = src user << "You set [B] on the machine." nanomanager.update_uis(src) // update all UIs attached to src - icon_state = "[initial(icon_state)]2" + if(!icon_beaker) + icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. + icon_beaker.pixel_x = rand(-10,5) + overlays += icon_beaker return /obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob) @@ -440,7 +444,7 @@ usr << browse(null, "window=chemmaster") usr.unset_machine() return - + if (href_list["print_p"]) if (!(src.printing)) src.printing = 1 @@ -465,7 +469,7 @@ P.info += "

Notes:
" P.name = "Chemical Analysis - [href_list["name"]]" src.printing = null - + if(beaker) var/datum/reagents/R = beaker:reagents if (href_list["analyze"]) @@ -1069,7 +1073,7 @@ user << "Cannot refine into a reagent." return 1 - user.before_take_item(O) + user.unEquip(O) O.loc = src holdingitems += O src.updateUsrDialog() diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 10ca1d5f5a6..0cc8356150c 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -31,12 +31,6 @@ datum on_reaction(var/datum/reagents/holder, var/created_volume) var/datum/effect/effect/system/reagents_explosion/e = new() e.set_up(round (created_volume/10, 1), holder.my_atom, 0, 0) - e.holder_damage(holder.my_atom) - if(isliving(holder.my_atom)) - e.amount *= 0.5 - var/mob/living/L = holder.my_atom - if(L.stat!=DEAD) - e.amount *= 0.5 e.start() holder.clear_reagents() return @@ -356,12 +350,6 @@ datum on_reaction(var/datum/reagents/holder, var/created_volume) var/datum/effect/effect/system/reagents_explosion/e = new() e.set_up(round (created_volume/2, 1), holder.my_atom, 0, 0) - e.holder_damage(holder.my_atom) - if(isliving(holder.my_atom)) - e.amount *= 0.5 - var/mob/living/L = holder.my_atom - if(L.stat!=DEAD) - e.amount *= 0.5 e.start() holder.clear_reagents() @@ -385,23 +373,14 @@ datum var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(2, 1, location) s.start() - for(var/mob/living/carbon/M in viewers(world.view, location)) - switch(get_dist(M, location)) - if(0 to 3) - if(hasvar(M, "glasses")) - if(istype(M:glasses, /obj/item/clothing/glasses/sunglasses)) - continue - - flick("e_flash", M.flash) - M.Weaken(15) - - if(4 to 5) - if(hasvar(M, "glasses")) - if(istype(M:glasses, /obj/item/clothing/glasses/sunglasses)) - continue - - flick("e_flash", M.flash) - M.Stun(5) + for(var/mob/living/carbon/C in hearers(5, location)) + if(C.eyecheck()) + continue + flick("e_flash", C.flash) + if(get_dist(C, location) < 4) + C.Weaken(5) + continue + C.Stun(5) napalm name = "Napalm" diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 31d68ef7b15..afe56a4f731 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -8,7 +8,6 @@ amount_per_transfer_from_this = 5 volume = 30 possible_transfer_amounts = null - flags = FPRINT var/mode = 1 var/charge_cost = 50 var/charge_tick = 0 @@ -68,14 +67,14 @@ var/datum/reagents/R = reagent_list[reagent_list.len] R.add_reagent(reagent, 30) -/obj/item/weapon/reagent_containers/borghypo/attack(mob/M as mob, mob/user as mob) +/obj/item/weapon/reagent_containers/borghypo/attack(mob/living/M as mob, mob/user as mob) var/datum/reagents/R = reagent_list[mode] if(!R.total_volume) user << "\red The injector is empty." return - if (!( istype(M, /mob) )) + if (!(istype(M))) return - if (R.total_volume) + if (R.total_volume && M.can_inject(user,1)) user << "\blue You inject [M] with the injector." M << "\red You feel a tiny prick!" diff --git a/code/modules/reagents/reagent_containers/drugs.dm b/code/modules/reagents/reagent_containers/drugs.dm index 1f9dced0500..6d8c83cf2c4 100644 --- a/code/modules/reagents/reagent_containers/drugs.dm +++ b/code/modules/reagents/reagent_containers/drugs.dm @@ -8,7 +8,7 @@ amount_per_transfer_from_this = 2 possible_transfer_amounts = 2 volume = 10 - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER var/label_text = "" diff --git a/code/modules/reagents/reagent_containers/food/condiment.dm b/code/modules/reagents/reagent_containers/food/condiment.dm index bd61291a099..dde17fa7f9a 100644 --- a/code/modules/reagents/reagent_containers/food/condiment.dm +++ b/code/modules/reagents/reagent_containers/food/condiment.dm @@ -10,7 +10,7 @@ desc = "Just your average condiment container." icon = 'icons/obj/food.dmi' icon_state = "emptycondiment" - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER possible_transfer_amounts = list(1,5,10) volume = 50 //Possible_states has the reagent id as key and a list of, in order, the icon_state, the name and the desc as values. Used in the on_reagent_change() to change names, descs and sprites. @@ -172,7 +172,6 @@ volume = 10 amount_per_transfer_from_this = 10 possible_transfer_amounts = 10 - flags = FPRINT | TABLEPASS possible_states = list("ketchup" = list("condi_ketchup", "Ketchup", "You feel more American already."), "capsaicin" = list("condi_hotsauce", "Hotsauce", "You can almost TASTE the stomach ulcers now!"), "soysauce" = list("condi_soysauce", "Soy Sauce", "A salty soy-based flavoring"), "frostoil" = list("condi_frostoil", "Coldsauce", "Leaves the tongue numb in it's passage"), "sodiumchloride" = list("condi_salt", "Salt Shaker", "Salt. From space oceans, presumably"), "blackpepper" = list("condi_pepper", "Pepper Mill", "Often used to flavor food or make people sneeze"), "cornoil" = list("condi_cornoil", "Corn Oil", "A delicious oil used in cooking. Made from corn"), "sugar" = list("condi_sugar", "Sugar", "Tasty spacey sugar!")) var/originalname = "condiment" //Can't use initial(name) for this. This stores the name set by condimasters. diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index 25a4fd2f47a..2024b18c95f 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -6,7 +6,7 @@ desc = "yummy" icon = 'icons/obj/drinks.dmi' icon_state = null - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER var/gulp_size = 5 //This is now officially broken ... need to think of a nice way to fix it. possible_transfer_amounts = list(5,10,25) volume = 50 @@ -161,7 +161,7 @@ amount_per_transfer_from_this = 20 possible_transfer_amounts = null volume = 150 - flags = FPRINT | CONDUCT | TABLEPASS | OPENCONTAINER + flags = CONDUCT | OPENCONTAINER /obj/item/weapon/reagent_containers/food/drinks/golden_cup/tournament_26_06_2011 desc = "A golden cup. It will be presented to a winner of tournament 26 june and name of the winner will be graved on it." diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index fb025cb37da..93841370d75 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -22,7 +22,7 @@ if(M == usr) usr << "You finish eating \the [src]." usr.visible_message("[usr] finishes eating \the [src].") - usr.drop_from_inventory(src) //so icons update :[ + usr.unEquip(src) //so icons update :[ if(trash) if(ispath(trash,/obj/item)) @@ -39,7 +39,7 @@ /obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone) if(!reagents.total_volume) //Shouldn't be needed but it checks to see if it has anything left in it. user << "\red None of [src] left, oh no!" - M.drop_from_inventory(src) //so icons update :[ + M.unEquip(src) //so icons update :[ del(src) return 0 @@ -194,7 +194,7 @@ if(!iscarbon(user)) return 1 user << "\red You slip [W] inside [src]." - user.u_equip(W) + user.unEquip(W) if ((user.client && user.s_active != src)) user.client.screen -= W W.dropped(user) diff --git a/code/modules/reagents/reagent_containers/food/snacks/grown.dm b/code/modules/reagents/reagent_containers/food/snacks/grown.dm index 036e19439d9..c2c86c01039 100644 --- a/code/modules/reagents/reagent_containers/food/snacks/grown.dm +++ b/code/modules/reagents/reagent_containers/food/snacks/grown.dm @@ -241,7 +241,7 @@ /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris/attackby(var/obj/item/W as obj, var/mob/user as mob) if(istype(W, /obj/item/weapon/rollingpaper)) - user.u_equip(W) + user.unEquip(W) var/obj/item/clothing/mask/cigarette/joint/J = new /obj/item/clothing/mask/cigarette/joint(user.loc) J.chem_volume = src.reagents.total_volume src.reagents.trans_to(J, J.chem_volume) @@ -264,7 +264,7 @@ /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus/attackby(var/obj/item/W as obj, var/mob/user as mob) if(istype(W, /obj/item/weapon/rollingpaper)) - user.u_equip(W) + user.unEquip(W) var/obj/item/clothing/mask/cigarette/joint/deus/J = new /obj/item/clothing/mask/cigarette/joint/deus(user.loc) J.chem_volume = src.reagents.total_volume src.reagents.trans_to(J, J.chem_volume) diff --git a/code/modules/reagents/reagent_containers/food/snacks/meat.dm b/code/modules/reagents/reagent_containers/food/snacks/meat.dm index d0c0e707c36..8809ddc6468 100644 --- a/code/modules/reagents/reagent_containers/food/snacks/meat.dm +++ b/code/modules/reagents/reagent_containers/food/snacks/meat.dm @@ -35,3 +35,7 @@ /obj/item/weapon/reagent_containers/food/snacks/meat/corgi name = "Corgi meat" desc = "Tastes like... well you know..." + +/obj/item/weapon/reagent_containers/food/snacks/meat/pug + name = "Pug meat" + desc = "Tastes like... well you know..." \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 0d1b64dacd3..ee8b39ce66b 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -12,7 +12,7 @@ amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30,50) volume = 50 - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER var/label_text = "" @@ -226,11 +226,11 @@ name = "large beaker" desc = "A large beaker. Can hold up to 100 units." icon_state = "beakerlarge" - g_amt = 5000 + g_amt = 2500 volume = 100 amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30,50,100) - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER /obj/item/weapon/reagent_containers/glass/beaker/vial name = "vial" @@ -240,7 +240,7 @@ volume = 25 amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25) - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER /obj/item/weapon/reagent_containers/glass/beaker/noreact name = "cryostasis beaker" @@ -249,7 +249,7 @@ g_amt = 500 volume = 50 amount_per_transfer_from_this = 10 - flags = FPRINT | TABLEPASS | OPENCONTAINER | NOREACT + flags = OPENCONTAINER | NOREACT /obj/item/weapon/reagent_containers/glass/beaker/bluespace name = "bluespace beaker" @@ -259,7 +259,7 @@ volume = 300 amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30,50,100,300) - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER /obj/item/weapon/reagent_containers/glass/beaker/cryoxadone New() @@ -291,14 +291,14 @@ amount_per_transfer_from_this = 20 possible_transfer_amounts = list(5,10,15,25,30,50,80,100,120) volume = 120 - flags = FPRINT | OPENCONTAINER + flags = OPENCONTAINER attackby(var/obj/D, mob/user as mob) if(isprox(D)) user << "You add [D] to [src]." del(D) user.put_in_hands(new /obj/item/weapon/bucket_sensor) - user.drop_from_inventory(src) + user.unEquip(src) del(src) /obj/item/weapon/reagent_containers/glass/beaker/vial @@ -309,7 +309,7 @@ volume = 15 amount_per_transfer_from_this = 5 possible_transfer_amounts = list(1,5,15) - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER /* /obj/item/weapon/reagent_containers/glass/blender_jug @@ -341,7 +341,6 @@ amount_per_transfer_from_this = 20 possible_transfer_amounts = list(10,20,30,60) volume = 120 - flags = FPRINT /obj/item/weapon/reagent_containers/glass/dispenser name = "reagent glass" @@ -349,7 +348,7 @@ icon = 'icons/obj/chemical.dmi' icon_state = "beaker0" amount_per_transfer_from_this = 10 - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER /obj/item/weapon/reagent_containers/glass/dispenser/surfactant name = "reagent glass (surfactant)" diff --git a/code/modules/reagents/reagent_containers/glass/bottle.dm b/code/modules/reagents/reagent_containers/glass/bottle.dm index 419abe144c1..5c903608707 100644 --- a/code/modules/reagents/reagent_containers/glass/bottle.dm +++ b/code/modules/reagents/reagent_containers/glass/bottle.dm @@ -9,7 +9,7 @@ item_state = "atoxinbottle" amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30) - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER volume = 30 New() diff --git a/code/modules/reagents/reagent_containers/glass/bottle/robot.dm b/code/modules/reagents/reagent_containers/glass/bottle/robot.dm index 9286e5ab03b..7c8bf02a5bb 100644 --- a/code/modules/reagents/reagent_containers/glass/bottle/robot.dm +++ b/code/modules/reagents/reagent_containers/glass/bottle/robot.dm @@ -2,7 +2,7 @@ /obj/item/weapon/reagent_containers/glass/bottle/robot amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30,50,100) - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER volume = 60 var/reagent = "" diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index cd0a0cca72f..4d19e402f3d 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -12,7 +12,7 @@ amount_per_transfer_from_this = 5 volume = 30 possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30) - flags = FPRINT | TABLEPASS | OPENCONTAINER + flags = OPENCONTAINER slot_flags = SLOT_BELT /obj/item/weapon/reagent_containers/hypospray/attack_paw(mob/user as mob) diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index e7b4ddf987f..5f4bdc09166 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -27,7 +27,7 @@ return M << "\blue You swallow [src]." - M.drop_from_inventory(src) //icon update + M.unEquip(src) //icon update if(reagents.total_volume) reagents.reaction(M, INGEST) spawn(5) @@ -49,7 +49,7 @@ if(!do_mob(user, M)) return - user.drop_from_inventory(src) //icon update + user.unEquip(src) //icon update for(var/mob/O in viewers(world.view, user)) O.show_message("\red [user] forces [M] to swallow [src].", 1) @@ -195,7 +195,7 @@ New() ..() reagents.add_reagent("paroxetine", 15) - + /obj/item/weapon/reagent_containers/pill/inaprovaline name = "Inaprovaline pill" desc = "Used to stabilize patients." diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 4f53ce68f19..3d2db2468af 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/janitor.dmi' icon_state = "cleaner" item_state = "cleaner" - flags = TABLEPASS|OPENCONTAINER|FPRINT|NOBLUDGEON + flags = OPENCONTAINER | NOBLUDGEON slot_flags = SLOT_BELT throwforce = 0 w_class = 2.0 diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index e24bcb4c90a..7ef798f86e5 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -294,7 +294,7 @@ if (target != user && target.getarmor(target_zone, "melee") > 5 && prob(50)) for(var/mob/O in viewers(world.view, user)) 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.u_equip(src) + user.unEquip(src) del(src) return diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index b95ea0c97a9..58e883716a0 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -7,7 +7,6 @@ icon_state = "watertank" density = 1 anchored = 0 - flags = FPRINT pressure_resistance = 2*ONE_ATMOSPHERE var/amount_per_transfer_from_this = 10 @@ -144,7 +143,7 @@ var/obj/item/device/assembly_holder/H = W if (istype(H.a_left,/obj/item/device/assembly/igniter) || istype(H.a_right,/obj/item/device/assembly/igniter)) - message_admins("[key_name_admin(user)] rigged fueltank at ([loc.x],[loc.y],[loc.z]) for explosion.") + msg_admin_attack("[key_name_admin(user)] rigged fueltank at ([loc.x],[loc.y],[loc.z]) for explosion.") log_game("[key_name(user)] rigged fueltank at ([loc.x],[loc.y],[loc.z]) for explosion.") rig = W diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 13740067ff2..9de451fd848 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -44,7 +44,7 @@ // attack by item places it in to disposal attackby(var/obj/item/I, var/mob/user) - if(stat & BROKEN || !I || !user) + if(stat & BROKEN || !I || !user || (I.flags & NODROP)) return if(isrobot(user) && !istype(I, /obj/item/weapon/storage/bag/trash)) @@ -102,7 +102,7 @@ T.update_icon() update() return - + if(istype(I, /obj/item/weapon/storage/part_replacer)) var/obj/item/weapon/storage/part_replacer/P = I if(P.contents.len) @@ -111,7 +111,7 @@ P.remove_from_storage(O,src) update() return - + var/obj/item/weapon/grab/G = I if(istype(G)) // handle grabbed mob if(ismob(G.affecting)) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index a30e15a58ec..17f62fc9c67 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -6,7 +6,7 @@ var/obj/wrapped = null density = 1 var/sortTag = 0 - flags = FPRINT | NOBLUDGEON + flags = NOBLUDGEON mouse_drag_pointer = MOUSE_ACTIVE_POINTER attack_hand(mob/user as mob) @@ -45,7 +45,6 @@ icon_state = "deliverycrateSmall" var/obj/item/wrapped = null var/sortTag = 0 - flags = FPRINT attack_self(mob/user as mob) @@ -164,7 +163,7 @@ w_class = 1 item_state = "electronic" - flags = FPRINT | TABLEPASS | CONDUCT + flags = CONDUCT slot_flags = SLOT_BELT proc/openwindow(mob/user as mob) diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index a129dde7472..cd3acea26fe 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -230,7 +230,7 @@ name = "Metal" id = "metal" build_type = AUTOLATHE - materials = list("$metal" = MINERAL_MATERIAL_AMOUNT) + materials = list("$metal" = 3750) build_path = /obj/item/stack/sheet/metal category = list("initial","Construction") @@ -254,7 +254,7 @@ name = "Reinforced Glass" id = "rglass" build_type = AUTOLATHE - materials = list("$metal" = 1000, "$glass" = MINERAL_MATERIAL_AMOUNT) + materials = list("$metal" = 1875, "$glass" = MINERAL_MATERIAL_AMOUNT) build_path = /obj/item/stack/sheet/rglass category = list("initial","Construction") @@ -262,7 +262,7 @@ name = "Metal Rod" id = "rods" build_type = AUTOLATHE - materials = list("$metal" = 1000) + materials = list("$metal" = 1875) build_path = /obj/item/stack/rods category = list("initial","Construction") @@ -440,7 +440,7 @@ id = "handcuffs" build_type = AUTOLATHE materials = list("$metal" = 500) - build_path = /obj/item/weapon/handcuffs + build_path = /obj/item/weapon/restraints/handcuffs category = list("hacked", "Security") /datum/design/incendiary_slug diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 3c4469f1859..d22d31ceeae 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -52,7 +52,7 @@ req_tech = list("programming" = 2, "biotech" = 2, "magnets" = 2) build_type = PROTOLATHE materials = list("$metal" = 30, "$glass" = 20) - reliability_base = 74 + reliability_base = 76 build_path = /obj/item/device/robotanalyzer category = list("Medical") @@ -77,6 +77,17 @@ build_path = /obj/item/weapon/implantcase/freedom category = list("Medical") +/datum/design/sensor_device + name = "Handheld Crew Monitor" + desc = "A device for tracking crew members on the station." + id = "sensor_device" + req_tech = list("biotech" = 4, "magnets" = 3, "materials" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 30, "$glass" = 20) + reliability_base = 76 + build_path = /obj/item/device/sensor_device + category = list("Medical") + /datum/design/implanter name = "Implanter" desc = "A basic implanter for injecting implants" diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 90e7ff47ace..94db17abdc4 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -130,8 +130,8 @@ won't update every console in existence) but it's more of a hassle to do. Also, files.known_tech=files.possible_tech for(var/datum/tech/KT in files.known_tech) if(KT.level < KT.max_level) - KT.level=KT.max_level - + KT.level=KT.max_level + /obj/machinery/computer/rdconsole/New() ..() files = new /datum/research(src) //Setup the research data holder. @@ -165,16 +165,17 @@ won't update every console in existence) but it's more of a hassle to do. Also, user.drop_item() D.loc = src user << " You add the disk to the machine!" - else if(istype(D,/obj/item/weapon/card/emag)) - if(!emagged) - playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) - emagged = 1 - user << "You you disable the security protocols" else ..() src.updateUsrDialog() return +/obj/machinery/computer/rdconsole/emag_act(user as mob) + if(!emagged) + playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) + emagged = 1 + user << "You disable the security protocols" + /obj/machinery/computer/rdconsole/Topic(href, href_list) if(..()) return @@ -207,7 +208,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, t_disk = null screen = 1.0 - else if(href_list["copy_tech"]) //Copys some technology data from the research holder to the disk. + else if(href_list["copy_tech"]) //Copy some technology data from the research holder to the disk. for(var/datum/tech/T in files.known_tech) if(href_list["copy_tech_ID"] == T.id) t_disk.stored = T @@ -249,11 +250,12 @@ won't update every console in existence) but it's more of a hassle to do. Also, linked_destroy.loaded_item = null linked_destroy.icon_state = "d_analyzer" screen = 2.1 - + else if(href_list["maxresearch"]) //Eject the item inside the destructive analyzer. if(!usr.client.holder) return + if(usr.client.holder & R_MENTOR) return screen = 0.0 - if(alert("Are you sure you want to maximize research levels?","Confirmation","Yes","No")=="No") + if(alert("Are you sure you want to maximize research levels?","Confirmation","Yes","No")=="No") return log_admin("[key_name(usr)] has maximized the research levels.") message_admins("[key_name_admin(usr)] has maximized the research levels.") @@ -261,7 +263,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, Maximize() screen = 1.0 updateUsrDialog() - griefProtection() //Update centcomm too + griefProtection() //Update centcomm too else if(href_list["deconstruct"]) //Deconstruct the item in the destructive analyzer and update the research holder. if(linked_destroy) @@ -371,6 +373,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, if(being_built) var/power = 2000 var/amount=text2num(href_list["amount"]) + var/old_screen = screen amount = max(1, min(10, amount)) for(var/M in being_built.materials) power += round(being_built.materials[M] * amount / 5) @@ -436,7 +439,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, else new_item.loc = linked_lathe.loc linked_lathe.busy = 0 - screen = 3.15 + screen = old_screen updateUsrDialog() else if(href_list["imprint"]) //Causes the Circuit Imprinter to build something. @@ -450,6 +453,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, break if(being_built) var/power = 2000 + var/old_screen = screen for(var/M in being_built.materials) power += round(being_built.materials[M] / 5) power = max(2000, power) @@ -488,7 +492,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, new_item.reliability = R new_item.loc = linked_imprinter.loc linked_imprinter.busy = 0 - screen = 4.1 + screen = old_screen updateUsrDialog() else if(href_list["disposeI"] && linked_imprinter) //Causes the circuit imprinter to dispose of a single reagent (all of it) @@ -590,7 +594,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, spawn(20) screen = 1.6 updateUsrDialog() - + else if(href_list["search"]) //Search for designs with name matching pattern var/compare @@ -608,7 +612,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, continue if(findtext(D.name,href_list["to_search"])) matching_designs.Add(D) - + updateUsrDialog() return @@ -870,7 +874,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, dat += " | LOCKED" dat += "
" dat += "
" - + if(3.17) //Display search result dat += "Main Menu" dat += "Protolathe Menu" @@ -978,7 +982,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, dat += "

Circuit Imprinter Menu:


" dat += "Material Amount: [linked_imprinter.TotalMaterials()]
" dat += "Chemical Volume: [linked_imprinter.reagents.total_volume]
" - + dat += "
\ \ \ @@ -1016,7 +1020,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, if(D.locked) dat += " | LOCKED" dat += "
" - + if(4.17) dat += "Main Menu" dat += "Circuit Imprinter Menu" diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 109ab110d71..f6e00bc69b4 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -319,14 +319,12 @@ onclose(user, "server_control") return -/obj/machinery/computer/rdservercontrol/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob) - if(istype(D, /obj/item/weapon/card/emag) && !emagged) +/obj/machinery/computer/rdservercontrol/emag_act(user as mob) + if(!emagged) playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) emagged = 1 user << "\blue You you disable the security protocols" src.updateUsrDialog() - return ..() - /obj/machinery/r_n_d/server/robotics name = "Robotics R&D Server" diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_replicator.dm b/code/modules/research/xenoarchaeology/artifact/artifact_replicator.dm index d770c0def1d..566e2382947 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact_replicator.dm +++ b/code/modules/research/xenoarchaeology/artifact/artifact_replicator.dm @@ -51,7 +51,7 @@ /obj/item/weapon/stock_parts/cell,\ /obj/item/weapon/circular_saw,\ /obj/item/weapon/hatchet,\ - /obj/item/weapon/handcuffs,\ + /obj/item/weapon/restraints/handcuffs,\ /obj/item/weapon/hemostat,\ /obj/item/weapon/kitchenknife,\ /obj/item/weapon/lighter,\ diff --git a/code/modules/research/xenoarchaeology/chemistry.dm b/code/modules/research/xenoarchaeology/chemistry.dm index e4701247544..f2a585835e9 100644 --- a/code/modules/research/xenoarchaeology/chemistry.dm +++ b/code/modules/research/xenoarchaeology/chemistry.dm @@ -87,7 +87,7 @@ datum amount_per_transfer_from_this = 1 possible_transfer_amounts = list(1, 2) volume = 2 - flags = FPRINT | OPENCONTAINER + flags = OPENCONTAINER obj/item/weapon/reagent_containers/glass/solution_tray/attackby(obj/item/weapon/W as obj, mob/living/user as mob) if(istype(W, /obj/item/weapon/pen)) diff --git a/code/modules/research/xenoarchaeology/finds/finds.dm b/code/modules/research/xenoarchaeology/finds/finds.dm index e2b4215128b..6b07fbb16a9 100644 --- a/code/modules/research/xenoarchaeology/finds/finds.dm +++ b/code/modules/research/xenoarchaeology/finds/finds.dm @@ -183,12 +183,12 @@ apply_image_decorations = 1 if(8) item_type = "handcuffs" - new_item = new /obj/item/weapon/handcuffs(src.loc) + new_item = new /obj/item/weapon/restraints/handcuffs(src.loc) additional_desc = "[pick("They appear to be for securing two things together","Looks kinky","Doesn't seem like a children's toy")]." if(9) item_type = "[pick("wicked","evil","byzantine","dangerous")] looking [pick("device","contraption","thing","trap")]" apply_prefix = 0 - new_item = new /obj/item/weapon/legcuffs/beartrap(src.loc) + new_item = new /obj/item/weapon/restraints/legcuffs/beartrap(src.loc) additional_desc = "[pick("It looks like it could take a limb off",\ "Could be some kind of animal trap",\ "There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains along part of it")]." diff --git a/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm b/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm index 7cfe69d1e35..8b1dc2f60ee 100644 --- a/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm +++ b/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm @@ -5,7 +5,6 @@ icon_state = "flashgun" item_state = "lampgreen" w_class = 1.0 - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT var/nearest_artifact_id = "unknown" var/nearest_artifact_distance = -1 diff --git a/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm b/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm index 344a6ccb225..a2b42a22b97 100644 --- a/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm +++ b/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm @@ -20,7 +20,6 @@ icon_state = "sampler0" item_state = "screwdriver_brown" w_class = 1.0 - flags = FPRINT | TABLEPASS //slot_flags = SLOT_BELT var/sampled_turf = "" var/num_stored_bags = 10 diff --git a/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm b/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm index ad9a525b716..7c55b81004a 100644 --- a/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm +++ b/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm @@ -10,7 +10,6 @@ icon_state = "crap" item_state = "analyzer" w_class = 1.0 - flags = FPRINT | TABLEPASS slot_flags = SLOT_BELT var/list/positive_locations = list() var/datum/depth_scan/current diff --git a/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm b/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm index 62bd9009603..48a5e0514d4 100644 --- a/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm +++ b/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm @@ -10,7 +10,7 @@ digspeed = 20 desc = "Thick metallic wires for clearing away dust and loose scree (1 centimetre excavation depth)." excavation_amount = 0.5 - drill_sound = 'sound/weapons/thudswoosh.ogg' + digsound = list('sound/weapons/thudswoosh.ogg') drill_verb = "brushing" w_class = 2 @@ -22,7 +22,7 @@ digspeed = 20 desc = "A miniature excavation tool for precise digging (2 centimetre excavation depth)." excavation_amount = 1 - drill_sound = 'sound/items/Screwdriver.ogg' + digsound = list('sound/items/Screwdriver.ogg') drill_verb = "delicately picking" w_class = 2 @@ -34,7 +34,7 @@ digspeed = 20 desc = "A miniature excavation tool for precise digging (4 centimetre excavation depth)." excavation_amount = 2 - drill_sound = 'sound/items/Screwdriver.ogg' + digsound = list('sound/items/Screwdriver.ogg') drill_verb = "delicately picking" w_class = 2 @@ -46,7 +46,7 @@ digspeed = 20 desc = "A miniature excavation tool for precise digging (6 centimetre excavation depth)." excavation_amount = 3 - drill_sound = 'sound/items/Screwdriver.ogg' + digsound = list('sound/items/Screwdriver.ogg') drill_verb = "delicately picking" w_class = 2 @@ -58,7 +58,7 @@ digspeed = 20 desc = "A miniature excavation tool for precise digging (8 centimetre excavation depth)." excavation_amount = 4 - drill_sound = 'sound/items/Screwdriver.ogg' + digsound = list('sound/items/Screwdriver.ogg') drill_verb = "delicately picking" w_class = 2 @@ -70,7 +70,7 @@ digspeed = 20 desc = "A miniature excavation tool for precise digging (10 centimetre excavation depth)." excavation_amount = 5 - drill_sound = 'sound/items/Screwdriver.ogg' + digsound = list('sound/items/Screwdriver.ogg') drill_verb = "delicately picking" w_class = 2 @@ -82,7 +82,7 @@ digspeed = 20 desc = "A miniature excavation tool for precise digging (12 centimetre excavation depth)." excavation_amount = 6 - drill_sound = 'sound/items/Screwdriver.ogg' + digsound = list('sound/items/Screwdriver.ogg') drill_verb = "delicately picking" w_class = 2 @@ -94,7 +94,7 @@ digspeed = 30 desc = "A smaller, more precise version of the pickaxe (30 centimetre excavation depth)." excavation_amount = 15 - drill_sound = 'sound/items/Crowbar.ogg' + digsound = list('sound/items/Crowbar.ogg') drill_verb = "clearing" w_class = 3 diff --git a/code/modules/security levels/security levels.dm b/code/modules/security levels/security levels.dm index b85d9589209..5ac35d1188e 100644 --- a/code/modules/security levels/security levels.dm +++ b/code/modules/security levels/security levels.dm @@ -7,6 +7,8 @@ //5 = code delta //config.alert_desc_blue_downto +/var/datum/announcement/priority/security/security_announcement_up = new(do_log = 0, do_newscast = 1, new_sound = sound('sound/misc/notice1.ogg')) +/var/datum/announcement/priority/security/security_announcement_down = new(do_log = 0, do_newscast = 1) /proc/set_security_level(var/level) switch(level) @@ -27,40 +29,35 @@ if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != security_level) switch(level) if(SEC_LEVEL_GREEN) - world << "Attention! Security level lowered to green." - world << "All threats to the station have passed. All weapons need to be holstered and privacy laws are once again fully enforced." + security_announcement_down.Announce("All threats to the station have passed. All weapons need to be holstered and privacy laws are once again fully enforced.","Attention! Security level lowered to green.") security_level = SEC_LEVEL_GREEN for(var/obj/machinery/firealarm/FA in world) - if(FA.z == 1 || FA.z == 5) + if((FA.z in config.contact_levels)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_green") if(SEC_LEVEL_BLUE) if(security_level < SEC_LEVEL_BLUE) - world << "Attention! Security level elevated to blue." - world << "The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible and random searches are permitted." + security_announcement_up.Announce("The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible and random searches are permitted.","Attention! Security level elevated to blue.") else - world << "Attention! Security level lowered to blue." - world << "The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed." + security_announcement_down.Announce("The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed.","Attention! Security level lowered to blue.") security_level = SEC_LEVEL_BLUE for(var/obj/machinery/firealarm/FA in world) - if(FA.z == 1 || FA.z == 5) + if((FA.z in config.contact_levels)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_blue") if(SEC_LEVEL_RED) if(security_level < SEC_LEVEL_RED) - world << "Attention! Code Red!" - world << "There is an immediate and serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised. The station's secure armory has been unlocked and is ready for use." + security_announcement_up.Announce("There is an immediate and serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised.","Attention! Code Red!") else - world << "Attention! Code Red!" - world << "The station's self-destruct mechanism has been deactivated, but there is still an immediate and serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised." + security_announcement_down.Announce("The station's self-destruct mechanism has been deactivated, but there is still an immediate and serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised.","Attention! Code Red!") security_level = SEC_LEVEL_RED var/obj/machinery/door/airlock/highsecurity/red/R = locate(/obj/machinery/door/airlock/highsecurity/red) in world - if(R && R.z == 1) + if(R && (R.z in config.station_levels)) R.locked = 0 R.update_icon() @@ -69,25 +66,24 @@ CC.post_status("alert", "redalert") for(var/obj/machinery/firealarm/FA in world) - if(FA.z == 1 || FA.z == 5) + if((FA.z in config.contact_levels)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_red") if(SEC_LEVEL_GAMMA) - world << "Attention! Gamma security level activated!" - world << "Central Command has ordered the Gamma security level on the station. Security is to have weapons equipped at all times, and all civilians are to immediately seek their nearest head for transportation to a secure location. The station's Gamma armory has been unlocked and is ready for use." + security_announcement_up.Announce("Central Command has ordered the Gamma security level on the station. Security is to have weapons equipped at all times, and all civilians are to immediately seek their nearest head for transportation to a secure location. The station's Gamma armory has been unlocked and is ready for use.","Attention! Gamma security level activated!") security_level = SEC_LEVEL_GAMMA move_gamma_ship() if(security_level < SEC_LEVEL_RED) for(var/obj/machinery/door/airlock/highsecurity/red/R in world) - if(R.z == 1) + if((R.z in config.station_levels)) R.locked = 0 R.update_icon() for(var/obj/machinery/door/airlock/hatch/gamma/H in world) - if(H.z == 1) + if((H.z in config.station_levels)) H.locked = 0 H.update_icon() @@ -96,14 +92,13 @@ CC.post_status("alert", "redalert") for(var/obj/machinery/firealarm/FA in world) - if(FA.z == 1 || FA.z == 5) + if((FA.z in config.contact_levels)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_gamma") FA.update_icon() if(SEC_LEVEL_EPSILON) - world << "Attention! Epsilon security level activated!" - world << "Central Command has ordered the Epsilon security level on the station. Consider all contracts terminated." + security_announcement_up.Announce("Central Command has ordered the Epsilon security level on the station. Consider all contracts terminated.","Attention! Epsilon security level activated!") security_level = SEC_LEVEL_EPSILON var/obj/machinery/computer/communications/CC = locate(/obj/machinery/computer/communications,world) @@ -111,13 +106,12 @@ CC.post_status("alert", "redalert") for(var/obj/machinery/firealarm/FA in world) - if(FA.z == 1 || FA.z == 5) + if((FA.z in config.contact_levels)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_epsilon") if(SEC_LEVEL_DELTA) - world << "Attention! Delta security level reached!" - world << "The station's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill." + security_announcement_up.Announce("The station's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill.","Attention! Delta security level reached!") security_level = SEC_LEVEL_DELTA var/obj/machinery/computer/communications/CC = locate(/obj/machinery/computer/communications,world) @@ -125,7 +119,7 @@ CC.post_status("alert", "redalert") for(var/obj/machinery/firealarm/FA in world) - if(FA.z == 1 || FA.z == 5) + if((FA.z in config.contact_levels)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_delta") diff --git a/code/modules/shuttles/escape_pods.dm b/code/modules/shuttles/escape_pods.dm index 0261997a9d3..17a97b79fe7 100644 --- a/code/modules/shuttles/escape_pods.dm +++ b/code/modules/shuttles/escape_pods.dm @@ -89,19 +89,14 @@ ui.open() ui.set_auto_update(1) -/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod_berth/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/card/emag) && !emagged) +/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod_berth/emag_act(user as mob) + if (!emagged) user << "\blue You emag the [src], arming the escape pod!" emagged = 1 if (istype(docking_program, /datum/computer/file/embedded_program/docking/simple/escape_pod)) var/datum/computer/file/embedded_program/docking/simple/escape_pod/P = docking_program if (!P.armed) P.arm() - return - - ..() - - //A docking controller program for a simple door based docking port /datum/computer/file/embedded_program/docking/simple/escape_pod diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm index f1ca624e73b..e6e7a8d4112 100644 --- a/code/modules/shuttles/shuttle_console.dm +++ b/code/modules/shuttles/shuttle_console.dm @@ -97,15 +97,11 @@ return shuttle.cancel_launch(user) -/obj/machinery/computer/shuttle_control/attackby(obj/item/weapon/W as obj, mob/user as mob) - - if (istype(W, /obj/item/weapon/card/emag)) - src.req_access = list() - src.req_one_access = list() - hacked = 1 - usr << "You short out the console's ID checking system. It's now available to everyone!" - else - ..() +/obj/machinery/computer/shuttle_control/emag_act(user as mob) + src.req_access = list() + src.req_one_access = list() + hacked = 1 + usr << "You short out the console's ID checking system. It's now available to everyone!" /obj/machinery/computer/shuttle_control/bullet_act(var/obj/item/projectile/Proj) visible_message("[Proj] ricochets off [src]!") diff --git a/code/modules/shuttles/shuttle_emergency.dm b/code/modules/shuttles/shuttle_emergency.dm index b5268fd2ca5..398bc9f9259 100644 --- a/code/modules/shuttles/shuttle_emergency.dm +++ b/code/modules/shuttles/shuttle_emergency.dm @@ -26,9 +26,9 @@ emergency_shuttle.departed = 1 if (emergency_shuttle.evac) - captain_announce("The Emergency Shuttle has left the station. Estimate [round(emergency_shuttle.estimate_arrival_time()/60,1)] minutes until the shuttle docks at Central Command.") + priority_announcement.Announce("The Emergency Shuttle has left the station. Estimate [round(emergency_shuttle.estimate_arrival_time()/60,1)] minutes until the shuttle docks at Central Command.") else - captain_announce("The Crew Transfer Shuttle has left the station. Estimate [round(emergency_shuttle.estimate_arrival_time()/60,1)] minutes until the shuttle docks at Central Command.") + priority_announcement.Announce("The Crew Transfer Shuttle has left the station. Estimate [round(emergency_shuttle.estimate_arrival_time()/60,1)] minutes until the shuttle docks at Central Command.") ..(origin, destination) @@ -153,14 +153,15 @@ /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) + read_authorization(W) + ..() + +/obj/machinery/computer/shuttle_control/emergency/emag_act(user as mob) + if (!emagged) user << "\blue You short out the [src]'s authorization protocols." emagged = 1 return - read_authorization(W) - ..() - /obj/machinery/computer/shuttle_control/emergency/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] var/datum/shuttle/ferry/emergency/shuttle = shuttle_controller.shuttles[shuttle_tag] diff --git a/code/modules/shuttles/shuttles_multi.dm b/code/modules/shuttles/shuttles_multi.dm index 3a73cafb58f..bac0384a4d3 100644 --- a/code/modules/shuttles/shuttles_multi.dm +++ b/code/modules/shuttles/shuttles_multi.dm @@ -33,14 +33,14 @@ if(cloaked || isnull(departure_message)) return - command_alert(departure_message,(announcer ? announcer : "Central Command")) + command_announcement.Announce(departure_message,(announcer ? announcer : "Central Command")) /datum/shuttle/multi_shuttle/proc/announce_arrival() if(cloaked || isnull(arrival_message)) return - command_alert(arrival_message,(announcer ? announcer : "Central Command")) + command_announcement.Announce(arrival_message,(announcer ? announcer : "Central Command")) /obj/machinery/computer/shuttle_control/multi icon_state = "syndishuttle" diff --git a/code/modules/store/store.dm b/code/modules/store/store.dm index 02a50c1b31a..41df9937fab 100644 --- a/code/modules/store/store.dm +++ b/code/modules/store/store.dm @@ -48,7 +48,7 @@ var/global/datum/store/centcomm_store=new /datum/store/proc/reconnect_database() for(var/obj/machinery/account_database/DB in world) - if(DB.z == 1) + if((DB.z in config.station_levels)) linked_db = DB break diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index f2e05b18256..c7ba4e304c7 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -283,7 +283,7 @@ "You touch \the [W] to \the [src] when everything suddenly goes silent.\"\n\The [W] flashes into dust as you flinch away from \the [src].",\ "Everything suddenly goes silent.") - user.drop_from_inventory(W) + user.unEquip(W) Consume(W) user.apply_effect(150, IRRADIATE) diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 07d5f7df40a..991e1714587 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -90,7 +90,8 @@ proc/do_surgery(mob/living/M, mob/living/user, obj/item/tool) if( prob(S.tool_quality(tool)) && do_mob(user, M, rand(S.min_duration, S.max_duration))) S.end_step(user, M, user.zone_sel.selecting, tool) //finish successfully else //or - S.fail_step(user, M, user.zone_sel.selecting, tool) //malpractice~ + if(!isrobot(user)) + S.fail_step(user, M, user.zone_sel.selecting, tool) //malpractice~ return 1 //don't want to do weapony things after surgery return 0 diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index 21283526863..42ee7f3786f 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -147,11 +147,12 @@ playsound(src.loc, 'sound/effects/pop.ogg', 50, 0) user << " You calibrate the telepad locator." -/obj/item/weapon/rcs/attackby(obj/item/W, mob/user) - if(istype(W, /obj/item/weapon/card/emag) && emagged == 0) +/obj/item/weapon/rcs/emag_act(user as mob) + if(!emagged) emagged = 1 var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(5, 1, src) s.start() user << " You emag the RCS. Click on it to toggle between modes." - return \ No newline at end of file + return + \ No newline at end of file diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index f37ec393860..9e82bef312a 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -55,12 +55,6 @@ return /obj/machinery/computer/telescience/attackby(obj/item/W, mob/user) - if(istype(W,/obj/item/weapon/card/emag)) - if (emagged == 0) - user << "\blue You scramble the Telescience authentication key to an unknown signal. You should be able to teleport to more places now!" - emagged = 1 - else - user << "\red The machine seems unaffected by the card swipe..." if(istype(W, /obj/item/bluespace_crystal)) if(crystals.len >= max_crystals) user << "There are not enough crystal slots." @@ -73,7 +67,7 @@ else if(istype(W, /obj/item/device/gps)) if(!inserted_gps) inserted_gps = W - user.before_take_item(W) + user.unEquip(W) W.loc = src user.visible_message("[user] inserts [W] into \the [src]'s GPS device slot.") updateUsrDialog() @@ -86,6 +80,13 @@ updateUsrDialog() else ..() + +/obj/machinery/computer/telescience/emag_act(user as mob) + if (!emagged) + user << "\blue You scramble the Telescience authentication key to an unknown signal. You should be able to teleport to more places now!" + emagged = 1 + else + user << "\red The machine seems unaffected by the card swipe..." /obj/machinery/computer/telescience/attack_ai(mob/user) src.attack_hand(user) diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index a929e4499d9..3af09357ca5 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -87,8 +87,6 @@ user << "[src] does not need a repair." else user << "Unable to repair while [src] is off." - else if(istype(W, /obj/item/weapon/card/emag) && !emagged) - Emag(user) else if(hasvar(W,"force") && hasvar(W,"damtype")) switch(W.damtype) if("fire") @@ -99,6 +97,10 @@ healthcheck() else ..() + +/obj/vehicle/emag_act(user as mob) + if(!emagged) + Emag(user) /obj/vehicle/attack_animal(var/mob/living/simple_animal/M as mob) if(M.melee_damage_upper == 0) return @@ -242,7 +244,7 @@ if(!istype(C)) return - H.drop_from_inventory(C) + H.unEquip(C) C.forceMove(src) cell = C powercheck() diff --git a/code/modules/virus2/curer.dm b/code/modules/virus2/curer.dm index 44a0fd348b9..fbc4624438f 100644 --- a/code/modules/virus2/curer.dm +++ b/code/modules/virus2/curer.dm @@ -32,7 +32,7 @@ state("The [src.name] Buzzes", "blue") return ..() - return + return /obj/machinery/computer/curer/attack_ai(var/mob/user as mob) return src.attack_hand(user) diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index 6669e2c15dc..be4a018bc60 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -382,12 +382,12 @@ /obj/item/clothing/mask/gas/virusclown_hat dropped(mob/user as mob) - canremove = 1 + flags &= ~NODROP ..() equipped(var/mob/user, var/slot) if (slot == slot_l_hand) - canremove = 1 //curses! + flags &= ~NODROP //curses! ..() */ @@ -626,12 +626,12 @@ /obj/item/clothing/glasses/virussunglasses dropped(mob/user as mob) - canremove = 1 + flags &= ~NODROP ..() equipped(var/mob/user, var/slot) if (slot == slot_glasses) - canremove = 0 //curses! + flags |= NODROP //curses! ..() @@ -650,12 +650,12 @@ /obj/item/clothing/mask/gas/virusclown_hat dropped(mob/user as mob) - canremove = 1 + flags &= ~NODROP ..() equipped(var/mob/user, var/slot) if (slot == slot_wear_mask) - canremove = 0 //curses! + flags |= NODROP //curses! ..() @@ -678,12 +678,12 @@ var/list/compatible_mobs = list(/mob/living/carbon/human, /mob/living/carbon/mon voicechange = 1 //NEEEEIIGHH dropped(mob/user as mob) - canremove = 1 + flags &= ~NODROP ..() equipped(var/mob/user, var/slot) if (slot == slot_wear_mask) - canremove = 0 //curses! + flags |= NODROP //curses! ..() diff --git a/code/modules/virus2/helpers.dm b/code/modules/virus2/helpers.dm index e3525797d71..88d95b6839a 100644 --- a/code/modules/virus2/helpers.dm +++ b/code/modules/virus2/helpers.dm @@ -46,7 +46,6 @@ proc/get_infection_chance(var/mob/living/carbon/M, var/vector = "Airborne") //Checks if table-passing table can reach target (5 tile radius) proc/airborne_can_reach(turf/source, turf/target, var/radius=5) var/obj/dummy = new(source) - dummy.flags = FPRINT | TABLEPASS dummy.pass_flags = PASSTABLE for(var/i=0, i[C.name] ([C.ckey]), the [C.job] has been freed due to (Client disconnect for 10 minutes)\n") for(var/obj/item/W in C) - C.drop_from_inventory(W) + C.unEquip(W) del(C) else if(!C.key && C.stat != DEAD && C.brain_op_stage!=4.0) job_master.FreeRole(C.job) message_admins("[C.name] ([C.ckey]), the [C.job] has been freed due to (Client quit BYOND)\n") for(var/obj/item/W in C) - C.drop_from_inventory(W) + C.unEquip(W) del(C) #undef INACTIVITY_KICK */ diff --git a/config/example/config.txt b/config/example/config.txt index 1a53041a540..a26aa4575d6 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -246,6 +246,18 @@ GHOST_INTERACTION ## Default is "python" on Windows, "/usr/bin/env python2" on UNIX. #PYTHON_PATH pythonw +## Defines which Z-levels the station exists on. +STATION_LEVELS 1 + +## Defines which Z-levels are used for admin functionality, such as Central Command and the Syndicate Shuttle +ADMIN_LEVELS 2 + +## Defines which Z-levels which, for example, a Code Red announcement may affect +CONTACT_LEVELS 1;5 + +## Defines all Z-levels a character can typically reach +PLAYER_LEVELS 1;3;4;5;6 + ## Expected round length in minutes EXPECTED_ROUND_LENGTH 120 diff --git a/icons/mob/animal.dmi b/icons/mob/animal.dmi index f3d08f645c3..0e83c2a3e63 100644 Binary files a/icons/mob/animal.dmi and b/icons/mob/animal.dmi differ diff --git a/icons/mob/back.dmi b/icons/mob/back.dmi index eb984038398..7c7101edd5b 100644 Binary files a/icons/mob/back.dmi and b/icons/mob/back.dmi differ diff --git a/icons/mob/custom-synthetic.dmi b/icons/mob/custom-synthetic.dmi index 77cef2656fb..1c61475e89e 100644 Binary files a/icons/mob/custom-synthetic.dmi and b/icons/mob/custom-synthetic.dmi differ diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi index f9244eace02..b111df54f9d 100644 Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ diff --git a/icons/mob/uniform.dmi b/icons/mob/uniform.dmi index 3f158f68f3f..a3bab9d2eda 100644 Binary files a/icons/mob/uniform.dmi and b/icons/mob/uniform.dmi differ diff --git a/icons/obj/chemical.dmi b/icons/obj/chemical.dmi index 83b8c49d86a..e0e70b2736a 100644 Binary files a/icons/obj/chemical.dmi and b/icons/obj/chemical.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index c8a10b1c4da..943095ad7b0 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/obj/clothing/uniforms.dmi b/icons/obj/clothing/uniforms.dmi index 574b1817f97..1afe63ffb70 100644 Binary files a/icons/obj/clothing/uniforms.dmi and b/icons/obj/clothing/uniforms.dmi differ diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index a83f398a1b3..d226cf46949 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/icons/obj/foodcart.dmi b/icons/obj/foodcart.dmi new file mode 100644 index 00000000000..334eb512993 Binary files /dev/null and b/icons/obj/foodcart.dmi differ diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index 9d85238456b..b85721bcc27 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ diff --git a/interface/interface.dm b/interface/interface.dm index 54a26a29cf8..e4d6a082d8e 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -13,10 +13,10 @@ src << "The wiki URL is not set in the server configuration." return -#define CHANGELOG "http://nanotrasen.se/phpBB3/viewtopic.php?f=10&t=36" +#define CHANGELOG "https://github.com/ParadiseSS13/Paradise/commits/master" /client/verb/changes() set name = "Changelog" - set desc = "Visit the forum to check out the changelog." + set desc = "Visit Github to check out the commits." set hidden = 1 if(alert("This will open the changelog in your browser. Are you sure?",,"Yes","No")=="No") diff --git a/maps/RandomZLevels/blackmarketpackers.dmm b/maps/RandomZLevels/blackmarketpackers.dmm index defb234b95b..be1160e8830 100644 --- a/maps/RandomZLevels/blackmarketpackers.dmm +++ b/maps/RandomZLevels/blackmarketpackers.dmm @@ -32,7 +32,7 @@ "aF" = (/turf/simulated/shuttle/wall,/area/awaymission/BMPship/Aft) "aG" = (/obj/structure/stool/bed/roller,/turf/simulated/floor/plating/airless,/area/awaymission/BMPship/Aft) "aH" = (/turf/simulated/floor/plating/airless,/area/awaymission/BMPship/Aft) -"aI" = (/obj/item/weapon/handcuffs,/obj/structure/closet/crate,/turf/simulated/floor/plating/airless,/area/awaymission/BMPship/Aft) +"aI" = (/obj/item/weapon/restraints/handcuffs,/obj/structure/closet/crate,/turf/simulated/floor/plating/airless,/area/awaymission/BMPship/Aft) "aJ" = (/obj/item/weapon/scalpel,/obj/structure/closet/crate,/obj/item/weapon/tank/anesthetic,/turf/simulated/floor/plating/airless,/area/awaymission/BMPship/Aft) "aK" = (/obj/item/bodybag,/turf/simulated/floor/plating/airless,/area/awaymission/BMPship/Aft) "aL" = (/obj/item/weapon/storage/box/syringes,/turf/simulated/floor/plating/airless,/area/awaymission/BMPship/Aft) diff --git a/maps/RandomZLevels/centcomAway.dmm b/maps/RandomZLevels/centcomAway.dmm index bc0a122da9f..48080199277 100644 --- a/maps/RandomZLevels/centcomAway.dmm +++ b/maps/RandomZLevels/centcomAway.dmm @@ -155,7 +155,7 @@ "cY" = (/obj/machinery/computer/secure_data,/turf/simulated/shuttle/floor{icon_state = "floor2"},/area/awaymission/centcomAway/hangar) "cZ" = (/obj/structure/stool/bed/chair{dir = 1},/turf/simulated/shuttle/floor{icon_state = "floor2"},/area/awaymission/centcomAway/hangar) "da" = (/obj/structure/stool/bed/chair{dir = 4},/turf/simulated/shuttle/floor{icon_state = "floor2"},/area/awaymission/centcomAway/hangar) -"db" = (/obj/structure/table/reinforced,/obj/item/weapon/clipboard,/obj/item/weapon/stamp,/turf/simulated/shuttle/floor{icon_state = "floor2"},/area/awaymission/centcomAway/hangar) +"db" = (/obj/structure/table/reinforced,/obj/item/weapon/clipboard,/obj/item/weapon/stamp/granted,/turf/simulated/shuttle/floor{icon_state = "floor2"},/area/awaymission/centcomAway/hangar) "dc" = (/obj/structure/disposalpipe/segment,/obj/machinery/door/window/northright,/turf/simulated/floor{tag = "icon-redfull"; icon_state = "redfull"},/area/awaymission/centcomAway/cafe) "dd" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating,/area/awaymission/centcomAway/maint) "de" = (/obj/structure/table,/obj/item/device/flash,/turf/simulated/shuttle/floor{icon_state = "floor2"},/area/awaymission/centcomAway/hangar) @@ -516,7 +516,7 @@ "jV" = (/obj/structure/table/reinforced,/obj/item/weapon/paper_bin,/turf/simulated/floor{icon_state = "dark"},/area/awaymission/centcomAway/general) "jW" = (/obj/machinery/computer/secure_data,/turf/simulated/floor{icon_state = "dark"},/area/awaymission/centcomAway/general) "jX" = (/obj/machinery/computer/card,/turf/simulated/floor{icon_state = "dark"},/area/awaymission/centcomAway/general) -"jY" = (/obj/item/weapon/stamp,/obj/structure/table/reinforced,/turf/simulated/floor{tag = "icon-vault (EAST)"; icon_state = "vault"; dir = 4},/area/awaymission/centcomAway/general) +"jY" = (/obj/item/weapon/stamp/granted,/obj/structure/table/reinforced,/turf/simulated/floor{tag = "icon-vault (EAST)"; icon_state = "vault"; dir = 4},/area/awaymission/centcomAway/general) "jZ" = (/obj/structure/table,/obj/item/weapon/firstaid_arm_assembly,/turf/simulated/floor{tag = "icon-vault"; icon_state = "vault"},/area/awaymission/centcomAway/hangar) "ka" = (/obj/structure/table,/obj/item/device/flash,/obj/item/device/flash,/turf/simulated/floor{tag = "icon-vault"; icon_state = "vault"},/area/awaymission/centcomAway/hangar) "kb" = (/obj/structure/table,/obj/item/stack/sheet/glass{amount = 50},/obj/item/stack/sheet/metal{amount = 50},/turf/simulated/floor{tag = "icon-vault"; icon_state = "vault"},/area/awaymission/centcomAway/hangar) @@ -583,14 +583,14 @@ "lk" = (/obj/structure/stool/bed/chair{dir = 4},/turf/simulated/floor{icon_state = "floor"},/area/awaymission/centcomAway/general) "ll" = (/obj/structure/stool/bed/chair{dir = 8},/turf/simulated/floor{icon_state = "floor"},/area/awaymission/centcomAway/general) "lm" = (/obj/machinery/photocopier,/turf/simulated/floor{tag = "icon-vault (EAST)"; icon_state = "vault"; dir = 4},/area/awaymission/centcomAway/general) -"ln" = (/obj/item/weapon/clipboard,/obj/structure/table,/obj/item/device/taperecorder,/obj/item/weapon/stamp,/turf/simulated/floor{tag = "icon-vault (NORTH)"; icon_state = "vault"; dir = 1},/area/awaymission/centcomAway/general) +"ln" = (/obj/item/weapon/clipboard,/obj/structure/table,/obj/item/device/taperecorder,/obj/item/weapon/stamp/granted,/turf/simulated/floor{tag = "icon-vault (NORTH)"; icon_state = "vault"; dir = 1},/area/awaymission/centcomAway/general) "lo" = (/obj/machinery/door/window/northright{icon_state = "right"; dir = 2},/turf/simulated/floor{icon_state = "floor"},/area/awaymission/centcomAway/general) "lp" = (/obj/structure/table/reinforced,/obj/machinery/door_control{id = "XCCsec2"; name = "XCC Shutter 2 Control"},/turf/simulated/floor{icon_state = "dark"},/area/awaymission/centcomAway/general) "lq" = (/turf/simulated/floor{dir = 8; icon_state = "red"},/area/awaymission/centcomAway/general) "lr" = (/turf/simulated/floor{icon_state = "red"; dir = 10},/area/awaymission/centcomAway/general) "ls" = (/turf/simulated/floor{icon_state = "red"; dir = 2},/area/awaymission/centcomAway/general) "lt" = (/turf/simulated/floor{dir = 8; icon_state = "redcorner"},/area/awaymission/centcomAway/general) -"lu" = (/obj/structure/table,/obj/item/weapon/storage/box/handcuffs,/obj/item/weapon/stamp,/turf/simulated/floor{tag = "icon-vault (NORTH)"; icon_state = "vault"; dir = 1},/area/awaymission/centcomAway/general) +"lu" = (/obj/structure/table,/obj/item/weapon/storage/box/handcuffs,/obj/item/weapon/stamp/granted,/turf/simulated/floor{tag = "icon-vault (NORTH)"; icon_state = "vault"; dir = 1},/area/awaymission/centcomAway/general) "lv" = (/obj/machinery/door/airlock/external,/turf/simulated/floor{icon_state = "red"; dir = 10},/area/awaymission/centcomAway/general) "lw" = (/obj/machinery/door/airlock/external,/turf/simulated/floor{icon_state = "green"; dir = 6},/area/awaymission/centcomAway/general) "lx" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/turf/simulated/floor/plating,/area/awaymission/centcomAway/general) @@ -629,7 +629,7 @@ "me" = (/obj/structure/stool/bed/chair{dir = 1},/turf/simulated/floor{tag = "icon-vault (NORTHEAST)"; icon_state = "vault"; dir = 5},/area/awaymission/centcomAway/thunderdome) "mf" = (/obj/structure/stool/bed/chair,/turf/simulated/floor{tag = "icon-redbluefull (WEST)"; icon_state = "redbluefull"; dir = 8},/area/awaymission/centcomAway/thunderdome) "mg" = (/turf/simulated/floor{dir = 8; icon_state = "red"},/area/awaymission/centcomAway/thunderdome) -"mh" = (/obj/structure/rack,/obj/item/weapon/legcuffs/beartrap,/obj/item/weapon/twohanded/fireaxe,/turf/simulated/floor{icon_state = "dark"},/area/awaymission/centcomAway/thunderdome) +"mh" = (/obj/structure/rack,/obj/item/weapon/restraints/legcuffs/beartrap,/obj/item/weapon/twohanded/fireaxe,/turf/simulated/floor{icon_state = "dark"},/area/awaymission/centcomAway/thunderdome) "mi" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating,/area/awaymission/centcomAway/thunderdome) "mj" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/turf/simulated/floor/plating,/area/awaymission/centcomAway/thunderdome) "mk" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating,/area/awaymission/centcomAway/thunderdome) diff --git a/maps/RandomZLevels/challenge.dmm b/maps/RandomZLevels/challenge.dmm index 2804fcfe6a8..697f5f877eb 100644 --- a/maps/RandomZLevels/challenge.dmm +++ b/maps/RandomZLevels/challenge.dmm @@ -119,7 +119,7 @@ "co" = (/turf/simulated/floor/bluegrid,/area/awaymission/challenge/end) "cp" = (/turf/simulated/floor{tag = "icon-vault (WEST)"; icon_state = "vault"; dir = 8},/area/awaymission/challenge/end) "cq" = (/obj/structure/window/reinforced{dir = 8},/turf/space,/area) -"cr" = (/obj/structure/table/woodentable,/obj/item/weapon/melee/chainofcommand,/obj/item/weapon/stamp,/turf/simulated/floor/carpet,/area/awaymission/challenge/end) +"cr" = (/obj/structure/table/woodentable,/obj/item/weapon/melee/chainofcommand,/obj/item/weapon/stamp/granted,/turf/simulated/floor/carpet,/area/awaymission/challenge/end) "cs" = (/obj/structure/table/woodentable,/obj/item/weapon/paper{info = "Congratulations,

Your station has been selected to carry out the Gateway Project.

The equipment will be shipped to you at the start of the next quarter.
You are to prepare a secure location to house the equipment as outlined in the attached documents.

--Nanotrasen Blue Space Research"; name = "Confidential Correspondence, Pg 1"; pixel_x = 0; pixel_y = 0},/obj/item/weapon/folder/blue,/turf/simulated/floor/carpet,/area/awaymission/challenge/end) "ct" = (/obj/structure/table/woodentable,/obj/machinery/light/small/lamp/green{pixel_x = 1; pixel_y = 5},/turf/simulated/floor/carpet,/area/awaymission/challenge/end) "cu" = (/obj/structure/rack,/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced,/turf/simulated/floor/wood,/area/awaymission/challenge/end) diff --git a/maps/RandomZLevels/fileList.txt b/maps/RandomZLevels/fileList.txt index 566dc613557..3c3785c3beb 100644 --- a/maps/RandomZLevels/fileList.txt +++ b/maps/RandomZLevels/fileList.txt @@ -9,7 +9,7 @@ #maps/RandomZLevels/academy.dmm maps/RandomZLevels/beach.dmm -maps/RandomZLevels/blackmarketpackers.dmm +#maps/RandomZLevels/blackmarketpackers.dmm maps/RandomZLevels/challenge.dmm #maps/RandomZLevels/centcomAway.dmm #maps/RandomZLevels/clownplanet.dmm diff --git a/maps/RandomZLevels/spacehotel.dmm b/maps/RandomZLevels/spacehotel.dmm index 95051ed7cf6..78fe2b7b35d 100644 --- a/maps/RandomZLevels/spacehotel.dmm +++ b/maps/RandomZLevels/spacehotel.dmm @@ -2,7 +2,7 @@ "ab" = (/turf/unsimulated/wall,/area) "ac" = (/turf/unsimulated/wall,/area/awaymission) "ad" = (/obj/effect/decal/cleanable/blood/old,/turf/unsimulated/wall,/area/awaymission) -"ae" = (/obj/machinery/power/apc{step_y = 0},/obj/structure/cable{icon_state = "0-2"; d2 = 2},/turf/unsimulated/wall,/area/awaymission) +"ae" = (/obj/machinery/power/apc,/obj/structure/cable{icon_state = "0-2"; d2 = 2},/turf/unsimulated/wall,/area/awaymission) "af" = (/obj/machinery/power/terminal,/obj/structure/cable{icon_state = "0-4"; d2 = 4},/turf/simulated/floor/plating,/area/awaymission) "ag" = (/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/turf/simulated/floor/plating,/area/awaymission) "ah" = (/obj/item/stack/cable_coil/random,/obj/effect/decal/remains/human,/turf/simulated/floor/plating,/area/awaymission) @@ -227,7 +227,7 @@ "es" = (/obj/structure/rack,/obj/item/key,/obj/item/key,/obj/item/key,/obj/item/key,/obj/item/key,/turf/simulated/floor/carpet,/area/awaymission) "et" = (/obj/structure/stool/bed/chair/comfy,/obj/effect/decal/cleanable/flour{desc = "Probably."},/obj/effect/decal/cleanable/pie_smudge,/turf/simulated/floor/carpet,/area/awaymission) "eu" = (/obj/structure/stool/bed/chair/comfy,/obj/effect/decal/cleanable/flour{desc = "Probably."},/obj/effect/decal/cleanable/flour{desc = "Probably."},/obj/effect/decal/cleanable/pie_smudge,/turf/simulated/floor/carpet,/area/awaymission) -"ev" = (/obj/item/weapon/legcuffs,/turf/simulated/floor/engine/cult,/area/awaymission) +"ev" = (/obj/item/weapon/restraints/legcuffs,/turf/simulated/floor/engine/cult,/area/awaymission) "ew" = (/obj/machinery/space_heater,/turf/simulated/floor/carpet,/area/awaymission) "ex" = (/obj/structure/table/woodentable,/turf/simulated/floor/carpet,/area/awaymission) "ey" = (/obj/structure/table,/obj/machinery/computer/security/telescreen{desc = "Not used to spy on hotel rooms."; dir = 1; network = "Hotel"; use_power = 0},/turf/simulated/floor/carpet,/area/awaymission) diff --git a/maps/RandomZLevels/stationCollision.dmm b/maps/RandomZLevels/stationCollision.dmm index 89fe6d73a63..d46caef2830 100644 --- a/maps/RandomZLevels/stationCollision.dmm +++ b/maps/RandomZLevels/stationCollision.dmm @@ -260,7 +260,7 @@ "eZ" = (/turf/simulated/floor,/area/awaymission/northblock) "fa" = (/obj/machinery/light/small,/turf/simulated/floor/airless{icon_state = "floorscorched1"},/area/awaymission/northblock) "fb" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/airless{icon_state = "floorscorched2"},/area/awaymission/northblock) -"fc" = (/obj/structure/table,/obj/item/weapon/stock_parts/capacitor,/obj/item/weapon/stock_parts/capacitor{pixel_x = -3},/obj/item/weapon/stock_parts/scanning_module{pixel_x = 3; pixel_y = 3},/obj/item/weapon/stock_parts/scanning_module{pixel_y = -3; step_y = 0},/turf/simulated/floor{icon_state = "showroomfloor"},/area/awaymission/research) +"fc" = (/obj/structure/table,/obj/item/weapon/stock_parts/capacitor,/obj/item/weapon/stock_parts/capacitor{pixel_x = -3},/obj/item/weapon/stock_parts/scanning_module{pixel_x = 3; pixel_y = 3},/obj/item/weapon/stock_parts/scanning_module{pixel_y = -3},/turf/simulated/floor{icon_state = "showroomfloor"},/area/awaymission/research) "fd" = (/obj/structure/stool/bed/chair{dir = 1},/turf/simulated/floor{icon_state = "showroomfloor"},/area/awaymission/research) "fe" = (/obj/structure/table,/obj/item/weapon/stock_parts/manipulator,/obj/item/weapon/stock_parts/manipulator{pixel_x = -3; pixel_y = 3},/obj/item/weapon/stock_parts/micro_laser{pixel_x = -3; pixel_y = -3},/obj/item/weapon/stock_parts/micro_laser{pixel_x = 3; pixel_y = 3},/turf/simulated/floor{icon_state = "showroomfloor"},/area/awaymission/research) "ff" = (/obj/machinery/computer/crew,/turf/simulated/floor{dir = 4; icon_state = "bluecorner"},/area/awaymission/northblock) diff --git a/maps/RandomZLevels/undergroundoutpost45.dmm b/maps/RandomZLevels/undergroundoutpost45.dmm index ac64937fec2..53165c7d8a9 100644 --- a/maps/RandomZLevels/undergroundoutpost45.dmm +++ b/maps/RandomZLevels/undergroundoutpost45.dmm @@ -787,7 +787,7 @@ "pg" = (/obj/item/weapon/storage/secure/safe{pixel_x = 5; pixel_y = -27},/turf/simulated/floor{dir = 5; heat_capacity = 1e+006; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/awaycontent/a5{has_gravity = 1; name = "UO45 Research"}) "ph" = (/obj/structure/filingcabinet,/turf/simulated/floor{dir = 10; heat_capacity = 1e+006; icon_state = "red"},/area/awaycontent/a5{has_gravity = 1; name = "UO45 Research"}) "pi" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/door_control{desc = "A remote control-switch whichs locks the research division down in the event of a biohazard leak or contamination."; id = "UO45_biohazard"; name = "Biohazard Door Control"; pixel_x = 0; pixel_y = -24; req_access_txt = "201"},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor{heat_capacity = 1e+006; icon_state = "red"},/area/awaycontent/a5{has_gravity = 1; name = "UO45 Research"}) -"pj" = (/obj/structure/closet/secure_closet{icon_broken = "secbroken"; icon_closed = "sec"; icon_locked = "sec1"; icon_off = "secoff"; icon_opened = "secopen"; icon_state = "sec1"; locked = 1; name = "security officer's locker"; req_access_txt = "201"},/obj/machinery/atmospherics/unary/vent_scrubber{dir = 2; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/obj/item/weapon/handcuffs,/obj/item/device/flash,/obj/item/weapon/reagent_containers/spray/pepper,/turf/simulated/floor{dir = 6; heat_capacity = 1e+006; icon_state = "red"},/area/awaycontent/a5{has_gravity = 1; name = "UO45 Research"}) +"pj" = (/obj/structure/closet/secure_closet{icon_broken = "secbroken"; icon_closed = "sec"; icon_locked = "sec1"; icon_off = "secoff"; icon_opened = "secopen"; icon_state = "sec1"; locked = 1; name = "security officer's locker"; req_access_txt = "201"},/obj/machinery/atmospherics/unary/vent_scrubber{dir = 2; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/obj/item/weapon/restraints/handcuffs,/obj/item/device/flash,/obj/item/weapon/reagent_containers/spray/pepper,/turf/simulated/floor{dir = 6; heat_capacity = 1e+006; icon_state = "red"},/area/awaycontent/a5{has_gravity = 1; name = "UO45 Research"}) "pk" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating{broken = 1; heat_capacity = 1e+006; icon_state = "platingdmg3"; tag = "icon-platingdmg3"},/area/awaycontent/a5{has_gravity = 1; name = "UO45 Research"}) "pl" = (/obj/structure/flora/kirbyplants{layer = 5},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor{dir = 10; heat_capacity = 1e+006; icon_state = "neutral"},/area/awaycontent/a2{has_gravity = 1; name = "UO45 Crew Quarters"}) "pm" = (/turf/simulated/floor{dir = 8; heat_capacity = 1e+006; icon_state = "neutralcorner"},/area/awaycontent/a2{has_gravity = 1; name = "UO45 Crew Quarters"}) diff --git a/maps/cyberiad.dmm b/maps/cyberiad.dmm index cbaf629896a..75a770d8900 100644 --- a/maps/cyberiad.dmm +++ b/maps/cyberiad.dmm @@ -560,7 +560,7 @@ "akN" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor,/area/security/main) "akO" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9; pixel_y = 0},/turf/simulated/floor,/area/security/main) "akP" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "Secure Gate"; name = "Security Blast Door"; opacity = 0},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/cable,/turf/simulated/floor/plating,/area/security/main) -"akQ" = (/obj/structure/window/reinforced{dir = 8},/obj/structure/table/reinforced,/obj/item/weapon/handcuffs,/obj/item/device/flash,/obj/machinery/light{dir = 8},/obj/structure/disposalpipe/segment,/turf/simulated/floor{dir = 2; icon_state = "redfull"; tag = "icon-redfull (NORTHWEST)"},/area/security/main) +"akQ" = (/obj/structure/window/reinforced{dir = 8},/obj/structure/table/reinforced,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flash,/obj/machinery/light{dir = 8},/obj/structure/disposalpipe/segment,/turf/simulated/floor{dir = 2; icon_state = "redfull"; tag = "icon-redfull (NORTHWEST)"},/area/security/main) "akR" = (/obj/structure/disposalpipe/segment{dir = 1; icon_state = "pipe-c"},/turf/simulated/floor{icon_state = "red"; dir = 8},/area/security/main) "akS" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/disposalpipe/segment{dir = 2; icon_state = "pipe-c"},/turf/simulated/floor,/area/security/main) "akT" = (/obj/structure/closet/secure_closet/security,/obj/machinery/firealarm{dir = 4; pixel_x = 24},/turf/simulated/floor,/area/security/main) @@ -605,7 +605,7 @@ "alG" = (/turf/simulated/shuttle/wall{icon_state = "swall3"; dir = 2},/area/shuttle/siberia/station) "alH" = (/obj/machinery/computer/shuttle_control/labor_camp,/obj/machinery/embedded_controller/radio/simple_docking_controller{id_tag = "labor_shuttle"; pixel_x = -25; pixel_y = 0; req_one_access_txt = "13"; tag_door = "labor_shuttle_hatch"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/siberia/station) "alI" = (/obj/structure/stool/bed/chair/office/dark{dir = 1},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/siberia/station) -"alJ" = (/obj/structure/table,/obj/item/weapon/folder/red,/obj/item/weapon/handcuffs,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/siberia/station) +"alJ" = (/obj/structure/table,/obj/item/weapon/folder/red,/obj/item/weapon/restraints/handcuffs,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/siberia/station) "alK" = (/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/cable{icon_state = "0-4"; d2 = 4},/turf/simulated/floor/plating,/area/security/prisonershuttle) "alL" = (/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/grille,/obj/structure/cable{icon_state = "0-4"; d2 = 4},/obj/structure/cable{d2 = 8; icon_state = "0-8"},/turf/simulated/floor/plating,/area/security/prisonershuttle) "alM" = (/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/structure/cable{icon_state = "0-4"; d2 = 4},/turf/simulated/floor/plating,/area/security/prisonershuttle) @@ -900,7 +900,7 @@ "arp" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 8},/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "Secure Gate"; name = "Security Blast Door"; opacity = 0},/turf/simulated/floor/plating,/area/security/prison/cell_block/C) "arq" = (/obj/item/weapon/storage/secure/safe{pixel_x = -23},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor{icon_state = "grimy"},/area/security/detectives_office) "arr" = (/obj/structure/stool,/turf/simulated/floor/carpet,/area/security/detectives_office) -"ars" = (/obj/structure/table/woodentable,/obj/structure/noticeboard{pixel_x = 30; pixel_y = 0},/obj/item/weapon/book/manual/security_space_law,/obj/item/weapon/handcuffs,/turf/simulated/floor{icon_state = "grimy"},/area/security/detectives_office) +"ars" = (/obj/structure/table/woodentable,/obj/structure/noticeboard{pixel_x = 30; pixel_y = 0},/obj/item/weapon/book/manual/security_space_law,/obj/item/weapon/restraints/handcuffs,/turf/simulated/floor{icon_state = "grimy"},/area/security/detectives_office) "art" = (/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 6},/obj/machinery/light/small{dir = 8},/turf/simulated/floor/plating,/area/maintenance/fsmaint) "aru" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/structure/stool,/turf/simulated/floor/plating,/area/maintenance/fsmaint) "arv" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/structure/table,/turf/simulated/floor/plating,/area/maintenance/fsmaint) @@ -1308,7 +1308,7 @@ "azh" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor/carpet,/area/magistrateoffice) "azi" = (/obj/machinery/atmospherics/pipe/manifold/hidden/supply{level = 1},/obj/structure/stool/bed/chair/comfy/black,/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor/carpet,/area/magistrateoffice) "azj" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9; pixel_y = 0},/obj/structure/table/reinforced,/obj/item/device/megaphone,/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/turf/simulated/floor/carpet,/area/magistrateoffice) -"azk" = (/obj/structure/table/reinforced,/obj/machinery/photocopier/faxmachine{department = "Internal Affairs"},/turf/simulated/floor{tag = "icon-cult"; icon_state = "cult"; dir = 2},/area/lawoffice) +"azk" = (/obj/structure/table/reinforced,/obj/machinery/photocopier/faxmachine{department = "Internal Affairs Office"},/turf/simulated/floor{tag = "icon-cult"; icon_state = "cult"; dir = 2},/area/lawoffice) "azl" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 2; on = 1},/turf/simulated/floor{tag = "icon-cult"; icon_state = "cult"; dir = 2},/area/lawoffice) "azm" = (/obj/structure/stool/bed/chair/office/dark{dir = 4},/obj/effect/landmark/start{name = "Internal Affairs Agent"},/turf/simulated/floor{tag = "icon-cult"; icon_state = "cult"; dir = 2},/area/lawoffice) "azn" = (/obj/structure/table/reinforced,/turf/simulated/floor{tag = "icon-cult"; icon_state = "cult"; dir = 2},/area/lawoffice) @@ -3656,8 +3656,8 @@ "bsp" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor/plating,/area/maintenance/port) "bsq" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/effect/decal/cleanable/dirt,/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor/plating,/area/maintenance/port) "bsr" = (/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/obj/effect/decal/cleanable/dirt,/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plating,/area/maintenance/port) -"bss" = (/obj/structure/table,/obj/item/clothing/head/soft,/obj/item/weapon/stamp{pixel_x = -3; pixel_y = 3},/obj/item/clothing/head/soft,/turf/simulated/floor,/area/quartermaster/storage) -"bst" = (/obj/structure/table,/obj/item/weapon/hand_labeler,/obj/machinery/requests_console{department = "Cargo Bay"; departmentType = 2; pixel_x = 0; pixel_y = 30},/obj/item/weapon/stamp{pixel_x = -3; pixel_y = 3},/obj/item/weapon/hand_labeler,/turf/simulated/floor,/area/quartermaster/storage) +"bss" = (/obj/structure/table,/obj/item/clothing/head/soft,/obj/item/weapon/stamp/granted{pixel_x = -3; pixel_y = 3},/obj/item/clothing/head/soft,/turf/simulated/floor,/area/quartermaster/storage) +"bst" = (/obj/structure/table,/obj/item/weapon/hand_labeler,/obj/machinery/requests_console{department = "Cargo Bay"; departmentType = 2; pixel_x = 0; pixel_y = 30},/obj/item/weapon/stamp/granted{pixel_x = -3; pixel_y = 3},/obj/item/weapon/hand_labeler,/turf/simulated/floor,/area/quartermaster/storage) "bsu" = (/obj/structure/table,/obj/machinery/cell_charger,/obj/item/device/radio/intercom{broadcasting = 0; listening = 1; name = "Station Intercom (General)"; pixel_y = 20},/turf/simulated/floor,/area/quartermaster/storage) "bsv" = (/obj/machinery/camera{c_tag = "Cargo Bay North"},/obj/structure/closet/secure_closet/cargotech,/obj/machinery/status_display{density = 0; layer = 4; pixel_x = 0; pixel_y = 32},/turf/simulated/floor,/area/quartermaster/storage) "bsw" = (/obj/structure/closet/secure_closet/cargotech,/turf/simulated/floor,/area/quartermaster/storage) @@ -3930,7 +3930,7 @@ "bxD" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor{dir = 8; icon_state = "brown"},/area/quartermaster/office) "bxE" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor,/area/quartermaster/office) "bxF" = (/obj/structure/disposalpipe/segment{name = "Sorting Office"},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/atmospherics/pipe/manifold/hidden/supply,/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{level = 1},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/turf/simulated/floor,/area/quartermaster/office) -"bxG" = (/obj/item/weapon/stamp{pixel_x = -3; pixel_y = 3},/obj/item/weapon/stamp/denied{pixel_x = 4; pixel_y = -2},/obj/structure/table,/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 10},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 1; initialize_directions = 11; level = 1},/turf/simulated/floor,/area/quartermaster/office) +"bxG" = (/obj/item/weapon/stamp/granted{pixel_x = -3; pixel_y = 3},/obj/item/weapon/stamp/denied{pixel_x = 4; pixel_y = -2},/obj/structure/table,/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 10},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 1; initialize_directions = 11; level = 1},/turf/simulated/floor,/area/quartermaster/office) "bxH" = (/obj/item/weapon/paper_bin{pixel_x = -3; pixel_y = 7},/obj/item/weapon/clipboard,/obj/item/weapon/pen/red{pixel_x = 2; pixel_y = 6},/obj/structure/table,/obj/machinery/atmospherics/unary/vent_scrubber{dir = 8; on = 1},/turf/simulated/floor,/area/quartermaster/office) "bxI" = (/obj/machinery/computer/ordercomp,/obj/item/device/radio/intercom{broadcasting = 0; name = "Station Intercom (General)"; pixel_y = 20},/turf/simulated/floor,/area/quartermaster/office) "bxJ" = (/obj/machinery/alarm{pixel_y = 23},/turf/simulated/floor,/area/quartermaster/office) @@ -4148,7 +4148,7 @@ "bBN" = (/obj/structure/table,/obj/structure/window/reinforced/tinted{dir = 4; icon_state = "twindow"; tag = ""},/obj/item/device/mmi/posibrain,/obj/item/device/robotanalyzer,/turf/simulated/floor{dir = 8; icon_state = "whitecorner"},/area/assembly/robotics) "bBO" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor{icon_state = "white"},/area/assembly/robotics) "bBP" = (/obj/machinery/door_control{id = "robotics2"; name = "Robotics Lab Shutters Control"; pixel_x = 24; pixel_y = -24; req_access_txt = "29"},/turf/simulated/floor{icon_state = "white"},/area/assembly/robotics) -"bBQ" = (/obj/structure/table/reinforced,/obj/item/weapon/folder/white,/obj/item/weapon/pen,/obj/machinery/door/firedoor/border_only{dir = 1; name = "hazard door north"},/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id = "robotics2"; name = "Robotics Lab Shutters"; opacity = 0},/obj/machinery/door/window/eastright{base_state = "left"; dir = 8; icon_state = "left"; name = "Robotics Desk"; req_access_txt = "47"},/turf/simulated/floor/plating,/area/assembly/robotics) +"bBQ" = (/obj/structure/table/reinforced,/obj/item/weapon/folder/white,/obj/item/weapon/pen,/obj/machinery/door/firedoor/border_only{dir = 1; name = "hazard door north"},/obj/machinery/door/poddoor/shutters{density = 0; dir = 4; icon_state = "shutter0"; id = "robotics2"; name = "Robotics Lab Shutters"; opacity = 0},/obj/machinery/door/window/eastright{base_state = "left"; dir = 8; icon_state = "left"; name = "Robotics Desk"; req_access_txt = "47"},/turf/simulated/floor/plating,/area/assembly/robotics) "bBR" = (/obj/machinery/light{dir = 8},/obj/machinery/door/firedoor/border_only,/turf/simulated/floor{dir = 2; icon_state = "whitecorner"},/area/medical/research{name = "Research Division"}) "bBS" = (/obj/effect/landmark{name = "lightsout"},/obj/machinery/door/firedoor/border_only,/turf/simulated/floor{icon_state = "whitehall"; dir = 2},/area/medical/research{name = "Research Division"}) "bBT" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/light{dir = 4; icon_state = "tube1"},/obj/machinery/door/firedoor/border_only,/turf/simulated/floor{dir = 8; icon_state = "whitecorner"},/area/medical/research{name = "Research Division"}) @@ -4637,7 +4637,7 @@ "bLi" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/turf/simulated/floor/plating,/area/quartermaster/qm) "bLj" = (/obj/structure/table,/obj/item/weapon/paper_bin{pixel_x = -3; pixel_y = 7},/obj/item/device/megaphone,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor,/area/quartermaster/qm) "bLk" = (/obj/structure/table,/obj/item/weapon/folder/yellow,/obj/item/weapon/pen{pixel_x = 4; pixel_y = 4},/obj/item/weapon/pen/red{pixel_x = 2; pixel_y = 6},/turf/simulated/floor,/area/quartermaster/qm) -"bLl" = (/obj/structure/table,/obj/item/weapon/clipboard,/obj/item/weapon/stamp{name = "Quartermaster's stamp"; pixel_x = 0; pixel_y = 0},/turf/simulated/floor,/area/quartermaster/qm) +"bLl" = (/obj/structure/table,/obj/item/weapon/clipboard,/obj/item/weapon/stamp/granted{name = "Quartermaster's stamp"; pixel_x = 0; pixel_y = 0},/turf/simulated/floor,/area/quartermaster/qm) "bLm" = (/obj/structure/disposalpipe/segment,/obj/machinery/camera{c_tag = "Quartermaster's Office"; dir = 8},/turf/simulated/floor,/area/quartermaster/qm) "bLn" = (/obj/machinery/navbeacon{codes_txt = "patrol;next_patrol=AIW"; location = "QM"},/turf/simulated/floor,/area/hallway/primary/central/sw) "bLo" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/disposalpipe/segment,/turf/simulated/floor,/area/hallway/primary/central/sw) @@ -4792,7 +4792,7 @@ "bOh" = (/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/obj/machinery/power/apc{dir = 4; name = "east bump"; pixel_x = 24},/obj/structure/cable{d2 = 8; icon_state = "0-8"},/turf/simulated/floor,/area/quartermaster/qm) "bOi" = (/obj/machinery/vending/cigarette{pixel_x = 0; pixel_y = 0},/turf/simulated/floor,/area/hallway/primary/central/sw) "bOj" = (/turf/simulated/wall,/area/maintenance/apmaint) -"bOk" = (/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plating,/area/maintenance/aft) +"bOk" = (/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plating,/area/maintenance/apmaint) "bOl" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/structure/cable,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id = "blueshield"; name = "Privacy Shutters"; opacity = 0},/obj/structure/disposalpipe/segment,/turf/simulated/floor/plating,/area/blueshield) "bOm" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/door/airlock/command{name = "Blueshield's Office"; req_access_txt = "67"},/turf/simulated/floor/wood,/area/blueshield) "bOn" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/structure/cable,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id = "blueshield"; name = "Privacy Shutters"; opacity = 0},/turf/simulated/floor/plating,/area/blueshield) @@ -4857,7 +4857,7 @@ "bPu" = (/obj/structure/closet/secure_closet/quartermaster,/turf/simulated/floor,/area/quartermaster/qm) "bPv" = (/obj/structure/table,/obj/item/weapon/coin/silver,/turf/simulated/floor,/area/quartermaster/qm) "bPw" = (/obj/structure/table,/obj/item/weapon/cartridge/quartermaster{pixel_x = 6; pixel_y = 5},/obj/item/weapon/cartridge/quartermaster,/obj/item/weapon/cartridge/quartermaster{pixel_x = -4; pixel_y = 7},/obj/machinery/light{dir = 4; icon_state = "tube1"},/turf/simulated/floor,/area/quartermaster/qm) -"bPx" = (/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plating,/area/maintenance/aft) +"bPx" = (/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plating,/area/maintenance/apmaint) "bPy" = (/obj/machinery/light{dir = 1},/obj/structure/flora/kirbyplants,/obj/machinery/newscaster/security_unit{pixel_x = 0; pixel_y = 32},/turf/simulated/floor/wood,/area/blueshield) "bPz" = (/obj/machinery/disposal,/obj/structure/disposalpipe/trunk{dir = 1},/turf/simulated/floor/wood,/area/blueshield) "bPA" = (/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"},/turf/simulated/floor/wood,/area/blueshield) @@ -4946,7 +4946,7 @@ "bRf" = (/obj/structure/disposalpipe/segment,/obj/effect/landmark/start{name = "Shaft Miner"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor,/area/quartermaster/miningdock) "bRg" = (/obj/machinery/alarm{dir = 8; icon_state = "alarm0"; pixel_x = 24},/obj/structure/disposalpipe/segment,/turf/simulated/floor,/area/quartermaster/miningdock) "bRh" = (/obj/item/weapon/beach_ball/holoball,/turf/simulated/floor/plating,/area/maintenance/apmaint) -"bRi" = (/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 8; initialize_directions = 11; level = 1},/turf/simulated/floor/plating,/area/maintenance/aft) +"bRi" = (/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 8; initialize_directions = 11; level = 1},/turf/simulated/floor/plating,/area/maintenance/apmaint) "bRj" = (/obj/machinery/photocopier,/obj/machinery/atmospherics/unary/vent_scrubber{dir = 4; on = 1},/obj/machinery/light_switch{pixel_x = -25},/turf/simulated/floor/wood,/area/blueshield) "bRk" = (/turf/simulated/floor{icon_state = "bcarpet05"},/area/blueshield) "bRl" = (/turf/simulated/floor/wood,/area/blueshield) @@ -5023,7 +5023,7 @@ "bSE" = (/obj/structure/table,/obj/item/weapon/grenade/chem_grenade/cleaner,/obj/item/weapon/grenade/chem_grenade/cleaner,/obj/item/weapon/grenade/chem_grenade/cleaner,/obj/machinery/requests_console{department = "Janitorial"; departmentType = 1; pixel_y = -29},/obj/item/weapon/reagent_containers/spray/cleaner,/turf/simulated/floor,/area/janitor) "bSF" = (/obj/machinery/disposal,/obj/structure/disposalpipe/trunk{dir = 1},/turf/simulated/floor,/area/janitor) "bSG" = (/obj/machinery/light,/obj/structure/janitorialcart,/turf/simulated/floor,/area/janitor) -"bSH" = (/obj/item/weapon/legcuffs/beartrap,/obj/item/weapon/legcuffs/beartrap,/obj/item/weapon/storage/box/mousetraps,/obj/item/weapon/storage/box/mousetraps,/obj/machinery/firealarm{dir = 1; pixel_y = -24},/turf/simulated/floor,/area/janitor) +"bSH" = (/obj/item/weapon/restraints/legcuffs/beartrap,/obj/item/weapon/restraints/legcuffs/beartrap,/obj/item/weapon/storage/box/mousetraps,/obj/item/weapon/storage/box/mousetraps,/obj/machinery/firealarm{dir = 1; pixel_y = -24},/turf/simulated/floor,/area/janitor) "bSI" = (/turf/simulated/floor,/area/janitor) "bSJ" = (/obj/structure/reagent_dispensers/watertank,/obj/machinery/atmospherics/unary/vent_pump{dir = 4; on = 1},/obj/machinery/light_switch{pixel_y = -23},/turf/simulated/floor,/area/janitor) "bSK" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/light/small{dir = 1},/turf/simulated/floor/plating,/area/maintenance/asmaint) @@ -5085,7 +5085,7 @@ "bTO" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = ""},/obj/structure/disposalpipe/segment{dir = 1; icon_state = "pipe-c"},/turf/simulated/floor/plating,/area/maintenance/apmaint) "bTP" = (/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/obj/structure/disposalpipe/segment{dir = 2; icon_state = "pipe-c"},/turf/simulated/floor/plating,/area/maintenance/apmaint) "bTQ" = (/obj/structure/disposalpipe/segment{dir = 4; icon_state = "pipe-c"},/obj/structure/closet/crate,/turf/simulated/floor/plating,/area/maintenance/aft) -"bTR" = (/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plating,/area/maintenance/aft) +"bTR" = (/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plating,/area/maintenance/apmaint) "bTS" = (/obj/machinery/alarm{dir = 8; icon_state = "alarm0"; pixel_x = 24},/turf/simulated/floor/wood,/area/blueshield) "bTT" = (/obj/structure/stool/bed/chair/office/dark,/turf/simulated/floor/carpet,/area/ntrep) "bTU" = (/obj/machinery/alarm{dir = 8; icon_state = "alarm0"; pixel_x = 24},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 6},/turf/simulated/floor/wood,/area/ntrep) @@ -5163,11 +5163,11 @@ "bVo" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/machinery/door/firedoor/border_only{dir = 2},/turf/simulated/floor/plating,/area/quartermaster/miningdock) "bVp" = (/obj/structure/reagent_dispensers/fueltank,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/maintenance/apmaint) "bVq" = (/obj/structure/reagent_dispensers/watertank,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/maintenance/apmaint) -"bVr" = (/obj/machinery/power/apc{dir = 2; name = "south bump"; pixel_y = -24},/obj/effect/decal/cleanable/dirt,/obj/structure/cable{icon_state = "0-4"; d2 = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 5},/turf/simulated/floor/plating,/area/maintenance/apmaint) +"bVr" = (/obj/machinery/power/apc{dir = 2; name = "Cargo Maintenance APC"; pixel_y = -24},/obj/effect/decal/cleanable/dirt,/obj/structure/cable{icon_state = "0-4"; d2 = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 5},/turf/simulated/floor/plating,/area/maintenance/apmaint) "bVs" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/structure/disposalpipe/segment{dir = 1; icon_state = "pipe-c"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = ""},/turf/simulated/floor/plating,/area/maintenance/apmaint) "bVt" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor/plating,/area/maintenance/aft) "bVu" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/structure/disposalpipe/sortjunction{dir = 8; icon_state = "pipe-j1s"; name = "HoP Office"; sortType = 15},/turf/simulated/floor/plating,/area/maintenance/aft) -"bVv" = (/obj/structure/disposalpipe/segment{dir = 2; icon_state = "pipe-c"},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 9},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/light/small{dir = 4},/turf/simulated/floor/plating,/area/maintenance/aft) +"bVv" = (/obj/structure/disposalpipe/segment{dir = 2; icon_state = "pipe-c"},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 9},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/light/small{dir = 4},/turf/simulated/floor/plating,/area/maintenance/apmaint) "bVw" = (/obj/machinery/keycard_auth{pixel_x = -24; pixel_y = 0},/obj/machinery/door/window{dir = 1; name = "Desk Door"; req_access_txt = "67"},/turf/simulated/floor/wood,/area/blueshield) "bVx" = (/obj/structure/table/woodentable,/obj/item/ashtray/glass{pixel_x = -4; pixel_y = -4},/obj/item/weapon/lighter/zippo/fluff/li_matsuda_1{pixel_x = 7; pixel_y = 4},/turf/simulated/floor{icon_state = "bcarpet05"},/area/blueshield) "bVy" = (/obj/structure/table/woodentable,/obj/item/weapon/paper_bin,/obj/item/weapon/pen/blue,/obj/item/weapon/folder/blue{pixel_x = 4; pixel_y = 6},/obj/item/weapon/paper/blueshield,/turf/simulated/floor{icon_state = "bcarpet05"},/area/blueshield) @@ -5193,7 +5193,7 @@ "bVS" = (/obj/machinery/atmospherics/pipe/simple/hidden{dir = 6},/turf/simulated/floor{dir = 1; icon_state = "blue"},/area/medical/sleeper) "bVT" = (/obj/machinery/atmospherics/pipe/manifold/hidden{dir = 1},/turf/simulated/floor{dir = 1; icon_state = "blue"},/area/medical/sleeper) "bVU" = (/obj/machinery/door_control{id = "scanhide"; name = "Scanning Room Privacy Shutters Control"; pixel_x = 6; pixel_y = 25},/obj/machinery/camera{c_tag = "Medbay Scanning"; network = list("SS13")},/obj/machinery/atmospherics/unary/cold_sink/freezer{dir = 8; icon_state = "freezer_0"; tag = ""},/obj/machinery/door_control{id = "scansep"; name = "Scanning Room Separation Shutters Control"; pixel_x = -6; pixel_y = 25},/turf/simulated/floor{dir = 5; icon_state = "blue"},/area/medical/sleeper) -"bVV" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/machinery/door/poddoor/shutters{density = 0; dir = 8; icon_state = "shutter0"; id = "scanhide"; name = "Scanning Room Privacy Shutters"; opacity = 0},/turf/simulated/floor/plating,/area) +"bVV" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/machinery/door/poddoor/shutters{density = 0; dir = 4; icon_state = "shutter0"; id = "scanhide"; name = "Scanning Room Privacy Shutters"; opacity = 0},/turf/simulated/floor/plating,/area) "bVW" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor{dir = 4; icon_state = "whiteblue"; tag = "icon-whitehall (WEST)"},/area/medical/medbay2) "bVX" = (/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 8},/obj/structure/grille,/obj/structure/cable,/obj/structure/cable{icon_state = "0-4"; d2 = 4},/obj/structure/disposalpipe/segment,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id = "cmooffice"; name = "Privacy Shutters"; opacity = 0},/turf/simulated/floor/plating,/area) "bVY" = (/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/grille,/obj/structure/cable{icon_state = "0-4"; d2 = 4},/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id = "cmooffice"; name = "Privacy Shutters"; opacity = 0},/turf/simulated/floor/plating,/area) @@ -5244,7 +5244,7 @@ "bWR" = (/turf/simulated/floor/airless{dir = 8; icon_state = "warning"},/area/toxins/test_area) "bWS" = (/turf/simulated/wall/r_wall,/area/maintenance/apmaint) "bWT" = (/obj/machinery/door/airlock/maintenance{name = "Firefighting equipment"; req_access_txt = "12"},/turf/simulated/floor/plating,/area/maintenance/apmaint) -"bWU" = (/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plating,/area/maintenance/aft) +"bWU" = (/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plating,/area/maintenance/apmaint) "bWV" = (/obj/machinery/requests_console{announcementConsole = 1; department = "Blueshield"; departmentType = 5; name = "Blueshield Requests Console"; pixel_x = -30},/turf/simulated/floor/wood,/area/blueshield) "bWW" = (/obj/structure/stool/bed/chair/office/dark{dir = 4},/obj/effect/landmark/start{name = "Blueshield"},/turf/simulated/floor{icon_state = "bcarpet05"},/area/blueshield) "bWX" = (/obj/structure/table/woodentable,/obj/machinery/computer/skills{req_one_access = null},/turf/simulated/floor{icon_state = "bcarpet05"},/area/blueshield) @@ -5320,7 +5320,7 @@ "bYp" = (/obj/machinery/light/small{dir = 1},/obj/structure/stool,/turf/simulated/floor/plating,/area/maintenance/aft) "bYq" = (/obj/effect/landmark{name = "blobstart"},/turf/simulated/floor/plating,/area/maintenance/aft) "bYr" = (/turf/simulated/floor/plating,/area/maintenance/aft) -"bYs" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/disposalpipe/segment,/turf/simulated/floor/plating,/area/maintenance/aft) +"bYs" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/disposalpipe/segment,/turf/simulated/floor/plating,/area/maintenance/apmaint) "bYt" = (/obj/structure/closet/secure_closet/blueshield,/obj/machinery/firealarm{dir = 8; pixel_x = -24},/turf/simulated/floor/wood,/area/blueshield) "bYu" = (/obj/machinery/door_control{id = "blueshield"; name = "Privacy Shutters Control"; pixel_x = 0; pixel_y = -24; req_access_txt = "67"},/obj/machinery/computer/crew,/turf/simulated/floor/wood,/area/blueshield) "bYv" = (/obj/structure/table/woodentable,/obj/machinery/light/small/lamp,/obj/machinery/camera{c_tag = "Blueshield's Office"; dir = 1; network = list("SS13")},/turf/simulated/floor/wood,/area/blueshield) @@ -5567,7 +5567,7 @@ "cdc" = (/obj/machinery/atmospherics/pipe/tank/toxins{volume = 3200},/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) "cdd" = (/obj/machinery/atmospherics/pipe/tank/oxygen{volume = 3200},/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) "cde" = (/obj/machinery/portable_atmospherics/canister/oxygen,/obj/effect/decal/cleanable/cobweb2,/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) -"cdf" = (/obj/structure/rack{dir = 1},/obj/item/device/flashlight,/obj/item/clothing/glasses/sunglasses,/turf/simulated/floor/plating,/area/maintenance/aft) +"cdf" = (/obj/structure/rack{dir = 1},/obj/item/device/flashlight,/obj/item/clothing/glasses/sunglasses,/turf/simulated/floor/plating,/area/maintenance/apmaint) "cdg" = (/obj/structure/cable{icon_state = "0-2"; pixel_y = 1; d2 = 2},/obj/structure/cable,/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating,/area) "cdh" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/weapon/circuitboard/borgupload{pixel_x = -1; pixel_y = 1},/obj/item/weapon/circuitboard/aiupload{pixel_x = 2; pixel_y = -2},/turf/simulated/floor,/area/storage/tech) "cdi" = (/obj/machinery/camera{c_tag = "Secure Tech Storage"; dir = 2},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor,/area/storage/tech) @@ -5636,7 +5636,7 @@ "cet" = (/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) "ceu" = (/obj/machinery/atmospherics/binary/pump,/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) "cev" = (/obj/machinery/power/apc{dir = 4; name = "Incinerator APC"; pixel_x = 24; pixel_y = 0},/obj/structure/cable{icon_state = "0-2"; pixel_y = 1; d2 = 2},/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) -"cew" = (/obj/machinery/light/small{dir = 8},/obj/structure/reagent_dispensers/fueltank,/turf/simulated/floor/plating,/area/maintenance/aft) +"cew" = (/obj/machinery/light/small{dir = 8},/obj/structure/reagent_dispensers/fueltank,/turf/simulated/floor/plating,/area/maintenance/apmaint) "cex" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/weapon/circuitboard/crew{pixel_x = -1; pixel_y = 1},/obj/item/weapon/circuitboard/card{pixel_x = 2; pixel_y = -2},/obj/item/weapon/circuitboard/communications{pixel_x = 5; pixel_y = -5},/obj/machinery/light/small{dir = 8},/turf/simulated/floor,/area/storage/tech) "cey" = (/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"; tag = ""},/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = ""},/obj/machinery/hologram/holopad,/turf/simulated/floor,/area/storage/tech) "cez" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/highsecurity{name = "Secure Tech Storage"; req_access_txt = "19;23"},/turf/simulated/floor/plating,/area/storage/tech) @@ -5763,9 +5763,9 @@ "cgQ" = (/obj/machinery/atmospherics/pipe/simple/visible{dir = 4},/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) "cgR" = (/obj/effect/landmark{name = "xeno_spawn"; pixel_x = -1},/obj/machinery/hologram/holopad,/mob/living/simple_animal/mouse,/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) "cgS" = (/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = ""},/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) -"cgT" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/door/firedoor/border_only{dir = 4; name = "Firelock East"},/obj/machinery/door/airlock/maintenance{name = "Incinerator Access"; req_access_txt = "12"},/turf/simulated/floor/plating,/area/maintenance/asmaint) -"cgU" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor/plating,/area/maintenance/aft) -"cgV" = (/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/turf/simulated/floor/plating,/area/maintenance/aft) +"cgT" = (/obj/structure/reagent_dispensers/watertank,/turf/simulated/floor/plating,/area/maintenance/apmaint) +"cgU" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor/plating,/area/maintenance/apmaint) +"cgV" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/door/firedoor/border_only{dir = 4; name = "Firelock East"},/obj/machinery/door/airlock/maintenance{name = "Incinerator Access"; req_access_txt = "12"},/turf/simulated/floor/plating,/area/maintenance/apmaint) "cgW" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating,/area) "cgX" = (/obj/structure/cable{icon_state = "0-4"; d2 = 4},/obj/structure/cable,/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced,/turf/simulated/floor/plating,/area) "cgY" = (/obj/structure/cable{icon_state = "0-4"; d2 = 4},/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/structure/grille,/obj/structure/cable,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced,/turf/simulated/floor/plating,/area) @@ -5828,7 +5828,7 @@ "cid" = (/obj/machinery/firealarm{dir = 1; pixel_y = -24},/obj/machinery/atmospherics/pipe/simple/visible{dir = 4},/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) "cie" = (/obj/machinery/navbeacon{codes_txt = "patrol;next_patrol=1-Storage"; location = "7-Sleeper"},/turf/simulated/floor{dir = 2; icon_state = "whiteblue"},/area/mine/laborcamp) "cif" = (/obj/machinery/atmospherics/portables_connector{dir = 8},/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) -"cig" = (/obj/machinery/power/apc{dir = 4; name = "Engineering Maintenance APC"; pixel_x = 27; pixel_y = 2},/obj/structure/disposalpipe/segment,/obj/structure/cable,/obj/structure/cable{icon_state = "0-2"; pixel_y = 1; d2 = 2},/turf/simulated/floor/plating,/area/maintenance/aft) +"cig" = (/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/turf/simulated/floor/plating,/area/maintenance/apmaint) "cih" = (/obj/structure/table,/obj/machinery/cell_charger{pixel_y = 5},/obj/machinery/status_display{layer = 4; pixel_x = -32; pixel_y = 0},/turf/simulated/floor/plating,/area/storage/tech) "cii" = (/obj/machinery/light/small,/turf/simulated/floor/plating,/area/storage/tech) "cij" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/weapon/storage/toolbox/electrical{pixel_x = 1; pixel_y = -1},/obj/item/clothing/gloves/yellow,/obj/item/device/t_scanner,/obj/item/clothing/glasses/meson,/obj/item/device/multitool,/turf/simulated/floor/plating,/area/storage/tech) @@ -5879,8 +5879,8 @@ "cjc" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating/airless,/area) "cjd" = (/obj/item/clothing/mask/cigarette,/turf/simulated/floor/plating/airless,/area/toxins/test_area) "cje" = (/obj/machinery/light/small,/turf/simulated/floor/plating/airless,/area/toxins/test_area) -"cjf" = (/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/turf/simulated/floor/plating,/area/maintenance/aft) -"cjg" = (/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/turf/simulated/floor/plating,/area/maintenance/aft) +"cjf" = (/turf/simulated/floor/plating,/area/maintenance/apmaint) +"cjg" = (/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/turf/simulated/floor/plating,/area/maintenance/apmaint) "cjh" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/disposalpipe/segment,/obj/item/device/radio/intercom{dir = 8; name = "Station Intercom (General)"; pixel_x = -28},/turf/simulated/floor{dir = 8; icon_state = "cautioncorner"},/area/hallway/primary/aft) "cji" = (/obj/machinery/atmospherics/portables_connector{dir = 4},/obj/machinery/portable_atmospherics/pump,/obj/machinery/light{icon_state = "tube1"; dir = 4},/turf/simulated/floor{icon_state = "arrival"; dir = 8},/area/hallway/primary/aft) "cjj" = (/obj/machinery/atmospherics/pipe/simple/hidden/cyan{dir = 9; level = 2},/turf/simulated/wall/r_wall,/area) @@ -5964,8 +5964,8 @@ "ckJ" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 4; external_pressure_bound = 101; on = 1; pressure_checks = 1},/turf/simulated/floor{icon_state = "white"},/area/medical/surgery) "ckK" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor{icon_state = "white"},/area/medical/surgery) "ckL" = (/obj/machinery/iv_drip,/obj/machinery/light{icon_state = "tube1"; dir = 4},/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 4; initialize_directions = 11; level = 1},/turf/simulated/floor{icon_state = "white"},/area/medical/surgery) -"ckM" = (/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "Biohazard_medi"; name = "Quarantine Lockdown"; opacity = 0},/obj/machinery/door/airlock/maintenance,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plating,/area/maintenance/asmaint) -"ckN" = (/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "Biohazard_medi"; name = "Quarantine Lockdown"; opacity = 0},/obj/machinery/door/airlock/maintenance,/turf/simulated/floor/plating,/area/maintenance/asmaint) +"ckM" = (/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "Biohazard_medi"; name = "Quarantine Lockdown"; opacity = 0},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/turf/simulated/floor/plating,/area/maintenance/asmaint) +"ckN" = (/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "Biohazard_medi"; name = "Quarantine Lockdown"; opacity = 0},/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/turf/simulated/floor/plating,/area/maintenance/asmaint) "ckO" = (/obj/machinery/door/window/eastright{base_state = "right"; dir = 1; icon_state = "right"; name = "Xenoflora Containment"; req_access_txt = "47"},/turf/simulated/floor,/area/toxins/xenobiology/xenoflora_storage) "ckP" = (/obj/structure/window/reinforced{dir = 1},/turf/simulated/floor,/area/toxins/xenobiology/xenoflora_storage) "ckQ" = (/obj/machinery/access_button{command = "cycle_exterior"; frequency = 1379; master_tag = "xeno_airlock_control"; name = "Xenobiology Access Button"; pixel_x = -24; pixel_y = 0; req_access_txt = "55"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/disposalpipe/segment,/obj/machinery/door/firedoor/border_only{dir = 4; name = "Firelock East"},/obj/machinery/door/airlock/research{autoclose = 0; frequency = 1379; icon_state = "door_locked"; id_tag = "xeno_airlock_exterior"; locked = 1; name = "Xenobiology External Airlock"; req_access_txt = "55"},/turf/simulated/floor{icon_state = "white"},/area/toxins/xenobiology) @@ -8199,7 +8199,7 @@ "dbI" = (/turf/space/transit/north/shuttlespace_ns8,/area/shuttle/escape_pod2/transit) "dbJ" = (/obj/structure/AIcore,/turf/simulated/shuttle/floor4/vox,/area/shuttle/vox/station) "dbK" = (/obj/item/weapon/spacecash/c200,/obj/item/weapon/spacecash/c50,/obj/structure/stool/bed/chair{dir = 1},/turf/simulated/shuttle/floor4/vox,/area/shuttle/vox/station) -"dbL" = (/obj/structure/jungle_plant,/turf/simulated/shuttle/floor4/vox,/area/shuttle/vox/station) +"dbL" = (/obj/item/weapon/storage/box/zipties,/turf/simulated/shuttle/floor4/vox,/area/shuttle/vox/station) "dbM" = (/turf/unsimulated/floor{icon = 'icons/turf/snow.dmi'; icon_state = "snow"},/turf/unsimulated/floor{icon = 'icons/turf/snow.dmi'; icon_state = "gravsnow_corner"},/area/syndicate_mothership) "dbN" = (/turf/unsimulated/floor{icon = 'icons/turf/snow.dmi'; icon_state = "snow"},/turf/simulated/shuttle/wall{dir = 8; icon_state = "diagonalWall3"},/area/syndicate_station/start) "dbO" = (/turf/simulated/shuttle/wall{icon_state = "wall3"},/area/syndicate_station/start) @@ -8245,7 +8245,7 @@ "dcC" = (/obj/machinery/door/airlock/centcom{name = "Study"; opacity = 1; req_access_txt = "150"},/turf/unsimulated/floor{icon_state = "bar"; dir = 2},/area/syndicate_mothership) "dcD" = (/turf/unsimulated/floor{icon_state = "grimy"},/area/syndicate_mothership) "dcE" = (/obj/structure/table,/obj/item/stack/cable_coil,/obj/item/weapon/crowbar/red,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/syndicate_station/start) -"dcF" = (/obj/structure/table,/obj/item/weapon/storage/box/handcuffs,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/syndicate_station/start) +"dcF" = (/obj/structure/table,/obj/item/weapon/storage/box/zipties,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/syndicate_station/start) "dcG" = (/turf/unsimulated/floor{icon = 'icons/turf/snow.dmi'; icon_state = "snow"},/turf/unsimulated/floor{tag = "icon-gravsnow_surround (WEST)"; icon = 'icons/turf/snow.dmi'; icon_state = "gravsnow_surround"; dir = 8},/area/syndicate_mothership) "dcH" = (/turf/unsimulated/floor{icon = 'icons/turf/snow.dmi'; icon_state = "snow"},/turf/unsimulated/floor{tag = "icon-gravsnow_corner (SOUTHEAST)"; icon = 'icons/turf/snow.dmi'; icon_state = "gravsnow_corner"; dir = 6},/area/syndicate_mothership) "dcI" = (/obj/structure/table/woodentable,/obj/item/weapon/reagent_containers/food/drinks/cans/beer{pixel_x = -2; pixel_y = 5},/turf/unsimulated/floor{icon_state = "bar"; dir = 2},/area/syndicate_mothership) @@ -8795,7 +8795,7 @@ "dng" = (/obj/machinery/computer/card,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/centcom/evac) "dnh" = (/obj/structure/stool/bed/chair{dir = 1},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/centcom/evac) "dni" = (/obj/structure/stool/bed/chair{dir = 4},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/centcom/evac) -"dnj" = (/obj/structure/table/reinforced,/obj/item/weapon/clipboard,/obj/item/weapon/stamp,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/centcom/evac) +"dnj" = (/obj/structure/table/reinforced,/obj/item/weapon/clipboard,/obj/item/weapon/stamp/granted,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/centcom/evac) "dnk" = (/obj/structure/closet/secure_closet/bar{req_access_txt = "25"},/turf/unsimulated/floor{dir = 8; icon_state = "wood"},/area/centcom/evac) "dnl" = (/obj/structure/table,/obj/item/weapon/lighter/zippo,/turf/unsimulated/floor{dir = 8; icon_state = "wood"},/area/centcom/evac) "dnm" = (/obj/machinery/door/airlock/centcom{name = "Rest Area"; opacity = 1; req_access_txt = "0"},/turf/unsimulated/floor{dir = 8; icon_state = "wood"},/area/centcom/evac) @@ -8991,6 +8991,7 @@ "dqU" = (/obj/structure/shuttle/engine/propulsion{tag = "icon-burst_r"; icon_state = "burst_r"},/turf/space,/area/supply/dock) "dqV" = (/obj/machinery/iv_drip,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/shuttle/administration/centcom) "dqW" = (/obj/structure/table,/obj/item/weapon/storage/box/handcuffs,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) +"dqX" = (/obj/structure/foodcart,/turf/simulated/floor{dir = 2; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/crew_quarters/kitchen) "dqY" = (/obj/structure/stool/bed/chair{dir = 1},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) "dqZ" = (/obj/structure/table,/obj/item/weapon/bonegel,/obj/item/weapon/bonesetter,/obj/item/weapon/hemostat,/obj/item/weapon/cautery,/obj/item/weapon/surgicaldrill,/obj/item/weapon/circular_saw,/obj/item/weapon/scalpel,/obj/item/weapon/retractor,/obj/item/weapon/FixOVein,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/shuttle/administration/centcom) "dra" = (/obj/machinery/optable,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/shuttle/administration/centcom) @@ -9091,7 +9092,7 @@ "dsR" = (/obj/structure/table,/obj/item/weapon/storage/toolbox/syndicate,/turf/unsimulated/floor{tag = "icon-dark"; icon_state = "dark"},/area/admin) "dsS" = (/obj/structure/table,/obj/item/weapon/rcd,/obj/item/weapon/rcd_ammo,/obj/item/weapon/rcd_ammo,/obj/item/weapon/storage/pill_bottle/random_drug_bottle,/turf/unsimulated/floor{tag = "icon-dark"; icon_state = "dark"},/area/admin) "dsT" = (/obj/structure/table,/obj/item/weapon/scalpel,/obj/item/weapon/bonesetter,/obj/item/weapon/bonegel,/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin) -"dsU" = (/obj/structure/table,/obj/item/weapon/kitchen/utensil/fork,/obj/item/weapon/lighter,/obj/item/weapon/handcuffs/cable/red,/obj/item/weapon/storage/box/mousetraps,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/pen,/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin) +"dsU" = (/obj/structure/table,/obj/item/weapon/kitchen/utensil/fork,/obj/item/weapon/lighter,/obj/item/weapon/restraints/handcuffs/cable/red,/obj/item/weapon/storage/box/mousetraps,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/pen,/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin) "dsV" = (/obj/structure/table,/obj/item/weapon/tank/plasma,/obj/item/device/multitool,/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin) "dsW" = (/obj/structure/table,/obj/random/toolbox,/obj/random/bomb_supply,/obj/item/weapon/storage/fancy/cigarettes,/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin) "dsX" = (/obj/machinery/recharger/wallcharger{pixel_x = 30},/obj/structure/rack,/obj/item/weapon/gun/energy/pulse_rifle/M1911,/obj/item/weapon/gun/energy/pulse_rifle/M1911{pixel_x = 3; pixel_y = -3},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin) @@ -10335,7 +10336,7 @@ "dQN" = (/obj/effect/decal/remains/xeno,/turf/simulated/floor/airless{icon_state = "damaged2"},/area/mine/abandoned) "dQO" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced,/obj/machinery/door/firedoor/border_only{dir = 2},/turf/simulated/floor/plating,/area/research_outpost/hallway) "dQP" = (/obj/structure/table,/obj/item/weapon/folder,/turf/simulated/floor/wood,/area/research_outpost/hallway) -"dQQ" = (/obj/structure/table,/obj/item/device/camera,/obj/item/weapon/stamp,/turf/simulated/floor/wood,/area/research_outpost/hallway) +"dQQ" = (/obj/structure/table,/obj/item/device/camera,/obj/item/weapon/stamp/granted,/turf/simulated/floor/wood,/area/research_outpost/hallway) "dQR" = (/turf/simulated/floor/wood,/area/research_outpost/hallway) "dQS" = (/obj/machinery/vending/snack,/obj/machinery/light{dir = 4},/turf/simulated/floor/wood,/area/research_outpost/hallway) "dQT" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{level = 1},/obj/machinery/firealarm{dir = 8; pixel_x = -24},/obj/machinery/door/firedoor/border_only{dir = 4; layer = 2.6; name = "Firelock"},/turf/simulated/floor{icon_state = "white"},/area/research_outpost/hallway) @@ -11682,7 +11683,7 @@ "eqI" = (/obj/machinery/door/airlock/glass,/turf/simulated/floor,/area/derelict/bridge/access) "eqJ" = (/turf/simulated/wall/r_wall,/area/derelict/singularity_engine) "eqK" = (/obj/structure/window/reinforced,/turf/simulated/floor,/area/derelict/bridge/access) -"eqL" = (/obj/machinery/door/window,/turf/simulated/floor,/area/derelict/bridge/access) +"eqL" = (/obj/machinery/door/window{dir = 2},/turf/simulated/floor,/area/derelict/bridge/access) "eqM" = (/obj/structure/cable{icon_state = "0-2"; d2 = 2},/obj/structure/cable,/obj/structure/window/reinforced,/turf/simulated/floor,/area/derelict/bridge/access) "eqN" = (/turf/simulated/wall,/area/derelict/bridge) "eqO" = (/obj/structure/sign/electricshock,/turf/simulated/wall/r_wall,/area/derelict/singularity_engine) @@ -11766,7 +11767,7 @@ "eso" = (/obj/item/weapon/shard{icon_state = "small"},/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine) "esp" = (/obj/structure/window/reinforced{dir = 1},/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine) "esq" = (/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine) -"esr" = (/obj/machinery/door/window,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor,/area/derelict/bridge/access) +"esr" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/door/window{dir = 2},/turf/simulated/floor,/area/derelict/bridge/access) "ess" = (/turf/simulated/wall/r_wall,/area/derelict/bridge) "est" = (/obj/machinery/door/window{dir = 2; name = "Captain's Quarters"; req_access_txt = "20"},/obj/structure/grille,/turf/simulated/floor/plating/airless,/area/derelict/bridge) "esu" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine) @@ -11832,7 +11833,7 @@ "etC" = (/turf/simulated/floor/airless{icon_state = "floorscorched2"},/area) "etD" = (/turf/simulated/floor/airless{icon_state = "damaged2"},/area) "etE" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine) -"etF" = (/obj/machinery/door/window,/turf/simulated/floor/plating/airless,/area/derelict/hallway/primary) +"etF" = (/obj/machinery/door/window{dir = 2},/turf/simulated/floor/plating/airless,/area/derelict/hallway/primary) "etG" = (/turf/simulated/floor/airless{icon_state = "floorscorched1"},/area) "etH" = (/obj/item/weapon/shard{icon_state = "medium"},/turf/simulated/floor/airless{icon_state = "damaged2"},/area/derelict/singularity_engine) "etI" = (/obj/structure/grille{density = 0; icon_state = "brokengrille"},/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine) @@ -11961,7 +11962,7 @@ "ewb" = (/obj/structure/table,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/turf/simulated/floor{dir = 1; icon_state = "chapel"},/area/derelict/medical/chapel) "ewc" = (/obj/structure/window/reinforced{dir = 1},/turf/simulated/floor{dir = 4; icon_state = "chapel"},/area/derelict/medical/chapel) "ewd" = (/obj/structure/window/reinforced{dir = 1},/turf/simulated/floor{dir = 1; icon_state = "chapel"},/area/derelict/medical/chapel) -"ewe" = (/obj/machinery/door/window,/turf/simulated/floor/airless,/area/derelict/medical/chapel) +"ewe" = (/obj/machinery/door/window{dir = 2},/turf/simulated/floor/airless,/area/derelict/medical/chapel) "ewf" = (/obj/machinery/door/window/southleft,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/airless{icon_state = "white"},/area/derelict/medical) "ewg" = (/obj/machinery/door/window/southright,/turf/simulated/floor/airless{icon_state = "white"},/area/derelict/medical) "ewh" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = ""},/turf/simulated/floor/airless,/area/derelict/hallway/primary) @@ -12000,7 +12001,7 @@ "ewO" = (/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/turf/simulated/floor/airless,/area/derelict/hallway/primary) "ewP" = (/obj/structure/girder,/turf/simulated/floor/airless,/area/derelict/hallway/primary) "ewQ" = (/obj/machinery/portable_atmospherics/pump,/turf/simulated/floor,/area/derelict/arrival) -"ewR" = (/obj/machinery/door/window,/turf/simulated/floor/airless,/area/derelict/hallway/primary) +"ewR" = (/obj/machinery/door/window{dir = 2},/turf/simulated/floor/airless,/area/derelict/hallway/primary) "ewS" = (/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = ""},/turf/simulated/floor/airless,/area/derelict/hallway/primary) "ewT" = (/obj/machinery/door/window{base_state = "right"; dir = 4; icon_state = "right"},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; tag = ""},/turf/simulated/floor/airless,/area/derelict/hallway/primary) "ewU" = (/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/structure/cable{icon_state = "0-2"; d2 = 2},/obj/structure/cable{icon_state = "0-4"; d2 = 4},/turf/simulated/floor/airless,/area/derelict/hallway/primary) @@ -12120,7 +12121,7 @@ "eze" = (/obj/item/weapon/paper/russiantraitorobj,/turf/simulated/floor/airless{icon_state = "damaged2"},/area/derelict/bridge/ai_upload) "ezf" = (/obj/structure/reagent_dispensers/fueltank,/turf/simulated/floor/plating/airless,/area/AIsattele) "ezg" = (/obj/item/stack/rods,/turf/simulated/floor/plating/airless,/area/derelict/hallway/secondary) -"ezh" = (/obj/machinery/door/window{base_state = "right"; dir = 4; icon_state = "right"},/turf/simulated/floor/airless,/area) +"ezh" = (/obj/machinery/door/window{dir = 8},/turf/simulated/floor/airless,/area/derelict/bridge/ai_upload) "ezi" = (/obj/machinery/door/window{base_state = "right"; dir = 4; icon_state = "right"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/light/small,/turf/simulated/floor/airless,/area/derelict/bridge/ai_upload) "ezj" = (/obj/machinery/door/window{base_state = "right"; dir = 4; icon_state = "right"},/turf/simulated/floor/airless,/area/derelict/bridge/ai_upload) "ezk" = (/obj/structure/closet/crate,/obj/item/device/aicard,/obj/item/device/multitool,/obj/item/weapon/weldingtool,/obj/item/weapon/wrench,/obj/item/weapon/circuitboard/teleporter,/turf/simulated/floor/plating/airless,/area/AIsattele) @@ -12551,6 +12552,7 @@ "eHt" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 8; on = 1},/obj/effect/landmark{name = "JoinLateCryo"},/turf/simulated/floor{icon_state = "white"},/area/crew_quarters/sleep) "eHu" = (/obj/machinery/conveyor{dir = 4; id = "QMLoad2"},/turf/simulated/floor,/area/quartermaster/storage) "eHv" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/conveyor{dir = 4; id = "QMLoad2"},/turf/simulated/floor,/area/quartermaster/storage) +"eHw" = (/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/turf/simulated/floor/plating,/area/maintenance/apmaint) (1,1,1) = {" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -12671,7 +12673,7 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaabaGbayaaTzaAPaGdaUYaUZaVaaVbaGdaAPaVcaVdayaaVeaPTaTzaVfaVgaTCaTCaTDaySaVhaRHaDyaTGaRJaViaVjaVkaRLaRLaVlaVmaVnaRLaVoaVpaVqaVpaVraVsaVpaVpaVtaVpaVpaVuaVvaVpaVwaVpaVxaRLaRLaRLaVyaVzaVAaVBaVCaVDaVCaVEaVFaVEaVEaVEaVEaVEaVEaVGaVHaVIaVIaVIaVIaVJaVIaVKaVLaVIaVIaVMaVNaVOaVOaVOaVOaVOaVOaVOaVPaSEaSEaaqaVQaVRaVSaVTaVTaVUaVVaUuaSMaVWaaqaaqaaqaaqaaqaVXaaqaVYaVZaWaaWbaQVaWcaaqaWdaWeaWfaWgaWhaWiaWjaWkaaqaPvaJuaaqaWlaWmaNRaWnaWoaNRaWpaWpaaqaWqaWraWsaaqaWtaWuaWvaMvaMvaWwaWxaOeaWyaaqaWzaUQaURaWAaWBaUQaUQaWCaWDaaaaaaaaaaaaaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaabaySaDwaTuaPSaERaDyaDyaESaPSaTuaPSaWEaWFaWGaWHaDwaWIaWIaREaWIaRFaySaWJaRHaDyaySaPYaPYaWKaPYaPYaPYaPYaPYaPYaWLaWMaPYaPYaPYaPYaPYaPYaWNaWOaWNaPYaWPaPYaWQaVjaWRaWSaWTaWUaRLaWVaPYaWWaWWaWXaWXaWXaWYaQCaQCaQCaQCaQCaQCaQCaaiaWZaXaaXbaXaaXcaXcaXdaXeaXfaXgaXhaaiaXiaQCaQCaQCaQCaQCaQCaXjaXkaXkaXkaaqaXlaXmaXnaXnaXnaXnaXoaKyaXpaXqaXraXsaXtaXuaXvaXwaaqaaqaXxaXiaXyaQCaXzaaqaXAaXBaXCaXCaXCaXCaXDaXEaaqaXFaJuaaqaXGaNRaWnaWnaWoaWnaNRaXHaaqaXIaXJaXKaaqaMvaXLaXMaXNaXNaXOaXPaXQaXRabZaXSaXTaXUaXVaUSaUQaUQaXWaWDaaaaaaaaaaaaaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaMIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaCyaXXaDyaXYaXZaYaaYbaYcaYdaYbaYeaYfaYbaYbbcOaYhaYiaYjaYkaYkaYkaYlaYkaYmaYnaySaYoaYpaYqaYraYsaYtaYuaYvaYwaYxaYyaYzaYAaYBaYCaYDaYEaYFaYGaYHaYEaYIaPYaPYaYJaPYaPYaPYaPYaYKaYLaPYaYMaWWaYNaSeaSjaYOaaaaaaaaaaaaaaaaaaaaaaaiaYPaYQaYRaYSaYTaYUaYVaYWaYXaYYaYZaaiaaaaaaaaaaaaaaaaaaaaaaEFaZaaSEaZbaaqaZcaXmaXqaXqaXqaXqaXqaZdaZeaXqaXqaXqaXtaZfaZfaZgaZhaZiaZjaZkaZlaZmaZnaaqaZoaZpaZqaZraZraZqaZsaZtaaqaPvaZuaaqaZvaZwaNRaWnaWoaNRaZxaZxaaqaaqaZyaaqaaqaZzaWuaWxaZAaZAaZBaWxaOeaaqaaqaZCaUQaZDaZDaZEaZDaUQaZFaWDaaaaaaaaaaZGaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaDwaZHaZIaZHaZHaZHaZHaZHaZHaZIaZHaZHaZJaDyaZKaZLaDyaDyaZMaDyaZNaZOaZPaZQaZRaySaYpaYpaZSaYraZTaYxaYxaYxaYxaYxaYyaZUaYxaYxaYxaYxaYEaZVaZWaZXaYEaYIaZYaZZbaababbacaYMbadbaebafbagbahbaiaYNaSeaSjaYOaaaaaaaaaaaaaaiaaiaaiaaibajbakbalbambanbaobapbaqbarbasbataaiaaiaaiaaiaaaaaaaaaaaaaEFaZaaSEaSEbauaXqbavbawbaxaXqbaybazaJabaAbaBbaCaXqaXtaZfaZfbaDbaEaZfbaFbaGbaHbaIaZfbaJbaKbaLaZqaZraZraZqbaMbaNaaqaPvbaOaaqaXGaNRaWnaWnaWoaWnaNRaNRbaPbaQaNRbaRaaqbaSbaTbaUaZAaZAbaVbaUbaWaaqbaXbaYaUQbaZbaZbbabaZaUQaXWbbbbbcbbdbbdbbeaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaDwaZHaZIaZHaZHaZHaZHaZHaZHaZIaZHaZHaZJaDyaZKaZLaDyaDyaZMaDyaZNaZOaZPaZQaZRaySaYpaYpaZSaYraZTaYxaYxaYxaYxaYxaYyaZUaYxaYxaYxaYxaYEaZVaZWaZXaYEaYIaZYaZZbaababbacaYMbadbaebafbagbahbaiaYNaSeaSjaYOaaaaaaaaaaaaaaiaaiaaiaaibajbakbalbambanbaobapbaqbarbasbataaiaaiaaiaaiaaaaaaaaaaaaaEFaZaaSEaSEbauaXqbavbawbaxaXqbaybazaJabaAbaBbaCaXqaXtdqXaZfbaDbaEaZfbaFbaGbaHbaIaZfbaJbaKbaLaZqaZraZraZqbaMbaNaaqaPvbaOaaqaXGaNRaWnaWnaWoaWnaNRaNRbaPbaQaNRbaRaaqbaSbaTbaUaZAaZAbaVbaUbaWaaqbaXbaYaUQbaZbaZbbabaZaUQaXWbbbbbcbbdbbdbbeaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaayaayabbfbbgbbgbbgbbgbbgbbgbbgaGjayaaySbbhbbiaySbbjbbjbbjbbjbbjbbkaySaySaySaySaYpbblbbmaYrbbnaYxaYxbbobbpbbqbbrbboaYxaYxaYxbbsaYEbbtbbubbvaYEaYIaZYbbwbbxbbybbzaYMbbAbbBbbCbbDbbEbbFbbGbbHaSjbbIaoJaaiaaiaaiaaibbJbbKbbLbbMbbNbbNbbObbPbbNbbQbbNbbRbbSbbTbbUbbVbbWaaiaaiaaiaaiaXibbXaZaaSEaSEaaqbbYbavbaBbaxaXqbbZbcaaXqbcbbccbaCaXqaXtaZfaZfbcdbcebcfbcgbchbcibcjaZfbckbaKbclaZqaZraZrbcmbcnbaNaaqaPvbcoaaqbcpbcqbcraWnaWobcsaNRaNRbctaNRbcubcvaaqbcwbcxbcyaZAaZAbczbcybcAaaqbcBbaYaUQaUQaUQaUSaUQaUQbcCbcDbcEbcFbcGbcHaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabcIbcIbcIbcIbcIbcIbcIbcIbcIbcIbcIbcIaabbcJaGeaDAbcKbbjbcLbcMbcNbcRbcPbcQbhlbcSbbjbcTbcUbcVbcWaYrbcXaYxaYxbbobbqbcYbcZbboaYxaYxbdabdbaYEaYEaYEaYEaYEaYIaZYaZYaZYaZYaZYaYMbdcbbDbddbbDbdebbFaYNbdfaSjaSkaSkbdgbdhbdiaaibdjbalbdkbbNbbNbbNbdlbdmbdnbdmbdobdpbdqbdmbdrbdsbdtaaibdubdhbdvbdwbdxaZaaSEaSEbauaXqbdyaXqaXqaXqbdzbdAaXqbcbbdBbaCaXqaXtaZfaZfbdCbdDbdEbdFbdGbdHbcjbdIaaqbdJbclaZqaZraZraZqbcnbdKaaqbdLaaqaaqaaJaaqaaqbdMaWobdNbdOaNRbdPbdQaRlbdRabZbdSbdTbdUbdVbdVbdWbdXbdYabZbdZbeaaUQbebaUQaUSaUQaUQbecbedbbcbbdbbdbeeaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabcIbcIbcIbcIbcIbcIbcIbcIbcIbcIbcIbcIbcIbefbegbehaERaZKbbjbcLbeibejbcLbekbelbembenbbjbeobepbeqberaYrbesbetbeubevbewbexbeybezbezbezbeAbeBaYrbeCbcUbeDbeEbeFbblbblbeGberbeHaYMbeIbeJbeKbeLbeMbeNaYNbdfaSeaSeaSebeObePbeQbeRbeSbeTbbNbeUbeVbeWbeXbeYbeZbfabfbbfcbfdbfebeSbffbfgbfhbfibfjbfkbflbfmbfnaSEbfoaaqaXqbfpbfqbaCaXqbfrbfsaXqbftbfubaCaXqaXtaZfaZfaZfaZgaZfbfvaZfbdHbcjbfwaaqbfxbclaZqaZraZraZqbcnbfyaaqbfzbfAbfAbfBbfCbfDbfEbfFbfGbfGbfGbfGbfGbfGbfHbfIbfJaZAaZAaZAaZAaZAaZAbfKbfLbfMbaYaUQaUQaUQaUSaUQaUQbfNaWDbfObfObfOaWDaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaKPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -12711,10 +12713,10 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacbVaaaaabaabaaiaaiaaiaaiaaiaaiaaiaaiaaqbWUcbWaaacbXcbYcbZccaccbcccccdcceccfccgabZcchcciccjcckcclccmccnccoccpccqabmccrccsccsccscctaaibDgbDgaaqaaqaaqaaqaaJaaqccuccuccvaaqaaqaosaaqaNtccwccxccyccxachcczccAccBachbrebreachccCccDccEaaiccFccGbVQaaiaaiabmaaiccHaaiccIccJaaiccKccLccMbDgccNaaiabmccOafaaaibsacaBccPbsaccQccRccSccTbsabsabsabsabsabsaccUccVbIgaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaibQXbQXbQXbQXbQXbQXbYnbQXcbUbQXbQXbQXbQXbQXaaiaaiaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaccXccYccYccYccZcfAcdacdbcdccddcdeaaqcdfbWUaEFaaacdgcdhcdicdjcdkccccdlcdmcdncdoaaqcdpbYCbTWcbfcdqbZTcdrbZTcdscdtcducdvcdwcdwcdwcdxaaibDgbDgaaqcdycdzcdAcdBcdCcdDcdDcdEcdFcdGcdHcdIcdJabZcdKbXJbXJacFcdLcdMcdNaaiaaaaaaaaicdOcdPcdQachcdRcdScdTcdUcdUcdVbBDcdWcdXcdYcdZcdXcdXcdXceacdXcdXcebceccedceecefcegcehceibQOcejbQObQObQObQObQOcekcelbQObQOcembsacenaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaiaaibWRbQXbQXbQXbQXbQXbQXbQXbQXbQXbQXbQXaaiaaiaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaceocepcepcepcepceqcercescetceuceucevaaqcewbYsaEFaaacdgcexceycezceAceBceCceDceAceAceEceFceGceHacFacFceIceJbZTceKceLceMcdwcdwcdwcdwceNaaibDgbDgaaqceOcePceQceRceSceTceTceUceVceWceXceYceZaaqcfabXFcfbaaicfccdMcfdaaiaaaaaaaaicfecffcfgaaibDhcfhcficficficficficficfjcfkcflcfmachachcfncfoachachcfpcfqcfraaqaaicfscftcfuaaiaaiaaiaaicfvcfwcfuaaiaaibsacfxbsabJuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabTHaaiaaibZHbZHbQXbQXbQXbQXbQXbQXbQXbQXaaiaaiaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacfycfzcfCcfBcfCcfEcfDcgQcfFcfFcfGaaqcfHbWUaEFaaacdgcfIcfJaiVcfKccccfLcfMcfNcfOaaqcdpbYCbYDcfPaaicfQaaqcfRcfScfTcfUcfVcdwcdwcfWcfXaaibDgcfYaaqcfZcgacgbcgccgccgccgdcgecgccgccgfcgbcggaaicghbXFcgiaaicgjcdMcgkaaiaaaaaaaaicglcgmcgnaaicgobDgcfYaaiaaiaaiaaiaaiaoHaoIaoJaaiaaicgpcgqcgrcgsaaicgtcguamdaaicgvcgwcgwcgwcgxcgycgzcgAcgBcgCcgDcgEaaicgFcgGcgHcgIcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgKcgLaaibSiaaibQXbQXbQXbQXbQXbQXbQXaaiaaiaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaagaaacfycgMcgNcgOcgPcetchYcetcgRcetcgScgTcgUcgVcgWaaacgXcbYcgYccacgZccccccchachbchcabJchdchechfchgaaichhchichjchkchlabmchmcdwcdwcdwchnaaibDgbDgaaqaaqaaJchochpchqchraaqchschtchuchvbUgaaJaaicfabXFcfbaaichwcdMcdNaaiaaaaaaaaichxchychzaaibDgbDgbDgaaiaabaaaaaaaabaaaaabaaaaaaaaichAchBchCchDchEchFchGchHchIchJchKchLchLchMchNchNchOchPchQchQchRaaiaaichSaamaaiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaichTchUchVaaiaaibQXbQXchWbQXbQXaaiaaiaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacfychXcfCchZcfCciacibcidciccgQcifaaqbYrcigaaiaaaaaaaaaaaaaaicihciicijcijcikcilaaqcimbYCbTWcinciocipciqcircircirciscitcdwciucdwcivaaibDgbDgaaqciwcixciycizciAciBaaqciAciBcizciCciDciEaaicghciFcgiaaichwcdMciGaaiaaiaaiaaiaaiaaiaaiaaiciHbDgbDgaaiaabaaaaaaaaaaabaabaabaaaaaiciIciJciJciKciLciMciNciOciPciQciRciSciTciUciVciWchNchNchNciXciYaaiciZcjacjbaaiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacjccjdcjebSjaaqaaiaaibQXbQYbQXaaiaaiaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacOabAaaiaaiaaiaaiaaiaaiaaiaaiaJkaJkaJkaJkaJkaaiaaqaaqaaqaaqaaqaaqcjfcjgaaiaaiaaiaaiaaiaaiaaqaaqaaqaaqaaqaaqaaqcjhbYCbTWcjicjjcjkcjlcjmcjncjocjpcjqcjrcjscjtcjuaaibDgbDgaaqcjvcjwciycizcizcjxaaqcjycizcizciCciycjzaaiaaiaaiaaiccIcjAcdMcjBaaicjCbDgbDgbDgbDgcjDbDgbDgbDgbDgaaiaaaaaaaaaaaaaaaaabaabaaaaaicjEcjFcjFcjGcjHcjIcjJcjKcjLcjMcjNchNchNchNcjOcjPchNcjQchNciXcjRaaicjScjTcjUaaiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacjVbBZbBZbCaaaqaaqaaiaaiaaiaaibPhaabaabaaaaaaaagaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacfycfzcfCcfBcfCcfEcfDcgQcfFcfFcfGaaqcgTbWUaEFaaacdgcfIcfJaiVcfKccccfLcfMcfNcfOaaqcdpbYCbYDcfPaaicfQaaqcfRcfScfTcfUcfVcdwcdwcfWcfXaaibDgcfYaaqcfZcgacgbcgccgccgccgdcgecgccgccgfcgbcggaaicghbXFcgiaaicgjcdMcgkaaiaaaaaaaaicglcgmcgnaaicgobDgcfYaaiaaiaaiaaiaaiaoHaoIaoJaaiaaicgpcgqcgrcgsaaicgtcguamdaaicgvcgwcgwcgwcgxcgycgzcgAcgBcgCcgDcgEaaicgFcgGcgHcgIcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgJcgKcgLaaibSiaaibQXbQXbQXbQXbQXbQXbQXaaiaaiaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaagaaacfycgMcgNcgOcgPcetchYcetcgRcetcgScgVcgUcigcgWaaacgXcbYcgYccacgZccccccchachbchcabJchdchechfchgaaichhchichjchkchlabmchmcdwcdwcdwchnaaibDgbDgaaqaaqaaJchochpchqchraaqchschtchuchvbUgaaJaaicfabXFcfbaaichwcdMcdNaaiaaaaaaaaichxchychzaaibDgbDgbDgaaiaabaaaaaaaabaaaaabaaaaaaaaichAchBchCchDchEchFchGchHchIchJchKchLchLchMchNchNchOchPchQchQchRaaiaaichSaamaaiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaichTchUchVaaiaaibQXbQXchWbQXbQXaaiaaiaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacfychXcfCchZcfCciacibcidciccgQcifaaqcjfbWUaaiaaaaaaaaaaaaaaicihciicijcijcikcilaaqcimbYCbTWcinciocipciqcircircirciscitcdwciucdwcivaaibDgbDgaaqciwcixciycizciAciBaaqciAciBcizciCciDciEaaicghciFcgiaaichwcdMciGaaiaaiaaiaaiaaiaaiaaiaaiciHbDgbDgaaiaabaaaaaaaaaaabaabaabaaaaaiciIciJciJciKciLciMciNciOciPciQciRciSciTciUciVciWchNchNchNciXciYaaiciZcjacjbaaiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacjccjdcjebSjaaqaaiaaibQXbQYbQXaaiaaiaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacOabAaaiaaiaaiaaiaaiaaiaaiaaiaJkaJkaJkaJkaJkaaiaaqaaqaaqaaqaaqaaqcjgeHwaaiaaiaaiaaiaaiaaiaaqaaqaaqaaqaaqaaqaaqcjhbYCbTWcjicjjcjkcjlcjmcjncjocjpcjqcjrcjscjtcjuaaibDgbDgaaqcjvcjwciycizcizcjxaaqcjycizcizciCciycjzaaiaaiaaiaaiccIcjAcdMcjBaaicjCbDgbDgbDgbDgcjDbDgbDgbDgbDgaaiaaaaaaaaaaaaaaaaabaabaaaaaicjEcjFcjFcjGcjHcjIcjJcjKcjLcjMcjNchNchNchNcjOcjPchNcjQchNciXcjRaaicjScjTcjUaaiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacjVbBZbBZbCaaaqaaqaaiaaiaaiaaibPhaabaabaaaaaaaagaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaagaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacjWcjXcjYcjZckackackbckcckdckeckfckgckhckickjckjckjckkcklckmckncknckockpckqckrcksckrckrckrckqckrckrcktckuckvckwbYCbTWckxckyckzafaaaicfUacFaujckAckBacFatEcblaaibDgbDgaaqckCckDckEckFckGckHaaqckIckGckJckKckEckLaaibDgbDgbDgckMchwcdMchwckNbDgbDgbDgbDgbDgbDgbDgbDgbDgbDgaaiaaaaaaaaaaaaaaaaabaabaabaaickOckPckPckPcbAaaickQafacbAckRckSckTckTckUcjMcjMckVckTckWckXckYaaickZclaclbaaiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaabaabaabaaaaaaaaaaaaaabaabaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacjWcjXclccldclecldclfclgclhclicljclkcllclmclnclnclnclnbYCbTXbTXbTXclncloclnclnclnclnclnclnclnclnclnclnclpclqclrclscltcluclvclwclxaaiclyclzclAclBclCclDclEclFachcficlGabJclHclIclJclKcizclLaaqclLcizclKclMciyclNaaiclOachachbmWclPclQclRaaibNtaoIaoIbNuaaiaaiaaiaoHaoIaoJaaiaaaaaaaaaaaaaaaaaaaabaabaaiclSclTclUclVaaiclWclXclYaaiclZcmacmacmacmbcmccmdcmecmacmacmacmfaaiaDpcmgcmhaFRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacjWcmicldcmjcmkcmlcmmcmncmocmpcmqcmrcmscmtcmucmvcmwcmwcmxabJcmyabJcmucmzcmucmucmucmucmucmucmucmucmucmucmAclncmBcmCcmDcmEcmFcmGcmHcmIcmJcmKcmLcmMcmNcmOcmPcmQacFbXlcmRcmScmTcizciycizcizcmUabZcmVcizcizciCciycmWaaicmXaaiaaaafaaaicmYaaiaaiaaaaaaaaaaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaiaaiaaiaaiaaiaaiaaiaaiaaicmZcnacnbaaiaaicnccndcneaaiaaiaaiaaicnccndcneaaiaaiaEFcnfaEFaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaagaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaMIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -13979,7 +13981,7 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaabaaceyHeyVeyHeyWeyXeyYeyYexNeyUexNeyUexNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaacaaceyHeyZezaeyWeyYezbeyYexNeyUexNeyUexNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabexoaacetNeyHezceyHezdeyYezeeHpexNezgexNeyUexNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaacetNezheyYeziezjeyYeHoezleyYexNeyUexNeyUexNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaacetNdEjezheziezjeyYeHoezleyYexNeyUexNeyUexNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaacdEjdEjeyHezmeyHeyYeyYezaeyYexNeyUexNezgexNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaiaaiaaiaaaeyHeyHezmeyHeyHeyHeyHeyHexNeyUexNezgexNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadyqaaaaaaaaaaaaaaaeznaaaaaaaaaaaaaaadyqaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa diff --git a/nano/debug.html b/nano/debug.html index 969956bacb2..58b2be3df1a 100644 --- a/nano/debug.html +++ b/nano/debug.html @@ -16,7 +16,7 @@ - +
- {{:data.holdingTank.tankPressure}} kPa + {{:data.tankPressure}} kPa +
+
+ +
+
+ Port Status: +
+
+ {{:data.portConnected ? 'Connected' : 'Disconnected'}} +
+
+ +

Holding Tank Status

+ {{if data.hasHoldingTank}} +
+
+ Tank Label: +
+
+
{{:data.holdingTank.name}}
{{:helper.link('Eject', 'eject', {'remove_tank' : 1})}} +
+
+ +
+
+ Tank Pressure: +
+
+ {{:data.holdingTank.tankPressure}} kPa +
+
+ {{else}} +
No holding tank inserted.
+
 
+ {{/if}} + + +

Release Valve Status

+
+
+ Release Pressure: +
+
+ {{:helper.displayBar(data.releasePressure, data.minReleasePressure, data.maxReleasePressure)}} +
+ {{:helper.link('-', null, {'pressure_adj' : -1000}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled')}} + {{:helper.link('-', null, {'pressure_adj' : -100}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled')}} + {{:helper.link('-', null, {'pressure_adj' : -10}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled')}} + {{:helper.link('-', null, {'pressure_adj' : -1}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled')}} +
 {{:data.releasePressure}} kPa 
+ {{:helper.link('+', null, {'pressure_adj' : 1}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} + {{:helper.link('+', null, {'pressure_adj' : 10}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} + {{:helper.link('+', null, {'pressure_adj' : 100}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} + {{:helper.link('+', null, {'pressure_adj' : 1000}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} +
+
+
+ +
+
+ Release Valve: +
+
+ {{:helper.link('Open', 'unlocked', {'toggle' : 1}, data.valveOpen ? 'selected' : null)}}{{:helper.link('Close', 'locked', {'toggle' : 1}, data.valveOpen ? null : 'selected')}}
{{else}} -
No holding tank inserted.
-
 
-{{/if}} - - -

Release Valve Status

-
+ {{:helper.link('Go back', 'home', {'choice' : 'menu', 'mode_target' : 0}, null)}} +

Relabel

- Release Pressure: + Name:
- {{:helper.displayBar(data.releasePressure, data.minReleasePressure, data.maxReleasePressure)}} -
- {{:helper.link('-', null, {'pressure_adj' : -1000}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled')}} - {{:helper.link('-', null, {'pressure_adj' : -100}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled')}} - {{:helper.link('-', null, {'pressure_adj' : -10}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled')}} - {{:helper.link('-', null, {'pressure_adj' : -1}, (data.releasePressure > data.minReleasePressure) ? null : 'disabled')}} -
 {{:data.releasePressure}} kPa 
- {{:helper.link('+', null, {'pressure_adj' : 1}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} - {{:helper.link('+', null, {'pressure_adj' : 10}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} - {{:helper.link('+', null, {'pressure_adj' : 100}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} - {{:helper.link('+', null, {'pressure_adj' : 1000}, (data.releasePressure < data.maxReleasePressure) ? null : 'disabled')}} +
{{:data.name}}
{{:helper.link('Rename', 'pencil', {'rename' : 1}, data.canLabel ? null : 'disabled')}} +
+ + +

Colors

+
+
+
{{:data.colorContainer.prim.name}}
+ {{for data.colorContainer.prim.options}} +
+ {{if value.icon == data._color.prim}} + {{:helper.link(value.name, '', {'choice' : data.colorContainer.prim.name, 'icon' : value.icon}, data.canLabel ? null : 'disabled', 'selected')}} + {{else}} + {{:helper.link(value.name, '', {'choice' : data.colorContainer.prim.name, 'icon' : value.icon}, data.canLabel ? null : 'disabled', null)}} + {{/if}} +
+ {{/for}} +
+
+
{{:data.colorContainer.sec.name}}
+ {{:helper.link("None", '', {'choice' : data.colorContainer.sec.name, 'icon' : "none"}, data.canLabel ? null : 'disabled', data.colorContainer.sec.anycolor ? null : 'selected')}} + {{for data.colorContainer.sec.options}} +
+ {{if value.icon == data._color.sec}} + {{:helper.link(value.name, '', {'choice' : data.colorContainer.sec.name, 'icon' : value.icon}, data.canLabel ? null : 'disabled', 'selected')}} + {{else}} + {{:helper.link(value.name, '', {'choice' : data.colorContainer.sec.name, 'icon' : value.icon}, data.canLabel ? null : 'disabled', null)}} + {{/if}} +
+ {{/for}} +
+
+
{{:data.colorContainer.ter.name}}
+ {{:helper.link("None", '', {'choice' : data.colorContainer.ter.name, 'icon' : "none"}, data.canLabel ? null : 'disabled', data.colorContainer.ter.anycolor ? null : 'selected')}} + {{for data.colorContainer.ter.options}} +
+ {{if value.icon == data._color.ter}} + {{:helper.link(value.name, '', {'choice' : data.colorContainer.ter.name, 'icon' : value.icon}, data.canLabel ? null : 'disabled', 'selected')}} + {{else}} + {{:helper.link(value.name, '', {'choice' : data.colorContainer.ter.name, 'icon' : value.icon}, data.canLabel ? null : 'disabled', null)}} + {{/if}} +
+ {{/for}} +
+
+
{{:data.colorContainer.quart.name}}
+ {{:helper.link("None", '', {'choice' : data.colorContainer.quart.name, 'icon' : "none"}, data.canLabel ? null : 'disabled', data.colorContainer.quart.anycolor ? null : 'selected')}} + {{for data.colorContainer.quart.options}} +
+ {{if value.icon == data._color.quart}} + {{:helper.link(value.name, '', {'choice' : data.colorContainer.quart.name, 'icon' : value.icon}, data.canLabel ? null : 'disabled', 'selected')}} + {{else}} + {{:helper.link(value.name, '', {'choice' : data.colorContainer.quart.name, 'icon' : value.icon}, data.canLabel ? null : 'disabled', null)}} + {{/if}} +
+ {{/for}}
-
- -
-
- Release Valve: +

Decals

+
+
Pick and choose:
+
+ {{for data.possibleDecals}} + {{:helper.link(value.name, '', {'choice' : 'decals', 'icon' : value.icon}, data.canLabel ? null : 'disabled', value.active ? 'selected' : null)}} + {{/for}} +
-
- {{:helper.link('Open', 'unlocked', {'toggle' : 1}, data.valveOpen ? 'selected' : null)}}{{:helper.link('Close', 'locked', {'toggle' : 1}, data.valveOpen ? null : 'selected')}} -
-
- +{{/if}} \ No newline at end of file diff --git a/nano/templates/cryo.tmpl b/nano/templates/cryo.tmpl index e8302b07df9..ab375a5df59 100644 --- a/nano/templates/cryo.tmpl +++ b/nano/templates/cryo.tmpl @@ -95,4 +95,12 @@ Used In File(s): \code\game\machinery\cryo.dm
{{:helper.link('Eject Beaker', 'eject', {'ejectBeaker' : 1}, data.isBeakerLoaded ? null : 'disabled')}}
+
+
+
+ Auto-eject: +
+
+ {{:helper.link('On', 'power', {'autoejectOn' : 1}, data.autoeject ? 'selected' : null)}}{{:helper.link('Off', 'close', {'autoejectOff' : 1}, data.autoeject ? null : 'selected')}} +
\ No newline at end of file diff --git a/nano/templates/faxmachine.tmpl b/nano/templates/faxmachine.tmpl new file mode 100644 index 00000000000..9dd7b910fda --- /dev/null +++ b/nano/templates/faxmachine.tmpl @@ -0,0 +1,67 @@ + +
+

Authorization

+
+
+
+ Confirm identity: +
+
+ {{:helper.link(data.scan_name, 'eject', {'scan' : 1})}} +
+
+
+
+ Authorize: +
+
+ {{:helper.link(data.authenticated ? 'Log Out' : 'Log In', data.authenticated ? 'unlocked' : 'locked', {'auth' : 1})}} +
+
+
+
+

Fax Menu

+
+
+
+ Network: +
+ +
+ {{:data.network}} +
+
+
+
+ Currently sending: +
+
+ {{:helper.link(data.paper, 'eject', {'paper' : 1})}} + {{if data.paperinserted}} + {{:helper.link('Rename', 'pencil', {'rename' : 1})}} + {{/if}} +
+
+
+
+ Sending to: +
+
+ {{:helper.link(data.destination, 'print', {'dept' : 1}, !data.authenticated ? 'disabled' : '')}} +
+
+
+
+ Action: +
+
+ {{if data.authenticated}} + {{:helper.link(data.cooldown && data.respectcooldown ? "Realigning" : "Send", data.cooldown && data.respectcooldown ? 'clock' : "mail-closed", {'send' : 1}, data.cooldown && data.respectcooldown ? 'disabled' : "")}} + {{else}} + {{:helper.link(data.cooldown && data.respectcooldown ? "Realigning" : "Send", data.cooldown && data.respectcooldown ? 'clock' : "mail-closed", null, !data.authenticated ? 'disabled' : "")}} + {{/if}} +
+
\ No newline at end of file diff --git a/nano/templates/solar_control.tmpl b/nano/templates/solar_control.tmpl new file mode 100644 index 00000000000..17c3566bece --- /dev/null +++ b/nano/templates/solar_control.tmpl @@ -0,0 +1,96 @@ + + +

Status:

+
+
+
+ Generated power: +
+
+ {{:data.generated}} W +
+
+ +
+
+ Orientation: +
+ +
+ {{:data.angle}}° ({{:data.direction}})  +
+ + {{:helper.link('15°', 'minus', {'rate_control' : '1', 'cdir' : '-15'})}} + {{:helper.link('1°', 'minus', {'rate_control' : '1', 'cdir' : '-1'})}} + {{:helper.link('1°', 'plus', {'rate_control' : '1', 'cdir' : '1'})}} + {{:helper.link('15°', 'plus', {'rate_control' : '1', 'cdir' : '15'})}} +
+
+ +

Tracking:

+
+
+
+ Tracker status:  +
+ + {{:helper.link('Off', 'close', {'track' : '0'}, (data.tracking_state == 0) ? 'selected' : '')}} + {{:helper.link('Timed', 'clock', {'track' : '1'}, (data.tracking_state == 1) ? 'selected' : '')}} + {{if data.connected_tracker}} + {{:helper.link('Auto', 'signal-diag', {'track' : '2'}, (data.tracking_state == 2) ? 'selected' : '')}} + {{else}} + {{:helper.link('Auto', 'signal-diag', null, 'disabled')}} + {{/if}} +
+ +
+
+ Tracking rate: +
+ +
+ {{:data.tracking_rate}} deg/h ({{:data.rotating_way}}) +
+
+ +
+ {{:helper.link('180°', 'minus', {'rate_control' : '1', 'tdir' : '-180'})}} + {{:helper.link('30°', 'minus', {'rate_control' : '1', 'tdir' : '-30'})}} + {{:helper.link('1°', 'minus', {'rate_control' : '1', 'tdir' : '-1'})}} + {{:helper.link('1°', 'plus', {'rate_control' : '1', 'tdir' : '1'})}} + {{:helper.link('30°', 'plus', {'rate_control' : '1', 'tdir' : '30'})}} + {{:helper.link('180°', 'plus', {'rate_control' : '1', 'tdir' : '180'})}} +
+
+ +

Connected devices :

+
+
+
+ Solars panels: +
+
+ {{:data.connected_panels}} connected +
+
+ +
+
+ Solar tracker: +
+ +
+ {{if data.connected_tracker}} + Found  + {{else}} + Not found  + {{/if}} +
+
+
+
+ {{:helper.link('Search for devices', 'refresh', {'search_connected' : '1'})}} +
diff --git a/nano/templates/vending_machine.tmpl b/nano/templates/vending_machine.tmpl new file mode 100644 index 00000000000..87ceda78e00 --- /dev/null +++ b/nano/templates/vending_machine.tmpl @@ -0,0 +1,57 @@ + + +{{if data.mode == 0}} +

Items available

+
+ {{for data.products}} +
+
+ {{if value.price > 0}} + {{:helper.link('Buy (' + value.price + ')', 'cart', { "vend" : value.key }, value.amount > 0 ? null : 'disabled')}} + {{else}} + {{:helper.link('Vend', 'circle-arrow-s', { "vend" : value.key }, value.amount > 0 ? null : 'disabled')}} + {{/if}} +
+
+ {{if value.color}}{{:value.name}} + {{else}}{{:value.name}} + {{/if}} + ({{:value.amount ? value.amount : "NONE LEFT"}}) +
+
+ {{empty}} + No items available! + {{/for}} +
+{{if data.coin}} +

Coin

+
+
Coin deposited:
+
{{:helper.link(data.coin, 'eject', {'remove_coin' : 1})}}
+
+{{/if}} +{{else data.mode == 1}} +

Item selected

+
+
+
Item selected:
{{:data.product}}
+
Charge:
{{:data.price}}
+
+
+ {{if data.message_err}} {{/if}} {{:data.message}} +
+
+ {{:helper.link('Pay', 'cart', {'pay' : 1})}} + {{:helper.link('Cancel', 'arrowreturn-1-w', {'cancelpurchase' : 1})}} +
+
+{{/if}} +{{if data.panel}} +

Maintenance panel

+
+
Speaker
{{:helper.link(data.speaker ? 'Enabled' : 'Disabled', 'gear', {'togglevoice' : 1})}}
+
+{{/if}} \ No newline at end of file diff --git a/paradise.dme b/paradise.dme index 9b9c24ac5ad..b77e1e61f50 100644 --- a/paradise.dme +++ b/paradise.dme @@ -218,11 +218,6 @@ #include "code\datums\spells\trigger.dm" #include "code\datums\spells\turf_teleport.dm" #include "code\datums\spells\wizard.dm" -#include "code\datums\visibility_networks\chunk.dm" -#include "code\datums\visibility_networks\dictionary.dm" -#include "code\datums\visibility_networks\update_triggers.dm" -#include "code\datums\visibility_networks\visibility_interface.dm" -#include "code\datums\visibility_networks\visibility_network.dm" #include "code\datums\wires\airlock.dm" #include "code\datums\wires\alarm.dm" #include "code\datums\wires\apc.dm" @@ -240,9 +235,8 @@ #include "code\defines\vox_sounds.dm" #include "code\defines\obj\weapon.dm" #include "code\defines\procs\admin.dm" +#include "code\defines\procs\announce.dm" #include "code\defines\procs\AStar.dm" -#include "code\defines\procs\captain_announce.dm" -#include "code\defines\procs\command_alert.dm" #include "code\defines\procs\dbcore.dm" #include "code\defines\procs\hud.dm" #include "code\defines\procs\sd_Alert.dm" @@ -645,6 +639,7 @@ #include "code\game\objects\items\devices\pipe_painter.dm" #include "code\game\objects\items\devices\powersink.dm" #include "code\game\objects\items\devices\scanners.dm" +#include "code\game\objects\items\devices\sensor_device.dm" #include "code\game\objects\items\devices\suit_cooling.dm" #include "code\game\objects\items\devices\taperecorder.dm" #include "code\game\objects\items\devices\traitordevices.dm" @@ -772,6 +767,7 @@ #include "code\game\objects\structures\extinguisher.dm" #include "code\game\objects\structures\false_walls.dm" #include "code\game\objects\structures\flora.dm" +#include "code\game\objects\structures\foodcart.dm" #include "code\game\objects\structures\fullwindow.dm" #include "code\game\objects\structures\girders.dm" #include "code\game\objects\structures\grille.dm" @@ -1045,6 +1041,7 @@ #include "code\modules\economy\Job_Departments.dm" #include "code\modules\economy\POS.dm" #include "code\modules\economy\utils.dm" +#include "code\modules\events\alien_infestation.dm" #include "code\modules\events\blob.dm" #include "code\modules\events\borers.dm" #include "code\modules\events\cargobonus.dm" @@ -1068,6 +1065,7 @@ #include "code\modules\events\rogue_drones.dm" #include "code\modules\events\space_ninja.dm" #include "code\modules\events\spacevine.dm" +#include "code\modules\events\spider_infestation.dm" #include "code\modules\events\tear.dm" #include "code\modules\events\viral_infection.dm" #include "code\modules\events\viral_outbreak.dm" @@ -1075,7 +1073,6 @@ #include "code\modules\events\sayuevents\meaty_ores.dm" #include "code\modules\events\sayuevents\undead.dm" #include "code\modules\events\sayuevents\wormholes.dm" -#include "code\modules\events\tgevents\alien_infestation.dm" #include "code\modules\events\tgevents\anomaly.dm" #include "code\modules\events\tgevents\anomaly_bluespace.dm" #include "code\modules\events\tgevents\anomaly_flux.dm" @@ -1087,7 +1084,6 @@ #include "code\modules\events\tgevents\false_alarm.dm" #include "code\modules\events\tgevents\immovable_rod.dm" #include "code\modules\events\tgevents\mass_hallucination.dm" -#include "code\modules\events\tgevents\spider_infestation.dm" #include "code\modules\events\tgevents\vent_clog.dm" #include "code\modules\ext_scripts\irc.dm" #include "code\modules\ext_scripts\python.dm" @@ -1286,13 +1282,13 @@ #include "code\modules\mob\living\silicon\ai\life.dm" #include "code\modules\mob\living\silicon\ai\login.dm" #include "code\modules\mob\living\silicon\ai\logout.dm" +#include "code\modules\mob\living\silicon\ai\nano.dm" #include "code\modules\mob\living\silicon\ai\say.dm" #include "code\modules\mob\living\silicon\ai\freelook\cameranet.dm" #include "code\modules\mob\living\silicon\ai\freelook\chunk.dm" #include "code\modules\mob\living\silicon\ai\freelook\eye.dm" #include "code\modules\mob\living\silicon\ai\freelook\read_me.dm" #include "code\modules\mob\living\silicon\ai\freelook\update_triggers.dm" -#include "code\modules\mob\living\silicon\ai\freelook\visibility_interface.dm" #include "code\modules\mob\living\silicon\decoy\death.dm" #include "code\modules\mob\living\silicon\decoy\decoy.dm" #include "code\modules\mob\living\silicon\decoy\life.dm" @@ -1336,6 +1332,7 @@ #include "code\modules\mob\living\simple_animal\tribbles.dm" #include "code\modules\mob\living\simple_animal\vox.dm" #include "code\modules\mob\living\simple_animal\worm.dm" +#include "code\modules\mob\living\simple_animal\friendly\butterfly.dm" #include "code\modules\mob\living\simple_animal\friendly\cat.dm" #include "code\modules\mob\living\simple_animal\friendly\corgi.dm" #include "code\modules\mob\living\simple_animal\friendly\crab.dm" @@ -1343,6 +1340,7 @@ #include "code\modules\mob\living\simple_animal\friendly\fox.dm" #include "code\modules\mob\living\simple_animal\friendly\lizard.dm" #include "code\modules\mob\living\simple_animal\friendly\mouse.dm" +#include "code\modules\mob\living\simple_animal\friendly\pug.dm" #include "code\modules\mob\living\simple_animal\friendly\slime.dm" #include "code\modules\mob\living\simple_animal\friendly\spiderbot.dm" #include "code\modules\mob\living\simple_animal\friendly\tomato.dm" @@ -1385,7 +1383,9 @@ #include "code\modules\nano\nanoexternal.dm" #include "code\modules\nano\nanomanager.dm" #include "code\modules\nano\nanomapgen.dm" +#include "code\modules\nano\nanoprocs.dm" #include "code\modules\nano\nanoui.dm" +#include "code\modules\nano\modules\crew_monitor.dm" #include "code\modules\organs\blood.dm" #include "code\modules\organs\organ.dm" #include "code\modules\organs\organ_external.dm" @@ -1395,6 +1395,7 @@ #include "code\modules\organs\wound.dm" #include "code\modules\paperwork\carbonpaper.dm" #include "code\modules\paperwork\clipboard.dm" +#include "code\modules\paperwork\fax.dm" #include "code\modules\paperwork\faxmachine.dm" #include "code\modules\paperwork\filingcabinet.dm" #include "code\modules\paperwork\folders.dm" diff --git a/sound/effects/picaxe1.ogg b/sound/effects/picaxe1.ogg new file mode 100644 index 00000000000..337422d39e4 Binary files /dev/null and b/sound/effects/picaxe1.ogg differ diff --git a/sound/effects/picaxe2.ogg b/sound/effects/picaxe2.ogg new file mode 100644 index 00000000000..c1a2fd631bd Binary files /dev/null and b/sound/effects/picaxe2.ogg differ diff --git a/sound/effects/picaxe3.ogg b/sound/effects/picaxe3.ogg new file mode 100644 index 00000000000..f4656613284 Binary files /dev/null and b/sound/effects/picaxe3.ogg differ diff --git a/sound/machines/defib_SaftyOn.ogg b/sound/machines/defib_SaftyOn.ogg new file mode 100644 index 00000000000..cf261536466 Binary files /dev/null and b/sound/machines/defib_SaftyOn.ogg differ diff --git a/sound/machines/defib_charge.ogg b/sound/machines/defib_charge.ogg new file mode 100644 index 00000000000..3e2be160fd1 Binary files /dev/null and b/sound/machines/defib_charge.ogg differ diff --git a/sound/machines/defib_failed.ogg b/sound/machines/defib_failed.ogg new file mode 100644 index 00000000000..341f70ce84e Binary files /dev/null and b/sound/machines/defib_failed.ogg differ diff --git a/sound/machines/defib_ready.ogg b/sound/machines/defib_ready.ogg new file mode 100644 index 00000000000..718128602ed Binary files /dev/null and b/sound/machines/defib_ready.ogg differ diff --git a/sound/machines/defib_saftyOff.ogg b/sound/machines/defib_saftyOff.ogg new file mode 100644 index 00000000000..6ab57097de3 Binary files /dev/null and b/sound/machines/defib_saftyOff.ogg differ diff --git a/sound/machines/defib_success.ogg b/sound/machines/defib_success.ogg new file mode 100644 index 00000000000..3f71438c168 Binary files /dev/null and b/sound/machines/defib_success.ogg differ diff --git a/sound/machines/defib_zap.ogg b/sound/machines/defib_zap.ogg new file mode 100644 index 00000000000..5612db39a43 Binary files /dev/null and b/sound/machines/defib_zap.ogg differ diff --git a/sound/misc/notice1.ogg b/sound/misc/notice1.ogg new file mode 100644 index 00000000000..da6454ce3cf Binary files /dev/null and b/sound/misc/notice1.ogg differ diff --git a/sound/misc/notice2.ogg b/sound/misc/notice2.ogg new file mode 100644 index 00000000000..3489ca3e15b Binary files /dev/null and b/sound/misc/notice2.ogg differ diff --git a/sound/music/1.ogg b/sound/music/1.ogg deleted file mode 100644 index 5e15c8ccc01..00000000000 Binary files a/sound/music/1.ogg and /dev/null differ diff --git a/sound/music/highlander.ogg b/sound/music/highlander.ogg deleted file mode 100644 index 787926383c7..00000000000 Binary files a/sound/music/highlander.ogg and /dev/null differ diff --git a/sound/music/nowyouman.ogg b/sound/music/nowyouman.ogg deleted file mode 100644 index 83471f1fc0d..00000000000 Binary files a/sound/music/nowyouman.ogg and /dev/null differ diff --git a/sound/music/space_asshole.ogg b/sound/music/space_asshole.ogg deleted file mode 100644 index 7b302e44b1f..00000000000 Binary files a/sound/music/space_asshole.ogg and /dev/null differ diff --git a/sound/weapons/Taser.ogg b/sound/weapons/Taser.ogg index f6bcb648212..8992b71f50f 100644 Binary files a/sound/weapons/Taser.ogg and b/sound/weapons/Taser.ogg differ diff --git a/sound/weapons/drill.ogg b/sound/weapons/drill.ogg new file mode 100644 index 00000000000..fd7495f74fa Binary files /dev/null and b/sound/weapons/drill.ogg differ diff --git a/sound/weapons/plasma_cutter.ogg b/sound/weapons/plasma_cutter.ogg new file mode 100644 index 00000000000..ba95317cc1e Binary files /dev/null and b/sound/weapons/plasma_cutter.ogg differ diff --git a/sound/weapons/sonic_jackhammer.ogg b/sound/weapons/sonic_jackhammer.ogg new file mode 100644 index 00000000000..dae5762b2c4 Binary files /dev/null and b/sound/weapons/sonic_jackhammer.ogg differ