12/21 modernizations from TG live (#103)
* sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes
This commit is contained in:
+55
-34
@@ -1,4 +1,4 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
|
||||
/var/const/access_security = 1 // Security equipment
|
||||
/var/const/access_brig = 2 // Brig timers and permabrig
|
||||
@@ -64,6 +64,7 @@
|
||||
/var/const/access_mineral_storeroom = 64
|
||||
/var/const/access_minisat = 65
|
||||
/var/const/access_weapons = 66 //Weapon authorization for secbots
|
||||
/var/const/access_network = 67
|
||||
|
||||
//BEGIN CENTCOM ACCESS
|
||||
/*Should leave plenty of room if we need to add more access levels.
|
||||
@@ -82,6 +83,19 @@
|
||||
/var/const/access_syndicate = 150//General Syndicate Access
|
||||
/var/const/access_syndicate_leader = 151//Nuke Op Leader Access
|
||||
|
||||
//Away Missions or Ruins
|
||||
/*For generic away-mission/ruin access. Why would normal crew have access to a long-abandoned derelict
|
||||
or a 2000 year-old temple? */
|
||||
/var/const/access_away_general = 200//General facilities.
|
||||
/var/const/access_away_maint = 201//Away maintenance
|
||||
/var/const/access_away_med = 202//Away medical
|
||||
/var/const/access_away_sec = 203//Away security
|
||||
/var/const/access_away_engine = 204//Away engineering
|
||||
/var/const/access_away_generic1 = 205//Away generic access
|
||||
/var/const/access_away_generic2 = 206
|
||||
/var/const/access_away_generic3 = 207
|
||||
/var/const/access_away_generic4 = 208
|
||||
|
||||
/obj/var/list/req_access = null
|
||||
/obj/var/req_access_txt = "0"
|
||||
/obj/var/list/req_one_access = null
|
||||
@@ -91,28 +105,29 @@
|
||||
/obj/proc/allowed(mob/M)
|
||||
//check if it doesn't require any access at all
|
||||
if(src.check_access(null))
|
||||
return 1
|
||||
if(istype(M, /mob/living/silicon))
|
||||
//AI can do whatever he wants
|
||||
return 1
|
||||
return TRUE
|
||||
if(issilicon(M))
|
||||
if(ispAI(M))
|
||||
return FALSE
|
||||
return TRUE //AI can do whatever it wants
|
||||
if(IsAdminGhost(M))
|
||||
//Access can't stop the abuse
|
||||
return 1
|
||||
else if(istype(M, /mob/living/carbon/human))
|
||||
return TRUE
|
||||
else if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
//if they are holding or wearing a card that has access, that works
|
||||
if(src.check_access(H.get_active_hand()) || src.check_access(H.wear_id))
|
||||
return 1
|
||||
else if(istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/alien/humanoid))
|
||||
if(check_access(H.get_active_held_item()) || src.check_access(H.wear_id))
|
||||
return TRUE
|
||||
else if(ismonkey(M) || isalienadult(M))
|
||||
var/mob/living/carbon/george = M
|
||||
//they can only hold things :(
|
||||
if(src.check_access(george.get_active_hand()))
|
||||
return 1
|
||||
if(check_access(george.get_active_held_item()))
|
||||
return TRUE
|
||||
else if(isanimal(M))
|
||||
var/mob/living/simple_animal/A = M
|
||||
if(check_access(A.access_card))
|
||||
return 1
|
||||
return 0
|
||||
if(check_access(A.get_active_held_item()) || check_access(A.access_card))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/proc/GetAccess()
|
||||
return list()
|
||||
@@ -120,7 +135,8 @@
|
||||
/obj/item/proc/GetID()
|
||||
return null
|
||||
|
||||
/obj/proc/check_access(obj/item/I)
|
||||
//Call this before using req_access or req_one_access directly
|
||||
/obj/proc/gen_access()
|
||||
//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()
|
||||
@@ -140,45 +156,48 @@
|
||||
if(n)
|
||||
req_one_access += n
|
||||
|
||||
/obj/proc/check_access(obj/item/I)
|
||||
gen_access()
|
||||
|
||||
if(!istype(src.req_access, /list)) //something's very wrong
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
var/list/L = src.req_access
|
||||
if(!L.len && (!src.req_one_access || !src.req_one_access.len)) //no requirements
|
||||
return 1
|
||||
return TRUE
|
||||
if(!I)
|
||||
return 0
|
||||
return FALSE
|
||||
for(var/req in src.req_access)
|
||||
if(!(req in I.GetAccess())) //doesn't have this access
|
||||
return 0
|
||||
return FALSE
|
||||
if(src.req_one_access && src.req_one_access.len)
|
||||
for(var/req in src.req_one_access)
|
||||
if(req in I.GetAccess()) //has an access from the single access list
|
||||
return 1
|
||||
return 0
|
||||
return 1
|
||||
return TRUE
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/proc/check_access_list(list/L)
|
||||
if(!src.req_access && !src.req_one_access)
|
||||
return 1
|
||||
return TRUE
|
||||
if(!istype(src.req_access, /list))
|
||||
return 1
|
||||
return TRUE
|
||||
if(!src.req_access.len && (!src.req_one_access || !src.req_one_access.len))
|
||||
return 1
|
||||
return TRUE
|
||||
if(!L)
|
||||
return 0
|
||||
return FALSE
|
||||
if(!istype(L, /list))
|
||||
return 0
|
||||
return FALSE
|
||||
for(var/req in src.req_access)
|
||||
if(!(req in L)) //doesn't have this access
|
||||
return 0
|
||||
return FALSE
|
||||
if(src.req_one_access && src.req_one_access.len)
|
||||
for(var/req in src.req_one_access)
|
||||
if(req in L) //has an access from the single access list
|
||||
return 1
|
||||
return 0
|
||||
return 1
|
||||
return TRUE
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/proc/get_centcom_access(job)
|
||||
switch(job)
|
||||
@@ -224,7 +243,7 @@
|
||||
access_hydroponics, access_library, access_lawyer, access_virology, access_cmo, access_qm, access_surgery,
|
||||
access_theatre, access_research, access_mining, access_mailsorting, access_weapons,
|
||||
access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce,
|
||||
access_keycard_auth, access_tcomsat, access_gateway, access_mineral_storeroom, access_minisat)
|
||||
access_keycard_auth, access_tcomsat, access_gateway, access_mineral_storeroom, access_minisat, access_network)
|
||||
|
||||
/proc/get_all_centcom_access()
|
||||
return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_medical, access_cent_living, access_cent_storage, access_cent_teleporter, access_cent_captain)
|
||||
@@ -254,7 +273,7 @@
|
||||
if(3) //medbay
|
||||
return list(access_medical, access_genetics, access_morgue, access_chemistry, access_virology, access_surgery, access_cmo)
|
||||
if(4) //research
|
||||
return list(access_research, access_tox, access_tox_storage, access_genetics, access_robotics, access_xenobiology, access_minisat, access_rd)
|
||||
return list(access_research, access_tox, access_tox_storage, access_genetics, access_robotics, access_xenobiology, access_minisat, access_rd, access_network)
|
||||
if(5) //engineering and maintenance
|
||||
return list(access_construction, access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_tcomsat, access_minisat, access_ce)
|
||||
if(6) //supply
|
||||
@@ -411,6 +430,8 @@
|
||||
return "AI Satellite"
|
||||
if(access_weapons)
|
||||
return "Weapon Permit"
|
||||
if(access_network)
|
||||
return "Network Access"
|
||||
|
||||
/proc/get_centcom_access_desc(A)
|
||||
switch(A)
|
||||
|
||||
Reference in New Issue
Block a user