diff --git a/.travis.yml b/.travis.yml index 6581931961..fa42ba3aef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ env: - BYOND_MAJOR="512" - BYOND_MINOR="1418" - NODE_VERSION="4" - - RUST_G_VERSION="0.2.0" + - RUST_G_VERSION="0.3.0" - BUILD_TOOLS=false - BUILD_TESTING=false - DM_MAPFILE="loadallmaps" @@ -32,6 +32,7 @@ addons: - gcc-multilib - python3 - python3-pip + - libssl-dev:i386 install: - tools/travis/install_build_tools.sh diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 512e2cc4d9..b59ebfe7aa 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -138,7 +138,7 @@ #define COMSIG_TRY_STORAGE_FILL_TYPE "storage_fill_type" //(type, amount = INFINITY, force = FALSE) //don't fuck this up. Force will ignore max_items, and amount is normally clamped to max_items. #define COMSIG_TRY_STORAGE_TAKE "storage_take_obj" //(obj, new_loc, force = FALSE) - returns bool #define COMSIG_TRY_STORAGE_QUICK_EMPTY "storage_quick_empty" //(loc) - returns bool - if loc is null it will dump at parent location. -#define COMSIG_TRY_STORAGE_RETURN_INVENTORY "storage_return_inventory" //(list/list_to_inject_results_into) +#define COMSIG_TRY_STORAGE_RETURN_INVENTORY "storage_return_inventory" //(list/list_to_inject_results_into, recursively_search_inside_storages = TRUE) #define COMSIG_TRY_STORAGE_CAN_INSERT "storage_can_equip" //(obj/item/insertion_candidate, mob/user, silent) - returns bool /*******Non-Signal Component Related Defines*******/ diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 3cb143108d..d0f8460053 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -446,5 +446,7 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE #define EGG_LAYING_MESSAGES list("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.") +// Used by PDA and cartridge code to reduce repetitiveness of spritesheets +#define PDAIMG(what) {""} //Filters #define AMBIENT_OCCLUSION filter(type="drop_shadow", x=0, y=-2, size=4, border=4, color="#04080FAA") diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index 7ba693be0a..0dc8a38899 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -64,6 +64,7 @@ #define EXP_TYPE_ANTAG "Antag" #define EXP_TYPE_SPECIAL "Special" #define EXP_TYPE_GHOST "Ghost" +#define EXP_TYPE_ADMIN "Admin" //Flags in the players table in the db #define DB_FLAG_EXEMPT 1 diff --git a/code/controllers/subsystem/assets.dm b/code/controllers/subsystem/assets.dm index fd27c9424f..7285298283 100644 --- a/code/controllers/subsystem/assets.dm +++ b/code/controllers/subsystem/assets.dm @@ -6,9 +6,10 @@ SUBSYSTEM_DEF(assets) var/list/preload = list() /datum/controller/subsystem/assets/Initialize(timeofday) - for(var/type in typesof(/datum/asset) - list(/datum/asset, /datum/asset/simple)) - var/datum/asset/A = new type() - A.register() + for(var/type in typesof(/datum/asset)) + var/datum/asset/A = type + if (type != initial(A._abstract)) + get_asset_datum(type) preload = cache.Copy() //don't preload assets generated during the round diff --git a/code/datums/components/stationloving.dm b/code/datums/components/stationloving.dm index a999624c32..54f8b107e0 100644 --- a/code/datums/components/stationloving.dm +++ b/code/datums/components/stationloving.dm @@ -28,13 +28,7 @@ CRASH("Unable to find a blobstart landmark") var/atom/movable/AM = parent - if(ismob(AM.loc)) - var/mob/M = AM.loc - M.transferItemToLoc(AM, targetturf, TRUE) //nodrops disks when? - else if(AM.loc.SendSignal(COMSIG_CONTAINS_STORAGE)) - AM.loc.SendSignal(COMSIG_TRY_STORAGE_TAKE, src, targetturf, TRUE) - else - AM.forceMove(targetturf) + AM.forceMove(targetturf) // move the disc, so ghosts remain orbiting it even if it's "destroyed" return targetturf diff --git a/code/datums/components/storage/concrete/_concrete.dm b/code/datums/components/storage/concrete/_concrete.dm index 4234dadd85..8701252fe6 100644 --- a/code/datums/components/storage/concrete/_concrete.dm +++ b/code/datums/components/storage/concrete/_concrete.dm @@ -73,6 +73,8 @@ slave.refresh_mob_views() /datum/component/storage/concrete/emp_act(severity) + if(emp_shielded) + return var/atom/real_location = real_location() for(var/i in real_location) var/atom/A = i diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 483ab07e47..084056fb10 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -369,10 +369,10 @@ . = TRUE //returns TRUE if any mobs actually got a close(M) call /datum/component/storage/proc/emp_act(severity) - var/atom/A = parent - if(!isliving(A.loc) && !emp_shielded) - var/datum/component/storage/concrete/master = master() - master.emp_act(severity) + if(emp_shielded) + return + var/datum/component/storage/concrete/master = master() + master.emp_act(severity) //This proc draws out the inventory and places the items on it. tx and ty are the upper left tile and mx, my are the bottm right. //The numbers are calculated from the bottom-left The bottom-left slot being 1,1. @@ -455,23 +455,24 @@ return FALSE handle_item_insertion(I, FALSE, M) -/datum/component/storage/proc/return_inv() - . = list() - . += contents() - for(var/i in contents()) - var/atom/a = i - GET_COMPONENT_FROM(STR, /datum/component/storage, a) - if(STR) - . += STR.return_inv() +/datum/component/storage/proc/return_inv(recursive) + var/list/ret = list() + ret |= contents() + if(recursive) + for(var/i in ret.Copy()) + var/atom/A = i + A.SendSignal(COMSIG_TRY_STORAGE_RETURN_INVENTORY, ret, TRUE) + return ret /datum/component/storage/proc/contents() //ONLY USE IF YOU NEED TO COPY CONTENTS OF REAL LOCATION, COPYING IS NOT AS FAST AS DIRECT ACCESS! var/atom/real_location = real_location() return real_location.contents.Copy() -/datum/component/storage/proc/signal_return_inv(list/interface) +//Abuses the fact that lists are just references, or something like that. +/datum/component/storage/proc/signal_return_inv(list/interface, recursive = TRUE) if(!islist(interface)) return FALSE - interface |= return_inv() + interface |= return_inv(recursive) return TRUE /datum/component/storage/proc/mousedrop_onto(atom/over_object, mob/M) diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm index 7be86b2595..dcdda966a7 100644 --- a/code/datums/traits/negative.dm +++ b/code/datums/traits/negative.dm @@ -65,8 +65,8 @@ var/where = H.equip_in_one_of_slots(heirloom, slots) if(!where) where = "at your feet" - if(where == "in your backpack") - H.back.SendSignal(COMSIG_TRY_STORAGE_SHOW, H) + else if(where == "in your backpack") + H.back.SendSignal(COMSIG_TRY_STORAGE_SHOW, H) where_text = "There is a precious family [heirloom.name] [where], passed down from generation to generation. Keep it safe!" /datum/trait/family_heirloom/post_add() diff --git a/code/datums/world_topic.dm b/code/datums/world_topic.dm index 9fcec7cc11..ec00351b52 100644 --- a/code/datums/world_topic.dm +++ b/code/datums/world_topic.dm @@ -164,9 +164,16 @@ .["security_level"] = get_security_level() .["round_duration"] = SSticker ? round((world.time-SSticker.round_start_time)/10) : 0 // Amount of world's ticks in seconds, useful for calculating round duration + + //Time dilation stats. + .["time_dilation_current"] = SStime_track.time_dilation_current + .["time_dilation_avg"] = SStime_track.time_dilation_avg + .["time_dilation_avg_slow"] = SStime_track.time_dilation_avg_slow + .["time_dilation_avg_fast"] = SStime_track.time_dilation_avg_fast if(SSshuttle && SSshuttle.emergency) .["shuttle_mode"] = SSshuttle.emergency.mode // Shuttle status, see /__DEFINES/stat.dm .["shuttle_timer"] = SSshuttle.emergency.timeLeft() // Shuttle timer, in seconds + diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index e90f69bf23..b58fb7ee34 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -291,6 +291,7 @@ /obj/machinery/computer/arcade/battle/emag_act(mob/user) if(obj_flags & EMAGGED) return + to_chat(user, "A mesmerizing Rhumba beat starts playing from the arcade machine's speakers!") temp = "If you die in the game, you die for real!" player_hp = 30 player_mp = 10 @@ -614,7 +615,7 @@ L.Stun(200, ignore_canstun = TRUE) //you can't run :^) var/S = new /obj/singularity/academy(usr.loc) addtimer(CALLBACK(src, /atom/movable/proc/say, "[S] winks out, just as suddenly as it appeared."), 50) - QDEL_IN(src, 50) + QDEL_IN(S, 50) else event = null turns += 1 diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 616cd27a2d..b00212b0de 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -812,16 +812,18 @@ to_chat(usr, "The [name] is already occupied!") log_append_to_last("Permission denied.") return - var/passed if(dna_lock) + var/passed = FALSE if(user.has_dna()) var/mob/living/carbon/C = user if(C.dna.unique_enzymes==dna_lock) - passed = 1 - else if(operation_allowed(user)) - passed = 1 - if(!passed) - to_chat(user, "Access denied.") + passed = TRUE + if (!passed) + to_chat(user, "Access denied. [name] is secured with a DNA lock.") + log_append_to_last("Permission denied.") + return + if(!operation_allowed(user)) + to_chat(user, "Access denied. Insufficient operation keycodes.") log_append_to_last("Permission denied.") return if(user.buckled) diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index b3cb0ff9c4..035fc845c4 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -8,7 +8,7 @@ anchored = TRUE light_range = 3 var/movechance = 70 - var/obj/item/assembly/signaler/anomaly/aSignal = null + var/obj/item/assembly/signaler/anomaly/aSignal var/area/impact_area var/lifespan = 990 @@ -26,10 +26,12 @@ aSignal = new(src) aSignal.name = "[name] core" aSignal.code = rand(1,100) + aSignal.anomaly_type = type - aSignal.frequency = rand(MIN_FREE_FREQ, MAX_FREE_FREQ) - if(ISMULTIPLE(aSignal.frequency, 2))//signaller frequencies are always uneven! - aSignal.frequency++ + var/frequency = rand(MIN_FREE_FREQ, MAX_FREE_FREQ) + if(ISMULTIPLE(frequency, 2))//signaller frequencies are always uneven! + frequency++ + aSignal.set_frequency(frequency) if(new_lifespan) lifespan = new_lifespan diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 4e298032db..e5335049ec 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -766,3 +766,18 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) // Returns a numeric value for sorting items used as parts in machines, so they can be replaced by the rped /obj/item/proc/get_part_rating() return 0 + +/obj/item/doMove(atom/destination) + if (ismob(loc)) + var/mob/M = loc + var/hand_index = M.get_held_index_of_item(src) + if(hand_index) + M.held_items[hand_index] = null + M.update_inv_hands() + if(M.client) + M.client.screen -= src + layer = initial(layer) + plane = initial(plane) + appearance_flags &= ~NO_CLIENT_COLOR + dropped(M) + return ..() diff --git a/code/game/objects/items/RPD.dm b/code/game/objects/items/RPD.dm index b005d0dd64..2c977e9d09 100644 --- a/code/game/objects/items/RPD.dm +++ b/code/game/objects/items/RPD.dm @@ -138,7 +138,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list( return "makepipe=[id]&type=[dirtype]" /datum/pipe_info/meter - icon_state = "meterX" + icon_state = "meter" dirtype = PIPE_ONEDIR /datum/pipe_info/meter/New(label) @@ -228,7 +228,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list( datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) - var/datum/asset/assets = get_asset_datum(/datum/asset/simple/icon_states/multiple_icons/pipes) + var/datum/asset/assets = get_asset_datum(/datum/asset/spritesheet/pipes) assets.send(user) ui = new(user, src, ui_key, "rpd", name, 300, 550, master_ui, state) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index d2324aa56c..08ae20c792 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -178,20 +178,20 @@ GLOBAL_LIST_EMPTY(PDAs) . = ..() - var/datum/asset/assets = get_asset_datum(/datum/asset/simple/pda) + var/datum/asset/spritesheet/assets = get_asset_datum(/datum/asset/spritesheet/simple/pda) assets.send(user) user.set_machine(src) var/dat = "Personal Data Assistant" + dat += assets.css_tag() - - dat += "Refresh" + dat += "[PDAIMG(refresh)]Refresh" if ((!isnull(cartridge)) && (mode == 0)) - dat += " | Eject [cartridge]" + dat += " | [PDAIMG(eject)]Eject [cartridge]" if (mode) - dat += " | Return" + dat += " | [PDAIMG(menu)]Return" if (mode == 0) dat += "
" @@ -205,7 +205,7 @@ GLOBAL_LIST_EMPTY(PDAs) if (!owner) dat += "Warning: No owner information entered. Please swipe card.

