Merge pull request #460 from Markolie/master

Add bandanas, mask toggling, camo armor jacket, minimum drone/ERT age, turret update, NanoUI update and bugfixes
This commit is contained in:
ZomgPonies
2015-03-01 12:30:15 -05:00
70 changed files with 2942 additions and 2022 deletions
-6
View File
@@ -393,12 +393,6 @@ proc/listclearnulls(list/list)
//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
/proc/dd_sortedObjectList(var/list/L, var/cache=list())
if(L.len < 2)
return L
+2 -4
View File
@@ -159,8 +159,7 @@
Topic("breaker=1", list("breaker"="1"), 0) // 0 meaning no window (consistency! wait...)
/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets
src.enabled = !src.enabled
src.updateTurrets()
Topic(src, list("src"= "\ref[src]", "command"="enable", "value"="[!enabled]"), 1) // 1 meaning no window (consistency!)
/atom/proc/AIAltClick(var/atom/A)
AltClick(A)
@@ -179,8 +178,7 @@
return
/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets
src.lethal = !src.lethal
src.updateTurrets()
Topic(src, list("src"= "\ref[src]", "command"="lethal", "value"="[!lethal]"), 1) // 1 meaning no window (consistency!)
/atom/proc/AIMiddleClick()
return
+3
View File
@@ -276,6 +276,9 @@
if(!istype(C.wear_mask, /obj/item/clothing/mask))
C << "<span class='notice'>You are not wearing a mask.</span>"
return 1
if(C.wear_mask.mask_adjusted)
C << "<span class='notice'>Put your mask on first.</span>"
return 1
else
var/list/nicename = null
var/list/tankcheck = null
+2 -2
View File
@@ -1,4 +1,4 @@
/datum/controller/process/inactivity/setup()
/*/datum/controller/process/inactivity/setup()
name = "inactivity"
schedule_interval = INACTIVITY_KICK
@@ -13,4 +13,4 @@
scheck()
#undef INACTIVITY_KICK
#undef INACTIVITY_KICK*/
+1 -1
View File
@@ -466,7 +466,7 @@ datum/mind
if(!def_value)//If it's a custom objective, it will be an empty string.
def_value = "custom"
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "blood", "debrain", "protect", "prevent", "harm", "speciesist", "brig", "hijack", "escape", "survive", "steal", "download", "nuclear", "capture", "absorb", "escape_with_identity", "destroy", "maroon", "identity theft", "custom")
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "blood", "debrain", "protect", "prevent", "harm", "speciesist", "brig", "hijack", "escape", "survive", "steal", "download", "nuclear", "capture", "absorb", "destroy", "maroon", "identity theft", "custom")
if (!new_obj_type) return
var/datum/objective/new_objective = null
+48
View File
@@ -0,0 +1,48 @@
/proc/CreateGeneralRecord()
var/mob/living/carbon/human/dummy = new()
dummy.mind = new()
var/icon/front = new(get_id_photo(dummy), dir = SOUTH)
var/icon/side = new(get_id_photo(dummy), dir = WEST)
var/datum/data/record/G = new /datum/data/record()
G.fields["name"] = "New Record"
G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
G.fields["rank"] = "Unassigned"
G.fields["real_rank"] = "Unassigned"
G.fields["sex"] = "Male"
G.fields["age"] = "Unknown"
G.fields["fingerprint"] = "Unknown"
G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable"
G.fields["species"] = "Human"
G.fields["home_system"] = "Unknown"
G.fields["citizenship"] = "Unknown"
G.fields["faction"] = "Unknown"
G.fields["religion"] = "Unknown"
G.fields["photo_front"] = front
G.fields["photo_side"] = side
data_core.general += G
del(dummy)
return G
/proc/CreateSecurityRecord(var/name as text, var/id as text)
var/datum/data/record/R = new /datum/data/record()
R.fields["name"] = name
R.fields["id"] = id
R.name = text("Security Record #[id]")
R.fields["criminal"] = "None"
R.fields["mi_crim"] = "None"
R.fields["mi_crim_d"] = "No minor crime convictions."
R.fields["ma_crim"] = "None"
R.fields["ma_crim_d"] = "No major crime convictions."
R.fields["notes"] = "No notes."
data_core.security += R
return R
/proc/find_security_record(field, value)
return find_record(field, value, data_core.security)
/proc/find_record(field, value, list/L)
for(var/datum/data/record/R in L)
if(R.fields[field] == value)
return R
+4 -1
View File
@@ -24,15 +24,18 @@
match_tag = "arrivals"
match_width = 5
match_height = 4
requires_power = 0
/area/dynamic/source/lobby_russian
name = "\improper Russian Lounge"
match_tag = "arrivals"
match_width = 5
match_height = 4
requires_power = 0
/area/dynamic/source/lobby_disco
name = "\improper Disco Lounge"
match_tag = "arrivals"
match_width = 5
match_height = 4
match_height = 4
requires_power = 0
+1 -1
View File
@@ -150,8 +150,8 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
var/i = 1
var/max_objectives = pick(2,2,2,2,3,3,3,4)
var/list/objs = list()
var/list/goals = list("kidnap","loot","salvage")
while(i<= max_objectives)
var/list/goals = list("kidnap","loot","salvage")
var/goal = pick(goals)
var/datum/objective/heist/O
@@ -64,8 +64,16 @@ rcd light flash thingy on matter drain
set name = "Upgrade Turrets"
src.verbs -= /mob/living/silicon/ai/proc/upgrade_turrets
for(var/obj/machinery/turret/turret in machines)
turret.health += 30
turret.shot_delay = 20
var/turf/T = get_turf(turret)
if(T.z in config.station_levels)
turret.health += 30
turret.shot_delay = 20
for(var/obj/machinery/porta_turret/turret in machines)
var/turf/T = get_turf(turret)
if(T.z in config.station_levels)
// Increase health by 37.5% of original max, decrease delays between shots to 66%
turret.health += initial(turret.health) * 3 / 8
turret.shot_delay = initial(turret.shot_delay) * 2 / 3
src << "<span class='notice'>Turrets upgraded.</span>"
/datum/AI_Module/large/lockdown
+2 -3
View File
@@ -171,7 +171,7 @@ proc/issyndicate(mob/living/M as mob)
var/hair_c = pick("#8B4513","#000000","#FF4500","#FFD700") // Brown, black, red, blonde
var/eye_c = pick("#000000","#8B4513","1E90FF") // Black, brown, blue
var/skin_tone = pick(30, 35, 40, 45, 50, 60, 75, 90, 105, 120) // Caucasian - black
var/skin_tone = pick(-50, -30, -10, 0, 0, 0, 10) // Caucasian/black
var/hair_style = "Bald"
var/facial_hair_style = "Shaved"
if(M.gender == MALE)
@@ -191,8 +191,7 @@ proc/issyndicate(mob/living/M as mob)
M.r_eyes = hex2num(copytext(eye_c, 2, 4))
M.g_eyes = hex2num(copytext(eye_c, 4, 6))
M.b_eyes = hex2num(copytext(eye_c, 6, 8))
M.s_tone = skin_tone + 35
M.s_tone = -M.s_tone + 35
M.s_tone = skin_tone
M.h_style = hair_style
M.f_style = facial_hair_style
+9
View File
@@ -508,6 +508,15 @@
return assignment
return "Unknown"
proc/GetIdCard(var/mob/living/carbon/human/H)
if(H.wear_id)
var/id = H.wear_id.GetID()
if(id)
return id
if(H.get_active_hand())
var/obj/item/I = H.get_active_hand()
return I.GetID()
proc/FindNameFromID(var/mob/living/carbon/human/H)
ASSERT(istype(H))
+1 -1
View File
@@ -163,7 +163,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/heads/blueshield(H), slot_l_ear)
H.equip_or_collect(new /obj/item/device/radio/headset/heads/blueshield/alt(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_norm(H), slot_back)
+3
View File
@@ -199,6 +199,9 @@
else
if(isAI(user))
var/mob/living/silicon/ai/A = user
// Only allow non-carded AIs to view because the interaction with the eye gets all wonky otherwise.
if(!A.is_in_chassis())
return 0
A.eyeobj.setLoc(get_turf(C))
A.client.eye = A.eyeobj
else
+12
View File
@@ -102,7 +102,19 @@
stat |= BROKEN
update_icon()
/obj/machinery/computer/proc/decode(text)
// Adds line breaks
text = replacetext(text, "\n", "<BR>")
return text
/obj/machinery/computer/attack_ghost(user as mob)
return src.attack_hand(user)
/obj/machinery/computer/attack_hand(user as mob)
/* Observers can view computers, but not actually use them via Topic*/
if(istype(user, /mob/dead/observer)) return 0
return ..()
/obj/machinery/computer/attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
+5 -1
View File
@@ -53,7 +53,8 @@
usr << "[src.current.name] selected for law changes."
return
attack_ghost(user as mob)
return 1
/obj/machinery/computer/borgupload
name = "Cyborg Upload"
@@ -85,3 +86,6 @@
else
usr << "[src.current.name] selected for law changes."
return
attack_ghost(user as mob)
return 1
+61 -57
View File
@@ -184,65 +184,21 @@ Class Procs:
use_power(active_power_usage,power_channel, 1)
return 1
/obj/machinery/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
if(..())
return 1
if(!can_be_used_by(usr, be_close = checkrange))
return 1
add_fingerprint(usr)
return 0
/obj/machinery/CanUseTopic(var/mob/user, var/be_close)
if(!interact_offline && (stat & (NOPOWER|BROKEN)))
return STATUS_CLOSE
/obj/machinery/proc/can_be_used_by(mob/user, be_close = 1)
if(!interact_offline && stat & (NOPOWER|BROKEN))
return 0
if(!user.canUseTopic(src, be_close))
return 0
return 1
return ..()
/obj/machinery/CouldUseTopic(var/mob/user)
..()
user.set_machine(src)
/obj/machinery/CouldNotUseTopic(var/mob/user)
usr.unset_machine()
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/mob/proc/canUseTopic(atom/movable/M, be_close = 1)
return
/mob/dead/observer/canUseTopic(atom/movable/M, be_close = 1)
if(check_rights(R_ADMIN, 0))
return
/mob/living/canUseTopic(atom/movable/M, be_close = 1, no_dextery = 0)
if(no_dextery)
src << "<span class='notice'>You don't have the dexterity to do this!</span>"
return 0
return be_close && !in_range(M, src)
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close = 1)
if(restrained() || lying || stat || stunned || weakened)
return
if(be_close && !in_range(M, src))
if(TK in mutations)
var/mob/living/carbon/human/H = M
if(istype(H.l_hand, /obj/item/tk_grab) || istype(H.r_hand, /obj/item/tk_grab))
return 1
return
if(!isturf(M.loc) && M.loc != src)
return
return 1
/mob/living/silicon/ai/canUseTopic(atom/movable/M)
if(stat)
return
//stop AIs from leaving windows open and using then after they lose vision
//apc_override is needed here because AIs use their own APC when powerless
if(cameranet && !cameranet.checkTurfVis(get_turf(M)) && !apc_override)
return
return 1
/mob/living/silicon/robot/canUseTopic(atom/movable/M)
if(stat || lockcharge || stunned || weakened)
return
return 1
////////////////////////////////////////////////////////////////////////////////////////////
/obj/machinery/attack_ai(var/mob/user as mob)
if(isAI(user))
var/mob/living/silicon/ai/A = user
@@ -401,3 +357,51 @@ Class Procs:
I.loc = loc
del(src)
return 1
/obj/machinery/proc/on_assess_perp(mob/living/carbon/human/perp)
return 0
/obj/machinery/proc/is_assess_emagged()
return emagged
/obj/machinery/proc/assess_perp(mob/living/carbon/human/perp, var/auth_weapons, var/check_records, var/check_arrest)
var/threatcount = 0 //the integer returned
if(is_assess_emagged())
return 10 //if emagged, always return 10.
threatcount += on_assess_perp(perp)
if(threatcount >= 10)
return threatcount
//Agent cards lower threatlevel.
var/obj/item/weapon/card/id/id = GetIdCard(perp)
if(id && istype(id, /obj/item/weapon/card/id/syndicate))
threatcount -= 2
if(auth_weapons && !src.allowed(perp))
if(istype(perp.l_hand, /obj/item/weapon/gun) || istype(perp.l_hand, /obj/item/weapon/melee))
threatcount += 4
if(istype(perp.r_hand, /obj/item/weapon/gun) || istype(perp.r_hand, /obj/item/weapon/melee))
threatcount += 4
if(istype(perp.belt, /obj/item/weapon/gun) || istype(perp.belt, /obj/item/weapon/melee))
threatcount += 2
if(perp.species.name != "Human") //beepsky so racist.
threatcount += 2
if(check_records || check_arrest)
var/perpname = perp.name
if(id)
perpname = id.registered_name
var/datum/data/record/R = find_security_record("name", perpname)
if(check_records && !R)
threatcount += 4
if(check_arrest && R && (R.fields["criminal"] == "*Arrest*"))
threatcount += 4
return threatcount
+124
View File
@@ -0,0 +1,124 @@
#define TURRET_PRIORITY_TARGET 2
#define TURRET_SECONDARY_TARGET 1
#define TURRET_NOT_TARGET 0
/obj/machinery/porta_turret/tag
// Reasonable defaults, in case someone manually spawns us
var/lasercolor = "r" //Something to do with lasertag turrets, blame Sieve for not adding a comment.
installation = /obj/item/weapon/gun/energy/laser/redtag
/obj/machinery/porta_turret/tag/red
/obj/machinery/porta_turret/tag/blue
lasercolor = "b"
installation = /obj/item/weapon/gun/energy/laser/bluetag
/obj/machinery/porta_turret/tag/New()
..()
icon_state = "[lasercolor]grey_target_prism"
/obj/machinery/porta_turret/tag/weapon_setup(var/obj/item/weapon/gun/energy/E)
switch(E.type)
if(/obj/item/weapon/gun/energy/laser/bluetag)
eprojectile = /obj/item/weapon/gun/energy/laser/bluetag
lasercolor = "b"
req_access = list(access_maint_tunnels, access_theatre)
check_arrest = 0
check_records = 0
check_weapons = 1
check_access = 0
check_anomalies = 0
shot_delay = 30
if(/obj/item/weapon/gun/energy/laser/redtag)
eprojectile = /obj/item/weapon/gun/energy/laser/redtag
lasercolor = "r"
req_access = list(access_maint_tunnels, access_theatre)
check_arrest = 0
check_records = 0
check_weapons = 1
check_access = 0
check_anomalies = 0
shot_delay = 30
iconholder = 1
/obj/machinery/porta_turret/tag/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
data["access"] = !isLocked(user)
data["locked"] = locked
data["enabled"] = enabled
data["is_lethal"] = 0
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
/obj/machinery/porta_turret/tag/update_icon()
if(!anchored)
icon_state = "turretCover"
return
if(stat & BROKEN)
icon_state = "[lasercolor]destroyed_target_prism"
else
if(powered())
if(enabled)
if(iconholder)
//lasers have a orange icon
icon_state = "[lasercolor]orange_target_prism"
else
//almost everything has a blue icon
icon_state = "[lasercolor]target_prism"
else
icon_state = "[lasercolor]grey_target_prism"
else
icon_state = "[lasercolor]grey_target_prism"
/obj/machinery/porta_turret/tag/bullet_act(obj/item/projectile/Proj)
..()
if(lasercolor == "b" && disabled == 0)
if(istype(Proj, /obj/item/weapon/gun/energy/laser/redtag))
disabled = 1
del(Proj) // qdel
sleep(100)
disabled = 0
if(lasercolor == "r" && disabled == 0)
if(istype(Proj, /obj/item/weapon/gun/energy/laser/bluetag))
disabled = 1
del(Proj) // qdel
sleep(100)
disabled = 0
/obj/machinery/porta_turret/tag/assess_living(var/mob/living/L)
if(!L)
return TURRET_NOT_TARGET
if(L.lying)
return TURRET_NOT_TARGET
var/target_suit
var/target_weapon
switch(lasercolor)
if("b")
target_suit = /obj/item/clothing/suit/redtag
target_weapon = /obj/item/weapon/gun/energy/laser/redtag
if("r")
target_suit = /obj/item/clothing/suit/bluetag
target_weapon = /obj/item/weapon/gun/energy/laser/bluetag
if(target_suit)//Lasertag turrets target the opposing team, how great is that? -Sieve
if((istype(L.r_hand, target_weapon)) || (istype(L.l_hand, target_weapon)))
return TURRET_PRIORITY_TARGET
if(istype(L, /mob/living/carbon/human))
var/mob/living/carbon/human/H = L
if(istype(H.wear_suit, target_suit))
return TURRET_PRIORITY_TARGET
if(istype(H.belt, target_weapon))
return TURRET_SECONDARY_TARGET
return TURRET_NOT_TARGET
File diff suppressed because it is too large Load Diff
+221
View File
@@ -0,0 +1,221 @@
////////////////////////
//Turret Control Panel//
////////////////////////
/area
// Turrets use this list to see if individual power/lethal settings are allowed
var/list/turret_controls = list()
/obj/machinery/turretid
name = "turret control panel"
desc = "Used to control a room's automated defenses."
icon = 'icons/obj/machines/turret_control.dmi'
icon_state = "control_standby"
anchored = 1
density = 0
var/enabled = 0
var/lethal = 0
var/locked = 1
var/area/control_area //can be area name, path or nothing.
var/check_arrest = 1 //checks if the perp is set to arrest
var/check_records = 1 //checks if a security record exists at all
var/check_weapons = 0 //checks if it can shoot people that have a weapon they aren't authorized to have
var/check_access = 1 //if this is active, the turret shoots everything that does not meet the access requirements
var/check_anomalies = 1 //checks if it can shoot at unidentified lifeforms (ie xenos)
var/check_synth = 0 //if active, will shoot at anything not an AI or cyborg
var/ailock = 0 //Silicons cannot use this
req_access = list(access_ai_upload)
/obj/machinery/turretid/stun
enabled = 1
icon_state = "control_stun"
/obj/machinery/turretid/lethal
enabled = 1
lethal = 1
icon_state = "control_kill"
/obj/machinery/turretid/Del()
if(control_area)
var/area/A = control_area
if(A && istype(A))
A.turret_controls -= src
..()
/obj/machinery/turretid/initialize()
if(!control_area)
var/area/CA = get_area(src)
control_area = CA.master
else if(istext(control_area))
for(var/area/A in world)
if(A.name && A.name==control_area)
control_area = A.master
break
if(control_area)
var/area/A = control_area
if(istype(A))
A.turret_controls += src
else
control_area = null
power_change() //Checks power and initial settings
return
/obj/machinery/turretid/proc/isLocked(mob/user)
if(ailock && (isrobot(user) || isAI(user)))
user << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
return 1
if(locked && !(isrobot(user) || isAI(user)))
user << "<span class='notice'>Access denied.</span>"
return 1
return 0
/obj/machinery/turretid/attackby(obj/item/weapon/W, mob/user)
if(stat & BROKEN)
return
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(src.allowed(usr))
if(emagged)
user << "<span class='notice'>The turret control is unresponsive.</span>"
else
locked = !locked
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the panel.</span>"
return
return ..()
/obj/machinery/turretid/emag_act(user as mob)
if(!emagged)
user << "<span class='danger'>You short out the turret controls' access analysis module.</span>"
emagged = 1
locked = 0
ailock = 0
return
/obj/machinery/turretid/attack_ai(mob/user as mob)
if(isLocked(user))
return
ui_interact(user)
/obj/machinery/turretid/attack_hand(mob/user as mob)
if(isLocked(user))
return
ui_interact(user)
/obj/machinery/turretid/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
data["access"] = !isLocked(user)
data["locked"] = locked
data["enabled"] = enabled
data["is_lethal"] = 1
data["lethal"] = lethal
if(data["access"])
var/settings[0]
settings[++settings.len] = list("category" = "Neutralize All Non-Synthetics", "setting" = "check_synth", "value" = check_synth)
settings[++settings.len] = list("category" = "Check Weapon Authorization", "setting" = "check_weapons", "value" = check_weapons)
settings[++settings.len] = list("category" = "Check Security Records", "setting" = "check_records", "value" = check_records)
settings[++settings.len] = list("category" = "Check Arrest Status", "setting" = "check_arrest", "value" = check_arrest)
settings[++settings.len] = list("category" = "Check Access Authorization", "setting" = "check_access", "value" = check_access)
settings[++settings.len] = list("category" = "Check misc. Lifeforms", "setting" = "check_anomalies", "value" = check_anomalies)
data["settings"] = settings
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
/obj/machinery/turretid/Topic(href, href_list, var/nowindow = 0)
if(..())
return 1
if(isLocked(usr))
return 1
if(href_list["command"] && href_list["value"])
var/value = text2num(href_list["value"])
if(href_list["command"] == "enable")
enabled = value
else if(href_list["command"] == "lethal")
lethal = value
else if(href_list["command"] == "check_synth")
check_synth = value
else if(href_list["command"] == "check_weapons")
check_weapons = value
else if(href_list["command"] == "check_records")
check_records = value
else if(href_list["command"] == "check_arrest")
check_arrest = value
else if(href_list["command"] == "check_access")
check_access = value
else if(href_list["command"] == "check_anomalies")
check_anomalies = value
updateTurrets()
return 1
/obj/machinery/turretid/proc/updateTurrets()
var/datum/turret_checks/TC = new
TC.enabled = enabled
TC.lethal = lethal
TC.check_synth = check_synth
TC.check_access = check_access
TC.check_records = check_records
TC.check_arrest = check_arrest
TC.check_weapons = check_weapons
TC.check_anomalies = check_anomalies
TC.ailock = ailock
if(istype(control_area))
for(var/area/sub_area in control_area.related)
for (var/obj/machinery/porta_turret/aTurret in sub_area)
aTurret.setState(TC)
update_icon()
/obj/machinery/turretid/power_change()
..()
updateTurrets()
update_icon()
/obj/machinery/turretid/update_icon()
..()
if(stat & NOPOWER)
icon_state = "control_off"
else if (enabled)
if (lethal)
icon_state = "control_kill"
else
icon_state = "control_stun"
else
icon_state = "control_standby"
/obj/machinery/turretid/emp_act(severity)
if(enabled)
//if the turret is on, the EMP no matter how severe disables the turret for a while
//and scrambles its settings, with a slight chance of having an emag effect
check_arrest = pick(0, 1)
check_records = pick(0, 1)
check_weapons = pick(0, 1)
check_access = pick(0, 0, 0, 0, 1) // check_access is a pretty big deal, so it's least likely to get turned on
check_anomalies = pick(0, 1)
enabled=0
updateTurrets()
sleep(rand(60,600))
if(!enabled)
enabled=1
updateTurrets()
..()
+8 -115
View File
@@ -331,110 +331,7 @@
spawn(13)
qdel(src)
/obj/machinery/turretid
name = "turret deactivation control"
icon = 'icons/obj/device.dmi'
icon_state = "control_stun"
anchored = 1
density = 0
var/enabled = 1
var/lethal = 0
var/locked = 1
var/control_area //can be area name, path or nothing.
var/ailock = 0 // AI cannot use this
req_access = list(access_ai_upload)
/obj/machinery/turretid/New()
..()
if(!control_area)
var/area/CA = get_area(src)
if(CA.master && CA.master != CA)
control_area = CA.master
else
control_area = CA
else if(istext(control_area))
for(var/area/A in world)
if(A.name && A.name==control_area)
control_area = A
break
//don't have to check if control_area is path, since get_area_all_atoms can take path.
return
/obj/machinery/turretid/attackby(obj/item/weapon/W, mob/user, params)
if(stat & BROKEN) return
if (istype(user, /mob/living/silicon))
return src.attack_hand(user)
else if( get_dist(src, user) == 0 ) // trying to unlock the interface
if (src.allowed(usr))
if(emagged)
user << "<span class='notice'>The turret control is unresponsive.</span>"
return
locked = !locked
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the panel.</span>"
if (locked)
if (user.machine==src)
user.unset_machine()
user << browse(null, "window=turretid")
else
if (user.machine==src)
src.attack_hand(user)
else
user << "<span class='warning'>Access denied.</span>"
/obj/machinery/turretid/emag_act(user as mob)
if (!emagged)
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
user << "\red You short out the turret controls' access analysis module."
emagged = 1
locked = 0
if(H.machine==src)
src.attack_hand(user)
/obj/machinery/turretid/attack_ai(mob/user as mob)
if(!ailock)
return attack_hand(user)
else
user << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
/obj/machinery/turretid/attack_hand(mob/user as mob)
if ( get_dist(src, user) > 0 )
if ( !issilicon(user) )
user << "<span class='notice'>You are too far away.</span>"
user.unset_machine()
user << browse(null, "window=turretid;size=500x250")
return
user.set_machine(src)
var/loc = src.loc
if (istype(loc, /turf))
loc = loc:loc
if (!istype(loc, /area))
user << text("Turret badly positioned - loc.loc is [].", loc)
return
var/area/area = loc
var/t = ""
if(src.locked && (!istype(user, /mob/living/silicon)))
t += "<div class='notice icon'>Swipe ID card to unlock interface</div>"
else
if (!istype(user, /mob/living/silicon))
t += "<div class='notice icon'>Swipe ID card to lock interface</div>"
t += text("Turrets [] - <A href='?src=\ref[];toggleOn=1'>[]?</a><br>\n", src.enabled?"activated":"deactivated", src, src.enabled?"Disable":"Enable")
t += text("Currently set for [] - <A href='?src=\ref[];toggleLethal=1'>Change to []?</a><br>\n", src.lethal?"lethal":"stun repeatedly", src, src.lethal?"Stun repeatedly":"Lethal")
//user << browse(t, "window=turretid;size=500x250")
//onclose(user, "turretid")
var/datum/browser/popup = new(user, "turretid", "Turret Control Panel ([area.name])", 500, 250)
popup.set_content(t)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
/obj/machinery/turret/attack_animal(mob/living/simple_animal/M as mob)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
@@ -468,8 +365,8 @@
/obj/machinery/turretid/Topic(href, href_list)
if(..())
/obj/machinery/turretid/Topic(href, href_list, var/nowindow = 0)
if(..(href, href_list))
return 1
if (src.locked)
if (!istype(usr, /mob/living/silicon))
@@ -481,13 +378,8 @@
else if (href_list["toggleLethal"])
src.lethal = !src.lethal
src.updateTurrets()
src.attack_hand(usr)
/obj/machinery/turretid/proc/updateTurrets()
if(control_area)
for (var/obj/machinery/turret/aTurret in get_area_all_atoms(control_area))
aTurret.setState(enabled, lethal)
src.update_icons()
if(!nowindow)
src.attack_hand(usr)
/obj/machinery/turretid/proc/update_icons()
if (src.enabled)
@@ -566,8 +458,9 @@
/obj/machinery/gun_turret/bullet_act(var/obj/item/projectile/Proj)
take_damage(Proj.damage)
return
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
take_damage(Proj.damage)
return
/obj/machinery/gun_turret/proc/die()
state = 2
+2 -2
View File
@@ -1037,8 +1037,8 @@
/obj/item/clothing/under/sexyclown = 1,/obj/item/clothing/mask/gas/sexymime = 1,/obj/item/clothing/under/sexymime = 1,/obj/item/clothing/suit/apron/overalls = 1,
/obj/item/clothing/head/rabbitears =1, /obj/item/clothing/head/sombrero = 1, /obj/item/clothing/suit/poncho = 1,
/obj/item/clothing/suit/poncho/green = 1, /obj/item/clothing/suit/poncho/red = 1, /obj/item/clothing/accessory/blue = 1, /obj/item/clothing/accessory/red = 1, /obj/item/clothing/accessory/black = 1, /obj/item/clothing/accessory/horrible = 1,
/obj/item/clothing/under/maid = 1, /obj/item/clothing/under/janimaid = 1)
contraband = list(/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1,/obj/item/weapon/gun/magic/wand = 1)
/obj/item/clothing/under/maid = 1, /obj/item/clothing/under/janimaid = 1, /obj/item/clothing/under/pants/camo = 1, /obj/item/clothing/mask/bandana = 1, /obj/item/clothing/mask/bandana/black = 1)
contraband = list(/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1,/obj/item/weapon/gun/magic/wand = 1, /obj/item/clothing/mask/balaclava=1)
premium = list(/obj/item/clothing/suit/hgpirate = 1, /obj/item/clothing/head/hgpiratecap = 1, /obj/item/clothing/head/helmet/roman = 1, /obj/item/clothing/head/helmet/roman/legionaire = 1, /obj/item/clothing/under/roman = 1, /obj/item/clothing/shoes/roman = 1)
refill_canister = /obj/item/weapon/vending_refill/autodrobe
@@ -238,6 +238,13 @@
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/blueshield
/obj/item/device/radio/headset/heads/blueshield/alt
name = "\proper blueshield's bowman headset"
desc = "The headset of the Blueshield. Protects ears from flashbangs."
flags = EARBANGPROTECT
icon_state = "com_headset_alt"
item_state = "com_headset_alt"
/obj/item/device/radio/headset/ert
name = "emergency response team headset"
+5 -2
View File
@@ -103,7 +103,9 @@ var/list/world_uplinks = list()
/obj/item/device/uplink/Topic(href, href_list)
..()
if(..())
return 1
if(!active)
return
@@ -152,7 +154,8 @@ var/list/world_uplinks = list()
desc = "There is something wrong if you're examining this."
/obj/item/device/uplink/hidden/Topic(href, href_list)
..()
if(..())
return 1
if(href_list["lock"])
toggle()
usr << browse(null, "window=hidden")
+17 -5
View File
@@ -21,15 +21,27 @@
// Reagent ID => friendly name
var/list/reagents_to_log=list()
/obj/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/custom_state = default_state)
// Calling Topic without a corresponding window open causes runtime errors
if(!nowindow && ..())
return 1
if(usr.can_interact_with_interface(nano_host(), checkrange) != STATUS_INTERACTIVE)
return 1
add_fingerprint(usr)
return 0
// In the far future no checks are made in an overriding Topic() beyond if(..()) return
// Instead any such checks are made in CanUseTopic()
var/obj/host = nano_host()
if(host.CanUseTopic(usr, href_list, custom_state) == STATUS_INTERACTIVE)
CouldUseTopic(usr)
return 0
CouldNotUseTopic(usr)
return 1
/obj/proc/CouldUseTopic(var/mob/user)
var/atom/host = nano_host()
host.add_fingerprint(user)
/obj/proc/CouldNotUseTopic(var/mob/user)
// Nada
/obj/Destroy()
machines -= src
@@ -22,7 +22,7 @@
new /obj/item/device/analyzer/plant_analyzer(src)
new /obj/item/device/radio/headset/headset_service(src)
new /obj/item/device/radio/headset/headset_service(src)
new /obj/item/clothing/head/greenbandana(src)
new /obj/item/clothing/mask/bandana/botany(src)
new /obj/item/weapon/minihoe(src)
new /obj/item/weapon/hatchet(src)
new /obj/item/weapon/bee_net(src)
@@ -8,6 +8,9 @@
new /obj/item/clothing/under/color/blue(src)
new /obj/item/clothing/under/color/blue(src)
new /obj/item/clothing/under/color/blue(src)
new /obj/item/clothing/mask/bandana/blue(src)
new /obj/item/clothing/mask/bandana/blue(src)
new /obj/item/clothing/mask/bandana/blue(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/shoes/brown(src)
@@ -22,6 +25,9 @@
/obj/structure/closet/wardrobe/red/New()
new /obj/item/weapon/storage/backpack/duffel/security(src)
new /obj/item/weapon/storage/backpack/duffel/security(src)
new /obj/item/clothing/mask/bandana/red(src)
new /obj/item/clothing/mask/bandana/red(src)
new /obj/item/clothing/mask/bandana/red(src)
new /obj/item/clothing/under/rank/security(src)
new /obj/item/clothing/under/rank/security(src)
new /obj/item/clothing/under/rank/security(src)
+11 -4
View File
@@ -48,23 +48,30 @@ var/can_call_ert
if(!send_emergency_team)
usr << "No emergency response team is currently being sent."
return
/* if(admin_emergency_team)
usr << "An emergency response team has already been sent."
return */
if(jobban_isbanned(usr, "Syndicate") || jobban_isbanned(usr, "Emergency Response Team") || jobban_isbanned(usr, "Security Officer"))
usr << "<font color=red><b>You are jobbanned from the emergency reponse team!"
if(jobban_isbanned(usr, "Emergency Response Team"))
usr << "<span class='warning'>You are jobbanned from the emergency reponse team!</span>"
return
var/responseteam_age = 21 // 21 days to play as an ERT member
var/player_age_check = check_client_age(usr.client, responseteam_age)
if(player_age_check && config.use_age_restriction_for_antags)
usr << "<span class='warning'>This role is not yet available to you. You need to wait another [player_age_check] days.</span>"
return
if(response_team_members.len > 6) usr << "The emergency response team is already full!"
for (var/obj/effect/landmark/L in landmarks_list) if (L.name == "Response Team")
L.name = null//Reserving the place.
/*var/new_name = alert(usr, "Pick a name","Name") as null|text
if(!new_name)//Somebody changed his mind, place is available again.
L.name = "Commando"
return*/
if(alert(usr, "Join the ERT?", "Emergency Response Team", "Yes", "No") == "No")
if(alert(usr, "Join the Emergency Response Team?", "Emergency Response Team", "Yes", "No") == "No")
L.name = "Response Team"
return
+9 -10
View File
@@ -132,7 +132,7 @@ var/list/mechtoys = list(
/datum/controller/supply
processing = 1
processing_interval = 300
//processing_interval = 300
//supply points
var/points = 50
var/points_per_process = 1
@@ -152,20 +152,21 @@ var/list/mechtoys = list(
New()
ordernum = rand(1,9000)
//Supply shuttle ticker - handles supply point regenertion and shuttle travelling between centcomm and the station
//Supply shuttle ticker - handles supply point regeneration and shuttle travelling between centcomm and the station
proc/process()
for(var/typepath in (typesof(/datum/supply_packs) - /datum/supply_packs))
var/datum/supply_packs/P = new typepath()
if(P.name == "HEADER")
del(P)
continue
supply_packs[P.name] = P
spawn(0)
//set background = 1
while(1)
if(processing)
iteration++
points += points_per_process
if(processing)
iteration++
points += points_per_process
sleep(processing_interval)
//sleep(processing_interval)
//To stop things being sent to centcomm which should not be sent to centcomm. Recursively checks for these types.
proc/forbidden_atoms_check(atom/A)
@@ -366,7 +367,6 @@ var/list/mechtoys = list(
temp += "<b>Request from: [get_supply_group_name(cat)]</b><BR><BR>"
for(var/supply_type in supply_controller.supply_packs )
var/datum/supply_packs/N = supply_controller.supply_packs[supply_type]
if(N.name == "HEADER") continue //skip HEADER entry to disable exploiting it for supply points
if(N.hidden || N.contraband || N.group != cat) continue //Have to send the type instead of a reference to
temp += "<A href='?src=\ref[src];doorder=[supply_type]'>[N.name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
@@ -563,7 +563,6 @@ var/list/mechtoys = list(
temp += "<b>Request from: [get_supply_group_name(cat)]</b><BR><BR>"
for(var/supply_type in supply_controller.supply_packs )
var/datum/supply_packs/N = supply_controller.supply_packs[supply_type]
if(N.name == "HEADER") continue //skip HEADER entry to disable exploiting it for supply points
if((N.hidden && !hacked) || (N.contraband && !can_order_contraband) || N.group != cat) continue //Have to send the type instead of a reference to
temp += "<A href='?src=\ref[src];doorder=[supply_type]'>[N.name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
+7
View File
@@ -55,6 +55,13 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
return 0
return max(0, minimal_player_age_antag - C.player_age)
/proc/check_client_age(client/C, var/days) // If days isn't provided, returns the age of the client. If it is provided, it returns the days until the player_age is equal to or greater than the days variable
if(!days)
return C.player_age
else
return max(0, days - C.player_age)
return 0
var/const/MAX_SAVE_SLOTS = 10
+31
View File
@@ -243,6 +243,37 @@ BLIND // can't see anything
icon = 'icons/obj/clothing/masks.dmi'
body_parts_covered = HEAD
slot_flags = SLOT_MASK
var/mask_adjusted = 0
var/ignore_maskadjust = 1
var/adjusted_flags = null
//Proc that moves gas/breath masks out of the way
/obj/item/clothing/mask/proc/adjustmask(var/mob/user)
if(!ignore_maskadjust)
if(!user.canmove || user.stat || user.restrained())
return
if(src.mask_adjusted == 1)
src.icon_state = initial(icon_state)
gas_transfer_coefficient = initial(gas_transfer_coefficient)
permeability_coefficient = initial(permeability_coefficient)
user << "You push \the [src] back into place."
src.mask_adjusted = 0
slot_flags = initial(slot_flags)
else
src.icon_state += "_up"
user << "You push \the [src] out of the way."
gas_transfer_coefficient = null
permeability_coefficient = null
src.mask_adjusted = 1
if(adjusted_flags)
slot_flags = adjusted_flags
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.internal)
if(H.internals)
H.internals.icon_state = "internal0"
H.internal = null
usr.update_inv_wear_mask()
//Shoes
/obj/item/clothing/shoes
+7
View File
@@ -6,10 +6,17 @@
flags = BLOCKHAIR
flags_inv = HIDEFACE
w_class = 2
icon_action_button = "action_balaclava"
action_button_name = "Adjust Balaclava"
ignore_maskadjust = 0
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/mask.dmi'
)
/obj/item/clothing/mask/balaclava/attack_self(var/mob/user)
adjustmask(user)
/obj/item/clothing/mask/luchador
name = "Luchador Mask"
desc = "Worn by robust fighters, flying high to defeat their foes!"
+8 -22
View File
@@ -8,34 +8,17 @@
gas_transfer_coefficient = 0.10
permeability_coefficient = 0.50
species_fit = list("Vox")
var/hanging = 0
icon_action_button = "action_breath"
action_button_name = "Adjust Breath Mask"
ignore_maskadjust = 0
species_fit = list("Vox", "Vox Armalis")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/mask.dmi',
"Vox Armalis" = 'icons/mob/species/armalis/mask.dmi',
)
verb/toggle()
set category = "Object"
set name = "Adjust mask"
set src in usr
if(usr.canmove && !usr.stat && !usr.restrained())
if(!src.hanging)
src.hanging = !src.hanging
gas_transfer_coefficient = 1 //gas is now escaping to the turf and vice versa
flags &= ~(MASKCOVERSMOUTH | MASKINTERNALS)
icon_state = "[initial(icon_state)]down"
usr << "Your mask is now hanging on your neck."
else
src.hanging = !src.hanging
gas_transfer_coefficient = 0.10
flags |= MASKCOVERSMOUTH | MASKINTERNALS
icon_state = "[initial(icon_state)]"
usr << "You pull the mask up to cover your face."
usr.update_inv_wear_mask()
/obj/item/clothing/mask/breath/attack_self(var/mob/user)
adjustmask(user)
/obj/item/clothing/mask/breath/medical
desc = "A close-fitting sterile mask that can be connected to an air supply."
@@ -52,3 +35,6 @@
item_state = "voxmask"
permeability_coefficient = 0.01
species_restricted = list("Vox")
icon_action_button = null
action_button_name = null
ignore_maskadjust = 1
+16 -4
View File
@@ -146,18 +146,30 @@
name = "security gas mask"
desc = "A standard issue Security gas mask with integrated 'Compli-o-nator 3000' device, plays over a dozen pre-recorded compliance phrases designed to get scumbags to stand still whilst you taze them. Do not tamper with the device."
action_button_name = "HALT!"
icon_state = "officermask"
icon_state = "sechailer"
var/cooldown = 0
var/aggressiveness = 2
ignore_maskadjust = 0
species_fit = list()
action_button_name = "HALT!"
icon_action_button = "action_officermask"
icon_action_button = "action_sechailer"
/obj/item/clothing/mask/gas/sechailer/warden
icon_state = "wardenmask"
/obj/item/clothing/mask/gas/sechailer/hos
icon_state = "hosmask"
/obj/item/clothing/mask/gas/sechailer/swat
name = "\improper SWAT mask"
desc = "A close-fitting tactical mask with an especially aggressive Compli-o-nator 3000."
action_button_name = "HALT!"
icon_state = "swat"
aggressiveness = 3
ignore_maskadjust = 1
/obj/item/clothing/mask/gas/sechailer/verb/adjust()
set category = "Object"
set name = "Adjust Mask"
adjustmask(usr)
/obj/item/clothing/mask/gas/sechailer/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/screwdriver))
@@ -35,10 +35,16 @@
gas_transfer_coefficient = 0.90
permeability_coefficient = 0.01
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 25, rad = 0)
action_button_name = "Adjust Sterile Mask"
ignore_maskadjust = 0
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/mask.dmi'
)
/obj/item/clothing/mask/surgical/attack_self(var/mob/user)
adjustmask(user)
/obj/item/clothing/mask/fakemoustache
name = "fake moustache"
desc = "Warning: moustache is fake."
@@ -150,3 +156,51 @@
item_state = "pennywise_mask"
species_fit = list("Vox")
flags = MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS | BLOCKHAIR
// Bandanas
/obj/item/clothing/mask/bandana
name = "bandana"
desc = "A colorful bandana."
flags = MASKCOVERSMOUTH
flags_inv = HIDEFACE
w_class = 1
slot_flags = SLOT_MASK
ignore_maskadjust = 0
adjusted_flags = SLOT_HEAD
icon_state = "bandbotany"
icon_action_button = "action_bandana"
action_button_name = "Adjust Bandana"
/obj/item/clothing/mask/bandana/attack_self(var/mob/user)
adjustmask(user)
obj/item/clothing/mask/bandana/red
name = "red bandana"
icon_state = "bandred"
obj/item/clothing/mask/bandana/blue
name = "blue bandana"
icon_state = "bandblue"
obj/item/clothing/mask/bandana/gold
name = "gold bandana"
icon_state = "bandgold"
obj/item/clothing/mask/bandana/green
name = "green bandana"
icon_state = "bandgreen"
/obj/item/clothing/mask/bandana/botany
name = "botany bandana"
desc = "It's a green bandana with some fine nanotech lining."
icon_state = "bandbotany"
/obj/item/clothing/mask/bandana/skull
name = "skull bandana"
desc = "It's a black bandana with a skull pattern."
icon_state = "bandskull"
/obj/item/clothing/mask/bandana/black
name = "black bandana"
desc = "It's a black bandana."
icon_state = "bandblack"
+7
View File
@@ -17,6 +17,13 @@
blood_overlay_type = "armor"
flags = ONESIZEFITSALL
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
/obj/item/clothing/suit/armor/vest/jacket
name = "military jacket"
desc = "An old military jacket, it has armoring."
icon_state = "militaryjacket"
item_state = "militaryjacket"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
/obj/item/clothing/suit/armor/vest/combat
name = "combat vest"
+2 -3
View File
@@ -639,8 +639,6 @@
item_state = "checkered_suit"
_color = "checkered_suit"
/obj/item/clothing/under/owl
name = "owl uniform"
desc = "A soft brown jumpsuit made of synthetic feathers and strong conviction."
@@ -653,4 +651,5 @@
desc = "A soft brown jumpsuit with a white feather collar made of synthetic feathers and a lust for mayhem."
icon_state = "griffin"
_color = "griffin"
flags = NODROP
flags = NODROP
+2 -2
View File
@@ -2,7 +2,7 @@
announceWhen = 5
/datum/event/cargo_bonus/announce()
command_announcement.Announce("Congratulations! [station_name()] was chosen for supply limit increase, please contact local cargo department for details!", "Supply Alert")
command_announcement.Announce("Congratulations! [station_name()] was chosen for a supply limit increase. Please contact the local cargo department for details!", "Supply Alert")
/datum/event/cargo_bonus/start()
supply_controller.points+=rand(100,500)
supply_controller.points += rand(100,500)
@@ -65,6 +65,9 @@
return (tally + move_delay_add + config.alien_delay)
/mob/living/carbon/alien/humanoid/Process_Spacemove(var/check_drift = 0)
if(..())
return 1
return 0
///mob/living/carbon/alien/humanoid/bullet_act(var/obj/item/projectile/Proj) taken care of in living
+2 -2
View File
@@ -476,10 +476,10 @@
update_inv_wear_mask(0)
else if(I == handcuffed)
handcuffed = null
update_inv_handcuffed(0)
update_inv_handcuffed(1)
else if(I == legcuffed)
legcuffed = null
update_inv_legcuffed(0)
update_inv_legcuffed(1)
/mob/living/carbon/show_inv(mob/living/carbon/user as mob)
user.set_machine(src)
@@ -182,7 +182,7 @@
update_inv_back(0)
else if(I == handcuffed)
handcuffed = null
update_inv_handcuffed(0)
update_inv_handcuffed(1)
else if(I == legcuffed)
legcuffed = null
update_inv_legcuffed(0)
@@ -97,6 +97,12 @@
if(jobban_isbanned(src,"nonhumandept") || jobban_isbanned(src,"Drone"))
usr << "\red You are banned from playing drones and cannot spawn as a drone."
return
var/drone_age = 14 // 14 days to play as a drone
var/player_age_check = check_client_age(usr.client, drone_age)
if(player_age_check && config.use_age_restriction_for_antags)
usr << "<span class='warning'>This role is not yet available to you. You need to wait another [player_age_check] days.</span>"
return
var/deathtime = world.time - src.timeofdeath
var/joinedasobserver = 0
@@ -1484,16 +1484,6 @@ var/list/robot_verbs_default = list(
radio.recalculateChannels()
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
/mob/living/silicon/robot/syndicate/canUseTopic(atom/movable/M)
if(stat || lockcharge || stunned || weakened)
return
if(z in config.admin_levels)
return 1
/*if(istype(M, /obj/machinery))
var/obj/machinery/Machine = M
return Machine.emagged*/
return 1
/mob/living/silicon/robot/proc/notify_ai(var/notifytype, var/oldname, var/newname)
if(!connected_ai)
+12
View File
@@ -114,6 +114,11 @@ proc/isembryo(A)
if(istype(A, /mob/living/silicon))
return 1
return 0
/proc/isSilicon(A) // Bay support
if(istype(A, /mob/living/silicon))
return 1
return 0
/proc/isliving(A)
if(istype(A, /mob/living))
@@ -158,6 +163,13 @@ proc/isnewplayer(A)
proc/hasorgans(A)
return ishuman(A)
proc/iscuffed(A)
if(istype(A, /mob/living/carbon))
var/mob/living/carbon/C = A
if(C.handcuffed)
return 1
return 0
proc/isdeaf(A)
if(istype(A, /mob))
+1 -6
View File
@@ -31,18 +31,13 @@
* ui_interact is currently defined for /atom/movable
*
* @param user /mob The mob who is interacting with this ui
<<<<<<< HEAD
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
* @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui
=======
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
* @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui
* @param force_open boolean Force the UI to (re)open, even if it's already open
>>>>>>> 7e7e6cd... Continued work in progress on a major revision of the NanoUI templating system.
*
* @return nothing
*/
/atom/movable/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
/atom/movable/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/nano_ui/master_ui = null, var/datum/topic_state/custom_state = null)
return
// Used by the Nano UI Manager (/datum/nanomanager) to track UIs opened by this mob
+120
View File
@@ -0,0 +1,120 @@
/atom/movable/proc/nano_host()
return src
/obj/nano_module/nano_host()
return loc
/atom/movable/proc/CanUseTopic(var/mob/user, href_list, var/datum/topic_state/custom_state)
return user.can_use_topic(nano_host(), custom_state)
/mob/proc/can_use_topic(var/mob/user, var/datum/topic_state/custom_state)
return STATUS_CLOSE // By default no mob can do anything with NanoUI
/mob/dead/observer/can_use_topic()
if(check_rights(R_ADMIN, 0))
return STATUS_INTERACTIVE // Admins are more equal
return STATUS_UPDATE // Ghosts can view updates
/mob/living/silicon/pai/can_use_topic(var/src_object)
if(src_object == src && !stat)
return STATUS_INTERACTIVE
else
return ..()
/mob/living/silicon/robot/can_use_topic(var/src_object, var/datum/topic_state/custom_state)
if(stat || !client)
return STATUS_CLOSE
if(lockcharge || stunned || weakened)
return STATUS_DISABLED
// robots can interact with things they can see within their view range
if(!(custom_state.flags & NANO_IGNORE_DISTANCE) && (src_object in view(src)))
return STATUS_INTERACTIVE // interactive (green visibility)
return STATUS_DISABLED // no updates, completely disabled (red visibility)
/mob/living/silicon/robot/syndicate/can_use_topic(var/src_object)
. = ..()
if(. != STATUS_INTERACTIVE)
return
if(z in config.admin_levels) // Syndicate borgs can interact with everything on the admin level
return STATUS_INTERACTIVE
if(istype(get_area(src), /area/syndicate_station)) // If elsewhere, they can interact with everything on the syndicate shuttle
return STATUS_INTERACTIVE
if(istype(src_object, /obj/machinery)) // Otherwise they can only interact with emagged machinery
var/obj/machinery/Machine = src_object
if(Machine.emagged)
return STATUS_INTERACTIVE
return STATUS_UPDATE
/mob/living/silicon/ai/can_use_topic(var/src_object)
if(!client || check_unable(1))
return STATUS_CLOSE
// Prevents the AI from using Topic on admin levels (by for example viewing through the court/thunderdome cameras)
// unless it's on the same level as the object it's interacting with.
var/turf/T = get_turf(src_object)
if(!T || !(z == T.z || (T.z in config.player_levels)))
return STATUS_CLOSE
// If an object is in view then we can interact with it
if(src_object in view(client.view, src))
return STATUS_INTERACTIVE
// If we're installed in a chassi, rather than transfered to an inteliCard or other container, then check if we have camera view
if(is_in_chassis())
//stop AIs from leaving windows open and using then after they lose vision
//apc_override is needed here because AIs use their own APC when powerless
if(cameranet && !cameranet.checkTurfVis(get_turf(src_object)))
return apc_override ? STATUS_INTERACTIVE : STATUS_CLOSE
return STATUS_INTERACTIVE
return STATUS_CLOSE
/mob/living/proc/shared_living_nano_interaction(var/src_object)
if (src.stat != CONSCIOUS)
return STATUS_CLOSE // no updates, close the interface
else if (restrained() || lying || stat || stunned || weakened)
return STATUS_UPDATE // update only (orange visibility)
return STATUS_INTERACTIVE
/mob/living/proc/shared_living_nano_distance(var/atom/movable/src_object)
if(!isturf(src_object.loc))
if(src_object.loc == src) // Item in the inventory
return STATUS_INTERACTIVE
if(src.contents.Find(src_object.loc)) // A hidden uplink inside an item
return STATUS_INTERACTIVE
if (!(src_object in view(4, src))) // If the src object is not in visable, disable updates
return STATUS_CLOSE
var/dist = get_dist(src_object, src)
if (dist <= 1)
return STATUS_INTERACTIVE // interactive (green visibility)
else if (dist <= 2)
return STATUS_UPDATE // update only (orange visibility)
else if (dist <= 4)
return STATUS_DISABLED // no updates, completely disabled (red visibility)
return STATUS_CLOSE
/mob/living/can_use_topic(var/src_object, var/datum/topic_state/custom_state)
. = shared_living_nano_interaction(src_object)
if(. == STATUS_INTERACTIVE && !(custom_state.flags & NANO_IGNORE_DISTANCE))
. = shared_living_nano_distance(src_object)
if(STATUS_INTERACTIVE)
return STATUS_UPDATE
/mob/living/carbon/human/can_use_topic(var/src_object, var/datum/topic_state/custom_state)
. = shared_living_nano_interaction(src_object)
if(. == STATUS_INTERACTIVE && !(custom_state.flags & NANO_IGNORE_DISTANCE))
. = shared_living_nano_distance(src_object)
if(. == STATUS_UPDATE && (TK in mutations)) // If we have telekinesis and remain close enough, allow interaction.
return STATUS_INTERACTIVE
/var/global/datum/topic_state/default_state = new()
/datum/topic_state
var/flags = 0
/datum/topic_state/proc/href_list(var/mob/user)
return list()
+2 -1
View File
@@ -186,7 +186,8 @@
return 0 // wasn't open
processing_uis.Remove(ui)
ui.user.open_uis.Remove(ui)
if(ui.user) // Sanity check in case a user has been deleted (say a blown up borg watching the alarm interface)
ui.user.open_uis.Remove(ui)
var/list/uis = open_uis[src_object_key][ui.ui_key]
uis.Remove(ui)
-11
View File
@@ -1,11 +0,0 @@
/atom/movable/proc/nano_host()
return src
/obj/nano_module/nano_host()
return loc
/atom/movable/proc/nano_can_update()
return 1
/obj/machinery/nano_can_update()
return !(stat & (NOPOWER|BROKEN))
+33 -137
View File
@@ -13,8 +13,6 @@ nanoui is used to open and update nano browser uis
var/atom/movable/src_object
// the title of this ui
var/title
// /vg/ - Whether to write debug information to nano/debug.html
var/writeDebug=TRUE
// the key of this ui, this is to allow multiple (different) uis for each src_object
var/ui_key
// window_id is used as the window name/identifier for browse and onclose
@@ -53,13 +51,14 @@ nanoui is used to open and update nano browser uis
var/is_auto_updating = 0
// the current status/visibility of the ui
var/status = STATUS_INTERACTIVE
// Relationship between a master interface and its children. Used in update_status
var/datum/nanoui/master_ui
var/list/datum/nanoui/children = list()
var/datum/topic_state/custom_state = null
var/cached_data = null
// Only allow users with a certain user.stat to get updates. Defaults to 0 (concious)
var/allowed_user_stat = 0 // -1 = ignore, 0 = alive, 1 = unconcious or alive, 2 = dead concious or alive
/**
* Create a new nanoui instance.
*
@@ -74,17 +73,22 @@ nanoui is used to open and update nano browser uis
*
* @return /nanoui new nanoui object
*/
/datum/nanoui/New(nuser, nsrc_object, nui_key, ntemplate_filename, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null)
/datum/nanoui/New(nuser, nsrc_object, nui_key, ntemplate_filename, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null, var/datum/nanoui/master_ui = null, var/datum/topic_state/custom_state = default_state)
user = nuser
src_object = nsrc_object
ui_key = nui_key
window_id = "[ui_key]\ref[src_object]"
src.master_ui = master_ui
if(master_ui)
master_ui.children += src
src.custom_state = custom_state
// add the passed template filename as the "main" template, this is required
add_template("main", ntemplate_filename)
if (ntitle)
title = ntitle
title = sanitize(ntitle)
if (nwidth)
width = nwidth
if (nheight)
@@ -139,121 +143,13 @@ nanoui is used to open and update nano browser uis
*/
/datum/nanoui/proc/update_status(var/push_update = 0)
var/atom/movable/host = src_object.nano_host()
if(!host.nano_can_update())
var/new_status = host.CanUseTopic(user, list(), custom_state)
if(master_ui)
new_status = min(new_status, master_ui.status)
set_status(new_status, push_update)
if(new_status == STATUS_CLOSE)
close()
return
var/status = user.can_interact_with_interface(host.nano_host())
if(status == STATUS_CLOSE)
close()
else
set_status(status, push_update)
/*
Procs called by update_status()
*/
/mob/living/silicon/pai/can_interact_with_interface(src_object)
if(src_object == src && !stat)
return STATUS_INTERACTIVE
else
return ..()
/mob/proc/can_interact_with_interface(var/src_object)
return STATUS_CLOSE // By default no mob can do anything with NanoUI
/mob/dead/observer/can_interact_with_interface()
if(check_rights(R_ADMIN, 0))
return STATUS_INTERACTIVE // Admins are more equal
return STATUS_UPDATE // Ghosts can view updates
/mob/living/silicon/robot/can_interact_with_interface(var/src_object)
if(stat || !client)
return STATUS_CLOSE
if(lockcharge || stunned || weakened)
return STATUS_DISABLED
if (src_object in view(client.view, src)) // robots can see and interact with things they can see within their view range
return STATUS_INTERACTIVE // interactive (green visibility)
return STATUS_DISABLED // no updates, completely disabled (red visibility)
/mob/living/silicon/robot/syndicate/can_interact_with_interface(var/src_object)
. = ..()
if(. != STATUS_INTERACTIVE)
return
if(z in config.admin_levels) // Syndicate borgs can interact with everything on the admin level
return STATUS_INTERACTIVE
if(istype(get_area(src), /area/syndicate_station) || istype(get_area(src), /area/traitor)) // If elsewhere, they can interact with everything on the syndicate shuttle and traitor station
return STATUS_INTERACTIVE
if(istype(src_object, /obj/machinery)) // And they can also interact with everything else
/*var/obj/machinery/Machine = src_object
if(Machine.emagged) // Uncomment so they can only interact with emagged machinery
return STATUS_INTERACTIVE*/
return STATUS_INTERACTIVE
return STATUS_UPDATE
/mob/living/silicon/ai/can_interact_with_interface(var/src_object)
if(!client || check_unable(1))
return STATUS_CLOSE
// Prevents the AI from using Topic on admin levels (by for example viewing through the court/thunderdome cameras)
// unless it's on the same level as the object it's interacting with.
var/turf/T = get_turf(src_object)
if(!T || !(z == T.z || (T.z in config.player_levels)))
return STATUS_CLOSE
// If an object is in view then we can interact with it
if(src_object in view(client.view, src))
return STATUS_INTERACTIVE
// If we're installed in a chassi, rather than transfered to an inteliCard or other container, then check if we have camera view
if(is_in_chassis())
//stop AIs from leaving windows open and using then after they lose vision
//apc_override is needed here because AIs use their own APC when powerless
if(cameranet && !cameranet.checkTurfVis(get_turf(src_object)))
return apc_override ? STATUS_INTERACTIVE : STATUS_CLOSE
return STATUS_INTERACTIVE
return STATUS_CLOSE
/mob/living/proc/shared_living_nano_interaction(var/src_object)
if (src.stat != CONSCIOUS)
return STATUS_CLOSE // no updates, close the interface
else if (restrained() || lying || stat || stunned || weakened)
return STATUS_UPDATE // update only (orange visibility)
return STATUS_INTERACTIVE
/mob/living/proc/shared_living_nano_distance(var/atom/movable/src_object)
if(!isturf(src_object.loc))
if(src_object.loc == src) // Item in the inventory
return STATUS_INTERACTIVE
if(src.contents.Find(src_object.loc)) // A hidden uplink inside an item
return STATUS_INTERACTIVE
if (!(src_object in view(4, src))) // If the src object is not in visable, disable updates
return STATUS_CLOSE
var/dist = get_dist(src_object, src)
if (dist <= 1)
return STATUS_INTERACTIVE // interactive (green visibility)
else if (dist <= 2)
return STATUS_UPDATE // update only (orange visibility)
else if (dist <= 4)
return STATUS_DISABLED // no updates, completely disabled (red visibility)
return STATUS_CLOSE
/mob/living/can_interact_with_interface(var/src_object, var/be_close = 1)
. = shared_living_nano_interaction(src_object)
if(. == STATUS_INTERACTIVE && be_close)
. = shared_living_nano_distance(src_object)
if(STATUS_INTERACTIVE)
return STATUS_UPDATE
/mob/living/carbon/human/can_interact_with_interface(var/src_object, var/be_close = 1)
. = shared_living_nano_interaction(src_object)
if(. == STATUS_INTERACTIVE && be_close)
. = shared_living_nano_distance(src_object)
if(. == STATUS_UPDATE && (TK in mutations)) // If we have telekinesis and remain close enough, allow interaction.
return STATUS_INTERACTIVE
/**
* Set the ui to auto update (every master_controller tick)
@@ -409,7 +305,7 @@ nanoui is used to open and update nano browser uis
*/
/datum/nanoui/proc/set_show_map(nstate)
show_map = nstate
/**
* Toggle showing the map ui
*
@@ -496,18 +392,15 @@ nanoui is used to open and update nano browser uis
* @return nothing
*/
/datum/nanoui/proc/open()
var/window_size = ""
if (width && height)
window_size = "size=[width]x[height];"
update_status(0)
var/html=get_html()
if(src.writeDebug)
var/f = file("nano/debug.html")
fdel(f)
f << html
user << browse(html, "window=[window_id];[window_size][window_options]")
winset(user, "mapwindow.map", "focus=true") // Return keyboard focus to map.
if(status == STATUS_CLOSE)
return
user << browse(get_html(), "window=[window_id];[window_size][window_options]")
winset(user, "mapwindow.map", "focus=true") // return keyboard focus to map
on_close_winset()
//onclose(user, window_id)
nanomanager.ui_opened(src)
@@ -521,6 +414,8 @@ nanoui is used to open and update nano browser uis
is_auto_updating = 0
nanomanager.ui_closed(src)
user << browse(null, "window=[window_id]")
for(var/datum/nanoui/child in children)
child.close()
/**
* Set the UI window to call the nanoclose verb when the window is closed
@@ -534,11 +429,12 @@ nanoui is used to open and update nano browser uis
var/params = "\ref[src]"
winset(user, window_id, "on-close=\"nanoclose [params]\"")
/**
* Appends already processed json txt to the list2json proc when setting initial-data and data pushes
* Used for data that is fucking huge like manifests and camera lists that doesn't change often.
* And we only want to process them when they change.
* Fuck javascript
*
* @return nothing
*/
@@ -546,6 +442,7 @@ nanoui is used to open and update nano browser uis
cached_data = data
return
/**
* Push data to an already open UI window
*
@@ -578,12 +475,12 @@ nanoui is used to open and update nano browser uis
if(href_list["showMap"])
set_show_map(text2num(href_list["showMap"]))
map_update = 1
if(href_list["mapZLevel"])
set_map_z_level(text2num(href_list["mapZLevel"]))
map_update = 1
if ((src_object && src_object.Topic(href, href_list)) || map_update)
if ((src_object && src_object.Topic(href, href_list, 0, custom_state)) || map_update)
nanomanager.update_uis(src_object) // update all UIs attached to src_object
/**
@@ -610,5 +507,4 @@ nanoui is used to open and update nano browser uis
* @return nothing
*/
/datum/nanoui/proc/update(var/force_open = 0)
src_object.ui_interact(user, ui_key, src, force_open)
src_object.ui_interact(user, ui_key, src, force_open, master_ui, custom_state)
+6 -2
View File
@@ -691,8 +691,12 @@
else
beenhit += 1
return
/obj/machinery/power/apc/attack_ghost(user as mob)
if(stat & (BROKEN|MAINT))
return
return ui_interact(user)
/obj/machinery/power/apc/interact(mob/user)
if(!user)
return
+3
View File
@@ -332,6 +332,9 @@
add_fingerprint(user)
ui_interact(user)
/obj/machinery/power/smes/attack_ghost(mob/user)
ui_interact(user)
/obj/machinery/power/smes/attack_hand(mob/user)
add_fingerprint(user)
ui_interact(user)
+13
View File
@@ -36,6 +36,7 @@
var/last_fired = 0
var/obj/item/device/flashlight/F = null
var/can_flashlight = 0
var/heavy_weapon = 0
proc/ready_to_fire()
if(world.time >= last_fired + fire_delay)
@@ -122,6 +123,12 @@
if(!in_chamber)
return
if(heavy_weapon)
if(user.get_inactive_hand())
recoil = 4 //one-handed kick
else
recoil = initial(recoil)
in_chamber.firer = user
in_chamber.def_zone = user.zone_sel.selecting
@@ -142,6 +149,12 @@
user.visible_message("<span class='warning'>[user] fires [src][reflex ? " by reflex":""]!</span>", \
"<span class='warning'>You fire [src][reflex ? "by reflex":""]!</span>", \
"You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
if(heavy_weapon)
if(user.get_inactive_hand())
if(prob(15))
user.visible_message("<span class='danger'>[src] flies out of [user]'s hands!</span>", "<span class='userdanger'>[src] kicks out of your grip!</span>")
user.drop_item()
if (istype(in_chamber, /obj/item/projectile/bullet/blank)) // A hacky way of making blank shotgun shells work again. Honk.
in_chamber.delete()
@@ -130,3 +130,43 @@
update_charge()
update_reactor()
update_mode()
/obj/item/weapon/gun/energy/gun/turret
name = "hybrid turret gun"
desc = "A heavy hybrid energy cannon with two settings: Stun and kill."
icon_state = "turretlaser"
slot_flags = null
w_class = 5
heavy_weapon = 1
can_flashlight = 0
projectile_type = /obj/item/projectile/energy/electrode
charge_cost = 1000
fire_delay = 20
/obj/item/weapon/gun/energy/gun/turret/update_icon()
icon_state = initial(icon_state)
/obj/item/weapon/gun/energy/gun/turret/attack_self(mob/living/user as mob)
switch(mode)
if(0)
mode = 1
charge_cost = 500
fire_sound = 'sound/weapons/Laser.ogg'
user << "\red [src.name] is now set to kill."
projectile_type = /obj/item/projectile/beam
modifystate = "energykill"
fire_delay = 0
if(1)
mode = 0
charge_cost = 1000
fire_sound = 'sound/weapons/Taser.ogg'
user << "\red [src.name] is now set to stun."
projectile_type = /obj/item/projectile/energy/electrode
modifystate = "energystun"
fire_delay = 20
update_icon()
if(user.l_hand == src)
user.update_inv_l_hand()
else
user.update_inv_r_hand()
+5 -4
View File
@@ -399,10 +399,11 @@ datum
check_gofast(var/mob/M)
if(M && istype(M, /mob))
if(M.reagents.has_reagent("hyperzine")||M.reagents.has_reagent("nuka_cola"))
return 1
else
M.status_flags &= ~GOTTAGOFAST
if(M.reagents)
if(M.reagents.has_reagent("hyperzine")||M.reagents.has_reagent("nuka_cola"))
return 1
else
M.status_flags &= ~GOTTAGOFAST
update_total()
total_volume = 0
+2
View File
@@ -968,6 +968,8 @@ var/list/hit_appends = list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF")
#define STATUS_DISABLED 0 // RED Visability
#define STATUS_CLOSE -1 // Close the interface
#define NANO_IGNORE_DISTANCE 1
//Click cooldowns, in tenths of a second
#define CLICK_CD_MELEE 8
#define CLICK_CD_RANGE 4
Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 KiB

After

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 115 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

+1189 -688
View File
File diff suppressed because it is too large Load Diff
+28 -5
View File
@@ -128,7 +128,7 @@ img, a img {
h1, h2, h3, h4, h5, h6 {
margin: 0;
padding: 12px 0 6px 0;
color: #517087;
color: #FFFFFF;
clear: both;
}
@@ -238,17 +238,32 @@ div.notice {
clear: both;
}
.itemLabel {
.itemLabel, .itemLabelWide {
float: left;
width: 30%;
color: #e9c183;
}
.itemContent {
float: left;
.itemLabel {
width: 30%;
}
.itemLabelWide {
width: 69%;
}
.itemContent, .itemContentThin {
float: left;
}
.itemContent {
width: 69%;
}
.itemContentThin {
width: 30%;
}
.itemLabelNarrow {
float: left;
width: 20%;
@@ -473,6 +488,14 @@ div.notice {
text-align: center;
}
table.fixed {
table-layout:fixed;
}
table.fixed td {
overflow: hidden;
}
/* Table styling for the power monitor */
table.pmon {
border: 2px solid RoyalBlue;
+3
View File
@@ -64,6 +64,9 @@ NanoBaseHelpers = function ()
round: function(number) {
return Math.round(number);
},
fixed: function(number) {
return Math.round(number * 10) / 10;
},
// Round a number down to integer
floor: function(number) {
return Math.floor(number);
+3 -3
View File
@@ -6,11 +6,11 @@ Used In File(s): \code\game\machinery\computer\crew.dm
<table width="100%"><tbody>
{{for data.crewmembers}}
{{if value.sensor_type == 1}}
<tr><td>{{:value.name}}</td><td>{{:value.dead ? "<span class='bad'>Deceased</span>" : "<span class='good'>Living</span>"}}</td><td><span class="neutral">Not Available</span></td></tr>
<tr><td>{{:value.name}} ({{:value.assignment}})</td><td>{{:value.dead ? "<span class='bad'>Deceased</span>" : "<span class='good'>Living</span>"}}</td><td><span class="neutral">Not Available</span></td></tr>
{{else value.sensor_type == 2}}
<tr><td>{{:value.name}}</td><td>{{:value.dead ? "<span class='bad'>Deceased</span>" : "<span class='good'>Living</span>"}} (<span class="oxyloss_light">{{:value.oxy}}</span>/<span class="toxin_light">{{:value.tox}}</span>/<span class="burn">{{:value.fire}}</span>/<span class="brute">{{:value.brute}}</span>)</td><td><span class="neutral">Not Available</td></td></tr>
<tr><td>{{:value.name}} ({{:value.assignment}})</td><td>{{:value.dead ? "<span class='bad'>Deceased</span>" : "<span class='good'>Living</span>"}} (<span class="oxyloss">{{:value.oxy}}</span>/<span class="toxin">{{:value.tox}}</span>/<span class="burn">{{:value.fire}}</span>/<span class="brute">{{:value.brute}}</span>)</td><td><span class="neutral">Not Available</td></td></tr>
{{else value.sensor_type == 3}}
<tr><td>{{:value.name}}</td><td>{{:value.dead ? "<span class='bad'>Deceased</span>" : "<span class='good'>Living</span>"}} (<span class="oxyloss_light">{{:value.oxy}}</span>/<span class="toxin_light">{{:value.tox}}</span>/<span class="burn">{{:value.fire}}</span>/<span class="brute">{{:value.brute}}</span>)</td><td>{{:value.area}}({{:value.x}}, {{:value.y}})</td></tr>
<tr><td>{{:value.name}} ({{:value.assignment}})</td><td>{{:value.dead ? "<span class='bad'>Deceased</span>" : "<span class='good'>Living</span>"}} (<span class="oxyloss">{{:value.oxy}}</span>/<span class="toxin">{{:value.tox}}</span>/<span class="burn">{{:value.fire}}</span>/<span class="brute">{{:value.brute}}</span>)</td><td>{{:value.area}}({{:value.x}}, {{:value.y}})</td></tr>
{{/if}}
{{/for}}
</tbody></table>
+3 -3
View File
@@ -4,13 +4,13 @@ Used In File(s): \code\game\machinery\computer\crew.dm
-->
{{for data.crewmembers}}
{{if value.sensor_type == 3}}
<div class="mapIcon mapIcon16 rank-{{:value.rank.ckey()}} {{:value.dead ? 'dead' : 'alive'}}" style="left: {{:(value.x)}}px; bottom: {{:(value.y)}}px;" unselectable="on">
<div class="mapIcon mapIcon16 rank-{{:value.rank.ckey()}} {{:value.dead ? 'dead' : 'alive'}}" style="left: {{:(value.x)}}px; bottom: {{:(value.y - 1)}}px;" unselectable="on">
<div class="tooltip hidden">
{{:value.name}} ({{:value.dead ? "<span class='bad'>Deceased</span>" : "<span class='good'>Living</span>"}}) (<span class="oxyloss_light">{{:value.oxy}}</span>/<span class="toxin_light">{{:value.tox}}</span>/<span class="burn">{{:value.fire}}</span>/<span class="brute">{{:value.brute}}</span>) ({{:value.area}}: {{:value.x}}, {{:value.y}})
{{:value.name}} ({{:value.assignment}}) ({{:value.dead ? "<span class='bad'>Deceased</span>" : "<span class='good'>Living</span>"}}) (<span class="oxyloss_light">{{:value.oxy}}</span>/<span class="toxin_light">{{:value.tox}}</span>/<span class="burn">{{:value.fire}}</span>/<span class="brute">{{:value.brute}}</span>) ({{:value.area}}: {{:value.x}}, {{:value.y}})
</div>
</div>
{{/if}}
{{/for}}
<div class="mapIcon mapIcon16 rank-captain alive" style="left: 10px; bottom: 10px;" unselectable="on"></div>
<div style="position: absolute; width: 1px; height: 1px; background: #00ff00; left: 10px; bottom: 10px;" unselectable="on"></div>
<div style="position: absolute; width: 1px; height: 1px; background: #00ff00; left: 10px; bottom: 10px;" unselectable="on"></div>
+74 -70
View File
@@ -1,82 +1,86 @@
<div class="item">
<div class="itemContent" style="padding: 5px">
{{:~link(power ? 'On' : 'Off', null, {'command' : 'power'}, null, power ? 'selected' : 'redBackground')}}
{{:helper.link(data.power ? 'On' : 'Off', null, {'command' : 'power'}, data.config ? 'disabled' : null)}}
</div>
<div class="itemContent" style="padding: 5px">
{{:~link('Configure', null, {'command' : 'configure'}, null, config ? 'selected' : null)}}
{{:helper.link('Configure', null, {'command' : 'configure'}, null, data.config ? 'selected' : null)}}
</div>
{{if config}}
{{if data.config}}
<div style="width: 315px; text-align: center">
<div style="float: left">
<div class="white" style="height: 26">Port</div>
{{for ports}}
<div class="average" style="height: 26">{{:dir}} Port</div>
{{/for}}
</div>
<div style="float: left; margin-left: 10">
<div class="white" style="height: 26">Input</div>
{{for ports}}
<div style="height: 26">
{{:~link(' ', null, {'command' : 'switch_mode', 'mode' : 'in', 'dir' : dir}, null, input ? 'selected' : null)}}
</div>
{{/for}}
</div>
<div style="float: left; margin-left: 10">
<div class="white" style="height: 26">Output</div>
{{for ports}}
<div style="height: 26">
{{:~link(' ', null, {'command' : 'switch_mode', 'mode' : 'out', 'dir' : dir}, null, output ? 'selected' : null)}}
</div>
{{/for}}
</div>
<div style="float: left; margin-left: 10">
<div class="white" style="height: 26">Filter</div>
{{for ports}}
<div style="height: 26">
{{:~link(f_type ? f_type : 'None', null, {'command' : 'switch_filter', 'mode' : f_type, 'dir' : dir}, filter ? null : 'disabled', f_type ? 'selected' : null)}}
</div>
{{/for}}
</div>
</div>
<div style="width: 315px; text-align: center">
<div style="float: left">
<div class="white" style="height: 26">Port</div>
{{for data.ports}}
<div class="average" style="height: 26">{{:value.dir}} Port</div>
{{/for}}
</div>
<div style="float: left; margin-left: 10">
<div class="white" style="height: 26">Input</div>
{{for data.ports}}
<div style="height: 26">
{{:helper.link(' ', null, {'command' : 'switch_mode', 'mode' : 'in', 'dir' : value.dir}, null, value.input ? 'selected' : null)}}
</div>
{{/for}}
</div>
<div style="float: left; margin-left: 10">
<div class="white" style="height: 26">Output</div>
{{for data.ports}}
<div style="height: 26">
{{:helper.link(' ', null, {'command' : 'switch_mode', 'mode' : 'out', 'dir' : value.dir}, null, value.output ? 'selected' : null)}}
</div>
{{/for}}
</div>
<div style="float: left; margin-left: 10">
<div class="white" style="height: 26">Filter</div>
{{for data.ports}}
<div style="height: 26">
{{:helper.link(value.f_type ? value.f_type : 'None', null, {'command' : 'switch_filter', 'mode' : value.f_type, 'dir' : value.dir}, value.filter ? null : 'disabled', value.f_type ? 'selected' : null)}}
</div>
{{/for}}
</div>
</div>
<div class="itemContent" style="padding: 5px">
Target Output Pressure: {{:~round(pressure)}} kPa
</div>
<div class="itemContent" style="padding: 5px">
{{:~link('Set Target Pressure', null, {'command' : 'set_pressure'})}}
</div>
<div class="itemContent" style="padding: 5px">
Set Flow Rate Limit: {{:(data.set_flow_rate/10)}} L/s
</div>
<div class="itemContent" style="padding: 5px">
{{:helper.link('Set Flow Rate Limit', null, {'command' : 'set_flow_rate'})}}
</div>
{{else}}
{{else}}
<div style="width: 315px; text-align: center">
<div style="float: left">
<div class="white" style="height: 26">Port</div>
{{for ports}}
<div class="average" style="height: 26">{{:dir}} Port</div>
{{/for}}
</div>
<div style="float: left; margin-left: 10">
<div class="white" style="height: 26">Mode</div>
{{for ports}}
<div style="height: 26">
{{if input}}
Input
{{else output}}
Output
{{else f_type}}
{{:f_type}}
{{else}}
Disabled
{{/if}}
</div>
{{/for}}
</div>
</div>
<div style="width: 315px; text-align: center">
<div style="float: left">
<div class="white" style="height: 26">Port</div>
{{for data.ports}}
<div class="average" style="height: 26">{{:value.dir}} Port</div>
{{/for}}
</div>
<div style="float: left; margin-left: 10">
<div class="white" style="height: 26">Mode</div>
{{for data.ports}}
<div style="height: 26">
{{if value.input}}
Input
{{else value.output}}
Output
{{else value.f_type}}
{{:value.f_type}}
{{else}}
Disabled
{{/if}}
</div>
{{/for}}
</div>
</div>
<div class="itemContent" style="padding: 5px">
Target Output Pressure: {{:~round(pressure)}} kPa
</div>
{{/if}}
<div class="itemContent" style="padding: 5px">
Set Flow Rate Limit: {{:(data.set_flow_rate/10)}} L/s
</div>
<div class="itemContent" style="padding: 5px">
Flow Rate: {{:(data.last_flow_rate/10)}} L/s
</div>
{{/if}}
</div>
+4 -4
View File
@@ -1,6 +1,6 @@
<div class="item">
<div class="itemContent" style="padding: 5px">
{{:helper.link(data.power ? 'On' : 'Off', null, {'command' : 'power'}, null, data.power ? 'selected' : 'redBackground')}}
{{:helper.link(data.power ? 'On' : 'Off', null, {'command' : 'power'}, data.config ? 'disabled' : null)}}
</div>
<div class="itemContent" style="padding: 5px">
{{:helper.link('Configure', null, {'command' : 'configure'}, null, data.config ? 'selected' : null)}}
@@ -50,10 +50,10 @@
</div>
<div class="itemContent" style="padding: 5px">
Target Output Pressure: {{:helper.round(data.pressure)}} kPa
Set Flow Rate Limit: {{:(data.set_flow_rate/10)}} L/s
</div>
<div class="itemContent" style="padding: 5px">
{{:helper.link('Set Target Pressure', null, {'command' : 'set_pressure'})}}
{{:helper.link('Set Flow Rate Limit', null, {'command' : 'set_flow_rate'})}}
</div>
{{else}}
@@ -94,7 +94,7 @@
</div>
<div class="itemContent" style="padding: 5px">
Target Output Pressure: {{:helper.round(data.pressure)}} kPa
Flow Rate: {{:(data.last_flow_rate/10)}} L/s
</div>
{{/if}}
+41
View File
@@ -0,0 +1,41 @@
<div class="item">
<div class="itemLabelWide">
Behaviour controls are {{:data.locked ? "locked" : "unlocked"}}.
</div>
</div>
<br>
{{if data.access}}
<div class="item">
<div class="itemLabelWide">
Turret Status:
</div>
<div class="itemContentThin">
{{:helper.link('Enabled', null, {'command' : 'enable', 'value' : 1}, null, data.enabled ?'redButton' : null)}}
{{:helper.link('Disabled',null, {'command' : 'enable', 'value' : 0}, null,!data.enabled ? 'selected' : null)}}
</div>
</div>
{{if data.is_lethal}}
<div class="item">
<div class="itemLabelWide">
Lethal Mode:
</div>
<div class="itemContentThin">
{{:helper.link('On', null, {'command' : 'lethal', 'value' : 1}, null, data.lethal ?'redButton' : null)}}
{{:helper.link('Off',null, {'command' : 'lethal', 'value' : 0}, null,!data.lethal ? 'selected' : null)}}
</div>
</div>
{{/if}}
{{for data.settings}}
<div class="item">
<div class="itemLabelWide">
{{:value.category}}
</div>
<div class="itemContentThin">
{{:helper.link('On', null, {'command' : value.setting, 'value' : 1}, null, value.value ? 'selected' : null)}}
{{:helper.link('Off',null, {'command' : value.setting, 'value' : 0}, null,!value.value ? 'selected' : null)}}
</div>
</div>
{{/for}}
{{/if}}
+4 -1
View File
@@ -264,6 +264,7 @@
#include "code\defines\procs\dbcore.dm"
#include "code\defines\procs\hud.dm"
#include "code\defines\procs\radio.dm"
#include "code\defines\procs\records.dm"
#include "code\defines\procs\sd_Alert.dm"
#include "code\defines\procs\statistics.dm"
#include "code\game\asteroid.dm"
@@ -452,6 +453,7 @@
#include "code\game\machinery\OpTable.dm"
#include "code\game\machinery\overview.dm"
#include "code\game\machinery\PDApainter.dm"
#include "code\game\machinery\portable_tag_turret.dm"
#include "code\game\machinery\portable_turret.dm"
#include "code\game\machinery\programmable_unloader.dm"
#include "code\game\machinery\recharger.dm"
@@ -472,6 +474,7 @@
#include "code\game\machinery\teleporter.dm"
#include "code\game\machinery\transformer.dm"
#include "code\game\machinery\turntable.dm"
#include "code\game\machinery\turret_control.dm"
#include "code\game\machinery\turrets.dm"
#include "code\game\machinery\vending.dm"
#include "code\game\machinery\washing_machine.dm"
@@ -1415,9 +1418,9 @@
#include "code\modules\nano\JSON Reader.dm"
#include "code\modules\nano\JSON Writer.dm"
#include "code\modules\nano\nanoexternal.dm"
#include "code\modules\nano\nanointeraction.dm"
#include "code\modules\nano\nanomanager.dm"
#include "code\modules\nano\nanomapgen.dm"
#include "code\modules\nano\nanoprocs.dm"
#include "code\modules\nano\nanoui.dm"
#include "code\modules\nano\modules\crew_monitor.dm"
#include "code\modules\organs\blood.dm"