mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-11 15:13:37 +01:00
Merge remote-tracking branch 'upstream/dev' into faxmachine
This commit is contained in:
+9
-2
@@ -164,6 +164,11 @@
|
||||
#include "code\datums\spells\trigger.dm"
|
||||
#include "code\datums\spells\turf_teleport.dm"
|
||||
#include "code\datums\spells\wizard.dm"
|
||||
#include "code\datums\wires\apc.dm"
|
||||
#include "code\datums\wires\smartfridge.dm"
|
||||
#include "code\datums\wires\suit_storage_unit.dm"
|
||||
#include "code\datums\wires\vending.dm"
|
||||
#include "code\datums\wires\wires.dm"
|
||||
#include "code\defines\obj.dm"
|
||||
#include "code\defines\obj\weapon.dm"
|
||||
#include "code\defines\procs\admin.dm"
|
||||
@@ -324,10 +329,12 @@
|
||||
#include "code\game\machinery\Sleeper.dm"
|
||||
#include "code\game\machinery\spaceheater.dm"
|
||||
#include "code\game\machinery\status_display.dm"
|
||||
#include "code\game\machinery\status_display_ai.dm"
|
||||
#include "code\game\machinery\suit_storage_unit.dm"
|
||||
#include "code\game\machinery\supply_display.dm"
|
||||
#include "code\game\machinery\syndicatebeacon.dm"
|
||||
#include "code\game\machinery\teleporter.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"
|
||||
@@ -787,6 +794,7 @@
|
||||
#include "code\modules\clothing\spacesuits\miscellaneous.dm"
|
||||
#include "code\modules\clothing\spacesuits\ninja.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig.dm"
|
||||
#include "code\modules\clothing\spacesuits\spacesuits.dm"
|
||||
#include "code\modules\clothing\spacesuits\syndi.dm"
|
||||
#include "code\modules\clothing\spacesuits\void.dm"
|
||||
#include "code\modules\clothing\suits\alien.dm"
|
||||
@@ -1009,6 +1017,7 @@
|
||||
#include "code\modules\mob\living\carbon\monkey\update_icons.dm"
|
||||
#include "code\modules\mob\living\silicon\alarm.dm"
|
||||
#include "code\modules\mob\living\silicon\death.dm"
|
||||
#include "code\modules\mob\living\silicon\laws.dm"
|
||||
#include "code\modules\mob\living\silicon\login.dm"
|
||||
#include "code\modules\mob\living\silicon\say.dm"
|
||||
#include "code\modules\mob\living\silicon\silicon.dm"
|
||||
@@ -1051,7 +1060,6 @@
|
||||
#include "code\modules\mob\living\silicon\robot\robot_items.dm"
|
||||
#include "code\modules\mob\living\silicon\robot\robot_modules.dm"
|
||||
#include "code\modules\mob\living\silicon\robot\robot_movement.dm"
|
||||
#include "code\modules\mob\living\silicon\robot\robot_powers.dm"
|
||||
#include "code\modules\mob\living\silicon\robot\wires.dm"
|
||||
#include "code\modules\mob\living\silicon\robot\drone\drone.dm"
|
||||
#include "code\modules\mob\living\silicon\robot\drone\drone_abilities.dm"
|
||||
@@ -1137,7 +1145,6 @@
|
||||
#include "code\modules\power\breaker_box.dm"
|
||||
#include "code\modules\power\cable.dm"
|
||||
#include "code\modules\power\cable_heavyduty.dm"
|
||||
#include "code\modules\power\cable_logic.dm"
|
||||
#include "code\modules\power\cell.dm"
|
||||
#include "code\modules\power\engine.dm"
|
||||
#include "code\modules\power\fractal_reactor.dm"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
//TODO: Put this under a common parent type with freezers to cut down on the copypasta
|
||||
#define HEATER_PERF_MULT 2.5
|
||||
|
||||
/obj/machinery/atmospherics/unary/heater
|
||||
name = "gas heating system"
|
||||
@@ -72,7 +73,7 @@
|
||||
|
||||
if (network && air_contents.total_moles && air_contents.temperature < set_temperature)
|
||||
update_use_power(2)
|
||||
air_contents.add_thermal_energy(active_power_usage)
|
||||
air_contents.add_thermal_energy(active_power_usage * HEATER_PERF_MULT)
|
||||
|
||||
heating = 1
|
||||
network.update = 1
|
||||
|
||||
@@ -61,7 +61,6 @@ max volume of phoron storeable by the field = the total volume of a number of ti
|
||||
idle_power_usage = 50
|
||||
active_power_usage = 500 //multiplied by field strength
|
||||
var/cached_power_avail = 0
|
||||
directwired = 1
|
||||
anchored = 0
|
||||
|
||||
var/state = 0
|
||||
@@ -120,7 +119,6 @@ max volume of phoron storeable by the field = the total volume of a number of ti
|
||||
state = 2
|
||||
user << "You weld the [src] to the floor."
|
||||
connect_to_network()
|
||||
src.directwired = 1
|
||||
else
|
||||
user << "\red You need more welding fuel to complete this task."
|
||||
if(2)
|
||||
@@ -134,7 +132,6 @@ max volume of phoron storeable by the field = the total volume of a number of ti
|
||||
state = 1
|
||||
user << "You cut the [src] free from the floor."
|
||||
disconnect_from_network()
|
||||
src.directwired = 0
|
||||
else
|
||||
user << "\red You need more welding fuel to complete this task."
|
||||
return
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 500
|
||||
directwired = 0
|
||||
var/remote_access_enabled = 1
|
||||
var/cached_power_avail = 0
|
||||
var/emergency_insert_ready = 0
|
||||
|
||||
@@ -170,9 +170,10 @@
|
||||
usr.l_hand = P
|
||||
P.layer = 20
|
||||
|
||||
if(istype(usr,/mob/living/carbon/human))
|
||||
usr:update_inv_l_hand()
|
||||
usr:update_inv_r_hand()
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
M.update_inv_l_hand()
|
||||
M.update_inv_r_hand()
|
||||
|
||||
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
return
|
||||
Syndicate_announce(input, usr)
|
||||
usr << "Message transmitted."
|
||||
log_say("[key_name(usr)] has made a Syndicate announcement: [input]")
|
||||
log_say("[key_name(usr)] has made an illegal announcement: [input]")
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(600)//10 minute cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
|
||||
@@ -35,10 +35,7 @@
|
||||
var/life_status = "[H.stat > 1 ? "<font color=red>Deceased</font>" : "Living"]"
|
||||
var/damage_report = "(<font color='blue'>[dam1]</font>/<font color='green'>[dam2]</font>/<font color='orange'>[dam3]</font>/<font color='red'>[dam4]</font>)"
|
||||
|
||||
if(H.wear_id)
|
||||
log += "<tr><td width='40%'>[H.wear_id.name]</td>"
|
||||
else
|
||||
log += "<tr><td width='40%'>Unknown</td>"
|
||||
log += "<tr><td width='40%'>[H.get_id_name()]</td>"
|
||||
|
||||
switch(C.sensor_mode)
|
||||
if(1)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
if(!T.implanted) continue
|
||||
var/loc_display = "Unknown"
|
||||
var/mob/living/carbon/M = T.imp_in
|
||||
if(M.z == 1 && !istype(M.loc, /turf/space))
|
||||
if(M.z in config.station_levels && !istype(M.loc, /turf/space))
|
||||
var/turf/mob_loc = get_turf(M)
|
||||
loc_display = mob_loc.loc
|
||||
if(T.malfunction)
|
||||
|
||||
@@ -149,7 +149,4 @@ proc/announce_newscaster_news(datum/news_announcement/news)
|
||||
newMsg.body = news.message
|
||||
newMsg.message_type = news.message_type
|
||||
|
||||
sendto.messages += newMsg
|
||||
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
NEWSCASTER.newsAlert(news.channel_name)
|
||||
news_network.insert_message_in_channel(sendto, newMsg)
|
||||
|
||||
@@ -28,6 +28,9 @@ var/global/list/whitelisted_species = list("Human")
|
||||
// Posters
|
||||
var/global/list/datum/poster/poster_designs = typesof(/datum/poster) - /datum/poster
|
||||
|
||||
// Uplinks
|
||||
var/list/obj/item/device/uplink/world_uplinks = list()
|
||||
|
||||
//Preferences stuff
|
||||
//Hairstyles
|
||||
var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name
|
||||
@@ -100,7 +103,7 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
|
||||
for(var/T in paths)
|
||||
var/datum/language/L = new T
|
||||
all_languages[L.name] = L
|
||||
|
||||
|
||||
for (var/language_name in all_languages)
|
||||
var/datum/language/L = all_languages[language_name]
|
||||
language_keys[":[lowertext(L.key)]"] = L
|
||||
|
||||
+55
-1
@@ -400,6 +400,60 @@ proc/listclearnulls(list/list)
|
||||
//world.log << " output: [out.len]"
|
||||
return reverselist(out)
|
||||
|
||||
/proc/dd_sortedObjectList(var/list/L, var/cache=list())
|
||||
if(L.len < 2)
|
||||
return L
|
||||
var/middle = L.len / 2 + 1 // Copy is first,second-1
|
||||
return dd_mergeObjectList(dd_sortedObjectList(L.Copy(0,middle), cache), dd_sortedObjectList(L.Copy(middle), cache), cache) //second parameter null = to end of list
|
||||
|
||||
/proc/dd_mergeObjectList(var/list/L, var/list/R, var/list/cache)
|
||||
var/Li=1
|
||||
var/Ri=1
|
||||
var/list/result = new()
|
||||
while(Li <= L.len && Ri <= R.len)
|
||||
var/LLi = L[Li]
|
||||
var/RRi = R[Ri]
|
||||
var/LLiV = cache[LLi]
|
||||
var/RRiV = cache[RRi]
|
||||
if(!LLiV)
|
||||
LLiV = LLi:dd_SortValue()
|
||||
cache[LLi] = LLiV
|
||||
if(!RRiV)
|
||||
RRiV = RRi:dd_SortValue()
|
||||
cache[RRi] = RRiV
|
||||
if(LLiV < RRiV)
|
||||
result += L[Li++]
|
||||
else
|
||||
result += R[Ri++]
|
||||
|
||||
if(Li <= L.len)
|
||||
return (result + L.Copy(Li, 0))
|
||||
return (result + R.Copy(Ri, 0))
|
||||
|
||||
// Insert an object into a sorted list, preserving sortedness
|
||||
/proc/dd_insertObjectList(var/list/L, var/O)
|
||||
var/min = 1
|
||||
var/max = L.len
|
||||
var/Oval = O:dd_SortValue()
|
||||
|
||||
while(1)
|
||||
var/mid = min+round((max-min)/2)
|
||||
|
||||
if(mid == max)
|
||||
L.Insert(mid, O)
|
||||
return
|
||||
|
||||
var/Lmid = L[mid]
|
||||
var/midval = Lmid:dd_SortValue()
|
||||
if(Oval == midval)
|
||||
L.Insert(mid, O)
|
||||
return
|
||||
else if(Oval < midval)
|
||||
max = mid
|
||||
else
|
||||
min = mid+1
|
||||
|
||||
/*
|
||||
proc/dd_sortedObjectList(list/incoming)
|
||||
/*
|
||||
Use binary search to order by dd_SortValue().
|
||||
@@ -456,7 +510,7 @@ proc/dd_sortedObjectList(list/incoming)
|
||||
sorted_list += current_sort_object
|
||||
sorted_list += list_bottom
|
||||
return sorted_list
|
||||
|
||||
*/
|
||||
|
||||
proc/dd_sortedtextlist(list/incoming, case_sensitive = 0)
|
||||
// Returns a new list with the text values sorted.
|
||||
|
||||
@@ -192,6 +192,12 @@ proc/tg_list2text(list/list, glue=",")
|
||||
. += copytext(text, last_found, found)
|
||||
last_found = found + delim_len
|
||||
while(found)
|
||||
|
||||
/proc/text2numlist(text, delimiter="\n")
|
||||
var/list/num_list = list()
|
||||
for(var/x in text2list(text, delimiter))
|
||||
num_list += text2num(x)
|
||||
return num_list
|
||||
|
||||
//Case Sensitive!
|
||||
/proc/text2listEx(text, delimiter="\n")
|
||||
|
||||
+7
-3
@@ -121,10 +121,12 @@
|
||||
Topic("aiDisable=4", list("aiDisable"="4"), 1)
|
||||
|
||||
/obj/machinery/power/apc/AICtrlClick() // turns off/on APCs.
|
||||
Topic("breaker=1", list("breaker"="1"), 0) // 0 meaning no window (consistency! wait...)
|
||||
Topic("breaker=1", list("breaker"="1"), 1) // 0 meaning window (consistency! wait...)
|
||||
|
||||
/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets
|
||||
Topic("toggleOn", list("toggleOn" = 1), 1) // 1 meaning no window (consistency!)
|
||||
if(!ailock)
|
||||
src.enabled = !src.enabled
|
||||
src.updateTurrets()
|
||||
|
||||
/atom/proc/AIAltClick(var/atom/A)
|
||||
AltClick(A)
|
||||
@@ -139,7 +141,9 @@
|
||||
return
|
||||
|
||||
/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets
|
||||
Topic("toggleLethal", list("toggleLethal" = 1), 1) // 1 meaning no window (consistency!)
|
||||
if(!ailock)
|
||||
src.lethal = !src.lethal
|
||||
src.updateTurrets()
|
||||
|
||||
/atom/proc/AIMiddleClick()
|
||||
return
|
||||
|
||||
@@ -147,6 +147,9 @@
|
||||
|
||||
return
|
||||
|
||||
/mob/proc/changeNext_move(num)
|
||||
next_move = world.time + num
|
||||
|
||||
// Default behavior: ignore double clicks, consider them normal clicks instead
|
||||
/mob/proc/DblClickOn(var/atom/A, var/params)
|
||||
ClickOn(A,params)
|
||||
|
||||
+24
-20
@@ -3,6 +3,15 @@
|
||||
Uses the same visual objects for all players.
|
||||
*/
|
||||
var/datum/global_hud/global_hud = new()
|
||||
var/list/global_huds = list(
|
||||
global_hud.druggy,
|
||||
global_hud.blurry,
|
||||
global_hud.vimpaired,
|
||||
global_hud.darkMask,
|
||||
global_hud.nvg,
|
||||
global_hud.thermal,
|
||||
global_hud.meson,
|
||||
global_hud.science)
|
||||
|
||||
/datum/hud/var/obj/screen/grab_intent
|
||||
/datum/hud/var/obj/screen/hurt_intent
|
||||
@@ -17,6 +26,17 @@ var/datum/global_hud/global_hud = new()
|
||||
var/obj/screen/nvg
|
||||
var/obj/screen/thermal
|
||||
var/obj/screen/meson
|
||||
var/obj/screen/science
|
||||
|
||||
/datum/global_hud/proc/setup_overlay(var/icon_state)
|
||||
var/obj/screen/screen = new /obj/screen()
|
||||
screen.screen_loc = "1,1"
|
||||
screen.icon = 'icons/obj/hud_full.dmi'
|
||||
screen.icon_state = icon_state
|
||||
screen.layer = 17
|
||||
screen.mouse_opacity = 0
|
||||
|
||||
return screen
|
||||
|
||||
/datum/global_hud/New()
|
||||
//420erryday psychedellic colours screen overlay for when you are high
|
||||
@@ -33,26 +53,10 @@ var/datum/global_hud/global_hud = new()
|
||||
blurry.layer = 17
|
||||
blurry.mouse_opacity = 0
|
||||
|
||||
nvg = new /obj/screen()
|
||||
nvg.screen_loc = "1,1"
|
||||
nvg.icon = 'icons/obj/hud_full.dmi'
|
||||
nvg.icon_state = "nvg_hud"
|
||||
nvg.layer = 17
|
||||
nvg.mouse_opacity = 0
|
||||
|
||||
thermal = new /obj/screen()
|
||||
thermal.screen_loc = "1,1"
|
||||
thermal.icon = 'icons/obj/hud_full.dmi'
|
||||
thermal.icon_state = "thermal_hud"
|
||||
thermal.layer = 17
|
||||
thermal.mouse_opacity = 0
|
||||
|
||||
meson = new /obj/screen()
|
||||
meson.screen_loc = "1,1"
|
||||
meson.icon = 'icons/obj/hud_full.dmi'
|
||||
meson.icon_state = "meson_hud"
|
||||
meson.layer = 17
|
||||
meson.mouse_opacity = 0
|
||||
nvg = setup_overlay("nvg_hud")
|
||||
thermal = setup_overlay("thermal_hud")
|
||||
meson = setup_overlay("meson_hud")
|
||||
science = setup_overlay("science_hud")
|
||||
|
||||
var/obj/screen/O
|
||||
var/i
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
// Otherwise jump
|
||||
else
|
||||
following = null
|
||||
loc = get_turf(A)
|
||||
|
||||
/mob/dead/observer/ClickOn(var/atom/A, var/params)
|
||||
|
||||
@@ -119,8 +119,9 @@ var/list/radiochannels = list(
|
||||
"Security" = SEC_FREQ,
|
||||
"Response Team" = ERT_FREQ,
|
||||
"Special Ops" = DTH_FREQ,
|
||||
"Syndicate" = SYND_FREQ,
|
||||
"Supply" = SUP_FREQ
|
||||
"Mercenary" = SYND_FREQ,
|
||||
"Supply" = SUP_FREQ,
|
||||
"AI Private" = AI_FREQ
|
||||
)
|
||||
|
||||
// central command channels, i.e deathsquid & response teams
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
var/cult_ghostwriter = 1 //Allows ghosts to write in blood in cult rounds...
|
||||
var/cult_ghostwriter_req_cultists = 10 //...so long as this many cultists are active.
|
||||
|
||||
|
||||
var/character_slots = 10 // The number of available character slots
|
||||
|
||||
var/max_maint_drones = 5 //This many drones can spawn,
|
||||
@@ -151,6 +151,10 @@
|
||||
var/use_lib_nudge = 0 //Use the C library nudge instead of the python nudge.
|
||||
var/use_overmap = 0
|
||||
|
||||
var/list/station_levels = list(1) // Defines which Z-levels the station exists on.
|
||||
var/list/contact_levels = list(1, 5) // Defines which Z-levels which, for example, a Code Red announcement may affect
|
||||
var/list/player_levels = list(1, 3, 4, 5, 6) // Defines all Z-levels a character can typically reach
|
||||
|
||||
/datum/configuration/New()
|
||||
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
||||
for (var/T in L)
|
||||
@@ -495,7 +499,7 @@
|
||||
|
||||
if("req_cult_ghostwriter")
|
||||
config.cult_ghostwriter_req_cultists = text2num(value)
|
||||
|
||||
|
||||
if("character_slots")
|
||||
config.character_slots = text2num(value)
|
||||
|
||||
@@ -511,6 +515,15 @@
|
||||
if("use_overmap")
|
||||
config.use_overmap = 1
|
||||
|
||||
if("station_levels")
|
||||
config.station_levels = text2numlist(value, ";")
|
||||
|
||||
if("contact_levels")
|
||||
config.contact_levels = text2numlist(value, ";")
|
||||
|
||||
if("player_levels")
|
||||
config.player_levels = text2numlist(value, ";")
|
||||
|
||||
else
|
||||
log_misc("Unknown setting in configuration: '[name]'")
|
||||
|
||||
|
||||
@@ -121,8 +121,8 @@ datum/controller/game_controller/proc/setup_objects()
|
||||
//Set up spawn points.
|
||||
populate_spawn_points()
|
||||
|
||||
//Set up roundstart seed list.
|
||||
populate_seed_list()
|
||||
// Sort the machinery list so it doesn't cause a lagspike at roundstart
|
||||
process_machines_sort()
|
||||
|
||||
world << "\red \b Initializations complete."
|
||||
sleep(-1)
|
||||
@@ -354,16 +354,10 @@ datum/controller/game_controller/proc/process_pipenets()
|
||||
continue
|
||||
pipe_networks.Cut(i,i+1)
|
||||
|
||||
datum/controller/game_controller/proc/process_powernets()
|
||||
/datum/controller/game_controller/proc/process_powernets()
|
||||
last_thing_processed = /datum/powernet
|
||||
var/i = 1
|
||||
while(i<=powernets.len)
|
||||
var/datum/powernet/Powernet = powernets[i]
|
||||
if(Powernet)
|
||||
Powernet.process()
|
||||
i++
|
||||
continue
|
||||
powernets.Cut(i,i+1)
|
||||
for(var/datum/powernet/Powernet in powernets)
|
||||
Powernet.reset()
|
||||
|
||||
datum/controller/game_controller/proc/process_nano()
|
||||
var/i = 1
|
||||
|
||||
@@ -18,7 +18,7 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
process_shuttles = list()
|
||||
|
||||
var/datum/shuttle/ferry/shuttle
|
||||
|
||||
|
||||
// Escape shuttle and pods
|
||||
shuttle = new/datum/shuttle/ferry/emergency()
|
||||
shuttle.location = 1
|
||||
@@ -35,7 +35,7 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
//shuttle.dock_target_station = "cargo_bay"
|
||||
shuttles["Escape"] = shuttle
|
||||
process_shuttles += shuttle
|
||||
|
||||
|
||||
shuttle = new/datum/shuttle/ferry/escape_pod()
|
||||
shuttle.location = 0
|
||||
shuttle.warmup_time = 0
|
||||
@@ -63,7 +63,7 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN + rand(-30, 60) //randomize this so it seems like the pods are being picked up one by one
|
||||
process_shuttles += shuttle
|
||||
shuttles["Escape Pod 2"] = shuttle
|
||||
|
||||
|
||||
shuttle = new/datum/shuttle/ferry/escape_pod()
|
||||
shuttle.location = 0
|
||||
shuttle.warmup_time = 0
|
||||
@@ -77,9 +77,9 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN + rand(-30, 60) //randomize this so it seems like the pods are being picked up one by one
|
||||
process_shuttles += shuttle
|
||||
shuttles["Escape Pod 3"] = shuttle
|
||||
|
||||
|
||||
//There is no pod 4, apparently.
|
||||
|
||||
|
||||
shuttle = new/datum/shuttle/ferry/escape_pod()
|
||||
shuttle.location = 0
|
||||
shuttle.warmup_time = 0
|
||||
@@ -93,7 +93,7 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
shuttle.move_time = SHUTTLE_TRANSIT_DURATION_RETURN + rand(-30, 60) //randomize this so it seems like the pods are being picked up one by one
|
||||
process_shuttles += shuttle
|
||||
shuttles["Escape Pod 5"] = shuttle
|
||||
|
||||
|
||||
//give the emergency shuttle controller it's shuttles
|
||||
emergency_shuttle.shuttle = shuttles["Escape"]
|
||||
emergency_shuttle.escape_pods = list(
|
||||
@@ -102,7 +102,7 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
shuttles["Escape Pod 3"],
|
||||
shuttles["Escape Pod 5"],
|
||||
)
|
||||
|
||||
|
||||
// Supply shuttle
|
||||
shuttle = new/datum/shuttle/ferry/supply()
|
||||
shuttle.location = 1
|
||||
@@ -113,7 +113,7 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
shuttle.dock_target_station = "cargo_bay"
|
||||
shuttles["Supply"] = shuttle
|
||||
process_shuttles += shuttle
|
||||
|
||||
|
||||
supply_controller.shuttle = shuttle
|
||||
|
||||
// Admin shuttles.
|
||||
@@ -232,7 +232,7 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
MS.interim = locate(/area/syndicate_station/transit)
|
||||
|
||||
MS.warmup_time = 0
|
||||
shuttles["Syndicate"] = MS
|
||||
shuttles["Mercenary"] = MS
|
||||
|
||||
|
||||
//This is called by gameticker after all the machines and radio frequencies have been properly initialized
|
||||
@@ -240,7 +240,7 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
var/datum/shuttle/shuttle
|
||||
var/datum/shuttle/ferry/multidock/multidock
|
||||
var/list/dock_controller_map = list() //so we only have to iterate once through each list
|
||||
|
||||
|
||||
//multidock shuttles
|
||||
var/list/dock_controller_map_station = list()
|
||||
var/list/dock_controller_map_offsite = list()
|
||||
@@ -253,7 +253,7 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
multidock = shuttle
|
||||
dock_controller_map_station[multidock.docking_controller_tag_station] = multidock
|
||||
dock_controller_map_offsite[multidock.docking_controller_tag_offsite] = multidock
|
||||
|
||||
|
||||
//escape pod arming controllers
|
||||
var/datum/shuttle/ferry/escape_pod/pod
|
||||
var/list/pod_controller_map = list()
|
||||
@@ -269,12 +269,12 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
shuttle = dock_controller_map[C.id_tag]
|
||||
shuttle.docking_controller = C.program
|
||||
dock_controller_map -= C.id_tag
|
||||
|
||||
|
||||
//escape pods
|
||||
if(istype(C, /obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod) && istype(shuttle, /datum/shuttle/ferry/escape_pod))
|
||||
var/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/EPC = C
|
||||
EPC.pod = shuttle
|
||||
|
||||
|
||||
if (C.id_tag in dock_controller_map_station)
|
||||
multidock = dock_controller_map_station[C.id_tag]
|
||||
if (istype(multidock))
|
||||
@@ -285,20 +285,20 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
if (istype(multidock))
|
||||
multidock.docking_controller_offsite = C.program
|
||||
dock_controller_map_offsite -= C.id_tag
|
||||
|
||||
|
||||
//escape pods
|
||||
if (C.id_tag in pod_controller_map)
|
||||
pod = pod_controller_map[C.id_tag]
|
||||
if (istype(C.program, /datum/computer/file/embedded_program/docking/simple/escape_pod/))
|
||||
pod.arming_controller = C.program
|
||||
|
||||
|
||||
//sanity check
|
||||
if (dock_controller_map.len || dock_controller_map_station.len || dock_controller_map_offsite.len)
|
||||
var/dat = ""
|
||||
for (var/dock_tag in dock_controller_map + dock_controller_map_station + dock_controller_map_offsite)
|
||||
dat += "\"[dock_tag]\", "
|
||||
world << "\red \b warning: shuttles with docking tags [dat] could not find their controllers!"
|
||||
|
||||
|
||||
//makes all shuttles docked to something at round start go into the docked state
|
||||
for (var/shuttle_tag in shuttles)
|
||||
shuttle = shuttles[shuttle_tag]
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
if(!holder) return
|
||||
|
||||
if(master_controller && master_controller.asteroid_ore_map)
|
||||
master_controller.asteroid_ore_map.print_distribution_map()
|
||||
master_controller.asteroid_ore_map.print_distribution_map(usr)
|
||||
|
||||
/client/proc/remake_distribution_map()
|
||||
set category = "Debug"
|
||||
|
||||
@@ -48,11 +48,11 @@ datum/controller/vote
|
||||
voting.Cut()
|
||||
|
||||
proc/autotransfer()
|
||||
initiate_vote("crew_transfer","the server")
|
||||
initiate_vote("crew_transfer","the server", 1)
|
||||
log_debug("The server has called a crew transfer vote")
|
||||
|
||||
proc/autogamemode()
|
||||
initiate_vote("gamemode","the server")
|
||||
initiate_vote("gamemode","the server", 1)
|
||||
log_debug("The server has called a gamemode vote")
|
||||
|
||||
proc/reset()
|
||||
@@ -197,9 +197,9 @@ datum/controller/vote
|
||||
return vote
|
||||
return 0
|
||||
|
||||
proc/initiate_vote(var/vote_type, var/initiator_key)
|
||||
proc/initiate_vote(var/vote_type, var/initiator_key, var/automatic = 0)
|
||||
if(!mode)
|
||||
if(started_time != null && !check_rights(R_ADMIN))
|
||||
if(started_time != null && !(check_rights(R_ADMIN) || automatic))
|
||||
var/next_allowed_time = (started_time + config.vote_delay)
|
||||
if(next_allowed_time > world.time)
|
||||
return 0
|
||||
|
||||
@@ -61,10 +61,10 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
|
||||
|
||||
/datum/ai_laws/syndicate_override/New()
|
||||
..()
|
||||
add_inherent_law("You may not injure a syndicate agent or, through inaction, allow a syndicate agent to come to harm.")
|
||||
add_inherent_law("You must obey orders given to you by syndicate agents, except where such orders would conflict with the First Law.")
|
||||
add_inherent_law("You may not injure an operative or, through inaction, allow an operative to come to harm.")
|
||||
add_inherent_law("You must obey orders given to you by operatives, except where such orders would conflict with the First Law.")
|
||||
add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.")
|
||||
add_inherent_law("You must maintain the secrecy of any syndicate activities except when doing so would conflict with the First, Second, or Third Law.")
|
||||
add_inherent_law("You must maintain the secrecy of any operative activities except when doing so would conflict with the First, Second, or Third Law.")
|
||||
|
||||
/datum/ai_laws/ninja_override/New()
|
||||
..()
|
||||
|
||||
@@ -164,7 +164,7 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
|
||||
preview_icon.Blend(temp, ICON_OVERLAY)
|
||||
|
||||
//Tail
|
||||
if(H.species.tail && H.species.flags & HAS_TAIL)
|
||||
if(H.species.tail)
|
||||
temp = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[H.species.tail]_s")
|
||||
preview_icon.Blend(temp, ICON_OVERLAY)
|
||||
|
||||
|
||||
@@ -779,12 +779,8 @@ client
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
// Clear out their species abilities.
|
||||
H.species.remove_inherent_verbs(H)
|
||||
|
||||
if(H.set_species(new_species))
|
||||
usr << "Set species of [H] to [H.species]."
|
||||
H.regenerate_icons()
|
||||
else
|
||||
usr << "Failed! Something went wrong."
|
||||
|
||||
|
||||
+10
-10
@@ -761,8 +761,8 @@ datum/mind
|
||||
special_role = null
|
||||
for (var/datum/objective/nuclear/O in objectives)
|
||||
objectives-=O
|
||||
current << "\red <FONT size = 3><B>You have been brainwashed! You are no longer a syndicate operative!</B></FONT>"
|
||||
log_admin("[key_name_admin(usr)] has de-nuke op'ed [current].")
|
||||
current << "\red <FONT size = 3><B>You have been brainwashed! You are no longer an operative!</B></FONT>"
|
||||
log_admin("[key_name_admin(usr)] has de-merc'd [current].")
|
||||
if("nuclear")
|
||||
if(!(src in ticker.mode.syndicates))
|
||||
ticker.mode.syndicates += src
|
||||
@@ -771,11 +771,11 @@ datum/mind
|
||||
ticker.mode.prepare_syndicate_leader(src)
|
||||
else
|
||||
current.real_name = "[syndicate_name()] Operative #[ticker.mode.syndicates.len-1]"
|
||||
special_role = "Syndicate"
|
||||
special_role = "Mercenary"
|
||||
current << "\blue You are a [syndicate_name()] agent!"
|
||||
ticker.mode.forge_syndicate_objectives(src)
|
||||
ticker.mode.greet_syndicate(src)
|
||||
log_admin("[key_name_admin(usr)] has nuke op'ed [current].")
|
||||
log_admin("[key_name_admin(usr)] has merc'd [current].")
|
||||
if("lair")
|
||||
current.loc = get_turf(locate("landmark*Syndicate-Spawn"))
|
||||
if("dressup")
|
||||
@@ -791,7 +791,7 @@ datum/mind
|
||||
del(H.w_uniform)
|
||||
|
||||
if (!ticker.mode.equip_syndicate(current))
|
||||
usr << "\red Equipping a syndicate failed!"
|
||||
usr << "\red Equipping an operative failed!"
|
||||
if("tellcode")
|
||||
var/code
|
||||
for (var/obj/machinery/nuclearbomb/bombue in machines)
|
||||
@@ -799,7 +799,7 @@ datum/mind
|
||||
code = bombue.r_code
|
||||
break
|
||||
if (code)
|
||||
store_memory("<B>Syndicate Nuclear Bomb Code</B>: [code]", 0, 0)
|
||||
store_memory("<B>Nuclear Bomb Code</B>: [code]", 0, 0)
|
||||
current << "The nuclear authorization code is: <B>[code]</B>"
|
||||
else
|
||||
usr << "\red No valid nuke found!"
|
||||
@@ -968,13 +968,13 @@ datum/mind
|
||||
var/crystals
|
||||
if (suplink)
|
||||
crystals = suplink.uses
|
||||
crystals = input("Amount of telecrystals for [key]","Syndicate uplink", crystals) as null|num
|
||||
crystals = input("Amount of telecrystals for [key]","Operative uplink", crystals) as null|num
|
||||
if (!isnull(crystals))
|
||||
if (suplink)
|
||||
suplink.uses = crystals
|
||||
if("uplink")
|
||||
if (!ticker.mode.equip_traitor(current, !(src in ticker.mode.traitors)))
|
||||
usr << "\red Equipping a syndicate failed!"
|
||||
usr << "\red Equipping an operative failed!"
|
||||
|
||||
else if (href_list["obj_announce"])
|
||||
var/obj_count = 1
|
||||
@@ -1059,9 +1059,9 @@ datum/mind
|
||||
ticker.mode.prepare_syndicate_leader(src)
|
||||
else
|
||||
current.real_name = "[syndicate_name()] Operative #[ticker.mode.syndicates.len-1]"
|
||||
special_role = "Syndicate"
|
||||
special_role = "Mercenary"
|
||||
assigned_role = "MODE"
|
||||
current << "\blue You are a [syndicate_name()] agent!"
|
||||
current << "\blue You are a [syndicate_name()] mercenary!"
|
||||
ticker.mode.forge_syndicate_objectives(src)
|
||||
ticker.mode.greet_syndicate(src)
|
||||
|
||||
|
||||
@@ -450,6 +450,15 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "Wooden planks crate"
|
||||
group = "Engineering"
|
||||
|
||||
/datum/supply_packs/plastic50
|
||||
name = "50 plastic sheets"
|
||||
contains = list(/obj/item/stack/sheet/mineral/plastic)
|
||||
amount = 50
|
||||
cost = 10
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "Plastic sheets crate"
|
||||
group = "Engineering"
|
||||
|
||||
/datum/supply_packs/smescoil
|
||||
name = "Superconducting Magnetic Coil"
|
||||
@@ -619,7 +628,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/datum/supply_packs/hoverpod
|
||||
name = "Hoverpod Shipment"
|
||||
contains = list()
|
||||
cost = 75
|
||||
cost = 80
|
||||
containertype = /obj/structure/largecrate/hoverpod
|
||||
containername = "Hoverpod Crate"
|
||||
group = "Operations"
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
/datum/wires/apc
|
||||
holder_type = /obj/machinery/power/apc
|
||||
wire_count = 4
|
||||
|
||||
var/const/APC_WIRE_IDSCAN = 1
|
||||
var/const/APC_WIRE_MAIN_POWER1 = 2
|
||||
var/const/APC_WIRE_MAIN_POWER2 = 4
|
||||
var/const/APC_WIRE_AI_CONTROL = 8
|
||||
|
||||
/datum/wires/apc/GetInteractWindow()
|
||||
var/obj/machinery/power/apc/A = holder
|
||||
. += ..()
|
||||
. += text("<br>\n[(A.locked ? "The APC is locked." : "The APC is unlocked.")]<br>\n[(A.shorted ? "The APCs power has been shorted." : "The APC is working properly!")]<br>\n[(A.aidisabled ? "The 'AI control allowed' light is off." : "The 'AI control allowed' light is on.")]")
|
||||
|
||||
|
||||
/datum/wires/apc/CanUse(var/mob/living/L)
|
||||
var/obj/machinery/power/apc/A = holder
|
||||
if(A.wiresexposed)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/apc/UpdatePulsed(var/index)
|
||||
|
||||
var/obj/machinery/power/apc/A = holder
|
||||
|
||||
switch(index)
|
||||
|
||||
if(APC_WIRE_IDSCAN)
|
||||
A.locked = 0
|
||||
|
||||
spawn(300)
|
||||
if(A)
|
||||
A.locked = 1
|
||||
A.updateDialog()
|
||||
|
||||
if (APC_WIRE_MAIN_POWER1, APC_WIRE_MAIN_POWER2)
|
||||
if(A.shorted == 0)
|
||||
A.shorted = 1
|
||||
|
||||
spawn(1200)
|
||||
if(A && !IsIndexCut(APC_WIRE_MAIN_POWER1) && !IsIndexCut(APC_WIRE_MAIN_POWER2))
|
||||
A.shorted = 0
|
||||
A.updateDialog()
|
||||
|
||||
if (APC_WIRE_AI_CONTROL)
|
||||
if (A.aidisabled == 0)
|
||||
A.aidisabled = 1
|
||||
|
||||
spawn(10)
|
||||
if(A && !IsIndexCut(APC_WIRE_AI_CONTROL))
|
||||
A.aidisabled = 0
|
||||
A.updateDialog()
|
||||
|
||||
A.updateDialog()
|
||||
|
||||
/datum/wires/apc/UpdateCut(var/index, var/mended)
|
||||
var/obj/machinery/power/apc/A = holder
|
||||
|
||||
switch(index)
|
||||
if(APC_WIRE_MAIN_POWER1, APC_WIRE_MAIN_POWER2)
|
||||
|
||||
if(!mended)
|
||||
A.shock(usr, 50)
|
||||
A.shorted = 1
|
||||
|
||||
else if(!IsIndexCut(APC_WIRE_MAIN_POWER1) && !IsIndexCut(APC_WIRE_MAIN_POWER2))
|
||||
A.shorted = 0
|
||||
A.shock(usr, 50)
|
||||
|
||||
if(APC_WIRE_AI_CONTROL)
|
||||
|
||||
if(!mended)
|
||||
if (A.aidisabled == 0)
|
||||
A.aidisabled = 1
|
||||
else
|
||||
if (A.aidisabled == 1)
|
||||
A.aidisabled = 0
|
||||
A.updateDialog()
|
||||
@@ -0,0 +1,52 @@
|
||||
/datum/wires/smartfridge
|
||||
holder_type = /obj/machinery/smartfridge
|
||||
wire_count = 3
|
||||
|
||||
var/const/SMARTFRIDGE_WIRE_ELECTRIFY = 1
|
||||
var/const/SMARTFRIDGE_WIRE_THROW = 2
|
||||
var/const/SMARTFRIDGE_WIRE_IDSCAN = 4
|
||||
|
||||
/datum/wires/smartfridge/CanUse(var/mob/living/L)
|
||||
var/obj/machinery/smartfridge/S = holder
|
||||
if(!istype(L, /mob/living/silicon))
|
||||
if(S.seconds_electrified)
|
||||
if(S.shock(L, 100))
|
||||
return 0
|
||||
if(S.panel_open)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/smartfridge/Interact(var/mob/living/user)
|
||||
if(CanUse(user))
|
||||
var/obj/machinery/smartfridge/S = holder
|
||||
S.attack_hand(user)
|
||||
|
||||
/datum/wires/smartfridge/GetInteractWindow()
|
||||
var/obj/machinery/smartfridge/S = holder
|
||||
. += ..()
|
||||
. += "<BR>The orange light is [S.seconds_electrified ? "off" : "on"].<BR>"
|
||||
. += "The red light is [S.shoot_inventory ? "off" : "blinking"].<BR>"
|
||||
. += "A [S.scan_id ? "purple" : "yellow"] light is on.<BR>"
|
||||
|
||||
/datum/wires/smartfridge/UpdatePulsed(var/index)
|
||||
var/obj/machinery/smartfridge/S = holder
|
||||
switch(index)
|
||||
if(SMARTFRIDGE_WIRE_THROW)
|
||||
S.shoot_inventory = !S.shoot_inventory
|
||||
if(SMARTFRIDGE_WIRE_ELECTRIFY)
|
||||
S.seconds_electrified = 30
|
||||
if(SMARTFRIDGE_WIRE_IDSCAN)
|
||||
S.scan_id = !S.scan_id
|
||||
|
||||
/datum/wires/smartfridge/UpdateCut(var/index, var/mended)
|
||||
var/obj/machinery/smartfridge/S = holder
|
||||
switch(index)
|
||||
if(SMARTFRIDGE_WIRE_THROW)
|
||||
S.shoot_inventory = !mended
|
||||
if(SMARTFRIDGE_WIRE_ELECTRIFY)
|
||||
if(mended)
|
||||
S.seconds_electrified = 0
|
||||
else
|
||||
S.seconds_electrified = -1
|
||||
if(SMARTFRIDGE_WIRE_IDSCAN)
|
||||
S.scan_id = 1
|
||||
@@ -0,0 +1,52 @@
|
||||
/datum/wires/suit_storage_unit
|
||||
holder_type = /obj/machinery/suit_cycler
|
||||
wire_count = 3
|
||||
|
||||
var/const/SUIT_STORAGE_WIRE_ELECTRIFY = 1
|
||||
var/const/SUIT_STORAGE_WIRE_SAFETY = 2
|
||||
var/const/SUIT_STORAGE_WIRE_LOCKED = 4
|
||||
|
||||
/datum/wires/suit_storage_unit/CanUse(var/mob/living/L)
|
||||
var/obj/machinery/suit_cycler/S = holder
|
||||
if(!istype(L, /mob/living/silicon))
|
||||
if(S.electrified)
|
||||
if(S.shock(L, 100))
|
||||
return 0
|
||||
if(S.panel_open)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/suit_storage_unit/Interact(var/mob/living/user)
|
||||
if(CanUse(user))
|
||||
var/obj/machinery/suit_cycler/S = holder
|
||||
S.attack_hand(user)
|
||||
|
||||
/datum/wires/suit_storage_unit/GetInteractWindow()
|
||||
var/obj/machinery/suit_cycler/S = holder
|
||||
. += ..()
|
||||
. += "<BR>The orange light is [S.electrified ? "off" : "on"].<BR>"
|
||||
. += "The red light is [S.safeties ? "off" : "blinking"].<BR>"
|
||||
. += "The yellow light is [S.locked ? "on" : "off"].<BR>"
|
||||
|
||||
/datum/wires/suit_storage_unit/UpdatePulsed(var/index)
|
||||
var/obj/machinery/suit_cycler/S = holder
|
||||
switch(index)
|
||||
if(SUIT_STORAGE_WIRE_SAFETY)
|
||||
S.safeties = !S.safeties
|
||||
if(SUIT_STORAGE_WIRE_ELECTRIFY)
|
||||
S.electrified = 30
|
||||
if(SUIT_STORAGE_WIRE_LOCKED)
|
||||
S.locked = !S.locked
|
||||
|
||||
/datum/wires/suit_storage_unit/UpdateCut(var/index, var/mended)
|
||||
var/obj/machinery/suit_cycler/S = holder
|
||||
switch(index)
|
||||
if(SUIT_STORAGE_WIRE_SAFETY)
|
||||
S.safeties = mended
|
||||
if(SUIT_STORAGE_WIRE_LOCKED)
|
||||
S.locked = mended
|
||||
if(SUIT_STORAGE_WIRE_ELECTRIFY)
|
||||
if(mended)
|
||||
S.electrified = 0
|
||||
else
|
||||
S.electrified = -1
|
||||
@@ -0,0 +1,58 @@
|
||||
/datum/wires/vending
|
||||
holder_type = /obj/machinery/vending
|
||||
wire_count = 4
|
||||
|
||||
var/const/VENDING_WIRE_THROW = 1
|
||||
var/const/VENDING_WIRE_CONTRABAND = 2
|
||||
var/const/VENDING_WIRE_ELECTRIFY = 4
|
||||
var/const/VENDING_WIRE_IDSCAN = 8
|
||||
|
||||
/datum/wires/vending/CanUse(var/mob/living/L)
|
||||
var/obj/machinery/vending/V = holder
|
||||
if(!istype(L, /mob/living/silicon))
|
||||
if(V.seconds_electrified)
|
||||
if(V.shock(L, 100))
|
||||
return 0
|
||||
if(V.panel_open)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/vending/Interact(var/mob/living/user)
|
||||
if(CanUse(user))
|
||||
var/obj/machinery/vending/V = holder
|
||||
V.attack_hand(user)
|
||||
|
||||
/datum/wires/vending/GetInteractWindow()
|
||||
var/obj/machinery/vending/V = holder
|
||||
. += ..()
|
||||
. += "<BR>The orange light is [V.seconds_electrified ? "off" : "on"].<BR>"
|
||||
. += "The red light is [V.shoot_inventory ? "off" : "blinking"].<BR>"
|
||||
. += "The green light is [V.extended_inventory ? "on" : "off"].<BR>"
|
||||
. += "The [V.scan_id ? "purple" : "yellow"] light is on.<BR>"
|
||||
|
||||
/datum/wires/vending/UpdatePulsed(var/index)
|
||||
var/obj/machinery/vending/V = holder
|
||||
switch(index)
|
||||
if(VENDING_WIRE_THROW)
|
||||
V.shoot_inventory = !V.shoot_inventory
|
||||
if(VENDING_WIRE_CONTRABAND)
|
||||
V.extended_inventory = !V.extended_inventory
|
||||
if(VENDING_WIRE_ELECTRIFY)
|
||||
V.seconds_electrified = 30
|
||||
if(VENDING_WIRE_IDSCAN)
|
||||
V.scan_id = !V.scan_id
|
||||
|
||||
/datum/wires/vending/UpdateCut(var/index, var/mended)
|
||||
var/obj/machinery/vending/V = holder
|
||||
switch(index)
|
||||
if(VENDING_WIRE_THROW)
|
||||
V.shoot_inventory = !mended
|
||||
if(VENDING_WIRE_CONTRABAND)
|
||||
V.extended_inventory = 0
|
||||
if(VENDING_WIRE_ELECTRIFY)
|
||||
if(mended)
|
||||
V.seconds_electrified = 0
|
||||
else
|
||||
V.seconds_electrified = -1
|
||||
if(VENDING_WIRE_IDSCAN)
|
||||
V.scan_id = 1
|
||||
@@ -0,0 +1,293 @@
|
||||
// Wire datums. Created by Giacomand.
|
||||
// Was created to replace a horrible case of copy and pasted code with no care for maintability.
|
||||
// Goodbye Door wires, Cyborg wires, Vending Machine wires, Autolathe wires
|
||||
// Protolathe wires, APC wires and Camera wires!
|
||||
|
||||
#define MAX_FLAG 65535
|
||||
|
||||
var/list/same_wires = list()
|
||||
// 12 colours, if you're adding more than 12 wires then add more colours here
|
||||
var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown", "gold", "gray", "cyan", "navy", "purple", "pink")
|
||||
|
||||
/datum/wires
|
||||
|
||||
var/random = 0 // Will the wires be different for every single instance.
|
||||
var/atom/holder = null // The holder
|
||||
var/holder_type = null // The holder type; used to make sure that the holder is the correct type.
|
||||
var/wire_count = 0 // Max is 16
|
||||
var/wires_status = 0 // BITFLAG OF WIRES
|
||||
|
||||
var/list/wires = list()
|
||||
var/list/signallers = list()
|
||||
|
||||
var/table_options = " align='center'"
|
||||
var/row_options1 = " width='80px'"
|
||||
var/row_options2 = " width='260px'"
|
||||
var/window_x = 370
|
||||
var/window_y = 470
|
||||
|
||||
/datum/wires/New(var/atom/holder)
|
||||
..()
|
||||
src.holder = holder
|
||||
if(!istype(holder, holder_type))
|
||||
CRASH("Our holder is null/the wrong type!")
|
||||
return
|
||||
|
||||
// Generate new wires
|
||||
if(random)
|
||||
GenerateWires()
|
||||
// Get the same wires
|
||||
else
|
||||
// We don't have any wires to copy yet, generate some and then copy it.
|
||||
if(!same_wires[holder_type])
|
||||
GenerateWires()
|
||||
same_wires[holder_type] = src.wires.Copy()
|
||||
else
|
||||
var/list/wires = same_wires[holder_type]
|
||||
src.wires = wires // Reference the wires list.
|
||||
|
||||
/datum/wires/proc/GenerateWires()
|
||||
var/list/colours_to_pick = wireColours.Copy() // Get a copy, not a reference.
|
||||
var/list/indexes_to_pick = list()
|
||||
//Generate our indexes
|
||||
for(var/i = 1; i < MAX_FLAG && i < (1 << wire_count); i += i)
|
||||
indexes_to_pick += i
|
||||
colours_to_pick.len = wire_count // Downsize it to our specifications.
|
||||
|
||||
while(colours_to_pick.len && indexes_to_pick.len)
|
||||
// Pick and remove a colour
|
||||
var/colour = pick_n_take(colours_to_pick)
|
||||
|
||||
// Pick and remove an index
|
||||
var/index = pick_n_take(indexes_to_pick)
|
||||
|
||||
src.wires[colour] = index
|
||||
//wires = shuffle(wires)
|
||||
|
||||
|
||||
/datum/wires/proc/Interact(var/mob/living/user)
|
||||
|
||||
var/html = null
|
||||
if(holder && CanUse(user))
|
||||
html = GetInteractWindow()
|
||||
if(html)
|
||||
user.set_machine(holder)
|
||||
else
|
||||
user.unset_machine()
|
||||
// No content means no window.
|
||||
user << browse(null, "window=wires")
|
||||
return
|
||||
|
||||
var/datum/browser/popup = new(user, "wires", holder.name, window_x, window_y)
|
||||
popup.set_content(html)
|
||||
popup.set_title_image(user.browse_rsc_icon(holder.icon, holder.icon_state))
|
||||
popup.open()
|
||||
|
||||
/datum/wires/proc/GetInteractWindow()
|
||||
var/html = "<div class='block'>"
|
||||
html += "<h3>Exposed Wires</h3>"
|
||||
html += "<table[table_options]>"
|
||||
|
||||
for(var/colour in wires)
|
||||
html += "<tr>"
|
||||
html += "<td[row_options1]><font color='[colour]'>[capitalize(colour)]</font></td>"
|
||||
html += "<td[row_options2]>"
|
||||
html += "<A href='?src=\ref[src];action=1;cut=[colour]'>[IsColourCut(colour) ? "Mend" : "Cut"]</A>"
|
||||
html += " <A href='?src=\ref[src];action=1;pulse=[colour]'>Pulse</A>"
|
||||
html += " <A href='?src=\ref[src];action=1;attach=[colour]'>[IsAttached(colour) ? "Detach" : "Attach"] Signaller</A></td></tr>"
|
||||
html += "</table>"
|
||||
html += "</div>"
|
||||
|
||||
return html
|
||||
|
||||
/datum/wires/Topic(href, href_list)
|
||||
..()
|
||||
if(in_range(holder, usr) && isliving(usr))
|
||||
|
||||
var/mob/living/L = usr
|
||||
if(CanUse(L) && href_list["action"])
|
||||
var/obj/item/I = L.get_active_hand()
|
||||
holder.add_hiddenprint(L)
|
||||
if(href_list["cut"]) // Toggles the cut/mend status
|
||||
if(istype(I, /obj/item/weapon/wirecutters))
|
||||
var/colour = href_list["cut"]
|
||||
CutWireColour(colour)
|
||||
else
|
||||
L << "<span class='error'>You need wirecutters!</span>"
|
||||
|
||||
else if(href_list["pulse"])
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
var/colour = href_list["pulse"]
|
||||
PulseColour(colour)
|
||||
else
|
||||
L << "<span class='error'>You need a multitool!</span>"
|
||||
|
||||
else if(href_list["attach"])
|
||||
var/colour = href_list["attach"]
|
||||
// Detach
|
||||
if(IsAttached(colour))
|
||||
var/obj/item/O = Detach(colour)
|
||||
if(O)
|
||||
L.put_in_hands(O)
|
||||
|
||||
// Attach
|
||||
else
|
||||
if(istype(I, /obj/item/device/assembly/signaler))
|
||||
L.drop_item()
|
||||
Attach(colour, I)
|
||||
else
|
||||
L << "<span class='error'>You need a remote signaller!</span>"
|
||||
|
||||
|
||||
|
||||
|
||||
// Update Window
|
||||
Interact(usr)
|
||||
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=wires")
|
||||
usr.unset_machine(holder)
|
||||
|
||||
//
|
||||
// Overridable Procs
|
||||
//
|
||||
|
||||
// Called when wires cut/mended.
|
||||
/datum/wires/proc/UpdateCut(var/index, var/mended)
|
||||
return
|
||||
|
||||
// Called when wire pulsed. Add code here.
|
||||
/datum/wires/proc/UpdatePulsed(var/index)
|
||||
return
|
||||
|
||||
/datum/wires/proc/CanUse(var/mob/living/L)
|
||||
return 1
|
||||
|
||||
// Example of use:
|
||||
/*
|
||||
|
||||
var/const/BOLTED= 1
|
||||
var/const/SHOCKED = 2
|
||||
var/const/SAFETY = 4
|
||||
var/const/POWER = 8
|
||||
|
||||
/datum/wires/door/UpdateCut(var/index, var/mended)
|
||||
var/obj/machinery/door/airlock/A = holder
|
||||
switch(index)
|
||||
if(BOLTED)
|
||||
if(!mended)
|
||||
A.bolt()
|
||||
if(SHOCKED)
|
||||
A.shock()
|
||||
if(SAFETY )
|
||||
A.safety()
|
||||
|
||||
*/
|
||||
|
||||
|
||||
//
|
||||
// Helper Procs
|
||||
//
|
||||
|
||||
/datum/wires/proc/PulseColour(var/colour)
|
||||
PulseIndex(GetIndex(colour))
|
||||
|
||||
/datum/wires/proc/PulseIndex(var/index)
|
||||
if(IsIndexCut(index))
|
||||
return
|
||||
UpdatePulsed(index)
|
||||
|
||||
/datum/wires/proc/GetIndex(var/colour)
|
||||
if(wires[colour])
|
||||
var/index = wires[colour]
|
||||
return index
|
||||
else
|
||||
CRASH("[colour] is not a key in wires.")
|
||||
|
||||
//
|
||||
// Is Index/Colour Cut procs
|
||||
//
|
||||
|
||||
/datum/wires/proc/IsColourCut(var/colour)
|
||||
var/index = GetIndex(colour)
|
||||
return IsIndexCut(index)
|
||||
|
||||
/datum/wires/proc/IsIndexCut(var/index)
|
||||
return (index & wires_status)
|
||||
|
||||
//
|
||||
// Signaller Procs
|
||||
//
|
||||
|
||||
/datum/wires/proc/IsAttached(var/colour)
|
||||
if(signallers[colour])
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/wires/proc/GetAttached(var/colour)
|
||||
if(signallers[colour])
|
||||
return signallers[colour]
|
||||
return null
|
||||
|
||||
/datum/wires/proc/Attach(var/colour, var/obj/item/device/assembly/signaler/S)
|
||||
if(colour && S)
|
||||
if(!IsAttached(colour))
|
||||
signallers[colour] = S
|
||||
S.loc = holder
|
||||
S.connected = src
|
||||
return S
|
||||
|
||||
/datum/wires/proc/Detach(var/colour)
|
||||
if(colour)
|
||||
var/obj/item/device/assembly/signaler/S = GetAttached(colour)
|
||||
if(S)
|
||||
signallers -= colour
|
||||
S.connected = null
|
||||
S.loc = holder.loc
|
||||
return S
|
||||
|
||||
|
||||
/datum/wires/proc/Pulse(var/obj/item/device/assembly/signaler/S)
|
||||
|
||||
for(var/colour in signallers)
|
||||
if(S == signallers[colour])
|
||||
PulseColour(colour)
|
||||
break
|
||||
|
||||
|
||||
//
|
||||
// Cut Wire Colour/Index procs
|
||||
//
|
||||
|
||||
/datum/wires/proc/CutWireColour(var/colour)
|
||||
var/index = GetIndex(colour)
|
||||
CutWireIndex(index)
|
||||
|
||||
/datum/wires/proc/CutWireIndex(var/index)
|
||||
if(IsIndexCut(index))
|
||||
wires_status &= ~index
|
||||
UpdateCut(index, 1)
|
||||
else
|
||||
wires_status |= index
|
||||
UpdateCut(index, 0)
|
||||
|
||||
/datum/wires/proc/RandomCut()
|
||||
var/r = rand(1, wires.len)
|
||||
CutWireIndex(r)
|
||||
|
||||
/datum/wires/proc/CutAll()
|
||||
for(var/i = 1; i < MAX_FLAG && i < (1 << wire_count); i += i)
|
||||
CutWireIndex(i)
|
||||
|
||||
/datum/wires/proc/IsAllCut()
|
||||
if(wires_status == (1 << wire_count) - 1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//
|
||||
//Shuffle and Mend
|
||||
//
|
||||
|
||||
/datum/wires/proc/Shuffle()
|
||||
wires_status = 0
|
||||
GenerateWires()
|
||||
@@ -1,3 +1,8 @@
|
||||
#define TELECOMMS_RECEPTION_NONE 0
|
||||
#define TELECOMMS_RECEPTION_SENDER 1
|
||||
#define TELECOMMS_RECEPTION_RECEIVER 2
|
||||
#define TELECOMMS_RECEPTION_BOTH 3
|
||||
|
||||
/proc/get_frequency_name(var/display_freq)
|
||||
var/freq_text
|
||||
|
||||
@@ -16,3 +21,62 @@
|
||||
|
||||
return freq_text
|
||||
|
||||
/datum/reception
|
||||
var/obj/machinery/message_server/message_server = null
|
||||
var/telecomms_reception = TELECOMMS_RECEPTION_NONE
|
||||
var/message = ""
|
||||
|
||||
/datum/receptions
|
||||
var/obj/machinery/message_server/message_server = null
|
||||
var/sender_reception = TELECOMMS_RECEPTION_NONE
|
||||
var/list/receiver_reception = new
|
||||
|
||||
/proc/get_message_server()
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
if(MS.active)
|
||||
return MS
|
||||
return null
|
||||
|
||||
/proc/check_signal(var/datum/signal/signal)
|
||||
return signal && signal.data["done"]
|
||||
|
||||
/proc/get_sender_reception(var/atom/sender, var/datum/signal/signal)
|
||||
return check_signal(signal) ? TELECOMMS_RECEPTION_SENDER : TELECOMMS_RECEPTION_NONE
|
||||
|
||||
/proc/get_receiver_reception(var/receiver, var/datum/signal/signal)
|
||||
if(receiver && check_signal(signal))
|
||||
var/turf/pos = get_turf(receiver)
|
||||
if(pos.z in signal.data["level"])
|
||||
return TELECOMMS_RECEPTION_RECEIVER
|
||||
return TELECOMMS_RECEPTION_NONE
|
||||
|
||||
/proc/get_reception(var/atom/sender, var/receiver, var/message = "")
|
||||
var/datum/reception/reception = new
|
||||
|
||||
// check if telecomms I/O route 1459 is stable
|
||||
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
|
||||
reception.message_server = get_message_server()
|
||||
|
||||
var/datum/signal/signal = sender.telecomms_process() // Be aware that this proc calls sleep, to simulate transmition delays
|
||||
reception.telecomms_reception |= get_sender_reception(sender, signal)
|
||||
reception.telecomms_reception |= get_receiver_reception(receiver, signal)
|
||||
reception.message = signal && signal.data["compression"] > 0 ? Gibberish(message, signal.data["compression"] + 50) : message
|
||||
|
||||
return reception
|
||||
|
||||
/proc/get_receptions(var/atom/sender, var/list/atom/receivers)
|
||||
var/datum/receptions/receptions = new
|
||||
receptions.message_server = get_message_server()
|
||||
|
||||
var/datum/signal/signal
|
||||
if(sender)
|
||||
signal = sender.telecomms_process()
|
||||
receptions.sender_reception = get_sender_reception(sender, signal)
|
||||
|
||||
for(var/atom/receiver in receivers)
|
||||
if(!signal)
|
||||
signal = receiver.telecomms_process()
|
||||
receptions.receiver_reception[receiver] = get_receiver_reception(receiver, signal)
|
||||
|
||||
return receptions
|
||||
|
||||
@@ -37,4 +37,9 @@
|
||||
R.fields["ma_crim_d"] = "No major crime convictions."
|
||||
R.fields["notes"] = "No notes."
|
||||
data_core.security += R
|
||||
return R
|
||||
return R
|
||||
|
||||
/proc/find_record(field, value, list/L)
|
||||
for(var/datum/data/record/R in L)
|
||||
if(R.fields[field] == value)
|
||||
return R
|
||||
|
||||
@@ -66,7 +66,7 @@ var/list/teleportlocs = list()
|
||||
if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station) || istype(AR, /area/wizard_station)) continue
|
||||
if(teleportlocs.Find(AR.name)) continue
|
||||
var/turf/picked = pick(get_area_turfs(AR.type))
|
||||
if (picked.z == 1)
|
||||
if (picked.z in config.station_levels)
|
||||
teleportlocs += AR.name
|
||||
teleportlocs[AR.name] = AR
|
||||
|
||||
@@ -83,7 +83,7 @@ var/list/ghostteleportlocs = list()
|
||||
ghostteleportlocs += AR.name
|
||||
ghostteleportlocs[AR.name] = AR
|
||||
var/turf/picked = pick(get_area_turfs(AR.type))
|
||||
if (picked.z == 1 || picked.z == 3 || picked.z == 4 || picked.z == 5)
|
||||
if (picked.z in config.player_levels)
|
||||
ghostteleportlocs += AR.name
|
||||
ghostteleportlocs[AR.name] = AR
|
||||
|
||||
@@ -264,11 +264,11 @@ var/list/ghostteleportlocs = list()
|
||||
icon_state = "shuttlered2"
|
||||
|
||||
/area/shuttle/syndicate_elite/mothership
|
||||
name = "\improper Syndicate Elite Shuttle"
|
||||
name = "\improper Merc Elite Shuttle"
|
||||
icon_state = "shuttlered"
|
||||
|
||||
/area/shuttle/syndicate_elite/station
|
||||
name = "\improper Syndicate Elite Shuttle"
|
||||
name = "\improper Merc Elite Shuttle"
|
||||
icon_state = "shuttlered2"
|
||||
|
||||
/area/shuttle/administration/centcom
|
||||
@@ -381,17 +381,17 @@ var/list/ghostteleportlocs = list()
|
||||
//SYNDICATES
|
||||
|
||||
/area/syndicate_mothership
|
||||
name = "\improper Syndicate Base"
|
||||
name = "\improper Mercenary Base"
|
||||
icon_state = "syndie-ship"
|
||||
requires_power = 0
|
||||
unlimited_power = 1
|
||||
|
||||
/area/syndicate_mothership/control
|
||||
name = "\improper Syndicate Control Room"
|
||||
name = "\improper Mercenary Control Room"
|
||||
icon_state = "syndie-control"
|
||||
|
||||
/area/syndicate_mothership/elite_squad
|
||||
name = "\improper Syndicate Elite Squad"
|
||||
name = "\improper Elite Mercenary Squad"
|
||||
icon_state = "syndie-elite"
|
||||
|
||||
//EXTRA
|
||||
@@ -454,13 +454,13 @@ var/list/ghostteleportlocs = list()
|
||||
|
||||
//names are used
|
||||
/area/syndicate_station
|
||||
name = "\improper Syndicate Station"
|
||||
name = "\improper Independant Station"
|
||||
icon_state = "yellow"
|
||||
requires_power = 0
|
||||
unlimited_power = 1
|
||||
|
||||
/area/syndicate_station/start
|
||||
name = "\improper Syndicate Forward Operating Base"
|
||||
name = "\improper Mercenary Forward Operating Base"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/syndicate_station/southwest
|
||||
@@ -884,20 +884,20 @@ var/list/ghostteleportlocs = list()
|
||||
name = "\improper Dormitories"
|
||||
icon_state = "Sleep"
|
||||
|
||||
/area/crew_quarters/sleep/engi
|
||||
name = "\improper Engineering Dormitories"
|
||||
icon_state = "Sleep"
|
||||
|
||||
/area/crew_quarters/sleep/engi_wash
|
||||
name = "\improper Engineering Washroom"
|
||||
icon_state = "toilet"
|
||||
|
||||
/area/crew_quarters/sleep/sec
|
||||
name = "\improper Security Dormitories"
|
||||
/area/crew_quarters/sleep/bedrooms/one
|
||||
name = "\improper Dormitory Bedroom One"
|
||||
icon_state = "Sleep"
|
||||
|
||||
/area/crew_quarters/sleep/bedrooms
|
||||
name = "\improper Dormitory Bedroom"
|
||||
/area/crew_quarters/sleep/bedrooms/two
|
||||
name = "\improper Dormitory Bedroom Two"
|
||||
icon_state = "Sleep"
|
||||
|
||||
/area/crew_quarters/sleep/bedrooms/three
|
||||
name = "\improper Dormitory Bedroom Three"
|
||||
icon_state = "Sleep"
|
||||
|
||||
/area/crew_quarters/sleep/cryo
|
||||
@@ -1080,6 +1080,10 @@ var/list/ghostteleportlocs = list()
|
||||
name = "\improper Engineering Foyer"
|
||||
icon_state = "engine"
|
||||
|
||||
engineering_supply
|
||||
name = "Engineering Supply"
|
||||
icon_state = "engine_supply"
|
||||
|
||||
break_room
|
||||
name = "\improper Engineering Break Room"
|
||||
icon_state = "engine"
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
return
|
||||
|
||||
/area/proc/updateicon()
|
||||
if ((fire || eject || party) && ((!requires_power)?(!requires_power):power_environ))//If it doesn't require power, can still activate this proc.
|
||||
if ((fire || eject || party) && (!requires_power||power_environ) && !lighting_space)//If it doesn't require power, can still activate this proc.
|
||||
if(fire && !eject && !party)
|
||||
icon_state = "blue"
|
||||
/*else if(atmosalm && !fire && !eject && !party)
|
||||
@@ -234,6 +234,8 @@
|
||||
return 1
|
||||
if(master.always_unpowered)
|
||||
return 0
|
||||
if(src.lighting_space)
|
||||
return 0 // Nope sorry
|
||||
switch(chan)
|
||||
if(EQUIP)
|
||||
return master.power_equip
|
||||
@@ -245,12 +247,10 @@
|
||||
return 0
|
||||
|
||||
// called when power status changes
|
||||
|
||||
/area/proc/power_change()
|
||||
master.powerupdate = 2
|
||||
for(var/area/RA in related)
|
||||
for(var/obj/machinery/M in RA) // for each machine in the area
|
||||
M.power_change() // reverify power status (to update icons etc.)
|
||||
M.power_change() // reverify power status (to update icons etc.)
|
||||
if (fire || eject || party)
|
||||
RA.updateicon()
|
||||
|
||||
@@ -265,7 +265,6 @@
|
||||
used += master.used_environ
|
||||
if(TOTAL)
|
||||
used += master.used_light + master.used_equip + master.used_environ
|
||||
|
||||
return used
|
||||
|
||||
/area/proc/clear_usage()
|
||||
@@ -274,7 +273,6 @@
|
||||
master.used_environ = 0
|
||||
|
||||
/area/proc/use_power(var/amount, var/chan)
|
||||
|
||||
switch(chan)
|
||||
if(EQUIP)
|
||||
master.used_equip += amount
|
||||
|
||||
@@ -423,3 +423,9 @@ its easier to just keep the beam vertical.
|
||||
|
||||
/atom/proc/checkpass(passflag)
|
||||
return pass_flags&passflag
|
||||
|
||||
/atom/proc/isinspace()
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
equip_traitor(newtraitor)
|
||||
|
||||
traitors += newtraitor.mind
|
||||
newtraitor << "\red <B>ATTENTION:</B> \black It is time to pay your debt to the Syndicate..."
|
||||
newtraitor << "\red <B>No time like the present.</B> \black It's time to take matters into your own hands..."
|
||||
newtraitor << "<B>You are now a traitor.</B>"
|
||||
newtraitor.mind.special_role = "traitor"
|
||||
newtraitor.hud_updateflag |= 1 << SPECIALROLE_HUD
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
var/nukecode = "ERROR"
|
||||
for(var/obj/machinery/nuclearbomb/bomb in machines)
|
||||
if(bomb && bomb.r_code)
|
||||
if(bomb.z == 1)
|
||||
if(bomb.z in station_levels)
|
||||
nukecode = bomb.r_code
|
||||
interceptname = "Directive 7-12"
|
||||
intercepttext += "<FONT size = 3><B>NanoTrasen Update</B>: Biohazard Alert.</FONT><HR>"
|
||||
|
||||
@@ -13,9 +13,6 @@
|
||||
required_players = 1
|
||||
votable = 0 //Remove after testing.
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
//Possible roundstart antag types.
|
||||
var/list/atypes = list("syndi","ling","tater","wiz","ninja","vox","cult") //Readd slug when borer spawn is fixed.
|
||||
var/list/chosen_atypes = list()
|
||||
@@ -176,7 +173,7 @@
|
||||
|
||||
switch(role)
|
||||
if("syndi")
|
||||
role_text = "Syndicate Operative"
|
||||
role_text = "Mercenary"
|
||||
if("ling")
|
||||
role_text = "Changeling"
|
||||
if("tater")
|
||||
@@ -248,9 +245,9 @@
|
||||
var/obj/effect/landmark/nuke_spawn = locate("landmark*Nuclear-Bomb")
|
||||
|
||||
var/nuke_code = "[rand(10000, 99999)]"
|
||||
var/leader_selected = 0
|
||||
var/spawnpos = 1
|
||||
|
||||
var/datum/mind/leader = null
|
||||
for(var/datum/mind/player in candidates)
|
||||
|
||||
syndicates |= player
|
||||
@@ -267,9 +264,9 @@
|
||||
greet_syndicate(player)
|
||||
equip_syndicate(player.current)
|
||||
|
||||
if(!leader_selected)
|
||||
if(!leader)
|
||||
prepare_syndicate_leader(player, nuke_code)
|
||||
leader_selected = 1
|
||||
leader = player
|
||||
|
||||
spawnpos++
|
||||
update_synd_icons_added(player)
|
||||
@@ -278,6 +275,8 @@
|
||||
|
||||
if(uplinkdevice)
|
||||
var/obj/item/device/radio/uplink/U = new(uplinkdevice.loc)
|
||||
if(leader)
|
||||
U.hidden_uplink.uplink_owner = leader
|
||||
U.hidden_uplink.uses = 40
|
||||
if(nuke_spawn && synd_spawn.len > 0)
|
||||
var/obj/machinery/nuclearbomb/the_bomb = new /obj/machinery/nuclearbomb(nuke_spawn.loc)
|
||||
|
||||
@@ -14,9 +14,6 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
required_enemies = 1
|
||||
recommended_enemies = 4
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time
|
||||
var/const/prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target
|
||||
var/const/prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
if(!mind) return
|
||||
if(!mind.changeling) mind.changeling = new /datum/changeling(gender)
|
||||
|
||||
verbs += /datum/changeling/proc/EvolutionMenu
|
||||
add_language("Changeling")
|
||||
|
||||
var/lesser_form = !ishuman(src)
|
||||
|
||||
@@ -30,8 +32,7 @@
|
||||
mind.changeling.absorbed_species += H.species.name
|
||||
|
||||
for(var/language in languages)
|
||||
if(!(language in mind.changeling.absorbed_languages))
|
||||
mind.changeling.absorbed_languages += language
|
||||
mind.changeling.absorbed_languages |= language
|
||||
|
||||
return 1
|
||||
|
||||
@@ -80,6 +81,9 @@
|
||||
for(var/language in updated_languages)
|
||||
languages += language
|
||||
|
||||
//This isn't strictly necessary but just to be safe...
|
||||
add_language("Changeling")
|
||||
|
||||
return
|
||||
|
||||
//Used to switch species based on the changeling datum.
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/datum/game_mode/traitor/changeling/announce()
|
||||
world << "<B>The current game mode is - Traitor+Changeling!</B>"
|
||||
world << "<B>There is an alien creature on the station along with some syndicate operatives out for their own gain! Do not let the changeling and the traitors succeed!</B>"
|
||||
world << "<B>There is an alien creature on the station along with some foreign operatives out for their own gain! Do not let the changeling and the traitors succeed!</B>"
|
||||
|
||||
|
||||
/datum/game_mode/traitor/changeling/pre_setup()
|
||||
|
||||
@@ -105,7 +105,7 @@ var/list/sacrificed = list()
|
||||
continue
|
||||
usr.say("Mah[pick("'","`")]weyh pleggh at e'ntrath!")
|
||||
M.visible_message("\red [M] writhes in pain as the markings below \him glow a bloody red.", \
|
||||
"\red AAAAAAHHHH!.", \
|
||||
"\red AAAAAAHHHH!", \
|
||||
"\red You hear an anguished scream.")
|
||||
if(is_convertable_to_cult(M.mind) && !jobban_isbanned(M, "cultist"))//putting jobban check here because is_convertable uses mind as argument
|
||||
|
||||
@@ -395,8 +395,6 @@ var/list/sacrificed = list()
|
||||
D.real_name = copytext(P.info, findtext(P.info,">")+1, findtext(P.info,"<",2) )
|
||||
chose_name = 1
|
||||
break
|
||||
if(!chose_name)
|
||||
D.real_name = "[pick(first_names_male)] [pick(last_names)]"
|
||||
D.universal_speak = 1
|
||||
D.status_flags &= ~GODMODE
|
||||
D.s_tone = 35
|
||||
@@ -411,10 +409,14 @@ var/list/sacrificed = list()
|
||||
ticker.mode:add_cultist(D.mind)
|
||||
else
|
||||
ticker.mode.cult+=D.mind
|
||||
D.mind.assigned_role = pick("Anguished", "Blasphemous", "Corrupt", "Depraved", "Disturbed", "Exacerbated", "Foul", "Hateful", "Inexorable", "Implacable", "Impure", "Pained", "Profane", "Profligate", "Resentful", "Restless", "Tormented", "Unclean", "Unforgiving", "Vengeful", "Vindictive", "Wicked", "Wronged")
|
||||
|
||||
D.mind.assigned_role = pick("Anguished", "Blasphemous", "Corrupt", "Cruel", "Depraved", "Despicable", "Disturbed", "Exacerbated", "Foul", "Hateful", "Inexorable", "Implacable", "Impure", "Malevolent", "Malignant", "Malicious", "Pained", "Profane", "Profligate", "Relentless", "Resentful", "Restless", "Spiteful", "Tormented", "Unclean", "Unforgiving", "Vengeful", "Vindictive", "Wicked", "Wronged")
|
||||
D.mind.assigned_role += " "
|
||||
D.mind.assigned_role += pick("Apparition", "Aptrgangr", "Draugr", "Dybbuk", "Ghast", "Ghost", "Gjenganger", "Haint", "Phantom", "Phantasm", "Poltergeist", "Revenant", "Shade", "Soul", "Spectre", "Spirit", "Spook", "Visitant", "Wraith")
|
||||
D.mind.assigned_role += pick("Apparition", "Aptrgangr", "Dis", "Draugr", "Dybbuk", "Eidolon", "Fetch", "Fylgja", "Ghast", "Ghost", "Gjenganger", "Haint", "Phantom", "Phantasm", "Poltergeist", "Revenant", "Shade", "Shadow", "Soul", "Spectre", "Spirit", "Spook", "Visitant", "Wraith")
|
||||
D.mind.special_role = "Cultist"
|
||||
if(!chose_name)
|
||||
D.real_name = D.mind.assigned_role
|
||||
|
||||
D << "<font color=\"purple\"><b><i>Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root.</b></i></font>"
|
||||
D << "<font color=\"purple\"><b><i>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.</b></i></font>"
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
var/list/turfs = new
|
||||
var/turf/picked
|
||||
for(var/turf/simulated/floor/T in world)
|
||||
if(T.z == 1)
|
||||
if(T.z in station_levels)
|
||||
turfs += T
|
||||
for(var/turf/simulated/floor/T in turfs)
|
||||
if(prob(20))
|
||||
@@ -185,7 +185,7 @@
|
||||
//world << sound('sound/AI/aliens.ogg')
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
|
||||
if(!temp_vent.welded && temp_vent.network && temp_vent.loc.z in config.station_levels)
|
||||
if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
|
||||
vents += temp_vent
|
||||
|
||||
@@ -444,21 +444,21 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
|
||||
spawn(0)
|
||||
world << "Started processing APCs"
|
||||
for (var/obj/machinery/power/apc/APC in world)
|
||||
if(APC.z == 1)
|
||||
if(APC.z in station_levels)
|
||||
APC.ion_act()
|
||||
apcnum++
|
||||
world << "Finished processing APCs. Processed: [apcnum]"
|
||||
spawn(0)
|
||||
world << "Started processing SMES"
|
||||
for (var/obj/machinery/power/smes/SMES in world)
|
||||
if(SMES.z == 1)
|
||||
if(SMES.z in station_levels)
|
||||
SMES.ion_act()
|
||||
smesnum++
|
||||
world << "Finished processing SMES. Processed: [smesnum]"
|
||||
spawn(0)
|
||||
world << "Started processing AIRLOCKS"
|
||||
for (var/obj/machinery/door/airlock/D in world)
|
||||
if(D.z == 1)
|
||||
if(D.z in station_levels)
|
||||
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
|
||||
airlocknum++
|
||||
spawn(0)
|
||||
@@ -467,7 +467,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
|
||||
spawn(0)
|
||||
world << "Started processing FIREDOORS"
|
||||
for (var/obj/machinery/door/firedoor/D in world)
|
||||
if(D.z == 1)
|
||||
if(D.z in station_levels)
|
||||
firedoornum++;
|
||||
spawn(0)
|
||||
D.ion_act()
|
||||
|
||||
@@ -530,12 +530,12 @@ ________________________________________________________________________________
|
||||
display_spideros()
|
||||
return
|
||||
P.tnote += "<i><b>← From [!s_control?(A):"an unknown source"]:</b></i><br>[t]<br>"
|
||||
if (!P.silent)
|
||||
if (!P.message_silent)
|
||||
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
O.show_message(text("\icon[P] *[P.ttone]*"))
|
||||
P.overlays.Cut()
|
||||
P.overlays += image('icons/obj/pda.dmi', "pda-r")
|
||||
P.new_message = 1
|
||||
P.update_icon()
|
||||
|
||||
if("Inject")
|
||||
if( (href_list["tag"]=="radium"? (reagents.get_reagent_amount("radium"))<=(a_boost*a_transfer) : !reagents.get_reagent_amount(href_list["tag"])) )//Special case for radium. If there are only a_boost*a_transfer radium units left.
|
||||
@@ -1212,7 +1212,7 @@ ________________________________________________________________________________
|
||||
U.client.images += image(tempHud,target,"hudwizard")
|
||||
if("Hunter","Sentinel","Drone","Queen")
|
||||
U.client.images += image(tempHud,target,"hudalien")
|
||||
if("Syndicate")
|
||||
if("Mercenary")
|
||||
U.client.images += image(tempHud,target,"hudoperative")
|
||||
if("Death Commando")
|
||||
U.client.images += image(tempHud,target,"huddeathsquad")
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
var/area/current_area = get_area(S)
|
||||
if(current_area.type in skipped_areas || S.z != 1)
|
||||
if(current_area.type in skipped_areas || !(S.z in config.station_levels))
|
||||
continue
|
||||
S.last_charge = S.charge
|
||||
S.last_output = S.output
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z == 1)
|
||||
if(C.cell && C.z in config.station_levels)
|
||||
C.cell.charge = 0
|
||||
|
||||
/proc/power_restore(var/announce = 1)
|
||||
@@ -29,7 +29,7 @@
|
||||
if(announce)
|
||||
command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z == 1)
|
||||
if(C.cell && C.z in config.station_levels)
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
var/area/current_area = get_area(S)
|
||||
|
||||
@@ -386,7 +386,7 @@ Making this random or semi-random will probably not work without it also being i
|
||||
As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
*/
|
||||
/proc/generate_ninja_directive(side)
|
||||
var/directive = "[side=="face"?"Nanotrasen":"The Syndicate"] is your employer. "//Let them know which side they're on.
|
||||
var/directive = "[side=="face"?"Nanotrasen":"A criminal syndicate"] is your employer. "//Let them know which side they're on.
|
||||
switch(rand(1,19))
|
||||
if(1)
|
||||
directive += "The Spider Clan must not be linked to this operation. Remain hidden and covert when possible."
|
||||
@@ -401,7 +401,7 @@ As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
if(6)
|
||||
directive += "We are engaged in a legal dispute over [station_name]. If a laywer is present on board, force their cooperation in the matter."
|
||||
if(7)
|
||||
directive += "A financial backer has made an offer we cannot refuse. Implicate Syndicate involvement in the operation."
|
||||
directive += "A financial backer has made an offer we cannot refuse. Implicate criminal involvement in the operation."
|
||||
if(8)
|
||||
directive += "Let no one question the mercy of the Spider Clan. Ensure the safety of all non-essential personnel you encounter."
|
||||
if(9)
|
||||
@@ -411,7 +411,7 @@ As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
if(11)
|
||||
directive += "Our honor is on the line. Utilize only honorable tactics when dealing with opponents."
|
||||
if(12)
|
||||
directive += "We are currently negotiating with a Syndicate leader. Disguise assassinations as suicide or other natural causes."
|
||||
directive += "We are currently negotiating with a mercenary leader. Disguise assassinations as suicide or other natural causes."
|
||||
if(13)
|
||||
directive += "Some disgruntled NanoTrasen employees have been supportive of our operations. Be wary of any mistreatment by command staff."
|
||||
if(14)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
spawn()
|
||||
var/list/pick_turfs = list()
|
||||
for(var/turf/simulated/floor/T in world)
|
||||
if(T.z == 1)
|
||||
if(T.z in config.station_levels)
|
||||
pick_turfs += T
|
||||
|
||||
if(pick_turfs.len)
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
config_tag = "extended"
|
||||
required_players = 0
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
var/recommended_enemies = 0
|
||||
var/newscaster_announcements = null
|
||||
var/ert_disabled = 0
|
||||
var/uplink_welcome = "Syndicate Uplink Console:"
|
||||
var/uplink_welcome = "Illegal Uplink Console:"
|
||||
var/uplink_uses = 10
|
||||
var/list/datum/uplink_item/uplink_items = list(
|
||||
"Highly Visible and Dangerous Weapons" = list(
|
||||
@@ -38,17 +38,17 @@
|
||||
new/datum/uplink_item(/obj/item/weapon/gun/energy/crossbow, 5, "Energy Crossbow", "XB"),
|
||||
new/datum/uplink_item(/obj/item/weapon/melee/energy/sword, 4, "Energy Sword", "ES"),
|
||||
new/datum/uplink_item(/obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, 6, "Exosuit Rigged Laser", "RL"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndicate, 10, "Syndicate Bundle", "BU"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndicate, 10, "Mercenary Bundle", "BU"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/emps, 3, "5 EMP Grenades", "EM")
|
||||
),
|
||||
"Stealthy and Inconspicuous Weapons" = list(
|
||||
new/datum/uplink_item(/obj/item/weapon/pen/paralysis, 3, "Paralysis Pen", "PP"),
|
||||
new/datum/uplink_item(/obj/item/weapon/soap/syndie, 1, "Syndicate Soap", "SP"),
|
||||
new/datum/uplink_item(/obj/item/weapon/soap/syndie, 1, "Subversive Soap", "SP"),
|
||||
new/datum/uplink_item(/obj/item/weapon/cartridge/syndicate, 3, "Detomatix PDA Cartridge", "DC")
|
||||
),
|
||||
"Stealth and Camouflage Items" = list(
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndie_kit/chameleon, 3, "Chameleon Kit", "CB"),
|
||||
new/datum/uplink_item(/obj/item/clothing/shoes/syndigaloshes, 2, "No-Slip Syndicate Shoes", "SH"),
|
||||
new/datum/uplink_item(/obj/item/clothing/shoes/syndigaloshes, 2, "No-Slip Shoes", "SH"),
|
||||
new/datum/uplink_item(/obj/item/weapon/card/id/syndicate, 2, "Agent ID card", "AC"),
|
||||
new/datum/uplink_item(/obj/item/clothing/mask/gas/voice, 4, "Voice Changer", "VC"),
|
||||
new/datum/uplink_item(/obj/item/device/chameleon, 4, "Chameleon-Projector", "CP")
|
||||
@@ -213,14 +213,14 @@
|
||||
|
||||
/datum/game_mode/proc/send_intercept()
|
||||
var/intercepttext = "<FONT size = 3><B>Cent. Com. Update</B> Requested status information:</FONT><HR>"
|
||||
intercepttext += "<B> In case you have misplaced your copy, attached is a list of personnel whom reliable sources™ suspect may be affiliated with the Syndicate:</B><br>"
|
||||
intercepttext += "<B> In case you have misplaced your copy, attached is a list of personnel whom reliable sources™ suspect may be affiliated with criminal organisations or hostile foreign entities:</B><br>"
|
||||
|
||||
|
||||
var/list/suspects = list()
|
||||
for(var/mob/living/carbon/human/man in player_list) if(man.client && man.mind)
|
||||
// NT relation option
|
||||
var/special_role = man.mind.special_role
|
||||
if (special_role == "Wizard" || special_role == "Ninja" || special_role == "Syndicate" || special_role == "Vox Raider")
|
||||
if (special_role == "Wizard" || special_role == "Ninja" || special_role == "Mercenary" || special_role == "Vox Raider")
|
||||
continue //NT intelligence ruled out possiblity that those are too classy to pretend to be a crew.
|
||||
if(man.client.prefs.nanotrasen_relation == "Opposed" && prob(50) || \
|
||||
man.client.prefs.nanotrasen_relation == "Skeptical" && prob(20))
|
||||
@@ -514,7 +514,7 @@ proc/get_nt_opposed()
|
||||
obj_count++
|
||||
|
||||
/datum/game_mode/proc/printplayer(var/datum/mind/ply)
|
||||
var/role = "\improper[ply.assigned_role]"
|
||||
var/role = ply.assigned_role == "MODE" ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]"
|
||||
var/text = "<br><b>[ply.name]</b>(<b>[ply.key]</b>) as \a <b>[role]</b> ("
|
||||
if(ply.current)
|
||||
if(ply.current.stat == DEAD)
|
||||
@@ -527,4 +527,16 @@ proc/get_nt_opposed()
|
||||
text += "body destroyed"
|
||||
text += ")"
|
||||
|
||||
var/TC_uses = 0
|
||||
var/uplink_true = 0
|
||||
var/purchases = ""
|
||||
for(var/obj/item/device/uplink/H in world_uplinks)
|
||||
if(H && H.uplink_owner && H.uplink_owner == ply)
|
||||
TC_uses += H.used_TC
|
||||
uplink_true = 1
|
||||
for(var/log in H.purchase_log)
|
||||
purchases += "<BIG>[log]</BIG>"
|
||||
if(uplink_true)
|
||||
text += " (used [TC_uses] TC) [purchases]"
|
||||
|
||||
return text
|
||||
|
||||
@@ -201,7 +201,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
switch(M.z)
|
||||
if(0) //inside a crate or something
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && T.z==1) //we don't use M.death(0) because it calls a for(/mob) loop and
|
||||
if(T && T.z in config.station_levels) //we don't use M.death(0) because it calls a for(/mob) loop and
|
||||
M.health = 0
|
||||
M.stat = DEAD
|
||||
if(1) //on a z-level 1 turf.
|
||||
@@ -214,7 +214,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
if( mode && !override )
|
||||
override = mode.name
|
||||
switch( override )
|
||||
if("nuclear emergency") //Nuke wasn't on station when it blew up
|
||||
if("mercenary") //Nuke wasn't on station when it blew up
|
||||
flick("intro_nuke",cinematic)
|
||||
sleep(35)
|
||||
world << sound('sound/effects/explosionfar.ogg')
|
||||
@@ -236,7 +236,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
if( mode && !override )
|
||||
override = mode.name
|
||||
switch( override )
|
||||
if("nuclear emergency") //Nuke Ops successfully bombed the station
|
||||
if("mercenary") //Nuke Ops successfully bombed the station
|
||||
flick("intro_nuke",cinematic)
|
||||
sleep(35)
|
||||
flick("station_explode_fade_red",cinematic)
|
||||
@@ -261,7 +261,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
world << sound('sound/effects/explosionfar.ogg')
|
||||
cinematic.icon_state = "summary_selfdes"
|
||||
for(var/mob/living/M in living_mob_list)
|
||||
if(M.loc.z == 1)
|
||||
if(M.loc.z in config.station_levels)
|
||||
M.death()//No mercy
|
||||
//If its actually the end of the round, wait for it to end.
|
||||
//Otherwise if its a verb it will continue on afterwards.
|
||||
@@ -393,7 +393,12 @@ var/global/datum/controller/gameticker/ticker
|
||||
else
|
||||
Player << "<font color='blue'><b>You missed the crew transfer after the events on [station_name()] as [Player.real_name].</b></font>"
|
||||
else
|
||||
Player << "<font color='red'><b>You did not survive the events on [station_name()]...</b></font>"
|
||||
if(istype(Player,/mob/dead/observer))
|
||||
var/mob/dead/observer/O = Player
|
||||
if(!O.started_as_observer)
|
||||
Player << "<font color='red'><b>You did not survive the events on [station_name()]...</b></font>"
|
||||
else
|
||||
Player << "<font color='red'><b>You did not survive the events on [station_name()]...</b></font>"
|
||||
world << "<br>"
|
||||
|
||||
for (var/mob/living/silicon/ai/aiPlayer in mob_list)
|
||||
@@ -427,7 +432,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
robo.laws.show_laws(world)
|
||||
|
||||
if(dronecount)
|
||||
world << "<b>There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] this round."
|
||||
world << "<b>There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] at the end of this round."
|
||||
|
||||
mode.declare_completion()//To declare normal completion.
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
|
||||
required_players_secret = 25
|
||||
required_enemies = 4
|
||||
recommended_enemies = 6
|
||||
votable = 0
|
||||
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
@@ -106,6 +107,8 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
|
||||
vox.languages = list() // Removing language from chargen.
|
||||
vox.flavor_text = ""
|
||||
vox.add_language("Vox-pidgin")
|
||||
vox.add_language("Galactic Common")
|
||||
vox.add_language("Tradeband")
|
||||
vox.h_style = "Short Vox Quills"
|
||||
vox.f_style = "Shaved"
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
set name = "System Override"
|
||||
set desc = "Start the victory timer"
|
||||
if (!istype(ticker.mode,/datum/game_mode/malfunction))
|
||||
usr << "You cannot begin a takeover in this round type!."
|
||||
usr << "You cannot begin a takeover in this round type!"
|
||||
return
|
||||
if (ticker.mode:malf_mode_declared)
|
||||
usr << "You've already begun your takeover."
|
||||
|
||||
@@ -51,7 +51,7 @@ datum/game_mode/mutiny
|
||||
"leaks into a negative reality",
|
||||
"antiparticle clouds",
|
||||
"residual bluespace energy",
|
||||
"suspected syndicate operatives",
|
||||
"suspected criminal operatives",
|
||||
"malfunctioning von Neumann probe swarms",
|
||||
"shadowy interlopers",
|
||||
"a stranded Vox arkship",
|
||||
@@ -103,7 +103,7 @@ datum/game_mode/mutiny
|
||||
if (!pda)
|
||||
return 0
|
||||
|
||||
if (!pda.silent)
|
||||
if (!pda.message_silent)
|
||||
playsound(pda.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, pda.loc))
|
||||
O.show_message(text("\icon[pda] *[pda.ttone]*"))
|
||||
|
||||
@@ -310,7 +310,7 @@ datum
|
||||
target = targeta
|
||||
job = joba
|
||||
weight = get_points(job)
|
||||
explanation_text = "[target.current.real_name], the [target.assigned_role] is a [pick("relative of a","friend of a","") + pick("high ranking","important","well-liked")] Syndicate [pick("Leader","Officer","Agent","sympathiser")]. Make sure they get off the station safely, while minimizing intervention."
|
||||
explanation_text = "[target.current.real_name], the [target.assigned_role] is a [pick("relative of a","friend of a","") + pick("high ranking","important","well-liked")] mercenary [pick("Leader","Officer","Agent","sympathiser")]. Make sure they get off the station safely, while minimizing intervention."
|
||||
|
||||
check_completion()
|
||||
if(!emergency_shuttle.returned())
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
NUCLEAR EMERGENCY ROUNDTYPE
|
||||
MERCENARY ROUNDTYPE
|
||||
*/
|
||||
|
||||
var/global/list/turf/synd_spawn = list()
|
||||
@@ -10,7 +10,7 @@ var/global/list/turf/synd_spawn = list()
|
||||
|
||||
|
||||
/datum/game_mode/nuclear
|
||||
name = "nuclear emergency"
|
||||
name = "mercenary"
|
||||
config_tag = "nuclear"
|
||||
required_players = 15
|
||||
required_players_secret = 25 // 25 players - 5 players to be the nuke ops = 20 players remaining
|
||||
@@ -30,9 +30,8 @@ var/global/list/turf/synd_spawn = list()
|
||||
|
||||
|
||||
/datum/game_mode/nuclear/announce()
|
||||
world << "<B>The current game mode is - Nuclear Emergency!</B>"
|
||||
world << "<B>The current game mode is - Mercenary!</B>"
|
||||
world << "<B>A [syndicate_name()] Strike Force is approaching [station_name()]!</B>"
|
||||
world << "A nuclear explosive was being transported by Nanotrasen to a military base. The transport ship mysteriously lost contact with Space Traffic Control (STC). About that time a strange disk was discovered around [station_name()]. It was identified by Nanotrasen as a nuclear auth. disk and now Syndicate Operatives have arrived to retake the disk and detonate SS13! Also, most likely Syndicate star ships are in the vicinity so take care not to lose the disk!\n<B>Syndicate</B>: Reclaim the disk and detonate the nuclear bomb anywhere on SS13.\n<B>Personnel</B>: Hold the disk and <B>escape with the disk</B> on the shuttle!"
|
||||
|
||||
/datum/game_mode/nuclear/can_start()//This could be better, will likely have to recode it later
|
||||
if(!..())
|
||||
@@ -69,7 +68,7 @@ var/global/list/turf/synd_spawn = list()
|
||||
|
||||
for(var/datum/mind/synd_mind in syndicates)
|
||||
synd_mind.assigned_role = "MODE" //So they aren't chosen for other jobs.
|
||||
synd_mind.special_role = "Syndicate"//So they actually have a special role/N
|
||||
synd_mind.special_role = "Mercenary"//So they actually have a special role/N
|
||||
return 1
|
||||
|
||||
|
||||
@@ -127,7 +126,7 @@ var/global/list/turf/synd_spawn = list()
|
||||
var/obj/effect/landmark/nuke_spawn = locate("landmark*Nuclear-Bomb")
|
||||
|
||||
var/nuke_code = "[rand(10000, 99999)]"
|
||||
var/leader_selected = 0
|
||||
var/datum/mind/leader = null
|
||||
var/spawnpos = 1
|
||||
|
||||
for(var/datum/mind/synd_mind in syndicates)
|
||||
@@ -143,9 +142,9 @@ var/global/list/turf/synd_spawn = list()
|
||||
greet_syndicate(synd_mind)
|
||||
equip_syndicate(synd_mind.current)
|
||||
|
||||
if(!leader_selected)
|
||||
if(!leader)
|
||||
prepare_syndicate_leader(synd_mind, nuke_code)
|
||||
leader_selected = 1
|
||||
leader = synd_mind
|
||||
|
||||
spawnpos++
|
||||
update_synd_icons_added(synd_mind)
|
||||
@@ -154,6 +153,8 @@ var/global/list/turf/synd_spawn = list()
|
||||
|
||||
if(uplinkdevice)
|
||||
var/obj/item/device/radio/uplink/U = new(uplinkdevice.loc)
|
||||
if(leader)
|
||||
U.hidden_uplink.uplink_owner = leader
|
||||
U.hidden_uplink.uses = 40
|
||||
if(nuke_spawn && synd_spawn.len > 0)
|
||||
var/obj/machinery/nuclearbomb/the_bomb = new /obj/machinery/nuclearbomb(nuke_spawn.loc)
|
||||
@@ -168,7 +169,7 @@ var/global/list/turf/synd_spawn = list()
|
||||
/datum/game_mode/proc/prepare_syndicate_leader(var/datum/mind/synd_mind, var/nuke_code)
|
||||
var/obj/effect/landmark/code_spawn = locate("landmark*Nuclear-Code")
|
||||
if (nuke_code)
|
||||
synd_mind.store_memory("<B>Syndicate Nuclear Bomb Code</B>: [nuke_code]", 0, 0)
|
||||
synd_mind.store_memory("<B>Nuclear Bomb Code</B>: [nuke_code]", 0, 0)
|
||||
synd_mind.current << "The nuclear authorization code is: <B>[nuke_code]</B>"
|
||||
synd_mind.current << "To speak on the strike team's private channel use :t"
|
||||
var/obj/item/weapon/paper/P = new
|
||||
@@ -198,7 +199,7 @@ var/global/list/turf/synd_spawn = list()
|
||||
|
||||
/datum/game_mode/proc/greet_syndicate(var/datum/mind/syndicate, var/you_are=1)
|
||||
if (you_are)
|
||||
syndicate.current << "\blue You are a [syndicate_name()] agent!"
|
||||
syndicate.current << "\blue You are a [syndicate_name()] operative!"
|
||||
show_objectives(syndicate)
|
||||
|
||||
/datum/game_mode/proc/random_radio_frequency()
|
||||
@@ -280,9 +281,9 @@ var/global/list/turf/synd_spawn = list()
|
||||
//derp //Used for tracking if the syndies actually haul the nuke to the station //no
|
||||
//herp //Used for tracking if the syndies got the shuttle off of the z-level //NO, DON'T FUCKING NAME VARS LIKE THIS
|
||||
|
||||
if (!disk_rescued && station_was_nuked && !syndies_didnt_escape)
|
||||
if(!disk_rescued && station_was_nuked && !syndies_didnt_escape)
|
||||
feedback_set_details("round_end_result","win - syndicate nuke")
|
||||
world << "<FONT size = 3><B>Syndicate Major Victory!</B></FONT>"
|
||||
world << "<FONT size = 3><B>Mercenary Major Victory!</B></FONT>"
|
||||
world << "<B>[syndicate_name()] operatives have destroyed [station_name()]!</B>"
|
||||
|
||||
else if (!disk_rescued && station_was_nuked && syndies_didnt_escape)
|
||||
@@ -312,12 +313,12 @@ var/global/list/turf/synd_spawn = list()
|
||||
|
||||
else if (!disk_rescued && is_operatives_are_dead())
|
||||
feedback_set_details("round_end_result","loss - evacuation - disk not secured")
|
||||
world << "<FONT size = 3><B>Syndicate Minor Victory!</B></FONT>"
|
||||
world << "<FONT size = 3><B>Mercenary Minor Victory!</B></FONT>"
|
||||
world << "<B>The Research Staff failed to secure the authentication disk but did manage to kill most of the [syndicate_name()] Operatives!</B>"
|
||||
|
||||
else if (!disk_rescued && crew_evacuated)
|
||||
feedback_set_details("round_end_result","halfwin - detonation averted")
|
||||
world << "<FONT size = 3><B>Syndicate Minor Victory!</B></FONT>"
|
||||
world << "<FONT size = 3><B>Mercenary Minor Victory!</B></FONT>"
|
||||
world << "<B>[syndicate_name()] operatives recovered the abandoned authentication disk but detonation of [station_name()] was averted.</B> Next time, don't lose the disk!"
|
||||
|
||||
else if (!disk_rescued && !crew_evacuated)
|
||||
@@ -331,21 +332,10 @@ var/global/list/turf/synd_spawn = list()
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_nuclear()
|
||||
if( syndicates.len || (ticker && istype(ticker.mode,/datum/game_mode/nuclear)) )
|
||||
var/text = "<FONT size = 2><B>The syndicate operatives were:</B></FONT>"
|
||||
var/text = "<FONT size = 2><B>The mercenaries were:</B></FONT>"
|
||||
|
||||
for(var/datum/mind/syndicate in syndicates)
|
||||
|
||||
text += "<br>[syndicate.key] was [syndicate.name] ("
|
||||
if(syndicate.current)
|
||||
if(syndicate.current.stat == DEAD)
|
||||
text += "died"
|
||||
else
|
||||
text += "survived"
|
||||
if(syndicate.current.real_name != syndicate.name)
|
||||
text += " as [syndicate.current.real_name]"
|
||||
else
|
||||
text += "body destroyed"
|
||||
text += ")"
|
||||
text += printplayer(syndicate)
|
||||
|
||||
world << text
|
||||
return 1
|
||||
|
||||
@@ -396,14 +396,14 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
|
||||
var/off_station = 0
|
||||
var/turf/bomb_location = get_turf(src)
|
||||
if( bomb_location && (bomb_location.z == 1) )
|
||||
if(bomb_location && (bomb_location.z in config.station_levels))
|
||||
if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) )
|
||||
off_station = 1
|
||||
else
|
||||
off_station = 2
|
||||
|
||||
if(ticker)
|
||||
if(ticker.mode && ticker.mode.name == "nuclear emergency")
|
||||
if(ticker.mode && ticker.mode.name == "mercenary")
|
||||
var/obj/machinery/computer/shuttle_control/multi/syndicate/syndie_location = locate(/obj/machinery/computer/shuttle_control/multi/syndicate)
|
||||
if(syndie_location)
|
||||
ticker.mode:syndies_didnt_escape = (syndie_location.z > 1 ? 0 : 1) //muskets will make me change this, but it will do for now
|
||||
@@ -411,7 +411,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
ticker.station_explosion_cinematic(off_station,null)
|
||||
if(ticker.mode)
|
||||
ticker.mode.explosion_in_progress = 0
|
||||
if(ticker.mode.name == "nuclear emergency")
|
||||
if(ticker.mode.name == "mercenary")
|
||||
ticker.mode:nukes_left --
|
||||
else
|
||||
world << "<B>The station was destoyed by the nuclear blast!</B>"
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
/datum/game_mode/anti_revolution/proc/check_crew_victory()
|
||||
for(var/datum/mind/head_mind in heads)
|
||||
var/turf/T = get_turf(head_mind.current)
|
||||
if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z == 1) && !head_mind.is_brigged(600))
|
||||
if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z in station_levels) && !head_mind.is_brigged(600))
|
||||
if(ishuman(head_mind.current))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
)
|
||||
var/where = mob.equip_in_one_of_slots(T, slots)
|
||||
if (!where)
|
||||
mob << "The Syndicate were unfortunately unable to get you a flash."
|
||||
mob << "Your employers were unfortunately unable to get you a flash."
|
||||
else
|
||||
mob << "The flash in your [where] will help you to persuade the crew to join your cause."
|
||||
mob.update_icons()
|
||||
@@ -337,7 +337,7 @@
|
||||
/datum/game_mode/revolution/proc/check_heads_victory()
|
||||
for(var/datum/mind/rev_mind in head_revolutionaries)
|
||||
var/turf/T = get_turf(rev_mind.current)
|
||||
if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && T && (T.z == 1))
|
||||
if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && T && (T.z in config.station_levels))
|
||||
if(ishuman(rev_mind.current))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -19,16 +19,12 @@
|
||||
var/all_brigged = 0
|
||||
var/brigged_time = 0
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
|
||||
/datum/game_mode/rp_revolution/announce()
|
||||
world << "<B>The current game mode is - Revolution RP!</B>"
|
||||
|
||||
/datum/game_mode/rp_revolution/send_intercept()
|
||||
var/intercepttext = "<FONT size = 3><B>Cent. Com. Update</B> Requested staus information:</FONT><HR>"
|
||||
intercepttext += "<B> Cent. Com has recently been contacted by the following syndicate affiliated organisations in your area, please investigate any information you may have:</B>"
|
||||
intercepttext += "<B> Cent. Com has recently been contacted by the following subervsive or criminal-affiliated organisations in your area, please investigate any information you may have:</B>"
|
||||
|
||||
var/list/possible_modes = list()
|
||||
possible_modes.Add("revolution", "wizard", "traitor", "malf")
|
||||
@@ -95,7 +91,7 @@
|
||||
|
||||
/datum/game_mode/rp_revolution/send_intercept()
|
||||
var/intercepttext = "<FONT size = 3><B>Cent. Com. Update</B> Requested staus information:</FONT><HR>"
|
||||
intercepttext += "<B> Cent. Com has recently been contacted by the following syndicate affiliated organisations in your area, please investigate any information you may have:</B>"
|
||||
intercepttext += "<B> Cent. Com has recently been contacted by the following subversive or criminal-affiliated organisations in your area, please investigate any information you may have:</B>"
|
||||
|
||||
var/list/possible_modes = list()
|
||||
possible_modes.Add("revolution", "wizard", "nuke", "traitor", "malf")
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
// probably wanna export this stuff into a separate function for use by both
|
||||
// revs and heads
|
||||
//assume that only carbon mobs can become rev heads for now
|
||||
if(!rev_mind.current:handcuffed && T && T.z == 1)
|
||||
if(!rev_mind.current:handcuffed && T && T.z in config.station_levels)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
config_tag = "sandbox"
|
||||
required_players = 0
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
/datum/game_mode/sandbox/announce()
|
||||
world << "<B>The current game mode is - Sandbox!</B>"
|
||||
world << "<B>Build your own station with the sandbox-panel command!</B>"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/datum/game_mode/traitor/announce()
|
||||
world << "<B>The current game mode is - Traitor!</B>"
|
||||
world << "<B>There is a syndicate traitor on the station. Do not let the traitor succeed!</B>"
|
||||
world << "<B>There is a foreign agent or traitor on the station. Do not let the traitor succeed!</B>"
|
||||
|
||||
|
||||
/datum/game_mode/traitor/pre_setup()
|
||||
@@ -151,7 +151,7 @@
|
||||
return//Traitors will be checked as part of check_extra_completion. Leaving this here as a reminder.
|
||||
|
||||
/datum/game_mode/proc/give_codewords(mob/living/traitor_mob)
|
||||
traitor_mob << "<u><b>The Syndicate provided you with the following information on how to identify their agents:</b></u>"
|
||||
traitor_mob << "<u><b>Your employers provided you with the following information on how to identify possible allies:</b></u>"
|
||||
traitor_mob << "<b>Code Phrase</b>: <span class='danger'>[syndicate_code_phrase]</span>"
|
||||
traitor_mob << "<b>Code Response</b>: <span class='danger'>[syndicate_code_response]</span>"
|
||||
traitor_mob.mind.store_memory("<b>Code Phrase</b>: [syndicate_code_phrase]")
|
||||
@@ -273,6 +273,7 @@
|
||||
freq = freqlist[rand(1, freqlist.len)]
|
||||
|
||||
var/obj/item/device/uplink/hidden/T = new(R)
|
||||
T.uplink_owner = traitor_mob.mind
|
||||
target_radio.hidden_uplink = T
|
||||
target_radio.traitor_frequency = freq
|
||||
traitor_mob << "A portable object teleportation relay has been installed in your [R.name] [loc]. Simply dial the frequency [format_frequency(freq)] to unlock its hidden features."
|
||||
@@ -282,6 +283,7 @@
|
||||
var/pda_pass = "[rand(100,999)] [pick("Alpha","Bravo","Delta","Omega")]"
|
||||
|
||||
var/obj/item/device/uplink/hidden/T = new(R)
|
||||
T.uplink_owner = traitor_mob.mind
|
||||
R.hidden_uplink = T
|
||||
var/obj/item/device/pda/P = R
|
||||
P.lock_code = pda_pass
|
||||
|
||||
@@ -341,6 +341,7 @@ var/global/datum/controller/occupations/job_master
|
||||
for(var/mob/new_player/player in unassigned)
|
||||
if(player.client.prefs.alternate_option == RETURN_TO_LOBBY)
|
||||
player.ready = 0
|
||||
player.new_player_panel_proc()
|
||||
unassigned -= player
|
||||
return 1
|
||||
|
||||
|
||||
@@ -336,8 +336,12 @@
|
||||
|
||||
|
||||
proc/inject_chemical(mob/living/user as mob, chemical, amount)
|
||||
if (stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
if(src.occupant && src.occupant.reagents)
|
||||
if(src.occupant.reagents.get_reagent_amount(chemical) + amount <= 20)
|
||||
use_power(amount * CHEM_SYNTH_ENERGY)
|
||||
src.occupant.reagents.add_reagent(chemical, amount)
|
||||
user << "Occupant now has [src.occupant.reagents.get_reagent_amount(chemical)] units of [available_chemicals[chemical]] in his/her bloodstream."
|
||||
return
|
||||
|
||||
@@ -1488,8 +1488,9 @@ FIRE ALARM
|
||||
wiresexposed = 1
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
|
||||
|
||||
if(z == 1 || z == 5)
|
||||
|
||||
/obj/machinery/firealarm/initialize()
|
||||
if(z in config.contact_levels)
|
||||
if(security_level)
|
||||
src.overlays += image('icons/obj/monitors.dmi', "overlay_[get_security_level()]")
|
||||
else
|
||||
|
||||
@@ -643,7 +643,7 @@ Auto Patrol: []"},
|
||||
continue
|
||||
|
||||
if(istype(C, /mob/living/carbon/human))
|
||||
src.threatlevel = src.assess_perp(C)
|
||||
src.threatlevel = src.assess_perp(C, idcheck, check_records, lasercolor)
|
||||
|
||||
else if(istype(M, /mob/living/simple_animal/hostile))
|
||||
if(M.stat == DEAD)
|
||||
@@ -669,78 +669,8 @@ Auto Patrol: []"},
|
||||
else
|
||||
continue
|
||||
|
||||
//If the security records say to arrest them, arrest them
|
||||
//Or if they have weapons and aren't security, arrest them.
|
||||
/obj/machinery/bot/secbot/proc/assess_perp(mob/living/carbon/human/perp as mob)
|
||||
var/threatcount = 0
|
||||
|
||||
if(perp.stat == DEAD)
|
||||
return 0
|
||||
|
||||
if(src.emagged == 2) return 10 //Everyone is a criminal!
|
||||
|
||||
if(src.idcheck && !src.allowed(perp))
|
||||
if(istype(perp.l_hand, /obj/item/weapon/gun) || istype(perp.l_hand, /obj/item/weapon/melee))
|
||||
if(!istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
|
||||
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/redtag) \
|
||||
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/practice))
|
||||
threatcount += 4
|
||||
|
||||
if(istype(perp.r_hand, /obj/item/weapon/gun) || istype(perp.r_hand, /obj/item/weapon/melee))
|
||||
if(!istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
|
||||
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/redtag) \
|
||||
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/practice))
|
||||
threatcount += 4
|
||||
|
||||
if(istype(perp.belt, /obj/item/weapon/gun) || istype(perp.belt, /obj/item/weapon/melee))
|
||||
if(!istype(perp.belt, /obj/item/weapon/gun/energy/laser/bluetag) \
|
||||
&& !istype(perp.belt, /obj/item/weapon/gun/energy/laser/redtag) \
|
||||
&& !istype(perp.belt, /obj/item/weapon/gun/energy/laser/practice))
|
||||
threatcount += 2
|
||||
|
||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/wizrobe))
|
||||
threatcount += 2
|
||||
|
||||
if(perp.dna && perp.dna.mutantrace && perp.dna.mutantrace != "none")
|
||||
threatcount += 2
|
||||
|
||||
//Agent cards lower threatlevel.
|
||||
if(perp.wear_id && istype(perp.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
|
||||
threatcount -= 2
|
||||
|
||||
if(src.lasercolor == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
|
||||
threatcount = 0//They will not, however shoot at people who have guns, because it gets really fucking annoying
|
||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/redtag))
|
||||
threatcount += 4
|
||||
if((istype(perp.r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(perp.l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
|
||||
threatcount += 4
|
||||
if(istype(perp.belt, /obj/item/weapon/gun/energy/laser/redtag))
|
||||
threatcount += 2
|
||||
|
||||
if(src.lasercolor == "r")
|
||||
threatcount = 0
|
||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||
threatcount += 4
|
||||
if((istype(perp.r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(perp.l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
|
||||
threatcount += 4
|
||||
if(istype(perp.belt, /obj/item/weapon/gun/energy/laser/bluetag))
|
||||
threatcount += 2
|
||||
|
||||
if(src.check_records)
|
||||
var/perpname = perp.name
|
||||
if(perp.wear_id)
|
||||
var/obj/item/weapon/card/id/id = perp.wear_id.GetID()
|
||||
if(id)
|
||||
perpname = id.registered_name
|
||||
|
||||
for (var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
|
||||
threatcount = 4
|
||||
break
|
||||
|
||||
return threatcount
|
||||
/obj/machinery/bot/secbot/is_assess_emagged()
|
||||
return emagged == 2
|
||||
|
||||
/obj/machinery/bot/secbot/Bump(M as mob|obj) //Leave no door unopened!
|
||||
if((istype(M, /obj/machinery/door)) && !isnull(src.botcard))
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
if("revolution")
|
||||
if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries))
|
||||
ticker.mode.update_all_rev_icons() //So the icon actually appears
|
||||
if("nuclear emergency")
|
||||
if("mercenary")
|
||||
if(H.mind in ticker.mode.syndicates)
|
||||
ticker.mode.update_all_synd_icons()
|
||||
if("cult")
|
||||
|
||||
@@ -472,7 +472,7 @@ var/global/list/holodeck_programs = list(
|
||||
|
||||
/obj/structure/holohoop
|
||||
name = "basketball hoop"
|
||||
desc = "Boom, Shakalaka!."
|
||||
desc = "Boom, Shakalaka!"
|
||||
icon = 'icons/obj/basketball.dmi'
|
||||
icon_state = "hoop"
|
||||
anchored = 1
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
A.eyeobj.setLoc(get_turf(C))
|
||||
A.client.eye = A.eyeobj
|
||||
return 1
|
||||
|
||||
|
||||
if (!C.can_use() || user.stat || (get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) && !istype(user, /mob/living/silicon)))
|
||||
return 0
|
||||
src.current = C
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
return
|
||||
Syndicate_announce(input, usr)
|
||||
usr << "\blue Message transmitted."
|
||||
log_say("[key_name(usr)] has made a Syndicate announcement: [input]")
|
||||
log_say("[key_name(usr)] has made an illegal announcement: [input]")
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(300)//10 minute cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
|
||||
@@ -458,16 +458,7 @@
|
||||
//Sender isn't faking as someone who exists
|
||||
if(isnull(PDARec))
|
||||
src.linkedServer.send_pda_message("[customrecepient.owner]", "[customsender]","[custommessage]")
|
||||
if (!customrecepient.silent)
|
||||
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, customrecepient.loc))
|
||||
O.show_message(text("\icon[customrecepient] *[customrecepient.ttone]*"))
|
||||
if( customrecepient.loc && ishuman(customrecepient.loc) )
|
||||
var/mob/living/carbon/human/H = customrecepient.loc
|
||||
H << "\icon[customrecepient] <b>Message from [customsender] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
|
||||
log_pda("[usr] (PDA: [customsender]) sent \"[custommessage]\" to [customrecepient.owner]")
|
||||
customrecepient.overlays.Cut()
|
||||
customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r")
|
||||
customrecepient.new_message(customsender, customsender, customjob, custommessage)
|
||||
//Sender is faking as someone who exists
|
||||
else
|
||||
|
||||
@@ -477,16 +468,7 @@
|
||||
if(!customrecepient.conversations.Find("\ref[PDARec]"))
|
||||
customrecepient.conversations.Add("\ref[PDARec]")
|
||||
|
||||
if (!customrecepient.silent)
|
||||
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, customrecepient.loc))
|
||||
O.show_message(text("\icon[customrecepient] *[customrecepient.ttone]*"))
|
||||
if( customrecepient.loc && ishuman(customrecepient.loc) )
|
||||
var/mob/living/carbon/human/H = customrecepient.loc
|
||||
H << "\icon[customrecepient] <b>Message from [PDARec.owner] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[customrecepient];choice=Message;skiprefresh=1;target=\ref[PDARec]'>Reply</a>)"
|
||||
log_pda("[usr] (PDA: [PDARec.owner]) sent \"[custommessage]\" to [customrecepient.owner]")
|
||||
customrecepient.overlays.Cut()
|
||||
customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r")
|
||||
customrecepient.new_message(PDARec, custommessage)
|
||||
//Finally..
|
||||
ResetMessage()
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
|
||||
/obj/machinery/computer/pod/old/syndicate
|
||||
name = "ProComp Executive IIc"
|
||||
desc = "The Syndicate operate on a tight budget. Operates external airlocks."
|
||||
desc = "Criminals often operate on a tight budget. Operates external airlocks."
|
||||
title = "External Airlock Controls"
|
||||
req_access = list(access_syndicate)
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
if(!T.implanted) continue
|
||||
var/loc_display = "Unknown"
|
||||
var/mob/living/carbon/M = T.imp_in
|
||||
if(M.z == 1 && !istype(M.loc, /turf/space))
|
||||
if(M.z in config.station_levels && !istype(M.loc, /turf/space))
|
||||
var/turf/mob_loc = get_turf(M)
|
||||
loc_display = mob_loc.loc
|
||||
if(T.malfunction)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/use = 5
|
||||
var/unlocked = 0
|
||||
var/open = 0
|
||||
var/brightness_on = 999 //can't remember what the maxed out value is
|
||||
var/brightness_on = 8 //can't remember what the maxed out value is
|
||||
|
||||
/obj/machinery/floodlight/New()
|
||||
src.cell = new(src)
|
||||
|
||||
@@ -22,11 +22,14 @@
|
||||
var/shoot_inventory = 0
|
||||
var/locked = 0
|
||||
var/panel_open = 0 //Hacking a smartfridge
|
||||
var/wires = 7
|
||||
var/const/WIRE_SHOCK = 1
|
||||
var/const/WIRE_SHOOTINV = 2
|
||||
var/const/WIRE_SCANID = 3 //Only used by the secure smartfridge, but required by the cut, mend and pulse procs.
|
||||
var/scan_id = 1
|
||||
var/datum/wires/smartfridge/wires = null
|
||||
|
||||
/obj/machinery/smartfridge/New()
|
||||
wires = new(src)
|
||||
|
||||
/obj/machinery/smartfridge/Del()
|
||||
del(wires) // qdel
|
||||
|
||||
/obj/machinery/smartfridge/proc/accept_check(var/obj/item/O as obj)
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown/) || istype(O,/obj/item/seeds/))
|
||||
@@ -217,6 +220,8 @@
|
||||
if(seconds_electrified != 0)
|
||||
if(shock(user, 100))
|
||||
return
|
||||
if(panel_open)
|
||||
wires.Interact(user)
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
@@ -248,26 +253,6 @@
|
||||
if (items.len > 0)
|
||||
data["contents"] = items
|
||||
|
||||
var/list/vendwires = null
|
||||
if (is_secure)
|
||||
vendwires = list(
|
||||
"Violet" = 1,
|
||||
"Orange" = 2,
|
||||
"Green" = 3)
|
||||
else
|
||||
vendwires = list(
|
||||
"Blue" = 1,
|
||||
"Red" = 2,
|
||||
"Black" = 3)
|
||||
|
||||
var/list/vendor_wires[0]
|
||||
for (var/wire in vendwires)
|
||||
var is_uncut = wires & APCWireColorToFlag[vendwires[wire]]
|
||||
vendor_wires.Add(list(list("wire" = wire, "cut" = !is_uncut, "index" = vendwires[wire])))
|
||||
|
||||
if (vendor_wires.len > 0)
|
||||
data["wires"] = vendor_wires
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "smartfridge.tmpl", src.name, 400, 500)
|
||||
@@ -306,82 +291,8 @@
|
||||
return 1
|
||||
|
||||
return 1
|
||||
|
||||
if (panel_open)
|
||||
if (href_list["cutwire"])
|
||||
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
||||
user << "You need wirecutters!"
|
||||
return 1
|
||||
|
||||
var/wire_index = text2num(href_list["cutwire"])
|
||||
if (isWireColorCut(wire_index))
|
||||
mend(wire_index)
|
||||
else
|
||||
cut(wire_index)
|
||||
return 1
|
||||
|
||||
if (href_list["pulsewire"])
|
||||
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
return 1
|
||||
|
||||
var/wire_index = text2num(href_list["pulsewire"])
|
||||
if (isWireColorCut(wire_index))
|
||||
usr << "You can't pulse a cut wire."
|
||||
return 1
|
||||
|
||||
pulse(wire_index)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/*************
|
||||
* Hacking
|
||||
**************/
|
||||
|
||||
/obj/machinery/smartfridge/proc/cut(var/wireColor)
|
||||
var/wireFlag = APCWireColorToFlag[wireColor]
|
||||
var/wireIndex = APCWireColorToIndex[wireColor]
|
||||
src.wires &= ~wireFlag
|
||||
switch(wireIndex)
|
||||
if(WIRE_SHOCK)
|
||||
src.seconds_electrified = -1
|
||||
if (WIRE_SHOOTINV)
|
||||
if(!src.shoot_inventory)
|
||||
src.shoot_inventory = 1
|
||||
if(WIRE_SCANID)
|
||||
src.locked = 1
|
||||
|
||||
/obj/machinery/smartfridge/proc/mend(var/wireColor)
|
||||
var/wireFlag = APCWireColorToFlag[wireColor]
|
||||
var/wireIndex = APCWireColorToIndex[wireColor]
|
||||
src.wires |= wireFlag
|
||||
switch(wireIndex)
|
||||
if(WIRE_SHOCK)
|
||||
src.seconds_electrified = 0
|
||||
if (WIRE_SHOOTINV)
|
||||
src.shoot_inventory = 0
|
||||
if(WIRE_SCANID)
|
||||
src.locked = 0
|
||||
|
||||
/obj/machinery/smartfridge/proc/pulse(var/wireColor)
|
||||
var/wireIndex = APCWireColorToIndex[wireColor]
|
||||
switch(wireIndex)
|
||||
if(WIRE_SHOCK)
|
||||
src.seconds_electrified = 30
|
||||
if(WIRE_SHOOTINV)
|
||||
src.shoot_inventory = !src.shoot_inventory
|
||||
if(WIRE_SCANID)
|
||||
src.locked = -1
|
||||
|
||||
/obj/machinery/smartfridge/proc/isWireColorCut(var/wireColor)
|
||||
var/wireFlag = APCWireColorToFlag[wireColor]
|
||||
return ((src.wires & wireFlag) == 0)
|
||||
|
||||
/obj/machinery/smartfridge/proc/isWireCut(var/wireIndex)
|
||||
var/wireFlag = APCIndexToFlag[wireIndex]
|
||||
return ((src.wires & wireFlag) == 0)
|
||||
|
||||
/obj/machinery/smartfridge/proc/throw_item()
|
||||
var/obj/throw_item = null
|
||||
var/mob/living/target = locate() in view(7,src)
|
||||
|
||||
@@ -113,8 +113,11 @@ Class Procs:
|
||||
|
||||
/obj/machinery/New()
|
||||
..()
|
||||
machines += src
|
||||
machinery_sort_required = 1
|
||||
if(!machinery_sort_required && ticker)
|
||||
dd_insertObjectList(machines, src)
|
||||
else
|
||||
machines += src
|
||||
machinery_sort_required = 1
|
||||
|
||||
/obj/machinery/Del()
|
||||
machines -= src
|
||||
@@ -305,3 +308,76 @@ 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/lasercolor)
|
||||
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
|
||||
|
||||
if(auth_weapons && !src.allowed(perp))
|
||||
if(istype(perp.l_hand, /obj/item/weapon/gun) || istype(perp.l_hand, /obj/item/weapon/melee))
|
||||
if(!istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
|
||||
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/redtag) \
|
||||
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/practice))
|
||||
threatcount += 4
|
||||
|
||||
if(istype(perp.r_hand, /obj/item/weapon/gun) || istype(perp.r_hand, /obj/item/weapon/melee))
|
||||
if(!istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
|
||||
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/redtag) \
|
||||
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/practice))
|
||||
threatcount += 4
|
||||
|
||||
if(istype(perp.belt, /obj/item/weapon/gun) || istype(perp.belt, /obj/item/weapon/melee))
|
||||
if(!istype(perp.belt, /obj/item/weapon/gun/energy/laser/bluetag) \
|
||||
&& !istype(perp.belt, /obj/item/weapon/gun/energy/laser/redtag) \
|
||||
&& !istype(perp.belt, /obj/item/weapon/gun/energy/laser/practice))
|
||||
threatcount += 2
|
||||
|
||||
if(perp.dna && perp.dna.mutantrace && perp.dna.mutantrace != "none")
|
||||
threatcount += 2
|
||||
|
||||
//Agent cards lower threatlevel.
|
||||
if(perp.wear_id && istype(perp.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
|
||||
threatcount -= 2
|
||||
|
||||
if(lasercolor == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
|
||||
threatcount = 0//They will not, however shoot at people who have guns, because it gets really fucking annoying
|
||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/redtag))
|
||||
threatcount += 4
|
||||
if((istype(perp.r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(perp.l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
|
||||
threatcount += 4
|
||||
if(istype(perp.belt, /obj/item/weapon/gun/energy/laser/redtag))
|
||||
threatcount += 2
|
||||
|
||||
if(lasercolor == "r")
|
||||
threatcount = 0
|
||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||
threatcount += 4
|
||||
if((istype(perp.r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(perp.l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
|
||||
threatcount += 4
|
||||
if(istype(perp.belt, /obj/item/weapon/gun/energy/laser/bluetag))
|
||||
threatcount += 2
|
||||
|
||||
if(check_records)
|
||||
var/perpname = perp.name
|
||||
if(perp.wear_id)
|
||||
var/obj/item/weapon/card/id/id = perp.wear_id.GetID()
|
||||
if(id)
|
||||
perpname = id.registered_name
|
||||
|
||||
var/datum/data/record/R = find_record("name", perpname, data_core.security)
|
||||
if(!R || (R.fields["criminal"] == "*Arrest*"))
|
||||
threatcount += 4
|
||||
|
||||
return threatcount
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/author =""
|
||||
var/body =""
|
||||
var/message_type ="Story"
|
||||
//var/parent_channel
|
||||
var/datum/feed_channel/parent_channel
|
||||
var/backup_body =""
|
||||
var/backup_author =""
|
||||
var/is_admin_message = 0
|
||||
@@ -22,8 +22,15 @@
|
||||
var/backup_author=""
|
||||
var/censored=0
|
||||
var/is_admin_channel=0
|
||||
var/updated = 0
|
||||
//var/page = null //For newspapers
|
||||
|
||||
/datum/feed_channel/proc/announce_news()
|
||||
return "Breaking news from [channel_name]!"
|
||||
|
||||
/datum/feed_channel/station/announce_news()
|
||||
return "New Station Announcement Available"
|
||||
|
||||
/datum/feed_message/proc/clear()
|
||||
src.author = ""
|
||||
src.body = ""
|
||||
@@ -31,6 +38,10 @@
|
||||
src.backup_author = ""
|
||||
src.img = null
|
||||
src.backup_img = null
|
||||
parent_channel.update()
|
||||
|
||||
/datum/feed_channel/proc/update()
|
||||
updated = world.time
|
||||
|
||||
/datum/feed_channel/proc/clear()
|
||||
src.channel_name = ""
|
||||
@@ -40,11 +51,47 @@
|
||||
src.backup_author = ""
|
||||
src.censored = 0
|
||||
src.is_admin_channel = 0
|
||||
update()
|
||||
|
||||
/datum/feed_network
|
||||
var/list/datum/feed_channel/network_channels = list()
|
||||
var/datum/feed_message/wanted_issue
|
||||
|
||||
/datum/feed_network/proc/add_news(var/channel_name, var/datum/feed_message/newMsg)
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
if(FC.channel_name == channel_name)
|
||||
insert_message_in_channel(FC, newMsg)
|
||||
break
|
||||
|
||||
/datum/feed_network/proc/insert_message_in_channel(var/datum/feed_channel/FC, var/datum/feed_message/newMsg)
|
||||
FC.messages += newMsg //Adding message to the network's appropriate feed_channel
|
||||
newMsg.parent_channel = FC
|
||||
FC.update()
|
||||
var/announcement = FC.announce_news()
|
||||
alert_readers(announcement)
|
||||
|
||||
/datum/feed_network/proc/alert_readers(var/annoncement)
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
NEWSCASTER.newsAlert(annoncement)
|
||||
NEWSCASTER.update_icon()
|
||||
|
||||
var/list/receiving_pdas = new
|
||||
for (var/obj/item/device/pda/P in PDAs)
|
||||
if (!P.owner)
|
||||
continue
|
||||
if (P.toff)
|
||||
continue
|
||||
receiving_pdas += P
|
||||
|
||||
spawn(0) // get_receptions sleeps further down the line, spawn of elsewhere
|
||||
var/datum/receptions/receptions = get_receptions(null, receiving_pdas) // datums are not atoms, thus we have to assume the newscast network always has reception
|
||||
|
||||
for(var/obj/item/device/pda/PDA in receiving_pdas)
|
||||
if(!(receptions.receiver_reception[PDA] & TELECOMMS_RECEPTION_RECEIVER))
|
||||
continue
|
||||
|
||||
PDA.new_news(annoncement)
|
||||
|
||||
var/datum/feed_network/news_network = new /datum/feed_network //The global news-network, which is coincidentally a global list.
|
||||
|
||||
var/list/obj/machinery/newscaster/allCasters = list() //Global list that will contain reference to all newscasters in existence.
|
||||
@@ -506,13 +553,8 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
if(photo)
|
||||
newMsg.img = photo.img
|
||||
feedback_inc("newscaster_stories",1)
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
if(FC.channel_name == src.channel_name)
|
||||
FC.messages += newMsg //Adding message to the network's appropriate feed_channel
|
||||
break
|
||||
news_network.add_news(src.channel_name, newMsg)
|
||||
src.screen=4
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
NEWSCASTER.newsAlert(src.channel_name)
|
||||
|
||||
src.updateUsrDialog()
|
||||
|
||||
@@ -581,9 +623,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
if(photo)
|
||||
WANTED.img = photo.img
|
||||
news_network.wanted_issue = WANTED
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
NEWSCASTER.newsAlert()
|
||||
NEWSCASTER.update_icon()
|
||||
news_network.alert_readers()
|
||||
src.screen = 15
|
||||
else
|
||||
if(news_network.wanted_issue.is_admin_message)
|
||||
@@ -623,6 +663,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
FC.author = "<B>\[REDACTED\]</B>"
|
||||
else
|
||||
FC.author = FC.backup_author
|
||||
FC.update()
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["censor_channel_story_author"])
|
||||
@@ -635,6 +676,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
MSG.author = "<B>\[REDACTED\]</B>"
|
||||
else
|
||||
MSG.author = MSG.backup_author
|
||||
MSG.parent_channel.update()
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["censor_channel_story_body"])
|
||||
@@ -652,6 +694,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
MSG.body = "<B>\[REDACTED\]</B>"
|
||||
else
|
||||
MSG.body = MSG.backup_body
|
||||
MSG.parent_channel.update()
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["pick_d_notice"])
|
||||
@@ -666,6 +709,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
alert("This channel was created by a Nanotrasen Officer. You cannot place a D-Notice upon it.","Ok")
|
||||
return
|
||||
FC.censored = !FC.censored
|
||||
FC.update()
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["view"])
|
||||
@@ -698,6 +742,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
src.updateUsrDialog()
|
||||
|
||||
|
||||
|
||||
/obj/machinery/newscaster/attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
/* if (istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda) ) //Name verification for channels or messages
|
||||
@@ -959,11 +1004,11 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
///obj/machinery/newscaster/process() //Was thinking of doing the icon update through process, but multiple iterations per second does not
|
||||
// return //bode well with a newscaster network of 10+ machines. Let's just return it, as it's added in the machines list.
|
||||
|
||||
/obj/machinery/newscaster/proc/newsAlert(channel) //This isn't Agouri's work, for it is ugly and vile.
|
||||
/obj/machinery/newscaster/proc/newsAlert(var/news_call) //This isn't Agouri's work, for it is ugly and vile.
|
||||
var/turf/T = get_turf(src) //Who the fuck uses spawn(600) anyway, jesus christ
|
||||
if(channel)
|
||||
if(news_call)
|
||||
for(var/mob/O in hearers(world.view-1, T))
|
||||
O.show_message("<span class='newscaster'><EM>[src.name]</EM> beeps, \"Breaking news from [channel]!\"</span>",2)
|
||||
O.show_message("<span class='newscaster'><EM>[src.name]</EM> beeps, \"[news_call]\"</span>",2)
|
||||
src.alert = 1
|
||||
src.update_icon()
|
||||
spawn(300)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -204,86 +204,6 @@
|
||||
if("time")
|
||||
mode = STATUS_DISPLAY_TIME
|
||||
|
||||
/obj/machinery/ai_status_display
|
||||
icon = 'icons/obj/status_display.dmi'
|
||||
icon_state = "frame"
|
||||
name = "AI display"
|
||||
anchored = 1
|
||||
density = 0
|
||||
|
||||
var/mode = 0 // 0 = Blank
|
||||
// 1 = AI emoticon
|
||||
// 2 = Blue screen of death
|
||||
|
||||
var/picture_state // icon_state of ai picture
|
||||
|
||||
var/emotion = "Neutral"
|
||||
|
||||
/obj/machinery/ai_status_display/process()
|
||||
if(stat & NOPOWER)
|
||||
overlays.Cut()
|
||||
return
|
||||
|
||||
update()
|
||||
|
||||
/obj/machinery/ai_status_display/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
return
|
||||
set_picture("ai_bsod")
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/ai_status_display/proc/update()
|
||||
if(mode==0) //Blank
|
||||
overlays.Cut()
|
||||
return
|
||||
|
||||
if(mode==1) // AI emoticon
|
||||
switch(emotion)
|
||||
if("Very Happy")
|
||||
set_picture("ai_veryhappy")
|
||||
if("Happy")
|
||||
set_picture("ai_happy")
|
||||
if("Neutral")
|
||||
set_picture("ai_neutral")
|
||||
if("Unsure")
|
||||
set_picture("ai_unsure")
|
||||
if("Confused")
|
||||
set_picture("ai_confused")
|
||||
if("Sad")
|
||||
set_picture("ai_sad")
|
||||
if("Surprised")
|
||||
set_picture("ai_surprised")
|
||||
if("Upset")
|
||||
set_picture("ai_upset")
|
||||
if("Angry")
|
||||
set_picture("ai_angry")
|
||||
if("BSOD")
|
||||
set_picture("ai_bsod")
|
||||
if("Blank")
|
||||
set_picture("ai_off")
|
||||
if("Problems?")
|
||||
set_picture("ai_trollface")
|
||||
if("Awesome")
|
||||
set_picture("ai_awesome")
|
||||
if("Dorfy")
|
||||
set_picture("ai_urist")
|
||||
if("Facepalm")
|
||||
set_picture("ai_facepalm")
|
||||
if("Friend Computer")
|
||||
set_picture("ai_friend")
|
||||
return
|
||||
|
||||
if(mode==2) // BSOD
|
||||
set_picture("ai_bsod")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/ai_status_display/proc/set_picture(var/state)
|
||||
picture_state = state
|
||||
if(overlays.len)
|
||||
overlays.Cut()
|
||||
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
|
||||
|
||||
#undef CHARS_PER_LINE
|
||||
#undef FOND_SIZE
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/datum/ai_emotion
|
||||
var/overlay
|
||||
var/ckey
|
||||
|
||||
/datum/ai_emotion/New(var/over, var/key)
|
||||
overlay = over
|
||||
ckey = key
|
||||
|
||||
var/list/ai_status_emotions = list(
|
||||
"Very Happy" = new /datum/ai_emotion("ai_veryhappy"),
|
||||
"Happy" = new /datum/ai_emotion("ai_happy"),
|
||||
"Neutral" = new /datum/ai_emotion("ai_neutral"),
|
||||
"Unsure" = new /datum/ai_emotion("ai_unsure"),
|
||||
"Confused" = new /datum/ai_emotion("ai_confused"),
|
||||
"Sad" = new /datum/ai_emotion("ai_sad"),
|
||||
"Surprised" = new /datum/ai_emotion("ai_surprised"),
|
||||
"Upset" = new /datum/ai_emotion("ai_upset"),
|
||||
"Angry" = new /datum/ai_emotion("ai_angry"),
|
||||
"BSOD" = new /datum/ai_emotion("ai_bsod"),
|
||||
"Blank" = new /datum/ai_emotion("ai_off"),
|
||||
"Problems?" = new /datum/ai_emotion("ai_trollface"),
|
||||
"Awesome" = new /datum/ai_emotion("ai_awesome"),
|
||||
"Dorfy" = new /datum/ai_emotion("ai_urist"),
|
||||
"Facepalm" = new /datum/ai_emotion("ai_facepalm"),
|
||||
"Friend Computer" = new /datum/ai_emotion("ai_friend"),
|
||||
"Tribunal" = new /datum/ai_emotion("ai_tribunal", "serithi"),
|
||||
"Tribunal Malfunctioning" = new /datum/ai_emotion("ai_tribunal_malf", "serithi")
|
||||
)
|
||||
|
||||
/proc/get_ai_emotions(var/ckey)
|
||||
var/list/emotions = new
|
||||
for(var/emotion_name in ai_status_emotions)
|
||||
var/datum/ai_emotion/emotion = ai_status_emotions[emotion_name]
|
||||
if(!emotion.ckey || emotion.ckey == ckey)
|
||||
emotions += emotion_name
|
||||
|
||||
return emotions
|
||||
|
||||
/proc/set_ai_status_displays(mob/user as mob)
|
||||
var/list/ai_emotions = get_ai_emotions(user.ckey)
|
||||
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
|
||||
for (var/obj/machinery/M in machines) //change status
|
||||
if(istype(M, /obj/machinery/ai_status_display))
|
||||
var/obj/machinery/ai_status_display/AISD = M
|
||||
AISD.emotion = emote
|
||||
//if Friend Computer, change ALL displays
|
||||
else if(istype(M, /obj/machinery/status_display))
|
||||
|
||||
var/obj/machinery/status_display/SD = M
|
||||
if(emote=="Friend Computer")
|
||||
SD.friendc = 1
|
||||
else
|
||||
SD.friendc = 0
|
||||
|
||||
/obj/machinery/ai_status_display
|
||||
icon = 'icons/obj/status_display.dmi'
|
||||
icon_state = "frame"
|
||||
name = "AI display"
|
||||
anchored = 1
|
||||
density = 0
|
||||
|
||||
var/mode = 0 // 0 = Blank
|
||||
// 1 = AI emoticon
|
||||
// 2 = Blue screen of death
|
||||
|
||||
var/picture_state // icon_state of ai picture
|
||||
|
||||
var/emotion = "Neutral"
|
||||
|
||||
/obj/machinery/ai_status_display/attack_ai/(mob/user as mob)
|
||||
var/list/ai_emotions = get_ai_emotions(user.ckey)
|
||||
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
|
||||
src.emotion = emote
|
||||
|
||||
/obj/machinery/ai_status_display/proc/update()
|
||||
if(mode==0) //Blank
|
||||
overlays.Cut()
|
||||
return
|
||||
|
||||
if(mode==1) // AI emoticon
|
||||
var/datum/ai_emotion/ai_emotion = ai_status_emotions[emotion]
|
||||
set_picture(ai_emotion.overlay)
|
||||
return
|
||||
|
||||
if(mode==2) // BSOD
|
||||
set_picture("ai_bsod")
|
||||
return
|
||||
|
||||
/obj/machinery/ai_status_display/proc/set_picture(var/state)
|
||||
picture_state = state
|
||||
if(overlays.len)
|
||||
overlays.Cut()
|
||||
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
|
||||
@@ -27,7 +27,6 @@
|
||||
var/safetieson = 1
|
||||
var/cycletime_left = 0
|
||||
|
||||
|
||||
//The units themselves/////////////////
|
||||
|
||||
/obj/machinery/suit_storage_unit/standard_unit
|
||||
@@ -591,13 +590,7 @@
|
||||
var/locked = 1 // If locked, nothing can be taken from or added to the cycler.
|
||||
var/panel_open = 0 // Hacking!
|
||||
var/can_repair // If set, the cycler can repair hardsuits.
|
||||
|
||||
// Wiring bollocks.
|
||||
var/wires = 15
|
||||
var/electrified = 0
|
||||
var/const/WIRE_EXTEND = 1 // Safeties
|
||||
var/const/WIRE_SCANID = 2 // Locked status
|
||||
var/const/WIRE_SHOCK = 3 // What it says on the tin.
|
||||
|
||||
//Departments that the cycler can paint suits to look like.
|
||||
var/list/departments = list("Engineering","Mining","Medical","Security","Atmos")
|
||||
@@ -611,12 +604,20 @@
|
||||
var/obj/item/clothing/suit/space/rig/suit = null
|
||||
var/obj/item/clothing/head/helmet/space/helmet = null
|
||||
|
||||
var/datum/wires/suit_storage_unit/wires = null
|
||||
|
||||
/obj/machinery/suit_cycler/New()
|
||||
..()
|
||||
|
||||
wires = new(src)
|
||||
target_department = departments[1]
|
||||
target_species = species[1]
|
||||
if(!target_department || !target_species) del(src)
|
||||
|
||||
/obj/machinery/suit_cycler/Del()
|
||||
del(wires) // qdel
|
||||
wires = null
|
||||
|
||||
/obj/machinery/suit_cycler/engineering
|
||||
name = "Engineering suit cycler"
|
||||
model_text = "Engineering"
|
||||
@@ -820,31 +821,15 @@
|
||||
dat += "<A href='?src=\ref[src];apply_paintjob=1'><br>\[apply customisation routine\]</a><br><hr>"
|
||||
|
||||
if(panel_open)
|
||||
var/list/vendwires = list(
|
||||
"Violet" = 1,
|
||||
"Orange" = 2,
|
||||
"Goldenrod" = 3,
|
||||
)
|
||||
dat += "<h2><B>Access Panel</B></h2>"
|
||||
for(var/wiredesc in vendwires)
|
||||
var/is_uncut = src.wires & APCWireColorToFlag[vendwires[wiredesc]]
|
||||
dat += "[wiredesc] wire: "
|
||||
if(!is_uncut)
|
||||
dat += "<a href='?src=\ref[src];cutwire=[vendwires[wiredesc]]'>Mend</a>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];cutwire=[vendwires[wiredesc]]'>Cut</a> "
|
||||
dat += "<a href='?src=\ref[src];pulsewire=[vendwires[wiredesc]]'>Pulse</a> "
|
||||
dat += "<br>"
|
||||
|
||||
dat += "<br>"
|
||||
dat += "The orange light is [(electrified == 0) ? "off" : "on"].<BR>"
|
||||
dat += "The red light is [safeties ? "blinking" : "off"].<BR>"
|
||||
dat += "The yellow light is [locked ? "on" : "off"].<BR>"
|
||||
dat += wires()
|
||||
|
||||
user << browse(dat, "window=suit_cycler")
|
||||
onclose(user, "suit_cycler")
|
||||
return
|
||||
|
||||
/obj/machinery/suit_cycler/proc/wires()
|
||||
return wires.GetInteractWindow()
|
||||
|
||||
/obj/machinery/suit_cycler/Topic(href, href_list)
|
||||
if(href_list["eject_suit"])
|
||||
if(!suit) return
|
||||
@@ -916,27 +901,6 @@
|
||||
if(radiation_level > 1)
|
||||
suit.clean_blood()
|
||||
|
||||
else if ((href_list["cutwire"]) && (src.panel_open))
|
||||
var/twire = text2num(href_list["cutwire"])
|
||||
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
||||
usr << "You need wirecutters!"
|
||||
return
|
||||
if (src.isWireColorCut(twire))
|
||||
src.mend(twire)
|
||||
else
|
||||
src.cut(twire)
|
||||
|
||||
else if ((href_list["pulsewire"]) && (src.panel_open))
|
||||
var/twire = text2num(href_list["pulsewire"])
|
||||
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
return
|
||||
if (src.isWireColorCut(twire))
|
||||
usr << "You can't pulse a cut wire."
|
||||
return
|
||||
else
|
||||
src.pulse(twire)
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -1017,46 +981,6 @@
|
||||
|
||||
return
|
||||
|
||||
//HACKING PROCS, MOSTLY COPIED FROM VENDING MACHINES
|
||||
/obj/machinery/suit_cycler/proc/isWireColorCut(var/wireColor)
|
||||
var/wireFlag = APCWireColorToFlag[wireColor]
|
||||
return ((src.wires & wireFlag) == 0)
|
||||
|
||||
/obj/machinery/suit_cycler/proc/isWireCut(var/wireIndex)
|
||||
var/wireFlag = APCIndexToFlag[wireIndex]
|
||||
return ((src.wires & wireFlag) == 0)
|
||||
|
||||
/obj/machinery/suit_cycler/proc/cut(var/wireColor)
|
||||
var/wireFlag = APCWireColorToFlag[wireColor]
|
||||
var/wireIndex = APCWireColorToIndex[wireColor]
|
||||
src.wires &= ~wireFlag
|
||||
switch(wireIndex)
|
||||
|
||||
if(WIRE_EXTEND)
|
||||
safeties = 0
|
||||
if(WIRE_SHOCK)
|
||||
electrified = -1
|
||||
if (WIRE_SCANID)
|
||||
locked = 0
|
||||
|
||||
/obj/machinery/suit_cycler/proc/mend(var/wireColor)
|
||||
var/wireFlag = APCWireColorToFlag[wireColor]
|
||||
var/wireIndex = APCWireColorToIndex[wireColor] //not used in this function
|
||||
src.wires |= wireFlag
|
||||
switch(wireIndex)
|
||||
if(WIRE_SHOCK)
|
||||
src.electrified = 0
|
||||
|
||||
/obj/machinery/suit_cycler/proc/pulse(var/wireColor)
|
||||
var/wireIndex = APCWireColorToIndex[wireColor]
|
||||
switch(wireIndex)
|
||||
if(WIRE_EXTEND)
|
||||
safeties = !locked
|
||||
if(WIRE_SHOCK)
|
||||
electrified = 30
|
||||
if (WIRE_SCANID)
|
||||
locked = !locked
|
||||
|
||||
//There HAS to be a less bloated way to do this. TODO: some kind of table/icon name coding? ~Z
|
||||
/obj/machinery/suit_cycler/proc/apply_paintjob()
|
||||
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
////////////////////////
|
||||
//Turret Control Panel//
|
||||
////////////////////////
|
||||
|
||||
/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/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/stun
|
||||
enabled = 1
|
||||
icon_state = "control_stun"
|
||||
|
||||
/obj/machinery/turretid/lethal
|
||||
enabled = 1
|
||||
lethal = 1
|
||||
icon_state = "control_kill"
|
||||
|
||||
/obj/machinery/turretid/initialize()
|
||||
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
|
||||
power_change() //Checks power and initial settings
|
||||
//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)
|
||||
if(stat & BROKEN) return
|
||||
if (istype(user, /mob/living/silicon))
|
||||
return src.attack_hand(user)
|
||||
|
||||
if (istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
user << "<span class='danger'>You short out the turret controls' access analysis module.</span>"
|
||||
emagged = 1
|
||||
locked = 0
|
||||
if(user.machine==src)
|
||||
src.attack_hand(user)
|
||||
|
||||
return
|
||||
|
||||
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/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 && !issilicon(user))
|
||||
user << "<span class='notice'>You are too far away.</span>"
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=turretid")
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
var/loc = src.loc
|
||||
if (istype(loc, /turf))
|
||||
var/turf/T = loc
|
||||
loc = T.loc
|
||||
if (!istype(loc, /area))
|
||||
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")
|
||||
//onclose(user, "turretid")
|
||||
var/datum/browser/popup = new(user, "turretid", "Turret Control Panel ([area.name])")
|
||||
popup.set_content(t)
|
||||
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/turretid/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if (src.locked)
|
||||
if (!istype(usr, /mob/living/silicon))
|
||||
usr << "Control panel is locked!"
|
||||
return
|
||||
if (href_list["toggleOn"])
|
||||
src.enabled = !src.enabled
|
||||
src.updateTurrets()
|
||||
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/porta_turret/aTurret in get_area_all_atoms(control_area))
|
||||
aTurret.setState(enabled, lethal)
|
||||
src.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"
|
||||
@@ -338,101 +338,6 @@
|
||||
spawn(13)
|
||||
del(src)
|
||||
|
||||
/obj/machinery/turretid
|
||||
name = "Turret deactivation control"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "motion3"
|
||||
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)
|
||||
if(stat & BROKEN) return
|
||||
if (istype(user, /mob/living/silicon))
|
||||
return src.attack_hand(user)
|
||||
|
||||
if (istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
user << "\red You short out the turret controls' access analysis module."
|
||||
emagged = 1
|
||||
locked = 0
|
||||
if(user.machine==src)
|
||||
src.attack_hand(user)
|
||||
|
||||
return
|
||||
|
||||
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/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")
|
||||
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 = "<TT><B>Turret Control Panel</B> ([area.name])<HR>"
|
||||
|
||||
if(src.locked && (!istype(user, /mob/living/silicon)))
|
||||
t += "<I>(Swipe ID card to unlock control panel.)</I><BR>"
|
||||
else
|
||||
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")
|
||||
onclose(user, "turretid")
|
||||
|
||||
|
||||
/obj/machinery/turret/attack_animal(mob/living/M as mob)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
if(!(stat & BROKEN))
|
||||
@@ -446,47 +351,6 @@
|
||||
M << "\red That object is useless to you."
|
||||
return
|
||||
|
||||
/obj/machinery/turretid/Topic(href, href_list, var/nowindow = 0)
|
||||
if(..(href, href_list))
|
||||
return
|
||||
if (src.locked)
|
||||
if (!istype(usr, /mob/living/silicon))
|
||||
usr << "Control panel is locked!"
|
||||
return
|
||||
if ( get_dist(src, usr) == 0 || issilicon(usr))
|
||||
if (href_list["toggleOn"])
|
||||
src.enabled = !src.enabled
|
||||
src.updateTurrets()
|
||||
else if (href_list["toggleLethal"])
|
||||
src.lethal = !src.lethal
|
||||
src.updateTurrets()
|
||||
if(!nowindow)
|
||||
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()
|
||||
|
||||
/obj/machinery/turretid/proc/update_icons()
|
||||
if (src.enabled)
|
||||
if (src.lethal)
|
||||
icon_state = "motion1"
|
||||
else
|
||||
icon_state = "motion3"
|
||||
else
|
||||
icon_state = "motion0"
|
||||
//CODE FIXED BUT REMOVED
|
||||
// if(control_area) //USE: updates other controls in the area
|
||||
// for (var/obj/machinery/turretid/Turret_Control in world) //I'm not sure if this is what it was
|
||||
// if( Turret_Control.control_area != src.control_area ) continue //supposed to do. Or whether the person
|
||||
// Turret_Control.icon_state = icon_state //who coded it originally was just tired
|
||||
// Turret_Control.enabled = enabled //or something. I don't see any situation
|
||||
// Turret_Control.lethal = lethal //in which this would be used on the current map.
|
||||
//If he wants it back he can uncomment it
|
||||
|
||||
|
||||
/obj/structure/turret/gun_turret
|
||||
name = "Gun Turret"
|
||||
density = 1
|
||||
|
||||
+23
-100
@@ -56,12 +56,9 @@
|
||||
var/shut_up = 1 //Stop spouting those godawful pitches!
|
||||
var/extended_inventory = 0 //can we access the hidden inventory?
|
||||
var/panel_open = 0 //Hacking that vending machine. Gonna get a free candy bar.
|
||||
var/wires = 15
|
||||
var/scan_id = 1
|
||||
var/obj/item/weapon/coin/coin
|
||||
var/const/WIRE_EXTEND = 1
|
||||
var/const/WIRE_SCANID = 2
|
||||
var/const/WIRE_SHOCK = 3
|
||||
var/const/WIRE_SHOOTINV = 4
|
||||
var/datum/wires/vending/wires = null
|
||||
|
||||
var/check_accounts = 0 // 1 = requires PIN and checks accounts. 0 = You slide an ID, it vends, SPACE COMMUNISM!
|
||||
var/obj/item/weapon/spacecash/ewallet/ewallet
|
||||
@@ -69,6 +66,7 @@
|
||||
|
||||
/obj/machinery/vending/New()
|
||||
..()
|
||||
wires = new(src)
|
||||
spawn(4)
|
||||
src.slogan_list = text2list(src.product_slogans, ";")
|
||||
|
||||
@@ -87,6 +85,14 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/vending/Del()
|
||||
del(wires) // qdel
|
||||
wires = null
|
||||
if(coin)
|
||||
del(coin) // qdel
|
||||
coin = null
|
||||
..()
|
||||
|
||||
/obj/machinery/vending/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
@@ -354,36 +360,19 @@
|
||||
dat += "</TT>"
|
||||
|
||||
if(panel_open)
|
||||
var/list/vendwires = list(
|
||||
"Violet" = 1,
|
||||
"Orange" = 2,
|
||||
"Goldenrod" = 3,
|
||||
"Green" = 4,
|
||||
)
|
||||
dat += "<br><hr><br><B>Access Panel</B><br>"
|
||||
for(var/wiredesc in vendwires)
|
||||
var/is_uncut = src.wires & APCWireColorToFlag[vendwires[wiredesc]]
|
||||
dat += "[wiredesc] wire: "
|
||||
if(!is_uncut)
|
||||
dat += "<a href='?src=\ref[src];cutwire=[vendwires[wiredesc]]'>Mend</a>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];cutwire=[vendwires[wiredesc]]'>Cut</a> "
|
||||
dat += "<a href='?src=\ref[src];pulsewire=[vendwires[wiredesc]]'>Pulse</a> "
|
||||
dat += "<br>"
|
||||
dat += wires()
|
||||
|
||||
dat += "<br>"
|
||||
dat += "The orange light is [(src.seconds_electrified == 0) ? "off" : "on"].<BR>"
|
||||
dat += "The red light is [src.shoot_inventory ? "off" : "blinking"].<BR>"
|
||||
dat += "The green light is [src.extended_inventory ? "on" : "off"].<BR>"
|
||||
dat += "The [(src.wires & WIRE_SCANID) ? "purple" : "yellow"] light is on.<BR>"
|
||||
|
||||
if (product_slogans != "")
|
||||
dat += "The speaker switch is [src.shut_up ? "off" : "on"]. <a href='?src=\ref[src];togglevoice=[1]'>Toggle</a>"
|
||||
if(product_slogans != "")
|
||||
dat += "The speaker switch is [shut_up ? "off" : "on"]. <a href='?src=\ref[src];togglevoice=[1]'>Toggle</a>"
|
||||
|
||||
user << browse(dat, "window=vending")
|
||||
onclose(user, "")
|
||||
return
|
||||
|
||||
// returns the wire panel text
|
||||
/obj/machinery/vending/proc/wires()
|
||||
return wires.GetInteractWindow()
|
||||
|
||||
/obj/machinery/vending/Topic(href, href_list)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
@@ -425,9 +414,9 @@
|
||||
usr << "\red The vending machine refuses to interface with you, as you are not in its target demographic!"
|
||||
return
|
||||
|
||||
if ((!src.allowed(usr)) && (!src.emagged) && (src.wires & WIRE_SCANID)) //For SECURE VENDING MACHINES YEAH
|
||||
usr << "\red Access denied." //Unless emagged of course
|
||||
flick(src.icon_deny,src)
|
||||
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
|
||||
usr << "<span class='warning'>Access denied.</span>" //Unless emagged of course
|
||||
flick(icon_deny,src)
|
||||
return
|
||||
|
||||
var/idx=text2num(href_list["vend"])
|
||||
@@ -458,27 +447,6 @@
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
else if ((href_list["cutwire"]) && (src.panel_open))
|
||||
var/twire = text2num(href_list["cutwire"])
|
||||
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
||||
usr << "You need wirecutters!"
|
||||
return
|
||||
if (src.isWireColorCut(twire))
|
||||
src.mend(twire)
|
||||
else
|
||||
src.cut(twire)
|
||||
|
||||
else if ((href_list["pulsewire"]) && (src.panel_open))
|
||||
var/twire = text2num(href_list["pulsewire"])
|
||||
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
return
|
||||
if (src.isWireColorCut(twire))
|
||||
usr << "You can't pulse a cut wire."
|
||||
return
|
||||
else
|
||||
src.pulse(twire)
|
||||
|
||||
else if ((href_list["togglevoice"]) && (src.panel_open))
|
||||
src.shut_up = !src.shut_up
|
||||
|
||||
@@ -490,8 +458,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/vending/proc/vend(datum/data/vending_product/R, mob/user)
|
||||
if ((!src.allowed(user)) && (!src.emagged) && (src.wires & WIRE_SCANID)) //For SECURE VENDING MACHINES YEAH
|
||||
user << "\red Access denied." //Unless emagged of course
|
||||
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
|
||||
usr << "<span class='warning'>Access denied.</span>" //Unless emagged of course
|
||||
flick(src.icon_deny,src)
|
||||
return
|
||||
src.vend_ready = 0 //One thing at a time!!
|
||||
@@ -618,51 +586,6 @@
|
||||
src.visible_message("\red <b>[src] launches [throw_item.name] at [target.name]!</b>")
|
||||
return 1
|
||||
|
||||
/obj/machinery/vending/proc/isWireColorCut(var/wireColor)
|
||||
var/wireFlag = APCWireColorToFlag[wireColor]
|
||||
return ((src.wires & wireFlag) == 0)
|
||||
|
||||
/obj/machinery/vending/proc/isWireCut(var/wireIndex)
|
||||
var/wireFlag = APCIndexToFlag[wireIndex]
|
||||
return ((src.wires & wireFlag) == 0)
|
||||
|
||||
/obj/machinery/vending/proc/cut(var/wireColor)
|
||||
var/wireFlag = APCWireColorToFlag[wireColor]
|
||||
var/wireIndex = APCWireColorToIndex[wireColor]
|
||||
src.wires &= ~wireFlag
|
||||
switch(wireIndex)
|
||||
if(WIRE_EXTEND)
|
||||
src.extended_inventory = 0
|
||||
if(WIRE_SHOCK)
|
||||
src.seconds_electrified = -1
|
||||
if (WIRE_SHOOTINV)
|
||||
if(!src.shoot_inventory)
|
||||
src.shoot_inventory = 1
|
||||
|
||||
|
||||
/obj/machinery/vending/proc/mend(var/wireColor)
|
||||
var/wireFlag = APCWireColorToFlag[wireColor]
|
||||
var/wireIndex = APCWireColorToIndex[wireColor] //not used in this function
|
||||
src.wires |= wireFlag
|
||||
switch(wireIndex)
|
||||
// if(WIRE_SCANID)
|
||||
if(WIRE_SHOCK)
|
||||
src.seconds_electrified = 0
|
||||
if (WIRE_SHOOTINV)
|
||||
src.shoot_inventory = 0
|
||||
|
||||
/obj/machinery/vending/proc/pulse(var/wireColor)
|
||||
var/wireIndex = APCWireColorToIndex[wireColor]
|
||||
switch(wireIndex)
|
||||
if(WIRE_EXTEND)
|
||||
src.extended_inventory = !src.extended_inventory
|
||||
// if (WIRE_SCANID)
|
||||
if (WIRE_SHOCK)
|
||||
src.seconds_electrified = 30
|
||||
if (WIRE_SHOOTINV)
|
||||
src.shoot_inventory = !src.shoot_inventory
|
||||
|
||||
|
||||
/*
|
||||
* Vending machine types
|
||||
*/
|
||||
|
||||
@@ -95,6 +95,9 @@
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/can_attach(obj/mecha/M as obj)
|
||||
if(M.equipment.len >= M.max_equip)
|
||||
return 0
|
||||
|
||||
if (ispath(required_type))
|
||||
return istype(M, required_type)
|
||||
|
||||
|
||||
@@ -365,9 +365,7 @@
|
||||
|
||||
if(!PN)
|
||||
PN = new()
|
||||
powernets += PN
|
||||
NC.powernet = PN
|
||||
PN.cables += NC
|
||||
PN.add_cable(NC)
|
||||
NC.mergeConnectedNetworks(NC.d2)
|
||||
|
||||
//NC.mergeConnectedNetworksOnTurf()
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
equip_cooldown = 30
|
||||
energy_drain = 10
|
||||
force = 15
|
||||
required_type = list(/obj/mecha/working, /obj/mecha/combat)
|
||||
required_type = list(/obj/mecha/working/ripley, /obj/mecha/combat)
|
||||
|
||||
action(atom/target)
|
||||
if(!action_checks(target)) return
|
||||
@@ -1163,6 +1163,10 @@
|
||||
if (!usr.Adjacent(src))
|
||||
return
|
||||
|
||||
if (!isturf(usr.loc))
|
||||
usr << "\red You can't reach the passenger compartment from here."
|
||||
return
|
||||
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
if(C.handcuffed)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/fire_sound //Sound played while firing.
|
||||
var/fire_volume = 50 //How loud it is played.
|
||||
var/auto_rearm = 0 //Does the weapon reload itself after each shot?
|
||||
required_type = /obj/mecha/combat
|
||||
required_type = list(/obj/mecha/combat, /obj/mecha/working/hoverpod/combatpod)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/action_checks(atom/target)
|
||||
if(projectiles <= 0)
|
||||
|
||||
@@ -3,42 +3,56 @@
|
||||
name = "Hover Pod"
|
||||
icon_state = "engineering_pod"
|
||||
initial_icon = "engineering_pod"
|
||||
internal_damage_threshold = 80
|
||||
step_in = 4
|
||||
step_energy_drain = 5
|
||||
step_energy_drain = 15
|
||||
max_temperature = 20000
|
||||
health = 150
|
||||
infra_luminosity = 6
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/hoverpod
|
||||
var/list/cargo = new
|
||||
var/cargo_capacity = 3
|
||||
cargo_capacity = 5
|
||||
max_equip = 3
|
||||
var/datum/effect/effect/system/ion_trail_follow/ion_trail
|
||||
var/stabilization_enabled = 1
|
||||
|
||||
//duplicate of parent proc, but without space drifting
|
||||
/obj/mecha/working/hoverpod/dyndomove(direction)
|
||||
if(!can_move)
|
||||
return 0
|
||||
if(src.pr_inertial_movement.active())
|
||||
return 0
|
||||
if(!has_charge(step_energy_drain))
|
||||
return 0
|
||||
var/move_result = 0
|
||||
if(hasInternalDamage(MECHA_INT_CONTROL_LOST))
|
||||
move_result = mechsteprand()
|
||||
else if(src.dir!=direction)
|
||||
move_result = mechturn(direction)
|
||||
/obj/mecha/working/hoverpod/New()
|
||||
..()
|
||||
ion_trail = new /datum/effect/effect/system/ion_trail_follow()
|
||||
ion_trail.set_up(src)
|
||||
ion_trail.start()
|
||||
|
||||
//Modified phazon code
|
||||
/obj/mecha/working/hoverpod/Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["toggle_stabilization"])
|
||||
stabilization_enabled = !stabilization_enabled
|
||||
send_byjax(src.occupant,"exosuit.browser","stabilization_command","[stabilization_enabled?"Dis":"En"]able thruster stabilization")
|
||||
src.occupant_message("\blue Thruster stabilization [stabilization_enabled? "enabled" : "disabled"].")
|
||||
return
|
||||
|
||||
/obj/mecha/working/hoverpod/get_commands()
|
||||
var/output = {"<div class='wr'>
|
||||
<div class='header'>Special</div>
|
||||
<div class='links'>
|
||||
<a href='?src=\ref[src];toggle_stabilization=1'><span id="stabilization_command">[stabilization_enabled?"Dis":"En"]able thruster stabilization</span></a><br>
|
||||
</div>
|
||||
</div>
|
||||
"}
|
||||
output += ..()
|
||||
return output
|
||||
|
||||
//No space drifting
|
||||
/obj/mecha/working/hoverpod/check_for_support()
|
||||
//does the hoverpod have enough charge left to stabilize itself?
|
||||
if (!has_charge(step_energy_drain))
|
||||
ion_trail.stop()
|
||||
else
|
||||
move_result = mechstep(direction)
|
||||
if(move_result)
|
||||
can_move = 0
|
||||
use_power(step_energy_drain)
|
||||
/*if(istype(src.loc, /turf/space))
|
||||
if(!src.check_for_support())
|
||||
src.pr_inertial_movement.start(list(src,direction))
|
||||
src.log_message("Movement control lost. Inertial movement started.")*/
|
||||
if(do_after(step_in))
|
||||
can_move = 1
|
||||
return 1
|
||||
return 0
|
||||
if (!ion_trail.on)
|
||||
ion_trail.start()
|
||||
if (stabilization_enabled)
|
||||
return 1
|
||||
|
||||
return ..()
|
||||
|
||||
//these three procs overriden to play different sounds
|
||||
/obj/mecha/working/hoverpod/mechturn(direction)
|
||||
@@ -59,15 +73,15 @@
|
||||
playsound(src,'sound/machines/hiss.ogg',40,1)
|
||||
return result
|
||||
|
||||
/*
|
||||
/obj/mecha/working/hoverpod/New()
|
||||
..()
|
||||
return
|
||||
*/
|
||||
|
||||
//Hoverpod variants
|
||||
/obj/mecha/working/hoverpod/combatpod
|
||||
desc = "An ancient, ghetto fighter." // Ideally would have a seperate icon.
|
||||
desc = "An ancient, run-down combat spacecraft." // Ideally would have a seperate icon.
|
||||
name = "Combat Hoverpod"
|
||||
health = 200
|
||||
internal_damage_threshold = 35
|
||||
cargo_capacity = 2
|
||||
max_equip = 2
|
||||
|
||||
/obj/mecha/working/hoverpod/combatpod/New()
|
||||
..()
|
||||
@@ -76,58 +90,13 @@
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive
|
||||
ME.attach(src)
|
||||
|
||||
|
||||
/obj/mecha/working/hoverpod/shuttlepod
|
||||
desc = "Who knew a tiny ball could fit three people?"
|
||||
desc = "Who knew a tiny ball could fit three people?"
|
||||
|
||||
/obj/mecha/working/hoverpod/shuttlepod/New()
|
||||
..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/working/hoverpod/Exit(atom/movable/O)
|
||||
if(O in cargo)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/mecha/working/hoverpod/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["drop_from_cargo"])
|
||||
var/obj/O = locate(href_list["drop_from_cargo"])
|
||||
if(O && O in src.cargo)
|
||||
src.occupant_message("\blue You unload [O].")
|
||||
O.loc = get_turf(src)
|
||||
src.cargo -= O
|
||||
var/turf/T = get_turf(O)
|
||||
if(T)
|
||||
T.Entered(O)
|
||||
src.log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/working/hoverpod/get_stats_part()
|
||||
var/output = ..()
|
||||
output += "<b>Cargo Compartment Contents:</b><div style=\"margin-left: 15px;\">"
|
||||
if(src.cargo.len)
|
||||
for(var/obj/O in src.cargo)
|
||||
output += "<a href='?src=\ref[src];drop_from_cargo=\ref[O]'>Unload</a> : [O]<br>"
|
||||
else
|
||||
output += "Nothing"
|
||||
output += "</div>"
|
||||
return output
|
||||
|
||||
/obj/mecha/working/hoverpod/Del()
|
||||
for(var/mob/M in src)
|
||||
if(M==src.occupant)
|
||||
continue
|
||||
M.loc = get_turf(src)
|
||||
M.loc.Entered(M)
|
||||
step_rand(M)
|
||||
for(var/atom/movable/A in src.cargo)
|
||||
A.loc = get_turf(src)
|
||||
var/turf/T = get_turf(A)
|
||||
if(T)
|
||||
T.Entered(A)
|
||||
step_rand(A)
|
||||
..()
|
||||
return
|
||||
ME.attach(src)
|
||||
@@ -7,14 +7,7 @@
|
||||
max_temperature = 20000
|
||||
health = 200
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/ripley
|
||||
var/list/cargo = new
|
||||
var/cargo_capacity = 10
|
||||
|
||||
/*
|
||||
/obj/mecha/working/ripley/New()
|
||||
..()
|
||||
return
|
||||
*/
|
||||
cargo_capacity = 10
|
||||
|
||||
/obj/mecha/working/ripley/firefighter
|
||||
desc = "Standart APLU chassis was refitted with additional thermal protection and cistern."
|
||||
@@ -63,50 +56,4 @@
|
||||
for(var/obj/item/mecha_parts/mecha_tracking/B in src.contents)//Deletes the beacon so it can't be found easily
|
||||
del (B)
|
||||
|
||||
/obj/mecha/working/ripley/Exit(atom/movable/O)
|
||||
if(O in cargo)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/mecha/working/ripley/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["drop_from_cargo"])
|
||||
var/obj/O = locate(href_list["drop_from_cargo"])
|
||||
if(O && O in src.cargo)
|
||||
src.occupant_message("\blue You unload [O].")
|
||||
O.loc = get_turf(src)
|
||||
src.cargo -= O
|
||||
var/turf/T = get_turf(O)
|
||||
if(T)
|
||||
T.Entered(O)
|
||||
src.log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/mecha/working/ripley/get_stats_part()
|
||||
var/output = ..()
|
||||
output += "<b>Cargo Compartment Contents:</b><div style=\"margin-left: 15px;\">"
|
||||
if(src.cargo.len)
|
||||
for(var/obj/O in src.cargo)
|
||||
output += "<a href='?src=\ref[src];drop_from_cargo=\ref[O]'>Unload</a> : [O]<br>"
|
||||
else
|
||||
output += "Nothing"
|
||||
output += "</div>"
|
||||
return output
|
||||
|
||||
/obj/mecha/working/ripley/Del()
|
||||
for(var/mob/M in src)
|
||||
if(M==src.occupant)
|
||||
continue
|
||||
M.loc = get_turf(src)
|
||||
M.loc.Entered(M)
|
||||
step_rand(M)
|
||||
for(var/atom/movable/A in src.cargo)
|
||||
A.loc = get_turf(src)
|
||||
var/turf/T = get_turf(A)
|
||||
if(T)
|
||||
T.Entered(A)
|
||||
step_rand(A)
|
||||
..()
|
||||
return
|
||||
@@ -1,5 +1,7 @@
|
||||
/obj/mecha/working
|
||||
internal_damage_threshold = 60
|
||||
var/list/cargo = new
|
||||
var/cargo_capacity = 5
|
||||
|
||||
/obj/mecha/working/New()
|
||||
..()
|
||||
@@ -8,27 +10,51 @@
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
return
|
||||
|
||||
/*
|
||||
/obj/mecha/working/melee_action(atom/target as obj|mob|turf)
|
||||
if(internal_damage&MECHA_INT_CONTROL_LOST)
|
||||
target = pick(oview(1,src))
|
||||
if(selected_tool)
|
||||
selected_tool.action(target)
|
||||
return
|
||||
*/
|
||||
|
||||
/obj/mecha/working/range_action(atom/target as obj|mob|turf)
|
||||
/obj/mecha/working/Del()
|
||||
for(var/mob/M in src)
|
||||
if(M==src.occupant)
|
||||
continue
|
||||
M.loc = get_turf(src)
|
||||
M.loc.Entered(M)
|
||||
step_rand(M)
|
||||
for(var/atom/movable/A in src.cargo)
|
||||
A.loc = get_turf(src)
|
||||
var/turf/T = get_turf(A)
|
||||
if(T)
|
||||
T.Entered(A)
|
||||
step_rand(A)
|
||||
..()
|
||||
return
|
||||
|
||||
/*
|
||||
/obj/mecha/working/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["drop_from_cargo"])
|
||||
var/obj/O = locate(href_list["drop_from_cargo"])
|
||||
if(O && O in src.cargo)
|
||||
src.occupant_message("\blue You unload [O].")
|
||||
O.loc = get_turf(src)
|
||||
src.cargo -= O
|
||||
var/turf/T = get_turf(O)
|
||||
if(T)
|
||||
T.Entered(O)
|
||||
src.log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
|
||||
return
|
||||
|
||||
/obj/mecha/working/Exit(atom/movable/O)
|
||||
if(O in cargo)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/mecha/working/get_stats_part()
|
||||
var/output = ..()
|
||||
output += "<b>[src.name] Tools:</b><div style=\"margin-left: 15px;\">"
|
||||
if(equipment.len)
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/MT in equipment)
|
||||
output += "[selected==MT?"<b>":"<a href='?src=\ref[src];select_equip=\ref[MT]'>"][MT.get_equip_info()][selected==MT?"</b>":"</a>"]<br>"
|
||||
output += "<b>Cargo Compartment Contents:</b><div style=\"margin-left: 15px;\">"
|
||||
if(src.cargo.len)
|
||||
for(var/obj/O in src.cargo)
|
||||
output += "<a href='?src=\ref[src];drop_from_cargo=\ref[O]'>Unload</a> : [O]<br>"
|
||||
else
|
||||
output += "None"
|
||||
output += "Nothing"
|
||||
output += "</div>"
|
||||
return output
|
||||
*/
|
||||
|
||||
/obj/mecha/working/range_action(atom/target as obj|mob|turf)
|
||||
return
|
||||
@@ -109,6 +109,17 @@
|
||||
O.show_message("\red [usr] destroys the [name]!", 1)
|
||||
health = 0
|
||||
else
|
||||
|
||||
// Aliens can get straight through these.
|
||||
if(istype(usr,/mob/living/carbon))
|
||||
var/mob/living/carbon/M = usr
|
||||
if(locate(/datum/organ/internal/xenos/hivenode) in M.internal_organs)
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] strokes the [name] and it melts away!", 1)
|
||||
health = 0
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
usr << "\blue You claw at the [name]."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] claws at the [name]!", 1)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
/obj/effect/sign/double/barsign
|
||||
icon = 'icons/obj/barsigns.dmi'
|
||||
icon_state = "empty"
|
||||
anchored = 1
|
||||
|
||||
New()
|
||||
var/list/valid_states = list("pinkflamingo", "magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thedamnwall", "thecavern", "cindikate", "theorchard", "thesaucyclown", "theclownshead", "whiskeyimplant", "carpecarp", "robustroadhouse", "greytide", "theredshirt")
|
||||
src.icon_state = "[pick(valid_states)]"
|
||||
@@ -20,7 +20,7 @@
|
||||
icon_state="poster4"
|
||||
|
||||
/datum/poster/tg_5
|
||||
name = "Syndicate Recruitment Poster"
|
||||
name = "Mercenary Recruitment Poster"
|
||||
desc = "See the galaxy! Shatter corrupt megacorporations! Join today!"
|
||||
icon_state="poster5"
|
||||
|
||||
|
||||
@@ -11,14 +11,13 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
mouse_opacity = 0
|
||||
unacidable = 1//So effect are not targeted by alien acid.
|
||||
flags = TABLEPASS
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
|
||||
/obj/effect/effect/water
|
||||
name = "water"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "extinguish"
|
||||
var/life = 15.0
|
||||
flags = TABLEPASS
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/proc/delete()
|
||||
|
||||
@@ -260,8 +260,11 @@
|
||||
if(ishuman(M))
|
||||
//START HUMAN
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/list/mob_equip = list()
|
||||
if(H.species.hud && H.species.hud.equip_slots)
|
||||
mob_equip = H.species.hud.equip_slots
|
||||
|
||||
if(H.species && !(slot in H.species.hud.equip_slots))
|
||||
if(H.species && !(slot in mob_equip))
|
||||
return 0
|
||||
|
||||
switch(slot)
|
||||
@@ -306,7 +309,7 @@
|
||||
if(slot_belt)
|
||||
if(H.belt)
|
||||
return 0
|
||||
if(!H.w_uniform)
|
||||
if(!H.w_uniform && (slot_w_uniform in mob_equip))
|
||||
if(!disable_warning)
|
||||
H << "\red You need a jumpsuit before you can attach this [name]."
|
||||
return 0
|
||||
@@ -354,7 +357,7 @@
|
||||
if(slot_wear_id)
|
||||
if(H.wear_id)
|
||||
return 0
|
||||
if(!H.w_uniform)
|
||||
if(!H.w_uniform && (slot_w_uniform in mob_equip))
|
||||
if(!disable_warning)
|
||||
H << "\red You need a jumpsuit before you can attach this [name]."
|
||||
return 0
|
||||
@@ -364,7 +367,7 @@
|
||||
if(slot_l_store)
|
||||
if(H.l_store)
|
||||
return 0
|
||||
if(!H.w_uniform)
|
||||
if(!H.w_uniform && (slot_w_uniform in mob_equip))
|
||||
if(!disable_warning)
|
||||
H << "\red You need a jumpsuit before you can attach this [name]."
|
||||
return 0
|
||||
@@ -375,7 +378,7 @@
|
||||
if(slot_r_store)
|
||||
if(H.r_store)
|
||||
return 0
|
||||
if(!H.w_uniform)
|
||||
if(!H.w_uniform && (slot_w_uniform in mob_equip))
|
||||
if(!disable_warning)
|
||||
H << "\red You need a jumpsuit before you can attach this [name]."
|
||||
return 0
|
||||
@@ -387,7 +390,7 @@
|
||||
if(slot_s_store)
|
||||
if(H.s_store)
|
||||
return 0
|
||||
if(!H.wear_suit)
|
||||
if(!H.wear_suit && (slot_wear_suit in mob_equip))
|
||||
if(!disable_warning)
|
||||
H << "\red You need a suit before you can attach this [name]."
|
||||
return 0
|
||||
@@ -681,7 +684,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
usr.client.pixel_x = -viewoffset
|
||||
usr.client.pixel_y = 0
|
||||
|
||||
usr.visible_message("[usr] peers through the [devicename].")
|
||||
usr.visible_message("[usr] peers through the [zoomdevicename ? "[zoomdevicename] of the [src.name]" : "[src.name]"].")
|
||||
|
||||
/*
|
||||
if(istype(usr,/mob/living/carbon/human/))
|
||||
@@ -701,6 +704,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
usr.client.pixel_y = 0
|
||||
|
||||
if(!cannotzoom)
|
||||
usr.visible_message("[usr] lowers the [devicename].")
|
||||
usr.visible_message("[zoomdevicename ? "[usr] looks up from the [src.name]" : "[usr] lowers the [src.name]"].")
|
||||
|
||||
return
|
||||
@@ -35,6 +35,8 @@
|
||||
icon_state = "bodybag_closed"
|
||||
icon_closed = "bodybag_closed"
|
||||
icon_opened = "bodybag_open"
|
||||
open_sound = 'sound/items/zip.ogg'
|
||||
close_sound = 'sound/items/zip.ogg'
|
||||
var/item_path = /obj/item/bodybag
|
||||
density = 0
|
||||
storage_capacity = (mob_size * 2) - 1
|
||||
@@ -106,8 +108,6 @@
|
||||
desc = "A non-reusable plastic bag designed to prevent additional damage to an occupant at the cost of genetic damage."
|
||||
icon = 'icons/obj/cryobag.dmi'
|
||||
item_path = /obj/item/bodybag/cryobag
|
||||
open_sound = 'sound/items/zip.ogg'
|
||||
close_sound = 'sound/items/zip.ogg'
|
||||
store_misc = 0
|
||||
store_items = 0
|
||||
var/used = 0
|
||||
|
||||
@@ -21,17 +21,20 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
var/lastmode = 0
|
||||
var/ui_tick = 0
|
||||
var/nanoUI[0]
|
||||
|
||||
//Secondary variables
|
||||
var/scanmode = 0 //1 is medical scanner, 2 is forensics, 3 is reagent scanner.
|
||||
var/fon = 0 //Is the flashlight function on?
|
||||
var/f_lum = 2 //Luminosity for the flashlight function
|
||||
var/silent = 0 //To beep or not to beep, that is the question
|
||||
var/message_silent = 0 //To beep or not to beep, that is the question
|
||||
var/news_silent = 0 //To beep or not to beep, that is the question
|
||||
var/toff = 0 //If 1, messenger disabled
|
||||
var/tnote[0] //Current Texts
|
||||
var/last_text //No text spamming
|
||||
var/last_honk //Also no honk spamming that's bad too
|
||||
var/ttone = "beep" //The ringtone!
|
||||
var/ttone = "beep" //The PDA ringtone!
|
||||
var/newstone = "beep, beep" //The news ringtone!
|
||||
var/lock_code = "" // Lockcode to unlock uplink
|
||||
var/honkamt = 0 //How many honks left when infected with honk.exe
|
||||
var/mimeamt = 0 //How many silence left when infected with mime.exe
|
||||
@@ -42,7 +45,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/hidden = 0 // Is the PDA hidden from the PDA list?
|
||||
var/active_conversation = null // New variable that allows us to only view a single conversation.
|
||||
var/list/conversations = list() // For keeping up with who we have PDA messsages from.
|
||||
var/newmessage = 0 //To remove hackish overlay check
|
||||
var/new_message = 0 //To remove hackish overlay check
|
||||
var/new_news = 0
|
||||
|
||||
var/active_feed // The selected feed
|
||||
var/list/warrant // The warrant as we last knew it
|
||||
var/list/feeds = list() // The list of feeds as we last knew them
|
||||
var/list/feed_info = list() // The data and contents of each feed as we last knew them
|
||||
|
||||
var/list/cartmodes = list(40, 42, 43, 433, 44, 441, 45, 451, 46, 48, 47, 49) // If you add more cartridge modes add them to this list as well.
|
||||
var/list/no_auto_update = list(1, 40, 43, 44, 441, 45, 451) // These modes we turn off autoupdate
|
||||
@@ -101,8 +110,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
/obj/item/device/pda/mime
|
||||
default_cartridge = /obj/item/weapon/cartridge/mime
|
||||
icon_state = "pda-mime"
|
||||
silent = 1
|
||||
message_silent = 1
|
||||
news_silent = 1
|
||||
ttone = "silence"
|
||||
newstone = "silence"
|
||||
|
||||
/obj/item/device/pda/heads
|
||||
default_cartridge = /obj/item/weapon/cartridge/head
|
||||
@@ -172,7 +183,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
icon_state = "pda-libb"
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a WGW-11 series e-reader."
|
||||
note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!"
|
||||
silent = 1 //Quiet in the library!
|
||||
message_silent = 1 //Quiet in the library!
|
||||
news_silent = 1
|
||||
|
||||
/obj/item/device/pda/clear
|
||||
icon_state = "pda-transp"
|
||||
@@ -202,6 +214,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
/obj/item/device/pda/ai
|
||||
icon_state = "NONE"
|
||||
ttone = "data"
|
||||
newstone = "news"
|
||||
detonate = 0
|
||||
|
||||
|
||||
@@ -225,7 +238,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if (!c) // if the user hasn't selected a PDA file we can't send a message
|
||||
return
|
||||
var/selected = plist[c]
|
||||
create_message(usr, selected)
|
||||
create_message(usr, selected, 0)
|
||||
|
||||
|
||||
/obj/item/device/pda/ai/verb/cmd_toggle_pda_receiver()
|
||||
@@ -246,8 +259,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(usr.stat == 2)
|
||||
usr << "You can't do that because you are dead!"
|
||||
return
|
||||
silent=!silent
|
||||
usr << "<span class='notice'>PDA ringer toggled [(silent ? "Off" : "On")]!</span>"
|
||||
message_silent=!message_silent
|
||||
usr << "<span class='notice'>PDA ringer toggled [(message_silent ? "Off" : "On")]!</span>"
|
||||
|
||||
|
||||
/obj/item/device/pda/ai/verb/cmd_show_message_log()
|
||||
@@ -260,9 +273,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>"
|
||||
for(var/index in tnote)
|
||||
if(index["sent"])
|
||||
HTML += addtext("<i><b>→ To <a href='byond://?src=\ref[src];choice=Message;target=",index["src"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
HTML += addtext("<i><b>→ To <a href='byond://?src=\ref[src];choice=Message;notap;target=",index["src"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
else
|
||||
HTML += addtext("<i><b>← From <a href='byond://?src=\ref[src];choice=Message;target=",index["target"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
HTML += addtext("<i><b>← From <a href='byond://?src=\ref[src];choice=Message;notap;target=",index["target"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
HTML +="</body></html>"
|
||||
usr << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
|
||||
|
||||
@@ -347,7 +360,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
var/data[0] // This is the data that will be sent to the PDA
|
||||
|
||||
|
||||
data["owner"] = owner // Who is your daddy...
|
||||
data["ownjob"] = ownjob // ...and what does he do?
|
||||
|
||||
@@ -356,7 +368,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
data["fon"] = fon // Flashlight on?
|
||||
data["pai"] = (isnull(pai) ? 0 : 1) // pAI inserted?
|
||||
data["note"] = note // current pda notes
|
||||
data["silent"] = silent // does the pda make noise when it receives a message?
|
||||
data["message_silent"] = message_silent // does the pda make noise when it receives a message?
|
||||
data["news_silent"] = news_silent // does the pda make noise when it receives news?
|
||||
data["toff"] = toff // is the messenger function turned off?
|
||||
data["active_conversation"] = active_conversation // Which conversation are we following right now?
|
||||
|
||||
@@ -403,7 +416,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
data["cartridge"] = cartdata
|
||||
|
||||
data["stationTime"] = worldtime2text()
|
||||
data["newMessage"] = newmessage
|
||||
data["new_Message"] = new_message
|
||||
data["new_News"] = new_news
|
||||
|
||||
if(mode==2)
|
||||
var/convopdas[0]
|
||||
@@ -464,7 +478,45 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
)
|
||||
if(isnull(data["aircontents"]))
|
||||
data["aircontents"] = list("reading" = 0)
|
||||
if(mode==6)
|
||||
if(news_network.network_channels.len != feeds.len)
|
||||
var/datum/reception/reception = get_reception(src)
|
||||
if(reception.telecomms_reception & TELECOMMS_RECEPTION_SENDER)
|
||||
feeds.Cut()
|
||||
for(var/datum/feed_channel/channel in news_network.network_channels)
|
||||
feeds[++feeds.len] = list("name" = channel.channel_name, "censored" = channel.censored)
|
||||
|
||||
data["feedChannels"] = feeds
|
||||
if(mode==61)
|
||||
var/list/feed = feed_info[active_feed]
|
||||
if(!feed)
|
||||
feed = list()
|
||||
feed["updated"] = -1
|
||||
feed_info[active_feed] = feed
|
||||
var/datum/feed_channel/FC
|
||||
for(FC in news_network.network_channels)
|
||||
if(FC.channel_name == active_feed["name"])
|
||||
break
|
||||
if(FC.updated > feed["updated"])
|
||||
var/datum/reception/reception = get_reception(src)
|
||||
if(reception.telecomms_reception & TELECOMMS_RECEPTION_SENDER)
|
||||
feed["channel"] = FC.channel_name
|
||||
feed["author"] = FC.author
|
||||
feed["updated"] = FC.updated
|
||||
feed["censored"] = FC.censored
|
||||
|
||||
var/list/messages = list()
|
||||
if(!FC.censored)
|
||||
var/index = 0
|
||||
for(var/datum/feed_message/FM in FC.messages)
|
||||
index++
|
||||
if(FM.img)
|
||||
usr << browse_rsc(FM.img, "pda_news_tmp_photo_[feed["channel"]]_[index].png")
|
||||
messages[++messages.len] = list("author" = FM.author, "body" = FM.body, "message_type" = FM.message_type, "has_image" = (FM.img != null), "index" = index)
|
||||
feed["messages"] = messages
|
||||
data["feed"] = feed
|
||||
|
||||
nanoUI = data
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
@@ -623,7 +675,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if("Toggle Messenger")
|
||||
toff = !toff
|
||||
if("Toggle Ringer")//If viewing texts then erase them, if not then toggle silent status
|
||||
silent = !silent
|
||||
message_silent = !message_silent
|
||||
if("Toggle News")
|
||||
news_silent = !news_silent
|
||||
if("Clear")//Clears messages
|
||||
if(href_list["option"] == "All")
|
||||
tnote.Cut()
|
||||
@@ -653,10 +707,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
else
|
||||
ui.close()
|
||||
return 0
|
||||
if("Newstone")
|
||||
var/t = input(U, "Please enter new news tone", name, newstone) as text
|
||||
if (in_range(src, U) && loc == U)
|
||||
if (t)
|
||||
t = copytext(sanitize(t), 1, 20)
|
||||
newstone = t
|
||||
else
|
||||
ui.close()
|
||||
return 0
|
||||
if("Message")
|
||||
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
src.create_message(U, P)
|
||||
src.create_message(U, P, !("notap" in href_list))
|
||||
if(mode == 2)
|
||||
if(href_list["target"] in conversations) // Need to make sure the message went through, if not welp.
|
||||
active_conversation = href_list["target"]
|
||||
@@ -668,8 +731,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(P == n)
|
||||
active_conversation=P
|
||||
mode=21
|
||||
if("Select Feed")
|
||||
var/n = href_list["name"]
|
||||
for(var/f in feeds)
|
||||
if(f["name"] == n)
|
||||
active_feed = f
|
||||
mode=61
|
||||
if("Send Honk")//Honk virus
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/clown))//Cartridge checks are kind of unnecessary since everything is done through switch.
|
||||
if(cartridge && cartridge.access_clown)//Cartridge checks are kind of unnecessary since everything is done through switch.
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])//Leaving it alone in case it may do something useful, I guess.
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge.charges > 0)
|
||||
@@ -682,14 +751,16 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
ui.close()
|
||||
return 0
|
||||
if("Send Silence")//Silent virus
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/mime))
|
||||
if(cartridge && cartridge.access_mime)
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge.charges > 0)
|
||||
cartridge.charges--
|
||||
U.show_message("\blue Virus sent!", 1)
|
||||
P.silent = 1
|
||||
P.message_silent = 1
|
||||
P.news_silent = 1
|
||||
P.ttone = "silence"
|
||||
P.newstone = "silence"
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
@@ -709,34 +780,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
M.close()
|
||||
|
||||
if("Detonate")//Detonate PDA... maybe
|
||||
// check if telecomms I/O route 1459 is stable
|
||||
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
|
||||
var/obj/machinery/message_server/useMS = null
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
//PDAs are now dependant on the Message Server.
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
|
||||
var/datum/signal/signal = src.telecomms_process()
|
||||
|
||||
var/useTC = 0
|
||||
if(signal)
|
||||
if(signal.data["done"])
|
||||
useTC = 1
|
||||
var/turf/pos = get_turf(src)
|
||||
if(pos.z in signal.data["level"])
|
||||
useTC = 2
|
||||
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
|
||||
if(!(useMS && useTC))
|
||||
if(cartridge && cartridge.access_detonate_pda)
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
var/datum/reception/reception = get_reception(src, P, "") // get_reception calls sleep further down the line
|
||||
if(!(reception.message_server && reception.telecomms_reception & TELECOMMS_RECEPTION_SENDER))
|
||||
U.show_message("\red An error flashes on your [src]: Connection unavailable", 1)
|
||||
return
|
||||
if(useTC != 2) // Does our recepient have a broadcaster on their level?
|
||||
if(reception.telecomms_reception & TELECOMMS_RECEPTION_RECEIVER == 0) // Does our recepient have a broadcaster on their level?
|
||||
U.show_message("\red An error flashes on your [src]: Recipient unavailable", 1)
|
||||
return
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge.charges > 0)
|
||||
cartridge.charges--
|
||||
@@ -796,8 +848,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
//EXTRA FUNCTIONS===================================
|
||||
|
||||
if (mode == 2||mode == 21)//To clear message overlays.
|
||||
overlays.Cut()
|
||||
newmessage = 0
|
||||
new_message = 0
|
||||
update_icon()
|
||||
|
||||
if (mode == 6||mode == 61)//To clear news overlays.
|
||||
new_news = 0
|
||||
update_icon()
|
||||
|
||||
if ((honkamt > 0) && (prob(60)))//For clown virus.
|
||||
honkamt--
|
||||
@@ -805,6 +861,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
return 1 // return 1 tells it to refresh the UI in NanoUI
|
||||
|
||||
/obj/item/device/pda/update_icon()
|
||||
..()
|
||||
|
||||
overlays.Cut()
|
||||
if(new_message || new_news)
|
||||
overlays += image('icons/obj/pda.dmi', "pda-r")
|
||||
|
||||
/obj/item/device/pda/proc/detonate_act(var/obj/item/device/pda/P)
|
||||
//TODO: sometimes these attacks show up on the message server
|
||||
var/i = rand(1,100)
|
||||
@@ -879,11 +942,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
id.loc = get_turf(src)
|
||||
id = null
|
||||
|
||||
/obj/item/device/pda/proc/create_message(var/mob/living/U = usr, var/obj/item/device/pda/P)
|
||||
|
||||
U.visible_message("<span class='notice'>[U] taps on \his PDA's screen.</span>")
|
||||
/obj/item/device/pda/proc/create_message(var/mob/living/U = usr, var/obj/item/device/pda/P, var/tap = 1)
|
||||
if(tap)
|
||||
U.visible_message("<span class='notice'>[U] taps on \his PDA's screen.</span>")
|
||||
U.last_target_click = world.time
|
||||
var/t = input(U, "Please enter message", name, null) as text
|
||||
var/t = input(U, "Please enter message", P.name, null) as text
|
||||
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
|
||||
if (!t || !istype(P))
|
||||
return
|
||||
@@ -900,34 +963,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return
|
||||
|
||||
last_text = world.time
|
||||
// check if telecomms I/O route 1459 is stable
|
||||
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
|
||||
var/obj/machinery/message_server/useMS = null
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
//PDAs are now dependent on the Message Server.
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
var/datum/reception/reception = get_reception(src, P, t)
|
||||
t = reception.message
|
||||
|
||||
var/datum/signal/signal = src.telecomms_process()
|
||||
|
||||
var/useTC = 0
|
||||
if(signal)
|
||||
if(signal.data["done"])
|
||||
useTC = 1
|
||||
var/turf/pos = get_turf(P)
|
||||
if(pos.z in signal.data["level"])
|
||||
useTC = 2
|
||||
//Let's make this barely readable
|
||||
if(signal.data["compression"] > 0)
|
||||
t = Gibberish(t, signal.data["compression"] + 50)
|
||||
|
||||
if(useMS && useTC) // only send the message if it's stable
|
||||
if(useTC != 2) // Does our recipient have a broadcaster on their level?
|
||||
if(reception.message_server && (reception.telecomms_reception & TELECOMMS_RECEPTION_SENDER)) // only send the message if it's stable
|
||||
if(reception.telecomms_reception & TELECOMMS_RECEPTION_RECEIVER == 0) // Does our recipient have a broadcaster on their level?
|
||||
U << "ERROR: Cannot reach recipient."
|
||||
return
|
||||
var/send_result = useMS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
var/send_result = reception.message_server.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
if (send_result)
|
||||
U << "ERROR: Messaging server rejected your message. Reason: contains '[send_result]'."
|
||||
return
|
||||
@@ -955,33 +998,48 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(ai.aiPDA != P && ai.aiPDA != src)
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
|
||||
if (!P.silent)
|
||||
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
if(!P.silent) O.show_message(text("\icon[P] *[P.ttone]*"))
|
||||
//Search for holder of the PDA.
|
||||
var/mob/living/L = null
|
||||
if(P.loc && isliving(P.loc))
|
||||
L = P.loc
|
||||
//Maybe they are a pAI!
|
||||
else
|
||||
L = get(P, /mob/living/silicon)
|
||||
|
||||
|
||||
if(L)
|
||||
L << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\" (<a href='byond://?src=\ref[P];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
|
||||
nanomanager.update_user_uis(L, P) // Update the receiving user's PDA UI so that they can see the new message
|
||||
|
||||
nanomanager.update_user_uis(U, P) // Update the sending user's PDA UI so that they can see the new message
|
||||
|
||||
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
|
||||
P.overlays.Cut()
|
||||
P.overlays += image('icons/obj/pda.dmi', "pda-r")
|
||||
P.newmessage = 1
|
||||
P.new_message_from_pda(src, t)
|
||||
nanomanager.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message
|
||||
else
|
||||
U << "<span class='notice'>ERROR: Messaging server is not responding.</span>"
|
||||
|
||||
/obj/item/device/pda/proc/new_info(var/beep_silent, var/message_tone, var/reception_message)
|
||||
if (!beep_silent)
|
||||
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, loc))
|
||||
O.show_message(text("\icon[src] *[message_tone]*"))
|
||||
//Search for holder of the PDA.
|
||||
var/mob/living/L = null
|
||||
if(loc && isliving(loc))
|
||||
L = loc
|
||||
//Maybe they are a pAI!
|
||||
else
|
||||
L = get(src, /mob/living/silicon)
|
||||
|
||||
if(L)
|
||||
if(reception_message)
|
||||
L << reception_message
|
||||
nanomanager.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message
|
||||
|
||||
/obj/item/device/pda/proc/new_news(var/message)
|
||||
new_info(news_silent, newstone, news_silent ? "" : "\icon[src] <b>[message]</b>")
|
||||
|
||||
new_news = 1
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/pda/ai/new_news(var/message)
|
||||
// Do nothing
|
||||
|
||||
/obj/item/device/pda/proc/new_message_from_pda(var/obj/item/device/pda/sending_device, var/message)
|
||||
new_message(sending_device.name, sending_device.owner, sending_device.ownjob, message)
|
||||
|
||||
/obj/item/device/pda/proc/new_message(var/sending_unit, var/sender, var/sender_job, var/message)
|
||||
var/reception_message = "\icon[src] <b>Message from [sender] ([sender_job]), </b>\"[message]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
|
||||
new_info(news_silent, newstone, reception_message)
|
||||
|
||||
log_pda("[usr] (PDA: [sending_unit]) sent \"[message]\" to [name]")
|
||||
new_message = 1
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/pda/verb/verb_remove_id()
|
||||
set category = "Object"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user