Merge pull request #3 from ZomgPonies/master

updating my fork
This commit is contained in:
Bram961
2014-06-26 12:04:09 +02:00
46 changed files with 24854 additions and 24691 deletions
+5
View File
@@ -392,3 +392,8 @@ proc/listclearnulls(list/list)
var/list/out = insertion_sort_numeric_list_ascending(L)
//world.log << " output: [out.len]"
return reverselist(out)
/proc/find_record(field, value, list/L)
for(var/datum/data/record/R in L)
if(R.fields[field] == value)
return R
@@ -7,22 +7,22 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
/datum/emergency_shuttle_controller
var/datum/shuttle/ferry/emergency/shuttle
var/list/escape_pods
var/launch_time //the time at which the shuttle will be launched
var/auto_recall = 0 //if set, the shuttle will be auto-recalled
var/auto_recall_time //the time at which the shuttle will be auto-recalled
var/evac = 0 //1 = emergency evacuation, 0 = crew transfer
var/wait_for_launch = 0 //if the shuttle is waiting to launch
var/autopilot = 1 //set to 0 to disable the shuttle automatically launching
var/deny_shuttle = 0 //allows admins to prevent the shuttle from being called
var/departed = 0 //if the shuttle has left the station at least once
/datum/emergency_shuttle_controller/proc/setup_pods()
escape_pods = list()
var/datum/shuttle/ferry/escape_pod/pod
pod = new()
pod.location = 0
pod.warmup_time = 0
@@ -42,7 +42,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
pod.transit_direction = NORTH
pod.move_time = SHUTTLE_TRANSIT_DURATION_RETURN
escape_pods += pod
pod = new()
pod.location = 0
pod.warmup_time = 0
@@ -52,9 +52,9 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
pod.transit_direction = EAST
pod.move_time = SHUTTLE_TRANSIT_DURATION_RETURN
escape_pods += pod
//There is no pod 4, apparently.
pod = new()
pod.location = 0
pod.warmup_time = 0
@@ -72,12 +72,12 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
recall()
if (world.time >= launch_time) //time to launch the shuttle
stop_launch_countdown()
if (!shuttle.location) //leaving from the station
//launch the pods!
for (var/datum/shuttle/ferry/escape_pod/pod in escape_pods)
pod.launch(src)
if(autopilot)
shuttle.launch(src)
@@ -97,12 +97,12 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
//calls the shuttle for an emergency evacuation
/datum/emergency_shuttle_controller/proc/call_evac()
if(!can_call()) return
//set the launch timer
autopilot = 1
set_launch_countdown(get_shuttle_prep_time())
auto_recall_time = rand(world.time + 300, launch_time - 300)
evac = 1
captain_announce("An emergency evacuation shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
world << sound('sound/AI/shuttlecalled.ogg')
@@ -118,7 +118,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
autopilot = 1
set_launch_countdown(get_shuttle_prep_time())
auto_recall_time = rand(world.time + 300, launch_time - 300)
captain_announce("A crew transfer has been initiated. The shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
//recalls the shuttle
@@ -131,7 +131,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
if (evac)
captain_announce("The emergency shuttle has been recalled.")
world << sound('sound/AI/shuttlerecalled.ogg')
for(var/area/A in world)
if(istype(A, /area/hallway))
A.readyreset()
@@ -166,7 +166,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
return SHUTTLE_PREPTIME * 3 //15 minutes
return SHUTTLE_PREPTIME
/*
These procs are not really used by the controller itself, but are for other parts of the
@@ -198,7 +198,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
//returns 1 if the shuttle has gone to the station and come back at least once,
//used for game completion checking purposes
/datum/emergency_shuttle_controller/proc/returned()
return (departed && shuttle.moving_status != SHUTTLE_IDLE && shuttle.location) //we've gone to the station at least once, no longer in transit and are idle back at centcom
return (departed && shuttle.moving_status == SHUTTLE_IDLE && shuttle.location) //we've gone to the station at least once, no longer in transit and are idle back at centcom
//returns 1 if the shuttle is not idle at centcom
/datum/emergency_shuttle_controller/proc/online()
+6 -5
View File
@@ -56,7 +56,7 @@
if(!istype(T))
return
if(T.lighting_lumcount <= 2)
M.alpha -= 25
M.alpha = round(255 * 1.15)
else
M.alpha = round(255 * 0.80)
@@ -170,6 +170,7 @@
C.ExtinguishMob()
C.visible_message("\red A cloud of fine ice crystals engulfs [C]!")
log_admin("[ckey(src.key)] has used cryokinesis on [ckey(C.key)].")
//playsound(usr.loc, 'bamf.ogg', 50, 0)
@@ -515,7 +516,7 @@
if (61 to 80)
usr << "\blue <b>Condition</b>: [M.name] is suffering mild pain."
if (41 to 60)
usr << "\blue <b>Condition</b>: [M.name] is suffering significant pain."
usr << "\blue <b>Condition</b>: [M.name] is suffering significant pain."
if (21 to 40)
usr << "\blue <b>Condition</b>: [M.name] is suffering severe pain."
else
@@ -524,13 +525,13 @@
switch(M.a_intent)
if ("help")
usr << "\blue <b>Mood</b>: You sense benign thoughts from [M.name]."
usr << "\blue <b>Mood</b>: You sense benevolent thoughts from [M.name]."
if ("disarm")
usr << "\blue <b>Mood</b>: You sense cautious thoughts from [M.name]."
if ("grab")
usr << "\blue <b>Mood</b>: You sense aggressive thoughts from [M.name]."
usr << "\blue <b>Mood</b>: You sense hostile thoughts from [M.name]."
if ("harm")
usr << "\blue <b>Mood</b>: You sense violent thoughts from [M.name]."
usr << "\blue <b>Mood</b>: You sense cruel thoughts from [M.name]."
for(var/mob/living/L in view(7,M))
if (L == M)
continue
@@ -11,7 +11,7 @@ datum/directive/terminations/alien_fraud
datum/directive/terminations/alien_fraud/get_crew_to_terminate()
var/list/aliens[0]
for(var/mob/M in player_list)
if (is_alien(M) && M.is_ready())
if (M.is_ready() && is_alien(M))
aliens+=(M)
return aliens
@@ -6,7 +6,7 @@ datum/directive/bluespace_contagion
proc/get_infection_candidates()
var/list/candidates[0]
for(var/mob/M in player_list)
if (!M.is_mechanical() && M.is_ready())
if (M.is_ready() && !M.is_mechanical())
candidates+=(M)
return candidates
@@ -8,7 +8,7 @@ datum/directive/terminations/financial_crisis/get_crew_to_terminate()
var/list/civilians[0]
var/list/candidates = civilian_positions - "Head of Personnel"
for(var/mob/M in player_list)
if (candidates.Find(M.mind.assigned_role) && M.is_ready())
if (M.is_ready() && candidates.Find(M.mind.assigned_role))
civilians+=(M)
return civilians
@@ -16,14 +16,14 @@ datum/directive/ipc_virus
proc/get_ipcs()
var/list/machines[0]
for(var/mob/M in player_list)
if (M.get_species() == "Machine" && M.is_ready())
if (M.is_ready() && M.get_species() == "Machine")
machines+=(M)
return machines
proc/get_roboticists()
var/list/roboticists[0]
for(var/mob/M in player_list)
if (roboticist_roles.Find(M.mind.assigned_role) && M.is_ready())
if (M.is_ready() && roboticist_roles.Find(M.mind.assigned_role))
roboticists+=(M)
return roboticists
@@ -10,7 +10,7 @@ datum/directive/research_to_ripleys
proc/get_researchers()
var/list/researchers[0]
for(var/mob/M in player_list)
if (is_researcher(M) && M.is_ready())
if (M.is_ready() && is_researcher(M))
researchers+=(M)
return researchers
@@ -13,7 +13,7 @@ datum/directive/tau_ceti_needs_women
proc/get_crew_of_target_gender()
var/list/targets[0]
for(var/mob/M in player_list)
if(is_target_gender(M) && !M.is_mechanical() && M.is_ready())
if(M.is_ready() && is_target_gender(M) && !M.is_mechanical())
targets+=(M)
return targets
@@ -63,7 +63,7 @@ datum/directive/tau_ceti_needs_women/meets_prerequisites()
var/females = 0
var/males = 0
for(var/mob/M in player_list)
if(!M.is_mechanical() && M.get_species() != "Diona" && M.is_ready())
if(M.is_ready() && !M.is_mechanical() && M.get_species() != "Diona")
var/gender = M.get_gender()
if(gender == MALE)
males++
+7 -1
View File
@@ -71,6 +71,10 @@
/var/const/access_salvage_captain = 69 // Salvage ship captain's quarters
/var/const/access_mechanic = 70
/var/const/access_weapons = 99 //Weapon authorization for secbots
//BEGIN CENTCOM ACCESS
/*Should leave plenty of room if we need to add more access levels.
/var/const/Mostly for admin fun times.*/
@@ -219,7 +223,7 @@
access_hydroponics, access_library, access_lawyer, access_virology, access_psychiatrist, access_cmo, access_qm, access_clown, access_mime, access_surgery,
access_theatre, access_research, access_mining, access_mailsorting,
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_xenoarch, access_paramedic, access_blueshield, access_customs, access_mechanic)
access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_paramedic, access_blueshield, access_customs, access_mechanic,access_weapons)
/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_creed, access_cent_captain)
@@ -406,6 +410,8 @@
return "Customs"
if(access_mechanic)
return "Mechanic Workshop"
if(access_weapons)
return "Weapon Permit"
/proc/get_centcom_access_desc(A)
switch(A)
+94
View File
@@ -0,0 +1,94 @@
/*
Captain
*/
/datum/job/captain
title = "Captain"
flag = CAPTAIN
department_head = list("Centcom")
department_flag = ENGSEC
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "Nanotrasen officials and Space law"
selection_color = "#ccccff"
req_admin_notify = 1
minimal_player_age = 14
default_id = /obj/item/weapon/card/id/gold
default_pda = /obj/item/device/pda/captain
default_headset = /obj/item/device/radio/headset/heads/captain
default_backpack = /obj/item/weapon/storage/backpack/captain
default_satchel = /obj/item/weapon/storage/backpack/satchel_cap
access = list() //See get_access()
minimal_access = list() //See get_access()
/datum/job/captain/equip_items(var/mob/living/carbon/human/H)
var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
U.attachTie(new /obj/item/clothing/tie/medal/gold/captain())
H.equip_to_slot_or_del(U, slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/capcarapace(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
//Equip ID box
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/silver_ids(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/silver_ids(H.back), slot_in_backpack)
//Implant him
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
world << "<b>[H.real_name] is the captain!</b>"
/datum/job/captain/get_access()
return get_all_accesses()
/*
Head of Personnel
*/
/datum/job/hop
title = "Head of Personnel"
flag = HOP
department_head = list("Captain")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#ddddff"
req_admin_notify = 1
minimal_player_age = 10
default_id = /obj/item/weapon/card/id/silver
default_pda = /obj/item/device/pda/heads/hop
default_headset = /obj/item/device/radio/headset/heads/hop
access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers, access_weapons,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_mineral_storeroom)
minimal_access = list(access_security, access_sec_doors, access_court, access_weapons,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_mineral_storeroom)
/datum/job/hop/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/hopcap(H), slot_head)
//Equip ID box
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
+2 -2
View File
@@ -8,8 +8,8 @@
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue)
minimal_access = list(access_bar, access_maint_tunnels)
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue, access_weapons)
minimal_access = list(access_bar, access_maint_tunnels, access_weapons)
equip(var/mob/living/carbon/human/H)
+2 -2
View File
@@ -114,7 +114,7 @@
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chemist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/chemist(H), slot_wear_suit)
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
@@ -144,7 +144,7 @@
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_medsci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/geneticist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/genetics(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
switch(H.backbag)
+3 -3
View File
@@ -29,7 +29,7 @@
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/rd(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/research_director(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
switch(H.backbag)
@@ -65,7 +65,7 @@
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/toxins(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/pda/toxins(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/science(H), slot_wear_suit)
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
@@ -100,7 +100,7 @@
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/toxins(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/pda/toxins(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/science(H), slot_wear_suit)
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
+237 -237
View File
@@ -1,237 +1,237 @@
/datum/job/hos
title = "Head of Security"
flag = HOS
department_flag = ENGSEC
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#ffdddd"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway)
minimal_access = list(access_eva, access_security, access_sec_doors, access_brig, access_armory, access_court,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_customs)
minimal_player_age = 14
equip(var/mob/living/carbon/human/H)
if(!H) return 0
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/device/radio/headset/heads/hos(H), slot_l_ear)
H.equip_or_collect(new /obj/item/clothing/under/rank/head_of_security(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/heads/hos(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
// H.equip_or_collect(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
H.equip_or_collect(new /obj/item/weapon/gun/energy/gun(H), slot_s_store)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_store)
else
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
var/datum/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
return 1
/datum/job/warden
title = "Warden"
flag = WARDEN
department_flag = ENGSEC
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue)
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels)
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/warden(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/warden(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
// H.equip_or_collect(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_hand)
else
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
return 1
/datum/job/detective
title = "Detective"
flag = DETECTIVE
department_flag = ENGSEC
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of security"
selection_color = "#ffeeee"
alt_titles = list("Forensic Technician")
access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
minimal_access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
alt_titles = list("Forensic Technician")
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/det(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/detective(H), slot_wear_pda)
/* var/obj/item/clothing/mask/cigarette/CIG = new /obj/item/clothing/mask/cigarette(H)
CIG.light("")
H.equip_or_collect(CIG, slot_wear_mask) */
H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.mind.role_alt_title && H.mind.role_alt_title == "Forensic Technician")
H.equip_or_collect(new /obj/item/clothing/suit/storage/forensics/blue(H), slot_wear_suit)
else
H.equip_or_collect(new /obj/item/clothing/suit/storage/det_suit(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/head/det_hat(H), slot_head)
H.equip_or_collect(new /obj/item/weapon/lighter/zippo(H), slot_l_store)
if(H.backbag == 1)//Why cant some of these things spawn in his office?
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_or_collect(new /obj/item/weapon/storage/box/evidence(H), slot_l_hand)
H.equip_or_collect(new /obj/item/device/detective_scanner(H), slot_r_store)
else
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
H.equip_or_collect(new /obj/item/device/detective_scanner(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
H.dna.SetSEState(SOBERBLOCK,1)
H.mutations += M_SOBER
H.check_mutations = 1
return 1
/datum/job/officer
title = "Security Officer"
flag = OFFICER
department_flag = ENGSEC
faction = "Station"
total_positions = 5
spawn_positions = 5
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels)
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/security(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_s_store)
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_hand)
else
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
return 1
/datum/job/customs
title = "Customs Officer"
flag = CUSTOMS
department_flag = KARMA
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue)
minimal_access = list(access_brig, access_sec_doors, access_security, access_customs, access_maint_tunnels)
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/fluff/milo_hachert(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/head/helmet/customs(H), slot_head)
H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_s_store)
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/stamp(H), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/stamp/denied(H), slot_in_backpack)
return 1
/datum/job/brigdoc
title = "Brig Physician"
flag = BRIGDOC
department_flag = KARMA
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the warden"
selection_color = "#ffeeee"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
minimal_access = list(access_medical, access_morgue, access_surgery, access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/suit/storage/fr_jacket(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/medical(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
H.equip_or_collect(new /obj/item/device/flashlight/pen(H), slot_s_store)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
/datum/job/hos
title = "Head of Security"
flag = HOS
department_flag = ENGSEC
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#ffdddd"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_weapons)
minimal_access = list(access_eva, access_security, access_sec_doors, access_brig, access_armory, access_court,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_customs,access_weapons)
minimal_player_age = 14
equip(var/mob/living/carbon/human/H)
if(!H) return 0
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/device/radio/headset/heads/hos(H), slot_l_ear)
H.equip_or_collect(new /obj/item/clothing/under/rank/head_of_security(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/heads/hos(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
// H.equip_or_collect(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
H.equip_or_collect(new /obj/item/weapon/gun/energy/gun(H), slot_s_store)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_store)
else
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
var/datum/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
return 1
/datum/job/warden
title = "Warden"
flag = WARDEN
department_flag = ENGSEC
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue, access_weapons)
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_weapons)
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/warden(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/warden(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
// H.equip_or_collect(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_hand)
else
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
return 1
/datum/job/detective
title = "Detective"
flag = DETECTIVE
department_flag = ENGSEC
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of security"
selection_color = "#ffeeee"
alt_titles = list("Forensic Technician")
access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court, access_weapons)
minimal_access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court, access_weapons)
alt_titles = list("Forensic Technician")
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/det(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/detective(H), slot_wear_pda)
/* var/obj/item/clothing/mask/cigarette/CIG = new /obj/item/clothing/mask/cigarette(H)
CIG.light("")
H.equip_or_collect(CIG, slot_wear_mask) */
H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.mind.role_alt_title && H.mind.role_alt_title == "Forensic Technician")
H.equip_or_collect(new /obj/item/clothing/suit/storage/forensics/blue(H), slot_wear_suit)
else
H.equip_or_collect(new /obj/item/clothing/suit/storage/det_suit(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/head/det_hat(H), slot_head)
H.equip_or_collect(new /obj/item/weapon/lighter/zippo(H), slot_l_store)
if(H.backbag == 1)//Why cant some of these things spawn in his office?
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_or_collect(new /obj/item/weapon/storage/box/evidence(H), slot_l_hand)
H.equip_or_collect(new /obj/item/device/detective_scanner(H), slot_r_store)
else
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
H.equip_or_collect(new /obj/item/device/detective_scanner(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
H.dna.SetSEState(SOBERBLOCK,1)
H.mutations += M_SOBER
H.check_mutations = 1
return 1
/datum/job/officer
title = "Security Officer"
flag = OFFICER
department_flag = ENGSEC
faction = "Station"
total_positions = 5
spawn_positions = 5
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue, access_weapons)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_weapons)
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/security(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_s_store)
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_hand)
else
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
return 1
/datum/job/customs
title = "Customs Officer"
flag = CUSTOMS
department_flag = KARMA
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue, access_weapons)
minimal_access = list(access_brig, access_sec_doors, access_security, access_customs, access_maint_tunnels, access_weapons)
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/fluff/milo_hachert(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/head/helmet/customs(H), slot_head)
H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_s_store)
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/stamp(H), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/stamp/denied(H), slot_in_backpack)
return 1
/datum/job/brigdoc
title = "Brig Physician"
flag = BRIGDOC
department_flag = KARMA
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the warden"
selection_color = "#ffeeee"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
minimal_access = list(access_medical, access_morgue, access_surgery, access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/suit/storage/fr_jacket(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/medical(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
H.equip_or_collect(new /obj/item/device/flashlight/pen(H), slot_s_store)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
+4 -4
View File
@@ -62,13 +62,13 @@
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_weapons)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_customs)
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_customs, access_weapons)
equip(var/mob/living/carbon/human/H)
@@ -158,13 +158,13 @@
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_weapons)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
access_medical, access_engine, access_eva, access_heads,
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_blueshield)
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_blueshield, access_weapons)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
+1
View File
@@ -13,6 +13,7 @@
var/brute_dam_coeff = 1.0
var/open = 0//Maint panel
var/locked = 1
var/hacked = 0 //Used to differentiate between being hacked by silicons and emagged by humans.
//var/emagged = 0 //Urist: Moving that var to the general /bot tree as it's used by most bots
+71 -105
View File
@@ -7,7 +7,7 @@
density = 1
anchored = 0
// weight = 1.0E7
req_one_access = list(access_security, access_forensics_lockers)
req_access = list(access_security)
health = 100
maxhealth = 100
fire_dam_coeff = 0.7
@@ -27,7 +27,9 @@
var/last_found //There's a delay
var/frustration = 0
//var/emagged = 0 //Emagged Secbots view everyone as a criminal
var/idcheck = 1 //If false, all station IDs are authorized for weapons.
var/declare_arrests = 1 //When making an arrest, should it notify everyone wearing sechuds?
var/idcheck = 1 //If true, arrest people with no IDs
var/weaponscheck = 1 //If true, arrest people for weapons if they don't have access
var/check_records = 1 //Does it check security records?
var/arrest_type = 0 //If true, don't handcuff
var/projectile = null//Holder for projectile type, to avoid so many else if chains
@@ -46,6 +48,11 @@
var/beacon_freq = 1445 // navigation beacon frequency
var/control_freq = 1447 // bot control frequency
//List of weapons that secbots will not arrest for
var/safe_weapons = list(\
/obj/item/weapon/gun/energy/laser/bluetag,\
/obj/item/weapon/gun/energy/laser/redtag,\
/obj/item/weapon/gun/energy/laser/practice)
var/turf/patrol_target // this is turf to navigate to (location of beacon)
var/new_destination // pending new destination (waiting for beacon response)
@@ -118,34 +125,33 @@
var/dat
dat += text({"
<TT><B>Automatic Security Unit v2.5</B></TT><BR><BR>
Status: []<BR>
Behaviour controls are [src.locked ? "locked" : "unlocked"]<BR>
Maintenance panel panel is [src.open ? "opened" : "closed"]"},
Maintenance panel panel is [src.open ? "opened" : "closed"]<BR>"},
"<A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A>" )
if(!src.locked || issilicon(user))
if(!lasercolor)
dat += text({"<BR>
Check for Weapon Authorization: []<BR>
Check Security Records: []<BR>
Arrest for No ID: []<BR>
Arrest for Unauthorized Weapons: []<BR>
Arrest for Warrant: []<BR>
<BR>
Operating Mode: []<BR>
Report Arrests[]<BR>
Auto Patrol: []"},
"<A href='?src=\ref[src];operation=idcheck'>[src.idcheck ? "Yes" : "No"]</A>",
"<A href='?src=\ref[src];operation=weaponscheck'>[src.weaponscheck ? "Yes" : "No"]</A>",
"<A href='?src=\ref[src];operation=ignorerec'>[src.check_records ? "Yes" : "No"]</A>",
"<A href='?src=\ref[src];operation=switchmode'>[src.arrest_type ? "Detain" : "Arrest"]</A>",
"<A href='?src=\ref[src];operation=patrol'>[auto_patrol ? "On" : "Off"]</A>" )
else
dat += text({"<BR>
Auto Patrol: []"},
"<A href='?src=\ref[src];operation=declarearrests'>[src.declare_arrests ? "Yes" : "No"]</A>",
"<A href='?src=\ref[src];operation=patrol'>[auto_patrol ? "On" : "Off"]</A>" )
user << browse("<HEAD><TITLE>Securitron v2.5 controls</TITLE></HEAD>[dat]", "window=autosec")
onclose(user, "autosec")
var/datum/browser/popup = new(user, "autosec", "Securitron v2.6 controls")
popup.set_content(dat)
popup.open()
return
/obj/machinery/bot/ed209/Topic(href, href_list)
@@ -170,16 +176,34 @@ Auto Patrol: []"},
if ("idcheck")
src.idcheck = !src.idcheck
src.updateUsrDialog()
if ("ignorerec")
if("weaponscheck")
src.weaponscheck = !src.weaponscheck
src.updateUsrDialog()
if("ignorerec")
src.check_records = !src.check_records
src.updateUsrDialog()
if ("switchmode")
if("switchmode")
src.arrest_type = !src.arrest_type
src.updateUsrDialog()
if("patrol")
auto_patrol = !auto_patrol
mode = SECBOT_IDLE
updateUsrDialog()
if("declarearrests")
src.declare_arrests = !src.declare_arrests
src.updateUsrDialog()
if("hack")
if(!src.emagged)
src.emagged = 2
src.hacked = 1
usr << "<span class='warning'>You disable [src]'s combat inhibitor.</span>"
else if(!src.hacked)
usr << "<span class='userdanger'>[src] ignores your attempts to restrict it!</span>"
else
src.emagged = 0
src.hacked = 0
usr << "<span class='notice'>You restore [src]'s combat inhibitor.</span>"
src.updateUsrDialog()
/obj/machinery/bot/ed209/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
@@ -213,6 +237,7 @@ Auto Patrol: []"},
if(user) src.oldtarget_name = user.name
src.last_found = world.time
src.anchored = 0
src.declare_arrests = 0
src.emagged = 2
src.on = 1
src.icon_state = "[lasercolor]ed209[src.on]"
@@ -230,9 +255,7 @@ Auto Patrol: []"},
if ((C.stat) || (C.lying))
continue
if (istype(C, /mob/living/carbon/human))
threatlevel = src.assess_perp(C)
else if ((istype(C, /mob/living/carbon/monkey)) && (C.client) && (ticker.mode.name == "monkey"))
threatlevel = 4
threatlevel = C.assess_threat(src, lasercolor)
//src.speak(C.real_name + text(": threat: []", threatlevel))
if (threatlevel < 4 )
continue
@@ -284,13 +307,18 @@ Auto Patrol: []"},
M.Stun(10)
M.Weaken(10)
else
M.Weaken(10)
M.stuttering = 10
M.Stun(10)
M.Weaken(5)
M.stuttering = 5
M.Stun(5)
if(declare_arrests)
declare_arrest()
target.visible_message("<span class='danger'>[src.target] has been stunned by [src]!</span>",\
"<span class='userdanger'>[src.target] has been stunned by [src]!</span></span>")
maxstuns--
if (maxstuns <= 0)
if(maxstuns <= 0)
target = null
visible_message("\red <B>[src.target] has been stunned by [src]!</B>")
mode = SECBOT_PREP_ARREST
src.anchored = 1
@@ -323,7 +351,8 @@ Auto Patrol: []"},
if (!src.target.handcuffed && !src.arrest_type)
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
mode = SECBOT_ARREST
visible_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>")
target.visible_message("<span class='danger'>[src] is trying to put handcuffs on [src.target]!</span>",\
"<span class='userdanger'>[src] is trying to put handcuffs on [src.target]!</span>")
spawn(60)
if (get_dist(src, src.target) <= 1)
@@ -636,10 +665,7 @@ Auto Patrol: []"},
if ((C.name == src.oldtarget_name) && (world.time < src.last_found + 100))
continue
if (istype(C, /mob/living/carbon/human))
src.threatlevel = src.assess_perp(C)
else if ((istype(C, /mob/living/carbon/monkey)) && (C.client) && (ticker.mode.name == "monkey"))
src.threatlevel = 4
src.threatlevel = C.assess_threat(src, lasercolor)
if (!src.threatlevel)
continue
@@ -658,80 +684,11 @@ Auto Patrol: []"},
else
continue
//If the security records say to arrest them, arrest them
//Or if they have weapons and aren't security, arrest them.
/obj/machinery/bot/ed209/proc/assess_perp(mob/living/carbon/human/perp as mob)
var/threatcount = 0
if(src.emagged == 2) return 10 //Everyone is a criminal!
if((src.idcheck) || (isnull(perp:wear_id)) || (istype(perp:wear_id.GetID(), /obj/item/weapon/card/id/syndicate)))
if((istype(perp.l_hand, /obj/item/weapon/gun) && !istype(perp.l_hand, /obj/item/weapon/gun/projectile/shotgun)) || istype(perp.l_hand, /obj/item/weapon/melee/baton))
if(!istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 4
if(istype(perp.r_hand, /obj/item/weapon/gun) || istype(perp.r_hand, /obj/item/weapon/melee))
if(!istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 4
if(istype(perp:belt, /obj/item/weapon/gun) || istype(perp:belt, /obj/item/weapon/melee))
if(!istype(perp:belt, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp:belt, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp:belt, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 2
if(istype(perp:wear_suit, /obj/item/clothing/suit/wizrobe))
threatcount += 2
if(perp.dna && perp.dna.mutantrace && perp.dna.mutantrace != "none")
threatcount += 2
//Agent cards lower threatlevel when normal idchecking is off.
if((perp.wear_id && istype(perp:wear_id.GetID(), /obj/item/weapon/card/id/syndicate)) && src.idcheck)
threatcount -= 2
if(src.lasercolor == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
threatcount = 0//They will not, however shoot at people who have guns, because it gets really fucking annoying
if(istype(perp.wear_suit, /obj/item/clothing/suit/redtag))
threatcount += 4
if((istype(perp:r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(perp:l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
threatcount += 4
if(istype(perp:belt, /obj/item/weapon/gun/energy/laser/redtag))
threatcount += 2
if(src.lasercolor == "r")
threatcount = 0
if(istype(perp.wear_suit, /obj/item/clothing/suit/bluetag))
threatcount += 4
if((istype(perp:r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(perp:l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
threatcount += 4
if(istype(perp:belt, /obj/item/weapon/gun/energy/laser/bluetag))
threatcount += 2
if(src.check_records)
for (var/datum/data/record/E in data_core.general)
var/perpname = perp.name
if(perp.wear_id)
var/obj/item/weapon/card/id/id = perp.wear_id.GetID()
if(id)
perpname = id.registered_name
if(E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
threatcount = 4
break
if((src.idcheck) && (src.allowed(perp)) && !(src.lasercolor))
threatcount = 0//Corrupt cops cannot exist beep boop
return threatcount
/obj/machinery/bot/ed209/proc/check_for_weapons(var/obj/item/slot_item)
if(istype(slot_item, /obj/item/weapon/gun) || istype(slot_item, /obj/item/weapon/melee))
if(!(slot_item.type in safe_weapons))
return 1
return 0
/obj/machinery/bot/ed209/Bump(M as mob|obj) //Leave no door unopened!
if ((istype(M, /obj/machinery/door)) && (!isnull(src.botcard)))
@@ -815,7 +772,7 @@ Auto Patrol: []"},
return
//if(lastfired && world.time - lastfired < 100)
// playsound(src.loc, 'ed209_shoot.ogg', 50, 0)
var/shoot_sound = 'sound/weapons/laser.ogg'
if(!projectile)
if(!lasercolor)
@@ -823,6 +780,7 @@ Auto Patrol: []"},
projectile = /obj/item/projectile/beam
else
projectile = /obj/item/projectile/beam/stun
shoot_sound = 'sound/weapons/Taser.ogg'
else if(lasercolor == "b")
if (src.emagged == 2)
projectile = /obj/item/projectile/beam/lastertag/omni
@@ -837,6 +795,7 @@ Auto Patrol: []"},
if (!( istype(U, /turf) ))
return
var/obj/item/projectile/A = new projectile (loc)
playsound(src.loc, shoot_sound, 50, 1)
A.current = U
A.yo = U.y - T.y
A.xo = U.x - T.x
@@ -1041,4 +1000,11 @@ Auto Patrol: []"},
/obj/machinery/bot/ed209/redtag/New()
new /obj/machinery/bot/ed209(get_turf(src),null,"r")
del(src)
qdel(src)
/obj/machinery/bot/ed209/proc/declare_arrest()
var/area/location = get_area(src)
for(var/mob/living/carbon/human/human in world)
if((human.z == src.z) && istype(human.glasses, /obj/item/clothing/glasses/hud/security) && !human.blinded)
human << "<span class='info'>\icon[human.glasses] [src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] <b>[target]</b> in <b>[location]</b></span>"
+117 -126
View File
@@ -11,15 +11,17 @@
fire_dam_coeff = 0.7
brute_dam_coeff = 0.5
// weight = 1.0E7
req_one_access = list(access_security, access_forensics_lockers)
var/mob/target
req_access = list(access_security)
var/mob/living/carbon/target
var/oldtarget_name
var/threatlevel = 0
var/target_lastloc //Loc of target when arrested.
var/last_found //There's a delay
var/frustration = 0
// var/emagged = 0 //Emagged Secbots view everyone as a criminal
var/idcheck = 0 //If false, all station IDs are authorized for weapons.
var/declare_arrests = 1 //When making an arrest, should it notify everyone wearing sechuds?
var/idcheck = 0 //If true, arrest people with no IDs
var/weaponscheck = 1 //If true, arrest people for weapons if they don't have access
var/check_records = 1 //Does it check security records?
var/arrest_type = 0 //If true, don't handcuff
var/next_harm_time = 0
@@ -51,13 +53,25 @@
var/nearest_beacon // the nearest beacon's tag
var/turf/nearest_beacon_loc // the nearest beacon's location
//List of weapons that secbots will not arrest for
var/safe_weapons = list(\
/obj/item/weapon/gun/energy/laser/bluetag,\
/obj/item/weapon/gun/energy/laser/redtag,\
/obj/item/weapon/gun/energy/laser/practice)
/obj/machinery/bot/secbot/beepsky
name = "Officer Beep O'sky"
desc = "It's Officer Beep O'sky! Powered by a potato and a shot of whiskey."
idcheck = 0
weaponscheck = 1
auto_patrol = 1
/obj/machinery/bot/secbot/pingsky
name = "Officer Pingsky"
desc = "It's Officer Pingsky! Delegated to satellite guard duty for harbouring anti-human sentiment."
declare_arrests = 0
/obj/item/weapon/secbot_assembly
name = "helmet/signaler assembly"
desc = "Some sort of bizarre assembly."
@@ -108,28 +122,32 @@
var/dat
dat += text({"
<TT><B>Automatic Security Unit v1.3</B></TT><BR><BR>
Status: []<BR>
Behaviour controls are [src.locked ? "locked" : "unlocked"]<BR>
Maintenance panel panel is [src.open ? "opened" : "closed"]"},
Maintenance panel panel is [src.open ? "opened" : "closed"]<BR>"},
"<A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A>" )
if(!src.locked || issilicon(user))
dat += text({"<BR>
Check for Weapon Authorization: []<BR>
Check Security Records: []<BR>
Arrest for No ID: []<BR>
Arrest for Unauthorized Weapons: []<BR>
Arrest for Warrant: []<BR>
<BR>
Operating Mode: []<BR>
Report Arrests[]<BR>
Auto Patrol: []"},
"<A href='?src=\ref[src];operation=idcheck'>[src.idcheck ? "Yes" : "No"]</A>",
"<A href='?src=\ref[src];operation=weaponscheck'>[src.weaponscheck ? "Yes" : "No"]</A>",
"<A href='?src=\ref[src];operation=ignorerec'>[src.check_records ? "Yes" : "No"]</A>",
"<A href='?src=\ref[src];operation=switchmode'>[src.arrest_type ? "Detain" : "Arrest"]</A>",
"<A href='?src=\ref[src];operation=declarearrests'>[src.declare_arrests ? "Yes" : "No"]</A>",
"<A href='?src=\ref[src];operation=patrol'>[auto_patrol ? "On" : "Off"]</A>" )
user << browse("<HEAD><TITLE>Securitron v1.3 controls</TITLE></HEAD>[dat]", "window=autosec")
onclose(user, "autosec")
var/datum/browser/popup = new(user, "autosec", "Securitron v1.5 controls")
popup.set_content(dat)
popup.open()
return
/obj/machinery/bot/secbot/Topic(href, href_list)
@@ -146,6 +164,9 @@ Auto Patrol: []"},
if("idcheck")
src.idcheck = !src.idcheck
src.updateUsrDialog()
if("weaponscheck")
src.weaponscheck = !src.weaponscheck
src.updateUsrDialog()
if("ignorerec")
src.check_records = !src.check_records
src.updateUsrDialog()
@@ -156,6 +177,21 @@ Auto Patrol: []"},
auto_patrol = !auto_patrol
mode = SECBOT_IDLE
updateUsrDialog()
if("declarearrests")
src.declare_arrests = !src.declare_arrests
src.updateUsrDialog()
if("hack")
if(!src.emagged)
src.emagged = 2
src.hacked = 1
usr << "<span class='warning'>You overload [src]'s target identification system.</span>"
else if(!src.hacked)
usr << "<span class='userdanger'>[src] refuses to accept your authority!</span>"
else
src.emagged = 0
src.hacked = 0
usr << "<span class='notice'>You reboot [src] and restore the target identification.</span>"
src.updateUsrDialog()
/obj/machinery/bot/secbot/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
@@ -186,6 +222,7 @@ Auto Patrol: []"},
if(user) src.oldtarget_name = user.name
src.last_found = world.time
src.anchored = 0
src.declare_arrests = 0
src.emagged = 2
src.on = 1
src.icon_state = "secbot[src.on]"
@@ -219,49 +256,36 @@ Auto Patrol: []"},
walk_to(src,0)
if(target) // make sure target exists
if(Adjacent(target)) // if right next to perp
if(istype(src.target,/mob/living/carbon))
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
src.icon_state = "secbot-c"
spawn(2)
src.icon_state = "secbot[src.on]"
var/mob/living/carbon/M = src.target
var/maxstuns = 4
if(istype(M, /mob/living/carbon/human))
if(M.stuttering < 10 && (!(M_HULK in M.mutations)))
M.stuttering = 10
M.Stun(10)
M.Weaken(10)
else
M.Weaken(10)
M.stuttering = 10
M.Stun(10)
maxstuns--
if(maxstuns <= 0)
target = null
visible_message("\red <B>[src.target] has been stunned by [src]!</B>")
if(src.Adjacent(target) && isturf(src.target.loc)) // if right next to perp
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
src.icon_state = "secbot-c"
spawn(2)
src.icon_state = "secbot[src.on]"
var/mob/living/carbon/M = src.target
var/maxstuns = 4
if(istype(M, /mob/living/carbon/human))
if(M.stuttering < 5 && (!(M_HULK in M.mutations)))
M.stuttering = 5
M.Stun(5)
M.Weaken(5)
else
M.Weaken(5)
M.stuttering = 5
M.Stun(5)
mode = SECBOT_PREP_ARREST
src.anchored = 1
src.target_lastloc = M.loc
return
else if(istype(src.target,/mob/living/simple_animal))
//just harmbaton them until dead
if(world.time > next_harm_time)
next_harm_time = world.time + 15
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
visible_message("\red <B>[src] beats [src.target] with the stun baton!</B>")
src.icon_state = "secbot-c"
spawn(2)
src.icon_state = "secbot[src.on]"
if(declare_arrests)
declare_arrest()
target.visible_message("<span class='danger'>[src.target] has been stunned by [src]!</span>",\
"<span class='userdanger'>[src.target] has been stunned by [src]!</span>")
var/mob/living/simple_animal/S = src.target
if(S && istype(S))
S.AdjustStunned(10)
S.adjustBruteLoss(15)
if(S.stat)
src.frustration = 8
playsound(src.loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
maxstuns--
if(maxstuns <= 0)
target = null
mode = SECBOT_PREP_ARREST
src.anchored = 1
src.target_lastloc = M.loc
return
else // not next to perp
var/turf/olddist = get_dist(src, src.target)
@@ -286,7 +310,8 @@ Auto Patrol: []"},
if(!C.handcuffed && !src.arrest_type)
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
mode = SECBOT_ARREST
visible_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>")
target.visible_message("<span class='danger'>[src] is trying to put handcuffs on [src.target]!</span>",\
"<span class='userdanger'>[src] is trying to put handcuffs on [src.target]!</span>")
spawn(60)
if(get_dist(src, src.target) <= 1)
@@ -592,35 +617,24 @@ Auto Patrol: []"},
/obj/machinery/bot/secbot/proc/look_for_perp()
src.anchored = 0
for (var/mob/living/M in view(7,src)) //Let's find us a criminal
if(istype(M, /mob/living/carbon))
var/mob/living/carbon/C = M
if((C.stat) || (C.handcuffed))
continue
for (var/mob/living/carbon/C in view(7,src)) //Let's find us a criminal
if((C.stat) || (C.handcuffed))
continue
if((C.name == src.oldtarget_name) && (world.time < src.last_found + 100))
continue
if((C.name == src.oldtarget_name) && (world.time < src.last_found + 100))
continue
if(istype(C, /mob/living/carbon/human))
src.threatlevel = src.assess_perp(C)
else if(istype(M, /mob/living/simple_animal/hostile))
if(M.stat == DEAD)
continue
// Ignore lazarus-injected mobs.
if(M.faction == "lazarus")
continue
src.threatlevel = 4
src.threatlevel = C.assess_threat(src)
if(!src.threatlevel)
continue
else if(src.threatlevel >= 4)
src.target = M
src.oldtarget_name = M.name
src.target = C
src.oldtarget_name = C.name
src.speak("Level [src.threatlevel] infraction alert!")
playsound(src.loc, pick('sound/voice/bcriminal.ogg', 'sound/voice/bjustice.ogg', 'sound/voice/bfreeze.ogg'), 50, 0)
src.visible_message("<b>[src]</b> points at [M.name]!")
src.visible_message("<b>[src]</b> points at [C.name]!")
mode = SECBOT_HUNT
spawn(0)
process() // ensure bot quickly responds to a perp
@@ -628,59 +642,11 @@ Auto Patrol: []"},
else
continue
//If the security records say to arrest them, arrest them
//Or if they have weapons and aren't security, arrest them.
/obj/machinery/bot/secbot/proc/assess_perp(mob/living/carbon/human/perp as mob)
var/threatcount = 0
if(src.emagged == 2) return 10 //Everyone is a criminal!
if(src.idcheck && !src.allowed(perp))
if(istype(perp.l_hand, /obj/item/weapon/gun) || istype(perp.l_hand, /obj/item/weapon/melee))
if(!istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 4
if(istype(perp.r_hand, /obj/item/weapon/gun) || istype(perp.r_hand, /obj/item/weapon/melee))
if(!istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 4
if(istype(perp:belt, /obj/item/weapon/gun) || istype(perp:belt, /obj/item/weapon/melee))
if(!istype(perp:belt, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp:belt, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp:belt, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 2
if(istype(perp:wear_suit, /obj/item/clothing/suit/wizrobe))
threatcount += 2
if(perp.dna && perp.dna.mutantrace && perp.dna.mutantrace != "none")
threatcount += 2
//Agent cards lower threatlevel.
if(perp.wear_id && istype(perp:wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
threatcount -= 2
if(src.check_records)
for (var/datum/data/record/E in data_core.general)
var/perpname = perp.name
if(perp.wear_id)
var/obj/item/weapon/card/id/id = perp.wear_id.GetID()
if(id)
perpname = id.registered_name
if(E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
threatcount = 4
break
return threatcount
/obj/machinery/bot/secbot/proc/check_for_weapons(var/obj/item/slot_item)
if(istype(slot_item, /obj/item/weapon/gun) || istype(slot_item, /obj/item/weapon/melee))
if(!(slot_item.type in safe_weapons))
return 1
return 0
/obj/machinery/bot/secbot/Bump(M as mob|obj) //Leave no door unopened!
if((istype(M, /obj/machinery/door)) && (!isnull(src.botcard)))
@@ -798,4 +764,29 @@ Auto Patrol: []"},
return
if(!in_range(src, usr) && src.loc != usr)
return
src.created_name = t
created_name = t
else if(istype(W, /obj/item/weapon/screwdriver))
if(!build_step)
new /obj/item/device/assembly/signaler(get_turf(src))
new /obj/item/clothing/head/helmet(get_turf(src))
user << "<span class='notice'>You disconnect the signaler from the helmet.</span>"
qdel(src)
else if(build_step == 2)
overlays -= "hs_eye"
new /obj/item/device/assembly/prox_sensor(get_turf(src))
user << "<span class='notice'>You detach the proximity sensor from [src].</span>"
build_step--
else if(build_step == 3)
overlays -= "hs_arm"
new /obj/item/robot_parts/l_arm(get_turf(src))
user << "<span class='notice'>You remove the robot arm from [src].</span>"
build_step--
/obj/machinery/bot/secbot/proc/declare_arrest()
var/area/location = get_area(src)
for(var/mob/living/carbon/human/human in world)
if((human.z == src.z) && istype(human.glasses, /obj/item/clothing/glasses/hud/security) && !human.blinded)
human << "<span class='info'>\icon[human.glasses] [src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] <b>[target]</b> in <b>[location]</b></span>"
+1 -32
View File
@@ -119,37 +119,6 @@
brightness_on = 2
w_class = 1
// the desk lamps are a bit special
/obj/item/device/flashlight/lamp
name = "desk lamp"
desc = "A desk lamp with an adjustable mount."
icon_state = "lamp"
item_state = "lamp"
brightness_on = 5
w_class = 4
flags = FPRINT | TABLEPASS | CONDUCT
m_amt = 0
g_amt = 0
on = 1
// green-shaded desk lamp
/obj/item/device/flashlight/lamp/green
desc = "A classic green-shaded desk lamp."
icon_state = "lampgreen"
item_state = "lampgreen"
brightness_on = 5
/obj/item/device/flashlight/lamp/verb/toggle_light()
set name = "Toggle light"
set category = "Object"
set src in oview(1)
if(!usr.stat)
attack_self(usr)
// FLARES
/obj/item/device/flashlight/flare
@@ -204,4 +173,4 @@
user.visible_message("<span class='notice'>[user] activates the flare.</span>", "<span class='notice'>You pull the cord on the flare, activating it!</span>")
src.force = on_damage
src.damtype = "fire"
processing_objects += src
processing_objects += src
+8 -6
View File
@@ -405,12 +405,14 @@
return
/obj/structure/table/proc/straight_table_check(var/direction)
var/turf/left = get_step(src,turn(direction,90))
var/turf/right = get_step(src,turn(direction,-90))
var/turf/next = get_step(src,direction)
if(locate(/obj/structure/table,left) || locate(/obj/structure/table,right))
return 0
var/obj/structure/table/T = locate(/obj/structure/table, next)
var/obj/structure/table/T
for(var/angle in list(-90,90))
T = locate() in get_step(src.loc,turn(direction,angle))
if(T && !T.flipped)
return 0
T = locate() in get_step(src.loc,direction)
if (!T || T.flipped)
return 1
if (istype(T,/obj/structure/table/reinforced/))
var/obj/structure/table/reinforced/R = T
if (R.status == 2)
+13
View File
@@ -533,6 +533,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
//log_admin("[key_name(src)] has alienized [M.key].")
var/list/dresspacks = list(
"strip",
"as job...",
"Engineer RIG",
"CE RIG",
"Mining RIG",
@@ -570,6 +571,12 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/dresscode = input("Select dress for [M]", "Robust quick dress shop") as null|anything in dresspacks
if (isnull(dresscode))
return
var/datum/job/jobdatum
if (dresscode == "as job...")
var/jobname = input("Select job", "Robust quick dress shop") as null|anything in get_all_jobs()
jobdatum = job_master.GetJob(jobname)
feedback_add_details("admin_verb","SEQ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(dostrip)
for (var/obj/item/I in M)
@@ -579,6 +586,12 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
switch(dresscode)
if ("strip")
//do nothing
if ("as job...")
if(jobdatum)
dresscode = "[jobdatum.title]"
jobdatum.equip(M)
if ("standard space gear")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
+2
View File
@@ -331,6 +331,8 @@
nanomanager.send_resources(src)
media.update_music()
//////////////
//DISCONNECT//
//////////////
+2
View File
@@ -339,5 +339,7 @@ var/global/loopModeNames=list(
playlists=list(
"lobby" = "Lobby Mix"
)
use_power = 0
invisibility=101
autoplay = 1
playing = 1
+21 -44
View File
@@ -18,10 +18,10 @@
#define MAX_DEEP_COUNT 300
#define ITERATE_BEFORE_FAIL 200
#define RESOURCE_HIGH_MAX 8
#define RESOURCE_HIGH_MIN 5
#define RESOURCE_MID_MAX 4
#define RESOURCE_MID_MIN 2
#define RESOURCE_HIGH_MAX 3
#define RESOURCE_HIGH_MIN 0
#define RESOURCE_MID_MAX 2
#define RESOURCE_MID_MIN 1
#define RESOURCE_LOW_MAX 1
#define RESOURCE_LOW_MIN 0
@@ -52,10 +52,6 @@ Deep minerals:
var/random_variance_chance = 25
var/random_element = 0.5
//Called by the drilling rigs each process().
/datum/ore_distribution/proc/get_ore(var/x,var/y)
return "Nope."
/datum/ore_distribution/proc/map_is_sane()
if(!map) return 0
@@ -79,12 +75,13 @@ Deep minerals:
//Halfassed diamond-square algorithm with some fuckery since it's a single dimension array.
/datum/ore_distribution/proc/populate_distribution_map()
//Seed beginning values.
//Announce it!
world << "<b><font color='red'>Generating resource distribution map.</b></font>"
//Seed beginning values.
var/x = 1
var/y = 1
var/size = real_size-1
map[MAP_TOP_LEFT] = (range/3)+rand(range/5)
map[MAP_TOP_RIGHT] = (range/3)+rand(range/5)
map[MAP_BOTTOM_LEFT] = (range/3)+rand(range/5)
@@ -131,11 +128,16 @@ Deep minerals:
/datum/ore_distribution/proc/apply_to_asteroid()
var/origin_x = 13
var/origin_y = 32
var/limit_x = 217
var/limit_y = 223
var/asteroid_z = 5
// THESE VALUES DETERMINE THE AREA THAT THE DISTRIBUTION MAP IS APPLIED TO.
// IF YOU DO NOT RUN OFFICIAL BAYCODE ASTEROID MAP YOU NEED TO CHANGE THEM.
// ORIGIN IS THE BOTTOM LEFT CORNER OF THE SQUARE CONTAINING ALL ASTEROID
// TILES YOU WISH TO APPLY THE DISTRIBUTION MAP TO.
var/origin_x = 13 //We start here...
var/origin_y = 32 //...and here...
var/limit_x = 217 //...and iterate until here...
var/limit_y = 223 //...and here...
var/asteroid_z = 5 //...on this Z-level.
var/tx = origin_x
var/ty = origin_y
@@ -155,18 +157,9 @@ Deep minerals:
target_turf = locate(tx+j, ty+i, asteroid_z)
if(target_turf.has_resources)
if(target_turf && target_turf.has_resources)
var/printcolor
if(map[MAP_CELL] > (range*0.60))
printcolor = "#FF0000"
else if(map[MAP_CELL] > (range*0.40))
printcolor = "#00FF00"
else
printcolor = "#0000FF"
target_turf.color = "#[printcolor]"
target_turf.resources = list()
target_turf.resources["silicates"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
target_turf.resources["carbonaceous rock"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
@@ -202,24 +195,8 @@ Deep minerals:
tx = origin_x
ty += chunk_size
/datum/ore_distribution/proc/print_map()
world << "---"
var/string = ""
for(var/y = 1, y <= real_size, y++)
for(var/x = 1, x <= real_size, x++)
var/printcolor
if(map[MAP_CELL] > (range*0.60))
printcolor = "#FF0000"
else if(map[MAP_CELL] > (range*0.40))
printcolor = "#00FF00"
else
printcolor = "#0000FF"
string += "<font color='[printcolor]'>#</font>"
world << string
string = ""
world << "---"
world << "<b><font color='red'>Resource map generation complete.</font></b>"
return
#undef MAP_CELL
#undef MAP_CENTRE
@@ -245,4 +222,4 @@ Deep minerals:
#undef RESOURCE_MID_MAX
#undef RESOURCE_MID_MIN
#undef RESOURCE_LOW_MAX
#undef RESOURCE_LOW_MIN
#undef RESOURCE_LOW_MIN
@@ -401,3 +401,5 @@ In all, this is a lot like the monkey code. /N
return
/mob/living/carbon/alien/humanoid/canBeHandcuffed()
return 1
+7 -1
View File
@@ -577,4 +577,10 @@
else
src << "You do not have enough chemicals stored to reproduce."
return
return
/mob/living/carbon/proc/assess_threat()
return
/mob/living/carbon/proc/canBeHandcuffed()
return 0
@@ -1591,3 +1591,78 @@
M.apply_damage(50,BRUTE)
if(M.stat == 2)
M.gib()
/mob/living/carbon/human/assess_threat(var/obj/machinery/bot/secbot/judgebot, var/lasercolor)
if(judgebot.emagged == 2)
return 10 //Everyone is a criminal!
var/threatcount = 0
//Lasertag bullshit
if(lasercolor)
if(lasercolor == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
if(istype(wear_suit, /obj/item/clothing/suit/redtag))
threatcount += 4
if((istype(r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
threatcount += 4
if(istype(belt, /obj/item/weapon/gun/energy/laser/redtag))
threatcount += 2
if(lasercolor == "r")
if(istype(wear_suit, /obj/item/clothing/suit/bluetag))
threatcount += 4
if((istype(r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
threatcount += 4
if(istype(belt, /obj/item/weapon/gun/energy/laser/bluetag))
threatcount += 2
return threatcount
//Check for ID
var/obj/item/weapon/card/id/idcard = get_idcard()
if(judgebot.idcheck && !idcard)
threatcount += 4
//Check for weapons
if(judgebot.weaponscheck)
if(!idcard || !(access_weapons in idcard.access))
if(judgebot.check_for_weapons(l_hand))
threatcount += 4
if(judgebot.check_for_weapons(r_hand))
threatcount += 4
if(judgebot.check_for_weapons(belt))
threatcount += 2
//Check for arrest warrant
if(judgebot.check_records)
var/perpname = get_face_name(get_id_name())
var/datum/data/record/R = find_record("name", perpname, data_core.security)
if(R && R.fields["criminal"])
switch(R.fields["criminal"])
if("*Arrest*")
threatcount += 5
if("Incarcerated")
threatcount += 2
if("Parolled")
threatcount += 2
//Check for dresscode violations
if(istype(head, /obj/item/clothing/head/wizard) || istype(head, /obj/item/clothing/head/helmet/space/rig/wizard))
threatcount += 2
//Check for nonhuman scum
if(dna && dna.mutantrace && dna.mutantrace != "none")
threatcount += 1
//Loyalty implants imply trustworthyness
if(isloyal(src))
threatcount -= 1
//Agent cards lower threatlevel.
if(istype(idcard, /obj/item/weapon/card/id/syndicate))
threatcount -= 2
return threatcount
/mob/living/carbon/human/canBeHandcuffed()
return 1
+6 -4
View File
@@ -315,8 +315,9 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if (radiation)
if (radiation > 100)
Weaken(10)
src << "\red You feel weak."
emote("collapse")
if(!lying)
src << "\red You feel weak."
emote("collapse")
if (radiation < 0)
radiation = 0
@@ -349,8 +350,9 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(prob(5))
radiation -= 5
Weaken(3)
src << "\red You feel weak."
emote("collapse")
if(!lying)
src << "\red You feel weak."
emote("collapse")
updatehealth()
if(75 to 100)
@@ -139,8 +139,9 @@
if (radiation > 100)
radiation = 100
Weaken(10)
src << "\red You feel weak."
emote("collapse")
if(!lying)
src << "\red You feel weak."
emote("collapse")
switch(radiation)
if(1 to 49)
@@ -154,8 +155,9 @@
if(prob(5))
radiation -= 5
Weaken(3)
src << "\red You feel weak."
emote("collapse")
if(!lying)
src << "\red You feel weak."
emote("collapse")
if(75 to 100)
radiation -= 3
@@ -497,3 +497,36 @@
if(!ticker.mode.name == "monkey") return 0
return 1
/mob/living/carbon/monkey/canBeHandcuffed()
return 1
/mob/living/carbon/monkey/assess_threat(var/obj/machinery/bot/secbot/judgebot, var/lasercolor)
if(judgebot.emagged == 2)
return 10 //Everyone is a criminal!
var/threatcount = 0
//Lasertag bullshit
if(lasercolor)
if(lasercolor == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
if((istype(r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
threatcount += 4
if(lasercolor == "r")
if((istype(r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
threatcount += 4
return threatcount
//Check for weapons
if(judgebot.weaponscheck)
if(judgebot.check_for_weapons(l_hand))
threatcount += 4
if(judgebot.check_for_weapons(r_hand))
threatcount += 4
//Loyalty implants imply trustworthyness
if(isloyal(src))
threatcount -= 1
return threatcount
@@ -327,7 +327,13 @@
src << "<b>If a crewmember has noticed you, <i>you are probably breaking your first law</i></b>."
/mob/living/silicon/robot/drone/Bump(atom/movable/AM as mob|obj, yes)
if (!yes || (!istype(AM,/obj/machinery/door) && !istype(AM,/obj/machinery/recharge_station)) ) return
if (!yes || ( \
!istype(AM,/obj/machinery/door) && \
!istype(AM,/obj/machinery/recharge_station) && \
!istype(AM,/obj/machinery/disposal/deliveryChute && \
!istype(AM,/obj/machinery/teleport/hub) && \
!istype(AM,/obj/effect/portal)
))) return
..()
return
+1 -2
View File
@@ -56,8 +56,7 @@
if(H.species && H.species.abilities)
client.verbs |= H.species.abilities
update_music()
CallHook("Login", list("client" = src.client, "mob" = src))
update_music()
+6
View File
@@ -150,6 +150,12 @@ proc/isorgan(A)
return 1
return 0
/proc/isloyal(A) //Checks to see if the person contains a loyalty implant, then checks that the implant is actually inside of them
for(var/obj/item/weapon/implant/loyalty/L in A)
if(L && L.implanted)
return 1
return 0
proc/hasorgans(A)
return ishuman(A)
+1
View File
@@ -26,6 +26,7 @@
if(watch_locations.len>0)
loc = pick(watch_locations)
*/
update_music()
new_player_panel()
spawn(40)
if(client)
+12
View File
@@ -219,6 +219,18 @@
desc = "A small lighting fixture."
light_type = /obj/item/weapon/light/bulb
// the desk lamps are a bit special
/obj/machinery/light/small/lamp
name = "desk lamp"
icon_state = "lamp1"
base_state = "lamp"
desc = "A desk lamp with an adjustable mount."
// green-shaded desk lamp
/obj/machinery/light/small/lamp/green
desc = "A classic green-shaded desk lamp."
icon_state = "lampgreen1"
base_state = "lampgreen"
/obj/machinery/light/spot
name = "spotlight"
+1 -1
View File
@@ -26,7 +26,7 @@
/obj/vehicle/train/ambulance/trolley
name = "ambulance train trolley"
icon = 'icons/vehicles/CargoTrain.dmi'
icon_state = "trolley"
icon_state = "ambulance"
anchored = 0
passenger_allowed = 1
locked = 0
+4
View File
@@ -268,6 +268,10 @@ var/world_topic_spam_protect_time = world.timeofday
fdel(F)
F << the_mode
/hook/startup/proc/loadMusic()
for(var/obj/machinery/media/jukebox/J in machines)
J.process()
return 1
/hook/startup/proc/loadMOTD()
world.load_motd()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

+11339 -11304
View File
File diff suppressed because it is too large Load Diff
+12735 -12784
View File
File diff suppressed because it is too large Load Diff