diff --git a/.travis.yml b/.travis.yml index 1179893464..ebf5ffefbb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,7 @@ script: - shopt -s globstar - (! grep 'step_[xy]' maps/**/*.dmm) - (! find nano/templates/ -type f -exec md5sum {} + | sort | uniq -D -w 32 | grep nano) - - ( md5sum -c - <<< "0af969f671fba6cf9696c78cd175a14a *baystation12.int") + - md5sum -c - <<< "0af969f671fba6cf9696c78cd175a14a *baystation12.int" + - md5sum -c - <<< "88490b460c26947f5ec1ab1bb9fa9f17 *html/changelogs/example.yml" - python tools/GenerateChangelog/ss13_genchangelog.py html/changelog.html html/changelogs - DreamMaker baystation12.dme diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 04d7ef41e9..a5a2e087a2 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -438,6 +438,7 @@ area/space/atmosalert() name = "\improper Thunderdome" icon_state = "thunder" requires_power = 0 + lighting_use_dynamic = 0 /area/tdome/tdome1 name = "\improper Thunderdome (Team 1)" diff --git a/code/game/atoms.dm b/code/game/atoms.dm index bf19c809a5..c811163330 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -35,16 +35,12 @@ else return null -//Currently used only for cryo cells, because they are also pipes and so overriding their return_air() would break their pipe-behaviour. -//If cryo cells are ever rewritten so that the part that contains the human is separate from the pipe part -- -//such as rewriting them so that they are a machine that contains a pipe segment (or a pipe that contains a machine that contains the human?) -- then this can be removed. -/atom/proc/return_air_for_internal_lifeform() - return return_air() - +//return flags that should be added to the viewer's sight var. +//Otherwise return a negative number to indicate that the view should be cancelled. /atom/proc/check_eye(user as mob) if (istype(user, /mob/living/silicon/ai)) // WHYYYY - return 1 - return + return 0 + return -1 /atom/proc/on_reagent_change() return diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 6675f183fd..2a0b7ca1bc 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -260,6 +260,11 @@ //I guess that doesn't matter since they couldn't use it anyway? kick_viewers() +/obj/machinery/camera/check_eye(mob/user) + if(!can_use()) return -1 + if(isXRay()) return SEE_TURFS|SEE_MOBS|SEE_OBJS + return 0 + //This might be redundant, because of check_eye() /obj/machinery/camera/proc/kick_viewers() for(var/mob/O in player_list) diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 95235be3e4..71996d088c 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -28,11 +28,13 @@ check_eye(var/mob/user as mob) if (user.stat || ((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded) && !istype(user, /mob/living/silicon))) //user can't see - not sure why canmove is here. - return null - if ( !current || !current.can_use() ) //camera doesn't work + return -1 + if(!current) + return 0 + var/viewflag = current.check_eye(user) + if ( viewflag < 0 ) //camera doesn't work reset_current() - user.reset_view(current) - return 1 + return viewflag ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) if(src.z > 6) return @@ -87,7 +89,7 @@ if(src.z>6 || stat&(NOPOWER|BROKEN)) return if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return reset_current() - usr.check_eye(current) + usr.reset_view(current) return 1 else . = ..() @@ -123,8 +125,8 @@ if (!C.can_use() || user.stat || (get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) && !istype(user, /mob/living/silicon))) return 0 set_current(C) + user.reset_view(current) check_eye(user) - use_power(50) return 1 //Camera control: moving. @@ -166,6 +168,7 @@ src.current = C if(current) + use_power = 2 var/mob/living/L = current.loc if(istype(L)) L.tracking_initiated() @@ -176,6 +179,7 @@ if(istype(L)) L.tracking_cancelled() current = null + use_power = 1 //Camera control: mouse. /atom/DblClick() diff --git a/code/game/machinery/computer/camera_monitor.dm b/code/game/machinery/computer/camera_monitor.dm deleted file mode 100644 index 11e8ddd43c..0000000000 --- a/code/game/machinery/computer/camera_monitor.dm +++ /dev/null @@ -1,67 +0,0 @@ - -/obj/machinery/computer/security - New() - if(network) - networks = list(network) - else - switch(department) - if("Security") - networks = list("Arrivals","SS13","Engineering","Research","Medbay","Tcomsat","Mess Hall","Security","Prison Wing","Atmospherics","Cargo","Command","Solars","Robotics","Chapel","Hydroponics", "Dormitory","Theatre","Library") - if("Engineering") - networks = list("Engineering","Tcomsat","Singularity","Atmospherics","Solars","Robotics") - if("Research") - networks = list("Research","Bomb Testing","Outpost") - if("Medbay") - networks = list("Medbay") - if("Cargo") - networks = list("Mine","Cargo") - if("Mining") - networks = list("Mine") - if("Thunderdome") - networks = list("thunder") - if("CREED") - networks = list("CREED") - -/obj/machinery/computer/security/attack_hand(var/mob/user as mob) - if (stat & (NOPOWER|BROKEN)) - return - - user.machine = src - if(src.current) - user.reset_view(src.current) - - var/list/L = new/list - for (var/obj/machinery/camera/C in world) - L.Add(C) - - camera_network_sort(L) - - var/list/D = new() - D["Cancel"] = "Cancel" - for (var/obj/machinery/camera/C in L) - if ( C.network in src.networks ) - D[text("[]: [][]", C.network, C.c_tag, (C.can_use() ? null : " (Deactivated)"))] = C - - var/t = input(user, "Which camera should you change to?") as null|anything in D - - if(!t) - user.machine = null - user.reset_view(null) - return 0 - - var/obj/machinery/camera/C = D[t] - - if (t == "Cancel") - user.cancel_camera() - return 0 - - if (C) - if ((get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) || !( C.status )) && (!istype(user, /mob/living/silicon/ai))) - return 0 - else - src.current = C - use_power(50) - user.reset_view(C) - - spawn( 5 ) - attack_hand(user) diff --git a/code/game/machinery/computer3/bios.dm b/code/game/machinery/computer3/bios.dm index 17ed0c4789..9b590bf3af 100644 --- a/code/game/machinery/computer3/bios.dm +++ b/code/game/machinery/computer3/bios.dm @@ -69,16 +69,16 @@ if(!interactable(user) || user.machine != src) if(user.machine == src) user.unset_machine() - return null + return -1 var/datum/file/program/security/S = program if( !istype(S) || !S.current || !S.current.status || !camnet ) if( user.machine == src ) user.unset_machine() - return null + return -1 - user.reset_view(S.current) - return 1 + user.reset_view(S.current, 0) + return 0 /* List all files, including removable disks and data cards diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index cb0620691c..4a85b7e543 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -335,6 +335,9 @@ put_mob(usr) return +/atom/proc/return_air_for_internal_lifeform() + return return_air() + /obj/machinery/atmospherics/unary/cryo_cell/return_air_for_internal_lifeform() //assume that the cryo cell has some kind of breath mask or something that //draws from the cryo tube's environment, instead of the cold internal air. diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm index b283ed889c..ef8ada1bf4 100644 --- a/code/game/objects/items/devices/spy_bug.dm +++ b/code/game/objects/items/devices/spy_bug.dm @@ -143,7 +143,7 @@ c_tag = name /obj/machinery/camera/spy/check_eye(var/mob/user as mob) - return 1 + return 0 /obj/item/device/radio/spy listening = 0 diff --git a/code/modules/ext_scripts/irc.dm b/code/modules/ext_scripts/irc.dm index 19df691757..7975316508 100644 --- a/code/modules/ext_scripts/irc.dm +++ b/code/modules/ext_scripts/irc.dm @@ -1,7 +1,8 @@ /proc/send2irc(var/channel, var/msg) if(config.use_irc_bot && config.irc_bot_host) if(config.irc_bot_export) - world.Export("http://[config.irc_bot_host]:45678?[list2params(list(pwd=config.comms_password, chan=channel, mesg=msg))]") + spawn(-1) // spawn here prevents hanging in the case that the bot isn't reachable + world.Export("http://[config.irc_bot_host]:45678?[list2params(list(pwd=config.comms_password, chan=channel, mesg=msg))]") else if(config.use_lib_nudge) var/nudge_lib diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index 13bc1a4686..6e206ff10e 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -166,7 +166,7 @@ if (stat != 2) if (machine) - if (!( machine.check_eye(src) )) + if ( machine.check_eye(src) < 0) reset_view(null) else if(client && !client.adminobs) diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 2a6aba0bf6..dee4fe60a6 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -253,7 +253,7 @@ if (stat != 2) if (machine) - if (!( machine.check_eye(src) )) + if (machine.check_eye(src) < 0) reset_view(null) else if(client && !client.adminobs) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 36af219aee..a1bb324489 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1356,3 +1356,8 @@ if(W in organs) return ..() + +/mob/living/carbon/human/reset_view(atom/A, update_hud = 1) + ..() + if(update_hud) + handle_regular_hud_updates() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 18c9acd465..d603232f40 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1379,8 +1379,11 @@ client.screen |= global_hud.darkMask if(machine) - if(!machine.check_eye(src)) - reset_view(null) + var/viewflags = machine.check_eye(src) + if(viewflags < 0) + reset_view(null, 0) + else if(viewflags) + sight |= viewflags else if(eyeobj) if(eyeobj.owner != src) @@ -1394,7 +1397,7 @@ isRemoteObserve = 1 if(!isRemoteObserve && client && !client.adminobs) remoteview_target = null - reset_view(null) + reset_view(null, 0) return 1 proc/process_glasses(var/obj/item/clothing/glasses/G) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 8a01f86774..a229d5ae9f 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -33,8 +33,6 @@ var/mob_push_flags = 0 var/mob_always_swap = 0 - var/mob/living/cameraFollow = null - var/tod = null // Time of death var/update_slimes = 1 var/silent = null // Can't talk. Value goes down every life proc. diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index ac626586ce..878fcbf667 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -407,7 +407,7 @@ var/list/ai_verbs_default = list( if (!camera) return null user.reset_view(camera) - return 1 + return 0 /mob/living/silicon/ai/restrained() return 0 diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 09a25fbee4..c5783cfbb3 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -118,9 +118,9 @@ /mob/living/silicon/pai/check_eye(var/mob/user as mob) if (!src.current) - return null + return -1 user.reset_view(src.current) - return 1 + return 0 /mob/living/silicon/pai/blob_act() if (src.stat != 2) @@ -180,9 +180,6 @@ return /mob/living/silicon/pai/proc/switchCamera(var/obj/machinery/camera/C) - if(istype(usr, /mob/living)) - var/mob/living/U = usr - U.cameraFollow = null if (!C) src.unset_machine() src.reset_view(null) diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 615f1d3a41..cefc6a7331 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -284,7 +284,7 @@ if (src.stat != 2) if (src.machine) - if (!( src.machine.check_eye(src) )) + if (src.machine.check_eye(src) < 0) src.reset_view(null) else if(client && !client.adminobs) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index d7a006b41c..ab55741009 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -19,6 +19,7 @@ var/local_transmit //If set, can only speak to others of the same type within a short range. var/sensor_mode = 0 //Determines the current HUD. + var/mob/living/cameraFollow = null var/next_alarm_notice var/list/datum/alarm/queued_alarms = new() @@ -348,3 +349,8 @@ /mob/living/silicon/proc/is_malf_or_traitor() return is_traitor() || is_malf() + +/mob/living/silicon/reset_view() + ..() + if(cameraFollow) + cameraFollow = null diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 50dfbbfe93..f133330997 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -480,12 +480,8 @@ /mob/verb/cancel_camera() set name = "Cancel Camera View" set category = "OOC" - reset_view(null) unset_machine() - if(istype(src, /mob/living)) - var/mob/living/M = src - if(M.cameraFollow) - M.cameraFollow = null + reset_view(null) /mob/Topic(href, href_list) if(href_list["mach_close"]) diff --git a/html/changelog.html b/html/changelog.html index 731c4fd321..e1051c7441 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,12 @@ -->
+

30 June 2015

+

PsiOmegaDelta updated:

+ +

24 June 2015

HarpyEagle updated: