Merge branch 'master' of github.com:Baystation12/Baystation12 into dev

This commit is contained in:
Ccomp5950
2014-03-04 18:29:03 -06:00
31 changed files with 1562 additions and 1289 deletions
+18 -25
View File
@@ -90,29 +90,6 @@
/obj/var/list/req_one_access = null
/obj/var/req_one_access_txt = "0"
/obj/New()
..()
//NOTE: If a room requires more than one access (IE: Morgue + medbay) set the req_acesss_txt to "5;6" if it requires 5 and 6
if(src.req_access_txt)
var/list/req_access_str = text2list(req_access_txt,";")
if(!req_access)
req_access = list()
for(var/x in req_access_str)
var/n = text2num(x)
if(n)
req_access += n
if(src.req_one_access_txt)
var/list/req_one_access_str = text2list(req_one_access_txt,";")
if(!req_one_access)
req_one_access = list()
for(var/x in req_one_access_str)
var/n = text2num(x)
if(n)
req_one_access += n
//returns 1 if this mob has sufficient access to use this object
/obj/proc/allowed(mob/M)
//check if it doesn't require any access at all
@@ -140,9 +117,25 @@
return null
/obj/proc/check_access(obj/item/I)
//These generations have been moved out of /obj/New() because they were slowing down the creation of objects that never even used the access system.
if(!src.req_access)
src.req_access = list()
if(src.req_access_txt)
var/list/req_access_str = text2list(req_access_txt,";")
for(var/x in req_access_str)
var/n = text2num(x)
if(n)
req_access += n
if(!src.req_one_access)
src.req_one_access = list()
if(src.req_one_access_txt)
var/list/req_one_access_str = text2list(req_one_access_txt,";")
for(var/x in req_one_access_str)
var/n = text2num(x)
if(n)
req_one_access += n
if(!src.req_access && !src.req_one_access) //no requirements
return 1
if(!istype(src.req_access, /list)) //something's very wrong
return 1
+1 -1
View File
@@ -211,7 +211,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
//Update any existing objectives involving this mob.
for(var/datum/objective/O in all_objectives)
if(istype(O,/datum/objective/mutiny)) //We don't want revs to get objectives that aren't for heads of staff. Letting them win or lose based on cryo is silly so we remove the objective.
if(istype(O,/datum/objective/mutiny) && O.target == occupant.mind) //We don't want revs to get objectives that aren't for heads of staff. Letting them win or lose based on cryo is silly so we remove the objective.
del(O) //TODO: Update rev objectives on login by head (may happen already?) ~ Z
else if(O.target && istype(O.target,/datum/mind))
if(O.target == occupant.mind)
+25 -12
View File
@@ -244,12 +244,19 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
//#### Grab the connection datum ####//
var/datum/radio_frequency/connection = null
if(channel && channels && channels.len > 0)
if (channel == "department")
//world << "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\""
channel = channels[1]
connection = secure_radio_connections[channel]
else
if(channel == "headset")
channel = null
if(channel) // If a channel is specified, look for it.
if(channels && channels.len > 0)
if (channel == "department")
//world << "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\""
channel = channels[1]
connection = secure_radio_connections[channel]
if (!channels[channel]) // if the channel is turned off, don't broadcast
return
else
// If we were to send to a channel we don't have, drop it.
else // If a channel isn't specified, send to common.
connection = radio_connection
channel = null
if (!istype(connection))
@@ -744,7 +751,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
if(keyslot.syndie)
src.syndie = 1
var/mob/living/silicon/robot/Ro = usr
if(Ro.module)
src.config(Ro.module.channels)
for (var/ch_name in channels)
if(!radio_controller)
@@ -761,12 +770,16 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
if(usr.stat || !on)
return
if (href_list["mode"])
subspace_transmission = !subspace_transmission
if(!subspace_transmission)//Simple as fuck, clears the channel list to prevent talking/listening over them if subspace transmission is disabled
if(subspace_transmission != 1)
subspace_transmission = 1
usr << "Subspace Transmission is disabled"
else
subspace_transmission = 0
usr << "Subspace Transmission is enabled"
if(subspace_transmission == 1)//Simple as fuck, clears the channel list to prevent talking/listening over them if subspace transmission is disabled
channels = list()
else
recalculateChannels()
usr << "Subspace Transmission is [(subspace_transmission) ? "enabled" : "disabled"]"
..()
/obj/item/device/radio/borg/interact(mob/user as mob)
@@ -785,7 +798,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
<A href='byond://?src=\ref[src];mode=1'>Toggle Broadcast Mode</A><BR>
"}
if(subspace_transmission)//Don't even bother if subspace isn't turned on
if(!subspace_transmission)//Don't even bother if subspace isn't turned on
for (var/ch_name in channels)
dat+=text_sec_channel(ch_name, channels[ch_name])
dat+={"[text_wires()]</TT></body></html>"}
@@ -806,4 +819,4 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
return
/obj/item/device/radio/off
listening = 0
listening = 0
+1 -1
View File
@@ -189,7 +189,7 @@
/obj/item/stack/attack_hand(mob/user as mob)
if (user.get_inactive_hand() == src)
var/obj/item/stack/F = new src.type( user, amount=1)
var/obj/item/stack/F = new src.type( user, 1)
F.copy_evidences(src)
user.put_in_hands(F)
src.add_fingerprint(user)