diff --git a/_maps/map_files/Delta/delta.dmm b/_maps/map_files/Delta/delta.dmm index 93815774e61..f4202c2aea3 100644 --- a/_maps/map_files/Delta/delta.dmm +++ b/_maps/map_files/Delta/delta.dmm @@ -33633,7 +33633,7 @@ dir = 4; level = 1 }, -/obj/machinery/icecream_vat, +/obj/machinery/icemachine, /obj/effect/decal/warning_stripes/yellow, /turf/simulated/floor/plasteel, /area/crew_quarters/kitchen) diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm index f7eda3fe8ee..f8ee23f3f7e 100644 --- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm +++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm @@ -58653,7 +58653,7 @@ }, /area/crew_quarters/kitchen) "bXn" = ( -/obj/machinery/icecream_vat, +/obj/machinery/icemachine, /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 10 }, diff --git a/_maps/map_files/RandomZLevels/centcomAway.dmm b/_maps/map_files/RandomZLevels/centcomAway.dmm index 84515f06d49..1614171fabd 100644 --- a/_maps/map_files/RandomZLevels/centcomAway.dmm +++ b/_maps/map_files/RandomZLevels/centcomAway.dmm @@ -6142,7 +6142,7 @@ }, /area/awaymission/centcomAway/thunderdome) "oN" = ( -/obj/machinery/icecream_vat, +/obj/machinery/icemachine, /turf/simulated/floor/plasteel{ tag = "icon-barber (WEST)"; icon_state = "barber"; diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index 002b3ecc691..8dd95119aff 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -59,7 +59,7 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new()) for(var/mob/living/L in src) //ventcrawling is serious business L.remove_ventcrawl() L.forceMove(get_turf(src)) - QDEL_NULL(pipe_image) //we have to del it, or it might keep a ref somewhere else + QDEL_NULL(pipe_image) //we have to qdel it, or it might keep a ref somewhere else return ..() // Icons/overlays/underlays diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm index 94983f62acd..7e304170e54 100644 --- a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm +++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm @@ -87,7 +87,7 @@ else return 1 /obj/machinery/atmospherics/pipe/simple/proc/burst() - src.visible_message("\The [src] bursts!"); + src.visible_message("\The [src] bursts!") playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) var/datum/effect_system/smoke_spread/smoke = new smoke.set_up(1,0, src.loc, 0) diff --git a/code/__DEFINES/genetics.dm b/code/__DEFINES/genetics.dm index 58571e8b1ca..5fd85513501 100644 --- a/code/__DEFINES/genetics.dm +++ b/code/__DEFINES/genetics.dm @@ -145,7 +145,6 @@ #define RESISTCOLD "resist_cold" #define NO_EXAMINE "no_examine" #define CAN_WINGDINGS "can_wingdings" -#define NOZOMBIE "no_zombie" #define NO_GERMS "no_germs" #define NO_DECAY "no_decay" #define PIERCEIMMUNE "pierce_immunity" diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index b52d08c1d23..2b8c515e81a 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -3,7 +3,6 @@ // Mobs #define ismegafauna(A) istype(A, /mob/living/simple_animal/hostile/megafauna) -#define iszombie(A) (is_species(A, /datum/species/zombie)) //Simple animals #define isshade(A) (istype(A, /mob/living/simple_animal/shade)) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index b519130bb4f..bd077204f00 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -344,7 +344,7 @@ for(var/i = 1; i <= GLOB.player_list.len; i++) var/mob/M = GLOB.player_list[i] if(M && M.client) - if(istype(M, /mob/new_player)) // exclude people in the lobby + if(isnewplayer(M)) // exclude people in the lobby continue else if(isobserver(M)) // Ghosts are fine if they were playing once (didn't start as observers) var/mob/dead/observer/O = M diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm index 340d7a3b134..83347c20d3b 100644 --- a/code/__HELPERS/time.dm +++ b/code/__HELPERS/time.dm @@ -11,25 +11,6 @@ #define TICKS2DS(T) ((T) TICKS) -#define TimeOfGame (get_game_time()) -#define TimeOfTick (world.tick_usage*0.01*world.tick_lag) - -/proc/get_game_time() - var/global/time_offset = 0 - var/global/last_time = 0 - var/global/last_usage = 0 - - var/wtime = world.time - var/wusage = world.tick_usage * 0.01 - - if(last_time < wtime && last_usage > 1) - time_offset += last_usage - 1 - - last_time = wtime - last_usage = wusage - - return wtime + (time_offset + wusage) * world.tick_lag - /* This proc should only be used for world/Topic. * If you want to display the time for which dream daemon has been running ("round time") use worldtime2text. * If you want to display the canonical station "time" (aka the in-character time of the station) use station_time_timestamp @@ -98,14 +79,14 @@ proc/isDay(var/month, var/day) * Returns "watch handle" (really just a timestamp :V) */ /proc/start_watch() - return TimeOfGame + return REALTIMEOFDAY /** * Returns number of seconds elapsed. * @param wh number The "Watch Handle" from start_watch(). (timestamp) */ /proc/stop_watch(wh) - return round(0.1 * (TimeOfGame - wh), 0.1) + return round(0.1 * (REALTIMEOFDAY - wh), 0.1) /proc/numberToMonthName(number) return GLOB.month_names.Find(number) diff --git a/code/__HELPERS/unique_ids.dm b/code/__HELPERS/unique_ids.dm index 549f5c71016..b66b1a11b90 100644 --- a/code/__HELPERS/unique_ids.dm +++ b/code/__HELPERS/unique_ids.dm @@ -16,8 +16,6 @@ GLOBAL_VAR_INIT(next_unique_datum_id, 1) -// /client/var/tmp/unique_datum_id = null - /datum/proc/UID() if(!unique_datum_id) var/tag_backup = tag @@ -37,8 +35,6 @@ GLOBAL_VAR_INIT(next_unique_datum_id, 1) var/datum/D = locate(copytext(uid, 1, splitat)) - // We might locate a client instead of a datum, but just using : is easier - // than actually checking and typecasting - if(D && D:unique_datum_id == uid) + if(D && D.unique_datum_id == uid) return D return null diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index a022851e45f..7e57a394988 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -329,8 +329,9 @@ Turf and target are seperate in case you want to teleport some distance from a t /proc/select_active_ai_with_fewest_borgs() var/mob/living/silicon/ai/selected var/list/active = active_ais() - for(var/mob/living/silicon/ai/A in active) - if(!selected || (selected.connected_robots > A.connected_robots)) + for(var/thing in active) + var/mob/living/silicon/ai/A = thing + if(!selected || (length(selected.connected_robots) > length(A.connected_robots))) selected = A return selected @@ -2015,3 +2016,6 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) /proc/CallAsync(datum/source, proctype, list/arguments) set waitfor = FALSE return call(source, proctype)(arglist(arguments)) + +/// Waits at a line of code until X is true +#define UNTIL(X) while(!(X)) stoplag() diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index 931a0e394e8..21af95cab48 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -16,7 +16,6 @@ GLOBAL_LIST_INIT(prisoncomputer_list, list()) GLOBAL_LIST_INIT(celltimers_list, list()) // list of all cell timers GLOBAL_LIST_INIT(cell_logs, list()) GLOBAL_LIST_INIT(navigation_computers, list()) -GLOBAL_LIST_INIT(zombie_infection_list, list()) GLOBAL_LIST_INIT(all_areas, list()) GLOBAL_LIST_INIT(machines, list()) diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index 74591eb8070..c541e40768a 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -4,7 +4,7 @@ GLOBAL_DATUM(slmaster, /obj/effect/overlay) GLOBAL_VAR_INIT(CELLRATE, 0.002) // conversion ratio between a watt-tick and kilojoule GLOBAL_VAR_INIT(CHARGELEVEL, 0.001) // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second) -// Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it. +// Announcer intercom, because too much stuff creates an intercom for one message then qdel()s it. GLOBAL_DATUM_INIT(global_announcer, /obj/item/radio/intercom, create_global_announcer()) GLOBAL_DATUM_INIT(command_announcer, /obj/item/radio/intercom/command, create_command_announcer()) diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index 58e82733abe..b069ff31eb7 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -161,10 +161,13 @@ #define ui_bot_pull "EAST-2:26,SOUTH:7" //Ghosts -#define ui_ghost_jumptomob "SOUTH:6,CENTER-2:24" -#define ui_ghost_orbit "SOUTH:6,CENTER-1:24" -#define ui_ghost_reenter_corpse "SOUTH:6,CENTER:24" -#define ui_ghost_teleport "SOUTH:6,CENTER+1:24" +#define ui_ghost_jumptomob "SOUTH:6,CENTER-2" +#define ui_ghost_orbit "SOUTH:6,CENTER-1" +#define ui_ghost_reenter_corpse "SOUTH:6,CENTER" +#define ui_ghost_teleport "SOUTH:6,CENTER+1" +#define ui_ghost_respawn_list "SOUTH:6,CENTER+2" +#define ui_ghost_respawn_mob "SOUTH:6+1,CENTER+2" +#define ui_ghost_respawn_pai "SOUTH:6+2,CENTER+2" //HUD styles. Please ensure HUD_VERSIONS is the same as the maximum index. Index order defines how they are cycled in F12. #define HUD_STYLE_STANDARD 1 diff --git a/code/_onclick/hud/ghost.dm b/code/_onclick/hud/ghost.dm index 600c1105e8e..a291120fb85 100644 --- a/code/_onclick/hud/ghost.dm +++ b/code/_onclick/hud/ghost.dm @@ -40,6 +40,52 @@ var/mob/dead/observer/G = usr G.dead_tele() +/obj/screen/ghost/respawn_list + name = "Ghost spawns" + icon = 'icons/mob/screen_midnight.dmi' + icon_state = "template" + +/obj/screen/ghost/respawn_list/Initialize(mapload) + . = ..() + update_hidden_state() + +/obj/screen/ghost/respawn_list/Click() + var/client/C = hud.mymob.client + hud.inventory_shown = !hud.inventory_shown + if(hud.inventory_shown) + C.screen += hud.toggleable_inventory + else + C.screen -= hud.toggleable_inventory + update_hidden_state() + +/obj/screen/ghost/respawn_list/proc/update_hidden_state() + var/matrix/M = matrix(transform) + M.Turn(-90) + + overlays.Cut() + var/image/img = image('icons/mob/actions/actions.dmi', src, (hud && hud.inventory_shown) ? "hide" : "show") + img.transform = M + overlays += img + +/obj/screen/ghost/respawn_mob + name = "Mob spawners" + icon_state = "mob_spawner" + +/obj/screen/ghost/respawn_mob/Click() + var/mob/dead/observer/G = usr + G.open_spawners_menu() + +/obj/screen/ghost/respawn_pai + name = "Configure pAI" + icon_state = "pai" + +/obj/screen/ghost/respawn_pai/Click() + var/mob/dead/observer/G = usr + GLOB.paiController.recruitWindow(G) + +/datum/hud/ghost + inventory_shown = FALSE + /datum/hud/ghost/New(mob/owner) ..() var/obj/screen/using @@ -59,6 +105,22 @@ using = new /obj/screen/ghost/teleport() using.screen_loc = ui_ghost_teleport static_inventory += using + static_inventory += using + + using = new /obj/screen/ghost/respawn_list() + using.screen_loc = ui_ghost_respawn_list + static_inventory += using + + using = new /obj/screen/ghost/respawn_mob() + using.screen_loc = ui_ghost_respawn_mob + toggleable_inventory += using + + using = new /obj/screen/ghost/respawn_pai() + using.screen_loc = ui_ghost_respawn_pai + toggleable_inventory += using + + for(var/obj/screen/S in (static_inventory + toggleable_inventory)) + S.hud = src /datum/hud/ghost/show_hud() mymob.client.screen = list() diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index d348747fb80..9d4dacf33f2 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -36,7 +36,7 @@ var/vote_no_default = 0 // vote does not default to nochange/norestart (tbi) var/vote_no_dead = 0 // dead people can't vote (tbi) // var/enable_authentication = 0 // goon authentication - var/del_new_on_log = 1 // del's new players if they log before they spawn in + var/del_new_on_log = 1 // qdel's new players if they log before they spawn in var/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard var/traitor_scaling = 0 //if amount of traitors scales based on amount of players var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other @@ -265,6 +265,11 @@ src.votable_modes += "secret" /datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Config reload blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to reload configuration via advanced proc-call") + log_admin("[key_name(usr)] attempted to reload configuration via advanced proc-call") + return var/list/Lines = file2list(filename) for(var/t in Lines) @@ -808,6 +813,11 @@ log_config("Unknown setting in configuration: '[name]'") /datum/configuration/proc/loadsql(filename) // -- TLE + if(IsAdminAdvancedProcCall()) + to_chat(usr, "SQL configuration reload blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to reload SQL configuration via advanced proc-call") + log_admin("[key_name(usr)] attempted to reload SQL configuration via advanced proc-call") + return var/list/Lines = file2list(filename) for(var/t in Lines) if(!t) continue diff --git a/code/controllers/subsystem/machinery.dm b/code/controllers/subsystem/machinery.dm index 7e78e2b9df1..cebc6a5f768 100644 --- a/code/controllers/subsystem/machinery.dm +++ b/code/controllers/subsystem/machinery.dm @@ -42,7 +42,7 @@ SUBSYSTEM_DEF(machines) while(currentrun.len) var/obj/O = currentrun[currentrun.len] currentrun.len-- - if(O) + if(O && !QDELETED(O)) var/datum/powernet/newPN = new() // create a new powernet... propagate_network(O, newPN)//... and propagate it to the other side of the cable diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 475bdaccb3c..6f8dd85b79b 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -407,7 +407,7 @@ SUBSYSTEM_DEF(ticker) EquipCustomItems(player) if(captainless) for(var/mob/M in GLOB.player_list) - if(!istype(M,/mob/new_player)) + if(!isnewplayer(M)) to_chat(M, "Captainship not forced on anyone.") /datum/controller/subsystem/ticker/proc/send_tip_of_the_round() diff --git a/code/controllers/subsystem/tickets/mentor_tickets.dm b/code/controllers/subsystem/tickets/mentor_tickets.dm index d8bae77840c..76c7ed2dc28 100644 --- a/code/controllers/subsystem/tickets/mentor_tickets.dm +++ b/code/controllers/subsystem/tickets/mentor_tickets.dm @@ -1,8 +1,8 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets) /datum/controller/subsystem/tickets/mentor_tickets/New() - NEW_SS_GLOBAL(SSmentor_tickets); - PreInit(); + NEW_SS_GLOBAL(SSmentor_tickets) + PreInit() /datum/controller/subsystem/tickets/mentor_tickets name = "Mentor Tickets" @@ -15,7 +15,7 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets message_mentorTicket(msg) /datum/controller/subsystem/tickets/mentor_tickets/Initialize() - close_messages = list("- [ticket_name] Closed -", - "Please try to be as descriptive as possible in mentor helps. Mentors do not know the full situation you're in and need more information to give you a helpful response.", + close_messages = list("- [ticket_name] Closed -", + "Please try to be as descriptive as possible in mentor helps. Mentors do not know the full situation you're in and need more information to give you a helpful response.", "Your [ticket_name] has now been closed.") return ..() diff --git a/code/controllers/subsystem/tickets/tickets.dm b/code/controllers/subsystem/tickets/tickets.dm index 058569250ec..3aa0a8846c3 100644 --- a/code/controllers/subsystem/tickets/tickets.dm +++ b/code/controllers/subsystem/tickets/tickets.dm @@ -20,16 +20,16 @@ SUBSYSTEM_DEF(tickets) init_order = INIT_ORDER_TICKETS wait = 300 priority = FIRE_PRIORITY_TICKETS - + flags = SS_BACKGROUND - + var/list/allTickets = list() //make it here because someone might ahelp before the system has initialized var/ticketCounter = 1 /datum/controller/subsystem/tickets/Initialize() close_messages = list("- [ticket_name] Rejected! -", - "Please try to be calm, clear, and descriptive in admin helps, do not assume the staff member has seen any related events, and clearly state the names of anybody you are reporting. If you asked a question, please ensure it was clear what you were asking.", + "Please try to be calm, clear, and descriptive in admin helps, do not assume the staff member has seen any related events, and clearly state the names of anybody you are reporting. If you asked a question, please ensure it was clear what you were asking.", "Your [ticket_name] has now been closed.") return ..() @@ -112,7 +112,7 @@ SUBSYSTEM_DEF(tickets) message_staff("[usr.client] / ([usr]) resolved [ticket_name] number [N]") to_chat_safe(returnClient(N), "Your [ticket_name] has now been resolved.") return TRUE - + /datum/controller/subsystem/tickets/proc/autoRespond(N) if(!check_rights(R_ADMIN|R_MOD)) @@ -124,19 +124,19 @@ SUBSYSTEM_DEF(tickets) if(alert(usr, "[T.ticketState == TICKET_OPEN ? "Another admin appears to already be handling this." : "This ticket is already marked as closed or resolved"] Are you sure you want to continue?", "Confirmation", "Yes", "No") != "Yes") return T.assignStaff(C) - - var/response_phrases = list("Thanks" = "Thanks, have a Paradise day!", + + var/response_phrases = list("Thanks" = "Thanks, have a Paradise day!", "Handling It" = "The issue is being looked into, thanks.", "Already Resolved" = "The problem has been resolved already.", "Mentorhelp" = "Please redirect your question to Mentorhelp, as they are better experienced with these types of questions.", "Happens Again" = "Thanks, let us know if it continues to happen.", - "Clear Cache" = "To fix a blank screen, please leave the game and clear your Byond Cache. To clear your Byond Cache, there is a Settings icon in the top right of the launcher. After you click that, go into the Games tab and hit the Clear Cache button. If the issue persists a few minutes after rejoining and doing this, please adminhelp again and state you cleared your cache." , + "Clear Cache" = "To fix a blank screen, go to the 'Special Verbs' tab and press 'Reload UI Resources'. If that fails, clear your BYOND cache (instructions provided with 'Reload UI Resources'). If that still fails, please adminhelp again, stating you have already done the following." , "IC Issue" = "This is an In Character (IC) issue and will not be handled by admins. You could speak to Security, Internal Affairs, a Departmental Head, Nanotrasen Representetive, or any other relevant authority currently on station.", "Reject" = "Reject", "Man Up" = "Man Up", "Appeal on the Forums" = "Appealing a ban must occur on the forums. Privately messaging, or adminhelping about your ban will not resolve it. To appeal your ban, please head to [config.banappeals]" ) - + var/sorted_responses = list() for(var/key in response_phrases) //build a new list based on the short descriptive keys of the master list so we can send this as the input instead of the full paragraphs to the admin choosing which autoresponse sorted_responses += key @@ -351,7 +351,7 @@ UI STUFF dat += "[T.content[i]]" dat += "

" - dat += "Re-Open[check_rights(R_ADMIN|R_MOD, 0) ? "Auto": ""]Resolve

" + dat += "Re-Open[check_rights(R_ADMIN|R_MOD, 0) ? "Auto": ""]Resolve

" if(!T.staffAssigned) dat += "No staff member assigned to this [ticket_name] - Take Ticket
" @@ -447,7 +447,7 @@ UI STUFF return if(closeTicket(indexNum)) showDetailUI(usr, indexNum) - + if(href_list["detailreopen"]) var/indexNum = text2num(href_list["detailreopen"]) diff --git a/code/datums/components/ducttape.dm b/code/datums/components/ducttape.dm index 98512589a46..49931db8edc 100644 --- a/code/datums/components/ducttape.dm +++ b/code/datums/components/ducttape.dm @@ -37,10 +37,10 @@ I.anchored = initial(I.anchored) for(var/datum/action/item_action/remove_tape/RT in I.actions) RT.Remove(user) - RT.Destroy() + qdel(RT) I.overlays.Cut(tape_overlay) user.transfer_fingerprints_to(I) - Destroy() + qdel(src) /datum/component/ducttape/proc/afterattack(obj/item/I, atom/target, mob/user, proximity, params) if(!proximity) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index e8d0b881ccb..dc6101630bf 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -1,5 +1,14 @@ // reference: /client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0) +/** + * Proc to check if a datum allows proc calls on it + * + * Returns TRUE if you can call a proc on the datum, FALSE if you cant + * + */ +/datum/proc/CanProcCall(procname) + return TRUE + /datum/proc/can_vv_get(var_name) return TRUE @@ -1232,22 +1241,6 @@ log_admin("[key_name(usr)] has removed the organ [rem_organ] from [key_name(M)]") qdel(rem_organ) - else if(href_list["fix_nano"]) - if(!check_rights(R_DEBUG)) return - - var/mob/H = locateUID(href_list["fix_nano"]) - - if(!istype(H) || !H.client) - to_chat(usr, "This can only be done on mobs with clients") - return - - H.client.reload_nanoui_resources() - - to_chat(usr, "Resource files sent") - to_chat(H, "Your NanoUI Resource files have been refreshed") - - log_admin("[key_name(usr)] resent the NanoUI resource files to [key_name(H)]") - else if(href_list["regenerateicons"]) if(!check_rights(0)) return diff --git a/code/datums/helper_datums/construction_datum.dm b/code/datums/helper_datums/construction_datum.dm index c10ca5a488b..8eefe5efa0d 100644 --- a/code/datums/helper_datums/construction_datum.dm +++ b/code/datums/helper_datums/construction_datum.dm @@ -69,10 +69,10 @@ /datum/construction/proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one. for(var/i=1;i<=steps.len;i++) - var/list/L = steps[i]; + var/list/L = steps[i] if(do_tool_or_atom_check(used_atom, L["key"]) && custom_action(i, used_atom, user)) steps[i]=null;//stupid byond list from list removal... - listclearnulls(steps); + listclearnulls(steps) if(!steps.len) spawn_result(user) return 1 diff --git a/code/datums/mind.dm b/code/datums/mind.dm index dadc8bc6e31..cb1ee856b1c 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -89,6 +89,9 @@ if(antag_datum.delete_on_mind_deletion) qdel(i) antag_datums = null + current = null + original = null + soulOwner = null return ..() /datum/mind/proc/transfer_to(mob/living/new_character) @@ -544,11 +547,20 @@ if(objective&&(objective.type in objective_list) && objective:target) def_target = objective.target.current possible_targets = sortAtom(possible_targets) - possible_targets += "Free objective" - var/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets - if(!new_target) - return + var/new_target + if(length(possible_targets) > 0) + if(alert(usr, "Do you want to pick the objective yourself? No will randomise it", "Pick objective", "Yes", "No") == "Yes") + possible_targets += "Free objective" + new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets + else + new_target = pick(possible_targets) + + if(!new_target) + return + else + to_chat(usr, "No possible target found. Defaulting to a Free objective.") + new_target = "Free objective" var/objective_path = text2path("/datum/objective/[new_obj_type]") if(new_target == "Free objective") diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index a0c9a19e4b0..4814e27380b 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -188,15 +188,6 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) item = /obj/item/storage/box/syndie_kit/fake_revolver cost = 1 job = list("Clown") -/* -/datum/uplink_item/stealthy_weapons/romerol_kit - name = "Romerol" - reference = "ROM" - desc = "A highly experimental bioterror agent which creates dormant nodules to be etched into the grey matter of the brain. On death, these nodules take control of the dead body, causing limited revivification, along with slurred speech, aggression, and the ability to infect others with this agent." - item = /obj/item/storage/box/syndie_kit/romerol - cost = 25 - cant_discount = TRUE -*/ //mime /datum/uplink_item/jobspecific/caneshotgun name = "Cane Shotgun and Assassination Shells" @@ -247,6 +238,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 2 job = list("Chef") +/datum/uplink_item/jobspecific/Chef_CQC + name = " A chefs manual to CQC" + desc = "An old manual teaching you how to bring your home advantage outside the kitchen." + reference = "CCQC" + item = /obj/item/CQC_manual/chef + cost = 12 + job = list("Chef") + //Chaplain /datum/uplink_item/jobspecific/voodoo diff --git a/code/datums/wires/syndicatebomb.dm b/code/datums/wires/syndicatebomb.dm index b490d150efe..430b5ce88aa 100644 --- a/code/datums/wires/syndicatebomb.dm +++ b/code/datums/wires/syndicatebomb.dm @@ -96,7 +96,6 @@ if(BOMB_WIRE_ACTIVATE) if(!mended && B.active) holder.visible_message("[bicon(B)] The timer stops! The bomb has been defused!") - B.active = FALSE B.defused = TRUE B.update_icon() ..() diff --git a/code/defines/procs/dbcore.dm b/code/defines/procs/dbcore.dm index 76e5a1fd0a6..90a5b0db40c 100644 --- a/code/defines/procs/dbcore.dm +++ b/code/defines/procs/dbcore.dm @@ -72,12 +72,21 @@ DBConnection/proc/NewQuery(sql_query,cursor_handler=src.default_cursor) return n DBQuery/New(sql_query,DBConnection/connection_handler,cursor_handler) + if(IsAdminAdvancedProcCall()) + to_chat(usr, "DB query blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to create a DB query via advanced proc-call") + log_admin("[key_name(usr)] attempted to create a DB query via advanced proc-call") + return if(sql_query) src.sql = sql_query if(connection_handler) src.db_connection = connection_handler if(cursor_handler) src.default_cursor = cursor_handler _db_query = _dm_db_new_query() return ..() +DBQuery/CanProcCall() + // dont even try it + return FALSE + DBQuery var/sql // The sql query being executed. diff --git a/code/game/area/areas/depot-areas.dm b/code/game/area/areas/depot-areas.dm index 48760540c78..4a6606d836e 100644 --- a/code/game/area/areas/depot-areas.dm +++ b/code/game/area/areas/depot-areas.dm @@ -292,7 +292,7 @@ if(!reactor.has_overloaded) reactor.overload(containment_failure) else - log_debug("Depot: [src] called activate_self_destruct with no reactor."); + log_debug("Depot: [src] called activate_self_destruct with no reactor.") message_admins("Syndicate Depot lacks reactor to initiate self-destruct. Must be destroyed manually.") updateicon() diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index aed4a4c5c2d..ab5ff19462a 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -50,6 +50,7 @@ loc.handle_atom_del(src) for(var/atom/movable/AM in contents) qdel(AM) + LAZYCLEARLIST(client_mobs_in_contents) loc = null if(pulledby) pulledby.stop_pulling() diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index eae6edd3bd4..fb0ccff32cb 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -118,17 +118,15 @@ if(usr.incapacitated()) return - - eject_occupant() - + eject_occupant(usr) add_fingerprint(usr) /obj/machinery/dna_scannernew/Destroy() - eject_occupant() + eject_occupant(null, TRUE) return ..() -/obj/machinery/dna_scannernew/proc/eject_occupant() - go_out() +/obj/machinery/dna_scannernew/proc/eject_occupant(user, force) + go_out(user, force) for(var/obj/O in src) if(!istype(O,/obj/item/circuitboard/clonescanner) && \ !istype(O,/obj/item/stock_parts) && \ @@ -271,15 +269,15 @@ occupant.notify_ghost_cloning(source = src) -/obj/machinery/dna_scannernew/proc/go_out() +/obj/machinery/dna_scannernew/proc/go_out(mob/user, force) if(!occupant) - to_chat(usr, "The scanner is empty!") + if(user) + to_chat(user, "The scanner is empty!") return - - if(locked) - to_chat(usr, "The scanner is locked!") + if(locked && !force) + if(user) + to_chat(user, "The scanner is locked!") return - occupant.forceMove(loc) occupant = null icon_state = "scanner_open" @@ -489,7 +487,7 @@ occupantData["uniqueIdentity"] = connected.occupant.dna.uni_identity occupantData["structuralEnzymes"] = connected.occupant.dna.struc_enzymes occupantData["radiationLevel"] = connected.occupant.radiation - data["occupant"] = occupantData; + data["occupant"] = occupantData data["isBeakerLoaded"] = connected.beaker ? 1 : 0 data["beakerLabel"] = null @@ -751,7 +749,7 @@ return TRUE if(href_list["ejectOccupant"]) - connected.eject_occupant() + connected.eject_occupant(usr) return TRUE // Transfer Buffer Management diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index a11e5d922ba..641167c768c 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -46,7 +46,6 @@ GLOBAL_LIST_EMPTY(blob_nodes) var/datum/mind/blob = pick(possible_blobs) infected_crew += blob blob.special_role = SPECIAL_ROLE_BLOB - update_blob_icons_added(blob) blob.restricted_roles = restricted_jobs log_game("[key_name(blob)] has been selected as a Blob") possible_blobs -= blob @@ -152,6 +151,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) for(var/datum/mind/blob in infected_crew) greet_blob(blob) + update_blob_icons_added(blob) if(SSshuttle) SSshuttle.emergencyNoEscape = 1 diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm index d6062a02c5d..28afcaa9c36 100644 --- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm +++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm @@ -49,7 +49,7 @@ /obj/item/organ/internal/cyberimp/eyes/shield/ling/on_life() ..() var/obj/item/organ/internal/eyes/E = owner.get_int_organ(/obj/item/organ/internal/eyes) - if(owner.eye_blind || owner.eye_blurry || (BLINDNESS in owner.mutations) || (NEARSIGHTED in owner.mutations) || (E.damage > 0)) + if(owner.eye_blind || owner.eye_blurry || (BLINDNESS in owner.mutations) || (NEARSIGHTED in owner.mutations) || (E && E.damage > 0)) owner.reagents.add_reagent("oculine", 1) /obj/item/organ/internal/cyberimp/eyes/shield/ling/prepare_eat() diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index 27097d64913..8da5b4468d7 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm @@ -363,6 +363,10 @@ to_chat(S, "This cryopod control computer should be preserved, it contains useful items and information about the inhabitants. Aborting.") return FALSE +/obj/structure/spacepoddoor/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) + to_chat(S, "Disrupting this energy field would overload us. Aborting.") + return FALSE + /turf/simulated/wall/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) var/isonshuttle = istype(loc, /area/shuttle) for(var/turf/T in range(1, src)) diff --git a/code/game/gamemodes/miniantags/guardian/types/healer.dm b/code/game/gamemodes/miniantags/guardian/types/healer.dm index 75f5fddba53..c3f8046f0a9 100644 --- a/code/game/gamemodes/miniantags/guardian/types/healer.dm +++ b/code/game/gamemodes/miniantags/guardian/types/healer.dm @@ -65,7 +65,7 @@ if(loc == summoner) if(toggle) a_intent = INTENT_HARM - hud_used.action_intent.icon_state = a_intent; + hud_used.action_intent.icon_state = a_intent speed = 0 damage_transfer = 0.7 if(adminseal) @@ -76,7 +76,7 @@ toggle = FALSE else a_intent = INTENT_HELP - hud_used.action_intent.icon_state = a_intent; + hud_used.action_intent.icon_state = a_intent speed = 1 damage_transfer = 1 if(adminseal) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index c6f6218e969..0b46264cb33 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -67,7 +67,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) /datum/objective/assassinate/check_completion() if(target && target.current) - if(target.current.stat == DEAD || iszombie(target)) + if(target.current.stat == DEAD) return 1 if(issilicon(target.current) || isbrain(target.current)) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite return 1 @@ -111,7 +111,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) /datum/objective/maroon/check_completion() if(target && target.current) - if(target.current.stat == DEAD || iszombie(target)) + if(target.current.stat == DEAD) return 1 if(!target.current.ckey) return 1 @@ -168,7 +168,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) if(!target) //If it's a free objective. return 1 if(target.current) - if(target.current.stat == DEAD || iszombie(target)) + if(target.current.stat == DEAD) return 0 if(issilicon(target.current)) return 0 @@ -262,7 +262,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) return 0 if(isbrain(owner.current)) return 0 - if(!owner.current || owner.current.stat == DEAD || iszombie(owner)) + if(!owner.current || owner.current.stat == DEAD) return 0 if(SSticker.force_ending) //This one isn't their fault, so lets just assume good faith return 1 @@ -317,7 +317,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) explanation_text = "Die a glorious death." /datum/objective/die/check_completion() - if(!owner.current || owner.current.stat == DEAD || isbrain(owner.current) || iszombie(owner)) + if(!owner.current || owner.current.stat == DEAD || isbrain(owner.current)) return 1 if(issilicon(owner.current) && owner.current != owner.original) return 1 diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm index 182bcc78bd2..d9e59e9ded1 100644 --- a/code/game/gamemodes/scoreboard.dm +++ b/code/game/gamemodes/scoreboard.dm @@ -1,5 +1,21 @@ /datum/controller/subsystem/ticker/proc/scoreboard() + //Thresholds for Score Ratings + #define SINGULARITY_DESERVES_BETTER -3500 + #define SINGULARITY_FODDER -3000 + #define ALL_FIRED -2500 + #define WASTE_OF_OXYGEN -2000 + #define HEAP_OF_SCUM -1500 + #define LAB_MONKEYS -1000 + #define UNDESIREABLES -500 + #define SERVANTS_OF_SCIENCE 500 + #define GOOD_BUNCH 1000 + #define MACHINE_THIRTEEN 1500 + #define PROMOTIONS_FOR_EVERYONE 2000 + #define AMBASSADORS_OF_DISCOVERY 3000 + #define PRIDE_OF_SCIENCE 4000 + #define NANOTRANSEN_FINEST 5000 + //Print a list of antagonists to the server log var/list/total_antagonists = list() //Look into all mobs in world, dead or alive @@ -93,15 +109,14 @@ // Bonus Modifiers - //var/traitorwins = score_traitorswon var/deathpoints = GLOB.score_deadcrew * 25 //done var/researchpoints = GLOB.score_researchdone * 30 var/eventpoints = GLOB.score_eventsendured * 50 var/escapoints = GLOB.score_escapees * 25 //done - var/harvests = GLOB.score_stuffharvested * 5 //done + var/harvests = GLOB.score_stuffharvested * 5 var/shipping = GLOB.score_stuffshipped * 5 - var/mining = GLOB.score_oremined * 2 //done - var/meals = GLOB.score_meals * 5 //done, but this only counts cooked meals, not drinks served + var/mining = GLOB.score_oremined * 2 //done, might want polishing + var/meals = GLOB.score_meals * 5 var/power = GLOB.score_powerloss * 20 var/messpoints if(GLOB.score_mess != 0) @@ -121,13 +136,9 @@ GLOB.score_crewscore += 2500 GLOB.score_powerbonus = 1 - if(GLOB.score_mess == 0) - GLOB.score_crewscore += 3000 - GLOB.score_messbonus = 1 - GLOB.score_crewscore += meals - if(GLOB.score_allarrested) + if(GLOB.score_allarrested) // This only seems to be implemented for Rev and Nukies. -DaveKorhal GLOB.score_crewscore *= 3 // This needs to be here for the bonus to be applied properly @@ -177,26 +188,19 @@ dat += {" General Statistics
- The Good:
- - Useful Items Shipped: [GLOB.score_stuffshipped] ([GLOB.score_stuffshipped * 5] Points)
- Hydroponics Harvests: [GLOB.score_stuffharvested] ([GLOB.score_stuffharvested * 5] Points)
- Ore Mined: [GLOB.score_oremined] ([GLOB.score_oremined * 2] Points)
- Refreshments Prepared: [GLOB.score_meals] ([GLOB.score_meals * 5] Points)
- Research Completed: [GLOB.score_researchdone] ([GLOB.score_researchdone * 30] Points)
"} + The Good
+ Ore Mined: [GLOB.score_oremined] ([GLOB.score_oremined * 2] Points)
"} if(SSshuttle.emergency.mode == SHUTTLE_ENDGAME) dat += "Shuttle Escapees: [GLOB.score_escapees] ([GLOB.score_escapees * 25] Points)
" - dat += {"Random Events Endured: [GLOB.score_eventsendured] ([GLOB.score_eventsendured * 50] Points)
- Whole Station Powered: [GLOB.score_powerbonus ? "Yes" : "No"] ([GLOB.score_powerbonus * 2500] Points)
- Ultra-Clean Station: [GLOB.score_mess ? "No" : "Yes"] ([GLOB.score_messbonus * 3000] Points)

- The bad:
+ dat += {" + Whole Station Powered: [GLOB.score_powerbonus ? "Yes" : "No"] ([GLOB.score_powerbonus * 2500] Points)

+ The Bad
Dead bodies on Station: [GLOB.score_deadcrew] (-[GLOB.score_deadcrew * 25] Points)
Uncleaned Messes: [GLOB.score_mess] (-[GLOB.score_mess] Points)
Station Power Issues: [GLOB.score_powerloss] (-[GLOB.score_powerloss * 20] Points)
- Rampant Diseases: [GLOB.score_disease] (-[GLOB.score_disease * 30] Points)
AI Destroyed: [GLOB.score_deadaipenalty ? "Yes" : "No"] (-[GLOB.score_deadaipenalty * 250] Points)

- The Weird
+ The Weird
Food Eaten: [GLOB.score_foodeaten] bites/sips
Times a Clown was Abused: [GLOB.score_clownabuse]

"} @@ -218,22 +222,36 @@ var/score_rating = "The Aristocrats!" switch(GLOB.score_crewscore) - if(-99999 to -50000) score_rating = "Even the Singularity Deserves Better" - if(-49999 to -5000) score_rating = "Singularity Fodder" - if(-4999 to -1000) score_rating = "You're All Fired" - if(-999 to -500) score_rating = "A Waste of Perfectly Good Oxygen" - if(-499 to -250) score_rating = "A Wretched Heap of Scum and Incompetence" - if(-249 to -100) score_rating = "Outclassed by Lab Monkeys" - if(-99 to -21) score_rating = "The Undesirables" - if(-20 to 20) score_rating = "Ambivalently Average" - if(21 to 99) score_rating = "Not Bad, but Not Good" - if(100 to 249) score_rating = "Skillful Servants of Science" - if(250 to 499) score_rating = "Best of a Good Bunch" - if(500 to 999) score_rating = "Lean Mean Machine Thirteen" - if(1000 to 4999) score_rating = "Promotions for Everyone" - if(5000 to 9999) score_rating = "Ambassadors of Discovery" - if(10000 to 49999) score_rating = "The Pride of Science Itself" - if(50000 to INFINITY) score_rating = "Nanotrasen's Finest" + if(-99999 to SINGULARITY_DESERVES_BETTER) score_rating = "Even the Singularity Deserves Better" + if(SINGULARITY_DESERVES_BETTER+1 to SINGULARITY_FODDER) score_rating = "Singularity Fodder" + if(SINGULARITY_FODDER+1 to ALL_FIRED) score_rating = "You're All Fired" + if(ALL_FIRED+1 to WASTE_OF_OXYGEN) score_rating = "A Waste of Perfectly Good Oxygen" + if(WASTE_OF_OXYGEN+1 to HEAP_OF_SCUM) score_rating = "A Wretched Heap of Scum and Incompetence" + if(HEAP_OF_SCUM+1 to LAB_MONKEYS) score_rating = "Outclassed by Lab Monkeys" + if(LAB_MONKEYS+1 to UNDESIREABLES) score_rating = "The Undesirables" + if(UNDESIREABLES+1 to SERVANTS_OF_SCIENCE-1) score_rating = "Ambivalently Average" + if(SERVANTS_OF_SCIENCE to GOOD_BUNCH-1) score_rating = "Skillful Servants of Science" + if(GOOD_BUNCH to MACHINE_THIRTEEN-1) score_rating = "Best of a Good Bunch" + if(MACHINE_THIRTEEN to PROMOTIONS_FOR_EVERYONE-1) score_rating = "Lean Mean Machine Thirteen" + if(PROMOTIONS_FOR_EVERYONE to AMBASSADORS_OF_DISCOVERY-1) score_rating = "Promotions for Everyone" + if(AMBASSADORS_OF_DISCOVERY to PRIDE_OF_SCIENCE-1) score_rating = "Ambassadors of Discovery" + if(PRIDE_OF_SCIENCE to NANOTRANSEN_FINEST-1) score_rating = "The Pride of Science Itself" + if(NANOTRANSEN_FINEST to INFINITY) score_rating = "Nanotrasen's Finest" dat += "RATING: [score_rating]" src << browse(dat, "window=roundstats;size=500x600") + + #undef SINGULARITY_DESERVES_BETTER + #undef SINGULARITY_FODDER + #undef ALL_FIRED + #undef WASTE_OF_OXYGEN + #undef HEAP_OF_SCUM + #undef LAB_MONKEYS + #undef UNDESIREABLES + #undef SERVANTS_OF_SCIENCE + #undef GOOD_BUNCH + #undef MACHINE_THIRTEEN + #undef PROMOTIONS_FOR_EVERYONE + #undef AMBASSADORS_OF_DISCOVERY + #undef PRIDE_OF_SCIENCE + #undef NANOTRANSEN_FINEST diff --git a/code/game/jobs/job_scaling.dm b/code/game/jobs/job_scaling.dm index c062fe6c216..7c2a98b36df 100644 --- a/code/game/jobs/job_scaling.dm +++ b/code/game/jobs/job_scaling.dm @@ -4,8 +4,8 @@ var/highpop_trigger = 80 if(playercount >= highpop_trigger) - log_debug("Playercount: [playercount] versus trigger: [highpop_trigger] - loading highpop job config"); + log_debug("Playercount: [playercount] versus trigger: [highpop_trigger] - loading highpop job config") SSjobs.LoadJobs("config/jobs_highpop.txt") else - log_debug("Playercount: [playercount] versus trigger: [highpop_trigger] - keeping standard job config"); + log_debug("Playercount: [playercount] versus trigger: [highpop_trigger] - keeping standard job config") return 1 diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index ba139e50855..44b55ed1d2c 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -153,6 +153,9 @@ to_chat(user, "You screw the circuit board into place.") state = SCREWED_CORE if(GLASS_CORE) + var/area/R = get_area(src) + message_admins("[key_name_admin(usr)] has completed an AI core in [R]: [ADMIN_COORDJMP(loc)].") + log_game("[key_name(usr)] has completed an AI core in [R]: [COORD(loc)].") to_chat(user, "You connect the monitor.") if(!brain) var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes" diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 978ba25b8d3..8d6c545e0a8 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -52,7 +52,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) //This is used to keep track of opened positions for jobs to allow instant closing //Assoc array: "JobName" = (int) - var/list/opened_positions = list(); + var/list/opened_positions = list() /obj/machinery/computer/card/proc/is_centcom() return istype(src, /obj/machinery/computer/card/centcom) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 9a1fd08d289..e161891cdbc 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -424,8 +424,6 @@ else return menu_state -/proc/enable_prison_shuttle(var/mob/user); - /proc/call_shuttle_proc(var/mob/user, var/reason) if(GLOB.sent_strike_team == 1) to_chat(user, "Central Command will not allow the shuttle to be called. Consider all contracts terminated.") diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index ea0104e75bf..4213ff517bf 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -237,7 +237,7 @@ occupantData["toxLoss"] = occupant.getToxLoss() occupantData["fireLoss"] = occupant.getFireLoss() occupantData["bodyTemperature"] = occupant.bodytemperature - data["occupant"] = occupantData; + data["occupant"] = occupantData data["cellTemperature"] = round(air_contents.temperature) data["cellTemperatureStatus"] = "good" diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 1450278e736..e97c460de4b 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -192,10 +192,10 @@ About the new airlock wires panel: return wires.IsIndexCut(wireIndex) /obj/machinery/door/airlock/proc/canAIControl() - return ((aiControlDisabled!=1) && (!isAllPowerLoss())); + return ((aiControlDisabled!=1) && (!isAllPowerLoss())) /obj/machinery/door/airlock/proc/canAIHack() - return ((aiControlDisabled==1) && (!hackProof) && (!isAllPowerLoss())); + return ((aiControlDisabled==1) && (!hackProof) && (!isAllPowerLoss())) /obj/machinery/door/airlock/proc/arePowerSystemsOn() if(stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index fcd6de4020c..6d2586c46aa 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -195,7 +195,7 @@ GLOBAL_LIST_EMPTY(holopads) for(var/mob/living/silicon/ai/AI in GLOB.ai_list) if(!AI.client) continue - to_chat(AI, "Your presence is requested at \the [area].") + to_chat(AI, "Your presence is requested at \the [area].") else temp = "A request for AI presence was already sent recently.
" temp += "Main Menu" diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 81379df97c4..85799279ff4 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -59,7 +59,7 @@ GLOBAL_LIST_EMPTY(allRequestConsoles) var/announceAuth = 0 //Will be set to 1 when you authenticate yourself for announcements var/msgVerified = "" //Will contain the name of the person who varified it var/msgStamped = "" //If a message is stamped, this will contain the stamp name - var/message = ""; + var/message = "" var/recipient = ""; //the department which will be receiving the message var/priority = -1 ; //Priority of the message being sent light_range = 0 diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index d0cf38a272d..5952108b6a9 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -20,6 +20,12 @@ account = null ui_interact(user) +/obj/machinery/slot_machine/wrench_act(mob/user, obj/item/I) + . = TRUE + if(!I.tool_use_check(user, 0)) + return + default_unfasten_wrench(user, I) + /obj/machinery/slot_machine/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 2d15472f521..181d5e494da 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -77,11 +77,10 @@ update_icon() try_detonate(TRUE) //Counter terrorists win - else if(!active || defused) - if(defused && (payload in src)) + else if(defused) + active = FALSE + if(payload in src) payload.defuse() - countdown.stop() - STOP_PROCESSING(SSfastprocess, src) /obj/machinery/syndicatebomb/New() wires = new(src) diff --git a/code/game/machinery/tcomms/_base.dm b/code/game/machinery/tcomms/_base.dm index 7e468a548bf..dc933099faa 100644 --- a/code/game/machinery/tcomms/_base.dm +++ b/code/game/machinery/tcomms/_base.dm @@ -306,7 +306,7 @@ GLOBAL_LIST_EMPTY(tcomms_machines) if(is_admin(R) && !R.get_preference(CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios. continue - if(istype(R, /mob/new_player)) // we don't want new players to hear messages. rare but generates runtimes. + if(isnewplayer(R)) // we don't want new players to hear messages. rare but generates runtimes. continue // --- Can understand the speech --- diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 9907e903970..a55c2a731eb 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -1134,7 +1134,7 @@ would spawn and follow the beaker, even if it is carried or thrown. qdel(src) /obj/structure/foamedmetal/attack_alien(mob/living/carbon/alien/humanoid/M) - M.visible_message("[M] tears apart \the [src]!"); + M.visible_message("[M] tears apart \the [src]!") qdel(src) /obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 8b82341a06c..2d2b110fa06 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -48,7 +48,7 @@ if(..()) return if(!R.allow_rename) - to_chat(R, "Internal diagnostic error: incompatible upgrade module detected."); + to_chat(R, "Internal diagnostic error: incompatible upgrade module detected.") return 0 R.notify_ai(3, R.name, heldname) R.name = heldname @@ -196,7 +196,7 @@ if(R.emagged) return if(R.weapons_unlock) - to_chat(R, "Internal diagnostic error: incompatible upgrade module detected."); + to_chat(R, "Internal diagnostic error: incompatible upgrade module detected.") return R.emagged = 1 return TRUE diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 14ccc103ab1..ab592cc0402 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -204,7 +204,7 @@ if(amount < 1) // Just in case a stack's amount ends up fractional somehow var/oldsrc = src - src = null //dont kill proc after del() + src = null //dont kill proc after qdel() usr.unEquip(oldsrc, 1) qdel(oldsrc) if(istype(O, /obj/item)) diff --git a/code/game/objects/items/weapons/cigs.dm b/code/game/objects/items/weapons/cigs.dm index 98a7b769642..8c2c3e85917 100644 --- a/code/game/objects/items/weapons/cigs.dm +++ b/code/game/objects/items/weapons/cigs.dm @@ -31,6 +31,7 @@ LIGHTERS ARE IN LIGHTERS.DM var/smoketime = 150 var/chem_volume = 60 var/list/list_reagents = list("nicotine" = 40) + var/first_puff = TRUE // the first puff is a bit more reagents ingested sprite_sheets = list( "Vox" = 'icons/mob/species/vox/mask.dmi', "Unathi" = 'icons/mob/species/unathi/mask.dmi', @@ -194,8 +195,9 @@ LIGHTERS ARE IN LIGHTERS.DM if(reagents && reagents.total_volume) // check if it has any reagents at all if(is_being_smoked) // if it's being smoked, transfer reagents to the mob var/mob/living/carbon/C = loc - for (var/datum/reagent/R in reagents.reagent_list) - reagents.trans_id_to(C, R.id, max(REAGENTS_METABOLISM / reagents.reagent_list.len, 0.1)) //transfer at least .1 of each chem + for(var/datum/reagent/R in reagents.reagent_list) + reagents.trans_id_to(C, R.id, first_puff ? 1 : max(REAGENTS_METABOLISM / reagents.reagent_list.len, 0.1)) //transfer at least .1 of each chem + first_puff = FALSE if(!reagents.total_volume) // There were reagents, but now they're gone to_chat(C, "Your [name] loses its flavor.") else // else just remove some of the reagents @@ -377,6 +379,7 @@ LIGHTERS ARE IN LIGHTERS.DM to_chat(user, "You refill the pipe with tobacco.") reagents.add_reagent("nicotine", chem_volume) smoketime = initial(smoketime) + first_puff = TRUE /obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers)) diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index f965907c5ba..6cf011bc2c3 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -121,19 +121,6 @@ desc = "A sleek, sturdy box" icon_state = "box_of_doom" -/obj/item/storage/box/syndie_kit/romerol - name = "Romerol Kit" - desc = "A box containing a deadly virus capable of reanimating dead as zombies." - max_w_class = WEIGHT_CLASS_NORMAL - can_hold = list(/obj/item/reagent_containers/glass/bottle/romerol,/obj/item/reagent_containers/syringe,/obj/item/reagent_containers/dropper) - -/obj/item/storage/box/syndie_kit/romerol/New() - ..() - new /obj/item/reagent_containers/glass/bottle/romerol(src) - new /obj/item/reagent_containers/syringe(src) - new /obj/item/reagent_containers/dropper(src) - return - /obj/item/storage/box/syndie_kit/space name = "Boxed Space Suit and Helmet" can_hold = list(/obj/item/clothing/suit/space/syndicate/black/red, /obj/item/clothing/head/helmet/space/syndicate/black/red, /obj/item/tank/emergency_oxygen/syndi, /obj/item/clothing/mask/gas/syndicate) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 553cfda4d59..04373502832 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -230,7 +230,7 @@ add_fingerprint(user) /obj/structure/closet/attack_ai(mob/user) - if(isrobot(user) && Adjacent(user)) //Robots can open/close it, but not the AI + if(isrobot(user) && Adjacent(user) && !istype(user.loc, /obj/machinery/atmospherics)) //Robots can open/close it, but not the AI attack_hand(user) /obj/structure/closet/relaymove(mob/user) diff --git a/code/game/objects/structures/foodcart.dm b/code/game/objects/structures/foodcart.dm index 198dbf5f195..3a9a3414986 100644 --- a/code/game/objects/structures/foodcart.dm +++ b/code/game/objects/structures/foodcart.dm @@ -40,7 +40,7 @@ food_slots[s]=I update_icon() success = 1 - break; + break if(!success) to_chat(user, fail_msg) else if(istype(I, /obj/item/reagent_containers/food/drinks)) @@ -51,7 +51,7 @@ drink_slots[s]=I update_icon() success = 1 - break; + break if(!success) to_chat(user, fail_msg) else if(istype(I, /obj/item/wrench)) diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm index 2683e236269..95b11353b86 100644 --- a/code/game/verbs/who.dm +++ b/code/game/verbs/who.dm @@ -27,7 +27,7 @@ entry += " - Observing" else entry += " - DEAD" - else if(istype(C.mob, /mob/new_player)) + else if(isnewplayer(C.mob)) entry += " - New Player" else entry += " - DEAD" @@ -90,7 +90,7 @@ if(isobserver(C.mob)) msg += " - Observing" - else if(istype(C.mob,/mob/new_player)) + else if(isnewplayer(C.mob)) msg += " - Lobby" else msg += " - Playing" @@ -106,7 +106,7 @@ if(isobserver(C.mob)) modmsg += " - Observing" - else if(istype(C.mob,/mob/new_player)) + else if(isnewplayer(C.mob)) modmsg += " - Lobby" else modmsg += " - Playing" diff --git a/code/game/world.dm b/code/game/world.dm index daeab8fbe4c..355c6280aaf 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -232,7 +232,7 @@ GLOBAL_VAR_INIT(world_topic_spam_protect_time, world.timeofday) if(!C) return "No client with that name on server" - del(C) + qdel(C) return "Kick Successful" diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index 21b59586bfd..09df94dc06e 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -146,7 +146,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = if(kickbannedckey) if(banned_mob && banned_mob.client && banned_mob.client.ckey == banckey) - del(banned_mob.client) + qdel(banned_mob.client) if(isjobban) jobban_client_fullban(ckey, job) @@ -211,7 +211,7 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "") query.Execute() while(query.NextRow()) ban_id = query.item[1] - ban_number++; + ban_number++ if(ban_number == 0) to_chat(usr, "Database update failed due to no bans fitting the search criteria. If this is not a legacy ban you should contact the database admin.") @@ -314,7 +314,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) query.Execute() while(query.NextRow()) pckey = query.item[1] - ban_number++; + ban_number++ if(ban_number == 0) to_chat(usr, "Database update failed due to a ban id not being present in the database.") diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index df156c5b0df..1eed8083a97 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -72,7 +72,7 @@ GLOBAL_VAR_INIT(nologevent, 0) body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] " body += "\[" + M.client.get_exp_type(EXP_TYPE_CREW) + " as [EXP_TYPE_CREW]\]" - if(istype(M, /mob/new_player)) + if(isnewplayer(M)) body += " Hasn't Entered Game " else body += " \[Heal\] " @@ -147,7 +147,7 @@ GLOBAL_VAR_INIT(nologevent, 0) body += {" | Cryo "} if(M.client) - if(!istype(M, /mob/new_player)) + if(!isnewplayer(M)) body += "

" body += "Transformation:" body += "
" @@ -1004,13 +1004,13 @@ GLOBAL_VAR_INIT(gamma_ship_location, 1) // 0 = station , 1 = space /proc/kick_clients_in_lobby(message, kick_only_afk = 0) var/list/kicked_client_names = list() for(var/client/C in GLOB.clients) - if(istype(C.mob, /mob/new_player)) + if(isnewplayer(C.mob)) if(kick_only_afk && !C.is_afk()) //Ignore clients who are not afk continue if(message) to_chat(C, message) kicked_client_names.Add("[C.ckey]") - del(C) + qdel(C) return kicked_client_names //returns 1 to let the dragdrop code know we are trapping this event diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index 5956819d3d4..afb4b19eee2 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -61,6 +61,11 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons return 1 /proc/load_admins() + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Admin reload blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to reload admins via advanced proc-call") + log_admin("[key_name(usr)] attempted to reload admins via advanced proc-call") + return //clear the datums references GLOB.admin_datums.Cut() for(var/client/C in GLOB.admins) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 4e3d2d65f30..80a60957c75 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -337,7 +337,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( ghost.reenter_corpse() log_admin("[key_name(usr)] re-entered their body") feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - else if(istype(mob,/mob/new_player)) + else if(isnewplayer(mob)) to_chat(src, "Error: Aghost: Can't admin-ghost whilst in the lobby. Join or observe first.") else //ghostize @@ -542,7 +542,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban") log_admin("[key_name(src)] has warned [key_name(C)] resulting in a [AUTOBANTIME] minute ban") to_chat(C, "You have been autobanned due to a warning by [ckey].
This is a temporary ban, it will be removed in [AUTOBANTIME] minutes.") - del(C) + qdel(C) else message_admins("[key_name_admin(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban") log_admin("[key_name(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban") diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm index 740d182f3f2..470293bfe76 100644 --- a/code/modules/admin/holder2.dm +++ b/code/modules/admin/holder2.dm @@ -16,6 +16,11 @@ GLOBAL_PROTECT(admin_datums) // This is protected because we dont want people ma var/admincaster_signature //What you'll sign the newsfeeds as /datum/admins/New(initial_rank = "Temporary Admin", initial_rights = 0, ckey) + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Admin rank creation blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to create a new admin rank via advanced proc-call") + log_admin("[key_name(usr)] attempted to edit feedback a new admin rank via advanced proc-call") + return if(!ckey) error("Admin datum created without a ckey argument. Datum has been deleted") qdel(src) @@ -26,10 +31,20 @@ GLOBAL_PROTECT(admin_datums) // This is protected because we dont want people ma GLOB.admin_datums[ckey] = src /datum/admins/Destroy() + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Admin rank deletion blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to delete an admin rank via advanced proc-call") + log_admin("[key_name(usr)] attempted to delete an admin rank via advanced proc-call") + return ..() return QDEL_HINT_HARDDEL_NOW /datum/admins/proc/associate(client/C) + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Rank association blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to associate an admin rank to a new client via advanced proc-call") + log_admin("[key_name(usr)] attempted to associate an admin rank to a new client via advanced proc-call") + return if(istype(C)) owner = C owner.holder = src @@ -39,6 +54,11 @@ GLOBAL_PROTECT(admin_datums) // This is protected because we dont want people ma GLOB.admins |= C /datum/admins/proc/disassociate() + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Rank disassociation blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to disassociate an admin rank from a client via advanced proc-call") + log_admin("[key_name(usr)] attempted to disassociate an admin rank from a client via advanced proc-call") + return if(owner) GLOB.admins -= owner owner.remove_admin_verbs() @@ -88,6 +108,11 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself. return 0 /client/proc/deadmin() + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Deadmin blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to de-admin a client via advanced proc-call") + log_admin("[key_name(usr)] attempted to de-admin a client via advanced proc-call") + return GLOB.admin_datums -= ckey if(holder) holder.disassociate() diff --git a/code/modules/admin/permissionverbs/permissionedit.dm b/code/modules/admin/permissionverbs/permissionedit.dm index 795538c7c33..952630c798a 100644 --- a/code/modules/admin/permissionverbs/permissionedit.dm +++ b/code/modules/admin/permissionverbs/permissionedit.dm @@ -102,6 +102,11 @@ to_chat(usr, "Admin rank changed.") /datum/admins/proc/log_admin_permission_modification(var/adm_ckey, var/new_permission) + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Admin edit blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to edit admin ranks via advanced proc-call") + log_admin("[key_name(usr)] attempted to edit admin ranks via advanced proc-call") + return if(config.admin_legacy_system) return diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index efb5ac32f97..e89b829f421 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -268,7 +268,7 @@ else M_job = "Living" - else if(istype(M,/mob/new_player)) + else if(isnewplayer(M)) M_job = "New player" else if(isobserver(M)) @@ -356,7 +356,7 @@ dat += "[M.real_name]" else if(istype(M, /mob/living/silicon/pai)) dat += "pAI" - else if(istype(M, /mob/new_player)) + else if(isnewplayer(M)) dat += "New Player" else if(isobserver(M)) dat += "Ghost" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 1a040d46e90..50fa99778e7 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -909,7 +909,7 @@ log_admin("[key_name(usr)] booted [key_name(M)].") message_admins("[key_name_admin(usr)] booted [key_name_admin(M)].", 1) //M.client = null - del(M.client) + qdel(M.client) //Player Notes else if(href_list["addnote"]) @@ -1011,8 +1011,7 @@ log_admin("[key_name(usr)] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.") message_admins("[key_name_admin(usr)] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.") - del(M.client) - //qdel(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends. + qdel(M.client) if("No") var/reason = input(usr,"Please state the reason","Reason") as message|null if(!reason) @@ -1032,8 +1031,7 @@ feedback_inc("ban_perma",1) DB_ban_record(BANTYPE_PERMA, M, -1, reason) - del(M.client) - //qdel(M) + qdel(M.client) if("Cancel") return @@ -1507,7 +1505,7 @@ if(!check_rights(R_SPAWN)) return var/mob/M = locateUID(href_list["makeanimal"]) - if(istype(M, /mob/new_player)) + if(isnewplayer(M)) to_chat(usr, "This cannot be used on instances of type /mob/new_player") return if(alert(usr, "Confirm make animal?",, "Yes", "No") != "Yes") @@ -3477,9 +3475,9 @@ hunter_mind.objectives += protect_objective SSticker.mode.traitors |= hunter_mob.mind to_chat(hunter_mob, "ATTENTION: You are now on a mission!") - to_chat(hunter_mob, "Goal: [killthem ? "MURDER" : "PROTECT"] [H.real_name], currently in [get_area(H.loc)]. "); + to_chat(hunter_mob, "Goal: [killthem ? "MURDER" : "PROTECT"] [H.real_name], currently in [get_area(H.loc)]. ") if(killthem) - to_chat(hunter_mob, "If you kill [H.p_them()], [H.p_they()] cannot be revived."); + to_chat(hunter_mob, "If you kill [H.p_them()], [H.p_they()] cannot be revived.") hunter_mob.mind.special_role = SPECIAL_ROLE_TRAITOR var/datum/atom_hud/antag/tatorhud = GLOB.huds[ANTAG_HUD_TRAITOR] tatorhud.join_hud(hunter_mob) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index 018b45422c5..c4eabef3eae 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -444,9 +444,9 @@ if(object == world) // Global proc. procname = "/proc/[procname]" - return call(procname)(arglist(new_args)) + return (WrapAdminProcCall(GLOBAL_PROC, procname, new_args)) - return call(object, procname)(arglist(new_args)) + return (WrapAdminProcCall(object, procname, new_args)) /proc/SDQL2_tokenize(query_text) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 8ac9c4fd2b0..f74b8c9d030 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -165,7 +165,7 @@ GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown","the","a","an","of","mo var/admin_number_ignored = 0 //Holds the number of admins without +BAN (so admins who are not really admins) var/admin_number_decrease = 0 //Holds the number of admins with are afk, ignored or both for(var/client/X in GLOB.admins) - admin_number_total++; + admin_number_total++ var/invalid = 0 if(requiredflags != 0 && !check_rights_for(X, requiredflags)) admin_number_ignored++ diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 164d499e04a..dba9a5c26aa 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -19,7 +19,7 @@ var/list/client/targets[0] for(var/client/T) if(T.mob) - if(istype(T.mob, /mob/new_player)) + if(isnewplayer(T.mob)) targets["(New Player) - [T]"] = T else if(istype(T.mob, /mob/dead/observer)) targets["[T.mob.name](Ghost) - [T]"] = T @@ -42,7 +42,7 @@ var/list/client/targets[0] for(var/client/T) if(T.mob) - if(istype(T.mob, /mob/new_player)) + if(isnewplayer(T.mob)) targets["[T] - (New Player)"] = T else if(istype(T.mob, /mob/dead/observer)) targets["[T] - [T.mob.name](Ghost)"] = T diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 329efb8e067..424e3c91f57 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -85,18 +85,80 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that return message_admins("[key_name_admin(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].") log_admin("[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].") - returnval = call(target,procname)(arglist(lst)) // Pass the lst as an argument list to the proc + returnval = WrapAdminProcCall(target, procname, lst) // Pass the lst as an argument list to the proc else //this currently has no hascall protection. wasn't able to get it working. message_admins("[key_name_admin(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]") log_admin("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]") - returnval = call(procname)(arglist(lst)) // Pass the lst as an argument list to the proc + returnval = WrapAdminProcCall(GLOBAL_PROC, procname, lst) // Pass the lst as an argument list to the proc to_chat(usr, "[procname] returned: [!isnull(returnval) ? returnval : "null"]") feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +// All these vars are related to proc call protection +// If you add more of these, for the love of fuck, protect them + +/// Who is currently calling procs GLOBAL_VAR(AdminProcCaller) GLOBAL_PROTECT(AdminProcCaller) +/// How many procs have been called +GLOBAL_VAR_INIT(AdminProcCallCount, 0) +GLOBAL_PROTECT(AdminProcCallCount) +/// UID of the admin who last called +GLOBAL_VAR(LastAdminCalledTargetUID) +GLOBAL_PROTECT(LastAdminCalledTargetUID) +/// Last target to have a proc called on it +GLOBAL_VAR(LastAdminCalledTarget) +GLOBAL_PROTECT(LastAdminCalledTarget) +/// Last proc called +GLOBAL_VAR(LastAdminCalledProc) +GLOBAL_PROTECT(LastAdminCalledProc) +/// List to handle proc call spam prevention +GLOBAL_LIST_EMPTY(AdminProcCallSpamPrevention) +GLOBAL_PROTECT(AdminProcCallSpamPrevention) + + +// Wrapper for proccalls where the datum is flagged as vareditted +/proc/WrapAdminProcCall(datum/target, procname, list/arguments) + if(target && procname == "Del") + to_chat(usr, "Calling Del() is not allowed") + return + + if(target != GLOBAL_PROC && !target.CanProcCall(procname)) + to_chat(usr, "Proccall on [target.type]/proc/[procname] is disallowed!") + return + var/current_caller = GLOB.AdminProcCaller + var/ckey = usr ? usr.client.ckey : GLOB.AdminProcCaller + if(!ckey) + CRASH("WrapAdminProcCall with no ckey: [target] [procname] [english_list(arguments)]") + if(current_caller && current_caller != ckey) + if(!GLOB.AdminProcCallSpamPrevention[ckey]) + to_chat(usr, "Another set of admin called procs are still running, your proc will be run after theirs finish.") + GLOB.AdminProcCallSpamPrevention[ckey] = TRUE + UNTIL(!GLOB.AdminProcCaller) + to_chat(usr, "Running your proc") + GLOB.AdminProcCallSpamPrevention -= ckey + else + UNTIL(!GLOB.AdminProcCaller) + GLOB.LastAdminCalledProc = procname + if(target != GLOBAL_PROC) + GLOB.LastAdminCalledTargetUID = target.UID() + GLOB.AdminProcCaller = ckey //if this runtimes, too bad for you + ++GLOB.AdminProcCallCount + . = world.WrapAdminProcCall(target, procname, arguments) + if(--GLOB.AdminProcCallCount == 0) + GLOB.AdminProcCaller = null + +//adv proc call this, ya nerds +/world/proc/WrapAdminProcCall(datum/target, procname, list/arguments) + if(target == GLOBAL_PROC) + return call(procname)(arglist(arguments)) + else if(target != world) + return call(target, procname)(arglist(arguments)) + else + to_chat(usr, "Call to world/proc/[procname] blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to call world/proc/[procname] with arguments: [english_list(arguments)]") + log_admin("[key_name(usr)] attempted to call world/proc/[procname] with arguments: [english_list(arguments)]l") /proc/IsAdminAdvancedProcCall() #ifdef TESTING @@ -131,7 +193,7 @@ GLOBAL_PROTECT(AdminProcCaller) log_admin("[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]") spawn() - var/returnval = call(A,procname)(arglist(lst)) // Pass the lst as an argument list to the proc + var/returnval = WrapAdminProcCall(A, procname, lst) // Pass the lst as an argument list to the proc to_chat(src, "[procname] returned: [!isnull(returnval) ? returnval : "null"]") feedback_add_details("admin_verb","DPC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -251,7 +313,7 @@ GLOBAL_PROTECT(AdminProcCaller) alert("That mob doesn't seem to exist, close the panel and try again.") return - if(istype(M, /mob/new_player)) + if(isnewplayer(M)) alert("The mob must not be a new_player.") return @@ -382,7 +444,7 @@ GLOBAL_PROTECT(AdminProcCaller) if(!check_rights(R_DEBUG)) return - //This gets a confirmation check because it's way easier to accidentally hit this and delete things than it is with del-all + //This gets a confirmation check because it's way easier to accidentally hit this and delete things than it is with qdel-all var/confirm = alert("This will delete ALL Singularities and Tesla orbs except for any that are on away mission z-levels or the centcomm z-level. Are you sure you want to delete them?", "Confirm Panic Button", "Yes", "No") if(confirm != "Yes") return @@ -428,7 +490,7 @@ GLOBAL_PROTECT(AdminProcCaller) id.icon_state = "gold" id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access() else - var/obj/item/card/id/id = new/obj/item/card/id(M); + var/obj/item/card/id/id = new/obj/item/card/id(M) id.icon_state = "gold" id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access() id.registered_name = H.real_name @@ -816,21 +878,6 @@ GLOBAL_PROTECT(AdminProcCaller) else alert("Invalid mob") -/client/proc/reload_nanoui_resources() - set category = "Debug" - set name = "Reload NanoUI Resources" - set desc = "Force the client to redownload NanoUI Resources" - - // Close open NanoUIs. - SSnanoui.close_user_uis(usr) - - // Re-load the assets. - var/datum/asset/assets = get_asset_datum(/datum/asset/nanoui) - assets.register() - - // Clear the user's cache so they get resent. - usr.client.cache = list() - /client/proc/view_runtimes() set category = "Debug" set name = "View Runtimes" diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 6ec103cccc9..ed01bc822a7 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -53,7 +53,7 @@ GLOBAL_LIST_EMPTY(sounds_cache) set name = "Play Server Sound" if(!check_rights(R_SOUNDS)) return - var/list/sounds = file2list("sound/serversound_list.txt"); + var/list/sounds = file2list("sound/serversound_list.txt") sounds += GLOB.sounds_cache var/melody = input("Select a sound from the server to play", "Server sound list") as null|anything in sounds @@ -71,7 +71,7 @@ GLOBAL_LIST_EMPTY(sounds_cache) var/A = alert("This will play a sound at every intercomm, are you sure you want to continue? This works best with short sounds, beware.","Warning","Yep","Nope") if(A != "Yep") return - var/list/sounds = file2list("sound/serversound_list.txt"); + var/list/sounds = file2list("sound/serversound_list.txt") sounds += GLOB.sounds_cache var/melody = input("Select a sound from the server to play", "Server sound list") as null|anything in sounds diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index a7763f31fb1..03315243602 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -627,7 +627,7 @@ Traitors and the like can also be revived with the previous role mostly intact. print_command_report(input, "[command_name()] Update") if("No") //same thing as the blob stuff - it's not public, so it's classified, dammit - GLOB.command_announcer.autosay("A classified message has been printed out at all communication consoles."); + GLOB.command_announcer.autosay("A classified message has been printed out at all communication consoles.") print_command_report(input, "Classified [command_name()] Update") else return diff --git a/code/modules/admin/verbs/toggledebugverbs.dm b/code/modules/admin/verbs/toggledebugverbs.dm index 3a64af2aab6..38b49869298 100644 --- a/code/modules/admin/verbs/toggledebugverbs.dm +++ b/code/modules/admin/verbs/toggledebugverbs.dm @@ -17,7 +17,6 @@ GLOBAL_LIST_INIT(admin_verbs_show_debug_verbs, list( /client/proc/print_jobban_old, /client/proc/print_jobban_old_filter, /client/proc/forceEvent, - /client/proc/reload_nanoui_resources, /client/proc/admin_redo_space_transitions, /client/proc/make_turf_space_map, /client/proc/vv_by_ref diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index 3cd6458afdf..72537f8ccc3 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -59,10 +59,6 @@ var/karma = 0 var/karma_spent = 0 var/karma_tab = 0 - ///////////////////////////////////////////// - // /vg/: MEDIAAAAAAAA - // Set on login. - var/datum/media_manager/media = null var/topic_debugging = 0 //if set to true, allows client to see nanoUI errors -- yes i realize this is messy but it'll make live testing infinitely easier @@ -85,10 +81,10 @@ // If set to true, this client can interact with atoms such as buttons and doors on top of regular machinery interaction var/advanced_admin_interaction = FALSE - // Has the client been varedited by an admin? [Inherits from datum now] - // var/var_edited = FALSE - var/client_keysend_amount = 0 var/next_keysend_reset = 0 var/next_keysend_trip_reset = 0 var/keysend_tripped = FALSE + + // Last world.time that the player tried to request their resources. + var/last_ui_resource_send = 0 diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 561b0b48149..ae503be111b 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -432,7 +432,13 @@ ////////////// //DISCONNECT// ////////////// + /client/Del() + if(!gc_destroyed) + Destroy() //Clean up signals and timers. + return ..() + +/client/Destroy() if(holder) holder.owner = null GLOB.admins -= src @@ -442,7 +448,8 @@ movingmob.client_mobs_in_contents -= mob UNSETEMPTY(movingmob.client_mobs_in_contents) Master.UpdateTickRate() - return ..() + ..() //Even though we're going to be hard deleted there are still some things that want to know the destroy is happening + return QDEL_HINT_HARDDEL_NOW /client/proc/donator_check() @@ -556,7 +563,7 @@ if(GLOB.panic_bunker_enabled) var/threshold = config.panic_bunker_threshold src << "Server is not accepting connections from never-before-seen players until player count is less than [threshold]. Please try again later." - del(src) + qdel(src) return // Dont insert or they can just go in again var/DBQuery/query_insert = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]')") @@ -906,3 +913,35 @@ return TRUE #undef SSD_WARNING_TIMER + +/client/verb/resend_ui_resources() + set name = "Reload UI Resources" + set desc = "Reload your UI assets if they are not working" + set category = "Special Verbs" + + if(last_ui_resource_send > world.time) + to_chat(usr, "You requested your UI resource files too quickly. Please try again in [(last_ui_resource_send - world.time)/10] seconds.") + return + + var/choice = alert(usr, "This will reload your NanoUI and TGUI resources. If you have any open UIs this may break them. Are you sure?", "Resource Reloading", "Yes", "No") + if(choice == "Yes") + // 600 deciseconds = 1 minute + last_ui_resource_send = world.time + 60 SECONDS + + // Close their open UIs + SSnanoui.close_user_uis(usr) + SStgui.close_user_uis(usr) + + // Resend the resources + var/datum/asset/nano_assets = get_asset_datum(/datum/asset/nanoui) + nano_assets.register() + + var/datum/asset/tgui_assets = get_asset_datum(/datum/asset/simple/tgui) + tgui_assets.register() + + // Clear the user's cache so they get resent. + // This is not fully clearing their BYOND cache, just their assets sent from the server this round + cache = list() + + to_chat(usr, "UI resource files resent successfully. If you are still having issues, please try manually clearing your BYOND cache. This can be achieved by opening your BYOND launcher, pressing the cog in the top right, selecting preferences, going to the Games tab, and pressing 'Clear Cache'.") + diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm index d34584ff425..7ac87e5d5bc 100644 --- a/code/modules/clothing/head/soft_caps.dm +++ b/code/modules/clothing/head/soft_caps.dm @@ -113,7 +113,7 @@ /obj/item/clothing/head/soft/sec/corp name = "corporate security cap" - desc = "It's baseball hat in corpotate colours." + desc = "It's a baseball hat in corporate colours." icon_state = "corpsoft" item_color = "corp" diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 63fd1fa26b5..76bcd87921d 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -330,7 +330,7 @@ item_color = "lawyerbadge" var/cached_bubble_icon = null -/obj/item/clothing/accessory/attack_self(mob/user) +/obj/item/clothing/accessory/lawyers_badge/attack_self(mob/user) if(prob(1)) user.say("The testimony contradicts the evidence!") user.visible_message("[user] shows [user.p_their()] attorney's badge.", "You show your attorney's badge.") diff --git a/code/modules/events/dust.dm b/code/modules/events/dust.dm index 563ef98697d..a11ef107a8f 100644 --- a/code/modules/events/dust.dm +++ b/code/modules/events/dust.dm @@ -16,7 +16,7 @@ density = 1 anchored = 1 var/strength = 2 //ex_act severity number - var/life = 2 //how many things we hit before del(src) + var/life = 2 //how many things we hit before qdel(src) var/atom/goal = null /obj/effect/space_dust/weak diff --git a/code/modules/events/money_hacker.dm b/code/modules/events/money_hacker.dm index f26c12f5f7d..ba50cbbfd8f 100644 --- a/code/modules/events/money_hacker.dm +++ b/code/modules/events/money_hacker.dm @@ -38,7 +38,7 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0) if(!isnull(affected_account) && !affected_account.suspended) message = "The hack attempt has succeeded." - var/lost = affected_account.money * (MINIMUM_PERCENTAGE_LOSS + rand(0,VARIABLE_LOSS) / 10); + var/lost = affected_account.money * (MINIMUM_PERCENTAGE_LOSS + rand(0,VARIABLE_LOSS) / 10) affected_account.phantom_charge(lost) diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index d6395bf3d43..4515a62d86b 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -115,7 +115,7 @@ //The reagents in the bottle splash all over the target, thanks for the idea Nodrak SplashReagents(target) - //Finally, smash the bottle. This kills (del) the bottle. + //Finally, smash the bottle. This kills (qdel) the bottle. smash(target, user) /obj/item/reagent_containers/food/drinks/bottle/proc/SplashReagents(mob/M) diff --git a/code/modules/food_and_drinks/food/foods/desserts.dm b/code/modules/food_and_drinks/food/foods/desserts.dm index 9e8ded0bd1b..67034e164ce 100644 --- a/code/modules/food_and_drinks/food/foods/desserts.dm +++ b/code/modules/food_and_drinks/food/foods/desserts.dm @@ -17,10 +17,10 @@ update_icon() /obj/item/reagent_containers/food/snacks/icecream/update_icon() - overlays.Cut() - var/image/filling = image('icons/obj/kitchen.dmi', src, "icecream_color") - filling.icon += mix_color_from_reagents(reagents.reagent_list) - overlays += filling + cut_overlays() + var/mutable_appearance/filling = mutable_appearance('icons/obj/kitchen.dmi', "icecream_color") + filling.color = mix_color_from_reagents(reagents.reagent_list) + add_overlay(filling) /obj/item/reagent_containers/food/snacks/icecream/icecreamcone name = "ice cream cone" diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm index 69eda1e4269..0e9ecbaa7e4 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm @@ -43,10 +43,9 @@ return if(istype(I, /obj/item/reagent_containers/food/snacks/icecream)) if(!I.reagents.has_reagent("sprinkles")) - if(I.reagents.total_volume > 29) I.reagents.remove_any(1) - I.reagents.add_reagent("sprinkles",1) - var/image/sprinkles = image('icons/obj/kitchen.dmi', src, "sprinkles") - I.overlays += sprinkles + if(I.reagents.total_volume > 29) + I.reagents.remove_any(1) + I.reagents.add_reagent("sprinkles", 1) I.name += " with sprinkles" I.desc += ". This also has sprinkles." else diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm deleted file mode 100644 index c1602a14251..00000000000 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm +++ /dev/null @@ -1,256 +0,0 @@ -#define ICECREAM_VANILLA 1 -#define FLAVOUR_CHOCOLATE 2 -#define FLAVOUR_STRAWBERRY 3 -#define FLAVOUR_BLUE 4 -#define CONE_WAFFLE 5 -#define CONE_CHOC 6 -#define INGR_MILK 7 -#define INGR_FLOUR 8 -#define INGR_SUGAR 9 -#define INGR_ICE 10 -#define MUCK 11 - -GLOBAL_LIST_INIT(ingredients_source, list( -"berryjuice" = FLAVOUR_STRAWBERRY,\ -"cocoa" = FLAVOUR_CHOCOLATE,\ -"singulo" = FLAVOUR_BLUE,\ -"milk" = INGR_MILK,\ -"soymilk" = INGR_MILK,\ -"ice" = INGR_ICE,\ -"flour" = INGR_FLOUR,\ -"sugar" = INGR_SUGAR,\ -)) - -/proc/get_icecream_flavour_string(var/flavour_type) - switch(flavour_type) - if(FLAVOUR_CHOCOLATE) - return "chocolate" - if(FLAVOUR_STRAWBERRY) - return "strawberry" - if(FLAVOUR_BLUE) - return "blue" - if(CONE_WAFFLE) - return "waffle" - if(CONE_CHOC) - return "chocolate" - if(INGR_MILK) - return "milk" - if(INGR_FLOUR) - return "flour" - if(INGR_SUGAR) - return "sugar" - if(INGR_ICE) - return "ice" - if(MUCK) - return "muck" - else - return "vanilla" - -/obj/machinery/icecream_vat - name = "icecream vat" - desc = "Ding-aling ding dong. Get your Nanotrasen-approved ice cream!" - icon = 'icons/obj/kitchen.dmi' - icon_state = "icecream_vat" - density = 1 - anchored = 0 - max_integrity = 300 - var/list/ingredients = list() - var/dispense_flavour = 1 - var/obj/item/reagent_containers/glass/held_container - -/obj/machinery/icecream_vat/New() - ..() - create_reagents(50) - while(ingredients.len < 11) - ingredients.Add(5) - -/obj/machinery/icecream_vat/attack_hand(mob/user) - user.set_machine(src) - interact(user) - -/obj/machinery/icecream_vat/interact(mob/user) - var/dat - dat += "Dispense vanilla icecream There is [ingredients[ICECREAM_VANILLA]] scoops of vanilla icecream left (made from milk and ice).
" - dat += "Dispense strawberry icecream There is [ingredients[FLAVOUR_STRAWBERRY]] dollops of strawberry flavouring left (obtained from berry juice.
" - dat += "Dispense chocolate icecream There is [ingredients[FLAVOUR_CHOCOLATE]] dollops of chocolate flavouring left (obtained from cocoa powder).
" - dat += "Dispense blue icecream There is [ingredients[FLAVOUR_BLUE]] dollops of blue flavouring left (obtained from bluespace tomato singulo).
" - dat += "
" - dat += "Dispense waffle cones There are [ingredients[CONE_WAFFLE]] waffle cones left.
" - dat += "Dispense chocolate cones There are [ingredients[CONE_CHOC]] chocolate cones left.
" - dat += "
" - dat += "Make waffle cones There is [ingredients[INGR_FLOUR]]/[ingredients[INGR_SUGAR]] of flour and sugar left.
" - dat += "Make chocolate cones There is [ingredients[FLAVOUR_CHOCOLATE]]/[ingredients[CONE_WAFFLE]] of chocolate flavouring and waffle cones left.
" - dat += "Make vanilla icecream There is [ingredients[INGR_MILK]]/[ingredients[INGR_ICE]] of milk and ice left.
" - dat += "
" - if(held_container) - dat += "Eject [held_container] " - else - dat += "No beaker inserted. " - dat += "Refresh Close" - - var/datum/browser/popup = new(user, "icecreamvat", name, 600, 400) - popup.set_content(dat) - popup.open(0) - -/obj/machinery/icecream_vat/attackby(obj/item/O, mob/user, params) - if(istype(O, /obj/item/reagent_containers)) - if(istype(O, /obj/item/reagent_containers/food/snacks/icecream)) - var/obj/item/reagent_containers/food/snacks/icecream/I = O - if(!I.ice_creamed) - if(ingredients[ICECREAM_VANILLA] > 0) - var/flavour_name = get_icecream_flavour_string(dispense_flavour) - if(dispense_flavour < 11 && ingredients[dispense_flavour] > 0) - visible_message("[bicon(src)] [user] scoops delicious [flavour_name] flavoured icecream into [I].") - ingredients[dispense_flavour] -= 1 - ingredients[ICECREAM_VANILLA] -= 1 - - I.add_ice_cream(dispense_flavour) - if(held_container) - held_container.reagents.trans_to(I, 10) - if(I.reagents.total_volume < 10) - I.reagents.add_reagent("sugar", 10 - I.reagents.total_volume) - else - to_chat(user, "There is not enough [flavour_name] flavouring left! Insert more of the required ingredients.") - else - to_chat(user, "There is not enough icecream left! Insert more milk and ice.") - else - to_chat(user, "[O] already has icecream in it.") - else if(istype(O, /obj/item/reagent_containers/glass)) - if(held_container) - to_chat(user, "You must remove [held_container] from [src] first.") - else - if(!user.drop_item()) - to_chat(user, "\The [O] is stuck to your hand!") - return - O.forceMove(src) - to_chat(user, "You insert [O] into [src].") - held_container = O - else - var/obj/item/reagent_containers/R = O - if(R.reagents) - visible_message("[user] has emptied all of [R] into [src].") - for(var/datum/reagent/current_reagent in R.reagents.reagent_list) - if(GLOB.ingredients_source[current_reagent.id]) - add(GLOB.ingredients_source[current_reagent.id], current_reagent.volume / 2) - else - add(MUCK, current_reagent.volume / 5) - R.reagents.clear_reagents() - return 1 - else - return ..() - -/obj/machinery/icecream_vat/proc/add(var/add_type, var/amount) - if(add_type <= ingredients.len) - ingredients[add_type] += amount - updateDialog() - -/obj/machinery/icecream_vat/proc/make(var/mob/user, var/make_type) - switch(make_type) - if(CONE_WAFFLE) - if(ingredients[INGR_FLOUR] > 0 && ingredients[INGR_SUGAR] > 0) - var/amount = max( min(ingredients[INGR_FLOUR], ingredients[INGR_SUGAR]), 5) - ingredients[INGR_FLOUR] -= amount - ingredients[INGR_SUGAR] -= amount - ingredients[CONE_WAFFLE] += amount - visible_message("[user] cooks up some waffle cones.") - else - to_chat(user, "You require sugar and flour to make waffle cones.") - if(CONE_CHOC) - if(ingredients[FLAVOUR_CHOCOLATE] > 0 && ingredients[CONE_WAFFLE] > 0) - var/amount = min(ingredients[CONE_WAFFLE], ingredients[FLAVOUR_CHOCOLATE]) - ingredients[CONE_WAFFLE] -= amount - ingredients[FLAVOUR_CHOCOLATE] -= amount - ingredients[CONE_CHOC] += amount - visible_message("[user] cooks up some chocolate cones.") - else - to_chat(user, "You require waffle cones and chocolate flavouring to make chocolate cones.") - if(ICECREAM_VANILLA) - if(ingredients[INGR_ICE] > 0 && ingredients[INGR_MILK] > 0) - var/amount = min(ingredients[INGR_ICE], ingredients[INGR_MILK]) - ingredients[INGR_ICE] -= amount - ingredients[INGR_MILK] -= amount - ingredients[ICECREAM_VANILLA] += amount - visible_message("[user] whips up some vanilla icecream.") - else - to_chat(user, "You require milk and ice to make vanilla icecream.") - updateDialog() - -/obj/machinery/icecream_vat/Topic(href, href_list) - if(..()) - return - if(href_list["dispense"]) - dispense_flavour = text2num(href_list["dispense"]) - visible_message("[usr] sets [src] to dispense [get_icecream_flavour_string(dispense_flavour)] flavoured icecream.") - - if(href_list["cone"]) - var/dispense_cone = text2num(href_list["cone"]) - if(ingredients[dispense_cone] <= ingredients.len) - var/cone_name = get_icecream_flavour_string(dispense_cone) - if(ingredients[dispense_cone] >= 1) - ingredients[dispense_cone] -= 1 - var/obj/item/reagent_containers/food/snacks/icecream/I = new(loc) - I.cone_type = cone_name - I.icon_state = "icecream_cone_[cone_name]" - I.desc = "Delicious [cone_name] cone, but no ice cream." - visible_message("[usr] dispenses a crunchy [cone_name] cone from [src].") - else - to_chat(usr, "There are no [cone_name] cones left!") - updateDialog() - - if(href_list["make"]) - make( usr, text2num(href_list["make"]) ) - updateDialog() - - if(href_list["eject"]) - if(held_container) - held_container.forceMove(loc) - held_container = null - updateDialog() - - if(href_list["refresh"]) - updateDialog() - - if(href_list["close"]) - usr.unset_machine() - usr << browse(null,"window=icecreamvat") - return - -/obj/machinery/icecream_vat/deconstruct(disassembled = TRUE) - if(!(flags & NODECONSTRUCT)) - new /obj/item/stack/sheet/metal(loc, 4) - qdel(src) - - -/obj/item/reagent_containers/food/snacks/icecream - name = "ice cream cone" - desc = "Delicious waffle cone, but no ice cream." - icon = 'icons/obj/kitchen.dmi' - icon_state = "icecream_cone" - layer = 3.1 - var/ice_creamed = 0 - var/cone_type - bitesize = 3 - -/obj/item/reagent_containers/food/snacks/icecream/New() - ..() - create_reagents(20) - reagents.add_reagent("nutriment", 5) - -/obj/item/reagent_containers/food/snacks/icecream/proc/add_ice_cream(var/flavour) - var/flavour_name = get_icecream_flavour_string(flavour) - name = "[flavour_name] icecream" - overlays += "icecream_[flavour_name]" - desc = "Delicious [cone_type] cone with a dollop of [flavour_name] ice cream." - ice_creamed = 1 - -#undef ICECREAM_VANILLA -#undef FLAVOUR_CHOCOLATE -#undef FLAVOUR_STRAWBERRY -#undef FLAVOUR_BLUE -#undef CONE_WAFFLE -#undef CONE_CHOC -#undef INGR_MILK -#undef INGR_FLOUR -#undef INGR_SUGAR -#undef INGR_ICE -#undef MUCK diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 5bc63d4bace..1be8f11527d 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -978,7 +978,7 @@ /obj/machinery/hydroponics/proc/spawnplant() // why would you put strange reagent in a hydro tray you monster I bet you also feed them blood var/list/livingplants = list(/mob/living/simple_animal/hostile/tree, /mob/living/simple_animal/hostile/killertomato) var/chosen = pick(livingplants) - var/mob/living/simple_animal/hostile/C = new chosen + var/mob/living/simple_animal/hostile/C = new chosen(get_turf(src)) C.faction = list("plants") /obj/machinery/hydroponics/proc/become_self_sufficient() // Ambrosia Gaia effect diff --git a/code/modules/lighting/lighting_source.dm b/code/modules/lighting/lighting_source.dm index 7b0b782bdca..9398bd9683c 100644 --- a/code/modules/lighting/lighting_source.dm +++ b/code/modules/lighting/lighting_source.dm @@ -220,13 +220,14 @@ var/oldlum = source_turf.luminosity source_turf.luminosity = CEILING(light_range, 1) for(T in view(CEILING(light_range, 1), source_turf)) - if((!IS_DYNAMIC_LIGHTING(T) && !T.light_sources) || T.has_opaque_atom) + if((!IS_DYNAMIC_LIGHTING(T) && !T.light_sources)) continue - if(!T.lighting_corners_initialised) - T.generate_missing_corners() - for(thing in T.corners) - C = thing - corners[C] = 0 + if(!T.has_opaque_atom) + if(!T.lighting_corners_initialised) + T.generate_missing_corners() + for(thing in T.corners) + C = thing + corners[C] = 0 turfs += T source_turf.luminosity = oldlum diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index 882da0a9387..8969463be1d 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -195,6 +195,9 @@ icon = 'icons/obj/library.dmi' icon_state = "cqcmanual" +/obj/item/CQC_manual/chef + desc = "A small, black manual. Written on the back it says: Bringing the home advantage with you." + /obj/item/CQC_manual/attack_self(mob/living/carbon/human/user) if(!istype(user) || !user) return diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 997920c8e23..336ebdb8b67 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -624,7 +624,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(href_list["jump"]) var/mob/target = locate(href_list["jump"]) - var/mob/A = usr; + var/mob/A = usr to_chat(A, "Teleporting to [target]...") //var/mob/living/silicon/ai/A = locate(href_list["track2"]) in GLOB.mob_list if(target && target != usr) diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index 5f18a27adc9..99e0af0ca6a 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -135,7 +135,7 @@ if(message) for(var/mob/M in GLOB.player_list) - if(istype(M, /mob/new_player)) + if(isnewplayer(M)) continue if(check_rights(R_ADMIN|R_MOD, 0, M) && M.get_preference(CHAT_DEAD)) // Show the emote to admins/mods diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index 92d936227cc..a46268daf50 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -767,17 +767,6 @@ desc = "Bark bark bark." key = "vu" -/datum/language/zombie - name = "Zombie" - desc = "BRAAAAAAINS!" - speech_verb = "moans" - whisper_verb = "mutters" - exclaim_verb = "wails" - colour = "zombie" - key = "zom" - flags = RESTRICTED - syllables = list("BRAAAAAAAAAAAAAAAAINS", "BRAAINS", "BRAINS") - /mob/proc/grant_all_babel_languages() for(var/la in GLOB.all_languages) var/datum/language/new_language = GLOB.all_languages[la] diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 496a12cbf82..7acf07f4471 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -16,7 +16,7 @@ death() return - if(paralysis || sleeping || getOxyLoss() > 50 || (HEALTH_THRESHOLD_CRIT <= health && check_death_method())) + if(paralysis || sleeping || getOxyLoss() > 50 || (health <= HEALTH_THRESHOLD_CRIT && check_death_method())) if(stat == CONSCIOUS) KnockOut() create_debug_log("fell unconscious, trigger reason: [reason]") diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index fd33d963566..16f1738d2f6 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -18,7 +18,7 @@ dna = new /datum/dna(null) // Species name is handled by set_species() - ..() + . = ..() set_species(new_species, 1, delay_icon_update = 1, skip_same_check = TRUE) @@ -68,55 +68,55 @@ status_flags = GODMODE|CANPUSH /mob/living/carbon/human/skrell/Initialize(mapload) - ..(mapload, /datum/species/skrell) + . = ..(mapload, /datum/species/skrell) /mob/living/carbon/human/tajaran/Initialize(mapload) - ..(mapload, /datum/species/tajaran) + . = ..(mapload, /datum/species/tajaran) /mob/living/carbon/human/vulpkanin/Initialize(mapload) - ..(mapload, /datum/species/vulpkanin) + . = ..(mapload, /datum/species/vulpkanin) /mob/living/carbon/human/unathi/Initialize(mapload) - ..(mapload, /datum/species/unathi) + . = ..(mapload, /datum/species/unathi) /mob/living/carbon/human/vox/Initialize(mapload) - ..(mapload, /datum/species/vox) + . = ..(mapload, /datum/species/vox) /mob/living/carbon/human/voxarmalis/Initialize(mapload) - ..(mapload, /datum/species/vox/armalis) + . = ..(mapload, /datum/species/vox/armalis) /mob/living/carbon/human/skeleton/Initialize(mapload) - ..(mapload, /datum/species/skeleton) + . = ..(mapload, /datum/species/skeleton) /mob/living/carbon/human/kidan/Initialize(mapload) - ..(mapload, /datum/species/kidan) + . = ..(mapload, /datum/species/kidan) /mob/living/carbon/human/plasma/Initialize(mapload) - ..(mapload, /datum/species/plasmaman) + . = ..(mapload, /datum/species/plasmaman) /mob/living/carbon/human/slime/Initialize(mapload) - ..(mapload, /datum/species/slime) + . = ..(mapload, /datum/species/slime) /mob/living/carbon/human/grey/Initialize(mapload) - ..(mapload, /datum/species/grey) + . = ..(mapload, /datum/species/grey) /mob/living/carbon/human/abductor/Initialize(mapload) - ..(mapload, /datum/species/abductor) + . = ..(mapload, /datum/species/abductor) /mob/living/carbon/human/diona/Initialize(mapload) - ..(mapload, /datum/species/diona) + . = ..(mapload, /datum/species/diona) /mob/living/carbon/human/pod_diona/Initialize(mapload) - ..(mapload, /datum/species/diona/pod) + . = ..(mapload, /datum/species/diona/pod) /mob/living/carbon/human/machine/Initialize(mapload) - ..(mapload, /datum/species/machine) + . = ..(mapload, /datum/species/machine) /mob/living/carbon/human/machine/created name = "Integrated Robotic Chassis" /mob/living/carbon/human/machine/created/Initialize(mapload) - ..() + . = ..() rename_character(null, "Integrated Robotic Chassis ([rand(1, 9999)])") update_dna() for(var/obj/item/organ/external/E in bodyparts) @@ -129,34 +129,34 @@ death() /mob/living/carbon/human/shadow/Initialize(mapload) - ..(mapload, /datum/species/shadow) + . = ..(mapload, /datum/species/shadow) /mob/living/carbon/human/golem/Initialize(mapload) - ..(mapload, /datum/species/golem) + . = ..(mapload, /datum/species/golem) /mob/living/carbon/human/wryn/Initialize(mapload) - ..(mapload, /datum/species/wryn) + . = ..(mapload, /datum/species/wryn) /mob/living/carbon/human/nucleation/Initialize(mapload) - ..(mapload, /datum/species/nucleation) + . = ..(mapload, /datum/species/nucleation) /mob/living/carbon/human/drask/Initialize(mapload) - ..(mapload, /datum/species/drask) + . = ..(mapload, /datum/species/drask) /mob/living/carbon/human/monkey/Initialize(mapload) - ..(mapload, /datum/species/monkey) + . = ..(mapload, /datum/species/monkey) /mob/living/carbon/human/farwa/Initialize(mapload) - ..(mapload, /datum/species/monkey/tajaran) + . = ..(mapload, /datum/species/monkey/tajaran) /mob/living/carbon/human/wolpin/Initialize(mapload) - ..(mapload, /datum/species/monkey/vulpkanin) + . = ..(mapload, /datum/species/monkey/vulpkanin) /mob/living/carbon/human/neara/Initialize(mapload) - ..(mapload, /datum/species/monkey/skrell) + . = ..(mapload, /datum/species/monkey/skrell) /mob/living/carbon/human/stok/Initialize(mapload) - ..(mapload, /datum/species/monkey/unathi) + . = ..(mapload, /datum/species/monkey/unathi) /mob/living/carbon/human/Stat() ..() diff --git a/code/modules/mob/living/carbon/human/npcs.dm b/code/modules/mob/living/carbon/human/npcs.dm index 41c108dadb9..9dcf83f2e9a 100644 --- a/code/modules/mob/living/carbon/human/npcs.dm +++ b/code/modules/mob/living/carbon/human/npcs.dm @@ -7,7 +7,7 @@ species_exception = list(/datum/species/monkey) /mob/living/carbon/human/monkey/punpun/Initialize(mapload) - ..() + . = ..() name = "Pun Pun" real_name = name equip_to_slot(new /obj/item/clothing/under/punpun(src), slot_w_uniform) diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 2114299f939..f65cefff49d 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -53,7 +53,6 @@ var/stun_mod = 1 // If a species is more/less impacated by stuns/weakens/paralysis var/speed_mod = 0 // this affects the race's speed. positive numbers make it move slower, negative numbers make it move faster var/blood_damage_type = OXY //What type of damage does this species take if it's low on blood? - var/obj/item/mutanthands var/total_health = 100 var/punchdamagelow = 0 //lowest possible punch damage var/punchdamagehigh = 9 //highest possible punch damage diff --git a/code/modules/mob/living/carbon/human/species/zombies.dm b/code/modules/mob/living/carbon/human/species/zombies.dm deleted file mode 100644 index 1f1c4d979b7..00000000000 --- a/code/modules/mob/living/carbon/human/species/zombies.dm +++ /dev/null @@ -1,102 +0,0 @@ -#define REGENERATION_DELAY 60 // After taking damage, how long it takes for automatic regeneration to begin - -/datum/species/zombie - // 1spooky - name = "High-Functioning Zombie" - name_plural = "High-Functioning Zombies" - icobase = 'icons/mob/human_races/r_zombie.dmi' - deform = 'icons/mob/human_races/r_def_zombie.dmi' - dies_at_threshold = TRUE - language = "Zombie" - species_traits = list(NO_BLOOD, NOZOMBIE, NOTRANSSTING, NO_BREATHE, RADIMMUNE, NO_SCAN) - var/static/list/spooks = list('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg','sound/hallucinations/veryfar_noise.ogg','sound/hallucinations/wail.ogg') - warning_low_pressure = -1 - hazard_low_pressure = -1 - hazard_high_pressure = 999999999 - warning_high_pressure = 999999999 - cold_level_1 = -1 - cold_level_2 = -1 - cold_level_3 = -1 - tox_mod = 0 - flesh_color = "#00FF00" // for green examine text - bodyflags = HAS_SKIN_COLOR - dietflags = DIET_CARN - has_organ = list( - "heart" = /obj/item/organ/internal/heart, - "lungs" = /obj/item/organ/internal/lungs, - "liver" = /obj/item/organ/internal/liver, - "kidneys" = /obj/item/organ/internal/kidneys, - "brain" = /obj/item/organ/internal/brain, - "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes, - "ears" = /obj/item/organ/internal/ears) - - -/datum/species/zombie/infectious - name = "Infectious Zombie" - mutanthands = /obj/item/zombie_hand - icobase = 'icons/mob/human_races/r_zombie.dmi' - deform = 'icons/mob/human_races/r_def_zombie.dmi' - brute_mod = 0.8 // 120 damage to KO a zombie, which kills it - burn_mod = 0.8 - clone_mod = 0.8 - brain_mod = 0.8 - stamina_mod = 0.8 - speed_mod = 1.6 - default_language = "Zombie" - var/heal_rate = 1 - var/regen_cooldown = 0 - -/datum/species/zombie/infectious/spec_stun(mob/living/carbon/human/H, amount) - . = min(20, amount) - -/datum/species/zombie/infectious/apply_damage(damage = 0, damagetype = BRUTE, def_zone = null, blocked = 0, sharp = 0, obj/used_weapon = null) - . = ..() - if(damage) - regen_cooldown = world.time + REGENERATION_DELAY - -/datum/species/zombie/infectious/handle_life(mob/living/carbon/human/H) - . = ..() - H.a_intent = INTENT_HARM // THE SUFFERING MUST FLOW - - //Zombies never actually die, they just fall down until they regenerate enough to rise back up. - //They must be restrained, beheaded or gibbed to stop being a threat. - if(regen_cooldown < world.time) - var/heal_amt = heal_rate - if(H.InCritical()) - heal_amt *= 2 - H.heal_overall_damage(heal_amt,heal_amt) - H.adjustToxLoss(-heal_amt) - if(!H.InCritical() && prob(4)) - playsound(H, pick(spooks), 50, TRUE, 10) - -//Congrats you somehow died so hard you stopped being a zombie -/datum/species/zombie/infectious/handle_death(gibbed, mob/living/carbon/C) - . = ..() - var/obj/item/organ/internal/zombie_infection/infection - infection = C.get_organ_slot("zombie_infection") - if(infection) - qdel(infection) - -/datum/species/zombie/infectious/on_species_gain(mob/living/carbon/human/H, datum/species/old_species) - . = ..() - // Deal with the source of this zombie corruption - // Infection organ needs to be handled separately from mutant_organs - // because it persists through species transitions - if(mutanthands) - H.drop_l_hand() - H.drop_r_hand() - H.put_in_hands(new mutanthands()) - H.put_in_hands(new mutanthands()) - var/obj/item/organ/internal/zombie_infection/infection - infection = H.get_organ_slot("zombie_infection") - if(!infection) - infection = new() - infection.insert(H) - -/datum/species/zombie/infectious/on_species_loss(mob/living/carbon/human/C, datum/species/old_species) - QDEL_NULL(C.r_hand) - QDEL_NULL(C.l_hand) - return ..() - -#undef REGENERATION_DELAY diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 85c4ceac427..1c232f9f43c 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -243,7 +243,8 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( /mob/living/silicon/ai/proc/show_borg_info() stat(null, text("Connected cyborgs: [connected_robots.len]")) - for(var/mob/living/silicon/robot/R in connected_robots) + for(var/thing in connected_robots) + var/mob/living/silicon/robot/R = thing var/robot_status = "Nominal" if(R.stat || !R.client) robot_status = "OFFLINE" @@ -251,8 +252,9 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( robot_status = "DEPOWERED" // Name, Health, Battery, Module, Area, and Status! Everything an AI wants to know about its borgies! var/area/A = get_area(R) + var/area_name = A ? sanitize(A.name) : "Unknown" stat(null, text("[R.name] | S.Integrity: [R.health]% | Cell: [R.cell ? "[R.cell.charge] / [R.cell.maxcharge]" : "Empty"] | \ - Module: [R.designation] | Loc: [sanitize(A.name)] | Status: [robot_status]")) + Module: [R.designation] | Loc: [area_name] | Status: [robot_status]")) /mob/living/silicon/ai/rename_character(oldname, newname) if(!..(oldname, newname)) diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index 99d135df93b..2a1662b064d 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -227,7 +227,7 @@ throw_speed = 5 throw_range = 10 origin_tech = "magnets=1;biotech=1" - var/mode = 1; + var/mode = 1 /obj/item/robotanalyzer/attack(mob/living/M as mob, mob/living/user as mob) if(( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index f932f4270ba..ff7f7fba084 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -14,6 +14,7 @@ braintype = "Robot" lawupdate = 0 density = 0 + has_camera = FALSE req_one_access = list(ACCESS_ENGINE, ACCESS_ROBOTICS) ventcrawler = 2 magpulse = 1 diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index d7f42a9ceb5..cc9d22ec673 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -85,6 +85,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( var/lockcharge //Used when locking down a borg to preserve cell charge var/speed = 0 //Cause sec borgs gotta go fast //No they dont! var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them. + var/has_camera = TRUE var/pdahide = 0 //Used to hide the borg from the messenger list var/tracking_entities = 0 //The number of known entities currently accessing the internal camera var/braintype = "Cyborg" @@ -135,7 +136,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( init() - if(!camera && (!scrambledcodes || designation == "ERT")) + if(has_camera && !camera) camera = new /obj/machinery/camera(src) camera.c_tag = real_name camera.network = list("SS13","Robots") @@ -238,7 +239,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( if(custom_name) return 0 if(!allow_rename) - to_chat(src, "Rename functionality is not enabled on this unit."); + to_chat(src, "Rename functionality is not enabled on this unit.") return 0 rename_self(braintype, 1) @@ -1332,6 +1333,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( designation = "SpecOps" lawupdate = 0 scrambledcodes = 1 + has_camera = FALSE req_one_access = list(ACCESS_CENT_SPECOPS) ionpulse = 1 magpulse = 1 @@ -1420,6 +1422,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( designation = "Destroyer" lawupdate = 0 scrambledcodes = 1 + has_camera = FALSE req_one_access = list(ACCESS_CENT_SPECOPS) ionpulse = 1 magpulse = 1 diff --git a/code/modules/mob/living/silicon/robot/syndicate.dm b/code/modules/mob/living/silicon/robot/syndicate.dm index 98afb8285d1..0d1968b3e7a 100644 --- a/code/modules/mob/living/silicon/robot/syndicate.dm +++ b/code/modules/mob/living/silicon/robot/syndicate.dm @@ -3,6 +3,7 @@ icon_state = "syndie_bloodhound" lawupdate = 0 scrambledcodes = 1 + has_camera = FALSE pdahide = 1 faction = list("syndicate") bubble_icon = "syndibot" diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index d9097a82d2e..62c133fffd7 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -33,7 +33,7 @@ /obj/machinery/bot_core/honkbot req_one_access = list(ACCESS_CLOWN, ACCESS_ROBOTICS, ACCESS_MIME) -/mob/living/simple_animal/bot/honkbot/Initialize() +/mob/living/simple_animal/bot/honkbot/Initialize(mapload) . = ..() update_icon() auto_patrol = TRUE diff --git a/code/modules/mob/living/simple_animal/corpse.dm b/code/modules/mob/living/simple_animal/corpse.dm index 10460d11e65..8d0ad5d0e2b 100644 --- a/code/modules/mob/living/simple_animal/corpse.dm +++ b/code/modules/mob/living/simple_animal/corpse.dm @@ -103,9 +103,9 @@ name = "Space Wizard Corpse" outfit = /datum/outfit/wizardcorpse -/obj/effect/mob_spawn/human/corpse/clownoff/Initialize() +/obj/effect/mob_spawn/human/corpse/clownoff/Initialize(mapload) mob_name = "[pick(GLOB.wizard_first)], [pick(GLOB.wizard_second)]" - ..() + . = ..() /datum/outfit/wizardcorpse name = "Space Wizard Corpse" diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm index 6dca834169b..50531f976e9 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm @@ -534,7 +534,7 @@ obj/effect/temp_visual/fireball duration = 9 pixel_z = 270 -/obj/effect/temp_visual/fireball/Initialize() +/obj/effect/temp_visual/fireball/Initialize(mapload) . = ..() animate(src, pixel_z = 0, time = duration) diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 848a285abf4..fbf65ccfa9b 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -48,8 +48,8 @@ var/attempt_open = 0 // Pickup loot -/mob/living/simple_animal/hostile/mimic/crate/Initialize() - ..() +/mob/living/simple_animal/hostile/mimic/crate/Initialize(mapload) + . = ..() for(var/obj/item/I in loc) I.loc = src diff --git a/code/modules/mob/living/simple_animal/hostile/netherworld.dm b/code/modules/mob/living/simple_animal/hostile/netherworld.dm index e8ce4027b4e..89164167005 100644 --- a/code/modules/mob/living/simple_animal/hostile/netherworld.dm +++ b/code/modules/mob/living/simple_animal/hostile/netherworld.dm @@ -31,7 +31,7 @@ deathmessage = "wails as its form turns into a pulpy mush." death_sound = 'sound/voice/hiss6.ogg' -/mob/living/simple_animal/hostile/netherworld/migo/Initialize() +/mob/living/simple_animal/hostile/netherworld/migo/Initialize(mapload) . = ..() migo_sounds = list('sound/items/bubblewrap.ogg', 'sound/items/change_jaws.ogg', 'sound/items/crowbar.ogg', 'sound/items/drink.ogg', 'sound/items/deconstruct.ogg', 'sound/items/change_drill.ogg', 'sound/items/dodgeball.ogg', 'sound/items/eatfood.ogg', 'sound/items/screwdriver.ogg', 'sound/items/weeoo1.ogg', 'sound/items/wirecutter.ogg', 'sound/items/welder.ogg', 'sound/items/zip.ogg', 'sound/items/rped.ogg', 'sound/items/ratchet.ogg', 'sound/items/polaroid1.ogg', 'sound/items/pshoom.ogg', 'sound/items/airhorn.ogg', 'sound/voice/bcreep.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/ed209_20sec.ogg', 'sound/voice/hiss3.ogg', 'sound/voice/hiss6.ogg', 'sound/voice/mpatchedup.ogg', 'sound/voice/mfeelbetter.ogg', 'sound/weapons/sear.ogg', 'sound/ambience/antag/tatoralert.ogg', 'sound/mecha/nominal.ogg', 'sound/mecha/weapdestr.ogg', 'sound/mecha/critdestr.ogg', 'sound/mecha/imag_enh.ogg', 'sound/effects/adminhelp.ogg', 'sound/effects/alert.ogg', 'sound/effects/attackblob.ogg', 'sound/effects/bamf.ogg', 'sound/effects/blobattack.ogg', 'sound/effects/break_stone.ogg', 'sound/effects/bubbles.ogg', 'sound/effects/bubbles2.ogg', 'sound/effects/clang.ogg', 'sound/effects/clownstep2.ogg', 'sound/effects/dimensional_rend.ogg', 'sound/effects/doorcreaky.ogg', 'sound/effects/empulse.ogg', 'sound/effects/explosionfar.ogg', 'sound/effects/explosion1.ogg', 'sound/effects/grillehit.ogg', 'sound/effects/genetics.ogg', 'sound/effects/heartbeat.ogg', 'sound/effects/hyperspace_begin.ogg', 'sound/effects/hyperspace_end.ogg', 'sound/goonstation/effects/screech.ogg', 'sound/effects/phasein.ogg', 'sound/effects/picaxe1.ogg', 'sound/effects/sparks1.ogg', 'sound/effects/smoke.ogg', 'sound/effects/splat.ogg', 'sound/effects/snap.ogg', 'sound/effects/tendril_destroyed.ogg', 'sound/effects/supermatter.ogg', 'sound/misc/desceration-01.ogg', 'sound/misc/desceration-02.ogg', 'sound/misc/desceration-03.ogg', 'sound/misc/bloblarm.ogg', 'sound/goonstation/misc/airraid_loop.ogg', 'sound/misc/interference.ogg', 'sound/misc/notice1.ogg', 'sound/misc/notice2.ogg', 'sound/misc/sadtrombone.ogg', 'sound/misc/slip.ogg', 'sound/weapons/armbomb.ogg', 'sound/weapons/chainsaw.ogg', 'sound/weapons/emitter.ogg', 'sound/weapons/emitter2.ogg', 'sound/weapons/blade1.ogg', 'sound/weapons/bladeslice.ogg', 'sound/weapons/blastcannon.ogg', 'sound/weapons/blaster.ogg', 'sound/weapons/bulletflyby3.ogg', 'sound/weapons/circsawhit.ogg', 'sound/weapons/cqchit2.ogg', 'sound/weapons/drill.ogg', 'sound/weapons/genhit1.ogg', 'sound/weapons/gunshots/gunshot_silenced.ogg', 'sound/weapons/gunshots/gunshot.ogg', 'sound/weapons/handcuffs.ogg', 'sound/weapons/homerun.ogg', 'sound/weapons/kenetic_accel.ogg', 'sound/machines/fryer/deep_fryer_emerge.ogg', 'sound/machines/airlock_alien_prying.ogg', 'sound/machines/airlock_close.ogg', 'sound/machines/airlockforced.ogg', 'sound/machines/airlock_open.ogg', 'sound/machines/alarm.ogg', 'sound/machines/blender.ogg', 'sound/machines/boltsdown.ogg', 'sound/machines/boltsup.ogg', 'sound/machines/buzz-sigh.ogg', 'sound/machines/buzz-two.ogg', 'sound/machines/chime.ogg', 'sound/machines/defib_charge.ogg', 'sound/machines/defib_failed.ogg', 'sound/machines/defib_ready.ogg', 'sound/machines/defib_zap.ogg', 'sound/machines/deniedbeep.ogg', 'sound/machines/ding.ogg', 'sound/machines/disposalflush.ogg', 'sound/machines/door_close.ogg', 'sound/machines/door_open.ogg', 'sound/machines/engine_alert1.ogg', 'sound/machines/engine_alert2.ogg', 'sound/machines/hiss.ogg', 'sound/machines/honkbot_evil_laugh.ogg', 'sound/machines/juicer.ogg', 'sound/machines/ping.ogg', 'sound/ambience/signal.ogg', 'sound/machines/synth_no.ogg', 'sound/machines/synth_yes.ogg', 'sound/machines/terminal_alert.ogg', 'sound/machines/twobeep.ogg', 'sound/machines/ventcrawl.ogg', 'sound/machines/warning-buzzer.ogg', 'sound/ai/outbreak5.ogg', 'sound/ai/outbreak7.ogg', 'sound/ai/poweroff.ogg', 'sound/ai/radiation.ogg', 'sound/ai/shuttlecalled.ogg', 'sound/ai/shuttledock.ogg', 'sound/ai/shuttlerecalled.ogg', 'sound/ai/aimalf.ogg', 'sound/ambience/ambigen1.ogg', 'sound/ambience/ambigen3.ogg', 'sound/ambience/ambigen4.ogg', 'sound/ambience/ambigen5.ogg', 'sound/ambience/ambigen6.ogg', 'sound/ambience/ambigen10.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg') //hahahaha fuck you code divers @@ -82,14 +82,14 @@ /obj/structure/spawner/nether/examine(mob/user) . = ..() - if(isskeleton(user) || iszombie(user)) + if(isskeleton(user)) . += "A direct link to another dimension full of creatures very happy to see you. You can see your house from here!" else . += "A direct link to another dimension full of creatures not very happy to see you. Entering the link would be a very bad idea." /obj/structure/spawner/nether/attack_hand(mob/user) . = ..() - if(isskeleton(user) || iszombie(user)) + if(isskeleton(user)) to_chat(user, "You don't feel like going home yet...") else user.visible_message("[user] is violently pulled into the link!", \ diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index 7ebddfeec12..decfc7146cf 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -260,7 +260,7 @@ alert_on_shield_breach = TRUE /mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/armory/Initialize(mapload) - ..() + . = ..() if(prob(50)) // 50% chance of switching to extremely dangerous ranged variant melee_damage_lower = 10 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index d6a86d3e3cd..3b86faeb7e6 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -23,7 +23,7 @@ LAssailant = null return ..() -/mob/Initialize() +/mob/Initialize(mapload) GLOB.mob_list += src if(stat == DEAD) GLOB.dead_mob_list += src @@ -31,7 +31,7 @@ GLOB.alive_mob_list += src set_focus(src) prepare_huds() - ..() + . = ..() /atom/proc/prepare_huds() hud_list = list() @@ -752,7 +752,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ if(client.holder && (client.holder.rights & R_ADMIN)) is_admin = 1 - else if(stat != DEAD || istype(src, /mob/new_player)) + else if(stat != DEAD || isnewplayer(src)) to_chat(usr, "You must be observing to use this!") return @@ -1297,8 +1297,6 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ .["Add Organ"] = "?_src_=vars;addorgan=[UID()]" .["Remove Organ"] = "?_src_=vars;remorgan=[UID()]" - .["Fix NanoUI"] = "?_src_=vars;fix_nano=[UID()]" - .["Add Verb"] = "?_src_=vars;addverb=[UID()]" .["Remove Verb"] = "?_src_=vars;remverb=[UID()]" diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 64444864804..37e116b4376 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -434,7 +434,7 @@ if(affecting) if(!affecting.buckled) affecting.pixel_x = 0 - affecting.pixel_y = 0 //used to be an animate, not quick enough for del'ing + affecting.pixel_y = 0 //used to be an animate, not quick enough for qdel'ing affecting.layer = initial(affecting.layer) affecting.grabbed_by -= src affecting = null diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 63175a68024..5fb5bcb06c8 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -459,7 +459,7 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM name = realname for(var/mob/M in GLOB.player_list) - if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || check_rights(R_ADMIN|R_MOD,0,M)) && M.get_preference(CHAT_DEAD)) + if(M.client && ((!isnewplayer(M) && M.stat == DEAD) || check_rights(R_ADMIN|R_MOD,0,M)) && M.get_preference(CHAT_DEAD)) var/follow var/lname if(subject) diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index c3ec68c9793..1e704ea3449 100644 --- a/code/modules/mob/mob_transformation_simple.dm +++ b/code/modules/mob/mob_transformation_simple.dm @@ -4,7 +4,7 @@ //Note that this proc does NOT do MMI related stuff! /mob/proc/change_mob_type(var/new_type = null, var/turf/location = null, var/new_name = null as text, var/delete_old_mob = 0 as num, var/forcekey = 0) - if(istype(src,/mob/new_player)) + if(isnewplayer(src)) to_chat(usr, "cannot convert players who have not entered yet.") return diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index af3d439df59..f53daba6626 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -12,8 +12,13 @@ stat = 2 canmove = 0 -/mob/new_player/New() +/mob/new_player/Initialize(mapload) + SHOULD_CALL_PARENT(FALSE) + if(initialized) + stack_trace("Warning: [src]([type]) initialized multiple times!") + initialized = TRUE GLOB.mob_list += src + return INITIALIZE_HINT_NORMAL /mob/new_player/verb/new_player_panel() set src = usr @@ -205,6 +210,7 @@ if(!client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed. observer.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing! observer.key = key + QDEL_NULL(mind) GLOB.respawnable_list += observer qdel(src) return 1 diff --git a/code/modules/mob/new_player/poll.dm b/code/modules/mob/new_player/poll.dm index f67c53c9941..19893819e0c 100644 --- a/code/modules/mob/new_player/poll.dm +++ b/code/modules/mob/new_player/poll.dm @@ -92,7 +92,7 @@ var output = "" if(polltype == POLLTYPE_MULTI || polltype == POLLTYPE_OPTION) - select_query = GLOB.dbcon.NewQuery("SELECT text, percentagecalc, (SELECT COUNT(optionid) FROM [format_table_name("poll_vote")] WHERE optionid = poll_option.id GROUP BY optionid) AS votecount FROM [format_table_name("poll_option")] WHERE pollid = [pollid]"); + select_query = GLOB.dbcon.NewQuery("SELECT text, percentagecalc, (SELECT COUNT(optionid) FROM [format_table_name("poll_vote")] WHERE optionid = poll_option.id GROUP BY optionid) AS votecount FROM [format_table_name("poll_option")] WHERE pollid = [pollid]") select_query.Execute() var/list/options = list() var/total_votes = 1 @@ -177,7 +177,7 @@ output += "" output += "" if(polltype == POLLTYPE_TEXT) - select_query = GLOB.dbcon.NewQuery("SELECT replytext, COUNT(replytext) AS countresponse, GROUP_CONCAT(DISTINCT ckey SEPARATOR ', ') as ckeys FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] GROUP BY replytext ORDER BY countresponse DESC"); + select_query = GLOB.dbcon.NewQuery("SELECT replytext, COUNT(replytext) AS countresponse, GROUP_CONCAT(DISTINCT ckey SEPARATOR ', ') as ckeys FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] GROUP BY replytext ORDER BY countresponse DESC") select_query.Execute() output += {" diff --git a/code/modules/mob/new_player/sprite_accessories/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories/sprite_accessories.dm index 476861861a3..d4834eccc80 100644 --- a/code/modules/mob/new_player/sprite_accessories/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories/sprite_accessories.dm @@ -48,7 +48,7 @@ var/gender = NEUTER //Determines if the accessory will be skipped or included in random hair generations // Restrict some styles to specific species - var/list/species_allowed = list("Human", "Slime People", "Infectious Zombie", "High-Functioning Zombie") + var/list/species_allowed = list("Human", "Slime People") var/list/sprite_sheets = list() //For accessories common across species but need to use 'fitted' sprites (like underwear). e.g. list("Vox" = 'icons/mob/species/vox/iconfile.dmi') var/list/models_allowed = list() //Specifies which, if any, hairstyles or markings can be accessed by which prosthetics. Should equal the manufacturing company name in robolimbs.dm. var/list/heads_allowed = null //Specifies which, if any, alt heads a head marking, hairstyle or facial hair style is compatible with. diff --git a/code/modules/nano/subsystem.dm b/code/modules/nano/subsystem.dm index 6ad4201b93d..f2f86c02a3c 100644 --- a/code/modules/nano/subsystem.dm +++ b/code/modules/nano/subsystem.dm @@ -163,7 +163,7 @@ if(isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) open_uis[src_object_key] = list(ui.ui_key = list()) else if(isnull(open_uis[src_object_key][ui.ui_key]) || !istype(open_uis[src_object_key][ui.ui_key], /list)) - open_uis[src_object_key][ui.ui_key] = list(); + open_uis[src_object_key][ui.ui_key] = list() ui.user.open_uis.Add(ui) var/list/uis = open_uis[src_object_key][ui.ui_key] diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 0cb571d576c..45195bb1730 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -231,7 +231,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor var/atoms[] = list() for(var/turf/the_turf in turfs) // Add ourselves to the list of stuff to draw - atoms.Add(the_turf); + atoms.Add(the_turf) // As well as anything that isn't invisible. for(var/atom/A in the_turf) if(A.invisibility) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index f613f34a8fd..56e38d31935 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -70,7 +70,6 @@ var/locked = 1 var/coverlocked = 1 var/aidisabled = 0 - var/tdir = null var/obj/machinery/power/terminal/terminal = null var/lastused_light = 0 var/lastused_equip = 0 @@ -155,15 +154,12 @@ GLOB.apcs = sortAtom(GLOB.apcs) wires = new(src) - // offset 24 pixels in direction of dir - // this allows the APC to be embedded in a wall, yet still inside an area - if(building) - setDir(direction) // We set this to direction only for pixel location determination. - - set_pixel_offsets_from_dir(24, -24, 24, -24) // Set pixel offsets based on `dir` - setDir(SOUTH) // APC's should always appear to *face* south. if(building) + // Offset 24 pixels in direction of dir. This allows the APC to be embedded in a wall, yet still inside an area + setDir(direction) // This is only used for pixel offsets, and later terminal placement. APC dir doesn't affect its sprite since it only has one orientation. + set_pixel_offsets_from_dir(24, -24, 24, -24) + area = get_area(src) area.apc |= src opened = 1 @@ -193,8 +189,8 @@ /obj/machinery/power/apc/proc/make_terminal() // create a terminal object at the same position as original turf loc // wires will attach to this - terminal = new/obj/machinery/power/terminal(src.loc) - terminal.setDir(tdir) + terminal = new/obj/machinery/power/terminal(get_turf(src)) + terminal.setDir(dir) terminal.master = src /obj/machinery/power/apc/Initialize(mapload) diff --git a/code/modules/projectiles/guns/magic/staff.dm b/code/modules/projectiles/guns/magic/staff.dm index 9196596c8b5..72d128178a6 100644 --- a/code/modules/projectiles/guns/magic/staff.dm +++ b/code/modules/projectiles/guns/magic/staff.dm @@ -58,8 +58,6 @@ ammo_type = /obj/item/ammo_casing/magic/slipping icon_state = "staffofslipping" item_state = "staffofslipping" - max_charges = 10 - recharge_rate = 2 fire_sound = 'sound/items/bikehorn.ogg' /obj/item/gun/magic/staff/slipping/honkmother diff --git a/code/modules/projectiles/guns/syringe_gun.dm b/code/modules/projectiles/guns/syringe_gun.dm index 04cf2d248d3..72c60277dec 100644 --- a/code/modules/projectiles/guns/syringe_gun.dm +++ b/code/modules/projectiles/guns/syringe_gun.dm @@ -18,62 +18,61 @@ ..() chambered = new /obj/item/ammo_casing/syringegun(src) -/obj/item/gun/syringe/newshot() - if(!syringes.len) +/obj/item/gun/syringe/process_chamber() + if(!length(syringes) || chambered.BB) return var/obj/item/reagent_containers/syringe/S = syringes[1] - if(!S) return - chambered.BB = new S.projectile_type (src) - + chambered.BB = new S.projectile_type(src) S.reagents.trans_to(chambered.BB, S.reagents.total_volume) chambered.BB.name = S.name + syringes.Remove(S) - qdel(S) - return -/obj/item/gun/syringe/process_chamber() - return - -/obj/item/gun/syringe/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, params) +/obj/item/gun/syringe/afterattack(atom/target, mob/living/user, flag, params) if(target == loc) return - newshot() ..() /obj/item/gun/syringe/examine(mob/user) . = ..() - . += "Can hold [max_syringes] syringe\s. Has [syringes.len] syringe\s remaining." + var/num_syringes = syringes.len + (chambered.BB ? 1 : 0) + . += "Can hold [max_syringes] syringe\s. Has [num_syringes] syringe\s remaining." -/obj/item/gun/syringe/attack_self(mob/living/user as mob) - if(!syringes.len) +/obj/item/gun/syringe/attack_self(mob/living/user) + if(!length(syringes) && !chambered.BB) to_chat(user, "[src] is empty.") - return 0 + return FALSE - var/obj/item/reagent_containers/syringe/S = syringes[syringes.len] - - if(!S) - return 0 - S.loc = user.loc + var/obj/item/reagent_containers/syringe/S + if(chambered.BB) // Remove the chambered syringe first + S = new() + chambered.BB.reagents.trans_to(S, chambered.BB.reagents.total_volume) + qdel(chambered.BB) + chambered.BB = null + else + S = syringes[length(syringes)] + user.put_in_hands(S) syringes.Remove(S) + process_chamber() to_chat(user, "You unload [S] from \the [src]!") + return TRUE - return 1 - -/obj/item/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = 1) +/obj/item/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = TRUE) if(istype(A, /obj/item/reagent_containers/syringe)) - if(syringes.len < max_syringes) + if(length(syringes) < max_syringes) if(!user.unEquip(A)) return to_chat(user, "You load [A] into \the [src]!") syringes.Add(A) A.loc = src - return 1 + process_chamber() // Chamber the syringe if none is already + return TRUE else to_chat(user, "[src] cannot hold more syringes.") else diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index cf7ff936b6d..4d1f577969c 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -185,8 +185,8 @@ color = COLOR_PALE_BTL_GREEN if("Orange wrapper") color = COLOR_ORANGE - loaded_pill_bottle.wrapper_color = color; - loaded_pill_bottle.apply_wrap(); + loaded_pill_bottle.wrapper_color = color + loaded_pill_bottle.apply_wrap() else if(href_list["close"]) usr << browse(null, "window=chem_master") onclose(usr, "chem_master") diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm index dec256ac455..c6ff39aaead 100644 --- a/code/modules/reagents/chemistry/reagents/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -226,37 +226,6 @@ if(B && islist(B.data) && !data) data = B.data.Copy() -/datum/reagent/romerol - name = "romerol" - // the REAL zombie powder - id = "romerol" - description = "Romerol is a highly experimental bioterror agent \ - which causes dormant nodules to be etched into the grey matter of \ - the subject. These nodules only become active upon death of the \ - host, upon which, the secondary structures activate and take control \ - of the host body." - color = "#123524" // RGB (18, 53, 36) - metabolization_rate = INFINITY - can_synth = FALSE - taste_description = "CAAAARL" - -/datum/reagent/romerol/reaction_mob(mob/living/carbon/human/H, method = REAGENT_TOUCH, volume) - if(!istype(H)) - return - // Silently add the zombie infection organ to be activated upon death - if(!H.get_organ_slot("zombie_infection")) - var/obj/item/organ/internal/zombie_infection/nodamage/ZI = new() - ZI.insert(H) - ..() - -/datum/reagent/romerol/on_mob_life(mob/living/M) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(!H.get_organ_slot("zombie_infection")) - var/obj/item/organ/internal/zombie_infection/nodamage/ZI = new() - ZI.insert(H) - return ..() - /datum/reagent/uranium name ="Uranium" id = "uranium" diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index 61552eae789..6c836988e8b 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -12,11 +12,6 @@ container_type = OPENCONTAINER volume = 30 -/obj/item/reagent_containers/glass/bottle/romerol - name = "romerol bottle" - desc = "A small bottle of Romerol. The REAL zombie powder." - list_reagents = list("romerol" = 30) - /obj/item/reagent_containers/glass/bottle/on_reagent_change() update_icon() diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index e3bbb2f4aec..3dabea7dc6b 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -371,7 +371,7 @@ name = "X-Ray implant" desc = "These cybernetic eyes will give you X-ray vision. Blinking is futile." id = "ci-xray" - req_tech = list("materials" = 7, "programming" = 5, "biotech" = 7, "magnets" = 5,"plasmatech" = 6) + req_tech = list("materials" = 7, "programming" = 5, "biotech" = 8, "magnets" = 5,"plasmatech" = 6) build_type = PROTOLATHE | MECHFAB construction_time = 60 materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_SILVER = 600, MAT_GOLD = 600, MAT_PLASMA = 1000, MAT_URANIUM = 1000, MAT_DIAMOND = 1000, MAT_BLUESPACE = 1000) diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index 91306d910f1..3fe0ef54c0c 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -305,6 +305,11 @@ GLOBAL_DATUM(blackbox, /obj/machinery/blackbox_recorder) //This proc is only to be called at round end. /obj/machinery/blackbox_recorder/proc/save_all_data_to_sql() + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Blackbox seal blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to seal the blackbox via advanced proc-call") + log_admin("[key_name(usr)] attempted to seal the blackbox via advanced proc-call") + return if(!feedback) return round_end_data_gathering() //round_end time logging and some other data processing @@ -331,6 +336,11 @@ GLOBAL_DATUM(blackbox, /obj/machinery/blackbox_recorder) proc/feedback_set(var/variable,var/value) + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Feedback edit blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to edit feedback data via advanced proc-call") + log_admin("[key_name(usr)] attempted to edit feedback data via advanced proc-call") + return if(!GLOB.blackbox) return variable = sanitizeSQL(variable) @@ -342,6 +352,11 @@ proc/feedback_set(var/variable,var/value) FV.set_value(value) proc/feedback_inc(var/variable,var/value) + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Feedback edit blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to edit feedback data via advanced proc-call") + log_admin("[key_name(usr)] attempted to edit feedback data via advanced proc-call") + return if(!GLOB.blackbox) return variable = sanitizeSQL(variable) @@ -353,6 +368,11 @@ proc/feedback_inc(var/variable,var/value) FV.inc(value) proc/feedback_dec(var/variable,var/value) + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Feedback edit blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to edit feedback data via advanced proc-call") + log_admin("[key_name(usr)] attempted to edit feedback data via advanced proc-call") + return if(!GLOB.blackbox) return variable = sanitizeSQL(variable) @@ -364,6 +384,11 @@ proc/feedback_dec(var/variable,var/value) FV.dec(value) proc/feedback_set_details(var/variable,var/details) + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Feedback edit blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to edit feedback data via advanced proc-call") + log_admin("[key_name(usr)] attempted to edit feedback data via advanced proc-call") + return if(!GLOB.blackbox) return variable = sanitizeSQL(variable) @@ -376,6 +401,11 @@ proc/feedback_set_details(var/variable,var/details) FV.set_details(details) proc/feedback_add_details(var/variable,var/details) + if(IsAdminAdvancedProcCall()) + to_chat(usr, "Feedback edit blocked: Advanced ProcCall detected.") + message_admins("[key_name(usr)] attempted to edit feedback data via advanced proc-call") + log_admin("[key_name(usr)] attempted to edit feedback data via advanced proc-call") + return if(!GLOB.blackbox) return variable = sanitizeSQL(variable) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index f82598b1e14..99e31ef25ed 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -178,8 +178,6 @@ continue if(player.stat == DEAD) // Corpses continue - if(iszombie(player)) // Walking corpses - continue if(issilicon(player)) //Borgs are technically dead anyways continue if(isanimal(player)) //Poly does not own the shuttle @@ -299,7 +297,8 @@ timer = 0 open_dock() -/obj/docking_port/mobile/emergency/proc/open_dock(); +/obj/docking_port/mobile/emergency/proc/open_dock() + pass() /* for(var/obj/machinery/door/poddoor/shuttledock/D in airlocks) var/turf/T = get_step(D, D.checkdir) diff --git a/code/modules/spacepods/spacepod.dm b/code/modules/spacepods/spacepod.dm index 2e3c89017ef..56e7f8f96ba 100644 --- a/code/modules/spacepods/spacepod.dm +++ b/code/modules/spacepods/spacepod.dm @@ -973,7 +973,7 @@ var/obj/I = pick(true_contents) if(user.put_in_any_hand_if_possible(I)) src.contents -= I - to_chat(user, "You find a [I] [pick("under the seat", "under the console", "in the mainenance access")]!") + to_chat(user, "You find a [I] [pick("under the seat", "under the console", "in the maintenance access")]!") else to_chat(user, "You think you saw something shiny, but you can't reach it!") else diff --git a/code/modules/surgery/organs/augments_eyes.dm b/code/modules/surgery/organs/augments_eyes.dm index 53907e86d79..042e911fae9 100644 --- a/code/modules/surgery/organs/augments_eyes.dm +++ b/code/modules/surgery/organs/augments_eyes.dm @@ -62,7 +62,7 @@ name = "X-ray implant" desc = "These cybernetic eye implants will give you X-ray vision. Blinking is futile." implant_color = "#000000" - origin_tech = "materials=4;programming=4;biotech=6;magnets=4" + origin_tech = "materials=4;programming=4;biotech=7;magnets=4" vision_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS see_in_dark = 8 lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE diff --git a/code/modules/zombie/items.dm b/code/modules/zombie/items.dm deleted file mode 100644 index 0f0f85b088b..00000000000 --- a/code/modules/zombie/items.dm +++ /dev/null @@ -1,69 +0,0 @@ -/obj/item/zombie_hand - name = "zombie claw" - desc = "A zombie's claw is its primary tool, capable of infecting \ - unconscious or dead humans, butchering all other living things to \ - sustain the zombie, forcing open airlock doors and opening \ - child-safe caps on bottles." - flags = NODROP|ABSTRACT|DROPDEL - resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF - icon = 'icons/effects/blood.dmi' - icon_state = "bloodhand_left" - var/icon_left = "bloodhand_left" - var/icon_right = "bloodhand_right" - hitsound = 'sound/hallucinations/growl1.ogg' - force = 21 // Just enough to break airlocks with melee attacks - damtype = "brute" - -/obj/item/zombie_hand/equipped(mob/user, slot) - . = ..() - switch(slot) - // Yes, these intentionally don't match - if(slot_l_hand) - icon_state = icon_right - if(slot_r_hand) - icon_state = icon_left - -/obj/item/zombie_hand/afterattack(atom/target, mob/user, proximity_flag) - . = ..() - if(!proximity_flag) - return - - else if(isliving(target)) - if(ishuman(target)) - try_to_zombie_infect(target) - else - check_feast(target, user) - -/proc/try_to_zombie_infect(mob/living/carbon/human/target) - CHECK_DNA_AND_SPECIES(target) - - if(NOZOMBIE in target.dna.species.species_traits) - // cannot infect any NOZOMBIE subspecies (such as high functioning - // zombies) - return - - var/obj/item/organ/internal/zombie_infection/infection - infection = target.get_organ_slot("zombie_infection") - if(!infection) - infection = new() - infection.insert(target) - -/obj/item/zombie_hand/proc/check_feast(mob/living/target, mob/living/user) - if(target.stat == DEAD) - var/hp_gained = target.maxHealth - target.gib() - user.adjustBruteLoss(-hp_gained, FALSE) - user.adjustToxLoss(-hp_gained, FALSE) - user.adjustFireLoss(-hp_gained, FALSE) - user.adjustCloneLoss(-hp_gained, FALSE) - user.adjustBrainLoss(-hp_gained, FALSE) // Zom Bee gibbers "BRAAAAISNSs!1!" - user.updatehealth() - -/obj/item/zombie_hand/suicide_act(mob/living/carbon/human/user) - user.visible_message("[user] is ripping [user.p_their()] brains out! It looks like [user.p_theyre()] trying to commit suicide!") - if(ishuman(user)) - var/mob/living/carbon/human/L = user - var/obj/item/organ/external/O = L.get_organ("head") - if(O) - O.droplimb() - return (BRUTELOSS) diff --git a/code/modules/zombie/organs.dm b/code/modules/zombie/organs.dm deleted file mode 100644 index 6ea40c90e96..00000000000 --- a/code/modules/zombie/organs.dm +++ /dev/null @@ -1,99 +0,0 @@ -/obj/item/organ/internal/zombie_infection - name = "festering ooze" - desc = "A black web of pus and viscera." - parent_organ = "head" - slot = "zombie_infection" - icon_state = "blacktumor" - var/causes_damage = TRUE - var/datum/species/old_species = /datum/species/human - var/living_transformation_time = 30 - var/converts_living = FALSE - - var/revive_time_min = 450 - var/revive_time_max = 700 - var/timer_id - -/obj/item/organ/internal/zombie_infection/New(mob/living/carbon/holder) - ..() - GLOB.zombie_infection_list += src - -/obj/item/organ/internal/zombie_infection/Destroy() - GLOB.zombie_infection_list -= src - . = ..() - -/obj/item/organ/internal/zombie_infection/insert(mob/living/carbon/human/M, special = 0) - ..() - START_PROCESSING(SSobj, src) - -/obj/item/organ/internal/zombie_infection/remove(mob/living/carbon/human/M, special = 0) - STOP_PROCESSING(SSobj, src) - if(iszombie(M) && old_species) - M.set_species(old_species, retain_damage = TRUE) - if(timer_id) - deltimer(timer_id) - . = ..() - -/obj/item/organ/internal/zombie_infection/on_find(mob/living/finder) - to_chat(finder, "Inside the head is a disgusting black \ - web of pus and viscera, bound tightly around the brain like some \ - biological harness.") - -/obj/item/organ/internal/zombie_infection/process() - if(!owner) - return - if(!(src in owner.internal_organs)) - remove(owner) - if(causes_damage && !iszombie(owner) && owner.stat != DEAD) - owner.adjustToxLoss(1) - if (prob(10)) - to_chat(owner, "You feel sick...") - if(timer_id) - return - if(owner.suiciding) - return - if(owner.stat != DEAD && !converts_living) - return - if(!owner.get_int_organ(/obj/item/organ/internal/brain)) - return - if(!iszombie(owner)) - to_chat(owner, "You can feel your heart stopping, but something isn't right... \ - life has not abandoned your broken form. You can only feel a deep and immutable hunger that \ - not even death can stop, you will rise again!") - var/revive_time = rand(revive_time_min, revive_time_max) - var/flags = TIMER_STOPPABLE - timer_id = addtimer(CALLBACK(src, .proc/zombify), revive_time, flags) - -/obj/item/organ/internal/zombie_infection/proc/zombify() - timer_id = null - - if(!converts_living && owner.stat != DEAD) - return - - if(!iszombie(owner)) - old_species = owner.dna.species.type - owner.set_species(/datum/species/zombie/infectious) - for(var/datum/disease/critical/crit in owner.viruses) // cure any new crit viruses - crit.cure(0) - - var/stand_up = (owner.stat == DEAD) || (owner.stat == UNCONSCIOUS) - //Fully heal the zombie's damage the first time they rise - owner.setToxLoss(0) - owner.setOxyLoss(0) - owner.setBrainLoss(0) - owner.setCloneLoss(0) - owner.SetLoseBreath(0) - owner.heal_overall_damage(INFINITY, INFINITY, TRUE, TRUE, FALSE) - owner.setStaminaLoss(0) - - if(!owner.update_revive()) - return - - owner.grab_ghost() - owner.visible_message("[owner] suddenly convulses, as [owner.p_they()][stand_up ? " stagger to [owner.p_their()] feet and" : ""] gain a ravenous hunger in [owner.p_their()] eyes!", "You HUNGER!") - playsound(owner.loc, 'sound/hallucinations/far_noise.ogg', 50, TRUE) - owner.do_jitter_animation(living_transformation_time) - owner.Stun(living_transformation_time * 0.05) - to_chat(owner, "You are now a zombie! Do not seek to be cured, do not help any non-zombies in any way, do not harm your zombie brethren and spread the disease by killing others. You are a creature of hunger and violence.") - -/obj/item/organ/internal/zombie_infection/nodamage - causes_damage = FALSE diff --git a/icons/mob/human_races/r_def_zombie.dmi b/icons/mob/human_races/r_def_zombie.dmi deleted file mode 100644 index 007eb3f31f3..00000000000 Binary files a/icons/mob/human_races/r_def_zombie.dmi and /dev/null differ diff --git a/icons/mob/human_races/r_zombie.dmi b/icons/mob/human_races/r_zombie.dmi deleted file mode 100644 index 007eb3f31f3..00000000000 Binary files a/icons/mob/human_races/r_zombie.dmi and /dev/null differ diff --git a/icons/mob/screen_ghost.dmi b/icons/mob/screen_ghost.dmi index 6519d00aa97..e0e85a6939c 100644 Binary files a/icons/mob/screen_ghost.dmi and b/icons/mob/screen_ghost.dmi differ diff --git a/icons/obj/kitchen.dmi b/icons/obj/kitchen.dmi index 0e9ee4649ac..40a8d2f7452 100644 Binary files a/icons/obj/kitchen.dmi and b/icons/obj/kitchen.dmi differ diff --git a/paradise.dme b/paradise.dme index ad5b55b25be..a9f14831857 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1570,7 +1570,6 @@ #include "code\modules\food_and_drinks\kitchen_machinery\gibber.dm" #include "code\modules\food_and_drinks\kitchen_machinery\grill_new.dm" #include "code\modules\food_and_drinks\kitchen_machinery\icecream_vat.dm" -#include "code\modules\food_and_drinks\kitchen_machinery\icecream_vat_2.dm" #include "code\modules\food_and_drinks\kitchen_machinery\juicer.dm" #include "code\modules\food_and_drinks\kitchen_machinery\kitchen_machine.dm" #include "code\modules\food_and_drinks\kitchen_machinery\microwave.dm" @@ -1850,7 +1849,6 @@ #include "code\modules\mob\living\carbon\human\species\vox.dm" #include "code\modules\mob\living\carbon\human\species\vulpkanin.dm" #include "code\modules\mob\living\carbon\human\species\wryn.dm" -#include "code\modules\mob\living\carbon\human\species\zombies.dm" #include "code\modules\mob\living\silicon\death.dm" #include "code\modules\mob\living\silicon\emote.dm" #include "code\modules\mob\living\silicon\laws.dm" @@ -2502,8 +2500,6 @@ #include "code\modules\vehicle\speedbike.dm" #include "code\modules\vehicle\sportscar.dm" #include "code\modules\vehicle\vehicle.dm" -#include "code\modules\zombie\items.dm" -#include "code\modules\zombie\organs.dm" #include "goon\code\datums\browserOutput.dm" #include "interface\interface.dm" #include "interface\skin.dmf" diff --git a/tgui/docs/tutorial-and-examples.md b/tgui/docs/tutorial-and-examples.md index b50d980157c..08bb6f92321 100644 --- a/tgui/docs/tutorial-and-examples.md +++ b/tgui/docs/tutorial-and-examples.md @@ -37,7 +37,7 @@ powerful interactions for embedded objects or remote access. Let's start with a very basic hello world. ```dm -/obj/machinery/my_machine/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/tgui_state/state = default_state) +/obj/machinery/my_machine/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state) ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "my_machine", name, 300, 300, master_ui, state) @@ -294,7 +294,7 @@ here's what you need (note that you'll probably be forced to clean your shit up upon code review): ```dm -/obj/copypasta/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = default_state) // Remember to use the appropriate state. +/obj/copypasta/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state) // Remember to use the appropriate state. ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "copypasta", name, 300, 300, master_ui, state)