mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
Conflict fix. Again.
This commit is contained in:
@@ -119,6 +119,7 @@ var/global/admin_emergency_team = 0 // Used for admin-spawned response teams
|
||||
break
|
||||
|
||||
spawn(0)
|
||||
|
||||
switch(alert(new_member, "You are an Emergency Response Team member! Are you a boy or a girl?",,"Male","Female"))
|
||||
if("Male")
|
||||
new_member.gender = MALE
|
||||
@@ -130,9 +131,12 @@ var/global/admin_emergency_team = 0 // Used for admin-spawned response teams
|
||||
if(!new_name)
|
||||
new_member.real_name = "Agent [pick("Red","Yellow","Orange","Silver","Gold", "Pink", "Purple", "Rainbow")]" // Choose a "random" agent name
|
||||
new_member.name = usr.real_name
|
||||
new_member.mind.name = usr.real_name
|
||||
|
||||
else
|
||||
new_member.real_name = new_name
|
||||
new_member.name = new_name
|
||||
new_member.mind.name = new_name
|
||||
|
||||
// -- CHANGE APPEARANCE --
|
||||
var/new_tone = input(new_member, "Please select your new skin tone: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as num
|
||||
@@ -179,9 +183,10 @@ var/global/admin_emergency_team = 0 // Used for admin-spawned response teams
|
||||
new_member.update_hair(1)
|
||||
|
||||
new_member.mind_initialize()
|
||||
|
||||
new_member.mind.assigned_role = "Emergency Response Team"
|
||||
new_member.mind.special_role = "Emergency Response Team"
|
||||
ticker.mode.traitors += new_member.mind // ERTs will show up at the end of the round on the "traitor" list
|
||||
ticker.mode.traitors |= new_member.mind // ERTs will show up at the end of the round on the "traitor" list
|
||||
|
||||
// Join message
|
||||
new_member << "\blue You are the <b>Emergency Response Team[!leader_selected?"!</b>":" Leader!</b>"] \nAs a response team [!leader_selected?"member":"<b>leader</b>"] you answer directly to [!leader_selected?"your team leader.":"Central Command."] \nYou have been deployed by NanoTrasen Central Command in Tau Ceti to resolve a Code Red alert aboard [station_name()], and have been provided with the following instructions and information regarding your mission: \red [situation]"
|
||||
@@ -245,5 +250,7 @@ var/global/admin_emergency_team = 0 // Used for admin-spawned response teams
|
||||
E.registered_name = real_name
|
||||
equip_to_slot_or_del(E, slot_wear_id)
|
||||
|
||||
update_icons()
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -367,6 +367,7 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
if(zone_A && zone_B)
|
||||
DisconnectZones(zone_A, zone_B)
|
||||
ConnectZones(A.zone, B.zone, indirect)
|
||||
zone_A = A.zone
|
||||
|
||||
//The "B" zone changed.
|
||||
else if(B.zone && B.zone != zone_B)
|
||||
@@ -394,6 +395,7 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
if(zone_A && zone_B)
|
||||
DisconnectZones(zone_A, zone_B)
|
||||
ConnectZones(A.zone, B.zone, indirect)
|
||||
zone_B = B.zone
|
||||
|
||||
|
||||
#undef CONNECTION_DIRECT
|
||||
|
||||
+18
-10
@@ -8,7 +8,8 @@ client/proc/Zone_Info(turf/T as null|turf)
|
||||
mob << "No zone here."
|
||||
else
|
||||
if(zone_debug_images)
|
||||
images -= zone_debug_images
|
||||
for(var/zone in zone_debug_images)
|
||||
images -= zone_debug_images[zone]
|
||||
zone_debug_images = null
|
||||
|
||||
client/var/list/zone_debug_images
|
||||
@@ -23,12 +24,12 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
|
||||
"South" = SOUTH,\
|
||||
"East" = EAST,\
|
||||
"West" = WEST,\
|
||||
"None" = null)
|
||||
"N/A" = null)
|
||||
var/direction = input("What direction do you wish to test?","Set direction") as null|anything in direction_list
|
||||
if(!direction)
|
||||
return
|
||||
|
||||
if(direction == "None")
|
||||
if(direction == "N/A")
|
||||
if(T.CanPass(null, T, 0,0))
|
||||
mob << "The turf can pass air! :D"
|
||||
else
|
||||
@@ -64,11 +65,14 @@ zone/proc/DebugDisplay(client/client)
|
||||
|
||||
if(!client.zone_debug_images)
|
||||
client.zone_debug_images = list()
|
||||
|
||||
var/list/current_zone_images = list()
|
||||
|
||||
for(var/turf/T in contents)
|
||||
client.zone_debug_images += image('debug_group.dmi', T)
|
||||
current_zone_images += image('debug_group.dmi', T, null, TURF_LAYER)
|
||||
|
||||
for(var/turf/space/S in unsimulated_tiles)
|
||||
client.zone_debug_images += image('debug_space.dmi', S)
|
||||
current_zone_images += image('debug_space.dmi', S, null, TURF_LAYER)
|
||||
|
||||
client << "<u>Zone Air Contents</u>"
|
||||
client << "Oxygen: [air.oxygen]"
|
||||
@@ -85,8 +89,8 @@ zone/proc/DebugDisplay(client/client)
|
||||
|
||||
for(var/connection/C in connections)
|
||||
client << "\ref[C] [C.A] --> [C.B] [(C.indirect?"Open":"Closed")]"
|
||||
client.zone_debug_images += image('debug_connect.dmi', C.A)
|
||||
client.zone_debug_images += image('debug_connect.dmi', C.B)
|
||||
current_zone_images += image('debug_connect.dmi', C.A, null, TURF_LAYER)
|
||||
current_zone_images += image('debug_connect.dmi', C.B, null, TURF_LAYER)
|
||||
|
||||
client << "Connected Zones:"
|
||||
for(var/zone/zone in connected_zones)
|
||||
@@ -99,13 +103,17 @@ zone/proc/DebugDisplay(client/client)
|
||||
if(!istype(C,/connection))
|
||||
client << "[C] (Not Connection!)"
|
||||
|
||||
client.images += client.zone_debug_images
|
||||
if(!client.zone_debug_images)
|
||||
client.zone_debug_images = list()
|
||||
client.zone_debug_images[src] = current_zone_images
|
||||
|
||||
client.images += client.zone_debug_images[src]
|
||||
|
||||
else
|
||||
dbg_output = 0
|
||||
|
||||
client.images -= client.zone_debug_images
|
||||
client.zone_debug_images = null
|
||||
client.images -= client.zone_debug_images[src]
|
||||
client.zone_debug_images.Remove(src)
|
||||
|
||||
for(var/zone/Z in zones)
|
||||
if(Z.air == air && Z != src)
|
||||
|
||||
+13
-7
@@ -85,7 +85,7 @@ atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
return 1
|
||||
|
||||
|
||||
var/global/datum/controller/air_system/air_master
|
||||
var/datum/controller/air_system/air_master
|
||||
|
||||
/datum/controller/air_system/
|
||||
//Geoemetry lists
|
||||
@@ -180,17 +180,20 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
|
||||
if(. && T && !T.update_air_properties())
|
||||
. = 0 //If a runtime occured, make sure we can sense it.
|
||||
//message_admins("ZASALERT: Unable run turf/simualted/update_air_properties()")
|
||||
tiles_to_update = list()
|
||||
if(.)
|
||||
tiles_to_update = list()
|
||||
|
||||
//Check sanity on connection objects.
|
||||
tick_progress = "connections_to_check"
|
||||
if(.)
|
||||
tick_progress = "connections_to_check"
|
||||
if(connections_to_check.len)
|
||||
for(var/connection/C in connections_to_check)
|
||||
C.CheckPassSanity()
|
||||
connections_to_check = list()
|
||||
|
||||
//Ensure tiles still have zones.
|
||||
tick_progress = "tiles_to_reconsider_zones"
|
||||
if(.)
|
||||
tick_progress = "tiles_to_reconsider_zones"
|
||||
if(tiles_to_reconsider_zones.len)
|
||||
for(var/turf/simulated/T in tiles_to_reconsider_zones)
|
||||
if(!T.zone)
|
||||
@@ -198,7 +201,8 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
|
||||
tiles_to_reconsider_zones = list()
|
||||
|
||||
//Process zones.
|
||||
tick_progress = "zone/process()"
|
||||
if(.)
|
||||
tick_progress = "zone/process()"
|
||||
for(var/zone/Z in zones)
|
||||
if(Z.last_update < current_cycle)
|
||||
var/output = Z.process()
|
||||
@@ -207,9 +211,11 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
|
||||
if(. && Z && !output)
|
||||
. = 0
|
||||
//Process fires.
|
||||
tick_progress = "active_hotspots (fire)"
|
||||
if(.)
|
||||
tick_progress = "active_hotspots (fire)"
|
||||
for(var/obj/fire/F in active_hotspots)
|
||||
if(. && F && !F.process())
|
||||
. = 0
|
||||
|
||||
tick_progress = "success"
|
||||
if(.)
|
||||
tick_progress = "success"
|
||||
@@ -62,6 +62,13 @@ var/global/vs_control/vsc = new
|
||||
var/airflow_mob_slowdown_NAME = "Airflow Slowdown"
|
||||
var/airflow_mob_slowdown_DESC = "Time in tenths of a second to add as a delay to each movement by a mob if they are fighting the pull of the airflow."
|
||||
|
||||
var/connection_insulation = 0.4
|
||||
var/connection_insulation_NAME = "Connections - Insulation"
|
||||
var/connection_insulation_DESC = "How insulative a connection is, in terms of heat transfer. 1 is perfectly insulative, and 0 is perfectly conductive."
|
||||
|
||||
var/connection_temperature_delta = 10
|
||||
var/connection_temperature_delta_NAME = "Connections - Temperature Difference"
|
||||
var/connection_temperature_delta_DESC = "The smallest temperature difference which will cause heat to travel through doors."
|
||||
|
||||
|
||||
/vs_control/var/list/settings = list()
|
||||
|
||||
+27
-22
@@ -36,14 +36,13 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
//Generate the gas_mixture for use in txhis zone by using the average of the gases
|
||||
//defined at startup.
|
||||
air = new
|
||||
var/members = contents.len
|
||||
for(var/turf/simulated/T in contents)
|
||||
air.oxygen += T.oxygen / members
|
||||
air.nitrogen += T.nitrogen / members
|
||||
air.carbon_dioxide += T.carbon_dioxide / members
|
||||
air.toxins += T.toxins / members
|
||||
air.temperature += T.temperature / members
|
||||
air.group_multiplier = contents.len
|
||||
for(var/turf/simulated/T in contents)
|
||||
air.oxygen += T.oxygen / air.group_multiplier
|
||||
air.nitrogen += T.nitrogen / air.group_multiplier
|
||||
air.carbon_dioxide += T.carbon_dioxide / air.group_multiplier
|
||||
air.toxins += T.toxins / air.group_multiplier
|
||||
air.temperature += T.temperature / air.group_multiplier
|
||||
air.update_values()
|
||||
|
||||
//Add this zone to the global list.
|
||||
@@ -80,8 +79,11 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
for(var/zone/Z in connected_zones)
|
||||
if(src in Z.connected_zones)
|
||||
Z.connected_zones.Remove(src)
|
||||
connected_zones = null
|
||||
|
||||
for(var/connection/C in connections)
|
||||
air_master.connections_to_check += C
|
||||
connections = null
|
||||
|
||||
return 1
|
||||
|
||||
@@ -146,7 +148,7 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
if(!contents.len) //If we got soft deleted.
|
||||
return
|
||||
|
||||
progress = "problem with: air.adjust()"
|
||||
progress = "problem with: air regeneration"
|
||||
|
||||
//Sometimes explosions will cause the air to be deleted for some reason.
|
||||
if(!air)
|
||||
@@ -157,27 +159,23 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
air.total_moles()
|
||||
world.log << "Air object lost in zone. Regenerating."
|
||||
|
||||
progress = "problem with: ShareSpace()"
|
||||
|
||||
progress = "problem with: ShareSpace()"
|
||||
|
||||
if(unsimulated_tiles)
|
||||
if(locate(/turf/simulated) in unsimulated_tiles)
|
||||
for(var/turf/simulated/T in unsimulated_tiles)
|
||||
RemoveTurf(T)
|
||||
if(unsimulated_tiles)
|
||||
unsimulated_tiles -= T
|
||||
|
||||
if(unsimulated_tiles.len)
|
||||
var/moved_air = ShareSpace(air,unsimulated_tiles)
|
||||
|
||||
if(moved_air > vsc.airflow_lightest_pressure)
|
||||
AirflowSpace(src)
|
||||
|
||||
progress = "problem with: air.react()"
|
||||
|
||||
//React the air here.
|
||||
//Handled by fire, no need for this.
|
||||
// air.react(null,0)
|
||||
else
|
||||
unsimulated_tiles = null
|
||||
|
||||
//Check the graphic.
|
||||
|
||||
progress = "problem with: modifying turf graphics"
|
||||
|
||||
air.graphic = 0
|
||||
@@ -232,12 +230,13 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
//Check if the connection is valid first.
|
||||
if(!C.Cleanup())
|
||||
continue
|
||||
|
||||
//Do merging if conditions are met. Specifically, if there's a non-door connection
|
||||
//to somewhere with space, the zones are merged regardless of equilibrium, to speed
|
||||
//up spacing in areas with double-plated windows.
|
||||
if(C && C.A.zone && C.B.zone)
|
||||
//indirect = 2 is a direct connection.
|
||||
if(C.indirect == 2 )
|
||||
if( C.indirect == 2 )
|
||||
if(C.A.zone.air.compare(C.B.zone.air) || unsimulated_tiles)
|
||||
ZMerge(C.A.zone,C.B.zone)
|
||||
|
||||
@@ -245,6 +244,10 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
|
||||
//Share some
|
||||
for(var/zone/Z in connected_zones)
|
||||
//If that zone has already processed, skip it.
|
||||
if(Z.last_update > last_update)
|
||||
continue
|
||||
|
||||
if(air && Z.air)
|
||||
//Ensure we're not doing pointless calculations on equilibrium zones.
|
||||
var/moles_delta = abs(air.total_moles() - Z.air.total_moles())
|
||||
@@ -261,7 +264,7 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
|
||||
for(var/zone/Z in closed_connection_zones)
|
||||
if(air && Z.air)
|
||||
if( abs(air.temperature - Z.air.temperature) > 10 )
|
||||
if( abs(air.temperature - Z.air.temperature) > vsc.connection_temperature_delta )
|
||||
ShareHeat(air, Z.air, closed_connection_zones[Z])
|
||||
|
||||
progress = "all components completed successfully, the problem is not here"
|
||||
@@ -270,7 +273,7 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
||||
//Air Movement//
|
||||
////////////////
|
||||
|
||||
var/list/sharing_lookup_table = list(0.15, 0.20, 0.24, 0.27, 0.30, 0.33)
|
||||
var/list/sharing_lookup_table = list(0.30, 0.40, 0.48, 0.54, 0.60, 0.66)
|
||||
|
||||
proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
|
||||
//Shares a specific ratio of gas between mixtures using simple weighted averages.
|
||||
@@ -400,7 +403,9 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles, dbg_output)
|
||||
|
||||
if(sharing_lookup_table.len >= unsimulated_tiles.len) //6 or more interconnecting tiles will max at 42% of air moved per tick.
|
||||
ratio = sharing_lookup_table[unsimulated_tiles.len]
|
||||
ratio *= 2
|
||||
|
||||
//We need to adjust it to account for the insulation settings.
|
||||
ratio *= 1 - vsc.connection_insulation
|
||||
|
||||
A.oxygen = max(0, (A.oxygen - oxy_avg) * (1 - ratio) + oxy_avg )
|
||||
A.nitrogen = max(0, (A.nitrogen - nit_avg) * (1 - ratio) + nit_avg )
|
||||
|
||||
@@ -132,12 +132,12 @@ datum/controller/game_controller/proc/process()
|
||||
//src.set_debug_state("Air Master")
|
||||
|
||||
air_master.current_cycle++
|
||||
var/success = air_master.tick() //Changed so that a runtime does not crash the ticker.
|
||||
if(!success) //Runtimed.
|
||||
if(!air_master.tick()) //Runtimed.
|
||||
air_master.failed_ticks++
|
||||
if(air_master.failed_ticks > 5)
|
||||
world << "<font color='red'><b>RUNTIMES IN ATMOS TICKER. Killing air simulation!</font></b>"
|
||||
message_admins("ZASALERT: unable run [air_master.tick_progress], tell someone about this!")
|
||||
world.log << "### ZAS SHUTDOWN"
|
||||
message_admins("ZASALERT: unable to run [air_master.tick_progress], shutting down!")
|
||||
log_admin("ZASALERT: unable run zone/process() -- [air_master.tick_progress]")
|
||||
air_processing_killed = 1
|
||||
air_master.failed_ticks = 0
|
||||
|
||||
@@ -58,6 +58,10 @@
|
||||
G.fields["sex"] = H.gender
|
||||
G.fields["species"] = H.get_species()
|
||||
G.fields["photo"] = get_id_photo(H)
|
||||
if(H.gen_record && !jobban_isbanned(H, "Records"))
|
||||
G.fields["notes"] = H.gen_record
|
||||
else
|
||||
G.fields["notes"] = "No notes found."
|
||||
general += G
|
||||
|
||||
//Medical Record
|
||||
|
||||
@@ -309,6 +309,11 @@ proc/process_ghost_teleport_locs()
|
||||
/area/shuttle/research/outpost
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/shuttle/vox/station
|
||||
name = "\improper Vox Skipjack"
|
||||
icon_state = "yellow"
|
||||
requires_power = 0
|
||||
|
||||
/area/airtunnel1/ // referenced in airtunnel.dm:759
|
||||
|
||||
/area/dummy/ // Referenced in engine.dm:261
|
||||
@@ -489,10 +494,29 @@ proc/process_ghost_teleport_locs()
|
||||
icon_state = "yellow"
|
||||
requires_power = 0
|
||||
|
||||
/area/vox_station/transit
|
||||
name = "\improper hyperspace"
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/vox_station/southwest_solars
|
||||
name = "\improper aft port solars"
|
||||
icon_state = "southwest"
|
||||
|
||||
/area/vox_station/northwest_solars
|
||||
name = "\improper fore port solars"
|
||||
icon_state = "northwest"
|
||||
|
||||
/area/vox_station/northeast_solars
|
||||
name = "\improper fore starboard solars"
|
||||
icon_state = "northeast"
|
||||
|
||||
/area/vox_station/southeast_solars
|
||||
name = "\improper aft starboard solars"
|
||||
icon_state = "southeast"
|
||||
|
||||
/area/vox_station/mining
|
||||
name = "\improper nearby mining asteroid"
|
||||
icon_state = "north"
|
||||
|
||||
//PRISON
|
||||
/area/prison
|
||||
|
||||
+10
-11
@@ -490,7 +490,7 @@ its easier to just keep the beam vertical.
|
||||
|
||||
var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblClickNew() proc is being tested)
|
||||
|
||||
/atom/proc/DblClickNew()
|
||||
/*/atom/proc/DblClickNew()
|
||||
if(!usr) return
|
||||
// TODO DOOHL: Intergrate params to new proc. Saved for another time because var/valid_place is a fucking brainfuck
|
||||
|
||||
@@ -792,7 +792,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
|
||||
if (in_range)
|
||||
if ( !animal.restrained() )
|
||||
attack_animal(animal)
|
||||
attack_animal(animal)*/
|
||||
|
||||
/atom/DblClick(location, control, params) //TODO: DEFERRED: REWRITE
|
||||
if(!usr) return
|
||||
@@ -943,9 +943,9 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
|
||||
// ------- ( CAN USE ITEM OR HAS 1 SECOND USE DELAY ) AND NOT CLICKING ON SCREEN -------
|
||||
|
||||
if (usr.next_move < world.time)
|
||||
usr.prev_move = usr.next_move
|
||||
usr.next_move = world.time + 10
|
||||
if (usr.last_click + usr.click_delay < world.time)
|
||||
usr.last_click = world.time
|
||||
usr.click_delay = 0
|
||||
else
|
||||
// ------- ALREADY USED ONE ITEM WITH USE DELAY IN THE PREVIOUS SECOND -------
|
||||
return
|
||||
@@ -1109,10 +1109,9 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
// ------- ITEM INACESSIBLE OR CLICKING ON SCREEN -------
|
||||
if (istype(src, /obj/screen))
|
||||
// ------- IT'S THE HUD YOU'RE CLICKING ON -------
|
||||
usr.prev_move = usr.next_move
|
||||
usr:lastDblClick = world.time + 2
|
||||
if (usr.next_move < world.time)
|
||||
usr.next_move = world.time + 2
|
||||
usr.delay_click(2)
|
||||
if (usr.last_click + usr.click_delay < world.time)
|
||||
usr.last_click = world.time
|
||||
else
|
||||
return
|
||||
|
||||
@@ -1144,7 +1143,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
src.hand_al(usr, usr.hand)
|
||||
else
|
||||
// ------- YOU ARE CLICKING ON AN OBJECT THAT'S INACCESSIBLE TO YOU AND IS NOT YOUR HUD -------
|
||||
if((LASER in usr:mutations) && usr:a_intent == "hurt" && world.time >= usr.next_move)
|
||||
if((LASER in usr:mutations) && usr:a_intent == "hurt" && usr.last_click + usr.click_delay < world.time)
|
||||
// ------- YOU HAVE THE LASER MUTATION, YOUR INTENT SET TO HURT AND IT'S BEEN MORE THAN A DECISECOND SINCE YOU LAS TATTACKED -------
|
||||
|
||||
var/turf/T = get_turf(usr)
|
||||
@@ -1169,7 +1168,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
spawn( 1 )
|
||||
A.process()
|
||||
|
||||
usr.next_move = world.time + 6
|
||||
usr.delay_click(6)
|
||||
return
|
||||
|
||||
/atom/proc/ShiftClick(var/mob/M as mob)
|
||||
|
||||
@@ -15,6 +15,8 @@ var/bomb_set
|
||||
var/yes_code = 0.0
|
||||
var/safety = 1.0
|
||||
var/obj/item/weapon/disk/nuclear/auth = null
|
||||
var/removal_stage = 0 // 0 is no removal, 1 is covers removed, 2 is covers open,
|
||||
// 3 is sealant open, 4 is unwrenched, 5 is removed from bolts.
|
||||
flags = FPRINT
|
||||
use_power = 0
|
||||
|
||||
@@ -33,14 +35,83 @@ var/bomb_set
|
||||
src.attack_hand(M)
|
||||
return
|
||||
|
||||
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/I as obj, mob/user as mob)
|
||||
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob)
|
||||
if (src.extended)
|
||||
if (istype(I, /obj/item/weapon/disk/nuclear))
|
||||
if (istype(O, /obj/item/weapon/disk/nuclear))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
src.auth = I
|
||||
O.loc = src
|
||||
src.auth = O
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
if (src.anchored)
|
||||
switch(removal_stage)
|
||||
if(0)
|
||||
if(istype(O,/obj/item/weapon/weldingtool))
|
||||
|
||||
var/obj/item/weapon/weldingtool/WT = O
|
||||
if(!WT.isOn()) return
|
||||
if (WT.get_fuel() < 5) // uses up 5 fuel.
|
||||
user << "\red You need more fuel to complete this task."
|
||||
return
|
||||
|
||||
user.visible_message("[user] starts cutting loose the anchoring bolt covers on [src].", "You start cutting loose the anchoring bolt covers with [O]...")
|
||||
|
||||
if(do_after(user,40))
|
||||
if(!src || !user || !WT.remove_fuel(5, user)) return
|
||||
user.visible_message("[user] cuts through the bolt covers on [src].", "You cut through the bolt cover.")
|
||||
removal_stage = 1
|
||||
return
|
||||
|
||||
if(1)
|
||||
if(istype(O,/obj/item/weapon/crowbar))
|
||||
user.visible_message("[user] starts forcing open the bolt covers on [src].", "You start forcing open the anchoring bolt covers with [O]...")
|
||||
|
||||
if(do_after(user,15))
|
||||
if(!src || !user) return
|
||||
user.visible_message("[user] forces open the bolt covers on [src].", "You force open the bolt covers.")
|
||||
removal_stage = 2
|
||||
return
|
||||
|
||||
if(2)
|
||||
if(istype(O,/obj/item/weapon/weldingtool))
|
||||
|
||||
var/obj/item/weapon/weldingtool/WT = O
|
||||
if(!WT.isOn()) return
|
||||
if (WT.get_fuel() < 5) // uses up 5 fuel.
|
||||
user << "\red You need more fuel to complete this task."
|
||||
return
|
||||
|
||||
user.visible_message("[user] starts cutting apart the anchoring system sealant on [src].", "You start cutting apart the anchoring system's sealant with [O]...")
|
||||
|
||||
if(do_after(user,40))
|
||||
if(!src || !user || !WT.remove_fuel(5, user)) return
|
||||
user.visible_message("[user] cuts apart the anchoring system sealant on [src].", "You cut apart the anchoring system's sealant.")
|
||||
removal_stage = 3
|
||||
return
|
||||
|
||||
if(3)
|
||||
if(istype(O,/obj/item/weapon/wrench))
|
||||
|
||||
user.visible_message("[user] begins unwrenching the anchoring bolts on [src].", "You begin unwrenching the anchoring bolts...")
|
||||
|
||||
if(do_after(user,50))
|
||||
if(!src || !user) return
|
||||
user.visible_message("[user] unwrenches the anchoring bolts on [src].", "You unwrench the anchoring bolts.")
|
||||
removal_stage = 4
|
||||
return
|
||||
|
||||
if(4)
|
||||
if(istype(O,/obj/item/weapon/crowbar))
|
||||
|
||||
user.visible_message("[user] begins lifting [src] off of the anchors.", "You begin lifting the device off the anchors...")
|
||||
|
||||
if(do_after(user,80))
|
||||
if(!src || !user) return
|
||||
user.visible_message("[user] crowbars [src] off of the anchors. It can now be moved.", "You jam the crowbar under the nuclear device and lift it off its anchors. You can now move it!")
|
||||
anchored = 0
|
||||
removal_stage = 5
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/nuclearbomb/attack_paw(mob/user as mob)
|
||||
@@ -69,7 +140,11 @@ var/bomb_set
|
||||
user << browse(dat, "window=nuclearbomb;size=300x400")
|
||||
onclose(user, "nuclearbomb")
|
||||
else if (src.deployable)
|
||||
src.anchored = 1
|
||||
if(removal_stage < 5)
|
||||
src.anchored = 1
|
||||
visible_message("\red With a steely snap, bolts slide out of [src] and anchor it to the flooring!")
|
||||
else
|
||||
visible_message("\red \The [src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.")
|
||||
flick("nuclearbombc", src)
|
||||
src.icon_state = "nuclearbomb1"
|
||||
src.extended = 1
|
||||
@@ -81,8 +156,10 @@ var/bomb_set
|
||||
set src in oview(1)
|
||||
|
||||
if (src.deployable)
|
||||
usr << "\red You close several panels to make [src] undeployable."
|
||||
src.deployable = 0
|
||||
else
|
||||
usr << "\red You adjust some panels to make [src] deployable."
|
||||
src.deployable = 1
|
||||
|
||||
/obj/machinery/nuclearbomb/Topic(href, href_list)
|
||||
@@ -148,7 +225,18 @@ var/bomb_set
|
||||
src.timing = 0
|
||||
bomb_set = 0
|
||||
if (href_list["anchor"])
|
||||
|
||||
if(removal_stage == 5)
|
||||
src.anchored = 0
|
||||
visible_message("\red \The [src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.")
|
||||
return
|
||||
|
||||
src.anchored = !( src.anchored )
|
||||
if(src.anchored)
|
||||
visible_message("\red With a steely snap, bolts slide out of [src] and anchor it to the flooring.")
|
||||
else
|
||||
visible_message("\red The anchoring bolts slide back into the depths of [src].")
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
|
||||
@@ -233,7 +233,8 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
||||
if(target && path.len == 0)
|
||||
spawn(0)
|
||||
if(!src || !target) return
|
||||
src.path = AStar(src.loc, src.target.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, 0, 30)
|
||||
src.path = AStar(src.loc, src.target.loc, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 30, id=botcard)
|
||||
if (!path) path = list()
|
||||
if(src.path.len == 0)
|
||||
src.oldtarget = src.target
|
||||
src.target = null
|
||||
|
||||
@@ -615,6 +615,7 @@ Auto Patrol: []"},
|
||||
// given an optional turf to avoid
|
||||
/obj/machinery/bot/ed209/proc/calc_path(var/turf/avoid = null)
|
||||
src.path = AStar(src.loc, patrol_target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 120, id=botcard, exclude=avoid)
|
||||
if (!src.path) src.path = list()
|
||||
|
||||
|
||||
// look for a criminal in view of the bot
|
||||
|
||||
@@ -241,9 +241,10 @@
|
||||
if(src.target && (src.target != null) && src.path.len == 0)
|
||||
spawn(0)
|
||||
if(!istype(src.target, /turf/))
|
||||
src.path = AStar(src.loc, src.target.loc, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30)
|
||||
src.path = AStar(src.loc, src.target.loc, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30, id=botcard)
|
||||
else
|
||||
src.path = AStar(src.loc, src.target, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30)
|
||||
src.path = AStar(src.loc, src.target, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30, id=botcard)
|
||||
if (!src.path) src.path = list()
|
||||
if(src.path.len == 0)
|
||||
src.oldtarget = src.target
|
||||
src.target = null
|
||||
|
||||
@@ -80,6 +80,9 @@
|
||||
/obj/item/weapon/circuitboard/secure_data
|
||||
name = "Circuit board (Security Records)"
|
||||
build_path = "/obj/machinery/computer/secure_data"
|
||||
/obj/item/weapon/circuitboard/skills
|
||||
name = "Circuit board (Employment Records)"
|
||||
build_path = "/obj/machinery/computer/skills"
|
||||
/obj/item/weapon/circuitboard/stationalert
|
||||
name = "Circuit board (Station Alerts)"
|
||||
build_path = "/obj/machinery/computer/station_alert"
|
||||
|
||||
@@ -0,0 +1,419 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
/obj/machinery/computer/skills//TODO:SANITY
|
||||
name = "Employment Records"
|
||||
desc = "Used to view personnel's employment records"
|
||||
icon_state = "medlaptop"
|
||||
req_one_access = list(access_heads)
|
||||
circuit = "/obj/item/weapon/circuitboard/skills"
|
||||
var/obj/item/weapon/card/id/scan = null
|
||||
var/authenticated = null
|
||||
var/rank = null
|
||||
var/screen = null
|
||||
var/datum/data/record/active1 = null
|
||||
var/a_id = null
|
||||
var/temp = null
|
||||
var/printing = null
|
||||
var/can_change_id = 0
|
||||
var/list/Perp
|
||||
var/tempname = null
|
||||
//Sorting Variables
|
||||
var/sortBy = "name"
|
||||
var/order = 1 // -1 = Descending - 1 = Ascending
|
||||
|
||||
|
||||
/obj/machinery/computer/skills/attackby(obj/item/O as obj, user as mob)
|
||||
if(istype(O, /obj/item/weapon/card/id) && !scan)
|
||||
usr.drop_item()
|
||||
O.loc = src
|
||||
scan = O
|
||||
user << "You insert [O]."
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/skills/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/skills/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
//Someone needs to break down the dat += into chunks instead of long ass lines.
|
||||
/obj/machinery/computer/skills/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if (src.z > 6)
|
||||
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
return
|
||||
var/dat
|
||||
|
||||
if (temp)
|
||||
dat = text("<TT>[]</TT><BR><BR><A href='?src=\ref[];choice=Clear Screen'>Clear Screen</A>", temp, src)
|
||||
else
|
||||
dat = text("Confirm Identity: <A href='?src=\ref[];choice=Confirm Identity'>[]</A><HR>", src, (scan ? text("[]", scan.name) : "----------"))
|
||||
if (authenticated)
|
||||
switch(screen)
|
||||
if(1.0)
|
||||
dat += {"
|
||||
<p style='text-align:center;'>"}
|
||||
dat += text("<A href='?src=\ref[];choice=Search Records'>Search Records</A><BR>", src)
|
||||
dat += text("<A href='?src=\ref[];choice=New Record (General)'>New Record</A><BR>", src)
|
||||
dat += {"
|
||||
</p>
|
||||
<table style="text-align:center;" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<th>Records:</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="text-align:center;" border="1" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<th><A href='?src=\ref[src];choice=Sorting;sort=name'>Name</A></th>
|
||||
<th><A href='?src=\ref[src];choice=Sorting;sort=id'>ID</A></th>
|
||||
<th><A href='?src=\ref[src];choice=Sorting;sort=rank'>Rank</A></th>
|
||||
<th><A href='?src=\ref[src];choice=Sorting;sort=fingerprint'>Fingerprints</A></th>
|
||||
</tr>"}
|
||||
if(!isnull(data_core.general))
|
||||
for(var/datum/data/record/R in sortRecord(data_core.general, sortBy, order))
|
||||
for(var/datum/data/record/E in data_core.security)
|
||||
var/background
|
||||
dat += text("<tr style=[]><td><A href='?src=\ref[];choice=Browse Record;d_rec=\ref[]'>[]</a></td>", background, src, R, R.fields["name"])
|
||||
dat += text("<td>[]</td>", R.fields["id"])
|
||||
dat += text("<td>[]</td>", R.fields["rank"])
|
||||
dat += text("<td>[]</td>", R.fields["fingerprint"])
|
||||
dat += "</table><hr width='75%' />"
|
||||
dat += text("<A href='?src=\ref[];choice=Record Maintenance'>Record Maintenance</A><br><br>", src)
|
||||
dat += text("<A href='?src=\ref[];choice=Log Out'>{Log Out}</A>",src)
|
||||
if(2.0)
|
||||
dat += "<B>Records Maintenance</B><HR>"
|
||||
dat += "<BR><A href='?src=\ref[src];choice=Delete All Records'>Delete All Records</A><BR><BR><A href='?src=\ref[src];choice=Return'>Back</A>"
|
||||
if(3.0)
|
||||
dat += "<CENTER><B>Employment Record</B></CENTER><BR>"
|
||||
if ((istype(active1, /datum/data/record) && data_core.general.Find(active1)))
|
||||
var/icon/front = new(active1.fields["photo"], dir = SOUTH)
|
||||
var/icon/side = new(active1.fields["photo"], dir = WEST)
|
||||
user << browse_rsc(front, "front.png")
|
||||
user << browse_rsc(side, "side.png")
|
||||
dat += text("<table><tr><td> \
|
||||
Name: <A href='?src=\ref[src];choice=Edit Field;field=name'>[active1.fields["name"]]</A><BR> \
|
||||
ID: <A href='?src=\ref[src];choice=Edit Field;field=id'>[active1.fields["id"]]</A><BR>\n \
|
||||
Sex: <A href='?src=\ref[src];choice=Edit Field;field=sex'>[active1.fields["sex"]]</A><BR>\n \
|
||||
Age: <A href='?src=\ref[src];choice=Edit Field;field=age'>[active1.fields["age"]]</A><BR>\n \
|
||||
Rank: <A href='?src=\ref[src];choice=Edit Field;field=rank'>[active1.fields["rank"]]</A><BR>\n \
|
||||
Fingerprint: <A href='?src=\ref[src];choice=Edit Field;field=fingerprint'>[active1.fields["fingerprint"]]</A><BR>\n \
|
||||
Physical Status: [active1.fields["p_stat"]]<BR>\n \
|
||||
Mental Status: [active1.fields["m_stat"]]<BR><BR>\n \
|
||||
Employment/skills summary:<BR> [active1.fields["notes"]]<BR></td> \
|
||||
<td align = center valign = top>Photo:<br><img src=front.png height=80 width=80 border=4> \
|
||||
<img src=side.png height=80 width=80 border=4></td></tr></table>")
|
||||
else
|
||||
dat += "<B>General Record Lost!</B><BR>"
|
||||
dat += text("\n<A href='?src=\ref[];choice=Delete Record (ALL)'>Delete Record (ALL)</A><BR><BR>\n<A href='?src=\ref[];choice=Print Record'>Print Record</A><BR>\n<A href='?src=\ref[];choice=Return'>Back</A><BR>", src, src, src)
|
||||
if(4.0)
|
||||
if(!Perp.len)
|
||||
dat += text("ERROR. String could not be located.<br><br><A href='?src=\ref[];choice=Return'>Back</A>", src)
|
||||
else
|
||||
dat += {"
|
||||
<table style="text-align:center;" cellspacing="0" width="100%">
|
||||
<tr> "}
|
||||
dat += text("<th>Search Results for '[]':</th>", tempname)
|
||||
dat += {"
|
||||
</tr>
|
||||
</table>
|
||||
<table style="text-align:center;" border="1" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>ID</th>
|
||||
<th>Rank</th>
|
||||
<th>Fingerprints</th>
|
||||
</tr> "}
|
||||
for(var/i=1, i<=Perp.len, i += 2)
|
||||
var/crimstat = ""
|
||||
var/datum/data/record/R = Perp[i]
|
||||
if(istype(Perp[i+1],/datum/data/record/))
|
||||
var/datum/data/record/E = Perp[i+1]
|
||||
crimstat = E.fields["criminal"]
|
||||
var/background
|
||||
background = "'background-color:#00FF7F;'"
|
||||
dat += text("<tr style=[]><td><A href='?src=\ref[];choice=Browse Record;d_rec=\ref[]'>[]</a></td>", background, src, R, R.fields["name"])
|
||||
dat += text("<td>[]</td>", R.fields["id"])
|
||||
dat += text("<td>[]</td>", R.fields["rank"])
|
||||
dat += text("<td>[]</td>", R.fields["fingerprint"])
|
||||
dat += text("<td>[]</td></tr>", crimstat)
|
||||
dat += "</table><hr width='75%' />"
|
||||
dat += text("<br><A href='?src=\ref[];choice=Return'>Return to index.</A>", src)
|
||||
else
|
||||
else
|
||||
dat += text("<A href='?src=\ref[];choice=Log In'>{Log In}</A>", src)
|
||||
user << browse(text("<HEAD><TITLE>Employment Records</TITLE></HEAD><TT>[]</TT>", dat), "window=secure_rec;size=600x400")
|
||||
onclose(user, "secure_rec")
|
||||
return
|
||||
|
||||
/*Revised /N
|
||||
I can't be bothered to look more of the actual code outside of switch but that probably needs revising too.
|
||||
What a mess.*/
|
||||
/obj/machinery/computer/skills/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if (!( data_core.general.Find(active1) ))
|
||||
active1 = null
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.set_machine(src)
|
||||
switch(href_list["choice"])
|
||||
// SORTING!
|
||||
if("Sorting")
|
||||
// Reverse the order if clicked twice
|
||||
if(sortBy == href_list["sort"])
|
||||
if(order == 1)
|
||||
order = -1
|
||||
else
|
||||
order = 1
|
||||
else
|
||||
// New sorting order!
|
||||
sortBy = href_list["sort"]
|
||||
order = initial(order)
|
||||
//BASIC FUNCTIONS
|
||||
if("Clear Screen")
|
||||
temp = null
|
||||
|
||||
if ("Return")
|
||||
screen = 1
|
||||
active1 = null
|
||||
|
||||
if("Confirm Identity")
|
||||
if (scan)
|
||||
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
|
||||
usr.put_in_hands(scan)
|
||||
else
|
||||
scan.loc = get_turf(src)
|
||||
scan = null
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
scan = I
|
||||
|
||||
if("Log Out")
|
||||
authenticated = null
|
||||
screen = null
|
||||
active1 = null
|
||||
|
||||
if("Log In")
|
||||
if (istype(usr, /mob/living/silicon/ai))
|
||||
src.active1 = null
|
||||
src.authenticated = usr.name
|
||||
src.rank = "AI"
|
||||
src.screen = 1
|
||||
else if (istype(usr, /mob/living/silicon/robot))
|
||||
src.active1 = null
|
||||
src.authenticated = usr.name
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
src.rank = R.braintype
|
||||
src.screen = 1
|
||||
else if (istype(scan, /obj/item/weapon/card/id))
|
||||
active1 = null
|
||||
if(check_access(scan))
|
||||
authenticated = scan.registered_name
|
||||
rank = scan.assignment
|
||||
screen = 1
|
||||
//RECORD FUNCTIONS
|
||||
if("Search Records")
|
||||
var/t1 = input("Search String: (Partial Name or ID or Fingerprints or Rank)", "Secure. records", null, null) as text
|
||||
if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || !in_range(src, usr)))
|
||||
return
|
||||
Perp = new/list()
|
||||
t1 = lowertext(t1)
|
||||
var/list/components = text2list(t1, " ")
|
||||
if(components.len > 5)
|
||||
return //Lets not let them search too greedily.
|
||||
for(var/datum/data/record/R in data_core.general)
|
||||
var/temptext = R.fields["name"] + " " + R.fields["id"] + " " + R.fields["fingerprint"] + " " + R.fields["rank"]
|
||||
for(var/i = 1, i<=components.len, i++)
|
||||
if(findtext(temptext,components[i]))
|
||||
var/prelist = new/list(2)
|
||||
prelist[1] = R
|
||||
Perp += prelist
|
||||
for(var/i = 1, i<=Perp.len, i+=2)
|
||||
for(var/datum/data/record/E in data_core.security)
|
||||
var/datum/data/record/R = Perp[i]
|
||||
if ((E.fields["name"] == R.fields["name"] && E.fields["id"] == R.fields["id"]))
|
||||
Perp[i+1] = E
|
||||
tempname = t1
|
||||
screen = 4
|
||||
|
||||
if("Record Maintenance")
|
||||
screen = 2
|
||||
active1 = null
|
||||
|
||||
if ("Browse Record")
|
||||
var/datum/data/record/R = locate(href_list["d_rec"])
|
||||
if (!( data_core.general.Find(R) ))
|
||||
temp = "Record Not Found!"
|
||||
else
|
||||
for(var/datum/data/record/E in data_core.security)
|
||||
active1 = R
|
||||
screen = 3
|
||||
|
||||
/* if ("Search Fingerprints")
|
||||
var/t1 = input("Search String: (Fingerprint)", "Secure. records", null, null) as text
|
||||
if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || (!in_range(src, usr)) && (!istype(usr, /mob/living/silicon))))
|
||||
return
|
||||
active1 = null
|
||||
t1 = lowertext(t1)
|
||||
for(var/datum/data/record/R in data_core.general)
|
||||
if (lowertext(R.fields["fingerprint"]) == t1)
|
||||
active1 = R
|
||||
if (!( active1 ))
|
||||
temp = text("Could not locate record [].", t1)
|
||||
else
|
||||
for(var/datum/data/record/E in data_core.security)
|
||||
if ((E.fields["name"] == active1.fields["name"] || E.fields["id"] == active1.fields["id"]))
|
||||
screen = 3 */
|
||||
|
||||
if ("Print Record")
|
||||
if (!( printing ))
|
||||
printing = 1
|
||||
sleep(50)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( loc )
|
||||
P.info = "<CENTER><B>Employment Record</B></CENTER><BR>"
|
||||
if ((istype(active1, /datum/data/record) && data_core.general.Find(active1)))
|
||||
P.info += text("Name: [] ID: []<BR>\nSex: []<BR>\nAge: []<BR>\nFingerprint: []<BR>\nPhysical Status: []<BR>\nMental Status: []<BR>\nEmployment/Skills Summary:[]<BR>", active1.fields["name"], active1.fields["id"], active1.fields["sex"], active1.fields["age"], active1.fields["fingerprint"], active1.fields["p_stat"], active1.fields["m_stat"], active1.fields["notes"])
|
||||
else
|
||||
P.info += "<B>General Record Lost!</B><BR>"
|
||||
P.info += "</TT>"
|
||||
P.name = "paper - 'Employment Record'"
|
||||
printing = null
|
||||
//RECORD DELETE
|
||||
if ("Delete All Records")
|
||||
temp = ""
|
||||
temp += "Are you sure you wish to delete all Employment records?<br>"
|
||||
temp += "<a href='?src=\ref[src];choice=Purge All Records'>Yes</a><br>"
|
||||
temp += "<a href='?src=\ref[src];choice=Clear Screen'>No</a>"
|
||||
|
||||
if ("Purge All Records")
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
del(R)
|
||||
temp = "All Employment records deleted."
|
||||
|
||||
if ("Delete Record (ALL)")
|
||||
if (active1)
|
||||
temp = "<h5>Are you sure you wish to delete the record (ALL)?</h5>"
|
||||
temp += "<a href='?src=\ref[src];choice=Delete Record (ALL) Execute'>Yes</a><br>"
|
||||
temp += "<a href='?src=\ref[src];choice=Clear Screen'>No</a>"
|
||||
//RECORD CREATE
|
||||
if ("New Record (General)")
|
||||
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"
|
||||
data_core.general += G
|
||||
active1 = G
|
||||
|
||||
//FIELD FUNCTIONS
|
||||
if ("Edit Field")
|
||||
var/a1 = active1
|
||||
switch(href_list["field"])
|
||||
if("name")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = input("Please input name:", "Secure. records", active1.fields["name"], null) as text
|
||||
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
|
||||
return
|
||||
active1.fields["name"] = t1
|
||||
if("id")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["id"] = t1
|
||||
if("fingerprint")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["fingerprint"] = t1
|
||||
if("sex")
|
||||
if (istype(active1, /datum/data/record))
|
||||
if (active1.fields["sex"] == "Male")
|
||||
active1.fields["sex"] = "Female"
|
||||
else
|
||||
active1.fields["sex"] = "Male"
|
||||
if("age")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["age"] = t1
|
||||
if("rank")
|
||||
var/list/L = list( "Head of Personnel", "Captain", "AI" )
|
||||
//This was so silly before the change. Now it actually works without beating your head against the keyboard. /N
|
||||
if ((istype(active1, /datum/data/record) && L.Find(rank)))
|
||||
temp = "<h5>Rank:</h5>"
|
||||
temp += "<ul>"
|
||||
for(var/rank in get_all_jobs())
|
||||
temp += "<li><a href='?src=\ref[src];choice=Change Rank;rank=[rank]'>[rank]</a></li>"
|
||||
temp += "</ul>"
|
||||
else
|
||||
alert(usr, "You do not have the required rank to do this!")
|
||||
if("species")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = copytext(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["species"] = t1
|
||||
|
||||
//TEMPORARY MENU FUNCTIONS
|
||||
else//To properly clear as per clear screen.
|
||||
temp=null
|
||||
switch(href_list["choice"])
|
||||
if ("Change Rank")
|
||||
if (active1)
|
||||
active1.fields["rank"] = href_list["rank"]
|
||||
if(href_list["rank"] in get_all_jobs())
|
||||
active1.fields["real_rank"] = href_list["real_rank"]
|
||||
|
||||
if ("Delete Record (ALL) Execute")
|
||||
if (active1)
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
|
||||
del(R)
|
||||
else
|
||||
del(active1)
|
||||
else
|
||||
temp = "This function does not appear to be working at the moment. Our apologies."
|
||||
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/skills/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
return
|
||||
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
if(prob(10/severity))
|
||||
switch(rand(1,6))
|
||||
if(1)
|
||||
R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]"
|
||||
if(2)
|
||||
R.fields["sex"] = pick("Male", "Female")
|
||||
if(3)
|
||||
R.fields["age"] = rand(5, 85)
|
||||
if(4)
|
||||
R.fields["criminal"] = pick("None", "*Arrest*", "Incarcerated", "Parolled", "Released")
|
||||
if(5)
|
||||
R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit")
|
||||
if(6)
|
||||
R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable")
|
||||
continue
|
||||
|
||||
else if(prob(1))
|
||||
del(R)
|
||||
continue
|
||||
|
||||
..(severity)
|
||||
@@ -0,0 +1,97 @@
|
||||
#define VOX_SHUTTLE_MOVE_TIME 60
|
||||
#define VOX_SHUTTLE_COOLDOWN 200
|
||||
|
||||
//Copied from Syndicate shuttle.
|
||||
|
||||
/obj/machinery/computer/vox_station
|
||||
name = "vox skipjack terminal"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "syndishuttle"
|
||||
req_access = list(access_syndicate)
|
||||
var/area/curr_location
|
||||
var/moving = 0
|
||||
var/lastMove = 0
|
||||
|
||||
|
||||
/obj/machinery/computer/vox_station/New()
|
||||
curr_location= locate(/area/shuttle/vox/station)
|
||||
|
||||
|
||||
/obj/machinery/computer/vox_station/proc/vox_move_to(area/destination as area)
|
||||
if(moving) return
|
||||
if(lastMove + VOX_SHUTTLE_COOLDOWN > world.time) return
|
||||
var/area/dest_location = locate(destination)
|
||||
if(curr_location == dest_location) return
|
||||
|
||||
moving = 1
|
||||
lastMove = world.time
|
||||
|
||||
if(curr_location.z != dest_location.z)
|
||||
var/area/transit_location = locate(/area/vox_station/transit)
|
||||
curr_location.move_contents_to(transit_location)
|
||||
curr_location = transit_location
|
||||
sleep(VOX_SHUTTLE_MOVE_TIME)
|
||||
|
||||
curr_location.move_contents_to(dest_location)
|
||||
curr_location = dest_location
|
||||
moving = 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/computer/vox_station/attackby(obj/item/I as obj, mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/vox_station/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/vox_station/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/vox_station/attack_hand(mob/user as mob)
|
||||
if(!allowed(user))
|
||||
user << "\red Access Denied"
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = {"Location: [curr_location]<br>
|
||||
Ready to move[max(lastMove + VOX_SHUTTLE_COOLDOWN - world.time, 0) ? " in [max(round((lastMove + VOX_SHUTTLE_COOLDOWN - world.time) * 0.1), 0)] seconds" : ": now"]<br>
|
||||
<a href='?src=\ref[src];start=1'>Dark space</a><br>
|
||||
<a href='?src=\ref[src];solars_fore_port=1'>Fore port solar</a> |
|
||||
<a href='?src=\ref[src];solars_aft_port=1'>Aft port solar</a> |
|
||||
<a href='?src=\ref[src];solars_fore_starboard=1'>Fore starboard solar</a><br>
|
||||
<a href='?src=\ref[src];solars_aft_starboard=1'>Aft starboard solar</a> |
|
||||
<a href='?src=\ref[src];mining=1'>Mining Asteroid</a><br>
|
||||
<a href='?src=\ref[user];mach_close=computer'>Close</a>"}
|
||||
|
||||
user << browse(dat, "window=computer;size=575x450")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/vox_station/Topic(href, href_list)
|
||||
if(!isliving(usr)) return
|
||||
var/mob/living/user = usr
|
||||
|
||||
if(in_range(src, user) || istype(user, /mob/living/silicon))
|
||||
user.set_machine(src)
|
||||
|
||||
if(href_list["start"])
|
||||
vox_move_to(/area/shuttle/vox/station)
|
||||
else if(href_list["solars_fore_starboard"])
|
||||
vox_move_to(/area/vox_station/northeast_solars)
|
||||
else if(href_list["solars_fore_port"])
|
||||
vox_move_to(/area/vox_station/northwest_solars)
|
||||
else if(href_list["solars_aft_starboard"])
|
||||
vox_move_to(/area/vox_station/southeast_solars)
|
||||
else if(href_list["solars_aft_port"])
|
||||
vox_move_to(/area/vox_station/southwest_solars)
|
||||
else if(href_list["mining"])
|
||||
vox_move_to(/area/vox_station/mining)
|
||||
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/vox_station/bullet_act(var/obj/item/projectile/Proj)
|
||||
visible_message("[Proj] ricochets off [src]!")
|
||||
@@ -17,222 +17,287 @@
|
||||
anchored = 1.0 // can't pick it up
|
||||
density = 0 // can walk through it.
|
||||
var/id = null // id of door it controls.
|
||||
var/releasetime = 0 // when world.time reaches it - release the prisoneer
|
||||
var/releasetime = 0 // when world.timeofday reaches it - release the prisoner
|
||||
var/timing = 1 // boolean, true/1 timer is on, false/0 means it's not timing
|
||||
var/picture_state // icon_state of alert picture, if not displaying text/numbers
|
||||
var/list/obj/machinery/targets = list()
|
||||
var/timetoset = 0 // Used to set releasetime upon starting the timer
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
/obj/machinery/door_timer/New()
|
||||
..()
|
||||
|
||||
pixel_x = ((src.dir & 3)? (0) : (src.dir == 4 ? 32 : -32))
|
||||
pixel_y = ((src.dir & 3)? (src.dir ==1 ? 24 : -32) : (0))
|
||||
pixel_x = ((src.dir & 3)? (0) : (src.dir == 4 ? 32 : -32))
|
||||
pixel_y = ((src.dir & 3)? (src.dir ==1 ? 24 : -32) : (0))
|
||||
|
||||
spawn(20)
|
||||
for(var/obj/machinery/door/window/brigdoor/M in world)
|
||||
if (M.id == src.id)
|
||||
targets += M
|
||||
spawn(20)
|
||||
for(var/obj/machinery/door/window/brigdoor/M in world)
|
||||
if (M.id == src.id)
|
||||
targets += M
|
||||
|
||||
for(var/obj/machinery/flasher/F in world)
|
||||
if(F.id == src.id)
|
||||
targets += F
|
||||
for(var/obj/machinery/flasher/F in world)
|
||||
if(F.id == src.id)
|
||||
targets += F
|
||||
|
||||
for(var/obj/structure/closet/secure_closet/brig/C in world)
|
||||
if(C.id == src.id)
|
||||
targets += C
|
||||
for(var/obj/structure/closet/secure_closet/brig/C in world)
|
||||
if(C.id == src.id)
|
||||
targets += C
|
||||
|
||||
if(targets.len==0)
|
||||
stat |= BROKEN
|
||||
update_icon()
|
||||
return
|
||||
if(targets.len==0)
|
||||
stat |= BROKEN
|
||||
update_icon()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
//Main door timer loop, if it's timing and time is >0 reduce time by 1.
|
||||
// if it's less than 0, open door, reset timer
|
||||
// update the door_timer window and the icon
|
||||
process()
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
if(src.timing)
|
||||
if(world.time > src.releasetime)
|
||||
src.timer_end() // open doors, reset timer, clear status screen
|
||||
src.timing = 0
|
||||
src.updateUsrDialog()
|
||||
src.update_icon()
|
||||
else
|
||||
timer_end()
|
||||
return
|
||||
/obj/machinery/door_timer/process()
|
||||
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
if(src.timing)
|
||||
|
||||
// poorly done midnight rollover
|
||||
// (no seriously there's gotta be a better way to do this)
|
||||
var/timeleft = timeleft()
|
||||
if(timeleft > 1e5)
|
||||
src.releasetime = 0
|
||||
|
||||
|
||||
// has the door power sitatuation changed, if so update icon.
|
||||
power_change()
|
||||
..()
|
||||
update_icon()
|
||||
return
|
||||
if(world.timeofday > src.releasetime)
|
||||
src.timer_end() // open doors, reset timer, clear status screen
|
||||
src.timing = 0
|
||||
|
||||
src.updateUsrDialog()
|
||||
src.update_icon()
|
||||
|
||||
else
|
||||
timer_end()
|
||||
|
||||
return
|
||||
|
||||
|
||||
// has the door power situation changed, if so update icon.
|
||||
/obj/machinery/door_timer/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
// open/closedoor checks if door_timer has power, if so it checks if the
|
||||
// linked door is open/closed (by density) then opens it/closes it.
|
||||
proc/timer_start()
|
||||
if(stat & (NOPOWER|BROKEN)) return 0
|
||||
|
||||
for(var/obj/machinery/door/window/brigdoor/door in targets)
|
||||
if(door.density) continue
|
||||
spawn(0)
|
||||
door.close()
|
||||
// Closes and locks doors, power check
|
||||
/obj/machinery/door_timer/proc/timer_start()
|
||||
if(stat & (NOPOWER|BROKEN)) return 0
|
||||
|
||||
for(var/obj/structure/closet/secure_closet/brig/C in targets)
|
||||
if(C.broken) continue
|
||||
if(C.opened && !C.close()) continue
|
||||
C.locked = 1
|
||||
C.icon_state = C.icon_locked
|
||||
return 1
|
||||
// Set releasetime
|
||||
releasetime = world.timeofday + timetoset
|
||||
|
||||
for(var/obj/machinery/door/window/brigdoor/door in targets)
|
||||
if(door.density) continue
|
||||
spawn(0)
|
||||
door.close()
|
||||
|
||||
for(var/obj/structure/closet/secure_closet/brig/C in targets)
|
||||
if(C.broken) continue
|
||||
if(C.opened && !C.close()) continue
|
||||
C.locked = 1
|
||||
C.icon_state = C.icon_locked
|
||||
return 1
|
||||
|
||||
|
||||
proc/timer_end()
|
||||
if(stat & (NOPOWER|BROKEN)) return 0
|
||||
// Opens and unlocks doors, power check
|
||||
/obj/machinery/door_timer/proc/timer_end()
|
||||
if(stat & (NOPOWER|BROKEN)) return 0
|
||||
|
||||
for(var/obj/machinery/door/window/brigdoor/door in targets)
|
||||
if(!door.density) continue
|
||||
spawn(0)
|
||||
door.open()
|
||||
// Reset releasetime
|
||||
releasetime = 0
|
||||
|
||||
for(var/obj/structure/closet/secure_closet/brig/C in targets)
|
||||
if(C.broken) continue
|
||||
if(C.opened) continue
|
||||
C.locked = 0
|
||||
C.icon_state = C.icon_closed
|
||||
for(var/obj/machinery/door/window/brigdoor/door in targets)
|
||||
if(!door.density) continue
|
||||
spawn(0)
|
||||
door.open()
|
||||
|
||||
return 1
|
||||
for(var/obj/structure/closet/secure_closet/brig/C in targets)
|
||||
if(C.broken) continue
|
||||
if(C.opened) continue
|
||||
C.locked = 0
|
||||
C.icon_state = C.icon_closed
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
proc/timeleft()
|
||||
. = (releasetime-world.time)/10
|
||||
if(. < 0)
|
||||
. = 0
|
||||
// Check for releasetime timeleft
|
||||
/obj/machinery/door_timer/proc/timeleft()
|
||||
. = (releasetime - world.timeofday)/10
|
||||
if(. < 0)
|
||||
. = 0
|
||||
|
||||
// Set timetoset
|
||||
/obj/machinery/door_timer/proc/timeset(var/seconds)
|
||||
timetoset = seconds * 10
|
||||
|
||||
proc/timeset(var/seconds)
|
||||
releasetime=world.time+seconds*10
|
||||
return
|
||||
if(timetoset <= 0)
|
||||
timetoset = 0
|
||||
|
||||
return
|
||||
|
||||
//Allows AIs to use door_timer, see human attack_hand function below
|
||||
attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
/obj/machinery/door_timer/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
//Allows humans to use door_timer
|
||||
//Opens dialog window when someone clicks on door timer
|
||||
// Allows altering timer and the timing boolean.
|
||||
// Flasher activation limited to 150 seconds
|
||||
attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
var/second = round(timeleft() % 60)
|
||||
var/minute = round((timeleft() - second) / 60)
|
||||
user.set_machine(src)
|
||||
var/dat = "<HTML><BODY><TT>"
|
||||
dat += "<HR>Timer System:</hr>"
|
||||
dat += "<b>Door [src.id] controls</b><br/>"
|
||||
if (src.timing)
|
||||
dat += "<a href='?src=\ref[src];timing=0'>Stop Timer and open door</a><br/>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];timing=1'>Activate Timer and close door</a><br/>"
|
||||
|
||||
dat += "Time Left: [(minute ? text("[minute]:") : null)][second] <br/>"
|
||||
dat += "<a href='?src=\ref[src];tp=-60'>-</a> <a href='?src=\ref[src];tp=-1'>-</a> <a href='?src=\ref[src];tp=1'>+</a> <A href='?src=\ref[src];tp=60'>+</a><br/>"
|
||||
|
||||
for(var/obj/machinery/flasher/F in targets)
|
||||
if(F.last_flash && (F.last_flash + 150) > world.time)
|
||||
dat += "<br/><A href='?src=\ref[src];fc=1'>Flash Charging</A>"
|
||||
else
|
||||
dat += "<br/><A href='?src=\ref[src];fc=1'>Activate Flash</A>"
|
||||
|
||||
dat += "<br/><br/><a href='?src=\ref[user];mach_close=computer'>Close</a>"
|
||||
dat += "</TT></BODY></HTML>"
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
onclose(user, "computer")
|
||||
/obj/machinery/door_timer/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
// Used for the 'time left' display
|
||||
var/second = round(timeleft() % 60)
|
||||
var/minute = round((timeleft() - second) / 60)
|
||||
|
||||
// Used for 'set timer'
|
||||
var/setsecond = round((timetoset / 10) % 60)
|
||||
var/setminute = round(((timetoset / 10) - setsecond) / 60)
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
// dat
|
||||
var/dat = "<HTML><BODY><TT>"
|
||||
|
||||
dat += "<HR>Timer System:</hr>"
|
||||
dat += " <b>Door [src.id] controls</b><br/>"
|
||||
|
||||
// Start/Stop timer
|
||||
if (src.timing)
|
||||
dat += "<a href='?src=\ref[src];timing=0'>Stop Timer and open door</a><br/>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];timing=1'>Activate Timer and close door</a><br/>"
|
||||
|
||||
// Time Left display (uses releasetime)
|
||||
dat += "Time Left: [(minute ? text("[minute]:") : null)][second] <br/>"
|
||||
dat += "<br/>"
|
||||
|
||||
// Set Timer display (uses timetoset)
|
||||
if(src.timing)
|
||||
dat += "Set Timer: [(setminute ? text("[setminute]:") : null)][setsecond] <a href='?src=\ref[src];change=1'>Set</a><br/>"
|
||||
else
|
||||
dat += "Set Timer: [(setminute ? text("[setminute]:") : null)][setsecond]<br/>"
|
||||
|
||||
// Controls
|
||||
dat += "<a href='?src=\ref[src];tp=-60'>-</a> <a href='?src=\ref[src];tp=-1'>-</a> <a href='?src=\ref[src];tp=1'>+</a> <A href='?src=\ref[src];tp=60'>+</a><br/>"
|
||||
|
||||
// Mounted flash controls
|
||||
for(var/obj/machinery/flasher/F in targets)
|
||||
if(F.last_flash && (F.last_flash + 150) > world.time)
|
||||
dat += "<br/><A href='?src=\ref[src];fc=1'>Flash Charging</A>"
|
||||
else
|
||||
dat += "<br/><A href='?src=\ref[src];fc=1'>Activate Flash</A>"
|
||||
|
||||
dat += "<br/><br/><a href='?src=\ref[user];mach_close=computer'>Close</a>"
|
||||
dat += "</TT></BODY></HTML>"
|
||||
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
|
||||
//Function for using door_timer dialog input, checks if user has permission
|
||||
// href_list to
|
||||
// "timing" turns on timer
|
||||
// "tp" value to modify timer
|
||||
// "fc" activates flasher
|
||||
// "change" resets the timer to the timetoset amount while the timer is counting down
|
||||
// Also updates dialog window and timer icon
|
||||
Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(!src.allowed(usr))
|
||||
return
|
||||
/obj/machinery/door_timer/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(!src.allowed(usr))
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
|
||||
if(href_list["timing"])
|
||||
src.timing = text2num(href_list["timing"])
|
||||
|
||||
usr.set_machine(src)
|
||||
if(href_list["timing"])
|
||||
src.timing = text2num(href_list["timing"])
|
||||
else
|
||||
if(href_list["tp"]) //adjust timer, close door if not already closed
|
||||
var/tp = text2num(href_list["tp"])
|
||||
var/timeleft = timeleft()
|
||||
timeleft += tp
|
||||
timeleft = min(max(round(timeleft), 0), 3600)
|
||||
timeset(timeleft)
|
||||
//src.timing = 1
|
||||
//src.closedoor()
|
||||
if(href_list["fc"])
|
||||
for(var/obj/machinery/flasher/F in targets)
|
||||
F.flash()
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
src.update_icon()
|
||||
if(src.timing)
|
||||
src.timer_start()
|
||||
else
|
||||
src.timer_end()
|
||||
return
|
||||
|
||||
else
|
||||
if(href_list["tp"]) //adjust timer, close door if not already closed
|
||||
var/tp = text2num(href_list["tp"])
|
||||
var/addtime = (timetoset / 10)
|
||||
addtime += tp
|
||||
addtime = min(max(round(addtime), 0), 3600)
|
||||
|
||||
timeset(addtime)
|
||||
|
||||
if(href_list["fc"])
|
||||
for(var/obj/machinery/flasher/F in targets)
|
||||
F.flash()
|
||||
|
||||
if(href_list["change"])
|
||||
src.timer_start()
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
src.update_icon()
|
||||
|
||||
/* if(src.timing)
|
||||
src.timer_start()
|
||||
|
||||
else
|
||||
src.timer_end() */
|
||||
|
||||
return
|
||||
|
||||
|
||||
//icon update function
|
||||
// if NOPOWER, display blank
|
||||
// if BROKEN, display blue screen of death icon AI uses
|
||||
// if timing=true, run update display function
|
||||
update_icon()
|
||||
if(stat & (NOPOWER))
|
||||
icon_state = "frame"
|
||||
return
|
||||
if(stat & (BROKEN))
|
||||
set_picture("ai_bsod")
|
||||
return
|
||||
if(src.timing)
|
||||
var/disp1 = uppertext(id)
|
||||
var/timeleft = timeleft()
|
||||
var/disp2 = "[add_zero(num2text((timeleft / 60) % 60),2)]~[add_zero(num2text(timeleft % 60), 2)]"
|
||||
spawn( 5 )
|
||||
update_display(disp1, disp2)
|
||||
else
|
||||
update_display("SET","TIME")
|
||||
/obj/machinery/door_timer/update_icon()
|
||||
if(stat & (NOPOWER))
|
||||
icon_state = "frame"
|
||||
return
|
||||
if(stat & (BROKEN))
|
||||
set_picture("ai_bsod")
|
||||
return
|
||||
if(src.timing)
|
||||
var/disp1 = uppertext(id)
|
||||
var/timeleft = timeleft()
|
||||
var/disp2 = "[add_zero(num2text((timeleft / 60) % 60),2)]~[add_zero(num2text(timeleft % 60), 2)]"
|
||||
spawn( 5 )
|
||||
update_display(disp1, disp2)
|
||||
else
|
||||
update_display("SET","TIME")
|
||||
return
|
||||
|
||||
|
||||
// Adds an icon in case the screen is broken/off, stolen from status_display.dm
|
||||
proc/set_picture(var/state)
|
||||
picture_state = state
|
||||
overlays.Cut()
|
||||
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
|
||||
/obj/machinery/door_timer/proc/set_picture(var/state)
|
||||
picture_state = state
|
||||
overlays.Cut()
|
||||
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
|
||||
|
||||
|
||||
//Checks to see if there's 1 line or 2, adds text-icons-numbers/letters over display
|
||||
// Stolen from status_display
|
||||
proc/update_display(var/line1, var/line2)
|
||||
if(line2 == null) // single line display
|
||||
overlays.Cut()
|
||||
overlays += texticon(line1, 23, -13)
|
||||
else // dual line display
|
||||
overlays.Cut()
|
||||
overlays += texticon(line1, 23, -9)
|
||||
overlays += texticon(line2, 23, -17)
|
||||
/obj/machinery/door_timer/proc/update_display(var/line1, var/line2)
|
||||
if(line2 == null) // single line display
|
||||
overlays.Cut()
|
||||
overlays += texticon(line1, 23, -13)
|
||||
else // dual line display
|
||||
overlays.Cut()
|
||||
overlays += texticon(line1, 23, -9)
|
||||
overlays += texticon(line2, 23, -17)
|
||||
// return an icon of a time text string (tn)
|
||||
// valid characters are 0-9 and :
|
||||
// px, py are pixel offsets
|
||||
@@ -240,19 +305,19 @@
|
||||
|
||||
//Actual string input to icon display for loop, with 5 pixel x offsets for each letter.
|
||||
//Stolen from status_display
|
||||
proc/texticon(var/tn, var/px = 0, var/py = 0)
|
||||
var/image/I = image('icons/obj/status_display.dmi', "blank")
|
||||
var/len = lentext(tn)
|
||||
/obj/machinery/door_timer/proc/texticon(var/tn, var/px = 0, var/py = 0)
|
||||
var/image/I = image('icons/obj/status_display.dmi', "blank")
|
||||
var/len = lentext(tn)
|
||||
|
||||
for(var/d = 1 to len)
|
||||
var/char = copytext(tn, len-d+1, len-d+2)
|
||||
if(char == " ")
|
||||
continue
|
||||
var/image/ID = image('icons/obj/status_display.dmi', icon_state=char)
|
||||
ID.pixel_x = -(d-1)*5 + px
|
||||
ID.pixel_y = py
|
||||
I.overlays += ID
|
||||
return I
|
||||
for(var/d = 1 to len)
|
||||
var/char = copytext(tn, len-d+1, len-d+2)
|
||||
if(char == " ")
|
||||
continue
|
||||
var/image/ID = image('icons/obj/status_display.dmi', icon_state=char)
|
||||
ID.pixel_x = -(d-1)*5 + px
|
||||
ID.pixel_y = py
|
||||
I.overlays += ID
|
||||
return I
|
||||
|
||||
|
||||
/obj/machinery/door_timer/cell_1
|
||||
|
||||
@@ -131,8 +131,7 @@
|
||||
else
|
||||
if(isliving(src.loc))
|
||||
return
|
||||
user.lastDblClick = world.time + 2
|
||||
user.next_move = world.time + 2
|
||||
user.delay_click(2)
|
||||
src.pickup(user)
|
||||
add_fingerprint(user)
|
||||
user.put_in_active_hand(src)
|
||||
@@ -166,8 +165,7 @@
|
||||
if(istype(src.loc, /mob/living))
|
||||
return
|
||||
src.pickup(user)
|
||||
user.lastDblClick = world.time + 2
|
||||
user.next_move = world.time + 2
|
||||
user.delay_click(2)
|
||||
|
||||
user.put_in_active_hand(src)
|
||||
return
|
||||
@@ -229,6 +227,8 @@
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>" )
|
||||
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG
|
||||
|
||||
user.delay_click(10)
|
||||
|
||||
//spawn(1800) // this wont work right
|
||||
// M.lastattacker = null
|
||||
/////////////////////////
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
m_amt = 90
|
||||
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
|
||||
var/max_water = 50
|
||||
var/last_use = 1.0
|
||||
var/safety = 1
|
||||
var/sprite_name = "fire_extinguisher"
|
||||
|
||||
@@ -67,11 +66,6 @@
|
||||
usr << "\red \The [src] is empty."
|
||||
return
|
||||
|
||||
if (world.time < src.last_use + 20)
|
||||
return
|
||||
|
||||
src.last_use = world.time
|
||||
|
||||
playsound(src.loc, 'sound/effects/extinguish.ogg', 75, 1, -3)
|
||||
|
||||
var/direction = get_dir(src,target)
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
|
||||
"<span class='warning'>You kick [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
user.delay_click(10)
|
||||
|
||||
if(shock(user, 70))
|
||||
return
|
||||
@@ -51,6 +52,7 @@
|
||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
|
||||
"<span class='warning'>You mangle [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
user.delay_click(10)
|
||||
|
||||
if(!shock(user, 70))
|
||||
health -= 5
|
||||
@@ -64,6 +66,7 @@
|
||||
user.visible_message("<span class='warning'>[user] smashes against [src].</span>", \
|
||||
"<span class='warning'>You smash against [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
user.delay_click(10)
|
||||
|
||||
health -= rand(2,3)
|
||||
healthcheck()
|
||||
@@ -76,6 +79,7 @@
|
||||
M.visible_message("<span class='warning'>[M] smashes against [src].</span>", \
|
||||
"<span class='warning'>You smash against [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
M.delay_click(10)
|
||||
|
||||
health -= M.melee_damage_upper
|
||||
healthcheck()
|
||||
@@ -160,8 +164,10 @@
|
||||
|
||||
else if(istype(W, /obj/item/weapon/shard))
|
||||
health -= W.force * 0.1
|
||||
user.delay_click(10)
|
||||
else if(!shock(user, 70))
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.delay_click(10)
|
||||
switch(W.damtype)
|
||||
if("fire")
|
||||
health -= W.force
|
||||
|
||||
@@ -104,16 +104,19 @@
|
||||
new /obj/item/weapon/shard(loc)
|
||||
if(reinf) new /obj/item/stack/rods(loc)
|
||||
del(src)
|
||||
usr.delay_click(10)
|
||||
else if (usr.a_intent == "hurt")
|
||||
playsound(src.loc, 'glassknock.ogg', 80, 1)
|
||||
usr.visible_message("\red [usr.name] bangs against the [src.name]!", \
|
||||
"\red You bang against the [src.name]!", \
|
||||
"You hear a banging sound.")
|
||||
usr.delay_click(5)
|
||||
else
|
||||
playsound(src.loc, 'glassknock.ogg', 80, 1)
|
||||
usr.visible_message("[usr.name] knocks on the [src.name].", \
|
||||
"You knock on the [src.name].", \
|
||||
"You hear a knocking sound.")
|
||||
usr.delay_click(5)
|
||||
return
|
||||
|
||||
|
||||
@@ -128,9 +131,11 @@
|
||||
new /obj/item/weapon/shard(loc)
|
||||
if(reinf) new /obj/item/stack/rods(loc)
|
||||
del(src)
|
||||
user.delay_click(10)
|
||||
else //for nicer text~
|
||||
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||
user.delay_click(10)
|
||||
|
||||
|
||||
/obj/structure/window/attack_alien(mob/user as mob)
|
||||
@@ -158,6 +163,7 @@
|
||||
var/mob/living/M = G.affecting
|
||||
var/state = G.state
|
||||
del(W) //gotta delete it here because if window breaks, it won't get deleted
|
||||
user.delay_click(10)
|
||||
switch (state)
|
||||
if(1)
|
||||
M.apply_damage(7)
|
||||
@@ -197,6 +203,7 @@
|
||||
else
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
hit(W.force)
|
||||
user.delay_click(10)
|
||||
if(health <= 7)
|
||||
anchored = 0
|
||||
update_nearby_icons()
|
||||
|
||||
@@ -134,6 +134,7 @@ var/list/prisonsecuritywarp = list() //prison security goes to these
|
||||
var/list/prisonwarped = list() //list of players already warped
|
||||
var/list/blobstart = list()
|
||||
var/list/ninjastart = list()
|
||||
var/list/voxstart = list()
|
||||
// list/traitors = list() //traitor list
|
||||
var/list/cardinal = list( NORTH, SOUTH, EAST, WEST )
|
||||
var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
*/
|
||||
|
||||
/client/proc/fix_next_move()
|
||||
set category = "Debug"
|
||||
/* set category = "Debug"
|
||||
set name = "Unfreeze Everyone"
|
||||
var/largest_move_time = 0
|
||||
var/largest_click_time = 0
|
||||
@@ -90,6 +90,7 @@
|
||||
message_admins("[key_name_admin(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [largest_click_time/10] seconds!", 1)
|
||||
message_admins("world.time = [world.time]", 1)
|
||||
feedback_add_details("admin_verb","UFE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
*/
|
||||
return
|
||||
|
||||
/client/proc/radio_report()
|
||||
|
||||
@@ -462,11 +462,11 @@ client/proc/one_click_antag()
|
||||
candidates.Remove(G)
|
||||
|
||||
if(candidates.len)
|
||||
var/max_raiders = 4
|
||||
var/max_raiders = 1
|
||||
var/raiders = max_raiders
|
||||
//Spawns vox raiders and equips them.
|
||||
for (var/obj/effect/landmark/L in world)
|
||||
if(L.name == "Response Team")
|
||||
if(L.name == "voxstart")
|
||||
if(raiders<=0)
|
||||
break
|
||||
|
||||
|
||||
@@ -99,6 +99,7 @@ datum/preferences
|
||||
var/flavor_text = ""
|
||||
var/med_record = ""
|
||||
var/sec_record = ""
|
||||
var/gen_record = ""
|
||||
var/disabilities = 0
|
||||
|
||||
var/nanotrasen_relation = "Neutral"
|
||||
@@ -492,6 +493,13 @@ datum/preferences
|
||||
else
|
||||
HTML += "[copytext(med_record, 1, 37)]..."
|
||||
|
||||
HTML += "<br><br><a href=\"byond://?src=\ref[user];preference=records;task=gen_record\">Employment Records</a><br>"
|
||||
|
||||
if(lentext(gen_record) <= 40)
|
||||
HTML += "[gen_record]"
|
||||
else
|
||||
HTML += "[copytext(gen_record, 1, 37)]..."
|
||||
|
||||
HTML += "<br><br><a href=\"byond://?src=\ref[user];preference=records;task=sec_record\">Security Records</a><br>"
|
||||
|
||||
if(lentext(sec_record) <= 40)
|
||||
@@ -732,6 +740,15 @@ datum/preferences
|
||||
|
||||
sec_record = secmsg
|
||||
SetRecords(user)
|
||||
if(href_list["task"] == "gen_record")
|
||||
var/genmsg = input(usr,"Set your employment notes here.","Employment Records",html_decode(gen_record)) as message
|
||||
|
||||
if(genmsg != null)
|
||||
genmsg = copytext(genmsg, 1, MAX_PAPER_MESSAGE_LEN)
|
||||
genmsg = html_encode(genmsg)
|
||||
|
||||
gen_record = genmsg
|
||||
SetRecords(user)
|
||||
|
||||
switch(href_list["task"])
|
||||
if("random")
|
||||
@@ -1118,7 +1135,7 @@ datum/preferences
|
||||
|
||||
proc/copy_to(mob/living/carbon/human/character, safety = 0)
|
||||
if(be_random_name)
|
||||
real_name = random_name()
|
||||
real_name = random_name(gender)
|
||||
|
||||
if(config.humans_need_surnames)
|
||||
var/firstspace = findtext(real_name, " ")
|
||||
@@ -1136,6 +1153,7 @@ datum/preferences
|
||||
character.flavor_text = flavor_text
|
||||
character.med_record = med_record
|
||||
character.sec_record = sec_record
|
||||
character.gen_record = gen_record
|
||||
|
||||
character.gender = gender
|
||||
character.age = age
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
S["flavor_text"] >> flavor_text
|
||||
S["med_record"] >> med_record
|
||||
S["sec_record"] >> sec_record
|
||||
S["gen_record"] >> gen_record
|
||||
S["be_special"] >> be_special
|
||||
S["disabilities"] >> disabilities
|
||||
S["player_alt_titles"] >> player_alt_titles
|
||||
@@ -155,7 +156,7 @@
|
||||
if(isnull(species)) species = "Human"
|
||||
if(isnull(language)) language = "None"
|
||||
if(isnull(nanotrasen_relation)) nanotrasen_relation = initial(nanotrasen_relation)
|
||||
if(!real_name) real_name = random_name()
|
||||
if(!real_name) real_name = random_name(gender)
|
||||
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
|
||||
gender = sanitize_gender(gender)
|
||||
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
|
||||
@@ -241,6 +242,7 @@
|
||||
S["flavor_text"] << flavor_text
|
||||
S["med_record"] << med_record
|
||||
S["sec_record"] << sec_record
|
||||
S["gen_record"] << gen_record
|
||||
S["player_alt_titles"] << player_alt_titles
|
||||
S["be_special"] << be_special
|
||||
S["disabilities"] << disabilities
|
||||
|
||||
@@ -77,7 +77,9 @@ mob/living/carbon/proc/handle_hallucinations()
|
||||
halitem.name = "Flashbang"
|
||||
if(client) client.screen += halitem
|
||||
spawn(rand(100,250))
|
||||
del halitem
|
||||
if(client)
|
||||
client.screen -= halitem
|
||||
halitem = null
|
||||
if(26 to 40)
|
||||
//Flashes of danger
|
||||
//src << "Danger Flash"
|
||||
|
||||
@@ -598,12 +598,10 @@ commented out in r5061, I left it because of the shroom thingies
|
||||
if(istype(R.module_active,/obj/item/weapon/pickaxe))
|
||||
src.attackby(R.module_active,R)
|
||||
return
|
||||
/* else if(istype(AM,/obj/mecha))
|
||||
else if(istype(AM,/obj/mecha))
|
||||
var/obj/mecha/M = AM
|
||||
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill))
|
||||
src.attackby(M.selected,M)
|
||||
return*/
|
||||
//Aparantly mechs are just TOO COOL to call Bump(), so fuck em (for now)
|
||||
M.selected.action(src)
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
@@ -18,6 +18,29 @@
|
||||
return
|
||||
|
||||
. = src.say_dead(message)
|
||||
|
||||
|
||||
/mob/dead/observer/emote(var/act, var/type, var/message)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if(!message)
|
||||
return
|
||||
|
||||
if(act != "me")
|
||||
return
|
||||
|
||||
log_emote("Ghost/[src.key] : [message]")
|
||||
|
||||
if(src.client)
|
||||
if(src.client.prefs.muted & MUTE_DEADCHAT)
|
||||
src << "\red You cannot emote in deadchat (muted)."
|
||||
return
|
||||
|
||||
if(src.client.handle_spam_prevention(message, MUTE_DEADCHAT))
|
||||
return
|
||||
|
||||
. = src.emote_dead(message)
|
||||
|
||||
/*
|
||||
for (var/mob/M in hearers(null, null))
|
||||
if (!M.stat)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// All mobs should have custom emote, really..
|
||||
mob/proc/custom_emote(var/m_type=1,var/message = null)
|
||||
/mob/proc/custom_emote(var/m_type=1,var/message = null)
|
||||
|
||||
if(!use_me && usr == src)
|
||||
usr << "You are unable to emote."
|
||||
@@ -25,7 +25,7 @@ mob/proc/custom_emote(var/m_type=1,var/message = null)
|
||||
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
|
||||
// Maybe some people are okay with that.
|
||||
|
||||
for(var/mob/M in world)
|
||||
for(var/mob/M in player_list)
|
||||
if (!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
if (istype(M, /mob/new_player))
|
||||
@@ -42,3 +42,30 @@ mob/proc/custom_emote(var/m_type=1,var/message = null)
|
||||
else if (m_type & 2)
|
||||
for (var/mob/O in hearers(src.loc, null))
|
||||
O.show_message(message, m_type)
|
||||
|
||||
/mob/proc/emote_dead(var/message)
|
||||
|
||||
var/input
|
||||
if(!message)
|
||||
input = copytext(sanitize(input(src, "Choose an emote to display.") as text|null), 1, MAX_MESSAGE_LEN)
|
||||
else
|
||||
input = message
|
||||
|
||||
if(input)
|
||||
message = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <b>[src]</b> [message]</span>"
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
if(message)
|
||||
log_emote("Ghost/[src.key] : [message]")
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
if(istype(M, /mob/new_player))
|
||||
continue
|
||||
|
||||
if(M.client && M.client.holder && (M.client.holder.rights & R_ADMIN|R_MOD) && (M.client.prefs.toggles & CHAT_DEAD))
|
||||
M << message
|
||||
|
||||
else if(M.stat == DEAD)
|
||||
M.show_message(message, 2)
|
||||
|
||||
@@ -1114,9 +1114,9 @@ mob/living/carbon/human/yank_out_object()
|
||||
set desc = "Remove an embedded item at the cost of bleeding and pain."
|
||||
set src in view(1)
|
||||
|
||||
if(!isliving(usr) || usr.next_move > world.time)
|
||||
if(!isliving(usr) || usr.last_click + usr.click_delay < world.time)
|
||||
return
|
||||
usr.next_move = world.time + 20
|
||||
usr.delay_click(20)
|
||||
|
||||
if(usr.stat == 1)
|
||||
usr << "You are unconcious and cannot do that!"
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
if(module)
|
||||
return
|
||||
var/list/modules = list("Standard", "Engineering", "Medical", "Miner", "Janitor", "Service", "Security")
|
||||
if(emagged || security_level > SEC_LEVEL_BLUE)
|
||||
if(crisis && security_level == SEC_LEVEL_RED) //Leaving this in until it's balanced appropriately.
|
||||
src << "\red Crisis mode active. Combat module available."
|
||||
modules+="Combat"
|
||||
modtype = input("Please, select a module!", "Robot", null, null) in modules
|
||||
@@ -1240,9 +1240,11 @@
|
||||
else
|
||||
src << "Something is badly wrong with the sprite selection. Harass a coder."
|
||||
icon_state = module_sprites[1]
|
||||
base_icon = icon_state
|
||||
return
|
||||
|
||||
overlays -= "eyes"
|
||||
base_icon = icon_state
|
||||
updateicon()
|
||||
|
||||
if (triesleft >= 1)
|
||||
|
||||
@@ -223,13 +223,12 @@
|
||||
/obj/item/weapon/robot_module/combat
|
||||
name = "combat robot module"
|
||||
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/borg/sight/thermal(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/lasercannon/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/laser/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src)
|
||||
src.modules += new /obj/item/borg/combat/shield(src)
|
||||
src.modules += new /obj/item/borg/combat/mobility(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src) //Is a combat android really going to be stopped by a chair?
|
||||
src.emag = new /obj/item/weapon/gun/energy/pulse_rifle/cyborg(src)
|
||||
src.emag = new /obj/item/weapon/gun/energy/lasercannon/cyborg(src)
|
||||
return
|
||||
@@ -24,14 +24,15 @@
|
||||
|
||||
/obj/item/borg/upgrade/reset/action(var/mob/living/silicon/robot/R)
|
||||
R.uneq_all()
|
||||
R.hands.icon_state = "nomod"
|
||||
R.icon_state = "robot"
|
||||
del(R.module)
|
||||
R.module = null
|
||||
R.modtype = "robot"
|
||||
R.real_name = "Cyborg [R.ident]"
|
||||
R.name = R.real_name
|
||||
R.nopush = 0
|
||||
R.hands.icon_state = "nomod"
|
||||
R.base_icon = "robot"
|
||||
R.icon_state = "robot"
|
||||
R.updateicon()
|
||||
|
||||
return 1
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
if(hud_used) del(hud_used) //remove the hud objects
|
||||
hud_used = new /datum/hud(src)
|
||||
|
||||
next_move = 1
|
||||
last_click = world.time
|
||||
sight |= SEE_SELF
|
||||
..()
|
||||
|
||||
|
||||
@@ -900,9 +900,9 @@ mob/verb/yank_out_object()
|
||||
set desc = "Remove an embedded item at the cost of bleeding and pain."
|
||||
set src in view(1)
|
||||
|
||||
if(!isliving(usr) || usr.next_move > world.time)
|
||||
if(!isliving(usr) || usr.last_click + usr.click_delay < world.time)
|
||||
return
|
||||
usr.next_move = world.time + 20
|
||||
usr.delay_click(20)
|
||||
|
||||
if(usr.stat == 1)
|
||||
usr << "You are unconcious and cannot do that!"
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
var/sdisabilities = 0 //Carbon
|
||||
var/disabilities = 0 //Carbon
|
||||
var/atom/movable/pulling = null
|
||||
var/next_move = null
|
||||
var/prev_move = null
|
||||
var/last_click = null
|
||||
var/click_delay = 0
|
||||
var/monkeyizing = null //Carbon
|
||||
var/other = 0.0
|
||||
var/hand = null
|
||||
@@ -69,6 +69,7 @@
|
||||
var/flavor_text = ""
|
||||
var/med_record = ""
|
||||
var/sec_record = ""
|
||||
var/gen_record = ""
|
||||
var/blinded = null
|
||||
var/bhunger = 0 //Carbon
|
||||
var/ajourn = 0
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
return
|
||||
if(killing)
|
||||
return
|
||||
if (assailant.next_move > world.time)
|
||||
if (assailant.last_click + assailant.click_delay < world.time)
|
||||
return
|
||||
if ((!( assailant.canmove ) || assailant.lying))
|
||||
//SN src = null
|
||||
@@ -140,7 +140,7 @@
|
||||
if (!( killing ))
|
||||
assailant.visible_message("\red [assailant] has temporarily tightened \his grip on [affecting]!")
|
||||
//Foreach goto(97)
|
||||
assailant.next_move = world.time + 10
|
||||
assailant.delay_click(10)
|
||||
//affecting.stunned = max(2, affecting.stunned)
|
||||
//affecting.paralysis = max(1, affecting.paralysis)
|
||||
affecting.losebreath = min(affecting.losebreath + 1, 3)
|
||||
@@ -235,7 +235,7 @@
|
||||
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
|
||||
log_attack("<font color='red'>[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
|
||||
|
||||
assailant.next_move = world.time + 10
|
||||
assailant.delay_click(10)
|
||||
affecting.losebreath += 1
|
||||
else
|
||||
assailant.visible_message("\red [assailant] was unable to tighten \his grip on [affecting]'s neck!")
|
||||
|
||||
@@ -454,3 +454,7 @@ var/list/intents = list("help","disarm","grab","hurt")
|
||||
hud_used.action_intent.icon_state = "harm"
|
||||
else
|
||||
hud_used.action_intent.icon_state = "help"
|
||||
|
||||
/mob/proc/delay_click(var/delay)
|
||||
src.click_delay = max(src.click_delay, delay)
|
||||
return src.click_delay
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
src << "\blue Now teleporting."
|
||||
observer.loc = O.loc
|
||||
if(client.prefs.be_random_name)
|
||||
client.prefs.real_name = random_name()
|
||||
client.prefs.real_name = random_name(client.prefs.gender)
|
||||
observer.real_name = client.prefs.real_name
|
||||
observer.name = observer.real_name
|
||||
observer.key = key
|
||||
@@ -377,7 +377,7 @@
|
||||
|
||||
if(ticker.random_players)
|
||||
new_character.gender = pick(MALE, FEMALE)
|
||||
client.prefs.real_name = random_name()
|
||||
client.prefs.real_name = random_name(new_character.gender)
|
||||
client.prefs.randomize_appearance_for(new_character)
|
||||
else
|
||||
client.prefs.copy_to(new_character)
|
||||
|
||||
@@ -600,9 +600,9 @@
|
||||
set name = "Resist"
|
||||
set category = "IC"
|
||||
|
||||
if(!isliving(usr) || usr.next_move > world.time)
|
||||
if(!isliving(usr) || usr.last_click + usr.click_delay < world.time)
|
||||
return
|
||||
usr.next_move = world.time + 20
|
||||
usr.delay_click(20)
|
||||
|
||||
var/mob/living/L = usr
|
||||
|
||||
@@ -639,7 +639,7 @@
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
if( C.handcuffed )
|
||||
C.next_move = world.time + 100
|
||||
C.delay_click(100)
|
||||
C.last_special = world.time + 100
|
||||
C << "\red You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)"
|
||||
for(var/mob/O in viewers(L))
|
||||
@@ -673,7 +673,7 @@
|
||||
// breakout_time++ //Harder to get out of welded lockers than locked lockers
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
usr.next_move = world.time + 100
|
||||
usr.delay_click(100)
|
||||
L.last_special = world.time + 100
|
||||
L << "\red You lean on the back of \the [C] and start pushing the door open. (this will take about [breakout_time] minutes)"
|
||||
for(var/mob/O in viewers(usr.loc))
|
||||
@@ -726,7 +726,7 @@
|
||||
else if(iscarbon(L))
|
||||
var/mob/living/carbon/CM = L
|
||||
if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
|
||||
CM.next_move = world.time + 100
|
||||
CM.delay_click(100)
|
||||
CM.last_special = world.time + 100
|
||||
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
|
||||
usr << "\red You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)"
|
||||
@@ -764,7 +764,7 @@
|
||||
CM.handcuffed = null
|
||||
CM.update_inv_handcuffed()
|
||||
else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time))
|
||||
CM.next_move = world.time + 100
|
||||
CM.delay_click(100)
|
||||
CM.last_special = world.time + 100
|
||||
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
|
||||
usr << "\red You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)"
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
in_chamber.loc = get_turf(user)
|
||||
in_chamber.starting = get_turf(user)
|
||||
in_chamber.shot_from = src
|
||||
user.next_move = world.time + 4
|
||||
usr.delay_click(4)
|
||||
in_chamber.silenced = silenced
|
||||
in_chamber.current = curloc
|
||||
in_chamber.yo = targloc.y - curloc.y
|
||||
|
||||
Reference in New Issue
Block a user