" - dat += "Retry" + dat += "[PDAIMG(refresh)]Retry" else switch (mode) if (0) @@ -221,38 +221,38 @@ GLOBAL_LIST_EMPTY(PDAs) dat += "

General Functions

" dat += "" if (cartridge.access & CART_ENGINE) dat += "

Engineering Functions

" dat += "" if (cartridge.access & CART_MEDICAL) dat += "

Medical Functions

" dat += "" if (cartridge.access & CART_SECURITY) dat += "

Security Functions

" dat += "" if(cartridge.access & CART_QUARTERMASTER) dat += "

Quartermaster Functions:

" dat += "" dat += "" @@ -260,25 +260,25 @@ GLOBAL_LIST_EMPTY(PDAs) dat += "" if (1) - dat += "

Notekeeper V2.2

" + dat += "

[PDAIMG(notes)] Notekeeper V2.2

" dat += "Edit
" if(notescanned) dat += "(This is a scanned image, editing it may cause some text formatting to change.)
" dat += "
[(!notehtml ? note : notehtml)]" if (2) - dat += "

SpaceMessenger V3.9.6

" - dat += "Ringer: [silent == 1 ? "Off" : "On"] | " - dat += "Send / Receive: [toff == 1 ? "Off" : "On"] | " - dat += "Set Ringtone | " - dat += "Messages
" + dat += "

[PDAIMG(mail)] SpaceMessenger V3.9.6

" + dat += "[PDAIMG(bell)]Ringer: [silent == 1 ? "Off" : "On"] | " + dat += "[PDAIMG(mail)]Send / Receive: [toff == 1 ? "Off" : "On"] | " + dat += "[PDAIMG(bell)]Set Ringtone | " + dat += "[PDAIMG(mail)]Messages
" if(cartridge) dat += cartridge.message_header() - dat += "

Detected PDAs

" + dat += "

[PDAIMG(menu)] Detected PDAs

" dat += "